Posts

c# - Selenium.NoSuchElementException with dynamic tables -

please me problem! at moment, scraping website using selenium firefox driver in c#. data on website dynamically filled tables cover data concerning future dates. while structure of table same both future , past dates, tables being updated during selenium call throw "nosuchelementexception" concerning iwebelements there. these relevant copied xpaths tables. 1 past date, on works fine, , 1 on future date, on exception thrown. can see, identical. xpath 18052015 /html/body/div[1]/div/div[2]/div[5]/div[1]/div/div[1]/div[2]/div[1]/div[7]/div[1]/table/tbody/ tr[1] / td[1] /div/a[2] xpath 05022016 /html/body/div[1]/div/div[2]/div[5]/div[1]/div/div[1]/div[2]/div[1]/div[7]/div[1]/table/tbody/ tr[1] / td[1] /div/a[2] using findelements(by.xpath(...)) function, use 2 foreach loops go through highlighted tr's , td's in xpath text in a[2] header. in both cases, dom in firefox firebug seems identical in both cases. difference have observed between 2 tables fact e...

c - Set Path Variable Permanently Using ShellExecuteEx -

i come code. execute correctly , return true. doesn't change path variable's value. when type --> setx path "c:\program files\java\jdk1.7.0_02\bin\" in cmd, works , change path value here code // prepare shellexecutinfo shellexecuteinfo shrun = {0}; shrun.cbsize = sizeof(shellexecuteinfo); shrun.fmask = see_mask_nocloseprocess; shrun.hwnd = null; shrun.lpverb =null; shrun.lpfile = "c:\\windows\\system32\\setx.exe"; shrun.lpparameters = "path \"\"\"c:\\program files\\java\\jdk1.7.0_02\\bin\\\"\"\""; shrun.lpdirectory =null; shrun.nshow = sw_shownormal; shrun.hinstapp = null; // execute file parameters if(shellexecuteex(&shrun)) printf("done"); else printf("no"); what problem here?? your quoting on arguments wrong. have many quotes. need write shrun.lpparameters = "path \"c:\\program files\\java\\jdk1.7.0_02\\bin\\\""; to see version fail did...

C# - find the position of a string inside a predefined string array -

i have predefined string array letters a q : string[] skippedareasarray = new string[] {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q"}; in textbox inside windows form user can enter skippedareas this: a,b,c,d... there validations , restrictions use letters , commas input guaranteed in format. what taking user input , populate string array: string[] skippedareasfromform = new string[17]; ... skippedareasfromform = (txtskippedareas.text).split(','); now comes tricky part i'm seeking assistance. user must enter number of areas example - 3. mean working a , b , , c . if number of areas 2 can use a , b if number of areas 4 a , b , c , d available , on. what need check if in array skippedareasfromform populated user input there area doesn...

pyyaml - python ordereddict or OrderedDict? -

i'm confused right now. i'm using pyyaml editing yaml files. data = yaml.load_all(open('testingyaml.yaml'),loader=yaml.roundtriploader) my testingyaml.yaml file contains following content: spring: profiles: dev datasource: url: jdbc:postgresql://127.0.0.1:5432/nfvgrid dns: enable: false cassandra: host: 192.168.7.151 when print data prints following: ordereddict([('spring', ordereddict([('profiles', 'dev'), ('datasource', ordereddict([('url', 'jdbc:postgresql://127.0.0.1:5432/nfvgrid')]))])), ('dns', ordereddict([('enable', false)])), ('cassandra', ordereddict([('host', '192.168.7.151')]))]) i further want perform operations on ordered dictionary python throws error nameerror: name 'ordereddict' not defined it's ordereddict somehow pyyaml returns ordereddict. how should solve issue? you not using pyyaml stated, not have roundtripl...

SSH into a system and browse the files in a particular folder using java -

i suppose ssh system , browse files in particular folder. using jsch library ssh system not sure how browse files. want user navigate through folders , select file similar jfilechooser. please can me this? regards, colin you have 3 options: this best option: if you're client able mount drive using ssh, mount drive , give them file chooser @ mount point. linux , mac make easy mount ssh servers drive. on windows, you're gonna have use third party tools. whichever case, can use command's tool mount drive. here how mount ssh drives or can use sftp. haven't had success if want user pick files 1 specific directory , no else; meaning no sub-dirs... etc you can make own gui , show content of dir. know content doing ls. if want file on system , possibly in nested directories you can go through of files on remote server using this , re-render gui on clients side using this

android - Activity's onTouchEvent() is not being called while clicking on Button -

i want b.logic in activity.ontouchevent() method. working fine textview , other non clickable views. however, not getting called uponclicking of button . need too. here code. public class mainactivity extends activity { private static final string tag = mainactivity.class.getsimplename(); @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); findviewbyid(r.id.button1).setonclicklistener(new onclicklistener() { @override public void onclick(view v) { toast.maketext(mainactivity.this, "oh shit!! click performed... :(", toast.length_long).show(); } }); } @override public boolean ontouchevent(motionevent event) { log.d(tag, "ssssssssssssssssssssssss:touch"); return super.ontouchevent(event); } public boolean dispatchtouchevent(motionevent ...

c++ - Compiler error C2653: not a class or namespace name -

so have been having extremely frustrating problem lately visual c++ 2012. until few hours ago, writing code fine , working intended, until decided optimize things , deleted few classes. fixed of errors popping because of that, e.g. false includes, etc. unfortunately, after vs compiler went crazy. started giving me errors such as: error 14 error c2653: 'class' : not class or namespace name or even error 5 error c2143: syntax error : missing ';' before '}' error 4 error c2059: syntax error : '>' i've checked multiple times, , in it's right place: headers included, symbols placed should be. as far understand, problem not code compiler itself... visual studio can annoying @ times, guess. anyway, grateful if me out on one. (by way, disabling precompiled headers did not work) relevant parts of code: error 14: #include "playerentity.h" playerentity::playerentity(void) {} // line causes error error 5: class gamescr...