Posts

Showing posts from July, 2010

html - Send row info to angularjs controller when checkbox in row is clicked -

Image
i have html code uses angularjs show table. on table, there checkbox on each row. the table looks this; here html code. <div ng-app ng-controller="checkctrl"> <table class="table table-hover data-table sort display" style="width:100%"> <thead> <tr> <th class="serial_"> serial </th> <th class="name_"> name </th> <th class="id_"> id </th> <th class="on_off_"> on/off </th> </tr> </thead> <tbody> <tr ng-repeat="item in check_items"> <td>{{item.serial}}</td> <td>{{item.name}}</td> <td>{{item.id}}</td> <td> &

sql case statement in where clause , need to join check on different tables on different cases -

select nc.status newcustomer nc inner join #salesexec userfiltr on userfiltr.userid = nc.reportedby left join distributor d on nc.distributorid = d.distributorid left join shop s on s.shopid = nc.shopid left join shoptype st on st.shoptypeid = s.shoptypeid left join #orgshop orgfiltr on orgfiltr.organizationid = d.organizationid convert(varchar, nc.mobiletransactiondate, 101) between @fromdate , @todate , case nc.status when 1 (st.shoptype null or st.shoptype = '' or st.shoptype <> 'distributor') else (nc.shoptype null or nc.shoptype = '' or nc.shoptype <> 'distributor') end group reportedby you may looking this and 1 = case when nc.status = 1 , (st.shoptype null or st.shoptype ='' or st.shoptype <> 'distributor' ) 1 when (nc.shoptype null or nc.shoptype ='

c# - How do i bind the variable value to the view page at runtime in mvc 4 -

this serious issue i'm facing quite long time 3 hours, suppose no fix found , i'm stuck. here have developed patient registration page in asp.net mvc 4 razor posting form data database if validation comes out true, before need call random variable object storing random value within prespecified range , insert variable view typed(connected patients model class) , created create template such fields or properties of patients class acessed in view store patients data view. now,here need random value (patient's id) preselected patient id textbox each time patientregistration page called works unique token generator every new patient registered. i have tried several other codes bind random value form element patient id none of them worked me.below i'm writing code model class,controller , regisrtation view(cshtml).please me in this! patients model class:- using system; using system.collections.generic; using system.linq; using sy

bash - restart program if it outputs some string -

i want loop process in bash script, process should run forever fails. when fails, outputs >>747;3r last line, keeps running. i tried (just testing) while [ 1 ] mono program.exe last_pid=$! sleep 3000 kill $last_pid done but doesn't work @ all, process mono program.exe runs forever (until crashes, script nothing.) $! expands pid of last process started in background. can seen with: cat test sleep 2 lastpid=$! echo $lastpid ~$ bash -x test + sleep 2 + lastpid= + echo vs ~$ cat test sleep 2 & lastpid=$! echo $lastpid :~$ bash -x test + lastpid=25779 + sleep 2 + echo 25779 the fixed version of script read: while true; mono program.exe & last_pid=$! sleep 3000 kill $last_pid done your version running mono program.exe , sitting there. didn't make next line waiting process finish. kill command didn't work $! never populated (wasn't background process).

typescript - Angular 2 effect is not working -

reducer: import {actionreducer, action} '@ngrx/store'; import {set_brands, set_brand} './brands.actions'; import {ibrandsstorage} './brands-storage.interface'; export const brandsreducer: actionreducer<any> = (state: ibrandsstorage = {list: [], single: {}}, action: action) => { switch(action.type) { case set_brands: return object.assign({}, state, { list: [...action.payload.data] }); case set_brand: return object.assign({}, state, { single: action.payload.data }); } } effect: import {injectable} '@angular/core'; import {action, store} '@ngrx/store'; import {actions, effect} '@ngrx/effects'; import {observable} 'rxjs/observable'; import 'rxjs/add/operator/catch'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/switchmap'; import {get_brands, get_brand} './brands.actions'; import {brandsapi} 'app/shared/apis'; @injectable() e

reporting services - SSRS 2016 - data bar chart with repeating color states over time -

