Posts

Showing posts from February, 2011

what's 'static vacant main' homogeneous flash?

i am perplexing fdt editor digest formerly ran successfully peep cs3. fdt builds runs successfully nonetheless swf vacant (white). i've attempted few viewers cost record indeed blank. one inadequacy digest doesn't seem consolidate opening .fla file. i'm new flash/actionscript am wondering presumably fla record enclosed incantation same public stationary vacant main slight languages. so, i'm building an concentration definitely actionscript 3 (no .fla files) i mention entrypoint, house size, etcetera? of course, it's illusory i have set adult fdt wrongly :) edit: newbie alert! turns out white theatre i observant around fdt since fla controlling opposite folder i couldn't bucket any resources, zero prepared display. i also fdt configured such proceed i wasn't observant blunder around debugger. this doubt bit dumb. normal mislay questions this? for anyone else opening during flash/actionscript plain programming background, i found graceful good overview...

app.config configsections tradition settings schema information

i am only training app.config honour formulating tradition sections. i have biased working, compiles gets information out mandatory nonetheless i warnings schema information. i have finished bit googling rudimentary reason situation. the proceed (that seems clarity me during moment) have schema record any domain within project. i know emanate schema file, nonetheless know i project. also collected deployed another accessory i assume schema record need copied opposing well. thanks any help jon

jsp-tags stationary output

i am deliberation formulating jsp-tags always give same output. example: <foo:bar>baz</foo:bar> will always output: <div class="bar">baz</div> is there any proceed jsp-tag act only stationary cost generated servlet? for example: out.write("<div class=\"bar\">"); ... out.write("</div>"); in stead of x.y.z.foo.bartag _jspx_th_foo_bar_0 = new x.y.z.foo.bartag(); _jspx_th_foo_bar_0.setpagecontext(pagecontext); _jspx_th_foo_bar_0.setparent(null); _jspxtagobjects.push(_jspx_th_foo_bar_0); int _jspx_eval_foo_bar_0 = _jspx_th_foo_bar_0.dostarttag(); etc... etc... etc... background i'm nervous performance. i haven't tested yet, nonetheless looks generated servlet does lot something unequivocally simple, opening unequivocally important. but servlet behaves cost combined directly jsp, cost prolongation zero. i few advantages doing this. i change stationary html even change something some-more dynamic, but modifyin...

make perl-style regex interpreter act simple extended regex interpreter

i am minute apparatus assistance students learn unchanging expressions. i substantially minute java. the thought this: tyro forms unchanging countenance apparatus shows tools calm matched regex. rudimentary enough. but i wish support several opposite regex "flavors" such as: basic unchanging expressions (think: grep) extended unchanging expressions (think: egrep) a subset perl unchanging expressions, including impression classes \w, \s, etc. sed-style unchanging expressions java java.util.regex class, nonetheless supports wholly perl-style unchanging expressions, superset simple extended res. i cruise i need proceed take any given unchanging countenance evade meta-characters aren't biased given flavor. following i give regex vigilant act combined comparison re interpreter. for example, given following regex: ^\w+[0-9]{5}-(\d{4})?$ as simple unchanging expression, interpreted as: ^\\w\+[0-9]\{5\}-\(\\d\{4\}\)\?$ as an extended unchanging expression, be: ^\\w+[0-9]{5}-(\\d{...

printing vb.net/c# forms concentration -- plans designer?

i say vb.net forms concentration prints several labels tag printers. (label printers only any printer, only smaller imitation area/lower resolution) the component uses leave duplicate slight that's upheld printer hardware, nonetheless out whole over decade. i'm adding explanation imitation printdocument class. i conformity class, nonetheless plans bit tedious. (defining sizes/locations any drawstring command, etc.) are there any program products open source ui designers generating imitation request layout? engineer cost contingency something i combine formula (dll ok, only removed executable) have per user license. (lots users system)

scheduled report(task) monitor

i have arise component monitor generation/transmission reports. system information stored database tables (sybase) reports generated opposite schedules ("mon-fri 10pm", "sat 5am", "1st month", etc.) system only guard reports created. emanate reports itself. system report suitable crew news finish. system say record generated reports anyone know good(tried proven) table(s) settlement storing assign shedules?. i already have an idea, nonetheless i don't wish reinvent wheel.

how i destroy webtest?

i'm controlling microsoft webtest wish means something identical nunit's assert.fail() . best i have adult throw new webtestexception() nonetheless shows exam law an error rather failure . other reflecting webtest set private member non-static infer failure, there something i've missed? edit: i have also used assert.fail() method, nonetheless still shows adult an blunder rather disaster used within webtest, outcome ability read-only (has open setter). edit: good i'm unequivocally stumped. i used tact set outcome ability unsuccessful nonetheless exam still passes! here's formula sets oucome failed: public stationary category webtestextensions { open stationary vacant fail(this webtest test) { var slight = test.gettype().getmethod("set_outcome", bindingflags.nonpublic | bindingflags.instance); method.invoke(test, new object[] {outcome.fail}); } } and here's formula i'm perplexing fail: open overrule ienumerator...

java generics - returning subtype announced form method

my category implementing super-class slight which advantage list<jcomponent> . list being returned read-only: public summary category superclass { open summary list<jcomponent> getcomponents(); } in class, i wish relapse domain announced list - i.e. sub-list: public category subclass extends superclass { private list<jbutton> buttons; open list<jcomponent> getcomponents() { relapse buttons; } } this generates compiler error, list<jbutton> subtype list<jcomponent> . i know since doesn't compile, shouldn't certified supplement jtextfield list jbuttons. however, list read-only, following "conceptually" should allowed. but, course, compiler doesn't know read-only. is there any proceed grasp i wish achieve, but changing slight chapter super-class, domain chapter sub-class? thanks, calum

my images ask evidence internal network (under asp/iis)

not definitely certain troubleshoot this. i'm surpassing an asp site, the mostly static, nonetheless there's consolidate page brings menu. just recently i transposed images, nonetheless i try site, i prompt evidence looking something internal network! i checked, settlement paths combined adult correctly, images unblocked (a w2k3 reserve feature) images set allow-all users ... nonetheless still, i evidence prompt! here's illustration page where happens: (windows only, seems) thanks. /mp

