Posts

What is 'AskTbPTV' in HTTP User Agent? -

searched on google couldn't find useful. programming statistics user agents , came across one: mozilla/4.0 (compatible; msie 6.0; windows nt 5.1; sv1; mra 5.8 (build 4157); .net clr 2.0.50727; asktbptv/5.11.3.15590) what 'asktbptv' in http user agent stand for? ask.com toolbar http://apnstatic.ask.com/static/toolbar/everest/download/index.html?source=sp wich modify user agent string.

c++11 - Largest Seed Possible for Mersenne Twister c++ -

i find out largest value can seed random number generator in c++. code follows: mt19937 myrandomgenerator(seed); how large can variable, seed be? have noticed if value becomes large, random number generator spits out same sequence of 'random' numbers. know how large seed can without happening. seed std::uint_fast32_t 32-bit int. every value in range [0..2^32) should produce different results. if seeing same sequence 2 different seed values, either making observational error , seed inputing same, or there bug in standard library implementation. prepare short self-contained test program demonstrating misbehaviour , post here.

scriptcs hosting - Advantages over Roslyn -

if want support scripting in application, scriptcs offer particular advantages on using plain vanilla roslyn script engine? unfortunately there's not documentation on hosting scriptcs yet, i'll try give short summary. hosting scriptcs in application provides several features vanilla roslyn doesn't: pluggable engines while scriptcs comes roslyn , mono engines default, can replace engine, i.e. f# , lolcode or brainfuck . pre-processing scriptcs process scripts , extract things references ( #r ) , load other scripts ( #load ). there introduced custom ilineprocessor s lets hook pipeline custom processing. example processor this: public class gistlineprocessor : directivelineprocessor { protected string directivename { return "gist"; } protected override bool processline(ifileparser parser, fileparsercontext context, string line) { var gistid = getdirectiveargument(line); var gistcontents = downl...

sql - MySQL: Using alias in select arithmetic - Unknown field -

here's select: select sum(t.amount + c.designfeevalue) cashreceived, round(sum(i.value) * (m.percentours / 100)) advalue, m.managementfee managementfee, m.productioncost productioncost, 5 emailaddress, ( ( select value commission_transactions isdebit true ) - ( select value commission_transactions isdebit false ) ) miscexpenses, (managementfee + productioncost + emailaddress + miscexpenses) totalexpenses this bombing because of following line, add aliases. (managementfee + productioncost + emailaddress + miscexpenses) totalexpenses the aliases unknown fields. is there way can keep aliases arithmetic or need re-do math generates each alias calculation of totalexpenses? seems ugly way it. update: per suggestions, using derived table. select cashreceived, advalue, managementfee, productioncost, emailaddress, miscexpenses, advalue + managementfee + productioncost + ...

android - NullPointerExeption in SimpleCursor adapter.Works with onLocationChanged() -

i hava database places , coordinates. want create fragment, hava list of places more 5 kilometrs me. code is: i start fragment next: case r.id.btn_near: if(isonline()){ ft = getsupportfragmentmanager().begintransaction().replace( r.id.content_frame, frg); ft.commit(); } else toast.maketext(this, "Подключите интернет", 1000).show(); break; fragmentnear.class public class fragmentnear extends fragment implements android.location.locationlistener { cursor c; view v; listview lvmore5; database db; protected locationmanager locationmanager; string lat; string provider; protected string latitude, longitude; protected boolean gps_enabled, network_enabled; double mylat, mylong; simplecursoradapter scadapter; string[] from; int[] to; @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { log.d("mylogs", "-----...

batch file - Windows Command dir /a/q/s > printout.txt -

i able run command dir /a/q/s getting information need. when run such dir /a/q/s > print.txt or dir /a/q/s > print.dat or dir /a/q/s > print.xlsx print out onto file not give me information. cuts off information. ideas? thanks.

ios - Simulate UIScrollView Deceleration -

i have uipangesturerecognize use change frame of view. there way simulate deceleration of uiscrollview or uitableview when gesture's state uigesturerecognizerstateended ? here current code: if (pangesture.state == uigesturerecognizerstateended) { [uiview animatewithduration:0.25 delay:0 options:uiviewanimationoptionbeginfromcurrentstate animations:^{ self.view.frame = cgrectmake(182, 0, self.view.frame.size.width, self.view.frame.size.height); } completion:^(bool finished) { if (finished) { //do } }]; } but not smooth scroll. decelerates until stops point i've set. thanks session 223 @ wwdc 2012, "enhancing user experience scroll views", covered method use scrollview's behavior , "feel" animate position of different view (without scrollview ever being visible user). the benefit of method shown in session deceleration match uis...