Posts

Showing posts from April, 2013

jquery - beautifulsoup select parent content not children content -

i have following html: <div class="date_on_by"> <a sasource="qp_focused" href="/author/bill-maurer/articles">bill maurer</a> <span class="bullet">•</span> yesterday, 9:33 <span class="bullet">•</span> <span class="comments">98&nbsp;comments</span> </div> if use text.find_all('div',class_="date_on_by").gettext() , returns " bill maurer • yesterday, 9:33 • 98 comments but want only: yesterday, 9:33 which not in children content. how that? i figured out ! for date in text.find_all('div',class_="date_on_by"): dates.append(re.split(text.find_all('span',class_="bullet")[0].gettext(),date.gettext())[1])

javascript - Disable or modify input[date] default buttons/controls and datepicker -

Image
i have input field of type date (for validation using ngmessages ): <input type="date" ng-model="info.date" id="datefield" class="input-field datepicker"> i using own bootstrap datepicker. i want rid of default datepicker calendar , default buttons/controls input[date] has: how rid of these? in case can't rid of these, ok using default calendar datepicker comes angularjs how style these elements (calendar , buttons/controls)? to disable spinner , picker can use (in chrome): input::-webkit-calendar-picker-indicator, input::-webkit-inner-spin-button { display: none; } you can find these pseudo elements inspecting shadow dom: demo

c# - Kentor AuthServices - serviceCertificates for SP (.pfx with password protected) throwing network password error -

error : specified network password not correct. description: un handled exception occurred during execution of current web request. please review stack trace more information error , originated in code. exception details: specified network password not correct. reason: can export certificate '.pfx' password protected. "kentor authservices" doesn't support password protected understand.. it said issue closed per below link https://github.com/kentorit/authservices/issues/457 .net error: because of 'x509keystorageflags.machinekeyset' flag set.. all did saved .pfx file in solution , pointed server certificate file path it. need else pass through error? your appreciated. when export .pfx file in certificate manager prompted password, can leave blank , press ok generate pfx without passwords. having pfx simple approach in test/dev environments including pfx in source lets source , run. that's why i'm doing sample applications

excel - Reference must be on the active sheet error -

i getting reference must on active sheet error on last line. for each ws in tabarr() ws select case .name case "summary" area = "prnsummary" title = "$1:$9" case "monthly cc sum" area = "prnmonthlyccsum" title = "$2:$16" case .name = "div sal sum" area = "prndivsalsum" title = "" case .name = "cc sal sum" area = "prnccsalsum" title = "$2:$16" end select .pagesetup .printarea = area '<----error here i have tried creating worksheet object. dim ws worksheet each e in tabarr() set ws = e debug.print ws.name ws ... but still failed :/ odd thing is, prints first worksheet. fails on second. in first 2 case statements have literal string. in 3rd , 4th case statements have .name = literal

How to trigger a Spinnaker pipeline by schedule or time? -

Image
i have pipeline setup in spinnaker cuts , deploys nightly build. start running @ 2am everyday. couldn't find option or documentation on how this. thanks. when editing pipeline, click "add trigger" , choose "cron" trigger type. there tooltip on "cron expression" field gives on how construct cron expression. thanks, -matt

assembly - MIPS Exception Printing NOT working -

mips exception handler code not working: in following code attempt print out addresses of instruction caused exception (register $14) , type of exception (register $13). have exhausted every possible route think of. the error message gives: "lw": few or incorrectly formatted operands. expected: lw $t1,-100($t2) thank you! mfc0 $k0,$14 # coprocessor 0 register $14 has address of trapping instruction lw $a0, $k0 # address of string print li $v0, 4 # print string service syscall mfc0 $k0,$13 # coprocessor 0 register $13 has type of exception lw $a0, $k0 # address of string print li $v0, 4 # print string service syscall instead of: lw <regdst>,<regsrc> do: move <regdst>,<regsrc> move pseudo-op [most likely] generate: addu <regdst>,<regsrc>,$zero or, done with: addiu <regdst>,<regsrc>,0 side note: i've written full exception handler before, sure fir

swift - Instant Message Push Notification Using Sinch not coming on iOS -