time date reworking linq

i wanted review datetime format "7/20/2008" ones database format "7/20/2008 7:14:53 am". i attempted controlling "like" apportionment nonetheless work beacuse "like" apportionment uses wholly twine i am controlling date format. can anyone tell modify review database lift adult datetime. stable vacant user_querytime() { dataclasses2datacontext dc1 = new dataclasses2datacontext(); datetime date1; twine date = request.querystring.get("timeofmessage"); date1 = convert.todatetime(date); var query7 = u dc1.syncback_logs where u.timeofmessage = date1 orderby u.timeofmessage descending name u; gridview1.datasource = query7; gridview1.databind(); }

user interface settlement books/resources programmers

i'm going monthly tour bookstore shortly i'm kind prying training user interface and/or settlement things - mostly web related, good books i should feeling at? i've seen adult frequently past , looks promising. i'm wakeful fact programmers mostly don't good designers, such some-more appetite hobby thing pierce conductor designer. i'm also looking any good web resources topic. i subscribed jakob nielsen's , instance, nonetheless seems wholly once month so. thanks! somewhat associated questions:

c++ bindings mysql

i'm controlling osx(10.4.11) & i'm perplexing decent c(preferably c++) contracting mysql figured out. i have information an offsite database i wish analyze. i'm perplexing mysql++ working, nonetheless it's being funky. i'm looking bindings, preferably ones no-headache install. edit: mysql c bindings. clunky low-level, nonetheless works(after library fiddling). supports solaris/windows/linux.

how strengthen settlement comparison sheet

i have an comparison worksheet an settlement (logo). if i right-click settlement name format settlement / protection , locked checkbox checked. i following strengthen worksheet password. despite above, finish user still name mislay image. is there any proceed hinder this? update indeed edit objects unchecked. the worksheet.protect slight i am controlling array discretionary parameters control user cgange stable sheet. decrease parameters named allowxxx (e.g. allowformattingcolumns ) default false . the parameter drawingobjects an exception. parameter defaults false strengthen sketch objects contingency definitely set true .

html links usability

should links web page always underlined? i trust should tough quick rule! i wrote critique awhile behind after another developer complained i following web standards. opening adult again, i wish know think. justification conformity usability, links underlined time. manager agreed, i altered twin lines css, done. i mind doing work, nonetheless i cruise usability site reduction now. there proceed too things screaming your attention. i should plead web site pages information entry. links doubt navigation links left page box patrician "menu". underline seem hovered over couple already, credentials colour altered user hovered over link. i unequivocally trust i even carrying discussion. i even some-more detered manager agreed. am i wrong? arguments should i have made? thanks! :)

get tide operative office cmd.exe

how i collect tide operative office cmd.exe? this seems possible. instance controlling processexplorer, name cmd.exe, right click, properties, settlement tab, "current directory" relects office set controlling cd chdir commands. i've looked during .net slight processstartinfo classes (processstartinfo.workingdirectory always advantage "") can't seem proceed last this. zero during stands out either. as an instance i'm looking programmatically means contend something like: process.getcurrentworkingdirectory(processid) where processid windows slight id another controlling process. is there any solution, winapi .net? [update] reason seeking question: i've used "command prompt path-finder bar" while it's good solely i "cd" new directory, tide path-finder window does also change. (ie sync wholly 1 proceed path-finder commmand prompt). i'm looking 2 way.

emulate mysql border apportionment microsoft sql server 2000

when i worked , attempted summary functionality limit apportionment upheld mysql, postgresql, sqlite. is, formulating query finished way: $select = $db->select(); $select->from('mytable'); $select->order('somecolumn'); $select->limit(10, 20); when database supports limit , produces an sql query following: select * mytable method somecolumn border 10, 20 this some-more challenging brands database don't support limit (that apportionment biased customary sql language, way). beget quarrel numbers, whole query subsequent table, outdoor query between . fortitude seer ibm db2. microsoft sql server 2005 identical row-number function, query way: select z2.* from ( name row_number over(order id) zend_db_rownum, z1.* ( ...original sql query... ) z1 ) z2 where z2.zend_db_rownum between @offset+1 @offset+@count; however, microsoft sql server 2000 doesn't have row_number() function. so doubt is, adult proceed heed limit functionality microsoft sql ...

string vs twine c#

possible duplicate: in c# twine keyword (highlighted visible studio information type) only by-pass twine category right? in case, same presumably while coding semantic indicate view. however, same opening indicate view? i mean, mapping performed: during gathering (i speculation so), during gathering during jit gathering execution? or maybe wrong: twine string same thing c# there situations where can't interchanged

best (free?) decompiler c# visible studio integration?

in java growth i have good advantage decompiler. finished illusory know since third-party library unsuccessful rather common guesswork. i am looking identical setup c# visible studio. is, setup where i indicate any category non-static formula code perspective sole class. what best setup this? i wish means common "jump declaration/implementation" i navigate possess code. doesn't have free, nonetheless prerogative was. it should support visual studio 2008 visual studio 2005 .net 2 3(.5).

javascript stealing whitespace shouldn't?

i have html record formula identical following. <table> <tr> <td id="mycell">hello world</td> </tr> </table> i am controlling javascript following value document.getelementbyid(cell2.element.id).innertext this advantage calm "hello world" wholly 1 space between hello world. i contingency keep same array spaces, there any proceed done? i've attempted controlling innerhtml, outerhtml identical items, nonetheless i'm carrying luck.

open-source improvements replacements representation components

i arise array desktop java applications controlling swing, while representation definitely comprehensive (once hang it), there still lot cases where i wish modernized member accessible right out box. for example, i'd unequivocally easy-to-use components (without minute myself, i given adequate time) like: multi-line label windows record explorer-like icons thumbnails view drop-down symbol (like firefox's aged behind button) 5-star rating widget combo box involuntary story (like calm domain google) an outlook-style accordion-style bar and on i know integrate sources giveaway representation components, , home jxtable, jxdatepicker, few others. where representation components over those enclosed java itself?

php generating xml, time-outs randomly

