Posts

Showing posts from July, 2011

java - Executing a jar with arguments, but it's not accepting argument whatever I give in ProcessBuilder method -

i executing .jar arguments have written below, it's executing jar , waiting arguments. i give arguments, it's not accepting , same method working fine other .jar execution many arguments i've tried. can problem? here code :- public static void main(string[] args) throws ioexception { // todo auto-generated method stub //bufferedreader br = null; system.out.println("starting"); processbuilder pb = new processbuilder("c:/java/jdk1.6.0_35/bin/java","-jar","c:/tcserver/tcclient/lib/tbrowser.jar","browser.1"); try{ process p = pb.start(); outputstream stdin = p.getoutputstream (); inputstream stderr = p.geterrorstream (); inputstream stdout = p.getinputstream (); inputstream = p.getinputstream(); inputstreamreader isr = new inputstreamreader(is); bufferedreader buff = new bufferedreader (isr); string line; while((line = buff.rea...

CodenameOne Image Slider using Image Viewer -

Image
is possible achieve similar attachment using imageviewer. have images loaded using defaultlistmodel similar screenshot part of next image shows user knows there next image , if possible slider @ bottom of screen. thanks most of people did used tabs widget more suitable sort of usage. can see discussion of here: https://groups.google.com/d/msg/codenameone-discussions/06hljmkia-4/4oi4wbamke0j

android - Dynamic layout and buttons in my existing layout after the image animation -

i trying load dynamic layout , buttons in existing layout after image animation. image has move center top of screen. after dynamic layout button visible below image. dynamic layout , button not visible. activity_main.xml <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/linearlayout1" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/bgm2" android:orientation="vertical" android:paddingbottom="@dimen/activity_vertical_margin" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" tools:context=".mainactivity" > <imageview android:id="@+id/imageview1" android:layout_width="250dp...

c# - Windows Forms & Actual Installer - Package being reported as malware -

we're building proof of concept windows application based on windows forms. we plan offer package beta testing small focus group whenever 1 tries download app our website google chrome / internet explorer report software may malware. i not actual desktop software developer, c# hobby , have no clue on how "sign" software legit. advice doing on daily basis? the following of code signing tools i've used far: signtool of microsoft digicertutility those code signing tools free , there lot of out there need buy digital certificate sign code or installer make software trusted. before can buy certificate verify few credentials or company because put in certificate trusted publisher.

ios - Assertion failure in MainViewController -

i trying insert records table in sqlite3 following code, code working fine ios 8 gives assertion error in ios 7.1.2. table creation: nslog(@"database path %@",self.databasepath); if ([manager copyitematpath:sourcepath topath:self.databasepath error:&error] == no) { nslog(@"error : %@", [error localizeddescription]); } // createstmt = nil; if (sqlite3_open([self.databasepath utf8string], &database) == sqlite_ok) { const char *sql_stmt = "create table if not exists categorytable (mainimg blob,addimg blob,cat_nm text,image_nm text,lastmodified text,cat_desc text,prod_id text,prod_nm text,prod_desc text,sku text,supplier_id text,supplier_phone text,product_dosage text,unit_size text,unit_price text)"; //nsstring *query=[nsstring stringwithformat:@"create table %@(rollno integer, name text)",tablename]; if (sqlite3_prepare_v2(database, sql_stmt, -1, &statement, null) != s...

caching - Symfony cache eclipse xDebug -

i have frustrating problem eclipse pdt. when debugging getting exceptions time(which should not there) suspect eclipse cached of files , reason why getting exceptions. sure code correct @ least eclipse throwing exceptions since when @ code in netbeans can step on without getting exceptions whatsoever. there's checkbox symfony in netbeans can ignore symfony cache , guess that's why able debug in there. eclipse , i'd use debuging , coding tool. p.s. have cleared symfony cached via cmd , tried again had no luck. i open suggestions that'd fix issue, thanks! p.s.2 using ecliplse luna , symfony 1.2 i know late, posting answer might still struggle issue. problem in case in debug view in eclipse have had variables not resolved in context when debugging (for example old variables have watched in other debug sessions). , when miscalculated eclipse's debugger had stopped responding. if have similar problem suggestion be: first clear previous variables debug...

Using Delphi to send email by web service (without leaking credentials and without user interaction) -

