Posts

Convert xPath to JSoup query -

Image
does know of xpath jsoup convertor? following xpath chrome: //*[@id="docs"]/div[1]/h4/a and change jsoup query. path contains href i'm trying reference. this easy convert manually. something (not tested) document.select("#docs > div:eq(1) > h4 > a").attr("href"); documentation: http://jsoup.org/cookbook/extracting-data/selector-syntax related question comment trying href first result here: cbssports.com/info/search#q=fantasy%20tom%20brady code elements select = jsoup.connect("http://solr.cbssports.com/solr/select/?q=fantasy%20tom%20brady") .get() .select("response > result > doc > str[name=url]"); (element element : select) { system.out.println(element.html()); } result http://fantasynews.cbssports.com/fantasyfootball/players/playerpage/187741/tom-brady http://www.cbssports.com/nfl/players/playerpage/187741/tom-brady http://fantasynews.cbssports.c...

ReSharper color identifiers screw up with Visual Studio 2012 dark theme -

Image
we're experiencing annoying problem issues resharper's color identifiers feature when visual studio 2012 set built-in dark theme. with resharper's color identifiers disabled, code looks fine: then, enable resharper's color identifiers: and code completly unreadable: the curious thing, on colleague's machine, same code, same visual studio , resharper settings... looks right: we tried reinitializing both visual studio , resharper settings, disabling add-ons , extensions , other voodoos no avail. here our setups: my add-ins - his add-ins my extensions - his extensions my system informations - his system informations i had same problem vs2013 , resharper 8. able fix following these steps: close visual studio instances open c:\program files (x86)\microsoft visual studio {vs version}\common7\ide\extensions\extensions.configurationchanged file type there save file open vs , check fonts , colors in tools | option...

How to write a program to upgrade USB device firmware in windows -

i have usb device uses inbox class driver. how can write program update fw? can avoid writing driver using winusb library? doesn't make sense me using inbox driver , need write driver common operation of fw upgrade. thanks, shai i have usb device uses inbox class driver. this class uses hid base. use hid update firmnware too, eliminating need provide custom drivers. winusb needs @ least inf file.

javascript - function call with Json-Object, wich contains a function. how to get return variable outside the function? -

i use jfeed plugin read information rss-feed in javascript. can use plugin this: jquery.getfeed({ url: 'rss.xml', success: function(feed) { alert(feed.title); } }); no want make function, returns feed information this: function getfeed(feedurl) { message ="error"; jquery.getfeed({ url: 'http://www.spiegel.de/schlagzeilen/tops/index.rss', success: function(feed) { message = feed; } }); return message; } it not work. how can feed varibale outside scope of jquery.getfeed(...) ? it wont work way, since method jquery.getfeed asynchronous , return called earlier. you need use callback feeds, this: function getfeed(feedurl, callback){ message ="error"; jquery.getfeed({ url: 'http://www.spiegel.de/schlagzeilen/tops/index.rss', success: function(feed) { callback(feed); } }); } getfeed(feedurl, function(feeds_r...

java - Intellij IDEA 12. Return to last active tab -

how can configure intelli-j idea show last visited tab after closing current tab (as in eclipse )? example: opened user.java tab, opened tab , closed it. after closing tab ide shows me random tab, want navigate user.java tab. this not yet possible, planned intellij 13: http://youtrack.jetbrains.com/issue/idea-106160 you can vote issue make more "important" in backlog.

javascript - Authorization Token for BOX API V2 obtained using scheduled script from Netsuite -

i using box v1 api in conjunction scheduled scripts (javascript) running in netsuite with new v2 api , authorization procedure, can obtain authorization tokens without user interface being required? does have idiots guide (ie me) steps required obtain valid token. andy, v2 api user must log in box , confirm application can access his/her data. box has put authentication primer walk through process. once authorized, you'll receive access token , refresh token user. scheduled scripts can use refresh token indefinitely update access token.

c# - relationship one to one EntityFramework error -

i create 2 table in sql server 2008 table 1 : user( userid,name, firstname,login, password...) , pk : userid table 2 : sessionuser(userid, date, adress) , pk : userid the relationship between 2 tables set in sql server 2008, 1 1 relationship , foreign key in table sessionuser (fk: userid) there users in user table (full lines) when tried add session in session table shows me error: entities in ' distributionssentities.sessionuser ' participate in ' fk_sessionuser_user ' relationship. 0 related 'user ' found. 1 'user ' expected. code: distributionssentities db = new distributionssentities(); sessionuser sessionuser = new sessionuser(); sessionuser.userid = 12; // id existe in user table sessionuser.date = "12-12-2012"; sessionuser.adressip = "192.168.1.1"; db.addtosessionuser(sessionuser); db.savechanges(); how resolve problem thanx. just setti...