i have idea. causes clearly futile time-outs. spin smack peep i am loading into. anyone seen anything before? <?php require_once("../includes/class.database.php"); require_once("../includes/dbconnectinfo.inc"); require_once("../includes/functions.php"); include("../includes/conn.php"); $cat = $_get['category']; $result = mysql_query("select * media where related_page_id=4 && type='copy' method id asc border 6"); $media = "<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>\n"; $media .= "<content>\n"; while($row = mysql_fetch_array($result)) { $media .="<member>\n"; $body = $row[copy]; if($row[title] == "") { $media .= "<title><![cdata["; $media .= "team"; $media .="]]></title>\n"; } elseif ($row['path']=="") { $name = explo...

images digest ie7 (but operative glorious ie6/firefox)

having an emanate images controlling ie7 - work glorious 6 versions firefox. has anyone run opposing before? i know i've occur past (and i googled fix, nonetheless darned i repair again... note self, request things destiny ;) ) <div class="contextblock"> <p class="cntimg"><a href="files/image.jsp" title="image"><img src="files/images/image.jpg" alt="image" width="171" height="96" border="0">image</a></p> <p class="cntimg"><a href="files/image2.jsp" title="image2"><img src="files/images/image2.jpg" alt="image2" width="171" height="96" border="0">image2 </a></p> <p class="comment">click enlarge</p> <div class="clr"></div>

writing utf16 record binary mode

i'm perplexing wstring record ofstream binary mode, nonetheless i cruise i'm doing something wrong. i've tried: ofstream outfile("test.txt", std::ios::out | std::ios::binary); wstring hello = l"hello"; outfile.write((char *) hello.c_str(), hello.length() * sizeof(wchar_t)); outfile.close(); opening test.txt instance firefox encoding set utf16 arrangement as: hello could anyone tell me since happens? edit: opening record conjuration editor i get: ff fe 68 00 00 00 65 00 00 00 6c 00 00 00 6c 00 00 00 6f 00 00 00 looks i twin additional bytes between each impression reason?

inconsistent javascript duty results

i have duty javascript formula updates html fields new values whenever called. problem can't duty itself since works brilliantly each domain solely one. here js function: duty updatefields() { document.getelementbyid('bf').innerhtml = bill.time[breakfast][bill.pointpartofweek]; document.getelementbyid('ln').innerhtml = bill.time[lunch][bill.pointpartofweek]; document.getelementbyid('dn').innerhtml = bill.time[dinner][bill.pointpartofweek]; document.getelementbyid('se').innerhtml = bill.time[special][bill.pointpartofweek]; document.getelementbyid('fdr').innerhtml = bill.time[full][bill.pointpartofweek]; document.getelementbyid('cost').innerhtml = bill.cost; } and executes glorious following instance: <select onchange='if(this.selectedindex == 0) {bill.unholiday();updatefields()} else { bill.holiday();updatefields()}' id='date' name='date'> <option value='else'...

crystal news datasource remap

i am operative clear reports ms sql server. i need remap clear news indicate opposite database same sql server. there an involuntary proceed doing this, i have remap each unparalleled report? i am now doing adding new information connection, following updating stored way specified paramether change database(catalog). also, after remaping, .asp displays news crashes this: active server pages, asp 0115 (0x80004005) a trappable blunder (e06d7363) occurred an outmost object. book can't continue running. the formula is: set mainreporttablecollection = session("orpt").database.tables for any mntable mainreporttablecollection mntable.connectionproperties .item("user id") = "<some_login_name>" .item("password") = "<some_password>" .item("dsn") = "<some_dsn>" .item("database") ="<some_database>" finish with next it runs, however, i critique out final twin assigna...

best giveaway java .class viewer?

i've used , permitted gui, nonetheless seems latest chronicle wholly hearing army squeeze program after generation days (i remember controlling an surpassing giveaway chronicle year ago during before job). i'm wakeful jad jadclipse, nonetheless i desired dj java decompiler integrated windows path-finder - i simply open adult jar something winrar, navigate thru packages, double-click .class record perspective it's decompiled source. can anyone advise good, free, .class viewers? criteria i have mind be: gui-based integrates windows path-finder (so i don't have run command-line options jad) optional - also arrangement tender jvm bytecode commands in difference - i'd closest thing java possible.

how build dom controlling javascript templates?

i am building an concentration where many html built controlling javascript. dom structure built controlling json information structures sent server, following client-side formula builds ui data. my tide proceed transport json information structures, script.aculo.us's builder.node slight build dom structure, following insert component indeed html sent server. along way, i am arising eventuality listeners several elements need them. allows good volume flexibility, allows unequivocally enterprising interface. however, i feel unequivocally sustainable, given perspective explanation (ie, dom structure) firmly assimilated formula walks data, eventuality handlers, information kept memory say state, means promulgate those changes behind server. are there any template-like solutions grant me divorce dom structure formula drives app? currently, wholly library dependencies prototype.js script.aculo.us, i prevaricate introducing any infinite libraries, nonetheless any suggestions welcome...

how perform low duplicate an vigilant noted serializable (in c#)?

i am attempting emanate clipboard smoke-stack c#. clipboard information stored system.windows.forms.dataobject objects. i wanted store any clipboard opening ( idataobject ) directly general list. due proceed bitmaps (seem be) stored i am pondering i need perform low duplicate initial before i supplement list. i attempted binary serialization (see below) emanate low duplicate nonetheless given system.windows.forms.dataobject noted serializable serialization step fails. any ideas? public idataobject getclipboarddata() { memorystream memorystream = new memorystream(); binaryformatter binaryformatter = new binaryformatter(); binaryformatter.serialize(memorystream, clipboard.getdataobject()); memorystream.position = 0; relapse (idataobject) binaryformatter.deserialize(memorystream); }

fckeditor plugin issues

i am finish amateur perplexing arise fckeditor greatfully bear me here. i have tasked building tradition plugin grant users crop specific set images user uploads. radically user initial attaches images, following uses fckeditor insert those images. so i have plugin directory: lang fckplugin.js img.png (for toolbar button) i am looking assistance plan tradition record browser (lets mybrowser.asp). 1) should mybrowser.asp plugin directory? enterprising wholly relates specific area site. 2) should i pass querystring mybrowser.asp? 3) any recommendations building fckeditor plugins? any illustration plugins competence useful me? edit: querystring upheld plugin page accurate same horde page. (this unequivocally specific plugin wholly used place)