i have delphi application, needs send generated pdf file email 1 recepient of predefined list of recepients. i not want mess around mapi (not customers have configured this) i not want customers enter mail account details (this means smtp no option either) therefore consider use / setup paas web service receive email text, pdf file , index number of recepient work. question is: out-of-the-box solution exist in delphi, or preferable way? for instance considered using google app engine there seems no builtin support in delphi . prefer out of box solution or tested solution decent documentation. server part should simple possible. edited: clarifications: the resulting exe installed @ customer computer. think setting mail account therefore no option, because extract credentials exe , abuse mail account. same seems true web services provide 1 (login/password) access. using oauth2 seems no option either because want send email without user interaction. if credentials ne...

Play Framework 2 JSON Reads, deserialization of one variable -

i'm using play framework 2.4 , i'm trying basic json deserialization reads error. here code: case class config(action: string) and somewhere, implicit val configreads: reads[config] = ( (__ \ "action").read[string] )(config.apply _) i think configreads correctly formed ide error on "read" method call (symbol not defined), when compile code following error: error:(30, 27) overloaded method value read alternatives: (t: string)play.api.libs.json.reads[string] <and> (implicit r: play.api.libs.json.reads[string])play.api.libs.json.reads[string] cannot applied (string => wings.common.json.config) (__ \ "action").read[string] ^ but, if instead of trying deserialize 1 argument declare class 2 arguments in constructor , write code deserialize it, works. does know how solve this? edit: digging in depth of google found this play 2.1.x i'm using json library play 2.4.1 problem shoul...

python - Why does "if foo:" follow the branch even if the function foo returns False? -

def foo(a): print("i'm foo") return false if foo: print("ok") else: print("ko") i run , returns ok. know, should have written if foo(): . i forget parenthesis when calling functions without parameters , need explaination result. thanks in advance answers! when write if foo: print("ok") else: print("ko") you testing if function pointer foo . defined, prints "ok" , not call function. parenthesis, call foo function , runs code.

Matching IDs preceded with "case" with SSIS script using C# regex -

i using ssis script component extract information string. i id in string in below pattern: case:123455 it embedded in string below: this string. want case:12345 , case:5656759 in title 2. i extract id 12345 & 565675 string. occurrence of 'case' dynamic, can none, can appear 1 or more 1 in string. need regex syntax extract info. the following cases should captured : case:12345, case :12345, case: 12345, case : 12345, case:12345, case:12345 you can make use of look-behind , \d+ : (?i)(?<=\bcase:)\d+ see demo this regex match 1 or more digits appear after literal string case: case whole word . in case need version capturing group, here is: (?i)\bcase:(\d+) the value need stored in capturing group 1. update to allow optional spaces in pattern, use either (?i)(?<=\bcase\s*:\s*)\d+ or version without lookbehind: (?i)\bcase\s*:\s*(\d+) making pattern case-insensitive the (?i) inline option/flag makes pattern case-inse...

css - Break text inline list -

i have problem horizontal list. have 200px sized li elements inside 800px ul. want ul scroll horizontally, , text inside li break. causes li elements lose vertical position. html: <div> <ul> <li>one</li> <li>two</li> <li>three 3 three 3 three 3 three 3 three 3 three 3 three 3 three three</li> <li>four</li> </ul> </div> css: ul { width: 600px; height: 400px; display: block; white-space: nowrap; overflow-x: auto; overflow-y: hidden; } li { width: 150px; height: 150px; display: inline-block; } kinda hard describe.. see fiddle: https://jsfiddle.net/yrltslrf/ add vertical-align: top; li .

if statement - Setting specific variable (for folder names) in batch script -

i'm busy making batch-script @ workplace automatically syncs 10 different computers single network drive. the network drive contains study folders , accompanying start menus these studies, syncs each individual computer. example: study folder = d:\studyfolder1234 start menu = %userprofile%\desktop\startmenu1234 i trying build loop loops through folders on computer, , syncs them accordingly. accounted time needed access network drive adding latency in batch script: 'ping -n 30 -w 1000 127.0.0.1 > nul'. i want batch script automatically following: after syncing, whenever there file present on local computer no longer exist on network drive (e.g. studyfolder5241), local 'startmenu5241' automatically moved local 'studyfolder5241' subfolder. after want local 'studyfolder5241' moved local folder (an archive folder). i'm beginner when comes batch scripting, managed xcopy commands work: (g:\= network drive) (d:\= local computer) xc...

c# - MVC5 Get logged in user email -