i use ms ssrs 2016 enterprise. i have measured values on time want show on 1 bar chart. values consists of time , status measured in time, e.g.: time | status 05:01 | g (green) 05:15 | r (red) 06:08 | g 11:41 | y (yellow) 11:43 | r 11:59 | y 13:00 | g all need show 1 colored bar day 00:00 23:59 colored according actual status. time on x axis , in case above 05:01 05:15 green, 05:15 06:08 red, 06:08 11:41 green, 2 minutes yellow, red etc. is there ssrs object, able this? calculation of status each time not optimal, show periods instead can't find appropriate chart type. any help? in advance! edit: these real data being load dataset. time status 2016-10-30 10:56:00 0 2016-10-30 10:26:00 3 2016-10-30 07:56:00 0 2016-10-30 06:56:00 3 2016-10-25 17:50:00 0 2016-10-22 08:09:00 0 2016-10-22 07:09:00 3 2016-10-21 13:36:00 0 2016-10-21 08:57:00 0 2016-10-20 15:21:00 0 2016-10-20 15:07:00 0 2016-10-18 19:13:00 0 2016-10-18 15:43:00 3 2016-10-18 03:13:00 0 2

c++ - no member named set_sizing_info was found in Triangulation_vertex_base_2 -

i trying use cgal triangulate 2d plane mesh network. following instructions this link. works fine until last step can use lloyd optimization optimize mesh. when compiling code, error /usr/local/include/cgal/mesh_2/mesh_sizing_field.h:100:12: no member named 'set_sizing_info' in 'cgal::triangulation_vertex_base_2<cgal::epick, cgal::triangulation_ds_vertex_base_2<cgal::triangulation_data_structure_2<cgal::triangulation_vertex_base_2<cgal::epick, cgal::triangulation_ds_vertex_base_2<void> >, cgal::delaunay_mesh_face_base_2<cgal::epick, cgal::constrained_delaunay_triangulation_face_base_2<cgal::epick, cgal::constrained_triangulation_face_base_2<cgal::epick, cgal::triangulation_face_base_2<cgal::epick, cgal::triangulation_ds_face_base_2<void> > > > > > > >' popped up. traced triangulation_ds_face_base_2 , didn't find function named set_sizing_info. my code: // // main.cpp // 2ddrawingtemplate // //

angular - md-input maxlength not working -

Image
even if add maxlength="250" can enter value in agular2-material md-input . is there anyway can disable input field entering text after 250 char. is there alternative maxlenth. my form input : <div class="form-group"> <md-input type="text" required placeholder="name" formcontrolname="name" #namecounthint maxlength="250" class="full-width" dividercolor="{{changeform.controls.name.valid ? 'primary': 'accent'}}"> <md-hint align="end">{{namecounthint.charactercount}} / 250</md-hint> </md-input> <agile-control-messages color="primary" [control]="teamform.controls.name"></agile-control-messages> </div> any great. i found simple demo on how have validation , maybe you. component template: <form [ngformmodel]="someformhandle" [(ngsubmit)="

ios - SDWebImage is not updating image in TableView -

i have build app has user profile. user can change profile image uploading new one. the app has table view users upload posts. when send/upload new post or article appear in table user name , profile image (something twitter or instagram). the problem when user change profile image, not change in table posted article. can check profile directly through internet explorer , shows new image. i using code below show image in table: [mycell.userimage sd_setimagewithurl:[nsurl urlwithstring:item.userimageupload] placeholderimage:[uiimage imagenamed:@"video_no_image.jpg"]options:sdwebimagerefreshcached]; i hope find problem. thanks

Overlay analysis in Oracle SQL -