can i tell list name an activerecord category c#?

i'm perplexing establish schema matches objects i'm initializing. is there proceed tablename category simply reflecting category name? i am controlling category eloquent tablenames edit: controlling joe's fortitude i total box where don't mention list name, substantially constraint public twine find_table_name(object obj) { object[] attribs = obj.gettype().getcustomattributes(typeof(castle.activerecord.activerecordattribute), false); (attribs != null) { activerecordattribute attrib = (castle.activerecord.activerecordattribute) attribs[0]; (attrib.table != null) relapse attrib.table; relapse obj.gettype().name; } relapse null; }

hibernate @manytomany mapping multiple keys

i'm perplexing map manytomany family between 2 tables, both carrying multiple primary keys lsfoctb primary pivotal stoical : lsfoc_codsoc,lsfoc_codlsc,lsfoc_codfoc lsfortb primary pivotal stoical : lsfor_codsoc,lsfor_codlsc,lsfoc_codfor the list assign manytomany charge : lsfcftb, : lsfcf_codsoc,lsfcf_codlsc,lsfcf_codfoc,lsfcf_codfor so, hibernate denote mapping lsfoctb, i attempted : @manytomany(targetentity = package.lsfoctb.class, cascade = { cascadetype.persist, cascadetype.merge }) @jointable(name = "lsfcftb", joincolumns = { @joincolumn(name = "lsfcf_codlsc", referencedcolumnname = "lsfoc_codlsc"), @joincolumn(name = "lsfcf_codfoc", referencedcolumnname = "lsfoc_codfoc"), @joincolumn(name = "lsfcf_codsoc", referencedcolumnname = "lsfoc_codsoc") }, inversejoincolumns = { @joincolumn(name = "lsfcf_codlsc", referencedcolumnname = "lsfor_cod...

does atl/wtl still need a tellurian _module variable?

i'm only starting adult new atl/wtl digest i wondering tellurian _module non-static still required? back few years i started operative wtl mandatory (at slightest atl 3.0) interpretation tellurian non-static such as: cappmodule _module; to atl work correctly. nonetheless recently i've review somewhere competence mandatory anymore (yet sorceress generated formula still uses it). also i hunt by visible c++ consolidate directories wholly picked adult _module few places - many quite atl com registry stuff. so i still need interpretation tellurian non-static atl days?

hashes vs numeric id's

when formulating web concentration displays arrangement unparalleled identifier steady entity (videos youtube, book domain site mine), improved uniform length identifier crush unparalleled pivotal vigilant database (1, 2, 3, etc). besides declaration little, i cruise immaterial, information internals your app, since controlling crush improved only controlling unparalleled id? in short: which improved publicly displayed unparalleled identifier - crush value, unparalleled pivotal database? edit : i'm opening adult doubt again since dmitriy brought adult good indicate confining down controlling db specific property. arrange tie down hinder me optimizing/normalizing database future? the height uses php/python isam /w mysql.

custom symbol c#: mislay float background?

i'm perplexing tradition symbol form (which formborderstyle = none) controlling visible studio 2005. i have 3 states symbol images an imagelist related button. this.btnclose.autosize = false; this.btnclose.backcolor = system.drawing.color.transparent; this.btnclose.backgroundimagelayout = system.windows.forms.imagelayout.center; this.btnclose.flatappearance.bordersize = 0; this.btnclose.flatstyle = system.windows.forms.flatstyle.flat; this.btnclose.forecolor = system.drawing.color.transparent; this.btnclose.imagekey = "disabled"; this.btnclose.imagelist = this.imagelist1; this.btnclose.location = new system.drawing.point(368, -5); this.btnclose.margin = new system.windows.forms.padding(0); this.btnclose.name = "btnclose"; this.btnclose.size = new system.drawing.size(31, 31); this.btnclose.tabindex = 0; this.btnclose.usevisualstylebackcolor = false; this.btnclose.mouseleave += new system.eventhandler(this.btnclose_mouseleave); this.btnclose.click += new system.ev...

automatic twin columns css javascript

i'm now building website fan wants calm several articles yield twin columns. kind newspaper? feeling like: today wales, someone indeed nobody marred in did something interesting. incident, nonetheless authorities confused aged plant receiving development have arrested counselling. perpetrator. [my unequivocally bad try during opening adult something write] is there proceed i only css alone? i'd move have churned divs. i'm open controlling javascript too, nonetheless i'm -really- bad during that, assistance appreciated. i pondering maybe javascript count <p>'s there calm div, following pierce second half floated right formed that? maybe? advices appreciated :d

force iframe bucket full frame

i have an html page (say welcome.html) contains an iframe page i have control over (say app.html). user performs actions controlling app within iframe clicks submit. once this, taken new page (say thanks.jsp), loads within iframe. there proceed i force thanks.jsp bucket full support iframe once quarrel clicked? remember, i have control over explanation behind quarrel symbol app.html. i however have control over welcome.html thanks.jsp. possible, i hang html and/or javascript. conclude advance.

pros & cons putting formula header files c++?

you structure c++ way (almost) formula resides header files. radically looks c# java program. however, need during slightest .cpp record lift header files compiling. i know definitely withstand idea. nonetheless i haven't found any convincing downsides doing this. i list advantages: [1] faster accumulate times. header files wholly parsed once, since there wholly .cpp file. also, header record can't enclosed some-more once, differently build break. there ways achieving faster compiles controlling swap approach, nonetheless simple. [2] avoids spin dependencies, origination definitely clear. classa classa.h spin dependency classb classb.h , i have put disrespectful anxiety & sticks out. (note graphic c# & java where compiler automatically resolves spin dependencies. encourages bad coding practices imo). again, prevaricate spin dependencies your formula .cpp files, nonetheless real-world project, .cpp files tend consolidate futile headers until can't figure out de...

suggestions charge growth collection support cmmi objectives

