Posts

html - How can you do this in CSS -

Image
what best way in css without using float property; i know how add icon i'm not sure how add icon before heading , paragraph. an html5/css3 approach use proper markup instead of 1999-style tables, , style them single flexbox reference: section { display:flex; } <section> <figure><img src="//placehold.it/150"></figure> <article> <h2>lorem ipsum</h2> <p>dolor sit amet etc. etc.</p> </article> </section> an added advantage of approach can add flex-direction:column in media query make responsive small screens.

mongodb - When is blocking code acceptable in node.js? -

i know blocking code discouraged in node.js because single-threaded. question asking whether or not blocking code acceptable in circumstances. for example, if running express webserver requires mongodb connection, acceptable block event loop until database connection established? assuming pages served express require database query (which fail if mongodb not initialized). another example application requires contents of configuration file before being initializing. there benefit in using fs.readfile on fs.readfilesync in case? is there way work around this? wrapping code in callback or promise best way go? how different using blocking code in above examples? it decide acceptable. , determining consequences of blocking ... on case-by-case basis. analysis take account: how occurs, how long event loop blocked, and the impact blocking in context have on usability 1 . obviously, there ways avoid blocking, these tend add complexity application. really, nee...

batch file - How to close window with .bat script? -

i have ran slight problem while configuring keybinds mouse. the thing want achieve open program backround(open or closed window) , close again, not kill task(eqivalent x-button, keeps running in backround) i have set mouse start application called (which able of fast file system searches) i have figured out code: taskkill /f /im everything.exe which can run macro key can kill application. dont want kill application window, becase takes while index important files once have restart it. so heres question there way bring window/task front of screen or trigger x button event, without having kill entire process ? also mouse(g600) supports lua scripting, proabbly more harder way go it. minimizing window can done activating window (bringing foreground) using sendkeys() send alt + space , whatever letter locale has underlined "minimize" ( n in english windows). here's one of possibly dozens of examples of using vbscript. that sequence overused, in...

java - Return value of filled JComboBox and using the values to fill JTextField -

i'm coding jframe opens joptionpane through jmenubar. joptionpane have combobox lot of different string values. after jcombobox there jtextfield. i want text select in jcombobox inserted next jtextfield , updated everytime select new string value in jcombobox. please help! class dateiadapter implements actionlistener { public void actionperformed(actionevent event) { jmenuitem change = (jmenuitem) event.getsource(); jcombobox allequest = new jcombobox(ah.getline(1)); //this combobox gets lot of different values different class // actionlistener actionlistener cbactionlistener = new actionlistener() { public void actionperformed(actionevent e) { string s = (string) allquest.getselecteditem(); //gets selected string of jcombobox system.out.println("\n" + s); // want use string s outside of here, } }; allquest.addactionlistener(cbactionlistener); jtextfield questions = new j...

matlab - using singular value decomposition (svd) in quadratic regression -

in order quadratic regression on rather large data set solve following equation using svd(singular value decomposition): b(nx1)=a(nx3)*x(3x1) thinking use matlab that, tips? goal compute matrix x it seems call quadratic regression minimal square error regression. in case computation easy: 1) multiply both left sides a'(3xn) arriving to a'(3xn)b(nx1) = a'(3xn)a(nx3) x(3x1) 2) multiply both left sides inverse of a'(nx1) a(nx3) arriving to inv(a'(3xn)a(nx3))a'(3xn)b(nx1) = x(3x1) 3) use svd evaluate inverse above, see most efficient matrix inversion in matlab see minimizing error of formula in matlab (least squares?)

My SCCM 2007 SQL Web Report is not displaying results -

i created sccm sql report using sql management studio. created following prompts asset management office use on web report: publisher, display name, , version. the display name , version prompts both optional. i receive no syntax errors or anything, receive absolutely no results whatsoever when click on display button produce web report. here sql code: ================================================================================== select dbo.v_r_system.netbios_name0, dbo.v_gs_add_remove_programs.displayname0, dbo.v_gs_add_remove_programs.version0, dbo.v_gs_add_remove_programs.publisher0 from dbo.v_r_system inner join dbo.v_gs_add_remove_programs on dbo.v_r_system.resourceid = dbo.v_gs_add_remove_programs.resourceid where dbo.v_gs_add_remove_programs.displayname0 = @displayname , dbo.v_gs_add_remove_programs.version0 = @version , dbo.v_gs_add_remove_programs.publisher0 = @publisher order by dbo.v_g...

php - Internal Server Error Ajax request on Laravel 5.2.10 project -

i'm working on laravel 5.2.10 project, trying fetch data via ajax i'm getting 500 error, , can't find i'm missing out. this part of routes.php route::group(['middleware' => 'web'], function () { route::auth(); route::get('/home', 'homecontroller@index'); route::get('/videos', 'videoscontroller@index'); route::post('/videos/fetch', array('before' => 'ajax_check'), 'ajaxcontroller@postfetch'); }); on 'ajaxcontroller.php' i've got function public function postfetch() { //process data , come $data return view('videos')->with('video_data', $data); } and js ajax call var request = $.ajax({ url: "/videos/fetch", method: "post", data: { url : url } }); request.fail(function( jqxhr, textstatus ) { alert( "request failed: " + textstatus ); }); methodnotallowedhttpexception i...