[![enter image description here][1]][1]i've mentioned fields still i'm not getting push notification. code: firstly in didfinishlaunchingwithoptions call this: self.push = sinch.managedpushwithapsenvironment(.production) self.push?.delegate = self self.push?.setdesiredpushtypeautomatically() client = sinch.clientwithapplicationkey("xxxxxx", applicationsecret: "xxxxxxx", environmenthost: "sandbox.sinch.com", userid: userid) client?.delegate = self client?.setsupportmessaging(true) client?.setsupportpushnotifications(true) client?.enablemanagedpushnotifications() client?.start() client?.startlisteningonactiveconnection() self.push?.registerusernotificationsettings() func managedpush(managedpush: sinmanagedpush!, didreceiveincomingpushwithpayload payload: [nsobject : anyobject]!, fortype pushtype: string!) { self.client?.relayremotepushnotificat

javascript - Event binding on dynamically created elements? -

i have bit of code looping through select boxes on page , binding .hover event them bit of twiddling width on mouse on/off . this happens on page ready , works fine. the problem have select boxes add via ajax or dom after initial loop won't have event bound. i have found plugin ( jquery live query plugin ), before add 5k pages plugin, want see if knows way this, either jquery directly or option. as of jquery 1.7 should use jquery.fn.on : $(staticancestors).on(eventname, dynamicchild, function() {}); prior this , recommended approach use live() : $(selector).live( eventname, function(){} ); however, live() deprecated in 1.7 in favour of on() , , removed in 1.9. live() signature: $(selector).live( eventname, function(){} ); ... can replaced following on() signature: $(document).on( eventname, selector, function(){} ); for example, if page dynamically creating elements class name dosomething bind event parent exists, document . $(document

python - clone url of a pull request -

i'm trying clone url of pull request. example in ruby using octokit library, can fetch head , base so, pr pullrequest object: pr.head.repo.clone_url or pr.base.repo.clone_url . how can achieve same thing using github3.py? github3.pull_request(owner, repo, number).as_dict()['head']['repo']['clone_url']

javascript - Errors upon Injecting services into my component in Angular 2 -

i working on app portfolio angular 2 have filtering functionality via checkboxes. these checkboxes apply name filtering lists of technologies i've used each project i've worked on. in app have functionality allows indicate project. app need keep track of number of likes each project receives. in code add service project component allows me not loose number of likes , filtered projects switch views router. in code have array of project objects, each take following form- new project( "web design business website", ["wordpress", "bootstrap","php","html5","css3"], 0 ) able filtering , favoriting functionality work if don't use service, need use 1 aformentioned reasons , when attempt import in service , use it, unable see template html on screen , following errors- exception: error: uncaught (in promise): exception: error in :0:0 original exception: typeerror: cannot read property 'filter' of undefined

Connect to a MySQL Database on the LAN using LUA on ESP8266 -

i have mysql db on raspberry pi, ip:192.168.100.230. have nodemcu (esp8266) ip:192.168.100.150. raspberry pi mysql has following database used development: database: pythonprog user: pythonuser pass: password123 table: esptest i trying esp8266 log temperature (integer) database on pi using lua. the code have test connection is: -- script test connection mysql db mysql = require "luasql.mysql" local env = mysql.mysql() local conn = env:connect('pythonprog','pythonuser'@'192.168.100.230','password123') print(env,conn) the error is mysql_test1.lua:4: ')' expected near '@' there little information out there on these little devices, assistance appreciated. thanks. that connection string should without quotes: env:connect('pythonprog','pythonuser@192.168.100.230','password123') or, if really want keep '@' separated ;-) (don't this) 'pythonuser'..'

.net - How is Thread.SpinWait useful on a single-core CPU? -

on single core machine, if running thread spin-waits because waiting release of lock thread holds, isn't spin-wait waste of cpu time because thread holds lock anyway on wait queue? therefore, spin waiting release of lock valuable on machines multiple cores? for matter, question applies slim objects such semaphoreslim , readerwriterlockslim well. yes, spin waiting useless , counterproductive on single-core machines -- such machines increasingly rare. .net 4.0 introduces more advanced spinwait structure. if used on single-core machine give current thread's time slice , allow progress made on other threads, since busy waiting length of time nothing hold processor. (spin waiting in sense still make sense hardware drivers on single core machines since hardware can make progress in background, hardware drivers aren't written in il, of course.) similarly, *slim types not employ spinning if used on single-core machine. still worthwhile use when possible be

java - Dynamically updating table layout in android app -

Image
i building app android dynamically updates table layout table rows. way this, having fixed table row layout populate content , insert table layout , displays seen below. the problem i'm having when add row contains content longer in middle part , creates multiple lines on 1 of text views, somehow shortens width of layout contains 2 text views of other rows (middle part), have single lines, example first , second row in image below. you can find code below. if need more code or examples, please tell me. row_main.xml - fixed layout of row. <?xml version="1.0" encoding="utf-8"?> <merge xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/tablerowmain1" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margintop="10dp" android:layout_marginbottom="10dp" > <linearlayout android:layout_width="wrap_content&quo

azure - UWP app after deploy not work (An error occurred while sending the request) -

there development pc vs 2015. in solution on uwp_app + webapp. uwp success connect localhost webapp. create vm win10 in azure. deploy (copy) , start webapp - work edge chrome create uwp package , deploy in vm on httpclient.postasync "an error occurred while sending request" create vm win10 (with vs2015 gallery) in azure deploy (copy) , start webapp create uwp package , deploy in vm on httpclient.postasync "an error occurred while sending request" run uwp vs - no error next run no error too what that? how detect connection error? by default app not allow loopback. checkbox in project properties in debug tab - not work. checknetisolation loopbackexempt -a -n=< packagename >

How can I configure a connection from Bluemix to on-premise database? -

i have configured secure gateway service on ibm bluemix , secure gateway client in environment. both connected. thereafter, added connection call cloud app provided host:port combination. app getting error connection refused . how fix this? in cases error caused 1 of following reasons: in secure gateway configuration have provide ip address , port on-premises database, seen secure gateway client running. did provide correct ip address , port number? the firewall on database server blocking access secure gateway client. the secure gateway client needs acl (access control list) opens connections. your database not configured accessed outside. did open port?

hover - jQuery - How to apply addClass to only current instance? -

this question has answer here: how target current hovering div jquery when there many other divs same class? 1 answer i have code appearing hundreds of times on page: <div class="container"> <div class="containerbutton"></div> <div class="containercontent">content</div> </div> <div class="container"> <div class="containerbutton"></div> <div class="containercontent">content</div> </div> <div class="container"> <div class="containerbutton"></div> <div class="containercontent">content</div> </div> i'm trying achieve this: whenever "containerbutton" hovered, want "containercontent" div under display , have "displayclass" class applied it

javascript - Return 3 closest locations to a users location (geolocation) and list those locations for them -

background: i working on website/app built html/css/javascript use geolocation (google maps api) find users location (geolocation) , return them, example, top 5 closest water parks them @ location @ able navigate 1 of locations. using google fusion tables return results them. question: i have been able successfully... find users location , put marker there (using map api/geolocation) return 3 out of 5 locations , put markers down 3 (i used fusion tables & limited results 3) i want able to… return 3 closest locations user (i.e. calculate distance users location nearest water park) put "sidebar" or list of 3 locations , detailing name, address, , other fields in fusion table i made fiddle below code have far. code below fusion table query, assume need make changes in order 3 closest locations (question #1). question #2, listing locations, might use of code have in fiddle. var base_query = { select: 'location', from: '1msmdovwlk

ruby on rails - JQuery ajax form submit resets select value and does not persist it -

i've got select field using filter results on table. when pick option select fires ajax , updates table... however, resets select once table has updated. if use text box filter don't run issue. form: <%= form_tag items_path, method: :get, class: "navbar-form search-form", remote: true %> <%= select_tag :search, options_from_collection_for_select(model.all, "id", "id"), include_blank: true, class: "form-control", id: "filter-key" %> <% end %> js/jquery $(document).ready(function(){ $(document).on("change", "#filter-key", function(){ var form = $('.search-form'); $.get(form.action, form.serialize(), null, 'script'); return false; }); }); something in script that's being returned must resetting select value. save value , put in ajax code. var self = $(this); var oldvalue = self.val(); $.getscript(form.attr('action'), form.se

C# + MySQL DB don't work in debug -

i have problem mysql database , .net freamwork. i have 2 applications asp.net mvc , desktop connect database on azure (mysql). when run asp.net mvc application on localhost , desktop application can not connect database , exception: [ioexception: unable read data transport connection: connection attempt failed because connected party did not respond after period of time, or established connection failed because connected host has failed respond.] but when publish asp.net application in azure have database app work perfect database. i think may have blocked port 3306 on system or internet can connect database via mysql workbench , there realize queries database if program can why have problem ? simple code mysqlconnection conn = new mysqlconnection("server=eu-cdbr-azure-west-d.cloudapp.net;database=brydz;uid=----;password=----;allow user variables=true"); try { string nazwa=""; conn.open(); string query = "select nazwa gracze gracz_

java - how make oauth 2.0 works in my web application -

i developing small web application , blocked @ step make authentication users , more clear followed steps configure oauth 2.0 in credentials option , when tape url application in browser authentication window not appear @ website ,so did enough or have other in code side @ eclipse.

javascript - jQuery One() not working correctly and still allowing replication -

i'm trying have button appear on separate button click. there 2 buttons "traditional" , "simple" , both of them trigger panel expand. when panel expands want add third button allows user scroll next section of page. i'm placing button in div called box. however, one() function doesn't work, , more buttons continue pile on top of each other. i'm using other methods, one() function seemed simplest. here's jquery code: <script type="text/javascript"> $(document).ready(function() { $('.buttons').click(function() { $('#one .container').animate({ height: "800px" }, 300); $('html, body').animate({ scrolltop: $("#one").offset().top }, 1000); //this part isn't working correctly $(".buttons").one("click", function() { $("#box").append('<a href="#two" class="g

Loading dynamic imageviews in loop in Android creating gaps -

i reading data soap service , using data load images res folder locally. using loop because there 6 images being loaded. code : final tablelayout tbllay = (tablelayout)findviewbyid(r.id.lottotl); final layoutparams params = new tablelayout.layoutparams(layoutparams.match_parent, layoutparams.wrap_content); for(int i=2;i<9;i++) { final imageview image = new imageview(lastdraw.this); image.setlayoutparams(trparams); image.setmaxheight(20); image.setmaxwidth(20); string imgname = "img_" + split[i].substring(split[i].indexof("=") + 1); int id = getresources().getidentifier(imgname, "drawable", getpackagename()); image.setimageresource(id); row2.setlayoutparams(params); row2.addview(image); } tbllay.addview(row2); the issue having there gap between first image , consecutive images. it looks (each number representing image): 1.........23456 i thinking has layout of row in tablelayout, wr

excel - How to convert the allocation of values in a column, into values between 1 to -1 -

in excel i've got column values between 3-21. want convert them in column b, in order have first value 3 = 1 , last value 21 = -1. possible? thank you! in b1 enter: =(-a1+12)/9 , copy down

Python -- passing multiple variables from a list of names -

this question has answer here: how create variable number of variables? 12 answers i able bunch of variables names listed in array, example: import numpy np nsim=100 vec in ['lgx1','lgx2','lgx3']: vec=np.random.uniform(low=0.0, high=1.0, size=nsim) this doesn't produce compilation error, doesn't seem want either (i.e., doesn't set 3 arrays named lgx1, lgx2 , lgx3 of random uniformly drawn variables). more compact having 1 such command each of arrays. suggestions? of still speaking supermongo, looking python analog of foreach vec {lgx1 lgx2 lgx3} {set $vec=random(100)} many thanks! do not try use variable names constructed variable. instead, use dictionary: import numpy np nsim=100 arrays = {} vec in ['lgx1','lgx2','lgx3']: arrays[vec] = np.random.uniform(low=0.0, high=1.0, size=nsim)

css - Link doesn't behave correctly (because of webkit transition?) -

i using following code found on web create these "roll" links seem not work correctly meaning when clicked jquery script(animate anchor) doesn't execute. seem happen on chrome(version 28.0.1500.95) only. to reproduce issue, go jsfiddle: http://jsfiddle.net/gsjcv/2/ , hit link multiple times(hit - scroll - hit again) , notice sometime stucks , doesn't work. removing "roll-link" css makes work, ideas it's causing this? css: .roll-link { display: inline-block; overflow: hidden; vertical-align: top; -webkit-perspective: 600px; -moz-perspective: 600px; -ms-perspective: 600px; perspective: 600px; -webkit-perspective-origin: 50% 50%; -moz-perspective-origin: 50% 50%; -ms-perspective-origin: 50% 50%; perspective-origin: 50% 50%; } .roll-link span { display: block; position: relative; padding: 0 2px; -webkit-transition: 300ms ease; -moz-transition: 300ms ease;

web - Deploy a Laravel 5 application -

i wrote laravel 5 application (i totally new laravel, , developed application on local computer (using xampp web server). now, need deploy application on server. dept gave me username/password. used putty , winscp login. when logged-in using winscp, saw shortcut of "domain name". when click on shortcut, display below: /var/www/client/client1/web1 --webdav --web --tmp --ssl --private --log --home --cgi-bin --backup have no idea structure of web. should deploy laravel application? might stupid question, need help. thank help.

CocoaPod - The `public_header_files` pattern did not match any file -

i storing pre-compiled framework in amazon s3. "pod spec lint" fails following errors. - error | [ios] file patterns: `source_files` pattern did not match file. - error | [ios] file patterns: `public_header_files` pattern did not match file. running verbose option shows downloading s3, instead of copying downloaded framework, cocoapod copying framework '~//library/caches/cocoapods/pods/external/' directory. turns out empty framework. because of this, "pod spec lint" fails above mentioned errors. here relevant part "pod spec lint" output http download $ /usr/bin/curl -f -l -o /var/folders/qv/ld8pxb7d0_s1xn1mztqktj8h0000gn/t/d20160601-3868-fmxlyy/file.tgz https://s3.amazonaws.com/framework.ios.sdk/myframework.framework.1.0.tar.gz --create-dirs --netrc % total % received % xferd average speed time time time current dload upload total spent left speed 10

asp.net - Copy, Create and Update a file, keeping the original file in C# -

i trying copy file (filename) folder call backup. when file have been copied backup folder, modifysqlfile() read file backup folder , update file in , keep original file (filename) @ usual place. when program run 2nd time, read original file , create copy backup , updated copied file , overwrite previous copied file. however, not sure codes went wrong , how overwriting of existing file. kindly, me out i'm new this. public string filename = "depot-pub_sub_combined (wo cardholder).sql"; private void modifysqlfile() { copyfile(); string[] filetexts = file.readalllines(@"backup\depot-pub_sub_combined (wo cardholder).sql"); int counter = 0; //file processing foreach (string line in filetexts) { //only process non-comments line if (line.startswith("--") == false) { //replace instances of server name if (line.contains(servername) == true) { filete

java - JPA2.0 How to map a collection of an entity with inheritance mapped by TABLE_PER_CLASS -

i want map collection (a map) of entity inheritance. entity , inheriting entity that: @entity public class testentity { @onetomany(mappedby = "parent") public map<string, mapvalueentity> map = new hashmap<string, mapvalueentity>(); @id @generatedvalue(strategy = auto) protected long id; public string name; public testentity() { } public testentity(string name) { this.name = name; } } @entity public class subentity extends testentity{ public subentity() { } string testsubentityname; public subentity(string name) { this.testsubentityname = name; } } the entity used map value this @entity public class mapvalueentity { testentity parent; @id @generatedvalue(strategy = auto) protected long id; public mapvalueentity() { } string subentityname; public mapvalueentity(string name) { this.subentityname = name; } } and her

Compare two vector in R -

i have 2 vectors: a = c(1,2,3) , b = c(1,2,3) i want test whether a same b . know result can given sum(a == b) == length(a) , there elegant way? we can use identical identical(a,b) #[1] true or if there difference in attributes need avoid in comparison, use all.equal all.equal(a,b, check.attributes=false) #[1] true or using similar approach in op's post, can make compact all all(a==b) #[1] true the number of characters in above approach less... nchar("identical(a,b)") #[1] 14 nchar("all(a==b)") #[1] 9

android - Using Scrollable Textview in Fragments doesn't reappear when screen is touched -

i have image , textview in fragment(split screen). have image in top half of screen , textview in bottom half of screen. need textview scrollable. have tried putting scrollable view around textview, showed full screen , no scrollbar. after reading scrollable textviews, discovered there attribute it, used "android:scrollbars="vertical". however, when touch screen scrollbar doesn't appear though there more text display. have implemented ontouchlistener make sure screen being touch active, doesn't cause scrollbar appear. have read post several times: making textview scrollable on android don't see i'm missing. causes scrollbar display? display when screen first appears , fades away. missing make scrollbar reappear when touch textview in fragment? here xml file: <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_p

jquery - Resizing image base on the longest side -

this question has answer here: how auto-resize image fit div container 26 answers i'm trying find method re-size image (.jpg) file base on longest side. images taken vertically , horizontally have different longest side, i'm trying fit them size-fixed div (inline-block). if control width or length, not in scale (squashed). i have read " css equivalent of “if” statement ", seems there similar/possible method can go about... finding longest side (width or height) , adding 2 css that. perhaps along lines below? (page html based) css img.thumb { identify longest side} //not quite sure how go img.thumb width { width:200px; height:auto; border:0px; } img.thumb height{ width:auto; height:200px; border:0px; } i prefer not to, need use jquery instead (e.g. find image width , length, if width > length add "width" class)

google spreadsheet - Filter one sheet, A, with another, B, to get a new sheet, C, with rows that don't exist in B -

i'm trying rid of bad data in inventory list. sheet sheet list of products. sheet b sheet, generated piece of software, lists of products have been sold i need generate third sheet, sheet c, lists unsold products. so, number of rows between sheet b , sheet c should add total number of rows on sheet a. how cross-reference/filter sheet b achieve c? the following formula returns list of entries column of sheet1 not present in column of sheet2: =filter(sheet1!a2:a, isna(match(sheet1!a2:a, sheet2!a2:a, 0))) explanation: match returns error code #n/a entries in sheet1!a2:a not found in sheet2!a2:a. isna function converts true boolean values. finally, filter returns rows second argument evaluates true. the filter can return more 1 column: can be, example, =filter(sheet1!a2:z, isna(match(sheet1!a2:a, sheet2!a2:a, 0))) but match requires one-dimensional range, need column (here assumed a) can used identifier of row.

php - How to set min/max date add default and disable future/pass date for admin grid massaction -

can set min / max (today) on massaction date on custom admin grid , disable click date on future/pass , set default value if user don't want select? my code follows: $this->getmassactionblock()->additem('setdate', array( 'label' => $this->__('set date'), 'url' => $this->geturl('*/*/masssetdate', array('' => '')), 'confirm' => $this->__('are sure?'), 'additional' => array( 'setmaxdate' => array( 'name' => 'setmaxdate', 'time' => true, 'input' => 'datetime', 'type' => 'datetime', 'class' => 'required-entry', 'label' => mage::helper('setcustomdate')->__('set max date'), //'gmtoffset' => true,

How to get client IP address in Azure Functions C#? -

i'm writing function in c# using azure functions , need ip address of client called function, possible? here answer based on 1 here . #r "system.web" using system.net; using system.web; public static httpresponsemessage run(httprequestmessage req, tracewriter log) { string clientip = ((httpcontextwrapper)req.properties["ms_httpcontext"]).request.userhostaddress; return req.createresponse(httpstatuscode.ok, $"the client ip {clientip}"); }

javascript - Why does jQuery or a DOM method such as getElementById not find the element? -

what possible reasons document.getelementbyid , $("#id") or other dom method / jquery selector not finding elements? example problems include: jquery silently failing bind event handler, , standard dom method returning null resulting in error: uncaught typeerror: cannot set property '...' of null the element trying find wasn’t in dom when script ran. the position of dom-reliant script can have profound effect upon behavior. browsers parse html documents top bottom. elements added dom , scripts (generally) executed they're encountered. this means order matters. typically, scripts can't find elements appear later in markup because elements have yet added dom. consider following markup; script #1 fails find <div> while script #2 succeeds: <script> console.log("script #1: %o", document.getelementbyid("test")); // null </script> <div id="test">test div</div> <

android - how to open pdf in webview without gdoc from Url -

i try open pdf url in webview below code , found solutions gdoc not useful me because want show pdf in view mode , user should not download , need clear cache after press code : mwebview.setwebchromeclient(new webchromeclient()); websettings settings = mwebview.getsettings(); settings.setpluginstate(websettings.pluginstate.on); mwebview.setwebviewclient(new mybrowser()); mwebview.setbackgroundcolor(0x00000000); settings.setallowfileaccess(false); settings.setbuiltinzoomcontrols(true); settings.setsupportzoom(true); settings.setusewideviewport(true); settings.setloadwithoverviewmode(false); settings.setsaveformdata(false); settings.setjavascriptenabled(true); use code: webview webview = (webview) findviewbyid(r.id.my_webview); webview.setwebviewclient(new mywebviewclient()); webview.addview(webview.getzoomcontrols()); webview.getsettings().setjavascriptenabled(true); webview.loadurl("http://docs.google.com/gview?

javascript - Get color of target html element in React -

trying color of html element using react, pass to redux action/reducer. jsx <div> <button stylename="css_toggle" id ="css" onclick {this.handleclick}>css</button> </div> event handler handleclick(e){ const{dispatch} = this.props; console.log(`e.target: ${e.target.style}`); dispatch(currview(e.target.id, e.target.style.background)); } console/redux console returns empty values styles. i using react-css-modules/css-modules, , anomaly can think of. any ideas more welcome, thank you. edit: have created branch stackoverflow question: https://github.com/charliegreenman/pixellight/tree/stackoverflow-37583025 note: data flow of app, there single static value, populates rest of app dynamic. in response, suggestion(s), after thought, have decided proper way architect app. you can use refs reliable reference element. https://facebook.github.io/react/docs/more-about-refs.html jsx <div> <button

java - maven-site-plugin: <body> tag is not being inherited -

if mvn site:effective-site on parent this: <project> <bannerleft> <name>xxx :: open source parent pom</name> </bannerleft> <publishdate /> <version /> <skin> <groupid>org.apache.maven.skins</groupid> <artifactid>maven-fluido-skin</artifactid> <version>1.5</version> </skin> <body> <menu ref="parent" /> <menu ref="reports" /> </body> </project> however, if on child project this: <project> <bannerleft> <name>xxx :: parent</name> </bannerleft> <publishdate /> <version /> <skin> <groupid>org.apache.maven.skins</groupid> <artifactid>maven-fluido-skin</artifactid> <version>1.5</version> </skin> <body /> </project> here's site_en.xml thats in same project parent pom &l

sql - Mysql Get data for Last Six weeks using JOIN -

i have edited query selecting employees data have done assessments in past 6 weeks. logically should each employee 2 time if has done assessments in 2 weeks query shows single record. select assessmentemployee. employeename, avg(assessmentlisting.assessmentscore), date_format((str_to_date(`assessmentsubmitteddatetime`, '%d-%b-%y %i:%i %p')) , '%y-%m-%v') _month assessmentemployee left join assessmentlisting on assessmentemployee.assessmentid=assessmentlisting.assessmentid (str_to_date(`assessmentsubmitteddatetime`, '%d-%b-%y %i:%i %p') >= date_format(now() - interval 6 week, '%y' )) group assessmentemployee.employeename i have following table using. assessmentemployee id assessmentid employeename other table assessmentlisting id assessmentid assessmentsubmitteddatetime assessmentscore i want employees have score/ done assessments in last sex weeks , average score. sample of data column of assessmentlisti

objective c - Adobe Acrobat is interfering with PDF files shown with WebView -

Image
i using webview class webkit display pdf document. i creating instance of nsurlrequest , passing url pdf. the pdf document not display when adobe acrobat installed on system. uninstalling acrobat fixes issue. when acrobat installed, white screen loading bar shown: when acrobat not installed, pdf shown: how can fix , work acrobat installed? access preferences property of webview, , disable plugins. [webview.preferences setpluginsenabled:no]; this disable acrobat plugin.

install - How to resolve ICE03: String overflow in WiX? -

in installer feature tree control in maintenance dialog publishes 2 events sets property named disableinstallbtn 0 or 1, respectively. , disableinstallbtn used condition of enable/disable action of install button. behaves this: if features 'deselected' install button becomes disabled. so, each event(publish element) has condition published. example, event sets disableinstallbtn 1 has condition this: <![cdata[(!feature1=2 or &feature1=2) , ... , (!featuren=2 or &featuren=2)]]> (if don't understand syntax of condition can check http://wix.tramontana.co.hu/tutorial/com-expression-syntax-miscellanea/expression-syntax ) the problem condition string long string overflow warning when compile .wxs file. there way resolve problem? thanks. wix's built-in customizedlg (located under src\ext\uiextension\wixlib if have source code) has functionality you're looking in next button. subscribe selectionnoitems event. <control id="inst

c# - PadRight() isn't padding at all -

i'm trying use string.padright method in c#, it's not doing string. code: int strlen = 4 - (data.length % 4); char pad = '='; string datapad = data.padright(strlen, pad); the string in question base64 encoded data, , need '=' @ end pad convertfrombase64 work properly. eyjhbgcioijsuzi1niisimtpzci6ijy5ndzmzjnlzguyotk3zwexmmvhmdrlngfhnjyyowrjzwvhzwzhotaifq strlen must greater length of data in order pad it. grant winney points out, padright takes total width of string, , not number of times you'd repeat character @ end of it. in code below, strlen less or equal 4, lot less length of base 64 encoded string. int strlen = 4 - (data.length % 4); so might want instead: int strlen = 4 - (data.length % 4) + data.length; or just: string datapad = data.padright(strlen + data.length, pad);

objective c - How To get to know focussed window in cocoa, and how to set it to desired window.? -

i new cocoa mac development, right developing mac app having several server hit after particular time. if hit gets desired data need to show equivalent window , show window using [mywindow showwindow:self] method. shows desired window , set key window visible window mywindow. each , fine till problem suppose when user start working on window , open several other child window unfortunately show window called , focus of working window transferred other window. after several searches found can focused window accessing [[nsapplication sharedapplication]keywindow]delegate], applied several condition when , window on key window don't hit server. but problem not solved. think setting keywindow current working window best option. please suggest me can , how can forcefully set window key window. any appreciated. in advance. if understand question correctly wish bring window forward if receives input server without moving in front of current main or key windows. the

ios - Cannot find users after importing project into new Firebase console -

i upgrading project firebase.com console.firebase.google . have follow steps on migration guide on below link. https://firebase.google.com/support/guides/firebase-ios#import_your_project_to_the_new_firebase_console_numbered the database imported user not able imported firebase goole console. need regarding this. helpful answer highly appreciated. from docs your user data automatically migrated new authentication backend. happens in background , users can continue use app while data being migrated. user signups , logins not affected. while system migrating user accounts, see spinner in auth tab of firebase console . you wait while background process, , can see spinner in auth tab confirm users being synced or not ?

ios - load another view controller into UItabbarcontroller -

after logging uiviewcontroller, redirected first item of uitabbarcontroller. works fine, in first viewcontrollers want push view controller tabor view.this should happen while logged in first time. in other words want replace selected viewcontroller one. uiviewcontroller not attached tabbar controller, not want attach because replace first tabview item one. you run problems if try transition view controller in viewdidload. should either switch child view controllers of tab bar controller or can present subview within 1 of child view controllers. when -viewdidload called, view controller not presented. such, if try present controller, crash. try -viewdidappear: if want describing.

javascript - Meteor react js logged in user email -

i'm using meteor , react , im trying display logged in user's email address this im using currentuseremail() { return meteor.user().emails[0].address; }, render() { , in return have <flatbutton label={this.currentuseremail()} primary={true} /> but im getting emails not defined ive tried use <flatbutton label={meteor.user().emails[0].address} primary={true} /> directly im stil getting email undefined out ive got solution currentuseremail() { var userid = meteor.userid(); var user = meteor.users.findone({_id: userid}); return user.emails[0].address; } , flat button label <flatbutton label={this.currentuseremail()} primary={true} />

vb.net - Change datagriview cell value on CellValidating -

i change value of cell value user inputs there , trim before avoid left , right spaces on value before validated. code without feature: private sub grid_cellvalidating(sender object, e datagridviewcellvalidatingeventargs) handles grid.cellvalidating dim newvalue = e.formattedvalue.tostring if not grid.rows(e.rowindex).isnewrow 'and not e.rowindex = grid.newrowindex - 1 select case e.columnindex case 1 'name if string.isnullorempty(newvalue) e.cancel = true exit select end if case else end select end if end sub what tried way, doesn't work: private sub grid_cellvalidating(sender object, e datagridviewcellvalidatingeventargs) handles grid.cellvalidating dim newvalue = e.formattedvalue.tostring.trim '<---trim added 'change value of cell without trims dim aaa datagridviewcell = ctype(sender, datagridview).rows(e.rowindex).cells(e.columnindex

html - "Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\trial\register.php on line 104 -

this question has answer here: php parse/syntax errors; , how solve them? 12 answers parse error: syntax error, unexpected $end [closed] 2 answers it says: parse error: syntax error, unexpected end of file in c:\xampp\htdocs\trial\register.php on line 104 when localhost/trial/register.php line 104 line html tag closes. don't know going on please help. i'm trying create registration page session_start(); //check if logged in if (isset($_session['id'])){ header("location: index.php"); } if (isset($_post['register'])){ include_once("db.php"); $username = strip_tags($_post['username']); $password = strip_tags($_post['password']); $password_co

charts - Google Visualization: Create Data View from Filtered Table -

is there 'built in' way create data view dashboard table using visible rows? want know before code unnecessarily long winded alternative! edit: i missed in reference docs doesn't solve problem since still have jiggery pokery status of active filters on dash , pass them getfilteredrows() method. you can use getfilteredrows() method "returns row indexes rows match of given filters. indexes returned in ascending order. output of method can used input dataview.setrows()" https://developers.google.com/chart/interactive/docs/reference#dataview the chartwrapper object need wrap table in when using dashboard has "view" parameter can use define dataview want use chart: var table = new google.visualization.chartwrapper({ charttype: 'table', containerid: 'mytablediv', options: { // table options }, view: { columns: [/* columns used view */] } });