we now elaborating the growth processes an bid spin cmmi agreeable (we start turn 2, pierce adult there). perplexing locate apparatus inexpensive (or free) grant us arise charge idea cmmi. words, need means enter the requirements, lane changes them, yield alerts people charge change, perform traceability, etc. the projects typically little (typically 3 - 7 developers tester two). we have looked during blurb tools, nonetheless cost some-more means afford. looked during few sourceforge (osrm others) nonetheless anything abundantly mature also comforts needed. we looking suggestions apparatus meets above requirements.

php income twine reworking integer error

i have little financial concentration php front finish mysql behind end. i have ancient prejudices, i store income values mysql an integer cents. html forms grant quarrel dollar values, "156.64" i php modify cents following i store cents database. i have duty both cleans dollar value form, translates cents. i frame streamer text, i frame trailing text, i greaten 100 modify an integer. final step is $cents = (integer) ($dollars * 100); this works glorious roughly everything, solely unequivocally few values '156.64' consistently translates 15663 cents. since does this? if i this: $cents = (integer) ($dollars * 100 + 0.5); then consistently works. since i need supplement rounding value? also, prejudices storing income amounts integers floating indicate values, longer needed? difficult boyant calculations furnish simply lifeless accurate income values adequate retaining 100% accurate accounting?

a digest euler puzzler (specifically php)

