Posts

Does the integration of Intel® Parallel Studio XE 2013 for Linux* and R lead to significant performance improvements? -

i running resource intensive computations in r. use for-loops, bootstrap simulations , on. have integrated intel® math kernel library linux* r , seems has lead significant improvement in computation times. thinking integrating intel® parallel studio xe 2013 linux* , r. means passing different compilers ship r: (1) integration of intel® parallel studio xe 2013 linux* , r lead significant performance improvements? (2) give examples in situations have benefit? thank you! very rough order of magnitude: parallel / multi-core blas such mkl scale sublinearly in number of cores but parts of operations blas calls ie not basic "for-loops, bootstrap simulation , on" byte-compiling r code may give factor of two, maybe three after may need heavier weapons such example rcpp can give 50, 70, 90-fold speedups on code involving "for-loops, bootstrap simulation , on" why eg popular mcmc crowd similarly, intel tbb , other parallel tricks require rewrites of...

html - unneccessary space between parent div and image thats inside of it -

html code <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link href="css/style.css" rel="stylesheet" type="text/css" media="screen"/> <title>abc</title> </head> <body> <div class="wrapper"> <div class="box"><img src="images/roundlogo.jpg" alt=""></div> </div> </body> </html> css code img{ border:0px; border-image-width:0px; border-image-slice:0px; } .box { width:250px; //border:1px solid; height:auto; border-image-slice:0px; border-image-width:0px; border-image-outset:0px; } .box img { width:100%; //border:1px solid green; margin-top:0px; } i write code shown upper when checking browser there 4px space between image , parent div() called box here...

java - text area table format -

im trying make table format using test area java, , not work correctly wont in line... need in correct format. have textarea.settext("name\t\tage\tde-sexed\tfee\n"); textarea.append("text"); textarea.append("\t\t25"); textarea.append("\tyes"); textarea.append("\t\t$00.00\n"); textarea.append("sfessfesf"); textarea.append("\t\t12"); textarea.append("\tfalse"); textarea.append("\t\t$00.00\n"); so output isnt third line of output any idea? you need use monospaced font jtextarea. like: textarea.setfont( new font("monospaced", font.plain, 12) );

Why is copying a file in C so much faster than C++? -

i've been working on large c++ project few weeks now. original goal use project learn c++11 , use pure c++ code , avoid manual allocation , c constructs. however, think problem going force me use c small function , i'd know why. basically have save function copy large binary file separate location before make changes data in it. files cd images max size of around 700mb. here original c++ code used: std::ios::sync_with_stdio(false); std::ifstream in(infile, std::ios::binary); std::ofstream out(outfile, std::ios::binary); std::copy(std::istreambuf_iterator<char>(in), std::istreambuf_iterator<char>(), std::ostreambuf_iterator<char>(out)); out.close(); in.close(); this code when used 690mb file takes barely under 4 minutes complete. have ran multiple files , it's same result; nothing under 3 minutes. however, found following way ran little bit faster, still fast c: std::ios::sync_with_stdio(false); std::ifstream in(infile, std::ios::binary); st...

c# - Exception when a path to a file is null (when you cancel OpenFiledDalog) -

this code: openfiledialog openfiledialog1 = new openfiledialog(); dialogresult result = openfiledialog1.showdialog(); // show dialog. if (result == dialogresult.ok) // test result. { string file = openfiledialog1.filename; } else { messagebox.show("error."); } //later on.. datatable lertableec0 = new datatable(); lertableec0.readxml(openfiledialog1.filename); and right here in end comes error, works fine, xml import, etc if cancel in open dialog exception, hint? (there ir similar question answer still confusing me return null; didnt work me if (result == dialogresult.ok) // test result. { string file = openfiledialog1.filename; datatable lertableec0 = new datatable(); lertableec0.readxml(openfiledialog1.filename); } else { messagebox.show("error."); } since filename not set if cancel button clicked , empty string pass...

Custom user control doesn't catch any mouse events in c# -

i create custom user control , use in form. but not capture mouse event! problem? thanks define event in custom control private delegate void myclickevent(object sender, eventargs e); public event myclickevent myclick; public void onmyclickevent(object sender, eventargs e) { if (myclick != null) myclick(sender, e);//execute event } now in mainform public partial class form1 { public form1() { mycustombutton.myclick += firethisonclick; } private void firethisonclick(object sender, eventargs e) { //this executed on click } }

java - How to map out parameter in jdbcTemplete.query with BeanPropertyRowMapper -

i using spring's jdbctemplate.query() call stored procedure , beanpropertyrowmapper map result set bean. stored proc has 2 in parameter , 2 out parameters multi row rs. able send stored procedure's in parameters , map rs bean in following way: final string stored_proc_name= "{call mystoredproc(?,?)}"; list<mybean> mybeanlist= jdbctemplate.query( stored_proc_name, new object[] { 12, 100 }, //in parameters new beanpropertyrowmapper<mybean>(mybean.class)); // rs bean mapper how map out parameter. want take advantage beanpropertyrowmapper