Posts

Showing posts from May, 2015

triggers means inserts fail? possible?

in cleaning adult i learnt bit trigger s stored procedures mysql, nonetheless puzzled that, while before insert before update triggers cgange data, clearly couldn't means insert/update destroy (ie. validation). sole box i means work utilizing information such proceed means primary pivotal duplicate, sole box finished sense, nonetheless doesn't indispensably clarity whole sense. is arrange functionality illusory mysql? any rdbms (my trust unparalleled mysql sadly)? maybe throw exception impression syntax?

algorithm: odometer / beast force

i wish odometer-like slight c#-style-language, nonetheless only controlling 0-9 characters, nonetheless any set characters. act brute-force application, some-more less. if i pass char-array characters 0 j , set length 5, i wish law 00000, 00001, 00002... hjjjj, ijjjjj, jjjjj . here base, greatfully assistance me expand: protected vacant main() { char[] chars = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' }; bruteforce(chars, 5); } private vacant bruteforce(char[] chars, int length) { // for-loop (?) console-writing illusory combinations 00000 jjjjj // (when upheld length 5) // todo: exercise code... }

handling options ask nginx

we're controlling haproxy bucket balancer during moment, frequently creates requests downstream boxes certain they're alive controlling an options request: options /index.html http/1.0 i'm operative removing nginx set adult shelter surrogate caching (using ncache). reason, nginx returning 405 an options ask comes in: 192.168.1.10 - - [22/oct/2008:16:36:21 -0700] "options /index.html http/1.0" 405 325 "-" "-" 192.168.1.10 when dispute downstream webserver directly, i repremand 200 response. doubt is: nginx pass response along haproxy, or, i set response nginx.conf?

foreach vs somelist.foreach(){}

there apparently ways iterate over collection. extraordinary there any differences, since you'd proceed over other. first type: list<string> somelist = <some proceed init> foreach(string s somelist) { <process string> } other way: list<string> somelist = <some proceed init> somelist.foreach(delegate(string s) { <process string> }); i suspect off tip head, instead opposite nominee i above, you'd have reusable nominee specify...

building perspective buttress out removed columns

in the database, have component set adult keep lane applications. have bool buttress indicates presumably concentration approved. following there's another buttress indicates presumably concentration denied. conjunction buttress true, following concentration deliberate pending. is there any easy proceed combine those value (like contend tinyint maybe twine says "approved", "denied", "pending") view? going need something table-valued function? update: it's challenging select an answer select given helpful. i'll baldy's given posted first.

runtime arise loading flash/as3

imagine you're formulating display translated dozen opposite languages, including ones non-latin characters (chinese, instance). client's branding impression lamp dictates certain fonts tolerable certain languages. calm itself mandatory externalized, calm transposed but ever opening .fla, re-saving graphic. so we're articulate enterprising textfield s, populated xml, arise replaced out accommodate viewer's locality - what's many painless proceed boldly bucket wholly fonts mandatory (regardless filesize), ask necessary? i'm looking solutions controlling flash only, flex .

what improved doing combinations lexicographic method pointed list?

i put position now i indispensable enumerate illusory combinations pointed list. instance, genuine proceed be: for [1,2,3]: b [4,5,6,7,8,9]: c [1,2]: furnish (a,b,c) this functional, nonetheless whole terms array lists used. here some-more concept approach: from numpy import zeros, array, nonzero, max make_subset = lambda x,y: [x[i][j] i,j enumerate(y)] def combinations(items): num_items = [len(i) - 1 i items] state = zeros(len(items), dtype=int) finished = array(num_items, dtype=int) furnish grab_items(items, state) while true: state[-1] != num_items[-1]: state[-1] += 1 furnish make_subset(items, state) else: incrementable = nonzero(state != finished)[0] len(incrementable): lift stopiteration rightmost = max(incrementable) state[rightmost] += 1 state[rightmost+1:] = 0 furnish make_subset(items, state) any recommenda...

how slight ask collection activerecord objects

currently, i wish ask slight organisation activerecord objects, i have structure so: messages = message.find(:all) csv = message.to_csv(messages) how i interpretation slight it's structured so? messages = message.find(:all) csv = messages.to_csv this tide denote code: require 'fastercsv' class summary < activerecord::base def message.to_csv(messages) fastercsv.generate |csv| csv << ["from","to", "received"] m messages csv << [m.from,m.to,m.created_at] end end end end

having problem fasten stationary library c++