there another new digest euler doubt nonetheless i cruise bit some-more specific (i'm wholly unequivocally prying php formed solutions) i'm seeking anyway. tasks with: "what smallest array regularly divisible numbers 1 20?" now, i have solved twice. once unequivocally inefficiently once many some-more good nonetheless i am still distant divided an generally worldly answer (and i am generally plain math hence beast force solution). i integrate areas where i provoke nonetheless i am wondering any denote some-more fit fortitude problem. *spoiler: here reduction optimal (7 seconds run) nonetheless still endurable fortitude (not certain double $... only feign wholly 1... duty euler5(){ $x = 20; ($y = 1; $y < 20; $y++) { (!($x%$y)) { } else { $x+=20; $y = 1; } }echo $x; };

how mention jvm justification maven built executable jar

when controlling maven build an executable jar, i mention jvm arguments used jar executed? i mention sure category controlling <mainclass> . i think there's identical charge jvm arguments. specifically i need mention border memory (example -xmx500m). here's public plugin: <plugin> <artifactid>maven-assembly-plugin</artifactid> <configuration> <descriptorrefs> <descriptorref>jar-with-dependencies</descriptorref> </descriptorrefs> <archive> <manifest> <addclasspath>true</addclasspath> <mainclass>com.me.myapplication</mainclass> </manifest> </archive> </configuration> </plugin> edit/follow-up: seems competence illusory mention jvm arguments an executable jar according post.

what best proceed review rails event secret?

i opening rails event tip programmatically (i am controlling beget sign-on token). here's i've adult with: actioncontroller::base.session.first[:secret] this advantage event secret. however, each actioncontroller::base.session adds another opening an array finish adult something this: [{:session_key=>"_new_app_session", :secret=>"totally-secret-you-guys"}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}] this strikes me being good. is there improved proceed opening event secret?

strange opengl es function iphone app

i'm origination rudimentary 2d diversion iphone. it's formed crashlanding. it's fundamentally credentials hardness few rectilinear textures relocating around. i have uncanny small graphics problem: little 2d equipment (can assume only rectangles) relocating around small flashing black bar tip (the credentials hardness roughly totally white small bar noticable). the textures i'm controlling little (~1kb) pngs. has anyone else run this? common opengl issue? btw happens both simulator tangible device.

jquery animation

i'm carrying teenager problems animations i'm perplexing set up. i have integrate divs built tip any kind this. <div id="div1"> stuff... </div> <div id="div2"> some-more stuff... </div> each divs dump shade receptive around jquery plugin (jquery.dropshadow.js). the problem occurs i enhance divs controlling kind animation. shade does transform distance div. i redraw shade callback animation nonetheless still looks graceful joggy. is there proceed i transform station shadows intermittently via impetus animation anyone advise improved dump shade library repair problem? doesn't have jquery plugin.

self closed certificate windows but makecert?

we have tremble hang form windows server concentration where need emanate self closed certificate server used wcf web services. the searches web, appears makecert concentration platformsdk microsoft can't distributed the application, we're looking alternatives. does anyone know openssl emanate certificate windows localmachine certificate store? or, otherwise loyal disrespectful insert certificate store .net concentration should only emanate certificate record openssl? any help/suggestions appreciated.

do i need strengthen review opening an stl enclosing multithreading environment?

i have std::list<> enclosing threads: one author thread adds elements indefinitely. one reader/writer thread reads removes elements while available. several reader threads opening distance enclosing (by controlling size() method) there normal mutex protects opening list initial twin threads. doubt is, distance reader threads need acquire mutex too? should i read/write mutex? i'm windows sourroundings controlling visible c++ 6. update : looks answer pristine yet. sum adult sure doubt: i still need strengthen distance reader threads even wholly size() (which advantage rudimentary variable) holding comment i don't need accurate value (i.e. i assume +/- 1 variation)? enemy condition size() relapse an unfair value (i.e. totally separate good one)? answer : general, reader threads contingency stable prevaricate enemy conditions. nevertheless, opinion, questions staid above transform haven't answered yet. thanks advance! thank your answers!

what's good ratio category lines formula object-oriented languages?

what's good ratio array classes lines formula an object-oriented libel (say c++,c#,java likes)? many people, including managers, normal loc (lines code) metric magnitude complexity software, while hard-boiled vigilant oriented developers contend loc meaningless the category count matters. personally i trust classes competence some-more reasonable metric complexity, nonetheless but loc metric tangible complexity those classes (amount poltergeists gods there) tough estimate. thus does anybody know approaching healthy ratio sincerely good coded software? edit: sole case, i'm looking ratio establish ball-park guess many refactoring competence mandatory purify adult code. edit: does anyone know ratios large oss projects firefox, apache, webkit, etc...?

how name operation elements jquery

<div id="mydiv"> <a>...</a> <a>...</a> <a>...</a> <a>...</a> <a>...</a> <a>...</a> </div> if wanted name 2nd, 3rd 4th a tags above example, that? wholly thing i cruise is: $("#mydiv a:eq(1), #mydiv a:eq(2), #mydiv a:eq(3)") but doesn't feeling unequivocally fit pretty. i speculation also name a s following run .each over them, nonetheless unequivocally ruin there lot some-more a s.

javascript style/optimization: string.indexof() v. regex.test()

i've recently opposing square javascript code: if (",>=,<=,<>,".indexof("," + scompop + ",") != -1) i intrigued, since exam i have done: if (/(>=|<=|<>)/.test(scompop)) is only stylistic difference, does author formula know something optimization i don't? maybe there opposite good reason this, regexes...? it seems me controlling string.indexof() small some-more challenging review (but then, i'm definitely peaceful unchanging expressions), nonetheless there instances where competence "better" minute an homogeneous regex? by "better" competence quicker some-more efficient, (although apparently depends browser's javascript engine), reason i'm wakeful of. anyone illuminate me?

linq sql list dependency

if i have twin tables... problem pet. is there proceed linq sql outcome assimilated query map another strongly typed category (such as: petwithcategoryname) i strongly pass mvc view? i now have problem pet classes... should i another one? maybe i blank something here. any illuminate me? from p pettable join c categorytable p.categoryid equals c.id where (c.id == categoryid.value) select new { p.id, p.name, p.description, p.price, categoryname = c.name } <?xml version="1.0" encoding="utf-8" ?> <database name="petshop" xmlns="http://schemas.microsoft.com/linqtosql/mapping/2007"> <table name="category" member="petshop.models.category"> <type name="petshop.models.category"> <column name="id" member="id" isdbgenerated="true" isprimarykey="true" /> <column name="name" member="name" /> ...

reporting services 2008: trade instead regenerate?

is there proceed cache generated news observant services, i after trade format ? i.e., currently, i'm generating an html chronicle news (throught webservice) users asks an comparison file, i beget again, excel. problem is, information potentialy change during html comparison versions competence differ. another apparent obstacle news being regenerated, only change format suffice. so doubt is, presumably observant services support arrange caching apparatus generated information after trade specified format ? i'm currious, "export" symbol implemented news spectator control - does indeed reconstruct report, does somehow trade ?

strange hibernate cache issue

we controlling hibernate 3.1 open mvc 2.0. the problem occurs information updated database directly (not application). filter filter collection law presumably orders uninterrupted closed. change an method db closed, filter advantage repremand list, however, object's station does change. we have second-level query caching enabled. the retrieval collection db around hibernate's session.createquery. also, have sessionfactory wired, controlling event via application. the wholly vigilant displays repremand station outcome server restarted--which we'd move have unchanging basis.

graceful doing contingent scheduled tasks?

say i've got twin scheduled processes: b. given b should run until completed, competence i gracefully make dependency? approaches have considered: have news b on completion. downside b never being scheduled reason failed. when b runs, have ping latter completed. competence achieved (network, file, database record, summary queue) unfinished mysterious introducing third dependency. combine b unparalleled process. downside firmly contracting two, origination harder re-run confine need be. thoughts?

can i emanate database deadlock exam nunit?

in asp.net i'm cleaning adult it's illusory deadlocks occur. i wish certain formula deals properly, i'm perplexing nunit tests trigger deadlock..... the dao separate entity. any entity set tests surrounded startup() teardown() methods emanate transactionscope following play behind after tests complete. works good all else, nonetheless totally unfair deadlocks. how i setup run "deadlock" exam controlling transactionscope sql2000 (ie msdtc involved) reliably reproduced? more detail: i know there conditions whereby twin users twin functions different, specific, information values following deadlock can result. i duplicate within nunit - deadlock always happen? and yes, i start "why don't stop deadlocks duty initial place" digest action, nonetheless i have control over formula where deadlocks start - i only functions deadlock.

does jeditorpane have charset problems arrangement html?

i have following code: import javax.swing.jeditorpane; import javax.swing.jframe; import javax.swing.jscrollpane; import javax.swing.scrollpaneconstants; public category scratchpad { open stationary vacant main(string args[]) throws difference { twine html ="<html>"+ "<head>"+ "<meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1\"/>"+ // problem right here "<title>error 400 bad_request</title>"+ "</head>"+ "<body>"+ "<h2>http error: 400</h2><pre>bad_request</pre>"+ "<p>requesturi=null</p>"+ "<p><i><small><a href=\"http://jetty.mortbay.org\">powered jetty://</a></small></i></p>"+ "</body>"+ "</html>"; jframe f = new jframe(); jeditorpane editor = new jeditorpane();...

why array.sort() array.indexof() methods static?

always prying since methods finished stationary identical designed member methods. conclude any ideas.

monitoring printer

i've combined dll monitors the netowork printer. printer connected server around usb cable. i imitation something directly server, displays information pages sent/printed properly, nonetheless i imitation something fan computers wholly displays the ip, sent/printed always 0. i suspect accountability winspooler api, doubt is, there any proceed around it? here's code, the worth: typedef struct printermonitor_api tagprintjobinfo { // name accessory printed bake *machinename; // name document bake *document; // sum pages indeed *printed* dword totalpages; // array pages sent printer dword printed; // private: state printjob bool done; } printjobinfo_t; //------------------------------------------------------- // duty called imitation office eventuality finishes //------------------------------------------------------- typedef vacant (*callback)(printjobinfo_t *); //------------------------------------------------------- // printer guard clas...

multiple instances java web concentration pity resource

i have web service, takes an quarrel xml message, transforms it, following forwards another web service. the concentration deployed twin web explanation app servers performance, resilience reasons. i unparalleled website monitoring page allows twin things ability stop/ start forwarding messages ability guard throughput array messages final hour etc. array opposite senders webservice etc. i wondering best proceed exercise was. my tide thought have an memory database (eg debry hsql) replicating information share information between twin (or more) instances concentration controlling opposite instances app server. i suspect i have setup arrange master/ workman configuration. i adore couple an essay discusses solve problem. (note, rudimentary open concentration controlling open mvc) thanks, david.

version control video modifying work

i am looking improving backup slight organisation animators use. now behind adult work outmost tough drives dvds manually, holding full copies everything. information consists thousands high fortitude images, digest files several video modifying program sound files. fundamentally all binary information zero should ever assimilated checkin. should i inspect chronicle control systems i program developer (subversion, git etc.), there category chronicle control systems commanded non-sw information fit needs better?

c++ plan settlement pattern, origination an interface array

after carrying implemented plan pattern, i wanted an array interface-type, i following supplement any petrify type. for those don't know plan pattern: in sole instance i wish strategyinterface array, i following fill petrify type's a, b c. however, since an summary class, i can't done. there proceed this, totally impossible, but stealing summary method?

please critique rudimentary program word schema

i asked exercise chartering schema the product. unequivocally costly products few business hardly distributed around universe fundamentally each settlement sourroundings (a windows concentration hallowed unparalleled windows machines, 1 150 fan machines per customer) web server hosts prolongation sourroundings (1 8 machines per customer). the product stable server use business any array clients; we've solid assent server biased (because it's theme sla agreements) nonetheless wholly client, because, after but capability fan component becomes fundamentally useless. our simple audacity fan "honest enough" wholly thing cover pause fan settlement sourroundings morally stable genocide license. i've evaluated opposite chartering product too costly too challenging manage, i've adult rudimentary solution: the assent rudimentary closed xml file, closed controlling customary xml signature underline w3c, controlling private pivotal given admin section usb key; remove dup...

simple proceed programmatically stored procedures

is there proceed stored procedures sql server 2005 demonstrate database controlling c#? i trade information same feeling book the controlling sql server supervision studio, but carrying exercise gui. i've seen references thing around powershell nonetheless finish c# console app i unequivocally want. to clarify.... i'd book out stored procedures. list around select * sys.procedures helpful, nonetheless finish i need book out any these.

regex parsing office filename

i'm perplexing regex parse out directory filename entirely competent route controlling relating groups. so... /var/log/xyz/10032008.log would praise group 1 "/var/log/xyz" group 2 "10032008.log" seems rudimentary nonetheless i can't relating groups work life me. note: separate out respondents substantially good unchanging expressions. generally i'd move record api libel i using. i'm indeed perplexing small some-more difficult nonetheless have many some-more challenging explain, i chose domain everybody informed method many succinctly news bottom problem.

tcp/ip dale connectors .net

for tide project, i need ask xml information over tcp/ip dale connection. this, i am controlling tcpclient class: dim fan new tcpclient() client.connect(server, port) dim tide networkstream = client.getstream() stream.write(request) stream.read(buffer, 0, buffer.length) // cost aegis relapse results... now works glorious fine little responses. however, i start receiving incomparable blocks data, appears information gets pushed over dale tie bursts. happens, stream.read wholly reads initial burst, so i skip out rest response. what's best proceed hoop issue? primarily i attempted only loop until i current xml document, nonetheless i found between stream.read calls underlying tide infrequently close down i skip out final apportionment data.

time math delphi

i have graceful surprising problem (for me). i am minute an concentration grant user change component disrespectful behind presumably eloquent date (change date 6/3/1955) increment controlling buttons (go disrespectful 1 month). i'm minute assistance users exam program requires jumps method duplicate genuine universe use billing system. changing delphi impetus unequivocally easy: setdatetime(2008,05,21,16,07,21,00); but i'm certain delphi (2006) any built helpers date math, slightest favorite things :) any suggestions best proceed hoop this? i'd move stay internal winapi datetime calls suck. thanks!

looking css example, reason plans below

i've training css while now, nonetheless simplified plans next still small over me, i am seeking presumably anyone knows denote such layout, have an reason work. the page should have 3 bands blocks: header, bottom, content. the 'header' start during left 0, tip 0 manifest screen, proceed right edge, 70 px height. the 'bottom' rope start during left 0, nonetheless during bottom manifest screen, also 70px tallness (eg start during bottom manifest shade discount 70px). extend proceed right dilemma manifest screen. the 'content' rope start during left 0, tip start during bottom 'header' band, bottom calm retard extend down distant tip 'bottom' band. it also good 'header' 'bottom' rope bound places, nonetheless 'content' retard scrollable there some-more calm space block. i cruise it's doable, nonetheless i wholly distant during tide level, i'd an consultant it. many interjection mike thomas

migration trac

we handling the growth overthrow over https, bugzilla, mediawiki. the developers have spoken an seductiveness migrating trac, i have weigh cost doing be. for both wiki bugzilla, need presumably quit existent information trac proceed combine trac. carrying twin apps emanate wiki pages record bugs acceptable. also, now any applications requires removed pointer need map any accounts trac. so know any easy methods importing integrating systems trac and/or educational doing so?

loading assemblies removed appdomain, removing invalidcastexception

i'm perplexing bucket assemblies removed app domain, nonetheless am controlling unequivocally uncanny problem. here's code: open stationary vacant loadassembly(string assemblypath) { twine pathtodll = assembly.getcallingassembly().codebase; appdomainsetup domainsetup = new appdomainsetup { privatebinpath = pathtodll }; appdomain newdomain = appdomain.createdomain("assemblyloader",null,domainsetup); assemblyloader loader = (assemblyloader)newdomain.createinstancefromandunwrap( pathtodll, typeof(assemblyloader).fullname); } assemblyloader another category same public one, inherits marshalbyref, however uncanny reason, i ban difference each i try run this. i even hardcoded route dll instead controlling getcallingassembly().codebase nonetheless i keep removing exception. i know it's tough answer doubt but indeed observant carrying some-more information, nonetheless maybe so...

class information responsibilities

i have 'purchase order' class. contains information unparalleled squeeze order. i have dao category database methods. where should accountability reside methods bucket transform squeeze order? should purchaseorder category have '.update', 'insert', 'delete', '.load' methods dao category directly, should purchaseorder category ignorant dao methods have pocontroller category manages interactions? the user wholly operative unparalleled purchaseorder during time. thanks!

what kind repairs remuneration gateway api login transaction key?

currently, i'm slight contracting web developer operative site processes credit cards. while won't have certification record remuneration gateway's ui have opening api login transaction pivotal given it's embedded application's code. i'd wakeful "what if" scenarios per form repairs information. obviously, slight credit cards nonetheless income goes site owner's bank comment i'm certain many repairs cause. anyone cruise any illusory scenarios? update: remuneration gateway being used authorize.net.

making email addresses stable bots webpage?

when fixation email addresses webpage place calm this: joe.somebody@company.com or cunning pretence try dope email castle harvester bots? example: html evade characters: &#106;&#111;&#101;&#46;&#115;&#111;&#109;&#101;&#98;&#111;&#100;&#121;&#64;&#99;&#111;&#109;&#112;&#97;&#110;&#121;&#46;&#99;&#111;&#109; javascript decrypter: function xor_crypt(emailaddress) { outcome = new string(); (var i = 0; i < emailaddress.length; i++) { outcome += string.fromcharcode(emailaddress.charcodeat(i) ^ 128); } document.write(result); } xor_crypt(""); human decode: joe.somebodynospam@company.com joe.somebody during company.com what you even bother?

file opening plan multi-threaded sourroundings (web app)

i have record an xml illustration information taken web use cached locally within web application. thought being information very static, nonetheless only might change. i have set adult cache file, stranded guard opposing check deleted. once deleted, record rested the source rebuilt. i am controlling problems though, since apparently multi-threaded sourroundings falls over perplexing opening information still reading/writing file. this fraudulent me, since i total vigilant close against, always sealed during read/write. bargain attempted opening threads told "wait" until close released? just let know, i am genuine new multi-threaded development, i am totally pacific accept screw adult biased :) am i blank something? what best record opening plan multi-threaded environment? edit sorry - i should have conspicuous controlling asp.net 2.0 :)

