Posts

netbeans - X3D Relative URL's -

so i'm developing x3d scene netbeans , x3d plugins (similar x3d-edit), after validating file built in quality assurance validator following error; <inline def='mymodel'/> url array address(es) missing online http/https references (url='"model.x3d"') [/x3d/scene/group/transform[1]/inline, info] it seems want online url refer inline node. question is, can somehow use relative url instead of online one? have tried using file:// protocol error when doing so; <inline def='mymodel'/> url array contains file:/ local address, not portable across web servers (url='"file://model.x3d"') [/x3d/scene/group/transform[2]/inline, warning] you cand find in vrml node reference: "the inline node grouping node reads children data location in world wide web" http://www.web3d.org/x3d/specifications/vrml/iso-iec-14772-vrml97/part1/nodesref.html#inline which means inline url cannot point local file yo...

c++ - Prevent mixing of console output and written text -

Image
i have c++ console application prints output while accepts commands (using std::cin ) user - output , input happen in separate threads. if write text while output appears written text mixed application output. how can prevent behaviour? to solve problem, need display program one line above line text typed. i'd inspire myself in minecraft bukkit server's solution - need same c++. assuming want output appear while things being typed, you'll need screen control facilities have output go somewhere different input area. if tasked implement writing terminal refresh ncurses experience. realize on windows console , have no idea if windows console capable of screen control needed make happen. you can possibly tie custom stream buffers std::cin , std::cout using curses functionality under hood may not worth it. in case, isn't entirely trivial.

A bug in my simple python program of lcs -

import numpy np def lcs(i, j): global x, y, c if <= 0 or j <= 0: return 0 else: if c[i][j] < 0: if x[i - 1] == y[j - 1]: c[i][j] = lcs(i - 1, j - 1) + 1 else: m = lcs(i - 1, j) n = lcs(i, j - 1) print m, n c[i][j] = max(m, n) else: return c[i][j] c = np.zeros((8, 8), int) c = c - 1 x = 'abcbdab' y = 'bdcaba' lcs(7, 6) print c the program has bugs lookup 'm','n', the print results come 'none' ex: 0 0 0 none 0 none 0 none none none then program occur error: typeerror: long() argument must string or number, not 'nonetype' i don't know 'none' comes i'm newer, thanks i don't know 'none' comes if don't return anything, return value of python function none . in particular, don't return in if c[i][j] < 0: branch. ...

php - Copy as Curl in Chrome with POST says error 302 moved temporarily -

i'm trying out in shell curl before developing full app. need obtain information public site input in 2 lines of info , returns one-line response in browser. when enter in data in chrome, under chrome developer tools under network shows post command status '302 moved temporarily.' when run 'copy curl' data curl directly in shell receive " this document requested has moved temporarily. it's @ href="http....... url sending me same except http instead of https. there way can use curl this? if not there tools should examining? need dozens of similar sites. can using human emulation commands i'd prefer more stealthy doesn't launch browser windows. chrome data http://oi42.tinypic.com/2rxjiax.jpg since hasn't been answered yet, , got here looking solution problem had me stumped while maybe helps someone: i getting '302 moved temporarily' , re-direct on same resource trying post form had been populated editing. had set emai...

java - Can I use specific method for dependency injection in ejb? -

for example have class gets dependecy in constructor, like class exampleservice() { private dependency dep; public exampleservice(dependency dep) { this.dep = dep; } } and dependecy class: class dependency { public static dependency getinstance() { return new dependency(); } private dependency() { /*constructor implementation here*/ } } i want inject result of dependency.getinstance() method exampleservice constructor @inject ejb annotation. possible? how? thankyou. in cdi producer method can static , using example, following work fine: class exampleservice() { private dependency dep; @inject public exampleservice(dependency dep) { this.dep = dep; } } class dependency { @produces public static dependency getinstance() { return new dependency(); } private dependency() { /*constructor implementation here*/ } } however, mentioned in comments ...

chromecast - Third party Google Cast devices -

is google cast open third party receiver devices (dial 1st-screen devices), or chromecast remain option? can expect smarttv makers natively support cast protocol, chromecast device not needed? as developer, have implement in order google cast device?

android - How to get values of all EditText inside a ListView -

i want values of edittext elements present inside listview. code : final listview editorlist = (listview) findviewbyid(r.id.editorlist); final editoradapter adapter = new editoradapter(context, data); editorlist.setadapter(adapter); button commitbutton = (button) findviewbyid(r.id.commit_button); commitbutton.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { // todo auto-generated method stub try{ //system.out.println("size of list : " + editorlist.getchildcount()); for(int =0;i< data.size() ;i++){ system.out.println("size of list : " + data.size()); edittext value = adapter.getitem(i); string propertyvalue = value.gettext().tostring(); system.out.println("propertyvalue : " + propertyva...