Posts

bash - No rule to make target Makefile error in shell script? -

i new shell script. tried run makefile using shell script. giving me error vedant@z510:~/workspace$ sh test.sh make: makefile: no such file or directory make: *** no rule make target 'makefile'. stop. my makefile src=src #obj=obj flags= -g3 -msse3 -g source= $(src)/main.c \ $(src)/sgp_conv.c\ $(src)/sgp_math.c\ $(src)/magneticfield.c\ $(src)/sgp4.c\ $(src)/dynamics2.c\ $(src)/preisach2.c \ $(src)/atmospheric_torque.c\ $(src)/initialize.c \ $(src)/ptangle.c\ $(src)/effectmagnet.c\ $(src)/print.c\ $(src)/solarradiation_torque.c object = $(source:.c=.o) sim: $(object) gcc -wall -o demo $(flags) $(object) -lm $(object) : %.o : %.c makefile gcc $(flags) -c $< -o $@ clean: rm $(src)/*.o and shell script trying execute alias proj="cd /home/vedant/version/version14.9_latest" make -b please can tell me wrong?

deployment - Capifony config to run bower installs and grunt commands -

so, it's first project, deploying capifony . seems fine, can't run grunt , bower commands on vps. this trying in deploy.rb file: after "deploy" run "cd #{current_path}; npm install -g grunt-cli" run "cd #{current_path}; npm install grunt --save-dev" run "cd #{current_path}; npm install" run "cd #{current_path}; bower install --allow-root" run "cd #{current_path}; grunt" end and lot of errors, looks that: http://pho.to/94cii/t4 how should in right way? my bad, went fine. red log messages, , err statement let me thought, failed attempt. but anyway, solution appropriate?

c++ - Why is my function "missing argument lists"? -

i'm not sure i've done wrong in project. have 2 files, airports.h header file , main source file. in main source file have string code,name; int deptax, conntime; cin >> code >> name >> deptax >> conntime; airport myairport(code,name,deptax,conntime); cout << myairport.getcode << endl; and in airports.h header file have class airport{ public: airport(string code, string name, int departuretax, int connectiontime) :code(code), name(name), departuretax(departuretax), connectiontime(connectiontime) {...} string getcode(){ return code; }//then getname, getdeptax, getconntime... } when run main source file, error "error c3867: 'airport::getcode': function call missing argument list; use '&airport::getcode' create pointer member" in line 5 there. i'm beginner i'm not sure why it's telling me this. shouldn't .getcode() work how it...

flask - Logging application use in python? -

i'd log every time uses flask app. i'd ideally have log looks this timestamp 923829832 929299292 999993939 with list of unix time stamps represent each time user had accessed application. what's way this? you use flask's after_request decorator. for example: import datetime import time @app.after_request def log(): open("app.log", "a") log: date = datetime.datetime.now() log.write(time.mktime(dt.timetuple())) this open log file after each request, , log timestamp end of it.

string - Parse full name for UK users in c++ considering multiple scenarios -

i working third party api, receives forename, middlename, , surname parameters. have fullname of user. cannot change structure because part of large scale system cannot changed. the structure of parameters of third party api cannot change, despite not best solution have parse fullname , split 3 fields. the names uk, good. doing now: vector<string> fields; mylibrary::split(' ', name, fields); string firstname = fields[0]; string middlename = fields.size() == 3 ? fields[1] : ""; string surname = fields.size() == 3 ? fields[2] : fields[1]; but pretty sure bad solution, since there multiple scenarios, example when name contains text mr. @ beginning, or jr. @ end. is there code block can give me better guarantees code? thanks! [update] the name requested in form user "account holder's name", , information related bank account information, user won't put nickname. added example of jr. or sr. 1 possible scenario found, there might...

java - Scrolling header with two list views -

i have header section scroll list view below. problem have toggle below header section allows user switch between 2 list views. best way have header section scroll in sync 2 list views below? i can share short overview you: <scrollview ..> <linearlayout> <headerview></headerview> <togglebutton></togglebutton> <listview></listview> <listview></listview> </linearlayout> </scrollview> the tricky thing is: have flip visibility of 2 listview visible , gone in toggle button. 1st click on toggle make it listview1.setvisibility(view.gone) listview2.setvisibility(view.visible) 2nd click on toggle make it listview2.setvisibility(view.gone) listview1.setvisibility(view.visible)

html - <a> link only functions if you click exact text. How do I make the entire <a> tag clickable? -

my website has modal-style popup window appears when user clicks link: <li><a href="#contact"><label for="lightbox-demo">contact</label></a></li> the problem link opens popup if click directly on "contact" text. if click within <a> tag, miss text, won't anything. how make if click anywhere in <a> tag, popup opens? the popup code (if needed) is: <aside class="lightbox"> <input type="checkbox" class="state" id="lightbox-demo" /> <article class="content"> <a href="#" class="closest"><img src="img/x.png" class="btn_close" title="close window" alt="close contact window" /></a> <form method="post" action="submit.php" id="contactform" class="signin"> <input name="name" id="...