Posts

java - Move the file to other location -

i need move file other location giving differnt name. tried : files.move(oldname, newname, options); i exception: java.nio.file.nosuchfileexception: /media/sf_vboxshared/data/csv/res20150201/xx/part-r-00000-f8ed41a5-e0e1-4534-a1d9-e4d6082691db.gz.parquet -> /media/sf_vboxshared/data/csv/res20150201/res/xx.parquet the oldname file exists. newname dosn`t exist. (only /media/sf_vboxshared/data/csv/res20150201 part of path exist) you /media/sf_vboxshared/data/csv/res20150201 , parent directory of directory want move file to, /media/sf_vboxshared/data/csv/res20150201/xx , doesn't exist. so have create first before moving: path newname = ...; files.createdirectories(newname.getparent());

Ruby - logging in time-critical multithreading application -

i have log activity of application runs in many threads. best approach that? not possible threads log 1 file, because lock each other? best use separate file each thread then? i use within method called threads @ moment: f=file.open(...) f.puts "log message" f.close all threads calling method. append thread number file name every thread creates own file. method called when thread calls , gives new information log. method opens file, writes information , closes again. opening , closing of file time-consuming in time-critical application? or not concerned of?

memory dump - Open PDF found with volatility -

my task analyze memory dump. i've found location of pdf-file , want analyze virustotal. can't figure out how "download" memory dump. i've tried command: python vol.py -f img.vmem dumpfiles -r pdf$ -i --name -d dumpfiles/ but in dumpfile-directory there .vacb file not valid pdf. i think may have missed command line argumenet command: python vol.py -f img.vmem dumpfiles -r pdf$ -i --name -d dumpfiles/ if not getting .dat file in output folder can add -u : -u, --unsafe relax safety constraints more data can't test out access dump should able rename .dat file created .pdf . so should this: python vol.py -f img.vmem dumpfiles -r pdf$ -i --name -d dumpfiles/ -u you can check out documentation on commands here

objective c - UILabel.text doesn't change from NSString (iOS) -

i'm trying change name ( uilabel ).text namestring ( nsstring ) not present on screen (it change - value when debug , correct value). code: nsstring *namesstring = [self.names objectatindex:i]; infowindow.storeaddresslabel.text = namesstring; note: if type: infowindow.storeaddresslabel.text=@"sometext"; it works does know why it? thanks! you're referencing 2 different variables. on 1st line define namestring , , on next line set using namesstring s

active passive in memory object redundancy .NET -

i have following requirement don't know way begin with. have application when started creates object in memory. have start same application on other machine , other machine should create same object in memory. now, if can or set data to/from object third machine (client). 2 machines must keep in-memory object in sync such if client updates object in 1 machine should updated in second machine well. client should able register notifications such if important happens, server should notify client. if 1 machine gets down client's request should start going other machine. client should not have register notifications second time. in short want active/passive kind of redundancy @ in memory object level notification features. in c++, used applibus (a customized corba middleware), in .net have no clue. need use middle ware or cluster/nlb configuration or hardware redundancy of server. please help

php - change codeigniter default url format -

the default url format of codeigniter controller/function/params . can change params/controller/function or controller/params/function you should add routes uri scheme wish have: http://ellislab.com/codeigniter/user-guide/general/routing.html

javascript - How to use server-sent-events in express.js -

i setup rest server express.js . want add sse server. after implemented this sse package, error. know error, when try use res.send twice, not. error: error: can't set headers after sent. @ serverresponse.outgoingmessage.setheader (http.js:690:11) @ serverresponse.header (/home/root/node_modules/express/lib/response.js:718:10) @ serverresponse.send (/home/root/node_modules/express/lib/response.js:163:12) @ app.get.str (/home/root/.node_app_slot/main.js:1330:25) @ layer.handle [as handle_request] (/home/root/node_modules/express/lib/router/layer.js:95:5) @ next (/home/root/node_modules/express/lib/router/route.js:131:13) @ sse (/home/root/node_modules/server-sent-events/index.js:35:2) @ layer.handle [as handle_request] (/home/root/node_modules/express/lib/router/layer....