Posts

Why is Node.js named Node.js? -

i'm curious why node.js named that. searched site , faq , there nothing helped me understand why named node.js. the official name node . designed use web application, author realized used more general purposes , renamed node. here a quote author may explain name: node single-threaded, single-process system enforces shared-nothing design os process boundaries. has rather libraries networking. believe basis designing large distributed programs. “nodes” need organized: given communication protocol, told how connect each other. in next couple months working on libraries node allow these networks.

html - Image as link in IE9 -

i have link " <a ... ></a> " , within image "" something like: " <a...><img src.../></a> " my problem in ie9 (do not know if occurs in versions prior ie9) putting edge in image. in other images on page, has no links, problem not occur. how can take edge off these images have associated links try css: img{ border: 0 }

c# - Visual Studio won't update properties of my Data Source -

i using class "invoice" data source. after adding more properties it, visual studio refuses refresh data source , can't find new properties in data source. tried restarting project, deleting , adding object datasource again. did not work. problem intellisense going out of date due changes in data source. solution rebuild project.

java - SCJP: Program not terminating after uncaught exception -

public class threads2 implements runnable { public void run() { system.out.println("run."); throw new runtimeexception("problem"); } public static void main(string[] args) { thread t = new thread(new threads2()); t.start(); system.out.println("end of method."); } } i predicted output run. //exception but showing output as, run exception end of method (or) run end of method exception i wonder, once exception has occurred program terminate, right? no, program not terminate, thread does. when thread throws uncaught exception terminates. main thread continues running.

java - Apache Tomcat Request Threads -

we have application leaks bit of memory, bit being understatement. i using jvisualvm try , find causing problem. i see thread count grow quite bit on threads starting name: http-8080- example: http:8080-42 my first guess each of threads request hit client, each client request handled in own thread. my problem threads have been running long periods of time (thus far 10mins). my question this: is assumption correct? if so, why threads run such long time? surely can't still busy serving clients request? tomcat has number of waiting http threads, example if @ default connector setting: <connector port="80" maxhttpheadersize="8192" maxthreads="150" minsparethreads="25" maxsparethreads="75" enablelookups="false" redirectport="8443" acceptcount="100" connectiontimeout="20000" disableuploadtimeout="true" /> we can ...

smiley to image - optimized PHP code -

is code or can optimized ? $tempmsg = str_replace("[:)]","<img src='img/smiley0.png' title='smile' height='100' width='100'>",$tempmsg); 1/ can optimized? it pretty good, you're not using regular expressions (preg_replace) no worries here. 2/ code to me not readable. how if need replace other smileys? not reusable. here first step towards better readability, increased reusability, ... might bit slower, tend favor reusability on performance until need optimize. function replace_smiley($text) { $replacements = array( ":)" => "image1.jpg", ":(" => "image2.jpg" ); $out = $text; foreach ($replacements $code => $image) { $html = '<img src="img/' . $image . ' alt="' . $code . '" height="100" width="100" />'; $out = str_replace($code, $html, $out); } return $out; ...

visual studio 2010 - Getting an Unhandled Exception in VS2010 debugger even though the exception IS handled -

i have issue vs2010 debugger stops unhandled exception. however, exception handled. in fact, if put code in catch block, i'll hit when press f5. in debug -> exceptions, not have "thrown" checkbox checked, imo there absolutely no reason unhandled exception dialog pop up... i can't post exact code, work on sample soon. basic idea behind offending code section have thread talks hardware, , if have error talking it, throw hardwareexception . thread launched begininvoke , , exception caught in callback handler when call endinvoke . when exception thrown in debugger, messagebox says 'hardwareexception not handled user code". is!!! edit -- well, driving me crazy. i've got sample code representative of code have in application, , looks this: using system; using system.collections.generic; using system.linq; using system.text; using system.runtime.remoting.messaging; using system.threading; namespace consoleapplication1 { public class h...