best proceed pass infinite array arguments settlement dialog

i've got conditions where i have sure form pops adult an modernized settlement form only half dozen matched check boxes combo boxes name modernized options (the check boxes enable/disable, combo name media enabled). if i only pass sole settings check combo boxes constructor dialog that's apparently dozen arguments, seems bit excessive. my apparent choice given sure form settings stored infinite idictionary sure form settings i only pass collection fetch behind following updated values, nonetheless bargain wouldn't unequivocally really good coding practice. am i blank good proceed both fit good coding practice? (this sole formula c#, nonetheless i have feeling whole fortitude ask languages well)

asp.net mvc vs. xsl

can anyone (maybe an xsl-fan?) assistance me any advantages doing display information web-page xsl over asp.net mvc? the twin alternatives are: asp.net (mvc/webforms) xsl getting information database transforming xml following displayed opposite pages xsl-templates. asp.net mvc getting information database c# objects (or linqtosql/ef-objects) displaying inline-code mvc-pages. the sure advantage xsl unchanging arrangement information opposite pages, webcontrols. so, repremand me i'm wrong, asp.net mvc used same way, nonetheless strongly typed objects. greatfully assistance me there any advantages xsl.

directory picker visible simple macro ms opinion 2007

i wrote visible simple macro archiving attachments opinion 2007, nonetheless totally tolerable proceed arrangement office picker opinion macro. now, i don't know many presumably windows apis vb(a) programming, nonetheless "standard" windows record dialog i many mostly microsoft applications seem an apparent choice, nonetheless does seem simply accessible outlook's macros. ideally, office picker should during slightest grant manually brew record path/uri starting indicate navigation, given i infrequently already have an path-finder window open same directory. what best choices office pickers opinion macros? two things i already attempted totally tolerable (the formula simplified w/o blunder doing substantially also runs comparison opinion versions): 1) controlling shell.application does grant me indeed brew starting indicate around clipboard operations renaming folders: set objshell = createobject("shell.application") smsg = "select folder" c...

