Posts

linux - Makefile Anomaly: Invoke `make` and it appears to be running another makefile -

i have following makefile: objdirs = runtime/core/common runtime/core/graphic/symbolxlib runtime/core/map runtime/core/symboldictionary \ runtime/coreclient/runtimecorejava objs = $(wildcard $(objdirs:=/*.o)) targeta = libruntimecorejava.a targetd = libruntimecorejava.so targetd1 = $(targetd).1 targetd2 = $(targetd).1.0 targetd3 = $(targetd).1.0.0 ar = ar cqs link = g++ symlink = ln -f -s ldflags = -shared -wl,-soname,libruntimecorejava.so.1 : $(targetd) $(targeta) $(targetd) : $(objs) echo "building dynamic lib using "$(objs) #$(cxx) $(ldflags) $(objs) #$(symlink) $(targetd) $(targetd1) #$(symlink) $(targetd) $(targetd2) #$(symlink) $(targetd) $(targetd3) $(targeta) : $(objs) echo "building static lib using "$(objs) #$(ar) $(targeta) $(objs) when run make @ same level makefile appears call makefile unrelated one. i...

php - Cannot find a full php5.ini example file -

i trying change php configuration settings on webserver , need set values in php5.ini file. have been told need "full" php5.ini file. take mean needs have settings in there , not ones want change. cannot find example of "full" 1 anywhere. have been looking through google no avail. can point me in correct direction? thanks can view recent php.ini @ location http://svn.php.net/viewvc/php/php-src/trunk/php.ini-production?view=co or you can view http://svn.php.net/viewvc/php/php-src/trunk/ scroll down until find php.ini file. there two, 1 meant development , other production choose 1 want. there can older versions of .ini file. or you may want download .ini specific version first going here http://svn.php.net/viewvc/php/php-src/branches/ because latest may not work version. view version echo phpinfo() on site. click version of php using find .ini edit: update links svn github seeing got downvoted broken links after on year. i...

html - How can I trigger javascript function once I load the webpage (Not using form and submit button) -

for example, want html page can able call javascript function automatically once loaded or refreshed. don't want trigger function using form , submit button. how can so? , coding? many thanks. [edited] okay working right now. many guys , have 1 more question. using servlet print out html tag make html page. using servlet since want load data mysql database , pass parameter javascript carry out calucation. last question how can control time of calling javascript? want call read database first , triggering javascript function (at same time passing data read parameter) .how can that? answer! javascript call function after page load <body onload="myfunc() ;"> or <script> window.onload=myfunc ; </script> refer http://www.mkyong.com/javascript/javascript-call-funtion-after-page-load/

URL Regular Expression with Perl -

i need normalise url before store in database using perl regular expressions. here example urls: http://www.codeme.com:80/foo/../index.php http://www.codeme.com:123/../foo//bar.html however, whenever try below code, instead of removing // after foo in foo// , remove double slash in http:// . need keep // in http:// , don’t need forward // after foo// . need rid of /../ or /./ can appear in url. basically, this: "http://www.codeme.com:123/../foo//bar.html" should become this: "http://www.codeme.com/foo/" i new perl ignored , thought never need life has proven me wrong. therefore appreciate if can lead me right track. sub main { $line; open(fh, "test.txt"); until(($line = <fh>) =~ /9/) { $line =~ tr/a-z/a-z/; $line =~ s|//|/| ; $line =~ s|\:\d\d\d|| ; $line =~ s|:80||; print $line; } close fh; } use ...

c - SO_KEEPALIVE and poll -

hello try use following code, seems not working, on connected socket (sock) do: struct pollfd input_fd; int a=1; setsockopt(sock,sol_socket,so_keepalive,&a,sizeof(a)); a=1; setsockopt(sock,sol_tcp,tcp_keepidle,&a,sizeof(a)); a=1; setsockopt(sock,sol_tcp,tcp_keepintvl,&a,sizeof(a)); a=1; setsockopt(sock,sol_tcp,tcp_keepcnt,&a,sizeof(a)); input_fd.fd = sock; input_fd.events = pollin | pollout; input_fd.revents = 0; int p=poll(&input_fd, 1,-1); i pull lan plug remote computer, nothing happens. kernel seems sleeping in poll syscall. desired behaviour, or defect? set nfds: int p=poll(&input_fd, sock+1 ,-1); also, i'm not sure of allowed range of settings, it's worth check return value of setsockopt .

javascript - Simple AJAX: how to swap out a div that contains a form? -

please refer below jsfiddle code snippet: http://jsfiddle.net/jlxs5/3/ when user clicks "here", want swap out div contains signup form div contains login form (currently login form display:none) quick fade. how go doing this? i'm total novice @ ajax, , i'm having trouble making headway in replacing div here. thanks! ringo to people suggesting jquery just show/hide 2 elements... seriously? . however , since op wants elements fade in , out, , jquery has these functions built-in ( fadein() , fadeout() ), useful. can done pretty plain old javascript. mentioned, ajax not needed @ all. here jsfiddle includes fade.

C# Guitar Hero Clone, Note Animation Timing -

i creating guitar hero clone using c# , having trouble syncing animations , sound. a rundown of now: a read file , note highway, note time , not length (this done correctly) the notes put array before song starts, generate storyboard, read in entire array of notes, , create doubleanimations make rectangle objects (notes) scroll down screen. i set begintime on animation 1 second before expected play time (the duration spent approaching end) , , animation duration 1 second. however, expect happen (the notes playing in sync) inst happening. here code creating animation: private void startnote(midinoteevent evnt) { const double length = 0; int[] highwayarray = evnt.highway; (int = 1; <= highwayarray.length; i++ ) { var highway = highwayarray[i-1]; if (highway > 0) { string name = evnt.time.tostring() + "|" + highway.tostring(); var rect = new rectangle ...