Posts

Showing posts from January, 2014

how management line arguments controlling process

in program, i have receiving an blunder i a command-line accumulate management mxmlc. blunder associated an embedded arise name being justly identified flex the system fonts list. however, whim, i solid duplicate formula flex builder and compile there. surprise, worked, found proper font controlling same component name i given (pmingliu). i suspected problem competence locality one, component cannot correctly brand arise name since locality considerations. i've attempted sourroundings locality accumulate formula en_us, no avail. i ask anyone here knows accurately flex builder invokes mxml compiler differences there compared controlling mxmlc directly? know it's controlling mxmlc.exe directly, given attempted replacing mxmlc the possess executable constraint management line parameters. if matters, os used windows xp.

delphi: relocating divided vss

we organisation few delphi developers have controlling vss given years (i know it's pity), nonetheless don't any modernized comforts vcs, operative glorious cases (but times pulling me crazy :( ). the good thing have vss third-party plug-ins combine vss delphi, operative great, nonetheless the projects becomes larger, pierce proceed vss. i have looked during few vcs (free commercial) found many seems finished linux guys, have management line admin work(i know i'm windows man :p). what i'm looking new chronicle control should easy to say integrated simply delphi ide (d2007), during slightest have good ui admins an developers.

internal dns settlement woes

alright, i am going state adult front doubt competence too concerned (amount fact complexity) medium. nonetheless i figured best place start. i am attempting setup explanation visualisation digest bond settlement initial large hurdle. i wish setup 3 dns servers 3 physical boxes. none boxes needs solve open addresses, middle only . i have review by setup middle roots (mostly) glorious dns & bond 5th ed book. nonetheless interpretation instance functional. ip's rfc 1918 non-routable. box 1 official addresses box1.bogus domain, box 2 official addresses box2.bogus domain. box 3 act both an middle bottom tld server domain bogus . current new issues: i have hints record box 1 2 contains unparalleled ns record ns construction bottom zone. additionally there an a record translates ns ip root. i dig . box 1 i an authority domain ns name, an answer additional record section. therefore i am amateurish indeed solve ip bottom server box 1. if i indicate /etc/resolv.conf b...

can linq sql generated objects decoupled?

i linq sql, nonetheless seems classes generates firmly assimilated database stored in, seems bad thing. for example, controlling ye olde northwind database, i emanate dbml products table, product category generated. i category any tier, good good, nonetheless i endorse i'd rather plain aged ado.net (or switch databases), i'll have reconstruct product class, along each "model." is there proceed around this? emanate your vigilant models separately, following have tables mapped them? i've played around several mapping classes provided, nonetheless haven't found tolerable answer yet.

what your termite build slight craps your chronicle control

so i've got good java project, build termite /dist folder. the whole digest underneath chronicle control, i muster latest chronicle only 'svn export' route dist folder. but build keeps deletion .svn folders inside dist folder, the dependents, since cleans out folder building instead only overwriting. accurate law-breaker jarbundler, termite assign builds mac.app gold - deletes whole bundle's folder before recreating it. this apparently craps adult svn, since .svn folders blank folder says the conflict. anyone have any ideas i solve this? i can't figure out stop jarbundler deletion everything, im going have something some-more hacky i fear. im graceful new termite well, only reference.

"clr detected an unfair program." job general methods

i infinite stationary slight takes general parameter argument. i method, horizon throws system.invalidprogramexception. difference thrown even before initial line slight executed. i emanate stationary category takes general argument, following slight stationary class, all works fine. is .net defect, there mysterious general order i'm defilement here? for effect completeness, i've enclosed slight fails, slight passes. note uses array classes possess library (eg gridutils), classes explained here. i don't cruise tangible definition matters: doubt since runtime crashes before slight even starts. (i'm programming visible studio 2005, maybe left divided visible studio 2008.) this throws an difference before initial line invoked: private nominee vacant prog_delegate<tgridline>(datagridview dgv, ienumerable<tgridline> gridlines, string[] columns); open stationary vacant populatereadonlygrid<tgridline>(datagridview dgv, ienumerable<tgridline> gri...

determine slight info programmatically darwin/osx

i have category following member functions: /// traveller pid virtual pid_t pid() const = 0; /// physical memory distance kb virtual uint64_t size() const = 0; /// renter memory process virtual uint64_t rss() const = 0; /// cpu used process virtual double percentcpu() const = 0; /// memory used process virtual double percentmemory() const = 0; /// array threads process virtual int32_t lwps() const = 0; this class' calling relapse slight information caller. physical memory distance simply dynamic sysctl call, pid trivial, nonetheless remaining calls have eluded me, aside invoking popen ps tip parsing cost - isn't acceptable. any assistance severely appreciated. requirements: compiles g++ 4.0 no obj-c osx 10.5

structuring winforms c# solution

so i am reorganizing winforms c# fortitude assistance decouple cleaner some-more organized. fortitude outlines little business orders,etc . . i have damaged out projects distant into app.view - gui associated code app.data - only information structures interfaces. doing code app.businesslogic - business explanation formula gui references i have classes i can't figure out where belong. greatfully let me know your thoughts digest any category should there another digest should combined this. a category retrieves user preferences database a category retrieves stationary information the stationary information server advantage sets information results. a category brings down user entitlements a denote category stores hashtable orders a category emails out messages user action

what's best proceed spin informed infinite codebase?

joining an existent organisation infinite codebase already place daunting. what's best approach; broad; try whole overview all links together, code narrow; concentration little sections formula during time, bargain work fully pick underline arise learn along try advantage understanding category diagrams uml, accessible (and adult date) something else entirely? i'm operative now an approx 20k line c++ app & library (edit: little grand amour things!). attention i suspect you'd an introduction an means programmer. however case, start adding value fast possible? -- summary answers: step by formula debug mode works pair adult someone some-more informed formula bottom you, holding turns chairman coding chairman watching/discussing. stagger partners among organisation members trust gets widespread around. write section tests. start an avowal cruise formula work. turns out expected, you've substantially supposed code. not, you've got thwart solve an enquiry make. (than...

passing objects biased soap ask removing objects behind response....using webservices

i have webservice, takes java.lang.object objects parameters (because during runtime wholly know hte form object)...after doing process, respond response sourroundings java.lang.object it. i am means send reuest objects webservice job program, nonetheless removing notserializable difference while building response webservice. i came know 'if implement, java.io.serializable, mebmers also should serializable objects'... here vigilant isnot serializable object..it doesn't impllement serializable.... if anyone lamp mw right solution..i wouold thankful. thanks bhaskar

is there proceed brief cvs station management line?

when doing cvs update , good outline state repository, example: m src/file1.txt m src/file2.txt c src/file3.txt a src/file4.txt ? src/file5.txt is there proceed but indeed updating? i know there cvs status , nonetheless proceed verbose: =================================================================== file: file6.txt status: up-to-date working revision: 1.2 repository revision: 1.2 /var/cvs/cvsroot/file6.txt,v sticky tag: (none) sticky date: (none) sticky options: (none) i impetus book mutation latter former, nonetheless seems rubbish given cvs apparently furnish former.

behaviour exceptions within representatives c# 2 hosted ms comparison com

morning all, bit libel speculation doubt here... i've found references online suggesting difference doing representatives c# have opposite intrepidity cases nonetheless i can't any petrify support matter. we recently large problems exceptions inside representatives microsoft comparison addin causing hard-crash msvc runtime. stealing representatives solved nonetheless i'm extraordinary out bloody details. as laconic instance core code: delegate del; // initialized elsewhere try { del.dynamicinvoke(); } catch(exception e) { /* parsing difference beget user-friendly summary here */ } the above make certified centralized form blunder doing pristine formula indicate perspective purify concise. any publicly unprotected duty announced nominee executed around above fragment. in rudimentary console app, throwing an difference nominee only plain astonishing blunder (e.g. "accidentally" job tostring() zero pointer) works approaching blunder burnished desired. throw m...

function overloading fail: since operators clash?

i've got large big formula bottom includes twin sure namespaces: engine application. the engine defines vector3 category typedef another vector3 class, equivalence operators lay engine namespace, vector3 class. i total category concentration also equivalence operators concentration namespace. when i attempted compile, separate nonetheless near-by vector3 comparisons unsuccessful since couldn't an suitable equivalence operator. i suspected i causing dispute changed equivalence operators category i added, accumulate succeeded. // engine.h namespace engine { category vector3impl { ... }; typedef vector3impl vector3; bool operator==(vector3 const &lhs, vector3 const &rhs) { ... } } // myfile.cpp #include "engine.h" namespace application { category myclass { ... }; bool operator==(myclass const &lhs, myclass const &rhs) { ... } vacant myfunc(...) { ( myclassa == myclassb ) { ... } // builds } vacant anotherfun...

resources kids training c#

my 11 year aged son unequivocally prying programming. operative for integrate years nonetheless outgrown it. i recently helped exercise visible c# demonstrate book unequivocally vehement work it, nonetheless we're carrying tough awaiting good resources online. he learns best looking during illustration programs, dissecting them, altering them, etc. poison around i wasn't means good samples download try c# demonstrate edition. anyone indicate me instruction good set illustration programs child training c#, any resources cruise competence good him? btw i'm programmer myself nonetheless i've roughly exclusively operative linux enlarged time, comes microsoft i'm graceful lost!

how i brief verbatim c++?

very simple question: i short verbatim c++? i know following: 2 an int 2u an unsigned int 2l long 2ll long long 2.0f float 2.0 double '\2' char . but i short literal? i attempted 2s nonetheless gives compiler warning.

loadfromtext gives blunder 2285 (microsoft business opening can't emanate cost file)

when importing forms opening controlling loadfromtext, i continuously runtime blunder 2285. poison internet shows same problem, nonetheless solutions. does anyone know causes bug? edit: in offer record called 'errors.txt' combined folder containing database. edit: arrange solution: i never got around seeking component user hotfixes, nonetheless duty work approaching during home. i logged morning works here (no changes ms opening meant time). i'm guessing an middle bug ms access, vba code. if trust same error, try cold reboot, wait while hopefully problem goes away. list specific resources underneath blunder occured maybe bug eventually found. finally associated news: during an opening addin found trade your forms/tables. verfied work, check problem your possess formula opening bug. p.s. interjection remou your palliate help. i've upvoted hotfix answer since seems closest contingent solution. my chronicle business opening 2003(11.8166.8221) sp3 yep i'm controlling n...

sql server 2005 opening issue

i have dev uat environments. dev the place, uat client's place. our dev accessory xeon 4 core @2,33ghz, 4go propel windows server 2003 the uat physical accessory definitely same nonetheless practical accessory used (under vmware). i don't know accurate parameters used vm. the problem sql server dev accessory runs unequivocally good uat unequivocally very slow. opening sql server supervision studio takes 2 mins uat machine. runing even rudimentary name ask also unequivocally slow. the database definitely little (6 gb). opening any concentration server works well. so cruise there problem sql server instance i contingency inspect reason. here i checked : server settlement identical have dev. there adequate space disk processors overloaded (10% used max reached) memory seems also ok. data record files set grow automatically sql server ransom denote : full it seems database record blunder occured during slightest once (i wholly have opening little part) : 2008-10-14 19:16:54.84 sp...

rollback changeset command-line wholly tfs?

i'm building an involuntary graduation concentration tfs. comforts i'd support rolling behind latest change. i'm definitely wakeful rollback appetite tool, nonetheless bargain even pass changeset by management line, still brings adult gui interface operations. my guess transport changeset story bend i wish rollback, emanate new workspace, specific chronicle changeset before final one, following combine tide workspace, forcing conflicts resolved before version. runs server an involuntary heed workspaces combined deleted fly. any suggestions improved proceed this?

setting body's onload charge an asp.net mvc master page

i have perspective controlling master page contains javascript needs executed controlling onload body. best proceed set onload masterpage wholly certain views? on thought i attempted pass name javascript duty viewdata. nonetheless i dont unequivocally wish controllers have know javascript page. i unequivocally don't approach... <body onload="<%=viewdata["body_onload"]%>"> <asp:contentplaceholder id="maincontent" runat="server" /> edit - i suspect thought jquery's request prepared eventuality instead... any ideas?

using session[] page load

i wish bucket information event unbroken symbol clicked clear news spectator following should bucket information datatable instead retrieving information again database. here goes code... reportdocument rpt = new reportdocument(); datatable resultset = new datatable(); twine reportpath = null; stable vacant page_load(object sender, eventargs e) { (!page.ispostback) { (request.querystring.get("id") == "5") { twine announcement = request.querystring.get("pub"); datetime date = datetime.parse(request.querystring.get("date")); int pages = int.parse(request.querystring.get("pages")); int arrange = int.parse(request.querystring.get("sort")); (sort == 0) { reportpath = server.mappath("issuesreport.rpt"); rpt.load(reportpath); ...

linq sql: sourroundings objecttrackingenabled fake breaks idle loading child entities?

is there proceed invalidate linq's vigilant tracking features, but also disabling lazy-loaded child associations? i'm controlling linq2sql set formation tests. i'm wholly controlling linq establish changes database, i wish act rudimentary information opening covering rather full orm. this,i set set information context's objecttrackingenabled ability fake hinder linq caching data. works fine, solely breaks associations between entities. for instance, assume twin tables widget category, fk charge between them. vigilant tracking enabled, widgetinstance.category justly lazy-loaded. vigilant tracking disabled, zero idle hallowed problem ability always null. how i hinder linq caching data, but also preventing lazy-loading? update: here's referenced answer. offer investigate also incited adult i regretful loading child data. box i only wish data, regretful loading fine.

postback security

i've operative jquery *.asmx web services lately, i'm perplexing security-conscious doing so. i figure illusory quarrel an ajax ask -- even logged-out -- apparatus should wholly permitted while logged-in. thus, i consolidate special keys hashes any ajax requests method countenance user's state before behaving certain server-side actions. however i always feigned postbacks stable regard. .net pitch an blunder viewed ask tampered with. is stable assumption? should i countenance requests, presumably they're viewed around ajax non-ajax http post? i suspect both technically http posts, nonetheless ajax wholly submits definitely pass, since normal asp.net includes viewstate values. correct?

how i heed between information contracting user actions winform controls

i have contingency customary catch-22 problem. i have .net winform control contains textbox checkbox. both controls information organization properties information category instance. textbox price, check box infer cost price override. also information category ability binds item's uncanny price. i controls honour following rules: when user enters value cost textbox, checkbox automatically checked infer vital cost value when check box un-checked, item's cost easy uncanny price. when user unchecks checkbox, eventuality handler tests checked state, sets item's cost ability uncanny cost value. however, cost value being databound, bond eventuality fired, updates textbox value, fires calm altered eventuality handler re-checks checkbox. i've attempted trap conditions where i'm definitely updating something trigger control change event. wholly works biased though. textbox change eventuality fires times outmost control, such databinding fires form primarily shown. i...

do stateless futile array generators exist?

is there inadequacy between generating churned numbers controlling unparalleled futile array generator (rng) contra generating array per generator dispatch it? both implementations beget numbers equally random? there inadequacy between normal rngs secure rngs this? i have web concentration ostensible beget list futile numbers interest clients. is, numbers should seem futile any client's indicate view. does meant i need keep removed futile rng per fan session? i share unparalleled rng opposing sessions? i emanate dump rng per-request basis? update : doubt associated

flash as2.0 - boost label's arise size

i know sounds unequivocally apparent question, nonetheless it's explanation harder figure out i thought. i'm building peep 8/actionscript 2.0. i have tag component, i'm boldly assigning calm an xml document. example: label.text = "<b>" + xml_node.firstchild + "</b>"; this successfully changes label's calm whatever xml node, given i enabled html, creates bold. however, i wish boost distance label's font, controlling <font> tags won't work. am i blank something? i arise larger? actionscript only picky!

is there accessible proceed hang std::pair new type?

often times i myself controlling std::pair interpretation judicious groupings twin associated quantities duty arguments/return values. examples: row/col, tag/value, etc. often times i should unequivocally rolling possess category instead only controlling std::pair. it's graceful easy things start defilement down - formula becomes unwashed make_pair, first, second, the unequivocally tough remember what - an std::pair<int, int> conveys reduction definition form position . what have found best ways hang functionality std::pair form conveys genuine meaning? here things i have considered: typedef std::pair<int, int> position; this during slightest gives form revealing name flitting around, nonetheless form isn't enforced, the still unequivocally only pair, many same problems still exist. however unequivocally rudimentary write. struct position : open std::pair<int, int> { typedef std::pair<int, int> base; position() : base() {} position(const pos...

how an rss-feeds entries accessible longer they're permitted source?

my mechanism during home set adult automatically download things rss feeds (mostly torrents podcasts). however, i don't always keep mechanism on. sites i allow have comparatively infinite throughput, i spin mechanism behind thought missed between the incited off latest update. how storing feeds entries longer generation they're accessible tangible sites? i've checked out yahoo's pipes found such functionality, google reader arrange it, nonetheless requires authority imprinting any item. chatterbox rss php caching, nonetheless that's wholly prevaricate retrieving feed too many unequivocally storing some-more entries. i have opening webserver (lamp) that's 24/7, fortitude controlling php/mysql excellent, any existent web-service good too. i possess formula this, nonetheless i'm certain an emanate formerly encountered someone? what i did: i wasn't wakeful share an whole add-on controlling google reader, interjection mike wills indicating out. once i knew i ...

how reinstate click eventuality mouseover silverlight 2.0 combobox?

i have combo box silverlight 2.0 i wish open user mouses over toggle symbol following tie rodent away. default function click. here impression formula (sorry long): <style x:key="helpcomboboxstyle" targettype="combobox"> <setter property="padding" value="0,0,0,0"/> <setter property="background" value="#ff1f3b53"/> <setter property="horizontalcontentalignment" value="left"/> <setter property="borderthickness" value="1"/> <setter property="tabnavigation" value="once"/> <setter property="borderbrush" value="#104f9b"/> <setter property="template"> <setter.value> <controltemplate targettype="combobox"> <grid> <grid.resources> <style targettype="togglebutton" x:name="combotogglestyle...

target iis workman processes request

ok, uncanny setup, uncanny question. we've got fan an admin web concentration the saas app, controlling asp.net-2.0/iis-6. admin concentration change options displayed fan application. those options saved admin webservice client, admin, flush the cache options specific account. recently started giving the fan concentration >1 workman processes, so causing cache options wholly privileged 1 now controlling workman processes. so, i apparently have avenues controlling problem (however quarrel appreciated), nonetheless my doubt is: there any proceed target/iterate by any workman processes around web request?

how i un-escape xml entities simply .net

i have formula advantage innerxml xmlnode. the node enclose only calm (with html) xml. for example: <xmlnode> here &lt;strong&gt;html&lt;/strong&gt; <xmlnode> or <xmlnode> <xmlcontent>here content</xmlcontnet> </xmlnode> if i innerxml <xmlnode> html tags returned xml entities. i can't innertext since i need means xml contents. i unequivocally need proceed un-escape html tags, since i detect it's xml act accordingly. i speculation i htmldecode, nonetheless decode xml encoded entities? update: i speculation i'm careless bit above here simplified scenario: i have xml request looks this: <content id="1"> <data>&lt;p&gt;a test&lt;/p&gt;</data> </content id="2"> <content> <data> <dataitem>a test</dataitem> </data> </content> if i do: xmlnode xn1 = document.selectsinglenode("/content[@id=1]/data...

can i applet finish some-more gracefully?

i have japplet i contains several representation components. also starts integrate additional threads init() generally does graceful customary applet-y things. if i tie browser window containing applet, jre doesn't die (the idol stays component tray) until browser's windows have closed (ie browser totally finished disappears assign manager) is approaching intrepidity should jre finish browser window enclosing applet closes? i have destroy() method, nonetheless (at present) wholly stops additional threads i started init() method. should i doing some-more here maybe? there any best-practises i should following? if you'd any some-more info, greatfully let me know comments. :-)

style square images aren't reloaded firefox safari

we have found out firefox (at slightest v3) safari don't morally cache images referenced css file. images cached, nonetheless never refreshed, even change server. once firefox settlement cache, never check changed. our css record looks this: div#news { background: #ffffff url(images/newsitem_background.jpg) no-repeat; ... } the problem change newsitem_background.jpg image, firefox users still aged image, unless definitely modernise page. ie hand, detects settlement altered reloads automatically. is famous problem? any workarounds? thanks! edit: fortitude press f5. i this. nonetheless the clients only revisit the web site, old, prehistoric graphics. know need press f5? i have hallowed firebug reliable i already suspected: firefox only doesn't even try collect images referenced css file, out have changed. press f5, does check images, web server simply responds 304, solely those have changed, where responds 200 ok. so, there proceed provoke firefox automatically transform an...

unit exam routes

let's contend i have tangible route: routes.add(new route("users/{id}", new mvcroutehandler()) { defaults = new routevaluedictionary(new { controller ="userinfo", movement = "userinformation", id = ""}), }); so, am i going emanate section exam pledge users/123 presented url movement slight userinformation unequivocally called, 123 parameter? the reason i asked since i have typed wrong name i mention routevaluedictionary, i have mistyped userinformationss gait userinformation. there anyway hinder this?

strange cross-threading ui errors

i'm minute winforms app twin modes: console gui. 3 projects within same solution, console app, ui forms third reason explanation twin interfaces both bond too. console app runs definitely smoothly. a denote binds user-selections, an ilist<t> where t internal object, step , implements inotifypropertychanged , ui mounted datagridview. glorious during runtime, initial state objects reflected screen. each step objects assign achieved turn; properties change, being reflected behind ilist upheld datagridview. this movement ui versions finished formulating backgroundworker lifting events behind ui. step does thing generates stepresult vigilant an enumerated form indicating outcome (e.g. running, notrun, ok, notok, caveat) twine infer summary (because step ran nonetheless definitely expected, i.e. caveat). customarily actions secure database interaction, nonetheless debug mode i incidentally beget result. if summary null, there's never problem, nonetheless i beget response t...

easy ipc windows mobile?

in c++ digest (i.e. .net) windows mobile, i am looking proceed simply promulgate between twin exclusively controlling applications. concentration run service, since concentration b yield user functionality - b a's functions. i rather by implementing anything com. in fact, i move any kind serialization identical (i.e. bar controlling sockets/pipes/files), nonetheless rather have b pass parameters pointers over a, only biased b. also, apps c, d e should means same wholly instance running. i should supplement b infrequently ostensible relapse an array (or std::vector std::map) where distance formerly known. is illusory windows mobile presumably platforms?

allow wholly copy/paste context menu system.windows.forms.webbrowser control

the webbrowser control ability called "iswebbrowsercontextmenuenabled" disables ability right-click web page context menu. unequivocally tie i wish (i don't wish anyone means right-click print, strike back, strike properties, perspective source, etc). the wholly problem also disables context menu appears textboxes copy/paste, etc. to clearer, i don't want: this i want: i invalidate sure context menu, nonetheless grant appears textboxes. anyone know i that? webbrowser.document.contextmenushowing eventuality looks promising, nonetheless doesn't seem morally brand component user right-clicking on, presumably by htmlelementeventargs parameter's "fromelement" "toelement" properties, nor sender anything nonetheless htmldocument element. thanks advance!

visual studio 2008 -- i change "add reference" add-on comparison default?

every start visible studio, initial click "add reference" supplement dll anxiety project, default, .net add-on dialog box selected. many reading have substantially noticed, take enlarged -- mostly some-more 30 seconds -- full list .net components fill in. because proceed we're conceptualizing the solutions, though, 80% time, i wish name presumably "projects" add-on "browse" tab. is there sourroundings anywhere visible studio let me "projects" initial add-on loads up? does anyone know any other, dark tricks accomplish same effect?

best css tone circle sites

what site(s) advise looking during nominal colors site design? also profitable enter conjuration rgb value have tone circle removed behind nominal colors. most popular: others alphabetical order:

asp.net : removing selecteditem dropdownlist maintaining list items

here's issue.. i have little page label, dropdownlist quarrel button. <div> <asp:label id="message" runat="server"/> <br /> city wish feeling during hotels for?<br /><br /> <asp:dropdownlist id="dropdownlist1" runat="server" enableviewstate="true"> </asp:dropdownlist> <br /><br /><br /><br /> <input type="submit" /> </div> on form bucket i am inserting equipment dropdownlist symbol click i am displaying count equipment dropdownlist. here's formula that. (page.ispostback) { message.text = "you have comparison " + dropdownlist1.items.count.tostring(); } else { message.text = "you have comparison " + dropdownlist1.items.count.tostring(); dropdownlist1.items.add("madrid"); dr...

how detect user successfully finished downloading record php

i've got php page handles requets record downloads. i need means detect record downloaded successfully. done? maybe there's means detecting client-side following eventuality acknowledgment down server. thanks. edit: by handle, i meant page doing something this: $file = '/var/www/html/file-to-download.xyz'; header('content-type: application/octet-stream'); header('content-length: ' . filesize($file)); header('content-disposition: attachment; filename=' . basename($file)); readfile($file);

raii java... apparatus ordering always ugly?

i only played java record component api, came down following function, used duplicate binary files. uncanny source came web, nonetheless i total try/catch/finally clauses certain that, should something wrong happen, aegis streams closed (and thus, os ressources freed) before quiting function. i embellished down duty arrangement pattern: public stationary vacant copyfile(fileoutputstream odstream, fileinputstream osstream) pitch etc... { bufferedinputstream osbuffer = new bufferedinputstream(osstream, 4096); bufferedoutputstream odbuffer = new bufferedoutputstream(odstream, 4096); try { try { int c; while((c = osbuffer.read()) != -1) // pitch ioexception { odbuffer.write(c); // pitch ioexception } } finally { odbuffer.close(); // pitch ioexception } } finally { osbuffer.close(); // pitch ioexception } } as distant i know it, i can't put twin close() finally a...

storing some-more 1 information vigilant during unparalleled index linked-list?

i am perplexing store some-more 1 information vigilant during unparalleled index linked-list. examples calm seem illustrate adding wholly 1 square information per index. i'm presumption illusory supplement more? for example, controlling collections api store an integer i following: linkedlist <integer>linky = new linkedlist<integer>(); int num1 = 2, num2 = 22, num3 = 25, num4 = 1337; linky.add(num1); how i adding num2, num3, num4 same initial index list? interjection guys.

how i tide page's full url windows/iis server?

i changed designation new folder windows/ server. i'm sourroundings adult 301 redirects php, nonetheless doesn't seem working. post urls have following format: http:://www.example.com/old_folder/index.php/post-title/ i can't figure out squeeze /post-title/ biased url. $_server["request_uri"] - everybody seems advise - returning an lifeless string. $_server["php_self"] only returning index.php . since this, i repair it?

how force restart windows box controlling vbscript?

i'm perplexing proceed force windows reboot, i am controlling issues. i've attempted set opsysset = getobject("winmgmts:{authenticationlevel=pkt," _ & "(shutdown)}").execquery("select * win32_operatingsystem where "_ & "primary=true") for any opsys opsysset retval = opsys.reboot() next i've also attempted controlling shutdown -f -r command, both cases i infrequently response, i try again i an blunder observant "action finish since component shutting down" even nonetheless matter enlarged i leave it doesn't close down, still allows me start new programs, doing shutdown -a gives same error. book used force windows reboot?

delphi 7 difference caught

i have unequivocally difficult leave formula i've operative crashes collecting large chunks data. i've amateurish accurate reason crashes am perplexing opposite ways solve during slightest redeem nicely. final thing i hang crashing formula a try ... except cleanup(); end; just behave. nonetheless cleanup never gets done. underneath resources does an difference caught? competence due memory yield something given app collecting definitely bit data. oh difference i got before adding try "access violation" (what else?) cpu window points unequivocally low addresses. any ideas pointers many appreciated!

lazy initialization causing system.argumentexception silverlight 2.0 beta

i've got following instance controlling rudimentary silverlight page: public page() { initializecomponent(); initializeother(); } private doublecollection dashes; public doublecollection dashes { get { //dashes = new doublecollection(); //works ok //dashes.add(2.0); //dashes.add(2.0); (dashes == null) { dashes = new doublecollection(); //causes exception dashes.add(2.0); dashes.add(2.0); } relapse dashes; } set { dashes = value; } } private vacant initializeother() { line line; (int i = 0; i < 10; i++) { line = new line(); line.stroke = new solidcolorbrush(colors.blue); line.strokedasharray = dashes; //exception thrown here line.x1 = 10; line.y2 = 10; line.x2 = 400; line.y2 = 10 + (i * 40); canvas1.children.add(line); } } the above formula throws system.argumentexception line marked. fortitude problem also noted example. does anybody know problem associated fact ability syst...

how i emanate duplicate an vigilant php?

it appears php objects upheld reference. even assignment operators seem formulating duplicate object. here's simple, constructed proof: <?php class { open $b; } function set_b($obj) { $obj->b = "after"; } $a = new a(); $a->b = "before"; $c = $a; //i generally design emanate copy. set_b($a); print $a->b; //i design arrangement 'before' print $c->b; //i generally design arrangement 'before' ?> in both imitation cases i am removing 'after' so, i pass $a set_b() value, reference?

dispose settlement wpf listbox (memory leak)

i have listbox garland images (done by datatemplate). images combined sourroundings equipment source: <image x:name="itemimage" source="{binding imageurl}"/> and following privileged controlling listbox's items.clear() method. new images total controlling items.add slight listbox. however, memory use only starts relocating adult up up. same 300 little images removing displayed, nonetheless memory never seems freed. app starts controlling 40megs, fast climbs adult 700megs. i giveaway adult memory images using? edit : thing i forgot mention, images (which 4-5k any size) being hallowed over network. caching somehow grateful this? displaying 12 images chews adult 10 megs memory, 100x filesize.

should i only pierce record emanate category moves it?

okay, i got little way tags (as id3v2.4 etc.) song files. i wish user have choice pierce and/or rename those tagged files he/she wishes to. considering i am perplexing keep sincerely purify loosely assimilated settlement component (even nonetheless extensibility unequivocally vicious here, it's only fun), only somefileinfoobject.move(somewhere) where somewhere receptive settlement correct exercise classes - maybe movefilestrategy, renamefilestrategy (i know moving/renaming deliberate same systems, nonetheless i wish enabled separately) - figure out finish presumably plan should receptive an apply(fileinfo file) slight called. if cruise plan classes competence useful, have any idea good doing strategy? as already said, over-engineering unequivocally an emanate here, since fun digest especially targeted during removing programming engineering practice. :)

powershell general collections

i have pulling .net horizon powershell, i have strike something i don't understand. works fine: $foo = new-object "system.collections.generic.dictionary``2[system.string,system.string]" $foo.add("foo", "bar") $foo key value --- ----- foo bar this however does not: $bar = new-object "system.collections.generic.sorteddictionary``2[system.string,system.string]" new-object : can't form [system.collections.generic.sorteddictionary`2[system.string,system.string]]: certain t he public containing form loaded. at line:1 char:18 + $bar = new-object <<<< "system.collections.generic.sorteddictionary``2[system.string,system.string]" they both same assembly, am i missing? as separate out answers, graceful many wholly an emanate powershell v1.

should < <= loop

if iterate by loop 7 times, use: for (int i = 0; i < 7; i++) or: for (int i = 0; i <= 6; i++) there twin considerations: performance readability for opening i'm presumption java c#. does matter "less than" "less equal to" used? have understanding opposite language, greatfully infer which. for readability i'm presumption 0-based arrays. upd: plead 0-based arrays competence have confused things. i'm articulate iterating by array elements. only whole loop. there good indicate next controlling consistent explain incantation array is. i " int number_of_things = 7 " following " i <= number_of_things - 1 " feeling weird, wouldn't it.

serialization problem

the conditions : sure digest a. category library b. a references b project b classes serialized. classes used a. now, problem appears digest i try serialize objects b. an difference thrown says category can't serialized. uncanny biased given classes b i cant have anxiety those a. (a spin dependency created). how i lane down problem ? since difference slight doesn't contend where problem seemed ? edit : ok, i found problem assistance kent boogaart's little app :d . i have propertychanged listener category digest noted serializable - i don't wish symbol so. ( serialize category right ?) i've solved problem eventuality following couple : . there still problem , nonetheless it's substantially something similar. ps: good apparatus kent boogaart

determine section homogeneous t-sql

my database concentration going deployed during churned sites opposite zones. i need t-sql duty establish utc timestamp midnight january 1 tide year ytd calculations. information stored utc timestamps. for example, chicago utc-6 illumination resources (dst), duty needs relapse '2008-01-01 06:00:00' run any 2008 chicago. run new york (gmt-5 + dst) unbroken year, needs relapse '2009-01-01 05:00:00'. i tide year year(getdate()) . i guess i datediff between getdate() getutcdate() establish homogeneous nonetheless outcome depends presumably query run during dst not. i know any built t-sql functions last homogeneous presumably tide dst not? does anyone have fortitude problem t-sql? i tough formula store list nonetheless move to. i suspect ideal conditions controlling clr formation sql server 2005. i am only wondering there t-sql fortitude i am unknowingly of?

using javascript jquery, stock associated name boxes array structure

using answers , i have means stock name box formed preference another name box. ( ) pulling information an array structure built server-side, stored .js record referenced html page. now i supplement third name box. i 3 sets information (model, make, options) something (pseudo code): cars : [honda[accord[lx, dx]], [civic[2dr, hatchback]], [toyota[camry[blk, red]], [prius[2dr,4dr]] ex: honda selected, unbroken name box have [accord civic] settle comparison unbroken name box have [lx dx] how i 1) emanate an array structure reason data? such that 2) i value name box anxiety indispensable values unbroken name box thanks edit i emanate following, nonetheless can't figure out references proceed assistance stock name box var cars = [ {"makes" : "honda", "models" : [ {'accord' : ["2dr","4dr"]} , {'crv' : ["2dr","hatchback"]} , {'pilot': ["base","superduper"]...

winforms - best office / digest structure

wanted peoples thoughts best proceed classify office digest structure digest / fortitude winforms c# app. most establish the best seperate view, business logic, information objects, interfaces nonetheless wanted opposite tackle this. addition, assail third jubilee dependencies doing projects following have interface exported projects consumers anxiety view.csproj businesslogic.csproj data.csproj calculatorservice.exported.csproj (interfaces) calculatorservice.mycalcimpl.csproj (one implementation) calculatorservice.mycalcimpl2.csproj (another implementation) also, terms folder structure, improved nesting: interfaces ---ifoo ---idata impl ---foo ---data or product ---interfaces/iproduct ---impl/product foo ---impl/foo ---interfaces/ifoo all perplexing pull decoupled dependencies abstractions discerning ability altered implementations. thoughts? best practices?

how i work churned recordsets c++ odbc

i am perplexing streamline challenging slight storing information churned tables fasten executive table. fasten occurs controlling spirit values generated any list yield unparalleled linking. i know i multiple set nocount name @@identity any identity, nonetheless still requires me removed sqlexecute() any table. i have review dozens articles observant happening hoop churned recordsets controlling an odbc driver, doubt i but ado? i have already encapsulated customary odbc things identical function ado. i fundamentally only need know odbc api calls grant me reconstruct ado's nextrecorset(). i am operative multiple ms sql 7 ms sql 2005, controlling presumably sql server odbc, sql internal fan drivers appropriate. end goal: set nocount on; insert tablea (data) values ('a'); select @@identity newid; insert tableb (data) values ('b'); select @@identity newid; insert tablec (data) values ('c'); select @@identity newid; ... rs = db.openrecordset() rs.movefirs...

need proceed justify sell web services

i'm controlling sell web services find, create, update, mislay appointments calendars some-more people. concentration used manager perspective employees' vacation time, good distribute appointments formed availability. in method work, an real user's certification contingency sent web service. far, twin methods i have found grant 1) flitting username evidence any user 2) impersonating user defaultcredentials. defaultcredentials choice doesn't work us since grant impersonating users. does anyone know another way?

don't arrangement html formula entities dropdownlists

when i supplement &nbsp; &eacute; calm value listitem, arrangement formula html entity instead outcome (a space ). i supplement "physical" non-breaking spaces special chars, nonetheless i prevaricate possible. infrequently information stored database encoded, i don't wish always slight information before displaying it. any fortitude ? thanks edit note : before outline remarkable dropdownlist simulating treeview, nonetheless merely an instance ; i can't don't wish reinstate dropdownlist anything else.

overriding datagridviewtextboxcell paint method

i am perplexing overrule datagridviewtextboxcell's paint slight subsequent category i measure forehead calm non-static volume pixels. i extent buttress adjusts the sum extent length cells calm and "buffer" indent. does anyone know proceed accomplish this? sore doing listed below: public category mytextboxcell : datagridviewtextboxcell{ .... stable overrule vacant paint(graphics graphics, rectangle clipbounds, rectangle cellbounds, int rowindex, datagridviewelementstates cellstate, vigilant value, vigilant formattedvalue, twine errortext, datagridviewcellstyle cellstyle, datagridviewadvancedborderstyle advancedborderstyle, datagridviewpaintparts paintparts) { clipbounds.inflate(100, 0); datagridviewpaintparts pp = datagridviewpaintparts.background | datagridviewpaintparts.border | datagridviewpaintparts.contentbackground | datagridviewpaintparts.erroricon; base.paint(graphics, clipbounds, cellbounds, rowindex, c...

validate twine opposing usps state abbreviations

i need means countenance twine opposing list illusory assimilated states postal use state abbreviations, google charity me any direction. i know apparent solution: formula horridly vast (or switch) matter check review opposing 50 states, nonetheless i am seeking smoke-stack , given there an easier proceed doing this. there any regex an enumerator vigilant out there i fast many fit proceed possible? [c# .net 3.5 way]

.net webbrowser.documenttext isn't changing!

in vb.net program, i am controlling webbrowser arrangement user an html preview. i formerly dispute server squeeze html, following returning an asynchronous thread lifting an eventuality stock webbrowser.documenttext html twine i returning. now i set adult squeeze information client, but ever carrying strike server, i'm perplexing lift same event. i watch formula through, html twine repremand everything, nonetheless i try do browser.documenttext = _emailhtml the essence documenttext sojourn " <html></html> " i only wondering since documenttext being set. anyone have any suggestions?

getting fast adult speed asp.net an means coder

i have agreement charity fan arise an intranet concentration capturing/manipulating/displaying sincerely challenging set offering data. i've finished arrange thing before analysis, database etc. binds issues me, nonetheless fan many approaching move asp.net have (small) volume trust this. my tide default libel web apps php, nonetheless i have coded asp ago. i've coding 20 years have smoke-stack languages technologies underneath belt - including perl, java, vb, delphi c - training new sourroundings doesn't worry me, nonetheless but i'd adult speed slightest bid fast possible. what books, websites resources advise many good grasp this?

what best-practices around apparatus list authorization?

publishing and/or collaborative applications mostly secure pity opening resources. portal user competence reputed opening certain calm member organisation since eloquent access. finish set calm consolidate open content, organisation membership content, private user content. or, collaborative applications, competence wish pass along resources biased workflow share control request modifying purposes. since many applications store resources database typically emanate queries 'get papers i edit' 'get calm i see'. where 'can edit' 'can see' user's privileges. i have twin questions: it's definitely easy sanction user once you've retrieved resource, nonetheless good perform authorisation list accessible resources? and, can kind authorisation distant core application? maybe removed service? once separated, filter queries 'get me papers i due [somesearchterm]'? seems me your removed component have duplicate over lot anxiety data.

what simplest proceed set adult birt news spectator xulrunner application?

i recently began controlling have grown news application. i haven't nonetheless figured out i should muster viewer. seems birt mostly targets java applications, there instructions deploying j2ee, jboss, technologies -- i am informed (but i'm building java anyway). reviewing deploying birt reviewing birt's web site, i'm certain where go. i wasn't awaiting have supplement infinite java dependency xulrunner concentration --is there proceed i dump an executable xulrunner app, app, pass news document? (or something else easier training controlling j2ee, jboss, tomcat?)

what coding projects used emanate art beauty?

Image
today blinkenlights digest starts biased art eventuality toronto. toronto city gymnasium distant hulk settlement display. there emanate tradition animations an perspective live stream. i cruise good instance controlling record art beauty. coding/programming projects out there effect art beauty? update: youtube video blinkenlights action: