Posts

Featured post

scripting - Is there a way to create a bash script that will only run for X hours? -

is there way create bash script run x hours? i'm setting cron job initiate script every night. script runs until condition met, exporting it's status holding variable keep track of 'where is' after each iteration. intention start-up process every night, run few hours, , stop, holding status until process starts next night. short of somehow collecting start time, , checking against current time in each iteration of loop, there easier way this? bash scripting not forte (i know enough things done , dangerous) , have not done before. appreciated. thanks. use gnu coreutils gnu coreutils contains actual timeout binary, invoked this: # timeout after 5 seconds when sleeping 30 /usr/bin/timeout 5s /bin/sleep 30 in case, you'd want specify hours instead of seconds, timeout in 2 hours use 2h instead of 5s . see timeout(1) or info coreutils 'timeout invocation' additional options. hacks , workarounds native timeouts or gnu timeout command be

Git does not commit -

i try commit changes , keep getting this: # on branch master nothing commit (working directory clean) i do: git add . git commit -a -m "test" and error message before can git push like message says, doesn't there changes add cache, let alone commit anything. execute git status see if changes exist (it shouldn't).

machine learning - algorithmic complexity of classification algorithms/artificial neural networks -

the algorithmic complexity of binary trees o(n), n being height of tree. there resources listing complexity of methods selecting best tree? e.g. boosted regression trees, cart or c4.5 (even mars) also, not familiar artificial neural networks, references seem point specific ann implementations being np-complete: http://people.csail.mit.edu/rivest/pubs/br93.pdf , http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.7.8997 . does know extent general result?

c++ - How can I determine the actual type of an 'auto' variable -

in response: https://stackoverflow.com/a/14382318/1676605 this program given: std::vector<int> vi{ 0, 2, 4 }; std::vector<std::string> vs{ "1", "3", "5", "7" }; (auto : redi::zip(vi, vs)) std::cout << i.get<0>() << ' ' << i.get<1>() << ' '; i have no idea type of auto i is, making harder reuse expertise , learn examples. here changing auto i char i returns in function ‘int main()’:| /data/cbworkspace/testzip/testzip.cpp|14|error: cannot convert ‘boost::iterator_facade<boost::zip_iterator<boost::tuples::tuple<__gnu_cxx::__normal_iterator<int*, std::vector<int> >, __gnu_cxx::__normal_iterator<int*, std::vector<int> > > >, boost::tuples::cons<int&, boost::tuples::cons<int&, boost::tuples::null_type> >, boost::random_access_traversal_tag, boost::tuples::cons<int&, boost::tuples::cons<int&, boost

.net - Using .net3.5 assemblies and mixed-mode dlls on .net4 -

its in context of c++ application uses .net3.5 assemblies through mixed-mode (again targeted .net3.5) assemblies. native app explicitly loads .net assemblies. i want know repercussions of using .net3.5 assemblies on .net4. found few links suggest using uselegacyv2runtimeactivationpolicy. there similar question answer suggests fine, following links make me think better recompile targeting .net4: "...apps built versions 2.0, 3.0, , 3.5 can run on version 3.5, not work on version 4 or later." - on msdn "some framework types have moved across assemblies between versions..." - in answer "no idea. depends on application , apis uses. there breaking changes in .net 4 , application hitting one..." - in msdn forum answer i want know repercussions of using .net3.5 assemblies on .net4. in general, need set runtime activation policy force .net 4. means 3.5 assembly executed using clr 4 runtime, not clr 2 runtime. for scenarios, things &qu

crash - Java program crashing when it overwrites an existing .txt file? -

i'm making simple text based game have type commands preform actions. added feature game allows save progress. reason if try save game on existing save file crashes. here code saves game ( when fails save says "there error when trying save game data. game close." expected ): import java.util.formatter; import javax.swing.joptionpane; public class gamesave { private static formatter gamesave; private static formatter firsttimesave; private static formatter attackpoints; private static formatter defensepoints; private static formatter skillpoints; private static formatter wins; private static formatter loses; private static formatter money; // attackpoints, defensepoints, skillpoints, wins, loses, money public static void openfile(){ try{ attackpoints = new formatter("c:\\fightnight\\saves\\"+mainclass.newprofilename+"\\"+mainclass.newprofilename+"_attackpoints.txt");

sql - How to stop Access from thinking my table.field in VBA is a form component? -

so i'm writing sql query in vba in access 2010, , when code ran, thinks supplierconnect.mailboxid component on form, in fact database table (supplierconnect) , field (mailboxid). every time code ran pops box asking me input form component, isn't one. there way around or code differently? thanks! ' mailbox id if isnull(mailboxidcombobox.value) else if firstwhere = true mailboxid = "where supplierconnect.mailboxid = '" & [forms]![supplierquery]!mailboxidcombobox.value & "'" firstwhere = false else mailboxid = " , supplierconnect.mailboxid = '" & [forms]![supplierquery]!mailboxidcombobox.value & "'" end if end if this not popping asking value because thinks form control, because undefined query. cannot find field within query definition. happens because not have proper case sensitive table or field id or incorrect table linked. if provided more code sql statement using begin