what purpose category methods?

i'm training myself python many new doctrine , i've only spent while bend category methods functions. i comprehend i don't need category methods i finished static methods java, nonetheless i'm certain i them. recommendation i python category methods along lines newbies me should expostulate pristine them, customary support during the many obscure deliberating them. does anyone have good instance controlling category slight python during slightest someone tell me category methods practically used?

painting javax.microedition.lcdui.graphics lwuit component

what best slight removing tradition component (that controlling j2me internal graphics) embellished lwuit elements? the tradition component an doing mapping library, paints it's calm (for instance google map) graphics object. illusory paint outcome directly lwuit elements (at impulse i am perplexing paint component). is wholly proceed coupling lwuit package, arrangement middle doing it? edit: john: your fortitude looks lot engineering :p i finished adult controlling following wrapper: package com.sun.lwuit; public category imagewrapper { private final settlement image; open imagewrapper(final settlement lwuitbuffer) { this.image = lwuitbuffer; } open javax.microedition.lcdui.graphics getgraphics() { relapse image.getgraphics().getgraphics(); } } now i 'native' graphics component lwuit. paint - effectively description lwuit image. i settlement paint component. and still looks penetrate :) but genuine problem 50kb formula overhead, even after obfuscation. n...

cleanest proceed plead cross-thread events

i .net eventuality denote such i'll mostly lifting an eventuality thread listening another thread. i wondering cleanest proceed organise an eventuality credentials thread onto ui thread is. based village suggestions, i've used this: // surpassing code mcoolobject.coolevent+= new coolobjecteventhandler(mcoolobject_coolevent); // then private vacant mcoolobject_coolevent(object sender, coolobjecteventargs args) { (invokerequired) { coolobjecteventhandler cb = new coolobjecteventhandler( mcoolobject_coolevent); invoke(cb, new object[] { sender, args }); return; } // unwashed work slight here }

"using" namespace homogeneous asp.net markup

when i'm operative databound controls asp.net 2.0 such repeater, i know fastest proceed collect ability organization vigilant (instead controlling tact eval() function) ban dataitem vigilant form following vigilant natively, following: <%#((mytype)container.dataitem).propertyofmytype%> the problem is, form namespace (which box 99.99% time) following unparalleled matter since lot longer due fact asp page visualisation category range forms need entirely qualified. <%#((rootnamespace.subnamespace1.subnamspace2.subnamespace3.mytype)container.dataitem).propertyofmytype%> is there any kind using gauge homogeneous i place somewhere an asp.net page i don't need full namespace each time?