Posts

How do I envoke a MSBuild target in the middle of another target? -

what i'm looking like: <target name="dostuff" > <message text="doing stuff..." /> //run target dootherthing <message text="doing more stuff..." /> </target> there's calltarget you'd use like <target name="dostuff" > <message text="doing stuff..." /> <calltarget targets="dootherthing" /> <message text="doing more stuff..." /> </target> and there's more idiomatic, albeit bit on top case, way: <itemgroup> <mytargets include="message1" /> <mytargets include="dootherthing" /> <mytargets include="message2" /> </itemgroup> <target name="message1" /> <message text="doing stuff..." /> </target> <target name="dootherthing" /> <calltarget targets="dootherthing" /> </target> ...

jquery mobile - Possible to ajax load only the <page/> instead of everything of an HTML document? -

i need to on page a, when clicking link page b, ajax injects of b, not refreshing whole page now on page b, pressing reload button refreshes whole page, js being run the js must not loaded more once method x) standard way, satisfies 1,2 not 3. alert seen after clicking link page b. a.html <before_page> <script>alert('abc')</script> </before_page> <page> <a href=b.html>b</a> </page> <after_page/> - b.html <before_page> <script>alert('abc')</script> </before_page> <page/> <after_page/> method y) satisfies 1,3 not 2. a.html <before_page> <script>alert('abc')</script> </before_page> <page> <a href=c.html>c</a> </page> <after_page/> - c.html <!--nothing before <page/> --> <page/> <!-- nothing after <page/> --> the question is how satisfy 1,2,3? ...

c++ - My program will run but it prints out all 100's for values that should be all different -

my program run when reaches point prints out vector values come out 100, far programming skills go (which pretty low) see no reason should creating values 100. think may have input_seconds im not sure. suggestions on whats wrong? #include<iostream> #include<cmath> #include<vector> using namespace std; double altitude(){ double alti; cout << "please input altitude in meters:"; cin >> alti; return alti; } double roc() { double climbr; cout << "please input climb rate in m/s:"; cin >> climbr; return climbr; } double speed(){ double v; cout << "please input current speed on ground in m/s" << endl; cin >> v; return v; } // gives time take reach desired altitude double time(double a, double r){ double t; t = / r; return t; } //distance travelled horizontally in given time double distancetravelled(double veloc, double time){ do...

classname - How do I add a class name to Javascript string? -

i'm js newbie trying alter following code. looks it's adding style attributes. add class name "reveal" string or below. syntax like? many help, guys! inline = ( elem.domel.getattribute( 'style' ) ) ? elem.domel.getattribute( 'style' ) + '; visibility: visible; ' : 'visibility: visible; ' (i guess) html may this: <div class="some other"> in such case, if like elem.domel.classname = 'reveal'; then you'll get <div class="reveal"> all styles brought class some , other gone! don't want that, right? don't want repeated classname, like <div class="reveal reveal"> so, here solutions: the best way use html5 api classlist : elem.domel.classlist.contains('reveal') // check whether element has classname elem.domel.classlist.add('reveal') // add classname elem.domel.classlist.remove('reveal') // remove classname elem.dom...

java - Can not run empty AndroidStudio 0.8.14 project with google-cloud-storage client library -

i creating simple android app take picture , upload google cloud storage. simplest (and recommended) way use provided client library . but empty androidstudio dependency gcs fails run. compiles, fails run failures: warning: dependency org.apache.httpcomponents:httpclient:4.0.1 ignored debug may conflicting internal version provided android. in case of problem, please repackage jarjar change class packages. error:execution failed task ':app:predexdebug'. com.android.ide.common.internal.loggederrorexception: failed run command: /home/milan/androidstudiosdk/sdk/build-tools/21.1.1/dx --dex --output /home/milan/androidstudioprojects/test/app/build/intermediates/pre-dexed/debug/transaction-api-1.1-d542431644c5559f18a80700bbbf3a2bc4472ff7.jar /home/milan/.gradle/caches/modules-2/files-2.1/javax.transaction/transaction-api/1.1/2ca09f0b36ca7d71b762e14ea2ff09d5eac57558/transaction-api-1.1.jar error code: 1 output: trouble processing "javax/t...

java - Subtracting two dates with time in JSTL -

this question has answer here: display date diff in jsp 3 answers let's have 2 variables called admitteddate , currentdate . contain values "2014-10-13 14:47:44.0" i want cast them dates , subtract them , show them in webpage. can help? javascript var differenceinmin=(new date(admitteddate ).getmilliseconds()-new date(currentdate).getmilliseconds())/60000; var diffinhrs=differenceinmin/60; var diffindays=parseint(diffinhrs/24)+" "+parseint(diffinhrs)+":"+((diffinhrs-parseint(diffinhrs))*60);

c# - ASP.Net MVC 5 Entity Framework Select Where In? -

i have 3 tables project, province, projprovrel in project page when add data select multiple provinces each project means province multi select dropdown list. i insert data working inserted id , added projprovrel selected ids of province now in details view want display data not solve it. here code: // get: project/details/5 public actionresult details(int? id) { if (id == null) return new httpstatuscoderesult(httpstatuscode.badrequest); var mydata = db.projects.find(id); if (mydata == null) { return httpnotfound(); } var prov_id = o in db.prorel o.projectid.equals(id) select o.provinceids; foreach (var p_id in prov_id) { int[] pids = new int[] {p_id}; } var prov= c in db.provinces c.id in pids; viewbag.province = prov; return view(mydata); } one problem how can select data table based on condition var prov_id = o in db...