Posts

Showing posts from January, 2015

Can't get video working for new android SDK of quickBlox -

Can't get video working for new android SDK of quickBlox - i've been trying videochat work android 2.0 sdk of quickblox past 2 days. can accept, make, reject videocalls video not send or receive on surfaceview. i can see own photographic camera video , switch photographic camera fine. i've gone on demo multiple times , pretty much copied line line. can give me tips on how working? super thankful. here qbchatlistener declaration onqbvideochatlistener qbvideochatlistener = new onqbvideochatlistener() { @override public void oncameradatareceive(byte[] videodata) { qbvideochatcontroller.getinstance().sendvideo(videodata); log.d("send", "video"); } @override public void onmicrophonedatareceive(byte[] audiodata) { if (!muteon) { qbvideochatcontroller.getinstance().sendaudio(audiodata); log.d("send", "audio"); } } @override publi

validation - validate iput in jquery in specific code structure -

validation - validate iput in jquery in specific code structure - hello i'm @ coding form , have validate jquery , php need in phone input digit usable , min of 6 numbers must appear . in jquery code construction : if ($('input[name="phone"]' ).val().length ===0){ erros = 1; } else { $('input[name="phone"]').removeclass('warning'); } here phone input code : <label class="label">phone number</label> <label class="input"> <i class="icon-append fa fa-phone"></i> <input type="text" name="phone" id="phone" > </label> how base of operations jquery validation on needs ? in advance i updated script , made somehow validate digit input cant go foward until 10 numbers typet on phone

html - Website loading issues iOS on iPad2, iPhone 4S -

html - Website loading issues iOS on iPad2, iPhone 4S - i developing site having issues loading on older ios hardware. pretty sure issues related total size of images beingness loaded site (large graphic designer portfolio visuals), have been unable find documentation on these limitations of hardware. site coded in html/css/js jquery libraries home slideshow. site built using yeoman , scaffolded twitter bootstrap 3. url: http://bradshawdesignsolutions.com ios8 tested: ipad air (2013) => ok, retina mini (2013) => ok, iphone 4s => hangs/crashes ios7 tested: ipad 2 => hangs/crashes any help point me in right direction resolving issues appreciated. if solution cutting images in half... you seem loading massive images ipad2, has 1024x768 screen many of images much bigger. e.g. http://bradshawdesignsolutions.com/images/bg-slides/0f5416af.slide-4.jpg 2025x1207, , there appear several @ size. the inspector showing javascript error: [error] typeerror: null

java - Improve performance on sending bulk emails through spring-mail -