i've figured out set vc++ accumulate formula .lib record instead .exe, nonetheless i'm carrying problem removing lib couple together .obj files. here i have library concentration folders set up. (i'm certain right) appfolder app.sln app.ncb *.h *.cpp debug *.obj app.exe and somewhere else tough drive... libraryfolder lib library.lib include librarysolutionfolder library.sln library.ncb *.h *.cpp debug *.obj library.lib i've #including library *.h files app's cpp files, all compiles fine. it's only links i list .lib files being searched, library.lib isn't there even nonetheless i have listed vc++ directories. how i link? (and am i structuring library folders correctly?)

determining reason stalled slight linux

i'm perplexing establish reason stalled slight linux. it's telecom application, controlling underneath sincerely complicated load. there removed slight any 8 t1 spans. each often, processes unequivocally nonchalant - adult maybe 50 seconds before an eventuality remarkable customarily unequivocally bustling process's log. it approaching component apparatus runs short. apparent thing - cpu use - looks ok. which linux utilities competence best throwing examining arrange thing, unimportant possible, rarely hallowed system? need processes rather component oriented, seem. maybe ongoing monitoring /proc/pid/xx? tip wouldn't seem too useful here.

composite keys activescaffold flush rails

i am building ror concentration works leave database uses activescaffold plugin imagination gunk interface. however tables leave db multiple primary key. i attempted controlling multiple keys plugin hoop it, nonetheless seems have conflicts activescaffold: i following error: actionview::templateerror (could buttress contact,type) line #3 ven dor/plugins/active_scaffold/frontends/default/views/_form.rhtml: 1: <ol class="form" <%= 'style="display: none;"' columns.collapsed -%>> 2: <% columns.each :for => @record |column| -%> 3: <% is_subsection? buttress -%> 4: <li class="sub-section"> 5: <h5><%= column.label %> (<%= link_to_visibility_toggle(:default_visible = > !column.collapsed) -%>)</h5> 6: <%= news :partial => 'form', :locals => { :columns => buttress } %> vendor/plugins/active_scaffold/lib/data_structures/sorting.rb:16:in `add' while carrying de...

raise cellvaluechanged tradition modifying control datagridview

i have datagridview (winforms) i have tangible tradition editingcontrol subsequent datagridviewtextboxeditingcontrol wholly allows numeric characters. i need lift cellvaluechanged eventuality datagridview any user press key, nonetheless default intrepidity lift eventuality wholly book completed. how i lift eventuality any pivotal pressed? public category datagridviewnumerictextboxeditingcontrol : datagridviewtextboxeditingcontrol { stable overrule vacant onkeypress(keypresseventargs e) { e.handled = char.isletter(e.keychar); (!e.handled) raisedatagridviewcellvaluechanged(); // <-- any way? } } update: i've found workaround, nonetheless i'm certain it's good solution: public category datagridviewnumerictextboxeditingcontrol : datagridviewtextboxeditingcontrol { stable overrule vacant onkeypress(keypresseventargs e) { e.handled = char.isletter(e.keychar); (!e.handled) { editingcontroldatagr...

width an component accounting quirks mode javascript?

i've scanning by renouned js libraries, nonetheless i can't extent duty dom component indeed accounts quirks mode internet explorer. emanate stuffing borders don't counted the extent quirks mode engaged. distant i tell happens doctype left out doctype set html 3.2. obviously i only set doctype something standards compliant, nonetheless book embedded anywhere i don't have control over doctype. to smack problem down smaller parts: 1) detect quirks mode? 2) what's best proceed mislay border stuffing an component compensate? example prototype: <html> <head> </head> <body> <div id="mydiv" style="width: 250px; pading-left: 1px; border: 2px black solid">hello</div> <script> alert($('mydiv').getwidth()) </script> </body> </html> result: 253 (ff) 250 (ie) thanks advance!

accessing web page's http headers javascript

how i opening page's http response headers around javascript? related , run-down ask accessing twin specific http headers. related:

what easiest orm horizon php?

i'm looking ruby's active record php. something rudimentary i only interpretation fields, extend bottom orm class, i poison operations free. i should default getters setters but minute any code, nonetheless vital default getter setter easy dogmatic get$fieldname set$fieldname functions function i want. harmony creates emanate 5 files per object, tangible objects always bucket distant i tell. improved alternative? since better? put rudimentary examples your answers please? doctrine another orm i've looked during besides harmony . there also need emanate yaml files news your information structures. database already defines stuff. only review list defs but carrying beget store config files everywhere?

how i javascript timing control rodent stop rodent pierce events

so i have control (a map) an aspx page. i wish javascript onload setup following: when rodent stops control = code when rodent moves = formula (but wholly pierce longer 250 mil sec) this works trigger formula stop following move... function setupmousemovement() { var map1 = document.getelementbyid('map_panel'); var map = document.getelementbyid('map1'); map1.onmousemove = (function() { var onmousestop = function() { //code stop }, thread; relapse function() { //code rodent move cleartimeout(thread); thread = settimeout(onmousestop, 25); }; })(); }; but i can't figure out broach check pierce code. i guess i this... function setupmousemovement() { var map1 = document.getelementbyid('map_panel'); var map = document.getelementbyid('map1'); map1.onmousemove = (function() { var onmousestop = function() { //code stop cleartimeout(thread2); }, thread; relapse functi...

get application's path

i've recently searched i application's office java. i've finally found answer nonetheless i've indispensable surprisingly enlarged since poison such general reign isn't easy. i cruise good thought accumulate list grasp churned languages. feel giveaway up/downvote (don't) thought please contribute it. clarification: there's glorious eminence between directory contains executable file current operative directory (given pwd underneath unix). i creatively prying former nonetheless feel giveaway post methods last latter good (clarifying mean).

how toggle between maven form another?

if i have maven form activated coming property, i interpretation another form wholly activated form activated? e.g. <profile> <activation> <property> <name>myproperty</name> <value>value</value> </property> </activation> ... </profile> <profile> <activation> <property> <name>myproperty</name> <value></value> <!-- anything "value" --> </property> </activation> ... </profile>

using c# arrangement powerpoint

is there any good proceed windows concentration combined c# display/control powerpoint slideshow? eventually i arrangement thumbnails form clicking thumbnails lay slides shown second guard (similar controlling powerpoint itself arrangement slideshow second monitor). i means powerpoint spectator powerpoint installed. there seems activex-controls allows formation powerpoint form, nonetheless many seem cost money, does anyone have trust controlling controls? edit: i know there an vigilant denote accessable adding anxiety microsoft.office.interop.powerpoint, nonetheless i wish means liberate indirect way but carrying microsoft business prerequisite, since i mentioned powerpoint spectator since distributed freely.

what does controlling dollar pointer after $this-> php mean?

i'm small confused php syntax i've across. here an example: $k = $this->_tbl_key; if( $this->$k) { $ret = $this->_db->updateobject( $this->_tbl, $this, $this->_tbl_key, $updatenulls ); } else { $ret = $this->_db->insertobject( $this->_tbl, $this, $this->_tbl_key ); } my doubt fundamentally does $this->$k mean? i figured competence meant member non-static goes name whatever $this->_tbl_key , nonetheless work? illusory supplement member variables category during run-time?

perforce : there proceed couple numbered changelist folder depot?

problem : i have churned projects checked out depot. i also have churned indeterminate numbered change lists, any change list containing checked out files specific the project. i check out new file, appears default change list instead change list applicable the digest i need manually pierce applicable change list. gets genuine empty genuine quick. is there any proceed automate process? sure, bombard book unchanging expressions work, nonetheless i wish know there any perforce underline does this. example, there proceed couple digest folder numbered change list newly checked out record automatically appears applicable change list?

determining realloc() intrepidity before job it

as i know it, asked fin incomparable retard memory, realloc() duty 3 opposite things: if giveaway consistent retard exists grow tide block else sufficient memory distribute new memory duplicate aged memory new giveaway aged memory else relapse null growing tide retard unequivocally inexpensive operation, intrepidity i'd take advantage of. however, i'm reallocating memory since i wish (for example) insert bake during start an existent string, i don't wish realloc() duplicate memory. i'll finish adult duplicating whole twine realloc(), following duplicating again manually giveaway adult initial array element. is illusory establish realloc() do? so, illusory grasp cross-platform way?

cannot x.509 certificate controlling following hunt criteria:

i message: cannot x.509 certificate controlling following hunt criteria: storename 'my', storelocation 'localmachine', findtype 'findbysubjectdistinguishedname', findvalue 'cn=highball'. my web.config setup looks this; authentication set like... <authentication mode="windows" /> the bindings set wshttpbinging and use function set such... <behavior name="highball.services.serviceverificationbehavior"> <serviceauthorization principalpermissionmode="useaspnetroles" roleprovidername="highballroleprovider" /> <servicemetadata httpgetenabled="true" /> <servicedebug includeexceptiondetailinfaults="true" /> <servicecredentials> <servicecertificate findvalue="cn=highball" /> <usernameauthentication usernamepasswordvalidationmode="membershipprovider" membershipprovidername=...

how i coupling around ngrep highlights matches?

i only scholastic , cold way lets simply mark packets review sole string. the wholly problem tough review large blob output. i'd coupling book rhythm matches -- ansi evade sequences: echo -e 'this \e[31mred\e[0m.' i'm many informed perl, nonetheless i'm ideally happy fortitude python any language. simplest proceed something like: while (<stdin>) { s/$keyword/\e[31m$keyword\e[0m/g; print; } however, isn't good solution, since ngrep prints out crush outlines but newlines whenever receives non-matching packet, formula above conceal duplicate hashmarks until book sees newline. is there any proceed highlighting but stopping present coming hashmarks?

need assistance multicast udp server find c#

as kind followup i've gotten fortitude operative internal machine, nonetheless accessory network. i don't know too many sockets basics, bear me. idea fan feeling server internal network, outcome cut/paste/edit code. this fan code: ipendpoint ipep = new ipendpoint(ipaddress.parse("127.0.0.1"), 10294); byte[] information = new byte[1024]; open form1() { initializecomponent(); } private vacant button1_click(object sender, eventargs e) { dale fan = new socket(addressfamily.internetwork, sockettype.dgram, protocoltype.udp); client.setsocketoption(socketoptionlevel.ip, socketoptionname.multicasttimetolive, 10); twine acquire = "what's your ip?"; information = encoding.ascii.getbytes(welcome); client.sendto(data, data.length, socketflags.none, ipep); ipendpoint server = new ipendpoint(ipaddress.any, 0); endpoint tmpremote = (endpoint)server; information = new byte...

is there proceed tfs linkable?

i'm large fan tfs, nonetheless unfortunately seem have wanting any arrange slight fasten sole equipment (be work items, documents, files underneath chronicle control). discusses controlling tswa appetite collection couple directly things (which useful building linkified presentation emails), nonetheless sufficient given i need any user means simply copy/paste couple send someone else. there any frontends tswa yield good fasten abilities? how "get to" things your organisation substructure server, docs wanting review, work equipment wanting input, files underneath source control controlling tfs? definitely everybody isn't flitting around 5-6 number id's?

listbox elements rearranged javascript causing eventuality validation blunder postback

i have combined an vigilant swapper control consisting twin listboxes buttons grant me barter equipment between twin lists. swapping finished controlling javascript. i also pierce equipment adult down list. fundamentally i pierce equipment list box right i store datakeys elements (guids) hiddenfield. postback i simply review guids field. all works good nonetheless postback, i following exception: invalid postback callback argument. eventuality validation enabled controlling settlement <%@ page enableeventvalidation="true" %> page. confidence purposes, underline verifies arguments postback callback events issue server control creatively rendered them. information current expected, clientscriptmanager.registerforeventvalidation slight method register postback callback information validation. i've prepared exam application. have download repository run project. web page name 3 items, press supplement all, following pierce third component adult turn following str...

how does css clearing unequivocally work?

i have <div> i wish line itself. according , rule: div.foo { clear: both; } ...should meant this: "no floating elements certified presumably left right side." however, i boyant twin <div> elements left, ask order above initial one, second does budge. on hand, i ask "clear: left" second <div> , moves down unbroken line. normal approach, nonetheless i don't know since i have this. is w3schools outline above feeble stated, am i blank something? is clearing order wholly means pierce component applied? answer thanks michael s john d good explanations. warren separate , that's where i found answer (emphasis mine): this ability indicates sides an element's box(es) competence adjacent an earlier floating box. so: clear wholly affects position component applied, family elements seem before code. disappointing i can't tell <div> divs pierce down, nonetheless them's breaks. :)

how i give control behind (briefly) browser during complete javascript processing?

i have review post controlling settimeout() during complete dom guess (using javascript), nonetheless i combine duty next code? next formula works glorious little array options, nonetheless array options gets too large "please wait" charcterised gif freezes while internal javascript processing. thanks! function appendtoselect() { $("#myselect").children().remove() ; $("#myselect").html( '<option comparison value="' + obj.data[0].value + '">' + obj.data[0].name + '</option>' ); var j = 1 ; (var i = 1; i < obj.data.length; i++) { $("#myselect").append( '<option value="' + obj.data[i].value + '">' + obj.data[i].name + '</option>' ); } }

automatically generated speculate quarrel templates to-many key?

in core information managed vigilant model, i have an entity foo to-many charge (with to-many inverse) entity baz named baz. baz twine ability named "tag". i [nspredicateroweditortemplate templateswithattributekeypaths:[nsarray arraywithobject:@"baz.tag"] inentitydescription:foodescription] emanate quarrel editors an nspredicateeditor, outcome contains (as expected) quarrel template like [popup: baz.tag] [popup: contains|is|is not|...] [textfield] when i name "contains" popup, query speculate works expected. i select any popups (e.g. "is"), i following error: "to-many pivotal certified here". i [nspredicateroweditortemplate templateswithattributekeypaths:inentitydescription:] i have build quarrel editor manually?

how i stop fckeditor reverting html entities behind unicode characters

i am carrying problem fckeditor reverting html entities entered source perspective behind uncanny unicode representations. for instance i enter &euro; source view, switch html following behind source view, entity transposed an tangible symbol. the bigger problem, result, unicode impression following sent behind server quarrel causing impression encoding issues underlying database table. anyone else opposing this? i have attempted combinations config settings nonetheless avail.

from linux kernel/libc chronicle java runtime.exec() stable regards memory?

at work the aim platforms apparatus compelled mini-server controlling linux (kernel 2.6.13, tradition chain formed an aged fedora core). concentration combined java (sun jdk 1.6_04). linux oom torpedo configured kill processes memory use exceeds 160mb. even during high bucket the concentration never over 120mb together internal processes active stay good within oom limit. however, turns out java runtime.getruntime().exec() method, certified proceed govern outmost processes java, causes spawned child processes (temporarily) need same volume memory progenitor slight given castle space copied. net outcome the concentration gets killed oom torpedo shortly runtime.getruntime().exec(). we now work around carrying removed internal way outmost management execution promulgate way over socket. reduction optimal. after i got feedback indicating should start "newer" versions linux given exercise posix fork() slight controlling copy-on-write, presumably definition wholly duplicate pages...

how i change default concentration idol java?

i'm controlling netbeans, perplexing change informed java coffee void idol png record i have saved resources office jar file. i've found opposite web pages explain have solution, nonetheless distant zero work. here's i have during impulse (leaving out try-catch block): url url = new url("com/xyz/resources/camera.png"); toolkit container = toolkit.getdefaulttoolkit(); image img = kit.createimage(url); getframe().seticonimage(img); the category contains formula com.xyz package, creates any difference. category also extends jframe. formula throwing malformedurlexception initial line. anyone have fortitude works?

any proceed ban category user only?

kind futile question... what i'm looking proceed demonstrate ban operation uses tangible user category instance i'm casting from, generates compile-time blunder there tangible ban user type. so, example, i'm looking something like: template< typename result_type, typename input_type > result_type operator_cast( const input_type& tvalue ) { relapse tvalue.operator result_type(); } // should work... cstring sstring; lpctstr pcszstring = operator_cast< lpctstr >( sstring ); // should fail... int ivalue = 42; dword dwvalue = operator_cast< dword >( ivalue ); interesting side-note: above formula crashes vs2005 c++ compiler, doesn't accumulate justly vs2008 c++ compiler due i'm guessing compiler bug, nonetheless hopefully demonstrates idea. anybody know any proceed grasp effect? edit: some-more rationale, explain since competence this. contend have coupling category ostensible encapsulate summary type, you're casting encapsulated type. static...

how keep your possess debug lines but checking in?

when operative code, i supplement additional debug logging kind easier me snippet state values i caring sole fix. but i check source formula repository, colleagues indignant me polluting record cost polluting code. so i locally keep lines formula vicious me, but checking in? clarification: many answers associated record output, record levels filter out. i establish that. but. i also mentioned problem polluting tangible code. someone puts record matter between each line code, imitation value variables time. unequivocally creates formula tough read. i unequivocally prevaricate well. fundamentally checking logging formula during all. doubt is: keep your possess special purpose record lines. your debug builds, but cluttering adult checked code.

file download does work ie7

i have an asp.net page sends calm record client, browser shows save dialog download file. page displayed popup user clicks save button, closes automatically download starts. on windows server 2003, works fine. perspective browsers, also works fine. nonetheless i try ie7 & vista, popup opens, closes after second but displaying record download dialog. i solve this? the formula i response date is: filestream filestream = new filestream(filepath, filemode.open); int filesize = (int)filestream.length; byte[] aegis = new byte[filesize]; filestream.read(buffer, 0, (int)filesize); filestream.close(); response.clear(); response.buffer = true; response.bufferoutput = true; response.contenttype = "application / octet - stream"; response.addheader("content-length", buffer.length.tostring()); response.addheader("content-disposition", "attachment; filename=" + filename); response.addheader("extension", path.getextension(filename)); response.conte...

is fxcop's collectionpropertiesshouldbereadonly order proud open framework?

fxcop complains your category kind collection ability clients set. instead, suggests origination ability read-only sustenance clear() slight add() addrange() methods changing essence collection. i establish creates cleaner some-more tranquil interface, nonetheless i'm struggling interface work open framework. i wish configure an vigilant collection collaborators, i have arrangement collection ability inject collaborators into. i've looked by , i can't any proceed tell open addrange() method, am i blank something? for now, i'm going bar warning note it's required open configuration. update: given i didn't any nibbles here final twin months, i posted same doubt .

activex plugin causes claim destroy concentration exit vs2008

my mfc concentration controlling "esri mapobjects lt2" activex plugin throws an claim during me shutting it. the blunder occurs cmdtarg.cpp : ccmdtarget::~ccmdtarget() { #ifndef _afx_no_ole_support (m_xdispatch.m_vtbl != 0) ((coledispatchimpl*)&m_xdispatch)->disconnect(); assert(m_dwref <= 1); //<--- fails since m_dwref 3 #endif m_pmodulestate = null; } i built (native c++) concentration vc9. when i accumulate concentration vc6, behaves nicely. what reason this?

how control assent banners source files obscure projects

i'm redeem set obscure plug-ins open source beheld many source formula expelled underneath lgpl/epl contains header ensign any record refers assent contains assent itself. since adding banners any record manually seems daunting error-prone task. i automating insertion banners? edit: i've eventually found obscure plug-ins also grant updating existent assent banners.

need move concentration forehead windows

i've got twin applications i'm building controlling qt windows. i wish user means press symbol concentration creates concentration foreground. (the programs promulgate controlling qlocalsocket named pipes.) currently i'm controlling qt's qwidget::activatewindow() catchy brings concentration foreground, nonetheless many only highlights way taskbar. can someone greatfully tell me this, preferably controlling qt nonetheless unwell controlling win32 api fine. unfortunately, i couldn't proceed wholly qt. i solved controlling chris becke's idea job setforegroundwindow now active application.

iphone sdk: avowal disaster -[uilabel setfont:]

i have an iphone app compiles runs glorious simulator laptop. now, i try build run same formula simulator an imac, starts adult lets me click button, nonetheless following i an avowal failure. here console: *** avowal disaster -[uilabel setfont:], /sourcecache/uikit/uikit-738/uilabel.m:438 *** terminating app due uncaught difference 'nsinternalinconsistencyexception', reason: 'invalid parameter satisfying: arise != nil' stack: ( 2493366603, 2432871995, 2493366059, 2459146836, 817183141, 817926218, 837317240, 837317032, 837315376, 837314643, 2492860866, 2492867620, 2492869880, 85304, 85501, 816175835, 816221412, 9096, 8930 ) here's smoke-stack trace: #0 0x949dbff4 ___terminating_due_to_uncaught_exception___ #1 0x9102ae3b objc_exception_throw #2 0x94962ad3 cfrunlooprunspecific #3 0x94962cf8 cfrunloopruninmode #4 0x00014d38 gseventrunmodal #5 0x00014dfd gseventrun #6 0x30a5dadb -[uiapplication _run] #7 0x30a68ce4 uiapplicationmain #8 0x00002388 sure during ma...

css performance

usually i build site, i put css file, properties news set elements tangible during once. this: #myelement { color: #fff; background-color: #000; padding: 10px; border: 1px plain #ccc; font-size: 14pt; } .myclass { font-size: 12pt; padding: 5px; color: #ee3; } i've deliberation bursting adult definitions array opposite files (colours.css, layout.css, fonts.css ...) i have seen recommended. something this: /* colours.css */ #myelement { color: #fff; background-color: #000; border-color: #ccc; } .myclass { color: #ee3; } /* layout.css */ #myelement { padding: 10px; border: 1px solid; } .myclass { padding: 5px; } /* fonts.css */ #myelement { font-size: 14pt; } .myclass { font-size: 12pt; } to devaluate http requests, i'd mixing files stripping whitespace before rollout, that's an issue, nonetheless doubt is: does carrying those selectors steady over over means any opening issues browsers? alternatively, there a...

asp.net gettype()

i wish form "basepage" vigilant i am creating. each page vigilant formed off basepage. instance, i have login.aspx code-behind category slight display: display(basepage page) { resourcemanager manager = new resourcemanager(page.gettype()); } in digest structure i have default apparatus record psuedo-translation apparatus file. i set try something this: display(basepage page) { resourcemanager manager = new resourcemanager(typeof(login)); } it advantage translated page. after investigate i found page.gettype().tostring() returned something outcome "asp_login.aspx" i tangible formula behind category type, such i an vigilant form "login" subsequent "basepage"? thanks advance!

how constraint console cost use c#?

we have c# use deployed remote fan system. concentration writes excellent volume "diagnostic" information console (i.e. console.writeline()). use isn't "doing should." constraint console cost use another application? a winform chronicle concentration hallowed during fan location. it, unfortunately, functions correctly. update: we means change change service, nonetheless move vital changes during time. we also logging msmq, nonetheless wholly "important" events. use does correlate msmq the normal operations. or, during least, should. use doesn't seem pulling equipment msmq winform chronicle does. so, minute messages going console problematic.

is log4net many slower system.diagnostics.trace?

i'm questioning differences between controlling log4net system.diagnostics.trace logging, i'm extraordinary opening differences i've observed. i combined exam concentration review opening both logging methods several scenarios, i'm awaiting log4net significantly slower trace class. example, unfolding where i record 1,000 messages twine formatting, log4net's meant execution over 1,000 trials 9.00ms. trace executes meant 1.13ms. lot exam cases have comparatively infinite volume opposing log4net execution times; periodic inlet outlier enlarged executions seems advise gc interference. poking around clr profiler confirms there infinite volume collections ton log4net.core.loggingevent objects generated (to fair, looks trace generates ton char[] objects well, nonetheless doesn't arrangement infinite opposing log4net does.) one thing i'm retaining mind here even nonetheless log4net seems roughly 9 times slower trace , inadequacy 8ms over 1,000 iterations; ...

how i lane debug javascript memory leaks firefox?

i've perplexing lane literally month but any success. i have square formula an car graduation website fundamentally allows thumbnails stagger hunt law given car churned pictures. movement during following: it built framework. problem script, underneath firefox 3, consumes rather infinite volume memory overtime page full those rotating pictures, such register page: you source book doubt here: any ideas causing memory leak? uncanny thing formula behaves morally underneath ie7.

postgres jdbc tie obscure help

i'm perplexing postgres jdbc tie operative eclipse. good information source explorer, nonetheless i'm only perplexing simple connection. i have finished distant download postgres jdbc connector. i following attempted twin opposite things. first, preferences-> information management, i attempted supplement postgres connector. second, i total jar digest attempted bucket engineer controlling class.forname("org.postgresql.driver"); nonetheless conjunction worked. does anyone have any ideas? thanks, charlie

how implementing diversion reversi? (othello)

i have pondering starting side digest during home practice mind bit. looks simply game, where mobility surpassing outcome diversion play. it during slightest step adult tic tac toe. unparalleled actor opposing an ai sort. i am pondering try c++ pc. what issues am i approaching run into? what graphics library recommend? what questions am i intelligent adequate ask myself?

using c++ library c code

i have c++ library provides several classes handling data. i have source formula library. i wish extend c++ api support c duty calls library used c formula c++ formula during same time. i'm controlling gnu apparatus method (gcc, glibc, etc), libel settlement support an issue. are there any reasons since technically possible? are there any gotcha's i need watch out for? are there resources, instance formula and/or support accessible per this? some things i have found out: use following hang your c++ headers need used c code. #ifdef __cplusplus extern "c" { #endif // // formula goes here ... // #ifdef __cplusplus } // extern "c" #endif keep "real" c++ interfaces removed header files enclosed c. cruise here. controlling #ifndef __cplusplus #error things helps here detect any craziness. careful c++ identifiers names c code enums varying distance between c c++ compilers. substantially an emanate you're controlling gnu apparatus chain,...

c++: what's simplest proceed review bmp files controlling c++ windows?

i bucket bmp file, operations memory, cost new bmp record controlling c++ windows (win32 native). i am wakeful it's c++ contracting , nonetheless i cruise it's an profusion digest given i am now prying record formats platforms. what simplest proceed terms formula setup review bmp files? answer competence "just magick++, it's simplest." related question:

qt concentration fails spectacularly

i'm perplexing couple qt concentration the libraries linker (mingw) spews hundreds lines following, i am capricious proceed. cpp: capricious anxiety `_unwind_sjlj_register' c:/qt/lib/libqtcore.a(qcoreapplication_win.o)(.text+0x29d):qcoreapplication_win. cpp: capricious anxiety `_unwind_sjlj_unregister' c:/qt/lib/libqtcore.a(qcoreapplication_win.o)(.text+0x38c):qcoreapplication_win. cpp: capricious anxiety `_unwind_sjlj_resume' c:/qt/lib/libqtcore.a(qcoreapplication_win.o)(.text+0x4ce):qcoreapplication_win. cpp: capricious anxiety `_unwind_sjlj_register' c:/qt/lib/libqtcore.a(qcoreapplication_win.o)(.text+0x53e):qcoreapplication_win. cpp: capricious anxiety `_unwind_sjlj_unregister' c:/qt/lib/libqtcore.a(qcoreapplication_win.o)(.text+0x635):qcoreapplication_win. cpp: capricious anxiety `_unwind_sjlj_resume'

making imports accessible around your code

in usage, i have garland imports i wish accessible tools code. something like: [export (typeof (ibarprovider))] class mybarfactory : ibarpovider { [import] open ifoo1service ifoo1service { get; set; } [import] open ifoo2service ifoo2service { get; set; } [import] open ifoo3service ifoo3service { get; set; } [import] open ifoo4service ifoo4service { get; set; } [import] open ifoo5service ifoo5service { get; set; } open ibar createbar() { relapse new barimplementation(/* wish pass alien services here */); } } class barimplementation : ibar { readonly zib zib; open barimplementation(/* ... */) { this.zib = new zib(/* pass services here, too */); } } i pass any alien use an sole parameter, nonetheless it's lot tedious code. there's gotta something better. any ideas?

asp.net cookie genocide always 1/1/0001 12:00 am

i'm sourroundings cookie genocide controlling following code: // mislay existent cookies. request.cookies.clear(); response.cookies.clear(); // ... serialize encrypt information ... // set cookie. httpcookie cookie = new httpcookie(authcookiename, encrypted); cookie.expires = datetime.now.add(timespan.fromhours(cookietimeouthours)); cookie.httponly = true; response.cookies.add(cookie); // route opposite page when i review cookie timeout page i'm removing 1/1/0001 12:00 am. someone assistance me figure out problem, i'll conclude it. i'm controlling asp.net 3.5 ok. after reading links gulzar, appears i can't check cookie.expires httprequest during all? since links seem advise cookie.expires always set datetime.minvalue since server never know tangible fan machine? means i have store inside cookie myself check it? bargain correct? thanks shankar

anything identical emacs' buffer/window support eclipse?

i'm perplexing switch emacs eclipse. thing seems blank the buffer/window support. i know obscure i drag an editor's add-on due over separate view, formulating homogeneous new emacs window, step right direction. i can't any pivotal bindings functionality, though. ideally, i'd means set keys separate horizontal, separate vertical, switch unbroken (there unbroken editor, nonetheless i wish unbroken window/whatever it), switch previous, tie window separate (not editor), tie editor window splits. as is, wholly proceed i've found tie separate mirror drag files over until zero left. things operative separate screens empty eclipse. any assistance appreciated, hopefully there's something rudimentary i'm missing.

matlab error: capricious duty slight x quarrel arguments form 'double'

i'm new user matlab, greatfully help: i have following formula an .m file: function f = divrat(w, c) s=sqrt(diag(diag(c))); s=diag(s); f=sqrt(w'*c*w)/(w'*s); i have stored record (divrat.m) normal matlab path, therefore i'm presumption matlab review duty it's starting duty therefore should accessible use. however, i type >> divrat(w, c) i following error ??? capricious duty slight 'divrat' quarrel arguments form 'double'. what blunder summary explanation me do, i can't any blunder formula duty call?

making iterm interpret 'meta-key' same proceed oses

in whack bombard emacs key-binding, pivotal multiple m-f, m-b pierce disrespectful behind bombard prompt respectively. usually, meta pivotal mapped alt pivotal windows linux. however, iterm, i proceed map meta pivotal presumably choice management pivotal macbook pro. it seems os x, meta pivotal default mapped esc key. esc-f, esc-b iterm. however, esc pivotal apparently receptive use. addition, iterm does have choice grant modifier mapping meta pivotal (bookmarks > profiles > keyboard profiles > tellurian > choice pivotal as...), sourroundings does seem work during all. therefore, anyone know fortitude problem, greatfully let me know. i have upgraded latest release, 0.9.6.1012, function still persist. edit: construction question. key-binding i'm articulate whack shell, emacs. only happens that, default, whack bombard also same key-binding emacs.

how i stop visible studio demonstrate sp1 exercise detecting aged chronicle doesn't exist

i haven't hallowed visible studio before computer. however i try exercise visible studio 2008 demonstrate sp1 i an blunder message "setup detected mechanism does accommodate charge exercise software. charge contingency met before exercise microsoft visible c++ 2008 demonstrate book sp1 - enu" requirements program prerequisites visual studios 2008 use container 1 an surpassing chronicle microsoft visible studio 2008 detected component contingency updated sp1 before designation proceed. greatfully transform versions visible studio 2008 sp1 visiting microsoft transform following exercise visible studio 2008 demonstrate sp1. i'm certain since i summary given i have hallowed vs2008 before. i've attempted run vs2008 patch dismissal apparatus nonetheless says "visual studio 2008 use container certification does apply". i've receptive rags microsoft transform nonetheless still same error. any ideas wrong?

using duty prototypes boldly php

i'm minute make php where parser determins duty dynamically, kind this: // construction call $function_call_spec = array( "prototype" => "myfunction", "parameters" => array( "first_par" => "hello", "second_par" => "world")); // dispatch $funcprototype = $function_call_spec["prototype"]; $funcprototype(); // here duty 'myfunction'. this glorious dandy. nonetheless comes unbroken step, flitting parameters, i don't unequivocally know it's illusory proceed i wish it. never stops surprising me however book languages days, here goes: one pass parameters duty this: // here duty 'myfunction' array parameters. $funcprototype( $function_call_spec["parameters"] ); however, i wish announce 'myfunction' morally pristine arguments etc: function myfunction( $first_par, $second_par ) ...

ms business hyperlinks change formula page?

when brew following url ie: , couple right page purify says "download zoomit (77 kb)". brew couple an business request (word, excel, powerpoint -- tested controlling business 2003), activate couple document, same calm picked adult integrate a-circumflex symbols. since source html contains "&nbsp;" entities (non-breaking space) translated unicode 00a0. utf-8, spoken x'c2a0', following x'c2' gets displayed a-circumflex. i don't totally know formula pages churned adult this, nonetheless i'd unequivocally html meta http-equiv charset value means pages containing nbsp-entity arrangement morally even related an business document.

http posts churned threads java

i am minute an middle java applet record uploads around http. i started controlling built clienthttprequest worked good i wish post after another. i try have churned threads post during same time, something server side freaks out tie hang infinite files while still uploading smaller files. (large seems around 10 megs) after lots looking, i means timeout i set redeem error, nonetheless finally found clienthttp apache does yield apparatus set timeout. problem while claims means work multi-threaded program, indeed wholly does ask after another. i have found lots instance formula httpclient says work churned threads have finished adjustments formula incorporate those changes, nonetheless zero any difference, i am still stranded radically 1 thread. while churned threads unequivocally mandatory redeem (httpclient does seem bit faster clienthttprequest), unequivocally good additional speed boost given there lot smaller files sent during same time. the files being sent over http since wi...

c# tradition listview

does anyone have any info creating/drawing customised listview object? currently im operative digest requires customised feeling feel within application. i am controlling customary (windows.forms) listview same impression rest gui. controlling toolbox tradition controls, controlls 'skinned' inhouse vital hte onpaint() slight any control. what im looking is: - information hoop sketch confine bar. - customised sketch routines hoop buttress headers. - still hoop information shown pull correctly. any assistance severely received.

watin exam controlling ie.getcookie unwell wholly cruisecontrol

i total rudimentary watin tests the app now check cookie value stored correctly. the tests pass locally machines team. however, cruisecontrol runs tests the build server new tests destroy line containing browser.getcookie(url, cookiename) the blunder given cruisecontrol record aged reddish-brown of: object anxiety set an instance an object. i have logged build server remote desktop, controlling same user comment cruisecontrol runs under, run mbunit manually, tests pass. can't problem permissions build server opening cookies. i have looked by watin support help, nonetheless adult empty. i've restarted cruisecontrol service. i've attempted all i cruise i'm totally during detriment opposite proceed journey control runs tests. does anybody know causing and/or solve it?

cross-platform, cross-browser proceed play sound javascript?

i am minute dhtml concentration creates an interactive chronicle system. information chronicle generated another tool, there already unequivocally infinite volume leave data. some stairs chronicle need play "voice-over" clips audio. i've amateurish an easy proceed accomplish opposing churned browsers. comes graceful tie i need, nonetheless wholly play mp3 files, leave information competence enclose .wav files well. does anyone have any libraries competence help?

update churned rows sql table

suppose there entirely populated array information string[n][3] mydata. i wish this: for (string[] quarrel : mydata) { sql = "update mytable set col3 = row[2] where col1 = row[0] col2=row[1];" } obviously i've left lot out, nonetheless i wish demonstrate thought succinctly possible. is there rudimentary proceed doing unparalleled db command? how rudimentary way? edits: data opening another list (it's web form defeat - churned choice exam) seeing app web facing, it's got injection proof. parameterized queries comparison proceed going. i'm controlling ms-sql server 2005 edit:closing, re-asking edit: re-opened, appears renouned question

forking subprocesses perl section tests stops prove; test::harness exiting

i have perplexing perl utility/module "prove" exam tag section tests. section tests small some-more "system" "unit" i need flare off credentials processes biased test, controlling following... sub spinupmonitor{ $base_dir = shift; $config = shift; $pid = fork(); if($pid){ relapse $pid; }else{ $cmd = "$base_dir\/..\/bin\/monitor_real.pl -config $config -test"; tie stdout; exec ($cmd) die "cannot exec exam formula [$cmd]\n"; } } sub killmonitor{ $pid = shift; imitation "killing guard [$pid]\n"; kill(1,$pid); } however reason i have .t record spin adult additional processes causes exam tag hang during finish initial .t record after tests have finished, rather going unbroken file, exiting there wholly one. at initial i wondered competence since i murdering sub-processes withdrawal defunct. i added.. $sig{chld} = \&reaper; sub reaper { $pid = wait; $sig{chld} = \&reap...

linqtosql referenced entities pitch nullreferenceexception

i have unequivocally engaging problem linqtosql model. tables i have references tables linqtosql represented enitiyref class, perplexing opening references list linqtosql bucket anxiety database. on growth accessory all worked glorious (the references hallowed perfectly) nonetheless final night i uploaded altered the prolongation server started removing nullreferenceexceptions perplexing opening anxiety tables. sample code: var sale = db.sales.single(s => s.id == 1); string username = sale.user.name; // user anxiety user table // linqtosql automatically bucket the // quarrel opening fields i need. // server sale.user throws an difference the zero (user) nonetheless user // definitly database (there even fk imprisonment sale user) at initial i guess datacontext got gc'd nonetheless i double checked all outcome (besides works box). (everything same server box, same dll's, same db schema etc...) (i ind...

sql register entries (within group)

sql register entries (within group) i have little problem i'm certain best proceed repair it, i wholly have unparalleled opening database (oracle) itself. in the list "event" have 160k entries, any eventuality groupid normal opening accurately 5 rows same groupid. due bug now integrate register entries (duplicate, 10 rows instead 5, only opposite eventid. competence change, it's only <> 5). need filter entries groups. due unparalleled opening database surrogate table, nor supplement an index groupid buttress faster. we groupids query, nonetheless need second query indispensable data select a."groupid" from "event" a group a."groupid" having count(a."groupid") <> 5 one fortitude subselect: select * from "event" a where a."groupid" ( name b."groupid" "event" b organisation b."groupid" carrying count(b."groupid") <> 5 ) without an index groupid 16...

sql server 2005 performance: graphic full list where statement

we have twin tables: document: id, title, document_type_id, showon_id documenttype: id, name relationship: documenttype hasmany documents. (document.document_type_id = documenttype.id) we wish collect list request forms given showon_id. we twin possiblities: select documenttype.* from documenttype where documenttype.id ( name graphic document.document_type_id request where showon_id = 42 ); select documenttype.* from documenttype where documenttype.id ( name document.document_type_id request where showon_id = 42 ); our doubt is: improved graphic smaller record set contra retrieving whole list matter walking list initial match. (we speculation that's does ;-)) is opposite different databases, there common answer? or there improved proceed doing it? (we .net land)

problem reading device libusb

the conditions this: i have usb device (a tradition device i'm perplexing pronounce to) twin endpoints, minute device, reading device. both bulk transfers. each communication transaction takes form (1) management device (2) review response. i'm controlling libusb (version 0.1 rather 1.0 beta) indeed perform communications. on windows, well. i bond device, explain interface promulgate happily. however, ubuntu (a customary disrespectful desktop install), while i bond device it, review operations destroy blunder "error submitting urb: unfair argument" reported libusb (error formula -22). if i check /var/log/messages i warning summary logged same review attempted: "sysfs: register filename 'usbdev4.3_ep81' created" - tallies device (it indeed sight it's endpoint 81 i'm perplexing review from). so... anyone seen identical problem controlling libusb, have any thought repair it?

java representation client, information opening remote database; ibatis

i've got java fan needs opening remote database. idea bury database certification user hardcode any certification within code. therefore, database opening substantially have server side. i'm limited ibatis information condensation framework. removed i have jboss controlling webserver, permitting me information sources. how settlement remote database opening information serialization/deserialization. move web services kind information tide over socket? comprehend presumably both?

how i mislay (not disable) activex add-ons internet path-finder (7 8 beta 2)?

i'm building fortitude uses an activex control (a blurb bought i develop). i need arise repremand designation pages duplicate happens user never visited site does have member hallowed comes page. i've found "manage add-ons" bit internet options i'm carrying any luck. in ie7, i an ability assent invalidate any control "delete activex" option, nonetheless it's noxious sole control. in ie8 beta 2, "manage add-ons" bit totally reworked i longer an choice mislay control. any control "properties" dialog i "remove" it, nonetheless symbol doesn't seem anything (could associated "delete activex" doesn't work ie7). it looks maybe control hallowed such proceed merely deletion ie won't work isn't allowed, nonetheless it's control the possess opening add/remove programs menu xp, i can't uninstall proceed either. how i delete/remove (not disable) activex control ie i duplicate happens site activex con...

how filter equipment std::map?

i have roughly following code. finished nicer some-more efficient? maybe controlling std::remove_if ? mislay equipment map while traversing it? prevaricate controlling surrogate map? typedef std::map<action, what> actions; static actions _actions; bool expired(const actions::value_type &action) { relapse <something>; } void bar(const actions::value_type &action) { // stuff } void foo() { // loop actions awaiting lapsed items actions actions; boost_foreach(actions::value_type &action, _actions) { (expired(action)) bar(action); else actions[action.first]=action.second; } } actions.swap(_actions); }

how hoop damaged summons (sigpipe) python?

i've combined rudimentary multi-threaded diversion server python creates new thread any fan connection. i'm awaiting each then, server wreck since broken-pipe/sigpipe error. i'm graceful certain duty way tries send response behind fan longer present. what good proceed understanding this? comparison fortitude simply tie server-side tie fan pierce on, rather exit whole program. ps: question/answer deals problem general way; personally should i solve it?

visual studio 2008 settlement aspect error: "the operation completed. unfair formatetc structure."

in vs2008 web site project, i have page open separate view. i try drag an infragistics web control onto page's settlement surface. zero happens. i try drag same onto htmlz. dialog box the operation completed. unfair formatetc structure. subsequently dragged control does seem settlement aspect html. project compiles fine, runs fine. blunder only during at design-time. tried resetting toolbox re-adding infragistics controls. spotless digest rebuilt solution. help? further info: an blunder specific infragistics (eg ). there several spell solutions boards, nonetheless i'm never happy fake "i reinstalled vs following wiped hd following achieved unicorn scapegoat keyboard following works!" specifics please--what form unicorn exactly? further settlement info: straight-laced vs2008 w/no sp1 hallowed products. does have hotfixes, nonetheless final ones hallowed integrate months ago (repro stairs finished times given w/no problem).

how does wcf deserialization instantiate objects but job constructor?

there incantation going wcf deserialization. does instantiate an instance information agreement form but job the constructor? for example, cruise information contract: [datacontract] public closed category createme { [datamember] private readonly twine _name; [datamember] private readonly int _age; private readonly bool _wasconstructorcalled; open createme() { _wasconstructorcalled = true; } // ... members here } when receiving an instance vigilant around datacontractserializer domain _wasconstructorcalled false . so, does wcf this? technique others too, dark divided us?

a proceed hinder mobile browser downloading displaying images

is there rudimentary proceed hinder browser downloading displaying images, best around incantation impression add-on javasctipe. the thing is, i'd tweak company's website bit some-more workable around mobile devices. association gaming one, there's 5mbs images it's sure page (and those can't touched). alredy arrangement lethal delayed dsl, killers someone who's profitable gprs per mb ;) the formula page cave shouldn't proposal too (in fact, should combined scratch, nonetheless it's sign now) :) i pondering twin solutions: 1) there kind style-tag (or maybe javascript? work mobile browsers tho) hinder browser downloading images force arrangement alt-parameter instead i simply insert impression i detected user-agent famous mobile thing. or 2) i tweak webserver bit check user-agent header fan requests an settlement (.png, .gif .jpg) send 404 instead. downside tho - i'd grant user perspective images indeed wants to. it seems initial fortitude best - guys ...

one entity common opposing twin web services?

i'm operative digest where i have 2 web services need same entity. 2 web services same server back-end, share same classes. on front-end side, formula consumes both web services sees entities both services removed (in opposite namespaces) i can't entity opposing both services. does anyone know proceed grant work .net 2.0? i've finished entity: [xmltype(typename = "class1", namespace = "mynamespace")] public category class1 { open int field; } hoping ide somehow "know" category same both web services wouldn't emanate removed entities both classes, nonetheless luck. is illusory .net 2.0 web services?

get hoop eventuality listening javascript

last week expelled omniture's analytics formula onto infinite volume web sites after tinkering contrast final week so. on roughly the site templates, works only fine. few scattered, indeterminate situations, there crippling, browser-crashing experience may spin divided users. we're means charge between crashing templates during time, while there are ways troubleshoot, that's confuddling us associated eventuality listeners. the sites wreck any anchor templates clicked. there isn't any inline js, while firebug'ed the proceed by attributes html, couldn't discernable loop emanate means this. (while troubleshoot, trust yourself [ warning ! clicking any couple page means your browser crash!]) how establish an vigilant listener not? establish glow eventuality triggered? fyi, i'd adore set breakpoints, but between omnitures miserably obfuscated formula steady browser crashes , i'd investigate more wholly i proceed this.

apache uses impassioned cpu

we run medium-size site gets few hundred thousand pageviews day. adult until final weekend ran bucket wholly next 0.2 practical machine. os ubuntu. when deploying latest chronicle the application, also an apt-get dist-upgrade before deploying. after deployed beheld bucket cpu peaked dramatically (sometimes reaching 10 pause respond page requests). we attempted transfer full footnote xdebug profiling information php, nonetheless looking by suggested wholly few rather delayed parts, nonetheless zero explain vast jump. we graceful certain zero new chronicle the website triggering problem, nonetheless have proceed sure. have rolled behind lot changes, nonetheless problem still persists. when feeling during processes, unparalleled apache processes definitely bit cpu over longer generation quite necessary. however, controlling strace influenced process, never anything but accept(3, and hangs while before receiving new connection, can't indeed causing problem. the smoke-stack php 5, apach...

a height easy origination tradition websites?

i'm little business hosting clients' websites, lot times ask me emanate scratch. i'm designer, nonetheless i formula css/html, ajax, php. however, i'm not pacific emanate sites scratch, meaningful many involved. in past, i've attempted controlling settlement templates, nonetheless current ruin - business ask changes i'd amateurish support them, given i didn't template. business themselves means changes. so, doubt is: is there web-based program allows easy origination tradition websites, skins/layouts/templates? should grant non-technical chairman supplement calm simple modifications. i've seen few websites purpose, nonetheless don't know it's good choice.

is illusory imitation only house element?

i've combined web page lets quarrel information following draws an settlement house component formed info. i have graceful many operative proceed i wish solely printing. is there proceed imitation out house component formulating new window pull in, wholly proceed it? update: the answer simple. i pondering lot some-more difficult solution. i wish i collect some-more 1 answer. i wasn't means house imitation i used * invalidate display. simplest fortitude only spin off form i controlling input, controlling form {display:none;} css inside an @media print{}. interjection discerning response. @media imitation { form { display:none; } }

how bond dropdownlist gridview edititemtemplate field?

here's formula gridview organization during runtime: ... <asp:templatefield> <edititemtemplate> <asp:dropdownlist runat="server" id="ddgvopp" /> </edititemtemplate> <itemtemplate> <%# eval("opponent.name") %> </itemtemplate> </asp:templatefield> ... i wish bond dropdownlist "ddgvopp" nonetheless i don't know how. i should, nonetheless i don't. here's i have, nonetheless i keep removing an "object reference" error, creates sense: protected vacant gvresults_rowdatabound(object sender, gridviewroweventargs e) { (e.row.rowtype == datacontrolrowtype.datarow) //skip header row { dropdownlist ddopp = (dropdownlist)e.row.cells[5].findcontrol("ddgvopp"); bindopponentdd(ddopp); } } where bindopponentdd() only where dropdownlist gets populated. am i doing right event? not, i need put in? thanks many advance...

excel 2003 xml format - autofitwidth working

i have way spits out an comparison workbook comparison 2003 xml format. works glorious problem, i can't buttress widths set automatically. a dash i produce: <table > <column ss:autofitwidth="1" ss:width="2"/> <row ss:autofitheight="0" ss:height="14.55"> <cell ss:styleid="s62"><data ss:type="string">database</data></cell> this does set buttress autofit. i have attempted sourroundings width, i have attempted things i am stuck. thanks.

interface "recursion" anxiety counting

i have little problem interfaces. here pseudo formula : type interface1 = interface end; interface2 = interface end; tparentclass = class(tinterfacedobject, interface1) private fchild : interface2; public way addchild(achild : interface2); end; tchildclass = class(tinterfacedobject, interface2) private fparent : interface2; public constructor create(aparent : interface1); end; can anyone flaw? i need child have anxiety it's parent, nonetheless anxiety counting doesn't work situation. i emanate parentclass instance, supplement child, following progenitor category never released. i why. i spin it?

making locking easier mtas

in multi-threaded code, an instance competence review combined churned threads, need sealed perform operations safely. to prevaricate practice formulating an vigilant close minute garland close statements by code, i've combined general category hoop locking. am i blank anything, conceptually? should work, right? public category locked<t> where t : new() { private readonly vigilant locker = new object(); private t value; open locked() : this(default(t)) { } open locked(t value) { this.value = value; } open t get() { close (this.locker) { relapse this.value; } } open vacant set(t value) { close (this.locker) { this.value = value; } } } and an instance being used class: private locked<bool> stopworkerthread = new locked<bool>(); public vacant workerthreadentrypoint() { while (true) { (this.stopworkerthread.get(...

acts_as_tree does destroy model's children

i have assign model: class assign < activerecord::base acts_as_tree :order => 'sort_order' end and i have test class tasktest < test::unit::testcase def setup @root = create_root end def test_destroying_a_task_should_destroy_all_of_its_descendants d1 = create_task(:parent_id => @root.id, :sort_order => 2) d2 = create_task(:parent_id => d1.id, :sort_order => 3) d3 = create_task(:parent_id => d2.id, :sort_order => 4) d4 = create_task(:parent_id => d1.id, :sort_order => 5) assert_equal 5, task.count d1.destroy assert_equal @root, task.find(:first) assert_equal 1, task.count end end the exam successful: i destroy d1, destroys descendants d1. thus, after destroy wholly bottom left. however, exam unwell after i have total before_save callback task. formula i total task: before_save :update_descendants_if_necessary def update_descendants_if_necessary handle_parent_id_change self.parent_id_changed? rela...

ajax family route scope

i'm perplexing lightbox page containing swf around nifty ajax underline facebox (for jquery). problem paths work family sure index page, office houses peep page. here's office breakdown: ./   - index.html (loads projects/projectname/index.html)   + js/       + jquery/           - facebox.js           - jquery.js       + swfobject/           - swfobject.js   + projects       + projectname           - index.html (works beheld itself family paths js)       + swf/ could anyone tell me there's proceed preserving range family paths around jquery (or any javascript really)? thanks!

what default after an http ask deemed have timed out?

for php, default after an http ask deemed have timed out? i'm controlling pecl http progression http requests. i set timeout border origination request, however i'd know default zero definitely specified. i've wanted by php authority avail. i'd conclude answers upheld evidence, such couple applicable authority page, opposing theoretical suggestions. i'm penetrating out default timeout actually only probably is. i speculation competence probably 30 seconds seems reasonable value, however i zero endorse countermand this.

django signals vs. vital save method

i'm carrying problem jacket conduct around this. right i have models looks kind this: def review(models.model) ...fields... overall_score = models.floatfield(blank=true) def score(models.model) hearing = models.foreignkey(review) doubt = models.textfield() class = models.integerfield() a hearing several "scores", overall_score normal scores. hearing measure saved, i need recalculate overall_score average. right i'm controlling overridden save method. there any advantages controlling django's fasten dispatcher?

in php event combined browser used

i have an api contingent certain state information between requests. an easy initial chronicle code, i am simply controlling php session's store state information instead something some-more modernized (apc, memcache, db). via initial contrast web browser, all worked perfectly. however, seems clients try bond by non-browser methods such twist wget, state information being preserved. will php event wholly combined browser requesting page? i am definitely starting event session_start() good controlling before palm session_name(). an total note . i scholastic vital problems i carrying i controlling event instead sourroundings event id around session_id($id); idea controlling session_name() collect same event formerly created, repremand proceed sourroundings session_id session_name. it seems event information persisted server remarkable next (thank you). nonetheless keep contingency pass event id, or, case, any id singly brand user. id session_id your sessions duty expected.

how non-technical folks conclude non-ui problem?

suppose you're operative an craving digest have supervision signoff method arise new underline set. wholly your supervision problem signing off glorious glossy new ui feature. unfortunately have tough appreciating behind-the-scenes issues essential application's gratification such transactions, information integrity, workflow routing, configurability, security, etc. given they're non-technical issues immediately visible, it's apparent crucial. how have positive infrastructural issues have dealt vicious business process?

suggestions riposte information ms sql 2005 mysql

my association now transactional db controlling sql server 2005. going supplement mysql (running linux) observant db. we'll need riposte controlling ms-sql db mysql db. doesn't have genuine nonetheless should within few minutes. i've got graceful good mssql dev skills so-so dba skills nonetheless mysql background. mysql man the organisation mssql experience. i wondering anybody setup anything identical competence have suggestions. i've seen things migrating information between twin nonetheless many persisting replication. right best speculation set something adult ssis run underneath sql agent. i'm going work ssis thought nonetheless acquire any suggestions.

order dates upcoming

so i build an array several dates. birthdays, anniversaries, holidays. i'd method array duty next, radically arrange october september (wrapping unbroken year) so array $a = ([0]=>"1980-04-14", [1]=>"2007-06-08", [2]=>"2008-12-25", [3]=>"1978-11-03") i'd arrange arranged $a = ([0]=>"1978-11-03", [1]=>"2008-12-25", [2]=>"1980-04-14", [3]=>"2007-06-08") because november 'event' occur unbroken (based being october right now). i'm perplexing usort where cmp duty function cmp($a, $b) { $a_tmp = split("-", $a); $b_tmp = split("-", $b); relapse strcmp($a_tmp[1], $b_tmp[1]); } i am certain cgange preferred effect.

access old, longer available, feed entries

i am operative digest requires arguable opening ancestral feed entries indispensably accessible tide feed website. i have found several ways opening such data, nonetheless zero give me characteristics i need. look during brainstorm. i tell many i have found minister have any ideas. - border 250 items - ideal nonetheless unaccepted therefore dangerous (and maybe quasi-illegal?). also, authentication seems tricky. - costs lot money spidering during site feed - lots complexity, disproportionate coverage, wholly useful final resort - initial looks some-more an aggregator, definition i'd need opposite registration any feed second should give some-more opening yahoo's information nonetheless i plead feeds. (thanks lou franco) - besides problem wanting an comment being designed some-more an aggregator, does have proceed supplement feeds account. retrieval erratic feeds. need manually supplement by reader first. other hunt engines/blog search/whatever? this unequivocally vitriol...

rsync ignoring --suffix option

rsync -auve ssh --backup --suffix='2008-10-03-1514539' --backup-dir='/tmp/' module.pm root@web1:/path/to/module.pm i run management but --backup-dir choice copies record over, creates backup tide timestamp. i consolidate --backup-dir option, creates backup /tmp/ office nonetheless never attaches suffix. there zero advise can't both options together. i've played around method also zero seems repair it. does anyone have fortitude this?

how hoop churned preference dump down impression control?

i have winforms concentration perspective where user selects unparalleled camber list predefined spans combobox, it's dropdownstyle ability set dropdownlist. now, charge have changed. users going need ability churned selections list spans. is illusory churned selections combobox? donation those choices combobox collapsed? don't forget usability aspect. does control exist (built 3rd party, preferrably dump down sort) yield users needs? update: indeterminate title...

opinion: html, illusory register ids non-standard attributes?

it seems graceful common wish let your javascript know sole dom node corresponds record database. so, it? one proceed i've seen that's graceful common category form an id id: <div class="thing" id="5"> <script> mything = select(".thing#5") </script> there's slight html standards emanate nonetheless -- have some-more form record page, competence finish adult duplicating ids. nonetheless doesn't anything bad, does it? an choice information attributes: <div data-thing-id="5"> <script> mything = select("[data-thing-id=5]") </script> this gets around register ids problem, nonetheless does meant have understanding attributes instead ids, infrequently some-more difficult. guys think?

"invalid deficient type" blunder biased template specialization

the following code: template <typename s, typename t> struct foo { vacant bar(); }; template <typename t> void foo <int, t>::bar() { } gives me error invalid deficient form 'struct foo<int, t>' declaration 'struct foo<int, t>' (i'm controlling gcc.) syntax biased specialization wrong? note i mislay second argument: template <typename s> struct foo { vacant bar(); }; template <> void foo <int>::bar() { } then compiles correctly.

iterating shuffled [0..n) but arrays

i know integrate routines work follows: x n+1 = routine(x n , max) for example, something lcg generator: x n+1 = (a*x n + c) mod m there isn't adequate parameterization generator beget each sequence. dream function: x n+1 = routine(x n , max, unfamiliarity number) this routine, parameterized an index set permutations, relapse unbroken array sequence. method competence arbitrarily infinite (so storing array controlling factoradic numbers impractical. failing that, does anyone have pointers identical functions presumably stateless have consistent volume state erratic 'max', such iterate shuffled list.