Posts

html5 - Choose between PX and Percentile -

i new bootstrap, have following question running in mind. what suggested way use between px , percentiles in bootstrap?? will there effect in website view if used px? there pretty significant difference between pixel units , percentile units. percentiles definition variable dimensions based on size of container, while sizes declared in pixel units going take given number of pixels. you need choose based on you're trying accomplish: do need rendered size fixed number of pixels? pick pixels (or fixed unit) ( this not responsive ) do want rendered size change based on dimensions of container? choose percentiles the best way learn difference experiment both. , change size of browser's window. <div style="width: 80%; border: 2px solid #000; height: 30px"> <span>80% wide div</span> </div> <div style="width: 40%; border: 1px solid #00f; height: 30px; float: left;"> <span>60% wide div...

algorithm - what's the greedy or dynamic programming approach for this? -

suppose making sentences using bi-gram, means probability of appearance of each word dependent on previous word. probability of sentence multiple of probability of words p(sentence) = p(t0)*multiple i=1 i=n p(ti|ti-1) we have probability matrix can use determine p(ti|ti-1) , want find probable sentence is there greedy or dynamic programming approach it? you can use viterbi algorithm . states words ( t0, t2, t7, ... ). initial state t0 , have matrix transition probabilities a_i,j = p(tj|ti) , have no "observations", can not think p(y|k) . every length ( t ) , every word ( t_k ) find v_t,k probability of probable sentence t words , word t_k @ sentence's end.

c# - Crystal Report Viewer Not Displaying the data. ( ASP.NET ) -

Image
i developing website using asp.net. use crystal report reporting tool. use code load report rpt.load(server.mappath("~\\reports\\a4\\grndetailreport-a4.rpt")); rpt.setparametervalue("datefrom", dtimefrom); rpt.setparametervalue("dateto", dtimeto); rpt.setparametervalue("companyid",ddcompanynames.selectedvalue); rpt.setparametervalue("locationid", ddlocations.selectedvalue); crystalreportviewer1.toolpanelview = crystaldecisions.web.toolpanelviewtype.none; crystalreportviewer1.reportsource = rpt; crystalreportviewer1.databind(); so above code working issues. report loading. data not displaying. when press refresh button on page displaying. whats gone wrong there? i called function @ bottom of above code. crystalreportviewer1.refreshreport(); but still got problem. also when press refresh button asking parameter window. how bypas window? sett...

linux - expect for non-interactive sessions -

i'm using docker container. need send bash commands container through expect script dont want console opened. #!/usr/bin/expect set cont_name [lindex $argv 0]; spawn docker attach vont1 send "netconfd&\n" interact the problem need achieve without opening console.if remove interact i'm not able send commands container. there way send commands container(bash shell) without interact should executed in background.

Git manage/merge remote branches from local host -

i working on project other developers , designer. when comes style project, can not work on else wait designer finish. tried do, , half way there, is: i set vhost designer, "different" project different url. i copied project designer_folder. i did git init, , add (developer_folder) remote. what failed is, pull on designer_project specific_branch changes specific_branch of developer_project. want have project him can play around , in end pull changes project. every time start working on something, create new branch on project, , merge changes pull changes project. just comments, googled , looked in stackoverflow. not find 1 work. i struggling. please help. you can use bare repository it. add folder can both access, go , call git init --bare then both use remote git remote add local path/to/created/folder you can push , pull that. have connected 2 remotes (origin , local) , can still push , pull other remote else working with.

cordova - Phonegap - Android Geolocation is not accurate -

i use cordova // platform: android // 3.5.1 when use geolocation var options = {enablehighaccuracy: true}; navigator.geolocation.getcurrentposition(that.geosuccess, that.geoerror, options); this.geosuccess = function(position) { console.log("geosuccess :"+position.coords.latitude+", "+ position.coords.longitude) that.mylocation = new google.maps.latlng(position.coords.latitude, position.coords.longitude); }; i in log: 31.4956033, 34.9326514 which 3.7 kilometre actual location. any idea why? or how fix? on ios following position: 31.518463052524, 34.90405467862522 which actual position, therefore code correct. when use google map (on android device) position correct, therefore it's not hardware problem. in manifest have: <uses-permission android:name="android.permission.access_coarse_location" /> <uses-permission android:name="android.permission.access_fine_location" /> ...

objective c - Disable Cut/Copy in Webview -

ok, scenario simple: i have webview i want user not to able cut/copy webview, no matter (either ⌘c , or via edit menu) i know have subclass webview, specific methods have override? any ideas? (any other approach welcome!) add following css file html { -ms-touch-action: manipulation; touch-action: manipulation; } body { -webkit-user-select: none !important; -webkit-tap-highlight-color: rgba(0,0,0,0) !important; -webkit-touch-callout: none !important; } and link css html <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="layouttemplates/css/style.css" type="text/css" /> </head> </html> or programmatically disable - (void)webviewdidfinishload:(uiwebview *)webview { [webview stringbyevaluatingjavascriptfromstring:@"document.documentelement.style.webkit...