Posts

javascript - Twitter Bootstrap Tabs: Go to Specific Tab on Page Reload or Hyperlink -

i'm developing web page in i'm using twitter's bootstrap framework , bootstrap tabs js . works great except few minor issues, 1 of not know how go directly specific tab external link. example: <a href="facility.php#home">home</a> <a href="facility.php#notes">notes</a> should go home tab , notes tab respectively when clicked on links external page here solution problem, bit late perhaps. maybe others: // javascript enable link tab var url = document.location.tostring(); if (url.match('#')) { $('.nav-tabs a[href="#' + url.split('#')[1] + '"]').tab('show'); } // change hash page-reload $('.nav-tabs a').on('shown.bs.tab', function (e) { window.location.hash = e.target.hash; })

xamarin - iOS 8 (.0 to .3) vs 8.4 Share Extension -

while developing tools date, noticed on 8.3 , lower devices extension seems have disappeared , not show @ in list users can enable it. extracted contents of app file , extension compiled , packaged. on few devices decided update, extension started showing on ios 8.4 devices (post update no app reinstall required). what's this? has else run issue? there can fix it? nb: have mention, thing changed updating our dev tools. extension project untouched. dev environment using xamarin. make sure cfbundledisplayname , cfbundlename values both set in info.plist share extension. if memory serves correctly, i've run same issue before , that's how managed solved it.

matplotlib - Python pylab plot legend scientivic writing -

i need modify legend. noise_mu has values 1.6e-29 , want being plotted scientific way. unfortunately legend prints them in form of 0.000000000000000000000016 . how can change ?! pl.figure('connectivity', figsize=(16, 9), dpi=80, facecolor="grey", frameon="true") pl.ion() pl.plot(freqs, con, label="$\mu_n: %.30f$"%noise_mu, linewidth=1.5) pl.ylim(0, 1.05) pl.xlim(freq1_start-30,freq1_end+30) pl.xlabel("frequency [hz]", color="black", fontsize=22) pl.ylabel("connectivity value [ ]", color="black", fontsize=22) pl.grid(all) xticks = np.arange(freq1_start-30,freq1_end+30,5) # change ticks accordingly roi pl.xticks(xticks) yticks = np.arange(0,1.05,0.1) pl.yticks(yticks) leg = pl.legend(prop={'size':16}, shadow=true, fancybox=true) legobj in leg.legendhandles: legobj.set_linewidth(2.5) pl.show() plot without specifying formatti...

microsoft dynamics crm 2015 Error in javascript string concatenation -

i need concatenate 2 strings make useful link. code goes here: odatahost = "https://xyz.dynamics.com/xrmservices/2011/organizationdata.svc/"; accountid= "{90639159-6e01-e511-80ed-c4346bada644}"; odataquery = "accountset(guid'" + accountid + "')"; odataurl= odatahost + odataquery; odataurl not forming meaningful link , distorted. link formed is: https://xyz.dynamics.com/xrmservices/2011/organizationdata.svc/accountset(guid'{90639159-6e01-e511-80ed-c4346bada644}') ,but last characters of resulting string i.e }') not part of resultant string makes distorted link. have tried: odatahost = odatahost.concat(odataquery) didn't worked. please come suitable solution . you need remove {} , going this: https://xyz.dynamics.com/xrmservices/2011/organizationdata.svc/accountset(guid'{90639159-6e01-e511-80ed-c4346bada644}') to this https://xyz.dynamics.com/xrmservices/2011/organizationdata.svc/accountset(...

C3 stacked column chart from CSV -

i create stacked bar chart in c3 reading in csv url: "data.csv" i not sure if functionality exists or if need convert csv in json that? thanks! you don't need convert. c3 supports this. from example @ http://c3js.org/samples/data_url.html var chart = c3.generate({ data: { url: '/data/c3_test.csv' } });

php - Selecting rows from multiple tables -

i know fastest way make following sql call using php. using procedural mysqli. $dcount = "select max(id) deposits"; $result = mysqli_query($conn,$dcount); if (mysqli_num_rows($result) > 0) { while($row = mysqli_fetch_assoc($result)) { $count = $row["max(id)"]; echo $count; echo ","; } } else { echo '0'; } //second query $ucount = "select max(int) anothertable"; $result2 = mysqli_query($conn,$ucount); if (mysqli_num_rows($result2) > 0) { while($row = mysqli_fetch_assoc($result)) { $count = $row["max(int)"]; echo $count; echo ","; } } else { echo '0'; } is there way make execution faster this, maybe echo results both queries after first if statement? it seems rather long me. thanks in advance. $dcount = " select max(id) max,'deposit' table_name deposits union select max(id) max,'another' table_name anothertable "; $result = mysqli_q...

java - How to avoid null pointer exception in the below code? And Would read() function print a string in the code below? -

for code below compiler gives null pointer exception when using read function. want display, whatever user types, on screen. secondly read function returns int, want display string user types, display string or method have use display string? //this part in main method. inputstream obj=new task(t); int c; try { while((c=obj.read())!=-1){ system.out.print(""+c); } //this 1 class. class task extends inputstream{ byte[] content; int num=0; public task(jtextfield t){ t.addkeylistener(new keyadapter() { public void keypressed(keyevent e){ if(e.getkeycode()==e.vk_enter){ content=t.gettext().getbytes(); t.settext(""); } super.keypressed(e); } }); } public int read(){ if(num>=content.length){ return -1; } else return content[num++]; }} content initialized when block executes: if(e.getkeycode()==e.vk_ente...