i have configured asp.net mvc 5 app use external logins (and don't intend use local logins). email address of logged in user, doing membership.getuser().email but throwing host 'xxx' not allowed connect mysql server i able connect database fine. log in, log out, fetch other data. works fine too. user.identity.getusername() the system blows when using membership stuff. connectionstring configured in here doesnot exist in web.config. wonder how working out! <membership defaultprovider="mysqlmembershipprovider"> <providers> <remove name="mysqlmembershipprovider" /> <add name="mysqlmembershipprovider" type="mysql.web.security.mysqlmembershipprovider, mysql.web, version=6.9.6.0, culture=neutral, publickeytoken=xxx" connectionstringname="localmysqlserver" ... /> </providers> </membership> if update connectio...

javascript - how to swap div with one another in mobile view css -

Image
for clear view have drawn 3 diferent images showing status of divs in desktop, in mobile view , i'm trying in mobile view. 1. current status of divs in desktop view. html <div id="wrapper"> <div id="left-nav">recent posts</div> <div id="main">articles listing</div> </div> 2. after media query mobile device making both divs full width. 3. , i'm trying get solution come placing divs changing position in html floating property below. <div id="wrapper"> <div id="main" style="float:right;">articles listing</div> <div id="left-nav" style="float:left;">recent posts</div> </div> and works, on mobile view after clearing floats. in cms wish css if possible other way around. problem : make both div of full width (in mobile media queries) then, recent articles div appears first , article listing ho...

java - TooTallNate's Websockets library WSS issue -

used tootallnate's websockets library implement websocket server, works perfect. need implement websockets secure. created keystore in example , implemented wss server. created keystore this: keytool -genkey -validity 3650 -keystore "keystore.jks" -storepass "storepassword" -keypass "keypassword" -alias "default" -dname "cn=127.0.0.1, ou=myorgunit, o=myorg, l=mycity, s=myregion, c=mycountry" (also tried create keystore -keyalg rsa parameter) now when trying connect server js client, successfull connect attempts 10% of attempts. in rest 90% cases, chrome console says timeout wss connection. tried connect server using openssl, wss server provides certificate 1 time after server starts. from console -djavax.net.debug=all vm parameter: `using sslengineimpl. ignoring unavailable cipher suite: tls_ecdhe_rsa_with_aes_256_cbc_sha ignoring unavailable cipher suite: tls_dhe_rsa_with_aes_256_cbc_sha ignoring unavailable cip...

mysql - Select towns that have nearby things -

i have 2 tables examples below, towns , things , , need list of towns have nearby things within x distance town record. latitude , longitude used distance calculation. i've looked @ other questions , have managed records things single specified town, can't think how list of towns have nearby things closer x distance them. being able sort resulting towns number of nearby things within x distance bonus. towns +--------+----------+---------+---------+ | townid | townname | townlat | townlng | +--------+----------+---------+---------+ | 1 | town | 1.5 | 1.9 | | 2 | town b | 1.4 | 3.8 | | 3 | town c | 2.3 | 2.7 | | 4 | town d | 3.2 | 1.6 | | ... | ... | ... | ... | +--------+----------+---------+---------+ things +---------+-----------+----------+----------+ | thingid | thingname | thinglat | thinglng | +---------+-----------+----------+----------+ | 1 | thing | 2.1 | 3.1 |...

javascript - Google Api Asynch Callback Failed -

i getting requested content with: function httpget(theurl) { var xmlhttp = new xmlhttprequest(); xmlhttp.open( "get", theurl, false ); xmlhttp.send( null ); alert(xmlhttp.status); return xmlhttp.responsetext; } after content parsed new site via: $test = httpget("www.content.com"); document.getelementbyid("div_content").innerhtml = document.getelementbyid("div_content").innerhtml + $test; after use google api asynch callback callback function thorws error loadscriptfunc('https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&callback=loadscript'); the error is: window.loadscript not function i did jquery $.get , worked me. edit: function loaded this: if(document.getelementbyid('map_canvas')){ loadscriptfunc('https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&callback=loadscript'); } the function looks like: function load...

javascript - jQuery mask input without changing value -

i using masked-input-plugin changes value , field becomes invalid ... in js $phoneinput.mask('99-99-99-999'); and later in browser console ('.phone-input-order-form').val() "99-99-99-999" is there way val "999999999" while masked ? i thinking extend jquery val maybe know better way? maybe without plugin? :d overriding jquery's val() function might cause unexpected issues other scripts. maybe try this: $.fn.maskval = function () { return $(this).mask(); }; demo: http://jsfiddle.net/alan0xd7/w4s0v7y3/

c# - Check if the two Files exist in the folder -

i want take file name user *.txt only, , compare file name *.txt first general.txt , special.txt.if both files present in folder boolean set true. alteration question:- checking file count *.txt file name if count 2 our purpose solved like this? string path = @""; directoryinfo dir = new directoryinfo(path); var files = dir.getfiles("*.txt"); if (files.length >= 2) { }

Display datetime like 1 hour ago, 5 hours ago - Angularjs -

i display last login time on control panel. how display datetime this: 1 hour ago, 5 hours ago moment.js great way this. i've set plunkr shows basic example on how this. http://plnkr.co/edit/64mfpdhuxdxcqo6r8xrf?p=preview to summarise, can use .fromnow() method display difference between date , current time: $scope.difference = moment($scope.yourdate).fromnow(); if $scope.yourdate 1 hour ago, $scope.difference set an hour ago . edit based on comment, i've update plunker use date you've provided. $scope.yourdate = new date('2015-07-08t14:02:42.973'); $scope.difference = moment($scope.yourdate).fromnow(); at time of writing, sets $scope.difference 20 hours ago .

linux - Why does aptitude update give me an source.list error? -

i'm running debian (wheezy) webserver , i'm installing updates regulary. task use aptitude update followed aptitude safe-upgrade . everytime go through procedure output includes error message @ bottom: hit http://ftp.de.debian.org wheezy release.gpg hit http://ftp.de.debian.org wheezy-updates release.gpg hit http://ftp.de.debian.org wheezy release hit http://ftp.de.debian.org wheezy-updates release hit http://ftp.de.debian.org wheezy/main sources hit http://ftp.de.debian.org wheezy/contrib sources hit http://ftp.de.debian.org wheezy/non-free sources hit http://ftp.de.debian.org wheezy/main amd64 packages hit http://ftp.de.debian.org wheezy/contrib amd64 packages hit http://ftp.de.debian.org wheezy/non-free amd64 packages hit http://ftp.de.debian.org wheezy/contrib translation-en hit h...

java - generate diagrams from hibernate models -

i have codebase , sql creation script of legacy spring+hibernate app, retired , migrated. have limited knowledge of java (and legacy frameworks), generating model diagram may helpful understand old data (and logic). the sql script has no foreign keys, noticed xmls annotated models fields , relationships hibernate. what's easiest way generate model diagrams these hibernate xmls? djangographviz installed generate models diagrams in moment. there similar method/tool hibernate? with hibernate have java references between entities, tool visualizing class dependencies might help. i'm author of recommend degraph , there many out there. google java dependency visualization.

sql - Using Max() function to select group values -

i've got table this: sku item value 1503796 1851920 0,9770637 1503796 1636691 0,9747891 1503796 1503781 0,9741025 1503796 3205763 0,9741025 1503801 1999745 0,9776622 1503801 1999723 0,9718825 1503801 3651241 0,9348839 1503801 1773569 0,9331309 1503811 1439825 0,97053134 1503811 1636684 0,96297866 1503811 1636671 0,96003973 1503811 1600553 0,9535771 1503818 1636708 0,9440251 1503818 1636709 0,9440251 1503818 1779789 0,9423958 1503818 3322310 0,9369579 i need output (grouped max value): sku item value 1503796 1851920 0,9770637 1503801 1999745 0,9776622 1503811 1439825 0,97053134 1503818 1636708 0,9440251 tried use smth this: select sku, item, value import value=(select max(value) import ) but select 1 row max value. how rewrite query? rank records row_number, max value sku gets #1. keep records ranked #1. select sku, item, value ( select mytable.* row_number() o...

excel - Message box pop up -

i need build code give me pop message if value of cell (price) bigger cell (target). if price > target pop window (ideally sound). also if i hit ok need register "true" cell or if hit cancel insert cell false my first vba code please show understanding, lot in advance. private sub commandbutton1_click() sub userinput() dim ireply integer if range("c6").value > range("e6").value ireply = msgbox(prompt:="price" & range("f6").value & " reached target. stop tracking ?", buttons:=vbyesnocancel, title:="tracking") if ireply = vbyes range("b6").value = "true" elseif ireply = vbno range("b6").value = "false" end ifs if range("c7").value > range("e7") end if if range("c8").value > range("e8") end if exit sub end sub to make possible directly when input data excel, you'll need place she...

Adding Class to Div in jQuery -

evening all, i'm trying add class div have not working reason. $(.example div).addthisclass('example class'); why isn't working, works every other time? has jquery changed? pls help. there no method addthisclass in jquery. use addclass : $('div.example').addclass('example class'); in vanilla javascript, can use classlist : document.queryselector('div.example').classlist.add('example class');

php - wordpress custom login validation when user is not active -

i have custom login , wanted check if user activated or not. i have custom registration send activation key , when activation key clicked automatically changed user meta value. okay. issue when user login though not yet activated can logged in. seems validation code not work , having trouble why. here code add_action( 'authenticate', 'check_username_password', 1, 3); function check_username_password( $login, $username, $password ) { $referrer = $_server['http_referer']; $user = $username->id; $status = get_user_meta($user, 'ja_disable_user', true); if( !empty( $referrer ) && !strstr( $referrer,'wp-login' ) && !strstr( $referrer,'wp-admin' ) ) { if( $username == "" || $password == "" ){ if ( !strstr($referrer, '?login=empty' )) { wp_redirect( home_url('/login/?login=empty') ); } else { wp_redirect( $referrer ); ...

spring - Deferred poll messages from queue, by header property timeOfPull -

what best way make deffered queue? example have messages, time of expire: 00:00:01; 00:00:02 when current time 00:00:00 , when poller must return 0 messages, when current time 00:00:01 return 1 message, when 00:00:02 poller return another, , etc.. the delayer should want. if delay expression evaluates date object, message released @ time.

How to convert an array in PHP into a valid JSON request and send it to web service URL in following scenario? -

i've got following array titled $val in php : array ( [page_id] => 208 [invite_emails] => [invite] => array ( [0] => 970 [1] => 991 [2] => 992 ) ) i want convert above array valid json request , send web service url. how should it? please me. thanks in advance. your question rather broad, convert php array json object easy. $jsonstring = json_encode($array); as sending url, this question contains info. or if want use curl, this resource pretty good.

How to compare two arrays in JavaScript and return a new array indicating matches -

this question has answer here: simplest code array intersection in javascript 31 answers is there way compare 2 arrays , return new array indicating values matched? for example a = ['africa', 'america', 'europe'] b = ['africa', 'asia', 'europe'] // need // c = [true, false, true] edit: far have function mask(arr1, arr2) { var arr = []; (var = 0; < arr1.length; i++) { arr.push(arr1[i] === arr2[i]); } return arr; } just loop through array. example: var = ['africa', 'america', 'europe']; var b = ['africa', 'asia', 'europe']; var index = 0; var c = []; while(a.length > index){ c.push(a[index] === b[index]); index++ }

php - PHPMailer, SMTP Failed to connect to server -

i'm using phpmailer. when upload host error smtp connect() failed. my environment 1. server os:centos 7 2. web services: xampp 5.6.8 3. phpmailer:5.2.4 this code: <?php require_once('phpmailer_old/class.phpmailer.php'); try{ $mail = new phpmailer(true); // true param means throw exceptions on errors, need catch $mail->issmtp(); // telling class use smtp $mail->smtpdebug = 1; // enables smtp debug information (for testing) $mail->smtpauth = true; // enable smtp authentication $mail->smtpsecure = "ssl"; $mail->smtpautotls = false; // close tls $mail->host = "smtp.gmail.com"; // sets gmail smtp server $mail->port = 465; // set smtp port gmail server $mail->username = "test@gmail.com"; // gmail username $mail->password = "test"; // gmaipassword $mail->fro...

java - Is Chase Paymentech Orbital Gateway Supported on App Engine -

is possible integrate chase paymentech orbital gateway java google app engine based application. per understanding needs set environmental variable paymentech sdk , not possible use on app engine. if body have exp on using on app engine please suggest. i can't speak gae part, can point a related answer may help. as environment variable part, depending on language using setting before interacting sdk should trick.

ios - Resize Uibutton with Auto Layout & size class -

Image
i have developing app iphone & ipad. choose auto layout & size class bit complex understand. have tried add number pad app please refer screenshots.i added iphone 6, iphone 4s , ipad screenshot. want iphone 6(screen1) output. cant in iphone 4s(screen2). in ipad(screen3) atleast need show buttons @ center of screen. can 1 on this. i try set less or greater size buttons not working. please suggest me how make same on screens. in order achieve same results different iphones , ipads must work , implement size classes chose. please refer apple's manual at: https://developer.apple.com/library/ios/recipes/xcode_help-ib_adaptive_sizes/chapters/aboutadaptivesizedesign.html another great tutorial at: http://adoptioncurve.net/archives/2014/08/working-with-size-classes-in-interface-builder/ as mentioned in question- size classes might less intuitive. experience, reading apple's manual understand how accomplish need. i hope helps.

java - Why layout does not become invisible? -

so layout still visible, maybe sees mistake? want dispear when infobutton(imagebutton) clicked. framelayout infolayout; infolayout = (framelayout) findviewbyid(r.id.infolayout); public void infopressed(view v){//info button pressed user //infolayout.setvisibility(view.gone); infolayout.setvisibility(view.invisible); } <framelayout android:layout_width="193dp" android:layout_height="200dp" android:layout_alignparentleft="true" android:layout_alignparentstart="true" android:layout_alignbottom="@+id/servicelayout" android:id="@+id/infolayout"> i wacthed: how change visibility of layout programaticly edited: wrong code part, still not working me if id declaration correct guess have change line infolayout.setvisibility(view.invisible); to infolayout.setvisibility(framelayout.invisible);

c# - ResourceDictionary in separate library -

i have defined resourcedictionary in separate library below <resourcedictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:cultures="clr-namespace:my_localization.cultures" xmlns:properties="clr-namespace:my_localization.properties"> <objectdataprovider x:key="resources" objecttype="{x:type cultures:cultureresources}" methodname="getresourceinstance"/> <objectdataprovider x:key="cultureresourcesds" objecttype="{x:type cultures:cultureresources}"/> </resourcedictionary> i have used library library below (header of xaml only) <msribbon:ribbontab x:class="ribbon.planner.plannerribbon" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc=...

gstreamer - Use gst-launch to output a video frame to certain position on framebuffer -

currently using below command play video clip: gst-launch filesrc location=/media/sda1/mpeg4_640x480.mp4 ! decodebin2 name=dec ! queue ! ffmpegcolorspace ! videoscale ! video/x-raw-rgb,width=320, height=240 ! fbdevsink dec. ! queue ! audioconvert ! autoaudiosink the video frame reiszed 320x240 , outputted framebuffer. however, we'd set video frame (x, y). possible? try using "videobox" element. in top, left, bottom, , right properties, positive values used cropping, you'll want use negative values offsetting. this pipeline move 640x360 video test source bottom right corner of 1280x720 output: gst-launch-1.0 videotestsrc ! video/x-raw,width=640,height=360 ! videoconvert ! videobox left=-640 right=0 top=-360 bottom=0 ! video/x-raw,width=1280,height=720 ! autovideosink and can use "fill" property control how space filled. http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-pl...

r - biotools package fails to install -

i have tried install biotools package on desktop can run box's m test homogeneity of covariance. following error message. error: failed lock directory ‘/users/lmil8126/library/r/3.2/library’ modifying try removing ‘/users/lmil8126/library/r/3.2/library/00lock-biotools’ warning in install.packages : installation of package ‘biotools’ had non-zero exit status the downloaded source packages in ‘/private/var/folders/0q/n377y94n4gzd0zlntfsq1jnh2ymcwz/t/rtmp8fhifd/downloaded_packages’ the package works fine on laptop, mavericks, desktop yosemite. does have suggestions fix?

javascript - Change variable value on scroll - jQuery -

i have variable: coords.zoom . i'm using value of coords.zoom set width , height of zoomed image, giving me magnification effect. , works great! my problem don't know how increment (or decrement) value of variable, when user scrolls on image. need create function change value of variable on user scroll, nothing scrolling or down. variable between 1 , 3. any ideas? it code execute when document scrolled. , code execute in proper manner settimeout. var scrltimeout = null; jquery(document) .scroll(function(){ cleartimeout(scrltimeout); scrltimeout = settimeout( function(){ alert('document scrolled'); }, 300) });

PostgreSQL: Enumerate SQL query result -

consider following sql query , response: create temporary table dreams (name text, type text); insert dreams values ('monkey', 'nice'); insert dreams values ('snake', 'not nice'); insert dreams values ('donkey', 'nice'); insert dreams values ('bird', 'nice'); select name dreams type='nice' order name; name -------- bird donkey monkey (3 rows) i enumerate results order of appearance, regardless of existing ids, convenience. expected result should a-la: select <magic_enumeration>, name dreams type='nice' order name; magic_enumeration | name -------------------+-------- 1 | bird 2 | donkey 3 | monkey (3 rows) any ideas how enumerate query result order of appearance? try using row_number, windowing function select row_number() on (order name) sid, <-- magic enumeration! name dreams type='nice' ...

php - Update statement not executing inside while loop -

please me this. i have php code search first records needed inserted table here code: //search split values (capacitors) $capacitance =mysql_query("select itemno, wwpn, substr(val, 1, length(val) / 2) capacitor, substr(val, length(val) / 2+1) capasitance bom_csv boardnumber ='$board' , bom_csv.qty<>'' , bom_csv.qty !='qty';"); while($row =mysql_fetch_array($capacitance)) { echo "<pre>"; echo $row['itemno']; echo $row['capacitor']; echo $row['capasitance']; echo $row['wwpn']; echo "</pre>"; $capacitor = $row['capacitor']; $capacity =$row['capasitance']; $adi_pn=$row['adi_pn']; $itemno=$row['itemno']; //insert via update $update =@mysql_query ("update bom_crunching set capacitor ='$capacitor', capacitance ='$capacity' ...

unit testing - How to write a karma-jasmine test case for $http.get in angularJS? -

i have service: (function () { angular.module('app').service('myappservice', myappservice); myappservice.$inject = ['$http', 'testurl']; function myappservice($http, testurl) { var service = { testfunction: testfunction }; return service; function testfunction() { /*testurl backend api*/ return $http.get(testurl) .error(function(){ return; }) .then(function (response) { return response.data; }); } } })(); i call in controller as: testcontrollerfunction(); function testcontrollerfunction() { myappservice.testfunction().then(function (response) { app.testresponse = response; //this http response console.log(app.testresponse); }); } i writing karma ...

html - My background image keeps getting cut off at the bottom? -

this isn't duplicate, i've looked @ similar questions , tried solutions nothing has worked. half image keeps getting cut off, other solutions have centered didn't strech across page wanted without being distorted, ideas on what's wrong? html <! doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="mainpage.css"/> </head> <body> <div id="header"> </div> <div id="body"> </div> <div id="footer"> </div> </body> </html> css body{width: 100%; margin:0px; padding:0px; } #header{ height:2300px; background-color:pink; background-image: url("http://horosco...

How to drop columns from a table after first 5 columns in MS SQL Server -

how drop column table after first 5 columns in ms sql server. have table default 5 columns there can more column added dynamically. need drop dynamic columns without default columns. in case first 5 columns. you can use dynamic sql this. need generate alter table... drop column... script each column of table. columns, need query sys.columns . test data: create table testtable( col1 int identity(1,1), col2 int, col3 int, col4 int, col5 int, col6 int, col7 int ) dynamic sql declare @sql varchar(max) = '' select @sql = @sql + char(10) + 'alter table testtable drop column ' + quotename(name) + ';' sys.columns object_id = object_id('testtable') , column_id > 5 print @sql exec(@sql) still, you're doing bad practice.

python - Retaining split characters -

i have following data: <http://dbpedia.org/data/plasmodium_hegneri.xml> <http://code.google.com/p/ldspider/ns#headerinfo> _:header16125770191335188966549 <http://dbpedia.org/data/plasmodium_hegneri.xml> . _:header16125770191335188966549 <http://www.w3.org/2006/http#responsecode> "200"^^<http://www.w3.org/2001/xmlschema#integer> <http://dbpedia.org/data/plasmodium_hegneri.xml> . _:header16125770191335188966549 <http://www.w3.org/2006/http#date> "mon, 23 apr 2012 13:49:27 gmt" <http://dbpedia.org/data/plasmodium_hegneri.xml> . _:header16125770191335188966549 <http://www.w3.org/2006/http#content-type> "application/rdf+xml; charset=utf-8" <http://dbpedia.org/data/plasmodium_hegneri.xml> . now want transform data following form -- such last string enclosed in < > appears before line in appears #@ added. #@ <http://dbpedia.org/data/plasmodium_hegneri.xml> <http://dbpedia.org/da...

mysql - Eloquent select statement based on a condition in another table -

i have laravel eloquent select statement looks this: $test = test::with(['a.b.companies']) .. , on now, want return results query based on company names in companies table. i tried write clause various trial , errors doesn't work. new laravel , mysql. in right direction good. thanks. you may use where , more reference : - eloquent orm $test = test::where('company_name1', '=', $company_name1)->orwhere('company_name2', '=', $company_name2)->get();

google maps - Merging two outputs into a single output in javascript -

i have demo1 here , have demo2 here . want include demo 2 output between html form , google map. new js. when tried pasting specific function of demo 2 demo 1, didn't work. how do that? var map; var directionsservice = new google.maps.directionsservice(); var directionsdisplay = new google.maps.directionsrenderer(); function initialize() { //initialize global variables var zipcodestolookup1 = new array(document.getelementbyid("portzip").value, document.getelementbyid("importerzip").value, document.getelementbyid("exporterzip").value, document.getelementbyid("portzip").value); var output = '<tr><th scope="col">from</th><th scope="col">to</th><th scope="col">miles</th></tr>'; var output = '<tr><th scope="col">from</th><th scope="col">to</th><th scope="col"...

how to insert partial view from another controller in asp.net mvc 5 -

i want insert partial view newscontroller homecontroller. in newscontroller public actionresult lastnewspatial() { var lstlastnews = db.articles.take(5).orderbydescending(m => m.createddate).tolist(); return partialview(lstlastnews); } in views/news folder create lastnewspatial.cshtml @model ienumerable<mytest.com.models.article> @foreach (var item in model) { <div class="glidecontent"> <img src="@item.imageurl" style="float: left; margin-right:21px;" /> <a href="#" class="title"><strong>@item.title</strong></a><br /><br /> @item.content </div> } in views/home/index.cshtml insert lastnewspatial view @html.partial("~/views/news/lastnewspatial.cshtml") when run project received error object reference not set instance of object. at row @foreach (var item in model) in l...

docker - Deploy to IBM Containers without cf/ice CLI -

i have workflow goes this: bitbucket -> wercker. wercker correctly builds app, when comes deploying lost. attempting deploy ibm containers registry on bluemix (recently out of beta). running docker login registry.ng.bluemix.net ibm account credentials returns 401: bad credentials on local machine (boot2docker on osx). same on wercker in deploy step. here deploy step: deploy: box: id: node tag: 0.12.6-slim steps: - internal/docker-push: username: $username password: $password tag: main entrypoint: node bundle/main.js repository: <my namespace/<my container name> (removed post) registry: registry.ng.bluemix.net as can see: have username , password passed in environment variables per wercker docs (and have tested passed in correctly). basically: how push containers ibm registry without using ice/cf cli? have feeling i'm missing obvious. can't find it. you ne...

java - Trying to add Array of Strings via Another Class using HashMap -

basically know how arraylist array i'm totally stumped. import java.util.hashmap; import java.util.set; import java.util.iterator; import java.util.map; import java.util.collection; public class nobelprizewinners { private hashmap<string, prizewinners[]> winners; public nobelprizewinners() { winners = new hashmap<string, prizewinners[]>(); prizewinners[] name = new prizewinners[3]; name[0] = new prizewinners("hey" , "hey"); winners.put("2008", name); } } public void displayallyearsandwinners(){ set<string> years = winners.keyset(); for(string year : years){ prizewinners [] list = winners.get(year); for(prizewinners[] names : list){ system.out.println(year + " " + names); } } } this returns memory address not actual strings (the prizewinners class has 2 string parameters in ...

php - How do i setup htaccess to allow changes to occur? -

below rewrite rule: rewriteengine on rewriterule ^search/$ search/searchpage.php [l,nc] the .htacess file located @ root of website problem not take me searchpage.php when type domain.com/search/, takes me 403 error page (note there no index.php page here). this uploaded in amazon elastic beanstalk you thinking of backwards, need call full url , rewrite real one. like this, rewriterule ^search/category/(.+)/ domain.com/search/searchpage.php?crs_category=$1 [l] and use url http://domain.com/search/category/business/ , rewrite ( not redirect ) mapped. url in browser stay same. i not sure 100% of .htaccess off top of head method use. make sense? the (.+) bit capture group , capture category , $1 output first capture group. further reading how use regular expressions. as mentioned router in comments, issue method have map each 1 hand, ok 1 or 2 can real ugly real fast.

swift - How can I mark a location on a map by clicking a button -

i want make when button clicked, current location of device saved. then, pin displayed on map @ current location. how do this? using swift. import uikit import corelocation import mapkit class viewcontroller: uiviewcontroller, cllocationmanagerdelegate { var locationmanager = cllocationmanager() var myposition = cllocationcoordinate2d() @iboutlet var map: mkmapview! override func viewdidload() { super.viewdidload() // additional setup after loading view, typically nib. locationmanager.delegate = self locationmanager.requestwheninuseauthorization() locationmanager.startupdatinglocation() } override func didreceivememorywarning() { super.didreceivememorywarning() // dispose of resources can recreated. } func locationmanager(manager: cllocationmanager!, didupdatetolocation newlocation: cllocation!, fromlocation oldlocation: cllocation!) { println("updating location \(newloc...

dojo - Dijit: cannot edit all textboxes in the first dialog after showing the second dialog -

i set dijitdialogunderlaywrapper none display show 2 dialog boxes (both of them contains textboxes) 1 one on screen. the problem when click on first dialog, textboxes on cannot edited until closed second dialog. however, textboxes on second dialog can edited whenever click on it. what want when activate (focus on) 1 of dialog boxes, textboxes on dialog can edited. tried use"focusutil.focus" on first dialog failure. have idea? thanks. here source: jsfiddle.net/calgis/al5auzja/ the dialog on top 1 able focus . design. can see dojo code reference : https://github.com/dojo/dijit/blob/master/dialog.js#l674-l691 there no nice way avoid dialog . however, there little hack (note: may cause other problems). have override focus method of dialog empty one. in snippets, key part data-dojo-props="focus:function(){}" require(["dojo/parser", "dijit/dialog", "dijit/form/button", "dijit/form/textbox", "diji...