i have 2 spatial tables in oracle. table contains line or point features , has columns: id geom serial number of map list table b contains polygons of map list: id serial number of map list i need produce spatial analysis features table take serial number of map list table b on basement of result of spatial analysis. for example, line feature in polygon abc213, have fill serial number of map list attribute serial number of map list attribute value table b. how can that? it in oracle spatial (i'm using 12c) select * tablea a, tableb b sdo_relate(a.geomcolumn,b.geomcolumn,'mask=anyinteract')='true'; there different types of masks, take here https://docs.oracle.com/database/121/spatl/guid-97c17c18-f05e-49b4-be11-e89b972e2a02.htm#spatl1039

c# - defaulting datatype double to 0 if input is null -

i having bit of difficulty setting variable 0 if user doesn't enter value textbox, making tricky because variable gets passed around multiple forms, if in same form easier do. code attached down below. //in 1 of input forms //runs on button click if (!string.isnullorwhitespace(txtcustomergrowth.text)) { fm.savegrowth(convert.todouble(txtcustomergrowth.text)); //fm instance of class methods save variables } //in class public void savegrowth(double value) { customergrowth = value; } public double getgrowth() { return customergrowth; } //in final summary form double growth = fm.getgrowth(); i have tried saving variable string , converting double when need complains cannot convert type string double want know how can modify first if statement if textbox null set variable null (my issue being not sure how in situation because variable isnt created in input form. edit: i forgot mention runs fine have edit button on summary screen allows change values , when del

javascript - How to have submission page show total from previous form -

this html named week7.html, results in form https://gyazo.com/bd778ddcbb1a01374a37dd0605d13797 your javascript , dom state gets lost when submit form (you're doing regular submit, not ajax submit). form submission triggers new request, resulting in new page. when new page loads, can access whatever dom defined in html file, js. since processform.html (by itself) not have form element called orderform , none of js can work. you perhaps redesign calculation in server , return total alone in processform.html . also, <script type="text/javascript" src="processform.html"> not include file. needs .js file.

javascript - Send pattern to a function -

i have personal function take id , pattern check input. var id, schema; function checkfield(id, schema){ var input = id.val(); var pattern = schema; if (!input.match(pattern)){ console.log('input = '+input); console.log('pattern = '+pattern); id.removeclass().addclass("error"); $(".oke").css({display: 'none'}); }else{ console.log('classe = ok'); id.removeclass().addclass("ok"); $(".nope").css({display: 'none'}); } } // vérification téléphone $("#tel").focusout(function(){ checkfield($(this), "/0[1-7,9]\d{8}/"); }); // vérification code postale $("#cp").focusout(function(){ checkfield($(this), "/^((0[1-9])|([1-8][0-9])|(9[0-8])|(2a)|(2b))[0-9]{3}$/"); }); but if condition return null ( !input.match(pattern) ). 2 console log return number write in input, , pattern correctly, why if

javascript - How to fetch custom header from HTTP response in SAPUI5? -

i performing put operation , working great in rest client in response pgi header shown in below image. click here open image now, try same sapui5 odatamodel using update method. following code. omodel.update("/performpgi(srno='241')", {"srno":"241"}, null, function(odata, oresponse) { console.log(oresponse.headers.pgi) //undefined }, function(err) {}); in response headers didn't find pgi variable. can me out this? thanks. var fnfunction = function(oevent){ //oevent has complete response, headers , on //so can whatever want do. //please note called on failure handle based on response code }; omodel.attachrequestcompleted(odata?, fnfunction, olistener?);

Copying my local git repository directory should result in the same status message, right? -

i have git repository on mac in directory ~/documents/source/thingameios . in local repository if run git status command see nothing outstanding: $ git status on branch master branch up-to-date 'origin/master'. nothing commit, working tree clean if go directory , copy local git repository ( cp -r thingameios testflightthingameios ) , swap newly copied local repository , re-run git status command have outstanding changes: $ git status on branch master branch up-to-date 'origin/master'. changes not staged commit: (use "git add/rm ..." update committed) (use "git checkout -- ..." discard changes in working directory) deleted: frameworks/hockeysdk.embeddedframework/hockeysdk.framework/headers typechange: frameworks/hockeysdk.embeddedframework/hockeysdk.framework/hockeysdk deleted: frameworks/hockeysdk.embeddedframework/hockeysdk.framework/resources deleted: frameworks/hockeysdk.

java - How to share one single config.properties file by an application and by a connected library -

i have written little tool package contains logging, mailing etc. package has it´s own config.properties file, opened that: input = appproperties.class.getclassloader().getresourceasstream("config.properties"); now plan import package external jar other applications. there way have both, application , imported jar, share jar´s config.properties file, , if so, how can done?

imagemap - Multiple "coordinate rings" for HTML image maps -

currently, develop html image maps several regions , wonder if possible create single area tag multiple coordinate rings @ once (for example if 1 region contains islands). as use mouseover js-highlighting effects , these multiple rings must seperatly, want them highlight @ same time when hovering mouse without highlighting regions between these rings ( sounds complicated, therefore see this image ). , of course should same hyperlink. i hope, described problem understandible enough. in advance! my current code (three islands , 3 area tags => i'd 1 area tag): <html> <head> <meta charset="utf-8"> <title>jquery maphilight documentation</title> <script type="text/javascript" src="jquery-3.1.0.min.js"></script> <script type="text/javascript" src="jquery.maphilight.min.js"></script> <script type="text/javascript"> $(functio

synchronization - Android FileSync solution (webdav) alternative -

i trying create simple app can upload file server , send link device can download file. wanted implement using webdav far research goes there no suitable date android webdav library think webdav no go. can please suggest me other aproaches on how achieve this? wanted use webdav because has auth options , can pause resume uploads.

What are the internals of Pythons str.join()? (Hiding passwords from output) -

i stumbled upon interesting(?) way hide passwords (and other personal data) general output screen logfiles. in book how make mistakes in python mike pirnat suggests implement class sensitive strings , overload __str__ - , __repr__ -methods. i experimented , got this: class secret(str): def __init__(self, s): self.string = s def __repr__(self): return "'" + "r"*len(self.string) + "'" def __str__(self): return "s" * len(self.string) def __add__(self, other): return str.__add__(self.__str__(), other) def __radd__(self, other): return str.__add__(other, self.__str__()) def __getslice__(self, i, j): return ("x"*len(self.string))[i:j] (i'm aware using len provides information content hide. it's testing.) it works fine in cases: pwd = secret("nothidden") print("the passwort " + pwd) # passwort

different solution for z3 shell and java api -

i tried same assumption in both z3 shell , java api. follows: (declare-const x (_ bitvec 32)) (assert (not (bvsle (bvadd x #xfffffff8) #x00000000))) (check-sat) (get-model) in z3 shell, solution is: x = 9 in z3 api, solution is: x = 0x80000000 in application, prefer shell result. wanna if missed option in api usage. btw. there option can use control solution value, want more reasonable values. z3 give me big value looking random value. afaik , model of satisfiable formula can be said chosen @ random in z3 . if reasonable value mean small , in principle optimise on x z3 ensure returned model sets x equal #x00000009 . e.g. (declare-const x (_ bitvec 32)) (assert (not (bvsle (bvadd x #xfffffff8) #x00000000))) (minimize x) (check-sat) (get-model) of course might have significant impact on time taken search on harder problems. this 1 of situations in setting timeout on optimisation search, , still being able retrieve model associated best approximation

lex - How flex handle ambiguous patterns -

i want use flex handle patterns. in case, both constant , function name alphabetical strings begin uppercase letter. example, in mother(liz, bob) , how can differentiate mother , liz ? want ( single token, can not regard mother( pattern. normally, unnecessary generate different token types different kinds of identifier. parser shouldn't need distinction if different uses can distinguished syntactically. (if need semantic information differentiate, , sentence ambiguous without information, might need semantic feedback not appear case here.) if don't have parser, need syntactic analysis. say, example, function names always followed ( -- means language doesn't allow higher order functions. write wrapper around yylex reads 1 token in advance , emits function_name or constant_name , depending on following token.

r - glmmLasso error and warning -

i trying perform variable selection in generalized linear mixed model using glmmlasso, coming error , warning, can not resolve. dataset unbalanced, participants (ptno) having more samples others; no missing data. dependent variable binary, other variables (beside id variable ptno) continous. suspect generic happening, fail see , have not found solution in documentation or on web. code, adapted glmmlasso soccer example is: glm8 <- glmmlasso(group~ndufv2_dctabl+gper1_dctabl+ esr1_dctabl+esr2_dctabl+klf12_dctabl+sp4_dctabl+sp1_dctabl+ pgam1_dctabl+ank3_dctabl+rasgrp1_dctabl+akt1_dctabl+nudt1_dctabl+ polg_dctabl+ adarb1_dctabl+ogg_dctabl+ pde4b_dctabl+ gsk3b_dctabl+ apoe_dctabl+ mapk6_dctabl, rnd = list(ptno=~1), family = poisson(link = log), data = stackdata, lambda=100, control = list(print.iter=true,start=c(1,rep(0,29)),q.start=0.7)) the error message displayed below. specficially, not believe there nas in dataset , unsure meaning of warnin

javascript - How to detect Google+ user logged in -

i've added basic code google+ api docs. function onsignin(googleuser) { var profile = googleuser.getbasicprofile(); gapi.auth.checksessionstate({session_state: null}, function(isusernotloggedin){ if (isusernotloggedin) { console.log('not logged in'); } else { console.log('logged in'); } }); /* console.log('id: ' + profile.getid()); // not send backend! use id token instead. console.log('name: ' + profile.getname()); console.log('image url: ' + profile.getimageurl()); console.log('email: ' + profile.getemail()); */ var id_token = googleuser.getauthresponse().id_token; //console.log("id token: " + id_token); $.post('login.asp', 'idtoken=' + id_token, function(data){ //console.log('passato login.asp, idtoken=' + data); }); } i see it's not way use it, how can check if user logged in or not, in order let him access authentic

javascript - Need to hide the clicked div and reappear after 10 seconds -

need hide clicked div. i tried example in jsfiddle. new js want better solution. <div class="t1">1</div> <div class="t2">2</div> <div class="t3">3</div> <div class="t4">4</div> <div class="t5">5</div> https://jsfiddle.net/5lh3yfov/ pls find working snippet added below $('body').on('click','.t11',function(){ $(this).hide(); var = $(this); settimeout(function() { that.show(); }, 1000); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div class="t1 t11">1</div> <div class="t2 t11">2</div> <div class="t3 t11">3</div> <div class="t4 t11">4</div> <div class="t5 t11">5</div>

ios - Swift: Autoplay and auto fullScreen for youtube video -

i have embed youtube videos in swift application. video have played automatically after button click , in fullscreen mode. have searched lot , have found many ways exists embed youtube videos not of them support autoplay , auto fullscreen. have tested code video not autoplayed , it’s not automatically showed in fullscreen mode: let webview:uiwebview = uiwebview(frame: cgrect(x: 0, y: 0, width: uiscreen.main.bounds.width, height: uiscreen.main.bounds.height)) self.view.addsubview(webview) webview.allowsinlinemediaplayback = true let myvideo = "https://www.youtube.com/embed/n-gnv7jhkv4" let myhtml = "<iframe width=\"\(webview.frame.size.width)\" height=\"\(webview.frame.size.height)\" src=\"\(myvideo)?autoplay=1\" frameborder=\"0\" allowfullscreen=1></iframe>" webview.loadhtmlstring(myhtml, baseurl: nil) webview.mediaplaybackrequiresuseraction = false can p

php - How do I pass a variable into another page/view? -

i have following scenario. user selects 2 date periods selects contacts database time period. then on next page, want display contacts passed , have text area field user can type message. the problem time next page loads $contacts variable empty. how pass variables across 2 pages? below code select time period <form method="post" action="selectcontacts"> {{ csrf_field() }} <div class="row"> <div class="col-lg-3 col-sm-3 col-xs-6"> <div class="form-group{{ $errors->has('date') ? ' has-error' : '' }}"> <label for="event date">start date</label> <input type ='hidden' name='email' value='{{$email}}'> <input type ='hidden' name='ip' value='{{$ip}}'> <input name="start" type="text" clas

parallel processing - fork-join algorithms with ompss -

openmp/ompss allows define tasks specific inputs , outputs dependencies among different tasks can defined. most of examples feature different functions tasks connected each other via dependencies. standard parallel for-based program? possible define dependencies i.e. among iterations of consecutive 'parallel for' regions? you don't need functions define dependencies. let's take example non-commutative operation such concatenation, here inout dependency make sure tasks executed in order. char buf_n[11] = {0}, buf_l[11] = {0}, buf_u[11] = {0}; #pragma omp parallel { #pragma omp single { int i; (i=0; < 10; i++) { #pragma omp task depend(inout:buf_n) firstprivate(i) { char add[] = {'0' + i}; strncat(buf_n, add, 1); } #pragma omp task depend(inout:buf_l) firstprivate(i) { char add[] = {'a' + i}; strncat(buf_l

mercurial - Referencing specific folder as subrepository -

i want import specific folder external repository. can surely import whole repository subrepository don't want bring whole project need specific folder. is possible via mercurial ? short answer no, can see , use whole mercurial repository only, not it's subtree longer answer you can convert part of repository-tree separate repository , use thin repo (problem of syncing trimmed repo upstream anyway headache)

sql server - Select top 2 distinct for each id and date -

i have table : table1: [id] [tdate] [score] 1 1.1.00 50 1 1.1.00 60 2 1.1.01 50 2 1.1.01 70 2 1.3.01 40 3 1.1.00 80 3 1.1.00 30 3 1.2.00 40 my desired output should this: [id] [tdate] [score] 1 1.1.00 60 2 1.1.01 70 2 1.3.01 40 3 1.1.00 80 3 1.2.00 40 so fare, have written this: select distinct top 2 id, tdate, score ( select id, tdate, score, row_number() over(partition tdate order score) od table1 ) a.od = 1 order score but gives me : [id] [tdate] [score] 2 1.1.01 70 3 1.1.00 80 of course can this: "select top 2 ...where id = 1" and then: union `"select top 2 ... id = 2"` etc.. have 100,000 of this.. any way generalize id? thank you. with toptwo ( sele

How to get the current page number of a PDF in Android -

i have implement custom pdf viewer in android application, have implemented this: https://github.com/barteksc/androidpdfviewer to open pdf used function: /* load pdf in activity */ private void openpdf(){ file file = new file(environment.getexternalstoragedirectory().getabsolutepath() +"/download/verbale.pdf"); pdfview pdfview = (pdfview) findviewbyid(r.id.pdfview); pdfview.fromfile(file) .defaultpage(0) .enableannotationrendering(true) .onload(this) .onpagechange(this) .scrollhandle(new defaultscrollhandle(this)) .load(); } the pdf correctly rendered need page number of page during scroll. how can ? i have tried use this: pdfview.getcurrentpage() pdfview.getpagecount() but not doesn't work... solution @override public void loadcomplete(int nbpages) { totalpages = nbpages; } @override public void onpagechanged(int page, int pagecount) { //pag

ios - CloudKit Sync : Core Data Stack Suggestions -

we need sync data cloud kit our application , maintain local cache of data using core-data. best approach core-data stack ? current setup: main context (main-moc)(main queue) :- used display data main ui , perform edit user. child context (has main-moc parent) (private queue) :- used process data cloud (insert, update, delete) problem : child context : create duplicates overwrite main context updates deletes parent entity value in use child entity. happens when parent entity object(a) deleted in child context, , main moc adds child(b) parent while sync in progress, time sync finishes , child context saved deletes parent object(a) , child object(b) left without parent. do need check such objects after sync finishes , add parent them ? other suggestions

ios - Not need to update object in Realm -

Image
i try read json , create realm, code: func workwithfilejson () { //local file json let file = bundle.main.path(forresource: "mobiledbschema", oftype: "json")! let url = url(fileurlwithpath: file) let jsondata = nsdata(contentsof: url)! //parce json let json = try! jsonserialization.jsonobject(with: jsondata data, options: []) try! realm.write { //create data json our objects realm.create(dataroot.self, value: json, update: true) } } and file classes: import foundation import realmswift class dataroot: object { dynamic var id = 0 dynamic var name = "" let transport_type = list<transport_type>() override class func primarykey() -> string? { return "id" } } class transport_type: object { dynamic var id = 0 dynamic var name = "" let routes = list<routes>()

Android append file can't pass unit test -

i trying use android append on txt file. append method can't passed unit test. example: i tried append "123456" twice "123456123456", got error: junit.framework.comparisonfailure: expected:<123456[]> was:<123456[123456]> my question what's meaning of <> [] in <123456[]> , <123456[123456]> ? my test method below, can passed first assertequal public void appendfilecorrect() throws exception { string contenttowrite = "123456"; context appcontext = instrumentationregistry.gettargetcontext(); filemanager manager = new filemanager("jim11.txt"); manager.append(contenttowrite); string file = manager.readfromfile(appcontext); assertequals(file, contenttowrite); manager.append(contenttowrite); string appendfile = manager.readfromfile(appcontext); assertequals(appendfile, contenttowrite+conte

Javascript to extract just the date from the variable -

i have variable called var lastrundate = encodeuricomponent(trim($("#" + tdlastdateid).text())); which holds date value 10%2f14%2f2016%2011%3a17%20am .passing them in url query parameter. var redirect_page = '<%= resolveurl("~/gui/reviewnew.aspx") %>' + "?testdate=" + lastrundate; i need extract date without time before passing them in url. not extract date omit time it.any appreciated in 1 line can that var decoded = decodeuricomponent( lastrundate ).split(" ")[0]; but you'd better this var decoded = decodeuricomponent( lastrundate ); decoded = decoded.split(" "); if( decoded.length > 0 ){ decoded = decoded[0]; }else{ //handle error } hope i've helped you

laravel - i'm trying to run gulp command but its saying "Elixir.ready is not a function" -

i'm running vagrant homestead on ubuntu 16 , gulp 3.9.1, when try run gulp sends me error below vagrant@homestead:~/practice$ gulp /home/vagrant/practice/node_modules/laravel-elixir-vue-2/index.js:3 elixir.ready(function () { ^ typeerror: elixir.ready not function @ object.<anonymous> (/home/vagrant/practice/node_modules/laravel-elixir-vue-2/index.js:3:8) @ module._compile (module.js:413:34) @ object.module._extensions..js (module.js:422:10) @ module.load (module.js:357:32) @ function.module._load (module.js:314:12) @ module.require (module.js:367:17) @ require (internal/module.js:20:19) @ object.<anonymous> (/home/vagrant/practice/gulpfile.js:3:1) @ module._compile (module.js:413:34) @ object.module._extensions..js (module.js:422:10) any highly encouraged. try updating elixir latest version in package.json file, , if you're using webpack install webpack package in package.json file or running below

split - Find first word in html and replace -

i have following construct: <h1> <span> </span> </h1> .... and <div id="tourname">riding trip arround volcano</div> now div id filled php function , h1 looks this: <h1> <span>riding</span> trip arround volcano </h1> i managed fill h1 using function: $("h1").html($("#tourname").html()); but have no idea how split string 2 parts , fill 1 part span , rest behind /span can give hint ? many thanks you can in 2 ways . 1 - when writing using php , can create span first word. 2 - using jquery. can see below code using jquery $(document).ready(function(){ var text = $("#tourname").html(); var firstword = text.substr(0,text.indexof(' ')); // first word var remaining = text.substr(text.indexof(' ')+1); // remianing words var final = '<span>'+firstword+'</span> '+ remaining // combining addi

android - AdMob and Firebase -

i have added admob advertising in android app . i connected admob site using link: https://firebase.google.com/docs/admob/android/quick-start i have few questions: is possible achieve admob advertising without firebase? is firebase free , clear developer? can insert admob advertising app firebase , not worry else. like, payment and/or other information. admob integration can happen without firebase recommendation google use firebase along better app analysis. firebase free except few features testlab , features have set quota comes under free tier, 1 can use firebase along admob , yes free features nothing needs payed , no need add payment method unlike other platforms.

maven - Not able create build using sonarqube and gradle -

facing below error while trying sonarqube plugin gradle : is plugins { id "org.sonarqube" version "2.2" } working ? getting following error error resolving plugin [id: 'org.sonarqube', version: '2.2'] > not 'https://plugins.gradle.org/api/gradle/2.11/plugin/use/org.sonar qube/2.2'. > temporary error during hostname resolution , means local server did not receive response authoritative server when tried hit url directly in browser : https://plugins.gradle.org/api/gradle/2.11/plugin/use/org.sonar%20qube/2.2.1 it's giving following output : { "message" : "no 'org.sonar qube' plugin available - see https://plugins.gradle.org available plugins", "errorcode" : "unknown_plugin" } is okay gradle plugin ?

Overloading the C++ indexing subscript operator [] in a manner that allows for responses to updates -

consider task of writing indexable class automatically synchronizes state external data-store (e.g. file). in order class need made aware of changes indexed value might occur. unfortunately usual approach overloading operator[] not allow this, example... type& operator[](int index) { assert(index >=0 && index < size); return state[index]; } i there way distinguish between value being accessed , value being modified? type = myindexable[2]; //access myindexable[3] = a; //modification both of these cases occur after function has returned. there other approach overloading operator[] perhaps make more sense? from operator[] can tell access. if external entity uses non cost version not mean write take place rather take place. as such need return object can detect modification. best way wrap object class overrides operator= . wrapper can inform store when object has been updated. want override operator type (cast) const version of object ca

amazon web services - Change password using AWS.CognitoIdentityServiceProvider -

i'm trying figure out how use changepassword function of aws.cognitoidentityserviceprovider. i need pass following params: { previouspassword: 'string_value', /* required */ proposedpassword: 'string_value', /* required */ accesstoken: 'string_value' } i use inside lambda function, how hold of access token? have cognitoidentitypoolid , cognitoidentityid use, can't understand access token is. the identity pool id , identity id cognito federated identities concepts, while changepassword api user pools one. 2 different services - think of user pools identity provider identity pool. the short version can access token signing in user in user pool. doing returns access token, id token, , refresh token. being said, common theme use admin versions of various user pool apis on lambda side, since may not have user credentials there.

java - BigDecimal.add strange behavior -

method bigdecimal.add takes long time when 1 argument has big exponent (9 digits), , second has exponent different length. i've waited more 5 minutes, , still going on , on. here's code: @test public void testaddbig() throws exception { mathcontext mc = new mathcontext(10, roundingmode.half_up); bigdecimal v1 = new bigdecimal("1e+100000000", mc); bigdecimal v2 = new bigdecimal("1", mc); system.out.println(v1.add(v2)); } here's part of thread dump: at java.math.biginteger.square(biginteger.java:1884) @ java.math.biginteger.squarekaratsuba(biginteger.java:1975) @ java.math.biginteger.square(biginteger.java:1888) @ java.math.biginteger.squaretoomcook3(biginteger.java:2011) @ java.math.biginteger.square(biginteger.java:1890) @ java.math.biginteger.squaretoomcook3(biginteger.java:2006) @ java.math.biginteger.square(biginteger.java:1890) @ java.math.biginteger.squaretoomcook3(biginteger.java:2012) @ java.math.biginteger.square(bigi

sql server - Pivot in Pivot Columns in SQL Query -

Image
i new sql , learning writing quires. me. in advance. actually geeting following resultant table using query select * (select case temp when '0' 'temperature' when '1' 'pulse rate/min' when '2' 'respiration/min' when '3' 'blood pressure' when '4' 'urine' end temp, value, convert(nvarchar(15),date,103) date, concat(case time when '0' '2' when '1' '6' when '2' '10' end,' ', case ampm when '0' 'am' when '1' 'pm' end)[tim] hms_chart_clinical status = '0' , ipno='21460') s pivot(max(value) [date] in ([07/11/2016],[08/11/2016])) datapivot pivot(max(tim) [tim] in ([2 am],[6 am],[10

css - Vertically align text in a bootstrap anchor (button) -

Image
i'm struggling vertically align text within bootstrap (3) <a> when works in <button> the html : <button class="btn">some text<span class="glyphicon glyphicon-play pull-right"></span></button> </br> </br> </br> <a href="#" class="btn">some text<span class="glyphicon glyphicon-play pull-right"></span></a> the css : .btn { width: 315px; height: 40px; background-color: #ff38a4; color: #fff; display: inline-block; margin-bottom: 0; font-weight: normal; text-align: left; vertical-align: middle; -ms-touch-action: manipulation; touch-action: manipulation; cursor: pointer; background-image: none; border: 1px solid transparent; white-space: nowrap; padding: 4px 8px; font-size: 14px; line-height: 1.42857143; border-radius: 0; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-selec