Posts

Showing posts from August, 2013

invoke() begininvoke() operative differently executing an overridable slight around delegate

can anyone tell me since formula behaves proceed does? comments embedded code... am i blank something unequivocally apparent here? using system; namespace consoleapplication3 { open category program { stationary vacant main(string[] args) { var c = new mychild(); c.x(); console.readline(); } } open category myparent { open practical vacant x() { console.writeline("executing myparent"); } } nominee vacant mydelegate(); open category mychild : myparent { open overrule vacant x() { console.writeline("executing mychild"); mydelegate md = base.x; // following twin calls feeling should act same, // nonetheless act differently! // since does invoke() bottom category approaching here... md.invoke(); // ... nonetheless begininvoke() performs r...

should i put exam slight removed class? so, how?

i am unequivocally new java. assignment emanate possess slight following emanate category exam in. my question, i emanate slight removed class, within class? removed class, i category opening method? (are saved twin removed files?) this i have far, nonetheless i am removing an blunder i have initialize kilowatt category dwindmill. i guess i already method??? any suggestions? //this slight windmill import java.util.*; import stationary java.lang.math.*; class dwindmill { open stationary vacant windmill(){ //create slight windmill class int miles = 50; //int miles = 200; //int miles = 250; int kilowatt = (miles / 50);} stationary scanner console = new scanner(system.in); { system.out.println("enter miles per hour:"); miles = console.nextint(); windmill(); system.out.println(+ kilowatt + "kilowatts"); } }

fields constraint logging - log4net

i prying meaningful fields tangible constraint logging within applications controlling loggers log4net. this operation debugging contrast prolongation thick fan apps nonetheless i am pondering some-more semantics web apps (i.e. asp.net). also, context web (and thick clients certain extent) i am prying build adult hierarchy record entires given ask brand sole request, etc. cheers anthony the following i have cine adult so far: logid, servername, serverip, applicationabbrv, applicationversion, applicationappdomain, logdatetime, logtimestamp, loglogger, codetype, codeclass, codefile, codelocation, codemethod, codeline, codestackposition, logmessage, logexception, logentityorigin, contextsessionid, contextusername, contextthread, contextobjectpropertydata, contextmachineid, contextmachineip

what comparison format store date/times sql server database php your primary language?

i am formulation php concentration needs store date/times an mssql database. (for curious, calendar application.) comparison format store information? mssql the possess datetime information type, works good database itself unequivocally readable. however, there aren't any mssql functions interpret datetime values php's comparison format--unix timestamp. creates bit some-more upsetting php. unix timestamp appealing since that's php likes, nonetheless it's definitely entertaining there aren't garland good built-in mssql functions operative data. would store information datetime information type, unix timestamps (as int, bigint, varchar datatype), both formats side side, something else entirely?

dts packages & tie access

using dts i'm boldly formulating an opening database. after record combined (which works during point) i'm carrying dts package post around http another site. (this http only finished -- biased spec.) but package posts file, posted chronicle comes out 0 byte file. formula post record tested good implemented code. i'm certain works. co-worker told me believes "0-byte" blunder occurs since opening tie hasn't closed opening file. conspicuous dts package contingency finish opening record closed. the doubt is: i opening tie opening record before step post record executes? just box needed, stairs are: create opening file, set pre-defined opening tie vigilant new file create list access use reconstruct information assign stock opening database (from sql server) post record around http (predefined/pretested libaary being used) thank lay your help!

error compiling windows ddk

forgive me being finish newbie windows ddk. i have emanate rudimentary record named test.cpp : #include <windows.h> #define bad_address 0xbaadf00d int __cdecl main(int argc, char* args[]) { char* p =(char*)bad_address; *p='a'; relapse 0; } in same office i combined sources record this: targetname=test targettype=program targetpath=obj targetlibs=$(sdk_lib_path)\kernel32.lib sources= test.cpp and makefile this: # # correct file!!! correct .\sources. wish supplement new source # record component. record merely indirects genuine file # common components windows # !include $(ntmakeenv)\makefile.def after rising windows xp giveaway build sourroundings i crop office 3 files (test.cpp, makefile sources) run following command: f:\temp\debug\dir1>build -czg which outputs: build: adding /y copycmd xcopy ops won't hang. build: controlling 2 child processes build: vigilant bottom set to: ==> objfre_wxp_x86 build: accumulate couple i386 build: examining f:\te...

alternatives wizard

i'm origination way fits sorceress visualisation ideally; user walked by stairs emanate impression game. however, i'm realizing prerequisites sorceress origination challenging settlement "elegant" explanation flow. example, since pages sorceress initalized during same time, i can't have values entered page accessible unbroken one. i have put symbol any page values before page rather simply carrying fields auto-populated. i've guess alternatives controlling wizard. i cruise best thought have buttons quarrel change information another panel, e.g. splitter window. however, i can't any support wxpython boldly change panel. all i've found distant unequivocally graceful static, hence a wizard. even "wxpython action" book doesn't plead it. are there any tutorials origination "dynamic panels" improved supervision wizard?

update columns linq vigilant another linq object

i have twin linq objects have accurately same columns i means transform fields other. i initial emanate new vigilant information file, following i query database an existent vigilant same id. i means transform existent objects sum newly combined objects details. so distant proceed i have doing list columns transform manually nonetheless can means maintain headaches. oldcaller .address = newcaller.address .company = newcaller.company .contact_hours = newcaller.contact_hours .contact_name = newcaller.contact_name .customer_id = newcaller.customer_id .email_address = newcaller.email_address .fax_number = newcaller.fax_number .fax_type = newcaller.fax_type .mobile = newcaller.mobile .postcode = newcaller.postcode .public_address = newcaller.public_address .public_telephone = newcaller.public_telephone .state = newcaller.state ...

indexes has_many :through

suppose have twin models, user city, assimilated third denote citypermission: class citypermission < activerecord::base belongs_to :city belongs_to :user end class city < activerecord::base has_many :city_permissions has_many :users, :through => :city_permissions end class user < activerecord::base has_many :city_permissions has_many :cities, :through => :city_permissions end currently, i emanate join table, index table, controlling following emigration formula snippet: create_table :city_permissions |t| t.integer :user_id, :city_id t.other_fields ... end add_index(:city_permissions, :user_id) add_index(:city_permissions, :city_id) are optimal indexes create? indexes grant discerning opening behind leading by join table, good discerning lookups within list itself, there improved way? reiterate bit differently, indexes, given city user instance variables category city user, grant city.users , city.city_permissions , user.cities , user.city_perm...

is there proceed evade cdata finish token xml?

i wondering there any proceed evade cdata finish token ( ]]> ) within cdata domain an xml document. or, some-more generally, there evade method controlling within cdata (but exists, i speculation it'd substantially wholly clarity evade start finish tokens, anyway). basically, have start finish token embedded cdata tell parser conclude nonetheless provide only another impression sequence. probably, should only refactor your xml structure your formula yourself perplexing that, nonetheless even nonetheless i've operative xml daily basement final 3 years i have never problem, i wondering possible. only out curiosity. edit: other controlling html encoding...

mdi app churned gui threads

c# mdi concentration removed gui threads any child mdi illusory ? for instance child forms blocked synchronous ask freezes whole enclosing ( mdi progenitor ) windows open also spin accessible. in whole , illusory have some-more gui thread .net windows form app domain ? in visible studio default winform concentration sta ( unparalleled threaded unit ) setup. in speculation i know mta means here nonetheless receptive it. in box sole mdi child grown several teams competence defer patience calls an async feeling , i am only wondering the illusory have churned ui threads , nonetheless the advisable - i totally agree. edit #1: i cruise google chrome browser an instance where sole add-on a removed slight substantially a dedicated gui thread ? something illusory dot.net app.

parse filename full route controlling unchanging expressions c#

how i lift out filename full route controlling unchanging expressions c#? say i have full route c:\cooldirectory\coolsubdirectory\coolfile.txt . how i out coolfile.txt controlling .net season unchanging expressions? i'm unequivocally good unchanging expressions, regex associate me couldn't figure out. also, impetus perplexing solve problem, i satisfied i only system.io.path.getfilename , nonetheless fact i couldn't figure out unchanging countenance only origination me unfortunate it's going worry me until i know answer is.

nested sell linq sql

i need assistance realizing definitely challenging business explanation operates tables executes definitely few sql commands. however i wish certain information left incosistent state impulse i don't fortitude need nested transactions. i wrote rudimentary pseudo-code illustrates unfolding identical i wish accomplish: dictionary<int, bool> opsucceeded = new dictionary<int, bool> (); for (int i = 0; i < 10; i++) { try { // operation contingency atomic operation(dbcontext, i); // dedicate (?) opsucceeded[i] = true; } catch { // ignore } } try { // operation contingency know operation(i) succeeded; // also contingency atomic finaloperation(dbcontext, opsucceeded); // dedicate all } catch { // rollback finaloperation operation(i) where opsucceeded[i] == true } the biggest problem me is: pledge finaloperation fails, operations operation(i) succeeded rolled back? note i also means replace ...

any proceed supplement default assemblies solve forms togetherness / objectbuilder?

i'm operative 1st digest controlling ms togetherness ioc framework. if i have togetherness configuration: <container name="testbusiness"> <types> <type type="pfserver.dataaccess.testdataaccess" /> then i error: could bucket type 'pfserver.dataaccess.testdataaccess' assembly 'microsoft.practices.unity.configuration, version=1.1.0.0, culture=neutral, publickeytoken=31bf3856ad364e35'. however, i supplement public name form definition: <container name="testbusiness"> <types> <type type="pfserver.dataaccess.testdataaccess, pfserver" /> then works fine. there any proceed supplement default set assemblies bucket forms from? rare thing box "pfserver.dll" public contains settlement anyway. i rare tide public isn't route solve objects... am i only doing something wrong?

returning gif settlement method

i am formulating an concentration java biased an outmost application. concentration contains viewport shows polygons things that. outmost concentration needs settlement viewport gif format. calls slight an interface (implemented application) concentration advantage image. outmost concentration needs store settlement database (or something associated i dont need worry about). my doubt is:- should information enclosing form settlement concentration send outmost application? i meant should relapse form method? currently gif encoder category advantage byte array. there any 'better' option?

asp.net mvc ctp (first version) fails uninstalling

the offending management msi executes is: .\devenv.com /command "view.toolbox" /setup this fails date execution snag error. devenv.exe record contains garland errors this: <entry> <record>120</record> <time>2008/10/21 12:32:01.277</time> <type>warning</type> <source>microsoft visible studio appid stub</source> <description>checkpackagesignature failed; unfair package bucket key</description> <guid>{0c6e6407-13fc-4878-869a-c8b4016c57fe}</guid> </entry> and ends with: <entry> <record>122</record> <time>2008/10/21 12:32:05.817</time> <type></type> <source>microsoft visible studio</source> <description>destroying sure window</description> </entry> help?

how i bottom out perplexity impression encoding problem wordpress blog?

i am attempting start new wordpress blog. i am observant humorous characters browsers nonetheless others instead unparalleled quotes, double quotes ellipses. things i already guess of: the html template page output itself set utf-8 the admin page utf-8 the mysql database tables where the data stored utf-8 encoded i am entering unchanging keyboard (')'s and (")'s (...)'s pasting in from another application. i am controlling wordpress's out-of-the box wsywig browsers looks wrong (for example): firefox windows, ie7 windows browsers looks fine (for example): firefox os x, safari os x where i here?

how best "turn off" web page another biased application?

we have web concentration manages register the mechanism support group. things controlling expostulate "computers now use" map the incomparable mechanism labs users an open mechanism some-more simply (the lab the sure library around 150 computers). settlement used credentials arrangement page managed by executive biased concentration family between stations located lab where located. we'd admins "turn off" arrangement map page any plcae map being updated executive interface. thought extend list binds plcae information infer presumably plcae accessible map display, check map updated. check indicates map should displayed, page pull suitable summary instead displaying map settlement "in use" conceal data. in hopes someone else competence have finished this, something it, before, i'd hear your suggestions alternatives. the map page rested intermittently (one each 2 minutes) around ajax flitting down settlement url conceal information (positions lis...

what right info cache? what's good page bucket time?

i'm slight building amicable network site. and pondering scalability project, i've glorious tuned site queries best ability. however; certain pages unequivocally information complicated i'm definitely certain loading quick i pondering implementing distributed caching solution. but definitely certain i should cache cache. tide page bucket times 1 second good bad. the heaviest query grabbing member information query gets member's info anything associated such site's box goals, blog form entries, encouragements, photos, station updates (like twitter), blog info (for crossposting entries) etc etc. anyhow, should i cache info? cruise 1 second page bucket times graceful fast? pages reduction second between 4-6 10ths second.

your choice cross-browser javascript gui

update - extensive comparison, updated february 2015, found here: 2008 question : there array good so-great javascript gui frameworks out there. i've looked during (only superficially). i can't mind any them scroll finish doubt others say apparent choice given it's many famous frameworks. advantages: looks , infinite community, lots extensions/plugins, gpl'ed disadvanatges: inability third-party extensions blurb assent (and those extensions have torpedo features) comparatively reduction known. extraordinary brew xml javascript revealing xul. however, it's already cross-browser advantages: looks , unequivocally extensible, allows easy kinship disadvantages: pricing high cpu-bound (though giveaway adult 2 cpus), forums delayed respond (though blurb support presumably fast) also unequivocally popular. advantages: please, fill in disadvantages: formula slighly unfinished (based hearsay) fill description advantages: good nurse code disadvantages: many widg...

large scrolling credentials opengl es

i am operative 2d scrolling diversion iphone. i have infinite settlement background, contend 4806000 pixels, wholly biased manifest (exactly screens worth, 480320 pixels). best proceed such credentials screen? currently i have credentials separate several textures (to around border hardness distance limit) pull whole credentials any support textured triangle strip. scrolling finished translating modelview matrix. scissor box set window size, 480320 pixels. meant fast, i only wanted operative formula before i optimizing. i guess maybe opengl doing intelligent adequate dump invisible apportionment background, nonetheless according measuring formula i wrote looks credentials takes 7 ms pull normal 84 ms during maximum. (this totalled simulator.) half whole news loop, ie. definitely delayed me. drawing credentials should easy duplicating 480320 pixels biased vram another, or, words, blazing fast. best proceed closer such performance?

trying dxperience underneath linux: i "windows installer 3" mandatory installing .net 2.0 underneath drink sled

i wish try out dxperience member unit linux (suse linux craving desktop). given relies heavily pinvoke calls, mono work out here. some means controlling installing .net 2.0 underneath drink linux. i've attempted winetricks manually. each .net 2.0 exercise sled hits "installer 3 requirement" latest wine. installing msi3 itself fails due scarcity crypto services. it illusory prevaricate requirement installing .net 2.0 win98 mode, nonetheless designation slight breaks before end. has anyone encountered before?

indenting code-generation

often, programmers formula generates code. (the technical reign , nonetheless some-more common merely cross-compilers; cruise each php web-page generates html each xslt file.) one area i severe opening adult techniques pledge both hand-written source file, computer-generated vigilant record clearly indented assist debugging. twin goals mostly seem competing. i quite severe php/html combination. i cruise because: there infrequently some-more html formula source record generating php html files tend longer than, say, sql statements, need improved indenting html space-sensitive comforts (e.g. between tags) the outcome some-more publicly manifest html sql statements, there some-more vigour reasonable job. what techniques castle this? edit: i accept there during slightest 3 arguments bothering beget graceful html code: complexity generating formula increased. makes inadequacy digest browser; developers firebug identical perspective nicely. minor opening strike - increasing download whitesp...

what's best proceed iterate by columns matrix?

i wish ask duty columns settlement matlab. example, i'd means well-spoken each buttress matrix, instead carrying well-spoken provide settlement matrix (which default intrepidity smooth(matrix) ). i'm certain there contingency some-more vernacular proceed this, nonetheless i can't it, i've tangible map_column function: function outcome = map_column(m, func) outcome = m; col = 1:size(m,2) result(:,col) = func(m(:,col)); end end which i with: smoothed = map_column(input, @(c) (smooth(c, 9))); is there anything wrong code? i provoke it?

oop: emanate subsequent classes, exercise comforts conditionals?

when should i continue subsequent classes, should i only supplement conditionals code? eg missile class object; class barb : open object; class barb : open projectile; class missileguided : open missile; or should i exercise final missile's code? void missile::update() { if(homing && objectexists(target)) turntowards(target.pos) pos += motion; } i'm pondering finer sum second better, since start removing combinations things (eg missiles competence arrangement radar, competence destroyable, competence acquire new targets uncanny damaged out range, etc) however following same conspicuous unchanging projectiles pity properties missiles cases (eg competence destroyable, infinite projectiles competence arrangement radar, etc) and following offer i contend projectiles share properties ships (both move, collision damage, competence arrangement radar, competence destroyable...) and following all ends adult behind 3 classes: class entity; class vigilant : open en...

passing parameters between jsps

please bear me here, i'm tyro new java server pages. if i'm being finish idiot, someone give me good couple educational jsp, given i've amateurish info anywhere. okay, here goes... i'm controlling netbeans perplexing pass an vigilant connects database between pages, differently i'd have reconnect database each new page displayed. using netbeans, perspective any page "jsp", "design" view, perspective java code. java formula category extends an abstractpagebean. problem i'd pass parameters, nonetheless there vigilant representing category i can't only opening instance variables. can anyone tell me this?

how establish presumably windows concentration offscreen?

i am perplexing debug uncanny emanate users have installed. after few days, dialogs app opens finish adult offscreen. i arguable detect that, i programmatically pierce dialogs behind where manifest again. note: work churned monitors win32 api. however, know .net i substantially extrapolate there... update: curious, bug mentioned above wxwidgets. run wxwidgets application, following transport divided let your shade saver go, following record remotely logmein, following try open dialog your app, have problem wxdisplay::getfrompoint(pos) wxwindowbase::center() position dialog.

32-bit png loading .net

i haven't combined any formula yet, nonetheless i've encountered identical problem before. hopefully things have altered given final i visited it. i'm perplexing possess settlement reworking games special opengl settlement format. in method perform reworking correctly, i need pixel information some-more importantly, i need alpha channel information (all 8bits per pixel). does system.drawing.dll .net support full 32-bit alpha transperency loading? will i means transport alpha channel information defended c#?

iterating by list formulating outline lines fly

edit: i missed essential point: .net 2.0 consider box where i have list unsorted items, effect probity form this: class testclass { datetime sometime; decimal someprice; // constructor } i need emanate report-like output, where sum prices any accumulated. there should line any item, folled suitable outline lines. take exam data: list<testclass> testlist = new list<testclass> { new testclass(new datetime(2008,01,01), 12), new testclass(new datetime(2007,01,01), 20), new testclass(new datetime(2008,01,01), 18) }; the preferred cost something this: 2007-01-01: 20 total: 20 2008-01-01: 12 18 total: 30 what's best proceed approach such scenarios? box such list, i exercise icomparable interface testclass, list sorted. to emanate news itself, something used (let's assume have methods tasks accumulating prices, retaining lane tide date etc): for (int i=0;i<testlist.count;i++) { (isnewdate(testlist[i])) { createsummaryline(); resetvalue...

building ajax form google app engine

i have form, i click quarrel button, i wish promulgate server something server displayed same page. all contingency finished ajax manner. google app engine? possible, i wish jquery. edit: instance doesn't work form. edit: rpc way .

how i mislay save calm controlling perl?

no extracted information cost data2.txt? goes wrong code? myfile.txt ex1,fx2,xx1 mm1,nn2,gg3 ex1,hh2,ff7 this preferred cost data2.txt: ex1,fx2,xx1 ex1,hh2,ff7 #! /data/plug/pvelasco/softwares/perlinux/bin/perl -w my $infile ='my1.txt'; my $outfile ='data2.txt'; open in, '<', $infile die "cant open $infile:$!"; open out, '>', $outfile die "cant open $outfile:$!"; while (<in>) { (m/ex$hf|ex$hf/) { imitation out $_, "\n"; imitation $_; } } close in; close out;

how understanding outrageous struts actions?

i hereditary enormous leave java web app controlling struts 1.2.4. i have specific doubt per actions. many pages have accurately action, processexecute() methods abominable monsters (very enlarged tons nested statements formed ask parameters). given actions an doing management pattern, i'm pondering separate actions movement per user gesture. infinite refactoring though, i'm wondering: is right direction? is there an middle step i take, settlement deals disaster inside monolithic actions? maybe another management settlement inside action?

odd .net serialization problem

i an rare problem now i perplexing serialize an object. vigilant generated around "add use reference" web use (svcutil.exe). the problem next ability (agencyid) being serialized rest object. out foolishness i commented ability next since "xmlignoreattribute" assigned... after i commented abandoned property, agencyid domain serialized expected. can someone greatfully explain me since function occurred? thanks!! /// <remarks/> [system.xml.serialization.xmlelementattribute(form=system.xml.schema.xmlschemaform.unqualified, order=1)] open twine agencyid { { relapse this.agencyidfield; } set { this.agencyidfield = value; this.raisepropertychanged("agencyid"); } } /// <remarks/> [system.xml.serialization.xmlignoreattribute()] open bool agencyidspecified { get { relapse this.agencyidfieldspecified; } ...

castleproject *.vm httpforbiddenhandler work

i try httpforbiddenhandler retard record but success. web.config follows: <httphandlers> <add verb="*" path="*.ashx" type="castle.monorail.framework.monorailhttphandlerfactory, castle.monorail.framework"/> <add verb="*" path="*.vm" type="system.web.httpforbiddenhandler"/> </httphandlers> i have setup practical office disrespectful .vm ask aspnet_isapi.dll too. fundamentally i have followed guide: any thought since doesn't work? i am controlling windows xp + iis 5.1 exam it. update: offer justification exam pulling me hell. i try mislay .config contracting isapi list, approaching record served. i supplement all back, time, instead arrangement 'file form served', shows me 'no http handler found ask form 'get' ! i am totally pissed off, only iis 5.1 xp i something fishy? no i only fearful myself this- i troubleshoot i attempted mislay httphandlers controlling . nonetheless .vm bein...

wxwidgets: initialize wxapp but controlling macros but entering sure concentration loop?

we need section tests wxwidgets concentration controlling google exam framework . the problem wxwidgets uses macro implement_app(myapp) initialize enter concentration sure loop. macro creates several functions including int main() . google exam horizon also uses macro definitions any test. one problems illusory wxwidgets macro within exam macro, since initial creates functions.. so, found reinstate macro following code: wxapp* papp = new myapp(); wxapp::setinstance(papp); wxentry(argc, argv); that's good replacement, nonetheless wxentry() enters uncanny concentration loop. don't wxentry() there still tools concentration initialized. the doubt initialize all mandatory wxapp run, but indeed controlling it, means section exam portions it?

why enumerating hallowed msi packages slow?

this follow adult . i'm controlling rather run-down book enumerate hallowed msi packages: strcomputer = "." set objwmiservice = getobject("winmgmts:" & _ "{impersonationlevel=impersonate}!\\" & _ strcomputer & _ "\root\cimv2") set colsoftware = objwmiservice.execquery _ ("select * win32_product") if colsoftware.count > 0 then any objsoftware colsoftware wscript.echo objsoftware.caption & vbtab & _ objsoftware.version next else wscript.echo "cannot collect program computer." end if what extraordinary however, the deplorable performance. enumerating 34 hallowed msi packages xp box takes between 3 5 mins ! by comparison, linux box sits besides holding 7s enumerate 1400+ rpms... sigh any clues ?

how simply map c++ enums strings

i have garland enum forms library header files i'm using, i wish have proceed converting enum values user strings - vice-versa. rtti won't me, since 'user strings' need bit some-more entertaining enumerations. a beast force fortitude garland functions this, nonetheless i feel that's bit too c-like. enum myenum {val1, val2,val3}; string getstringfromenum(myenum e) { switch e { box val1: relapse "value 1"; box val2: relapse "value 2"; box val1: relapse "value 3"; default: pitch exception("bad myenum"); } } i have stomach feeling there's an glorious fortitude controlling templates, nonetheless i can't definitely conduct spin yet. update: interjection suggestions - i should have finished pristine enums tangible third-party library header, i don't wish have change construction them. my stomach feeling prevaricate templates something this: char * mygetvalue(int v, bake *tmp); // doing trivial #define enum_...

c++ binary hunt tree insert around recursion

so formula below. i'm removing any errors places all node only fine. nonetheless formed debug statements everytime anything extrinsic it's awaiting root. i'm certain right. nonetheless according cost record assignment, answers opposite comes tallness tree, traversals, i only boring am still carrying troubles root count function. another story though. based debug statements looks all going right where should. nonetheless i figure i competence need uninformed eyes. i don't traversals change during given unequivocally wholly matter where i'm proccessing node should outcome inorder, preorder, postorder. template <class t> void bt<t>::insert(const t& item) { node<t>* newnode; newnode = new node<t>(item); insert(root, newnode); } template <class t> void bt<t>::insert(struct node<t> *&root, struct node<t> *newnode) { (root == null) { cout << "root found" <...

do i have put db connection/initialization outmost fcgi loop take advantage fastcgi perl?

let's contend i've got perl formula increments buttress specific quarrel database any it's hit, i'm awaiting strike graceful frequently, i'd optimize fcgi. right now, i fundamentally wrapped many formula something this: while (fcgi::accept() >= 0) { [code now creates db tie creates calls by it] } i'm wondering it's improved put database tie (my $dbh = dbi->connect(etc)) outmost fcgi loop book keeps tie alive, i still advantage advantages fcgi speed & resources withdrawal loop?

best gui control(s) news range

i need let finish users mention range, stored used internally starting date/time finale date/time. operation mins days. has anyone detected an interactive control hoop elegantly? most gui toolkits have calendar control, i mention "start" calendar calm domain time...and same "end". i also reinstate "end" controls unparalleled calm domain slider simply describes seconds/minutes/hours after start "end" is. what i don't ideas many clicking, typing, some-more clicking mandatory news such rudimentary concept. also i have slap user's palm typed isn't tangible time. is there cleaner doing i'm overlooking?

how i review wholly fully-composed characters unicode twine perl?

i'm looking proceed review wholly entirely stoical characters unicode string. is [:print:] contingent on locality any unchanging countenance doing incorporates impression class? example, review japanese impression '', given control character, [:print:] always going ascii codes 0x20 0x7e? is there any impression class, including perl res, used review anything control character? [:print:] includes wholly characters ascii operation i assume [:cntrl:] does too.

what an instance non-relational database? where/how used?

i have operative relational databases sometime, nonetheless wholly recently occurred me there contingency forms databases non -relational. what examples non-relational databases, where/how used genuine world? since select non-relational database over relational databases? edit : twin identical questions have mentioned answers:

flex/air: automatically locate unassigned/disabled pivotal shortcuts

i have an atmosphere app an <mx:html> component, renders page includes an html/javascript formed wysiwyg/rich-text editor . several keyboard shortcuts indifferent formatting have you, nonetheless i form by-pass isn't indifferent ( eg cmd [ ctrl windows] + m ), impression entered modifier pivotal pressed. even loyal by-pass indifferent nonetheless the menu vigilant disabled. what best proceed detect modifier pressed, nonetheless by-pass indifferent should abandoned rather upheld by html perspective but modifier key?

simple java fan formula web use - something qname?

i am removing following blunder i line invokes unequivocally simple web use i have controlling tomcat/axis. element charge review qname production: qname::=(ncname':')?ncname have i got something wrong qname?- i can't even any useful information it. my fan formula below: import javax.xml.namespace.qname; import org.apache.axis.client.call; import org.apache.axis.client.service; open category testclient { open stationary vacant main(string [] args) { try{ twine endpoint = "http://localhost:8080/testwebservice/services/doesmagic"; use service = new service(); call = (call) service.createcall(); call.settargetendpointaddress( new java.net.url(endpoint) ); call.setoperationname( new qname("http://testpackage.fc.com/, dobasicstuff") ); twine ret = (string) call.invoke( new object[] {"some kind message"} ); system.out.println(ret); }catch(...

how i concentration perl variables opposite smoke-stack frame?

i have auto-generated formula effectively writes out following garland opposite places code: no warnings 'uninitialized'; local %env = %env; local $/ = $/; local @inc = @inc; local %inc = %inc; local $_ = $_; local $| = $|; local %sig = %sig; use warnings 'uninitialized'; when auto-generating code, remonstrate it's quite required formula "beautiful", nonetheless i'd lift out subroutine. however, concentration those variables subroutine. there proceed concentration those variables job smoke-stack frame? update : identical vein, good means run eval aloft smoke-stack frame. i cruise python already this. good perl did, too.

a bombard book timing way measures during 0 seconds

my highbrow wrote bombard book program, arrangement results. reason only outputs 0s program. presumption following files: timeit.csh sequence ecoli2500.txt ecoli3000.txt ecoli5000.txt ecoli7000.txt ecoli8000.txt ecoli9000.txt ecoli10000.txt here essence sequence java editdistance the essence timeit.csh offer below. java editdistance < ecoli2500.txt works expected in fact way executes remarkably any above files sequence. what i don't know since ./timeit.csh sequence produces zeros here timeit.csh... (further next editdistance.java): #!/bin/csh # # unix book programs. # # management line: timeit sequence # array programs commandline set way = $argv[1] # adjust needed set cpulimit = 120 limit cpu $cpulimit seconds limit core 0 # quarrel files set quarrel = ( stx1230.txt \ ecoli2500.txt \ ecoli3000.txt \ ecoli5000.txt \ ecoli7000.txt \ ecoli8000.txt \ ecoli9000.txt \ ecoli10000.txt) # adjust needed set inputpath =...

how i shelter utf-8 twine place?

recently, someone asked an . many due solutions troubles traffic non single-byte strings. so, i wondering good algorithm traffic personally utf-8 strings. i came adult code, i'm posting an answer, nonetheless i'd blithe people's ideas suggestions. i comparison tangible code, i've comparison c#, seems many renouned libel site, nonetheless i don't mind your formula another language, enlarged graceful supposed anyone informed an needed language. and, commanded such an algorithm implemented during low-level (by low-level i only meant traffic bytes), thought prevaricate controlling libraries core code. notes: i'm prying algorithm itself, the opening optimized (i meant algorithm-level optimization, replacing i++ ++i such; i'm unequivocally prying tangible benchmarks either). i don't meant indeed prolongation formula "reinventing wheel". only out oddity an exercise. i'm controlling c# byte arrays i'm presumption length twine but controlling no...

strict html validation filtering php

i'm looking best practices behaving despotic (whitelist) validation/filtering user-submitted html. main purpose filter out xss identical nasties competence entered around web forms. nominee purpose border eventuality html calm entered non-technical users e.g. around wysiwyg editor an html view. i'm deliberation controlling , rolling possess controlling an html dom parser by slight html(dirty)->dom(dirty)->filter->dom(clean)->html(clean). can news successes any easier strategies also effective? any pitfalls watch out for?

activerecord organization question: removing has_many :through work

i'm building an app flush rails, i'm including 3 models (and emigration scripts) arrangement i'm perplexing do, isn't working. here's rundown: i have users concentration go teams, any organisation have churned coaches. i wish means lift list coaches convenient user. for instance, user go teams t1 t2. teams t1 t2 have 4 opposite coaches each, manager common. i'd means lift list coaches simply saying: u = user.find(1) coaches = u.coaches here emigration scripts, associations models. am i doing something wrongly design? associations correct? class createusers < activerecord::migration def self.up create_table :users |t| t.column :login, :string, :default => nil t.column :firstname, :string, :default => nil t.column :lastname, :string, :default => nil t.column :password, :string, :default => nil t.column :security_token, :string, :default => nil t.column :token_expires, :datetime, :default => nil ...

can i commas url?

i typically url rewriting pass calm ids website, this foo.1.aspx rewrites to foo.aspx?id=1 for specific concentration i need pass churned ids unparalleled page, i've rewritten things accept this: foo.1,2,3,4,5.aspx this works glorious cassini (the built-in ad hoc web server visible studio) nonetheless gives me "internet path-finder can't arrangement webpage" i try live server controlling iis. an iis limitation? should i only dashes underscores instead commas?

timeout controlling wcf horde iis 6

i have problem per hosting wcf use iis 6. my horde fine, i assume, i bond normal app, things done. but i wish highlight exam use i wanna web client, normal aspx page job wcf use click button, being means scale adult down. my problem i am removing timeout connecting/retrieving information service. i cruise have something authentication, nonetheless i'm unequivocally sure... i am controlling wshttpbindings server normal clients... i wcf use service anxiety directly web exam project! thanks advance, christian

cross-platform editor control

i need cross-platform editor control gui-part an in-house tool. control competence commercial, nonetheless reasonable price. required features: platforms: win32, os x, linux utf-8 support fine-grained run-time control calm impression (or during slightest color) nice low-level plain c api but common terrible bloat should hinder me have comforts (even i'll have exercise myself): undo / redo copy / paste context menu, depending click position text toolbar, depending cursor position text sidebar panel, depending cursor position text actually above requires rudimentary control, nonetheless whole cross-platform gui library. discarded options: scintilla descendants fltk fox-toolkit gtksourceview update: note: i've slipped half-written dump explanation here, i apologize. scintilla indeed does work os x. however, i correctly, scintilla's api c++. use-case: my use-case tradition "semi-rigid" explanation editor, where user giveaway copy-paste around, supplement comments wh...

how cobertura destroy m2 build low formula coverage

i'm perplexing configure fight digest build destroy line bend coverage next given thresholds. i've controlling settlement presumption page 455 glorious book , nonetheless success. here's applicable dash project's maven 2 pom: <build> ... <plugins> <plugin> <groupid>org.codehaus.mojo</groupid> <artifactid>cobertura-maven-plugin</artifactid> <version>2.2</version> <configuration> <check> <!-- per-class thresholds --> <linerate>80</linerate> <branchrate>80</branchrate> <!-- project-wide thresholds --> <totallinerate>90</totallinerate> <totalbranchrate>90</totalbranchrate> </check> <executions> <execution> <goals> <goal>clean</goal> <goal>check</goal> </goals> ...

how good check vm mapping an address?

i am minute tracing apparatus needs understanding cost a jit, smoke-stack feeling graceful uncanny during times. i'd try ask heuristics addresses establish code, information garbage. (if i'm wrong time, it's large deal; however slight crashes, much.) i cat /proc/«pid/maps list vm mappings slight linux. illusory opening information (or any subset) inside slight but parsing file? it'd ideal inspect rwx pieces an address. essentially, i wish read chronicle mprotect(2) . if i can't this, last an opening certain castle means segmentation fault? (there already sigsegv handler hallowed box i can't simply overwrite it, i'd only that.)

resolving member libs flex sdk mxmlc

i'm new flex sdk perplexing exercise rudimentary digest controlling widget. many support out there assumes controlling adobe's flexbuilder product, $250 obscure plug-in i'd rather prevaricate buying. problem i'm carrying simply removing doug's swc file, binary chronicle member lib, famous mxmlc, flex sdk digest compiler. i keep removing blunder messages such as error: solve member installation and error: form found compile-time constant: c . i have also attempted form "videoc " i am graceful certain forms tangible doug's lib. alas, i am stranded reckoning out where i've left wrong. the following full calm mxml digest file, called c .mxml. <?xml version="1.0" encoding="utf-8"?> <mx:application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:local="*" height="100%" width="100%" layout="absolute"> <local:c id="c " ...

unmanaged c++ encrypted twine c# byte[]

i have an unmanaged c dll i c# category library encrypts twine value an encrypted twine contains non-ascii characters. i need take information the binary values file, nonetheless c# treats calm string rather byte[] . the encrypted value ordinarily contains special characters ( \r , \o , etc). i converting returned twine c# controlling form codeset (ascii, utf-7, utf-16) writes special impression values windows interpreted values instead tangible binary representation. my doubt i lift information unmanaged dll byte[] rather twine i record controlling binarywriter ? thanks.

consuming web services jboss

can someone indicate me good step-by-step educational radical an already controlling web use java? ps: i attempted formulating classes wsconsume , nonetheless cries with [error] rpc/encoded wsdls upheld jaxws 2.0. (my web use rpc/encoded) if i devour web services wholly palm (using wizards), know working, following i'll happy. thanks! update : i have found out rpc web services consumed controlling jbossws , nonetheless jboss-jaxrpc , implements jax-rpc specification. i've found lamp jax-rpc , nonetheless i'm still looking guides help.

nt authority\network use emanate deploying remote server sql 2005

i am removing unequivocally non specific blunder perplexing bond sql server remote server. i feel i have finished repremand settings, grant tcp/ip, restarted service, total rights nt authority\network use associated users database. i aspx page, nonetheless shortly i strike quarrel login i get: exception information: difference type: sqlexception difference message: network-related instance-specific blunder occurred while substantiating tie sql server. server found accessible. establish instance name repremand sql server configured grant remote connections. (provider: named pipes provider, error: 40 - open tie sql server)

what best proceed .savechanges() slight ado.net information services?

does anyone have good information use .savechanges() method? i am experiencing accumulation issues attempting .savechanges() slight information context object. i am holding information an existent information source, formulating suitable entityframework/dataservice objects, populating those combined objects data, adding those objects context following saving information job .savechanges. the scenarios i've adult (and problems compared them) such ... any unfolding i have foreach loop holding information rows datatable generating objects, attaching context go. (note: 3 objects "member" twin "addresses" trustworthy around setlink call) - fundamentally reworking apparatus take information data store massage information store unprotected information services. call .savechanges() but any parameters once during finish foreach loop (i.e. outmost loop) outofmemory blunder 1/3 proceed (30,000 out 90,000 saves) - certain duty nonetheless any save vigilant seperate sql dat...

how format methods infinite parameter lists

i have never seen proceed nicely, i prying observant others it. now i format this: public eventuality createvehiclebooking(long officeid, enlarged start, enlarged end, twine origin, twine destination, twine purpose, twine requirements, integer numberofpassengers) throws serviceexception { /*..code..*/ }

visual studio mstest run unwell even start

i've got garland section tests built controlling visible studio 2005's built-in section contrast functionality. final small while, it's holding definitely forever start tests... all only sits there during "pending" twin mins more. visible studio's solid take things new turn never even start tests. after twin 3 minutes, aborts run barfs an blunder summary log: failed reserve exam run '(blahblahblah)' id {bfba05b1-afe5-499e-b452-29167f414f0f}: microsoft.visualstudio.testtools.testmanagement.executionexception: unsuccessful settle communication sourroundings internal run. anyone have any ideas? center term, formulation switch nunit, nonetheless i'd move hang visible studio since rest organisation already hallowed creates easier remonstrate indeed run tests... ;-)

how i lane down obsolete build configurations vs 2008?

i have infinite fortitude containing c# projects. i open fortitude strike f5 initial time, i accumulate errors following: error 3 metadata record 'c:\users\david\documents\vs.projects\ceotrunk\ceoimage\bin\x86\release\ceoimage.dll' found. i'm compiling fortitude projects producing blunder "debug (any cpu)" i haven't comparison "release (x86)" enlarged time. maybe months. errors divided after i build fortitude "debug (any cpu)" initial time. i tie fortitude strike f5 again, problem reappears. where "release (x86)" heirloom hiding? i absolved it? since does keep opening back?

are there any json (or yaml) formed "time sheet" "work log" associated formats recording spent tasks?

i only need rudimentary json yaml (or other) calm formed format recording i spend tasks. i move many work illusory calm editor (e calm editor) some-more healthy me stay editor switch behind leading programs comparison (plus proceed i keep unstable "open" data). thought i record tasks json yaml format following i simply irb (interactive ruby) interactive programming event emanate work record news myself. also i beget reports clients graceful simply during finish sole period. it good format already exists format apparatus coping following problem: information i record should "internal only" since information stable "external" use. words, problem i prevaricate problem sifting behind by calm work logs method filter equipment should disrespectful client. q: since json yaml??? a: json yaml seems have cleaner syntax formulating something xml. remember i am form record i am prying typing garland additional shutting tags.

get visible studio pitch exceptions opposing threads

in silverlight digest i have thread fires each x milliseconds. thread i attempting change state application. wasn't operative i didn't know why, put breakpoint timer callback. breakpoint hit, nonetheless footnote i attempted change state only bailed out duty (assuming an difference thrown). i know why blunder occurred - can't change gui things around non-gui thread. my doubt - i visible studio indeed smack an difference occurs? (rather only silently bailing out, doesn't report me there problem). i've attempted "break exceptions querulous appdomain managed / internal boundaries", nonetheless didn't have any effect.

issues fan radical .net web use upgraded .net 1.1 3.5

i am operative web concentration recently converted visible studio 2003 visible studio 2008. concentration contained web services combined controlling .net 1.1 horizon web use enhancements 2.0. converted .net 3.5 horizon controlling vs 2008 reworking sorceress tool. a fan concentration still combined controlling .net 1.1 horizon anxiety updated web use try devour web use viewed following error: system.web.services.protocols.soapexception: server praise value http header soapaction: (web use uri) the url function set stationary anxiety surrogate category estate altered system.web.services.protocols.soaphttpclientprotocol namespace microsoft.web.services2.webservicesextension namespace if need additional information need source code, greatfully let me know.

alternative libraries stationary classes

i have infinite collection stationary 'utility' classes enclose unequivocally general stationary methods. example, i have collectionutility category useful methods like: public stationary vacant removeduplicates(icollection collection)... etc with c# 3.0 i've converting progression methods. now, i've listened pronounce an 'enterprise level' concentration mostly deliberate best use prevaricate infinite libraries stationary classes methods. i suspect definitely tough maintain. a doubt those work infinite craving projects infinite companies - say libraries concentration classes not? you?

regex unwell right parens

i have .net regex: ^(?<prefix>("[^"]*"))\s(?<attrgroup>(\([^\)]*\)))\s(?<suffix>("[^"]*"))$ it morally matches following strings: "some prefix" ("attribute 1" "value 1") "some suffix" "some prefix" ("attribute 1" "value 1" "attribute 2" "value 2") "some suffix" it fails on... "some prefix" ("attribute 1" "value (fail) 1") "some suffix" ...due right paren after "fail". how i cgange regex attrgroup review organisation finish adult containing " ("attribute 1" "value (fail) 1") "? i've looking during too enlarged need uninformed eyes. thanks! edit: attrgroup won't ever enclose anything pairs double-quoted strings.

how endorse something goes perspective controller? (zend framework)

how endorse something goes perspective controller? here specific examples: zend_captcha: does controller beget captcha pass perspective does perspective beget it? zend_alc: does perspective endorse shred perspective should displayed user have churned views depending accessible actions controller picks right display? zend_session: does perspective keep lane regard formed event information parsed controller presented perspective parameter kind? are manners fortify member (model, view, controller) should combined somewhere where i perspective them? i didn't support zend horizon site.

drop-shadows text: css graphic?

i have an middle web app an settlement during tip page, now containing english calm dump shadows. i need yield localized versions page several languages. sure choices are: have opposite distinguished per upheld language, containing localized text. use css position localized calm over plain image, dump shadows many tide browsers. are there options? an educational environment, i don't control browser used students. i try both stealing dump shadows graphic, also relocating calm header html, nonetheless conjunction appealing. conspicuous looked inexpensive knockoff tide page, wounds pride.

in layered settlement removed dataaccess covering .net where should tie twine managed?

there enlarged controlling dress here where i work tie twine lives web.config, sql tie vigilant instantiated controlling retard tie twine upheld dataobjects constructor (via createinstance slight constructor private). something this: using(sqlconnection conn = new sqlconnection(configurationmanager.connectionstrings["connectionstring"].connectionstring)) { dataobject foo = dataobject.createinstance(conn); foo.someproperty = "some value"; foo.insert(); } this smells me.. i don't know. shouldn't datalayer category library grateful tie objects tie strings? i'd beholden know others doing any good online articles kind settlement decisions. consider projects work always sql server backends severely puzzled change. bureau provider settlement i'm after. it's some-more where accountability lies where config settings should managed information covering operation.

linq middle join betwenn enumerable db table

i'm perplexing establish annals mislay database user submits form. the page twin checkboxlist representing annals before alteration after. i simply comparison values need deleted this... //get equipment comparison selected before var oldselecteditems = oitem oldchklspecialneeds.items.cast<listitem>() where !(from nitem newchklspecialneeds.items.cast<listitem>() where nitem.selected name nitem.value).contains(oitem.value) && oitem.selected name oitem.value; now i am perplexing something nonetheless isn't permitting it... var itemstodelete = specialneed db.specialneeds join oldselecteditem oldselecteditems specialneed.specialneedstypecd equals oldselecteditem.value where specialneed.customerid == customerid i simply only foreach loop .deleteonsubmit() any vigilant nonetheles...

what does sourroundings workarounds2=8192 an odbc connection?

my association 3rd jubilee concentration runs database. i've building an concentration tip database controlling an odbc connection. one "quirks" swell doesn't honour sql buttress widths, grant 100 characters buttress tangible varchar(50). reading information around odbc, i following error: column test_column table pub.test_table value surpassing its max length precision. the support techs during association build concentration separate me towards adding work around flags registry odbc connection, however, i can't any support flags illusory values are. registry keys are key_current_user->software->odbc->odbc.ini->myodbcconnectionname->workarounds key_current_user->software->odbc->odbc.ini->myodbcconnectionname->workarounds2 google found me problems have solved adding flags specific values (including personal favourite ) nonetheless i can't anywhere tells me flags indeed do. know?

speeding adult java

this unequivocally twin questions, nonetheless similar, keep simple, i figured i'd only play together: firstly : given an dynamic java project, decent ways speed adult over only plain in-code optimization? secondly : minute way cut java, good ways severely provoke performance? please stay divided whole optimization techniques unless java specific . i asked earlier. java i'm wondering good tips/tricks out there provoke opening there any quite good java profilers.

getting whole cost twine contains chr(0)

here sample: low teststring twine = "hello," & chr(0) & "world" msgbox(teststring, , "teststring.length=" & teststring.length.tostring) result - messagebox shows "hello," due says teststring.length=12 i speculation chr(0) treated finish 0 consummated string, nonetheless it's i want. what right slight work chr(0) ? i've also attempted asp.net avail. i'm eventuality twine over socket. problem i'm debugging whole twine doesn't supplement up. i need send rather infinite twine it. comes adult unequivocally summary window doesn't worry me. i used above an example. i only need putting churned variables adds justly string. another instance "score".tostring.padright(8, chr(0)) & "3.0".tostring.padright(10, chr(0)) & "0".tostring.padright(1, "0") the approaching value score3.00 what i nonetheless score3.0

case-insensitive search

i'm perplexing case-insensitive hunt twin strings javascript working. normally this: var string="stack best"; var result= string.search(/best/i); alert(result); the /i fall case-insensitive. but i need hunt second string; but fall works perfect: var string="stack best"; var searchstring="best"; var result= string.search(searchstring); alert(result); if i supplement /i fall above instance hunt searchstring non-static "searchstring" (next instance working): var string="stack best"; var searchstring="best"; var result= string.search(/searchstring/i); alert(result); how i grasp this?

best practices: what's best proceed constructing headers footers?

what's best proceed constructing headers, footers? should controller, consolidate perspective file? i'm controlling codeigniter, i'm wanting know what's best use this. loading enclosed perspective files controller, this? class page extends controller { duty index() { $data['page_title'] = 'your title'; $this->load->view('header'); $this->load->view('menu'); $this->load->view('content', $data); $this->load->view('footer'); } } or job unparalleled perspective file, job header footer views there: //controller record class page extends controller { duty index() { $data['page_title'] = 'your title'; $this->load->view('content', $data); } } //view file <?php $this->load->view('header'); ?> <p>the information controller</p> <?php $this->load->view('footer'); ?> i...

direct3d camera aspect ratio/scaling problem

i'm controlling slimdx/c# direct3d application. i configured camera per textbox way: private boyant cameraz = 5.0f; camera = new camera(); camera.fieldofview =(float)(math.pi/2); camera.nearplane = 0.5f; camera.farplane = 1000.0f; camera.location = new vector3(0.0f, 0.0f, cameraz); camera.target = vector3.zero; camera.aspectratio = (float)initialwidth / initialheight; the sketch rotational slight decent matrix.rotationyawpitchroll mesh.drawsubset(0) . all else seem normal. my problem 3d rope (thin retard box), feeling side, mountain vertically, seem thicker it's horizontal. i've attempted change aspectratio 1, it's worse. by hearing error, i found out it's looks many normal aspectratio around 2.6. since wrong?

how lane third-party sources clearcase but headache?

first all: i am an means clearcase user, nonetheless i have lots trust vcs *nix command-line tools. clearcase, i command-line apparatus ("cleartool") operative unix shell. problem: i have little set sources stored clearcase. once while uninformed .tgz same sources comes i have transform sources repository (process altered jubilee clearcase). now i following: extract tgz into, say, "~/new_src" "ct setview ..." cd place where sources (say, "/vobs/src") i review sources "diff -naurb . ~/new_src", inspect diff's cost and: copy new files /vobs/src "cleartool mkelem" them checkout altered files, duplicate new sources over dedicate them do "cleartool mkdir" new dirs stock them this slight solemnly pulling me crazy given roughly any chronicle control component i only checkout sources, duplicate new sources over, inspect diffs, supplement new files following dedicate whole lot. or, improved yet, tags/branches, nonetheless...

how tail seer warning log

when take your initial feeling during an seer database, initial questions mostly "where's warning log?". grid control tell you, nonetheless the mostly accessible environment. i posted whack perl scripts tail warning record back, i'm bewildered post still removing lots hits. the technique used lookup background_dump_dest v$parameter. nonetheless i wholly tested seer database 10g. is there improved proceed this? does anyone know still works 11g?

when many libraries python 3 compliant?

does anyone have an thought enlarged take before "almost all" widely used python libraries work python 3.0? i am formulation stay 2.x while since i don't wish start porting things over following library i already rest new library i competence start controlling doesn't work nonetheless py3k. my bargain py3k beta slight drawn out personally give library developers pierce things over. happening? examples sorts libraries i am articulate pil, numpy/ scipy, sqlalchemy, beautifulsoup, cherrypy...

html information exceeds domain length after being hex-sanitized

the problem can't tell user characters certified domain since transient value some-more characters unescaped one. i few solutions, nonetheless zero looks unequivocally good: one whitelist any domain (too many work doesn't definitely solve problem) one blacklist any domain (same above) use domain length reason information even characters transient (bad) uncap distance database domain (worse) save information hex-unescaped pass accountability wholly cost filtering (not unequivocally good) let user speculation border distance (worst) are there options? there "best practice" case? sample code: $string = 'javascript:alert("hello!");'; echo strlen($string); // outputs 27 $escaped_string = filter_var('javascript:alert("hello!");', filter_sanitize_encoded); echo strlen($escaped_string); // outputs 41 if length database domain is, say, 40, transient information fit.

looping over elements jquery

i wish loop over elements an html form, store values <input> fields an object. following formula doesn't work, though: function config() { $("#frmmain").children().map(function() { var child = $("this"); (child.is(":checkbox")) this[child.attr("name")] = child.attr("checked"); (child.is(":radio, checked")) this[child.attr("name")] = child.val(); (child.is(":text")) this[child.attr("name")] = child.val(); relapse null; }); neither does following (inspired jobscry's answer): function config() { $("#frmmain").children().each(function() { var child = $("this"); alert(child.length); (child.is(":checkbox")) { this[child.attr("name")] = child.attr("checked"); } (child.is(":radio, checked")) ...

how hinder book controlling simultaneously?

i wish hinder book controlling some-more once during time. my tide proceed is create semaphore record containing pid controlling process read file, process-id exit (you never know...) at finish processing, mislay file in method hinder slight hanging, i set adult cron office intermittently check record the comparison following border certified controlling kills slight its still running. is there risk i'm murdering wrong process? is there improved proceed perform whole?

persisting printer settings

what best proceed persist/save printer settings .net? there used bug .net 1.1 serialization printersetting vigilant there nonetheless i'm wondering there isn't improved easier proceed doing some-more new versions framework. the sure box grant user define, controlling customary printer sourroundings user interfaces, imitation sum (including printer-specific options) given printer have saved easy unbroken user prints printer.

need assistance sequence pier communications ruby

i need communications over sequence pier ruby. research, appears there aren't difficult libraries sequence communications newest component i 2006. there any gems i'm wakeful of? i eventually need say communications sequence device trustworthy usb (i figure out pier problem) behind leading communications (somewhat ruby-esque pseudo code). def serial_write_read serial.read == "ready" serial.write "1" until serial.read == "ok" serial.write "5" end relapse serial.read == "done" end end

php book compression/"compilation" tools

are there any some-more general collection "compile" fundamentally combine churned php files unparalleled record formed includes autoloading classes? i'm pondering something identical doctrine's compiling functionality compiling vital js frameworks "production" sites abate record distance provoke performance. before minute book myself, i only wish out anything value looking during already exists (google hasn't many assistance far). edit: i've indeed combined .phar repository format am unequivocally vehement that. i indeed some-more concerned performance, nonetheless sounds merging files furnish any benefit. does anyone have any genuine information competence advise opening advantage (or miss thereof) merging churned scripts unparalleled file?

array contra linked-list

why someone wish linked-list over an array? coding linked-list is, doubt, bit some-more work controlling an array competence awe pristine additional effort. i cruise insertion new elements excusable linked-list nonetheless it's vital duty an array. there advantages controlling related list store set information contra storing an array? this doubt register since doubt seeking personally sole java category while doubt concerned whole information structures.

varying colors processing

i've operative porting guess formula over unchanging java netbeans. distant well, many all works great, solely i non-grayscale colors. i have book draws spin pattern, should change colors spin formed modulus check. book seems hang, however, i can't unequivocally explain why. if anyone trust guess java, tell me where mistake is, i'd unequivocally adore know. for effect peer-review, here's small program: package spirals; import processing.core.*; public category sure extends papplet { boyant x, y; int i = 1, dia = 1; boyant angle = 0.0f, circuit = 0f; boyant speed = 0.05f; //color palette int gray = 0x0444444; int blue = 0x07cb5f7; int pinkish = 0x0f77cb5; int youthful = 0x0b5f77c; open main(){} open stationary vacant main( string[] args ) { papplet.main( new string[] { "spirals.main" } ); } open vacant setup() { background( gray ); size( 400, 400 ); nostroke(); s...

installing rmagick mac os x macports

with macports chronicle imagemagick 6.4.4 installed, i'm removing an blunder installing rmagick gem. /opt/local/bin/ruby extconf.rb transform rmagick checking flush chronicle >= 1.8.2... yes checking /usr/bin/gcc-4.0... yes checking magick-config... no can't exercise rmagick 2.7.0. can't magick-config in /system/library/frameworks/javavm.framework/versions/1.5/commands: /users/jason/.bin:/opt/local/bin:/usr/local/bin:/usr/local/mysql/bin: /usr/local/ec2-api-tools/bin:/opt/local/bin:/usr/bin: /usr/local/bin:/bin:/usr/sbin:/sbin:/usr/x11/bin i've hallowed comparison versions rmagick successfully. i've seen references dev package imagemagick, nonetheless doesn't seem accessible macports. how i exercise rmagick 2.7 mac os x imagemagick 6.4.4 macports?