Posts

Featured post

c++ - Linked List error when inserting for the last time -

so have part of code here this loop 5 times (max = 5) insert word link list. for ( int = 0 ; < max ; i++ ) { string alphabet = g->returnalphabets(); l[i]->addwords(alphabet[i]); } and have insert word part here string line; fstream myfile ("words.txt"); while (!myfile.eof()) { getline(myfile,line); if ( alphabet == line[0] ) { listnode *newnode = new listnode; if ( head == null ) { newnode->item = alphabet; newnode->next = null; head = newnode; } else { newnode->item = line; prev = cur; prev->next = newnode; } cur = newnode; } } myfile.close(); my problem gives me error on last loop. meaning on max = 4, insert node. rest of loop fine. when decrease max 4 meaning loop 4 times, program error-free when program loops 5 times gives error. anyone can poin...

Using Angularjs $http in browser console -

i've testing angularjs services in browser console during development quick verification. way inject service console describe in this question or var $inj = angular.injector(['myapp']); var serv = $inj.get('myservice'); serv.dosomething(); that working angularjs 1.0.7. however, after upgrading 1.1.5, doesn't work anymore services uses $http service, no xhr sent. i've tested injecting $http directly, doesn't work. angularjs changelog seems have no record on issue. may know what's problem here? update: it seems angularjs 1.0.7 uncompressed version doesn't work well. tested working version angularjs 1.0.7 minified. it works uncompressed also. $http = angular.element(document.body).injector().get('$http'); then $http.get(...) // or post or whatever

java - Cannot connect to a local sesame local store -

i want create sparql endpoint locally tomcat on computer , sesame2.7.3 apis, there problem encountered. after have created native datastore on computer, want connect datastore , execute sparql queries on it, , code in java, following error message tomcat. exception javax.servlet.servletexception: error instantiating servlet class com.jelly.web.rdfservlet org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:103) org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:293) org.apache.coyote.http11.http11processor.process(http11processor.java:861) org.apache.coyote.http11.http11protocol$http11connectionhandler.process(http11protocol.java:606) org.apache.tomcat.util.net.jioendpoint$worker.run(jioendpoint.java:489) java.lang.thread.run(thread.java:680) root cause java.lang.noclassdeffounderror: org/openrdf/repository/repositoryexception java.lang.class.getdeclaredconstructors0(native method) java.lang.class.pri...

You don't have permission to access /marcon/assets/images/pic.jpg in apache php -

i getting error don't have permission access /marcon/assets/images/pic.jpg in apache php on local fedora 17, php,mysql , apache(not xampp installation). error occuring new files copying directory.the older files /marcon/assets/images/header.jpg accessible fine. checked permissions , 777 (now) still doesn't work. wierd error. subdirectory , other images work fine. newer files don't work this happens when embed image when access directly. works other files in directory. not newer ones edit: ironically problem doesn't occur if check files github , clone project again. works hunky dory. it selinux issue: try $ ls -z file1 you should similar to: drwxr-xr-x. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 scripts if no try: chcon -r -t httpd_sys_content_t /marcon/assets/images

c++ - Issues with OpenGL referencing when compiling in Ubuntu terminal -

i working on compiling directory of c++ files , headers. thought installed opengl, glut , glew keep getting referencing errors when running it. here doing , errors compiler sending me: user@linux-machine:~/documents/hw$ make g++ -g framework.o poly_line.o shader_program.o circle.o controller.o main.o scene.o view.o -lglew -lglut -lglu -o hw framework.cpp:84: error: undefined reference 'glgeterror' check_gl.h:30: error: undefined reference 'glgeterror' check_gl.h:43: error: undefined reference 'glgeterror' poly_line.cpp:23: error: undefined reference 'glgenbuffers' poly_line.cpp:28: error: undefined reference 'glbindbuffer' poly_line.cpp:29: error: undefined reference 'glbufferdata' poly_line.cpp:54: error: undefined reference 'glenable' poly_line.cpp:55: error: undefined reference 'glenable' poly_line.cpp:56: error: undefined reference 'glblendfunc' poly_line.cpp:57: error: undefined reference 'glhint...

multithreading - Python 2.7.5 - Run multiple threads simultaneously without slowing down -

i'm creating simple multiplayer game in python. have split processes using default thread module in python. noticed program still slows down speed of other threads. tried using multiprocessing module not of objects can pickled. is there alternative using multiprocessing module running simultaneous processes? here options: mpi4py: http://code.google.com/p/mpi4py/ celery: http://www.celeryproject.org/ pprocess: http://www.boddie.org.uk/python/pprocess.html parallel python(pp): http://www.parallelpython.com/

java - activate/deactivate sonar maven plugin by profile? -

i use sonar plugin executes if activated in maven profile. sonar runs on every compile. the problem build fail other team members not have sonar application installed locally. pom.xml checked in team members same copy including sonar configuration, don't want them modify purpose of disabling sonar (they might inadvertently check modified copy in). please advise how configure maven (.m2/settings.xml) and/or pom.xml sonar feature can enabled/disabled local profile. here sonar configuration in each project's pom.xml: <plugin> <groupid>org.codehaus.mojo</groupid> <artifactid>sonar-maven-plugin</artifactid> <version>1.0</version> <executions> <execution> <id>make-sonar</id> <phase>compile</phase> <goals> <goal>sonar</goal> </goals> </execution> </executions> ...