java - Improve performance on sending bulk emails through spring-mail - i have spring-stand lone application uses simple spring email code below , to , message constructed using values iterated map. i have had suggestions question here , in need of specific advise this. below code for (map.entry<string, list<values>> entry : testmap .entryset()) { string key = entry.getkey(); stringbuilder htmlbuilder = new stringbuilder(); list<model> valuelist = entry.getvalue(); (model value : valuelist) { htmlbuilder.append('list values in message'); } mail.sendmail( msgfrom,body); // phone call sendmail function in class } code sending mail service : mimemessage email = mailsender.createmimemessage(); mimemessagehelper helper = new mimemessagehelper(email, true); helper.setfrom(new internetaddress(from))

sql - `show create table` equivalent in sap hana -

sql - `show create table` equivalent in sap hana - in mysql can see table definition (columns info types etc) show create table table_name. is there similar functionality sap hana? actually there several ways that. sap hana studio table editor (open table definition) , click on export sql icon. call get_object_definition ('schema_name', '') use export table functionality - create .sql file definition. sql hana

java - Glassfish 4.1 / validation.xml not loaded -

java - Glassfish 4.1 / validation.xml not loaded - i've ported application jee6 jee7 (glassfish 3.1.2.2 4.1), i've upgraded meta-inf/validation.xml latest version (as stated here): http://antoniogoncalves.org/2013/06/04/java-ee-7-deployment-descriptors/): <validation-config xmlns="http://jboss.org/xml/ns/javax/validation/configuration" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://jboss.org/xml/ns/javax/validation/configuration validation-configuration-1.1.xsd" version="1.1"> <message-interpolator>com.infomaxgroup.adaecommerce.validation.databasemessageinterpolator</message-interpolator> </validation-config> the custom messageinterpolator never called, i've tried set name of non existent class: <message-interpolator>foo.foo.foo.bar</message-interpolator> and tried insert error (xxx after opening tag):

javascript - How to Use Polymer Elements -

javascript - How to Use Polymer Elements - i working through demo in polymer. 1 here: https://www.polymer-project.org/components/core-ajax/demo.html the code works looks this: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>ajax this.</title> <script src="../bower_components/platform/platform.js"></script> <link rel="import" href="../bower_components/polymer/polymer.html"> <link rel="import" href="../bower_components/core-ajax/core-ajax.html"> </head> <body> <core-ajax auto url="http://gdata.youtube.com/feeds/api/videos/" params='{"alt":"json", "q":"chrome"}' handleas="json"></core-ajax> <template repeat="{{response.feed.entry}}"> <div>{{title.$t}}</div>

FadeIn with delay jquery -

FadeIn with delay jquery - i tryed add together delay fadein because want div display in diffrenet time function didnt know how that my code: $(function() { $('div.grid_4').fadein(1000); }); thnx alot. i don't know if understood you, maybe can help: jsfiddle i used function each() to count divs , alter delay automatically. jquery delay fadein

mysql - Delete Composite unique key [ applied on 3 fields combinely ] -

mysql - Delete Composite unique key [ applied on 3 fields combinely ] - in mysql, i've create unique composite key, based on 3 columns. how can delete unique key constraint without deleting entire table? i found reply , worked show index table_name then find out constraint "key_name" want drop. this "key_name" " arbitrary_index_name " composite keys. then utilize drop query drop index arbitrary_index_name on table_name mysql composite-key

css3 animation is not working in Safari -

css3 animation is not working in Safari - css3 animation not working me in safari (works ok in other browsers), tried splitting out shorthand each property declared separately eg: -webkit-animation-name: glow; -webkit-animation-duration: 2s; ...... but still doesn't work. ideas? .light:after { content:''; display:block; z-index:1; border-radius: 50%; width: 15px; height: 15px; position:absolute; cursor:pointer; background:rgba(64, 61, 51, 1); -webkit-transition: 500ms ease-in-out 0s; -moz-transition: 500ms ease-in-out 0s; -o-transition: 500ms ease-in-out 0s; transition:all 500ms ease-in-out 0s; } .light.turned-on:after { content:''; display:block; z-index:1; background:rgba(255, 242, 204, 1); -webkit-transition: 500ms ease-in-out 0s; -moz-transition: 500ms ease-in-out 0s; -o-transition: 500ms ease-in-out 0s; transition:all 500ms ease-in-out 0s; } .game-area.won .lig

scipy - numpy.sum() gives `TypeError: sum() got an unexpected keyword argument 'dtype'` -

scipy - numpy.sum() gives `TypeError: sum() got an unexpected keyword argument 'dtype'` - the next code generated unexpected typeerror : import scipy.sparse import numpy coomatrix = scipy.sparse.coo_matrix((100,100)) numpy.sum(coomatrix) the result: typeerror: sum() got unexpected keyword argument 'dtype' scipy version 0.14.0, numpy version 1.9.0 the problem numpy.sum doesn't know how handle sparse matrices. next works expected: coomatrix.sum() numpy scipy sparse-matrix

How to pass args to embedded python sub-interpreter? -

How to pass args to embedded python sub-interpreter? - i need interpret few files (scripts) embedded python interpreter concurrently (to more detailed 1 script executes script popen , app intercepts , executes itself). i've found it's called sub-interpreter , i'm going utilize it. i've read sub-interpreter not have sys.argv : the new environment has no sys.argv variable i need pass argv anyway how can it? you might find easier modify each of scripts follow pattern: def run(*posargs, **argdict): """ work , can called with: import scriptname scriptname.run(someargs) """ # code goes here , uses posargs[n] utilize sys.argv[n+1] if __name__ == "__main__": import sys run(sys.argv[1:]) then main script can phone call each of subscripts in turn calling run method. python interpreter argv

java - Is it dangerous to increase too much Heap & PermGen Sizes inside application runing under tomcat? -

java - Is it dangerous to increase too much Heap & PermGen Sizes inside application runing under tomcat? - i have medium web app application running on tomcat 7. i increased heap size -xms2048m -xmx2048m (via setenv.sh of tomcat 7) resolve heapsize error. wondering if high values. does traduces wrong in code ? or go farther ? there limitations ? consequences of big increment ? if it's not solution, how track error within eclipse. error occurs when launch web app , navigate throught it. don't see how utilize debug mode in case. java eclipse tomcat heap-memory

Good obfuscator for VB.NET? -

Good obfuscator for VB.NET? - i've tried eazfuscator , dotfuscator bad! able read source , pay it, , frankly i'm tired of people re-create software. inquire obfuscator use, @ to the lowest degree protect software beginners. from great joel coehoorn ... can read more here how can protect .net assemblies decompilation? one thing maintain in mind want in way makes business sense. that, need define goals. so, goals? preventing piracy? goal not achievable. native code can decompiled or cracked; multitude of warez available online (even products windows , photoshop) proof of that. if can't prevent piracy, how simply reducing it? this, too, misguided. takes 1 person cracking code available everyone. have lucky every time. pirates have lucky once. on note, recommend smartassembly redgate. ive used before , great compared others. please note obfuscator, cannot stop cracking software if determined so. you can more info here... http://www.red-gate.com/

How to show timepicker on Primefaces Calendar component? -

How to show timepicker on Primefaces Calendar component? - i'm using primefaces calendar component select date , time, date part available. code looks same code http://www.primefaces.org/showcase/ui/input/calendar.xhtml (example "datetime"), can't figure out, what's wrong in case. suggestion? my code: <p:calendar value="#{item.datefrom}" pattern="dd.mm.yyyy hh:mm" /> hours represented capital h. so code has be: <p:calendar value="#{item.datefrom}" pattern="dd.mm.yyyy hh:mm" /> ... capital h. primefaces calendar

excel - How to keep nth word of a cell -

excel - How to keep nth word of a cell - i want maintain sec word of cells in column. possible? want without using reference. column1 hi hello me 0 10 stack overflow notice 1 column. want tun column into: column1 hello me 10 overflow is possible? know how using additional column reference not sure how job in 1 column. i'd appreciate help. without using column, vba. select cells wish process , run little macro: sub secondword() each r in selection v = r.value if instr(v, " ") > 0 r.value = split(r.value, " ")(1) end if next r end sub macros easy install , use: alt-f11 brings vbe window alt-i alt-m opens fresh module paste stuff in , close vbe window if save workbook, macro saved it. if using version of excel later 2003, must save file .xlsm rather .xlsx to remove macro: bring vbe window above clear code out close vbe window to utilize macro excel: alt-f8 select macro

which is faster when application is running in java? -

which is faster when application is running in java? - which faster when application running in java? this: static void readprice(string dir) throws exception{ /*make url , connection*/ url url = new url(dir + "/prices/all/"); httpurlconnection connection; /*start connection*/ connection = (httpurlconnection) url.openconnection(); /*send user-agent*/ connection.setrequestproperty("user-agent", user_agent); /*get http response*/ inputstream = connection.getinputstream(); bufferedreader rd = new bufferedreader(new inputstreamreader(is)); string line = rd.readline(); strjson = line; /*read prices json*/ pricesjson( strjson ); } or this: static void readprice(string dir) throws exception{ /*connection url */ connection = (httpurlconnection) new url( dir + "/prices/all/").openconnection(); /*send user-agent*/ connection.setrequestproperty("user-agent&quo

mysql - PHP Fatal error: class mysqli not found -

mysql - PHP Fatal error: class mysqli not found - when seek connect using mysqli next error below fatal error: class panda\mysqli not found , line says "new mysqli" when connects protected $db = null; public function __construct() { $this->connect(); } public function connect() { global $config; //it errors below here on "new mysqli" $this->db = new mysqli($config['mysqli.host'], $config['mysqli.user'], $config['mysqli.pass'], $config['mysqli.name']); if ($this->db->connect_errno) { echo 'failed connect mysqli: ('; echo $db->connect_errno; echo ') '; echo $db->connect_error; exit(); } $db->set_charset("utf8"); } you working namespaces , php - default - trying resolve mysqli relative panda namespace. general rule prepend core-php classes \ reside in "global space". php mysq

Laravel 4.1 Model::boot not always firing -

Laravel 4.1 Model::boot not always firing - i decided follow various "best practice" recommendations i've seen , set event::listen code in model::boot static method relevant model. works half dozen of them, fails execute others. all extend same base of operations class (which in turn extends \illuminate\database\eloquent\model ) all utilize public static function boot() method all utilize same \event::listen('event',function(){}); format it's not problem multiple listeners, can set 2 in same working model , both trigger, none every triggered in non-working ones. there's not code paste in, i'm using by-the-book (to best of knowledge) code, class myclass extends \illuminate\database\eloquent\model { public static function boot() { \event::listen('my.event', function($arg1, $arg2){ \log::debug("this may or may not trigger."); }); } } no exceptions thrown, no errors logged, doesn't run

ios - Hiding Video Controls MPMoviePlayerController - SWIFT -

ios - Hiding Video Controls MPMoviePlayerController - SWIFT - i have referenced several responses same question solution not work me. wish hide user controls whilst watching video of local content. faults on line movieplayer?.controlstyle = mpmoviecontrolstylenone error "use of unresolved identifier mpmoviecontrolstylenone. here total block of code. import uikit import mediaplayer var movieplayer : mpmovieplayercontroller? class viewcontroller: uiviewcontroller { func playvideo() { allow path = nsbundle.mainbundle().pathforresource("introvideo", oftype: "mp4") allow url = nsurl.fileurlwithpath(path!) movieplayer = mpmovieplayercontroller(contenturl: url) if allow player = movieplayer { player.view.frame = self.view.bounds movieplayer?.controlstyle = mpmoviecontrolstylenone player.preparetoplay() player.scalingmode = .aspectfill self.view.addsubview(p

path - executing in current directory vs specifying executable linux -

path - executing in current directory vs specifying executable linux - i sure hope gets great laugh @ me...a lowly windows boy. don't know how post question (let lone google solution). here confusion: i using virtualbox trusty64 os installed. type: $ cd /home/vagrant/.rbenv/versions/2.1.3/bin $ ls bundle bundler erb erubis ... $ bundler -v : no such file or directory $ /home/vagrant/.rbenv/versions/2.1.3/bin/bundler -v bundler version 1.7.3 $ honestly, i'm new linux evident. aren't these 2 equivalent? if i'm in directory , execute "bundler -v" should not same result when explicitly type current path , executable like: "/home/vagrant/.rbenv/versions/2.1.3/bin/bundler -v"? to run binary scheme knows because in $path variable can utilize name of programme , parameters, example: bundle -v if programme not in $path , want execute in current working directory, run: cd /path/to/file/directory ./programname

php - How can I best generate/load a thumbnail -

php - How can I best generate/load a thumbnail - i'm building iphone application displays photos. first in uicollectionview thumbnail bigger in fullscreen. for improve loading behavior load smaller images first thumbnail part. now: should via php , resize existing big image or should save sec image on server xxx_thumbnail.png , load one? thanks tip. chris resizing image can quite intensive process server, larger images. imagine if 1000 users nail @ same time. absolutely should 1 time per image, , save later requests. whether pre-render thumbnails or not matter, executing file_exists pretty cheap. can render them once, @ time requested. depends how want access them (e.g. through script or thumbnail url directly) php ios xcode

Android application crashing after configuring ProGuard -

Android application crashing after configuring ProGuard - i trying configure application proguard, succesfull when decompile apk show's classes name a,b,c etc. means proguard working fine problem when install apk in device, app crash's anr exception. proguard-project.txt includes : -dontskipnonpubliclibraryclassmembers -dontwarn android.support.v4.** -dontwarn com.google.** -dontwarn org.** -dontwarn android.** -dontwarn com.altametrics.foundation.** -dontwarn com.google.** -dontwarn javax.servlet.** i saying dont warn jar's files, of above bundle name's of jar files. , in project.properties using : proguard.config=proguard-project.txt so guys please help me, what's reason behind app crashing , when remove proguard works fine.. note : using export project , after giving password , making apk, should or should compile project apk in gen.. thanks android proguard

How to change Google Map V2 language for Android App -

How to change Google Map V2 language for Android App - how alter language of google map v2 hindi or other language while using within android app. there queries on unable proper answer. i have tried alter language of phone hindi google map app in device started showing text in hindi map in android app still showing text in english language completely. update: able alter language of google map v2 state of japan , korea using language code "ja" , "ko" below, locale.setdefault(new locale("ja")); but not still able alter hindi using ("hi" or "hi_in" or "hi-in" or "hi-rin"). there other language code hindi in android? it looks google maps android not available in hindi until summer (read here), if using outdated version of google maps should update first. once updated, may alter locale other language. android google-maps

envelope function (spatstat) - error "unused arguments" -

envelope function (spatstat) - error "unused arguments" - i inquire help finding reason why when utilize function envelope, arguments not accepted, defined "unused arguments". info i'm using ppp without marks , create l function graph simulated info , data. here code ppp data: map2008mlw = ppp(xy2008_bngppp$x, xy2008_bngppp$y, window = iom_polygon_mlwowin) and then: l2008 = lest(map2008mlw,correction="ripley") op = par(mar=c(5,5,4,4)) plot(l2008, . -r ~ r, ylab=expression(hat("l")), xlab = "d (m)"); par(op) l2008$iso = l$iso - l$r l2008$theo = l$theo - l$r desired number of simulations n = 9999 desired p significance level display p = 0.05 and @ point envelope function doesnt seem happy: el2008 = envelope(map2008mlw[w], lest, nsim=n, rank=(p * (n + 1))) error in envelope(map2008mlw[w], lest, nsim = n, rank = (p * (n + 1))) : unused arguments (nsim = n, rank = (p * (n + 1))) i

php - How do WordPress restore trashed posts to previous status? -

php - How do WordPress restore trashed posts to previous status? - i'm creating simple administration scheme 1 of sites, , creating blog inspired wordpress' posts system. in blog can save either draft or published version. , want create way, when delete blog, alter "trashed" in database. , when restore it, restored same type again, wordpress. but how wordpress restore it's trashed posts, original post_status? have looked @ wordpress database, couldn't figure out, how it, cause original post_status replaced "trash" when trashed , not stored other place in table. so how "remember" it's original post_status? hope understand i'm asking :d sorry not beingness code-related question, couldn't find reply other places. thanks this basic stuff frank. should @ wp_posts table , see difference between trashed , published post ( , possibly, others too). wordpress changing post_status column particular row of data.

actionscript 3 - AS3 Dispatch event not working -

actionscript 3 - AS3 Dispatch event not working - i'm confused here. code work flawlessly , went , tried , won't work. can't seem figure out when , i'm starting frustrated result. don't seem errors handed me. i got 2 files gameindex , 1 external swf level imported on top of gameindex. want move somewhere else on timeline when event called of calling event isn't working. my code in level such: private function enterframehandler(event:event):void { updateposition(); updaterotation(); scorebox.text=string(score); var t:number = math.random(); if(t>0.98) { addasteroid(); } (var a:int = 0;a<allast.length;a++) { if (contains(allast[a])) { (var b:int = 0;b<allbullets.length;b++) { if (allbullets[b].hittestobject(allast[a])) { //removechild(allbullet[b]); if (contains(allast[a])) {

maya - How do I set an attribute within the extrusion node of a selected object in MEL -

maya - How do I set an attribute within the extrusion node of a selected object in MEL - i want set subcurveextrmax attribute random number between x , y having problem selecting attribute: string $sel[] = `ls -sl`; string $obj; ($obj in $sel) { float $ran = rand(0.972, 0.984); setattr ($obj+".polyextrudeface.subcurveextrmax") $ran; } you can supply random extrusion depth when phone call extrude first time: polyextrudefacet -lt $ranx $rany $ranz; // specify 3 offsets polyextrudefacet -ltz $ranz; // specify extrusion depth maya mel

algorithm - how to partiton the text file? -

algorithm - how to partiton the text file? - i have file having strings of 5 characters each.they seperated in basis of 1st character. input file- aa01j aa01k aa01l ba01j ba01k . . . . za01k za01l i want 26 files each having these strings on basis of first character. this not info mining. not close. to split file first character trivial programming task computer science 101. algorithm split

mvvm - Input validation on Windows store app -

mvvm - Input validation on Windows store app - in windows store app using mvvm have textbox 2 way binding should allow numeric values. proper procedure using mvvm ignore when non numeric key pressed? the value beingness changed of inotifypropertychanged triggers when textbox loses focus. want instant validation properties. can't find proper simple illustration of this. why not create attached property contain behavior? this: class="lang-cs prettyprint-override"> public class textboxhelper { public static bool getrestricttonumerical(dependencyobject obj) { homecoming (bool)obj.getvalue(restricttonumericalproperty); } public static void setrestricttonumerical(dependencyobject obj, bool value) { obj.setvalue(restricttonumericalproperty, value); } public static readonly dependencyproperty restricttonumericalproperty = dependencyproperty.registerattached("restricttonumerical", typeof(bool

how to find if last row has value for a specific column in Excel using Python Win32com -

how to find if last row has value for a specific column in Excel using Python Win32com - i have excel file , utilize python win32com operate on it. how check if lastly row has value in specific column ? when seek , nrows 28, not 23 (the lastly row have value not empty) used = sht1.usedrange nrows = used.row + used.rows.count - 1 usedrange not reliable when want lastly row of specific column. should utilize endxlup or endxldown function. check below line: lastrow = sheets("sheet1").range("a" & sheets("sheet1").rows.count).end(xlup).row where, column lastly row. also, check url: error finding lastly used cell in vba as using python win32 com, endxlup not work. there's 1 basic thing can do. check below code: ws = wb.worksheets('sheet1') rw = 2 while ws.cells(rw, 1) <> "" rw +=1 where, rw starting row want start row count. 1 in (rw, 1) represents column. column represents a.

java - Dead code warning in Eclipse - is this a bug in Eclipse? Or me overlooking something obvious? -

java - Dead code warning in Eclipse - is this a bug in Eclipse? Or me overlooking something obvious? - with (simplified) code illustration eclipse (kepler sr2) gives warning innermost if-statement (if (con != null)) , dead code. public class dbmanager { public string getsinglestring(string query) throws sqlexception { dbmanager dbmgr = new dbmanager(); connection con = null; seek { con = dbmgr.getconnection("user", "pwd", url); } grab (classnotfoundexception e) { e.printstacktrace(); } grab (sqlexception e) { e.printstacktrace(); if (con != null) { preparedstatement pstmt = null; resultset rset = null; pstmt = con.preparestatement(query.tostring()); rset = pstmt.executequery(); if (rset != null && rset.next()) { homecoming (rset.getstring(1)); }

php - wp_remote_get fails with "Failure when receiving data from the peer" -

php - wp_remote_get fails with "Failure when receiving data from the peer" - i'm trying file contents of file this: $google_fonts = (array)wp_remote_get( theme_admin_uri.'/google_fonts.txt' ); on var_dump($google_fonts); prints this: array(2) { ["wp_errorerrors"]=> array(1) { ["http_request_failed"]=> array(1) { [0]=> string(41) "failure when receiving info peer" } } ["wp_errorerror_data"]=> array(0) { } } this first time see this. i'm on back upwards task on foreign server , wp installation, have limited access, php , server settings. path good, , on server , localhost, works fine. file can accessed straight in browser. if seek utilize file_get_contents() based on local directory not domain, works. any ideas what's causing this? i've seen wp_remote_get() fail when domain beingness requested uses cloudflare -- how cloudfl

ios - How to solve exception with Xcode 6.1 with fatal error: expectedly found nil while unwrapping an Optional value -

ios - How to solve exception with Xcode 6.1 with fatal error: expectedly found nil while unwrapping an Optional value - i have problem swift in xcode since 2 days , don't know answer. searched problem i've found no solution works me. 2 days ago did alter because of problem, see link. now have problem exception message unexpectedly found nil while unwrapping optional value when want handle element of view controller. in little illustration have 2 view controllers (viewcontroller, viewcontroller2). on viewcontroller added button , on viewcontroller2 added label. both elements referenced correctly. on clicking button on viewcontroller want print text of label of viewcontroller2. fatal error: unexpectedly found nil while unwrapping optional value . maybe have general problem xcode 6.1? how can solve problem? here code viewcontroller: class viewcontroller: uiviewcontroller { override func viewdidload() { super.viewdidload() // additional setup a

eclipse - I am unable to upload attachment using SeleniumWebDriver -

eclipse - I am unable to upload attachment using SeleniumWebDriver - this code driver.findelement(by.id("ctl00_contentplaceholder1_cbpassociationnew_panelassndetailadd_add_photo_browse0")).click(); thread.sleep(2000); stringselection ss= new stringselection("c:\\users\\ns10\\desktop\\download.jpg"); toolkit.getdefaulttoolkit().getsystemclipboard().setcontents(ss, ss); robot robo=new robot(); robo.delay(1000); robo.keypress(keyevent.vk_enter); robo.keyrelease(keyevent.vk_enter); robo.keypress(keyevent.vk_control); robo.keypress(keyevent.vk_v); robo.keyrelease(keyevent.vk_v); robo.keyrelease(keyevent.vk_control); robo.keypress(keyevent.vk_enter); robo.keyrelease(keyevent.vk_enter); when run above code in eclipse, clicks on file upload; windows pop comes doesn't select file mentioned. idle. could please help me this. if possible seek first, driver.findelement(by.id("ctl00_contentplaceholder1_cbpassociationnew_panelassndetailadd_add_ph

javascript - integrate an image with link -

javascript - integrate an image with link - well, think might easier explain question image below: as can seen in picture, if user select "by title", textbox appeared user can write film title (i used jquery auto-completion textbox). then, if user click on button "movies title", new window shown there list of movies containing term in textbox. my question: i integrate little image of each of these movies beside them (and maybe other info film year, genre..) amazon (please see here). used renderitem auto-complete part , works fine, have no thought how same in new window.. grateful if can help me. this code: <div id="m_scents" class="field"> <label style="margin-bottom:10px;" for="m_scnts"></label> <input class="autofill4" type="textbox" name= "q27[]" id="q" placeholder="enter film titles here" /> <input type="butto

asp.net - How can I send a date from my front end (Angular) to C# .net datetime (webAPI)? -

asp.net - How can I send a date from my front end (Angular) to C# .net datetime (webAPI)? - on front-end have html input box user can come in date. adds info angularjs modal , seek send server json object when user clicks save. on server have used think modifies way dates expected. know allows angularjs nicely read dates coming back-end. config.suppressdefaulthostauthentication(); config.filters.add(new hostauthenticationfilter(oauthdefaults.authenticationtype)); config.formatters.remove(config.formatters.xmlformatter); var json = config.formatters.jsonformatter; json.serializersettings.contractresolver = new camelcasepropertynamescontractresolver(); json.serializersettings.referenceloophandling = newtonsoft.json.referenceloophandling.ignore; json.serializersettings.converters.add(new isodatetimeconverter { datetimeformat = "yyyy-mm-ddthh:mmz" }); does have ideas how can take date entered input box in forma

javascript - Submit button is refreshing the page -

javascript - Submit button is refreshing the page - i have form within of mvc project , sending inputs post method controller. if utilize "button", keeps refreshing page if alter "submit". html: <form role="form" id="login"> <div class="form-group"> <input type="text" class="form-control border-purple" id="postcode" placeholder="postcode" value="3208sc"> </div> <div class="form-group"> <input type="text" class="form-control border-purple" id="huisnummer" placeholder="huisnummer" value="20"> </div> <div class="form-group"> <input type="email" class="form-control border-purple" id="email" placeholder="email" /> </div> <div class="form-group">

java - No mapping found for HTTP request with URI [/myapp/img/logout.png] -

java - No mapping found for HTTP request with URI [/myapp/img/logout.png] - i writing spring mvc application. i had asked question should create 2 different servlet entry rest , normal html in web.xml, , got resolved answers given knowledgeable people nowadays on stackoverflow (answer: should create 2 different servlet entry rest , normal html in web.xml) now web.xml include below code <servlet> <servlet-name>myapp</servlet-name> <servlet-class>org.springframework.web.servlet.dispatcherservlet</servlet-class> <init-param> <param-name>contextconfiglocation</param-name> <param-value>/web-inf/spring_myapp-servlet.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>myapp</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> but after making changes web.xml mentioned in a

ember.js - Unable to find partial in a component test -

ember.js - Unable to find partial in a component test - i have component test failing because can't find partial template rendering. specific error "assertion failed: unable find partial name 'components/activity-list-item-content'." my test file default generated ember-cli: import { moduleforcomponent, test } 'ember-qunit'; moduleforcomponent('activity-list-item', 'activitylistcomponent', { // specify other units required test needs: ['helper:format-date'] }); test('it renders', function() { expect(2); // creates component instance var component = this.subject(); equal(component._state, 'prerender'); // appends component page this.append(); equal(component._state, 'indom'); }); and component template looks this: {{#if activity.momentid}} {{#link-to 'moment' momentid class='close-dropdown'}} {{partial 'components/activity-list-item-content

linux kernel - When is storage allocated for a newly created ext2 inode? -

linux kernel - When is storage allocated for a newly created ext2 inode? - i'm reading in understanding linux kernel, 3rd edition on how create new regular file on ext2fs. (book available online @ multiple places: not sure legalities. later version of relevant chapter @ o'reilly's site - not have relevant data) see it, linux kernel has create new inode, , allocate necessary blocks it. book outlines next procedures: creating inodes (p. 758) allocating info block (p. 764) what don't understand when kernel allocate new inode's info blocks. near end (para. 14) of creating inodes procedure, see following: invokes ext2_preread_inode() read disk block containing inode , set block in page cache. type of read-ahead done because created inode written soon. so, prior - seems me logical place allocate inode's blocks. however, may ext2 architects decided allocation @ different time. does know when storage allocated newly created ext2 i

java - Pass a String parameter as a non-array? -

java - Pass a String parameter as a non-array? - i'm passing string parameter java function wrote. when pass string parameter method accepting parameter follows http://mywebsite.com/getcity.php?stateid={"state":"alabama"} i want method take string parameter follows http://mywebsite.com/getcity.php?stateid=alabama how rid of {"state":"alabama"}? hey guys, i'm building android app. syntax below java. i'm going show i'm having trouble. i'm having problem on first line of method show entire method silly. public jsonarray getdetails(string stateid) { // log.e showing {"state":"alabama"} // how show alabama? log.e("stateid= " + " = ", stateid); } you've got json object there (and should url encoded if it's going live on url that). treat json object , utilize jsonobject decode it. deal checked exception thrown se

c++ - FLTK Displaying Special Characters in FL_Table -

c++ - FLTK Displaying Special Characters in FL_Table - ive been using fltk c++ few weeks. great. for odd reason i'm having problem displaying characters "@" , "." for example: if seek display email address fl_box->label("test@test.com") "test" appears. know "@" formatting character. tried replacing @ "@@" create display properly. i tried turning off formatting using "@." , still doesn't work, when either of label displays load of garbage data. any ideas? thank you. c++ widget fltk

vb.net - StreamWriter.WriteLine not writing in new line -

vb.net - StreamWriter.WriteLine not writing in new line - i using next code write datatable text file. using sbdata new streamwriter(filename, false, encoding.utf32) sbdata.write(string.join("\t", datatable.columns.cast(of datacolumn)().select(function(arg) arg.columnname.trim()))) sbdata.writeline() each datarow datarow in datatable.rows sbdata.write(string.join("\t", datarow.itemarray.select(function(arg) arg.tostring().trim()))) sbdata.writeline() next sbdata.flush() sbdata.close() end using data getting written text file neither \t (tab) working nor writeline. instead of tab getting "\ t" in text file , in continuation. 1 having thought whats wrong here? "\t" works in curly brace languages, c#, have utilize vbtab in vb.net. using utf32 plain weird , reason writeline() doesn't seem work. whatever programme utilize @ file not expect , guess @ wrong encoding. reason saw space

shell - Why is second Echo being displayed first in a while loop? -

shell - Why is second Echo being displayed first in a while loop? - i testing little script see if can kill multiple jobs in autosys. shell script not working, somehow echo of variable displays before echo start. sec echo run in kid program? #!/bin/bash while ifs=read line; echo "start" echo "$line" done < "run.dat" i want output start line in run.dat start line in run.dat but getting line in run.dat start please suggest. removing ifs=read not right answer. adding space between ifs= , read is. that line says while ifs=read line (i.e. while line command returns true when ifs variable has value read in line command's environment). see http://mywiki.wooledge.org/bashfaq/001 more information/details. shell

jquery - Multiple popups inside repeater -

jquery - Multiple popups inside repeater - i creating mobile site have list of pictorials of motorcycle models. created list each image list-item , added div data-rel="popup" within list-item . compiles , functions correctly, image click in list shows first image. i.e., when 3rd list-item in list clicked , popup opened, image #1 displayed. true every link in list. do know why doing this? know can go around creating jquery page , redirect that, it's much cleaner having popup , i'm curious how right image display, or if i'm overlooking something? all images , info stored in sql server database here code: <div data-role="content"> <div id="selectedpictorialdiv" runat="server"> <ul data-role="listview" id="selectedpictoriallist"> <asp:repeater id="selectedpictorialrepeater" runat="server" datasourceid="selectedpictorialsqldatasou