Posts

Showing posts from March, 2012

Ruby Selenium Web Driver: How to find child element by class name matching substring -

am novice selenium programmer please me this... i have below html , trying find svg child element class name matching substring deleteicon in below html <div class="result-controls"> <div class="attachment"> <li class="add-attachment-button-column"><a><button>add attachments</button></a></li><input type="file" multiple="" style="display: none;"> </div> <li class="sign-button-column"><a href="javascript:void(0)"><button>sign</button></a></li> <li class="draft-button-column"><a><button>draft</button></a></li> <li class="delete-column"> <a href="javascript:void(0)"><svg class="glyphicon-trash deleteicon" viewbox="0 0 100 100"><use xmlns:xlink="http://www.w3.org/1999/xlink&quo

Java Pong collision detection -

Image
hello trying make pong game java , works great except collision part. firstly used bounds class , intersects method solve collision problem method works collision case shown on picture drew. so wrote new code myself instead of using bounds class, , created method side collision detection again having hard time solve collision detection top , bottom of paddle. public boolean collideright(ball ball){ if(ball.getlayoutx()+ball.getradius()>=player.getlayoutx()&&(ball.getlayouty()+ball.getradius()>=player.getlayouty()&&ball.getlayouty()-ball.getradius()<=player.getlayouty()+height)){ return true; } else{ return false; } } and method made top , bottom collision detection. public boolean colliderightupside(ball ball){ if((ball.getlayoutx()+ball.getradius()>=player.getlayoutx()&&ball.getlayoutx()-ball.getradius()<=player.getlayoutx()+width)&&(ball.getlayouty()+ball.getradius()>=player.getlayout

c# - Creating model/view/controller tha simulate a parametrized query in ASP.NET MVC? -

well, creating app allows me query database using asp.net mvc 5 entity framework 6.1.3. well came across situation. have database several connection strings let me access different databases. so want create model user can create queries upon databases. came idea let user create he/she creating question. instance: want know how many students studying in faculty {placeholder}? " how many students studying in faculty label , {placeholder} combobox . combobox filled list of faculties (a query table of database). my idea provide user links in order add many labels, textboxes, comboboxes, etc. him create question. if user create question above add label, , combobox. he/she fill information, , other function (i develop not main goal of question) satisfy query. so, how can runtime create link add me (label, textbox, etc.) items in runtime view, , gather information , save database (for model in question)? i´m guessing link view(or viewmodel?) has pass information contro

javascript - Save the edited tree as a json object in the original format -

let data = { "name": "root", "children": [{ "name": "analytics", "children": [{ "name": "cluster", "children": [{ "name": "agglomerativecluster", "size": 3938 }] }, { "name": "graph", "children": [{ "name": "betweennesscentrality", "size": 3534 }] }, { "name": "optimization", "children": [{ "name": "aspectratiobanker", "size": 7074 }] }] }] }; let child1 = { "name": "flex", "children": [{ "name": "flarevis", "size": 4116 }] }; let tree = new treemodel(); let root = tree.parse(data); //# add child let tempchild1 = tre

java - Get path to image chosen from gallery(on SD card) -

i cannot path image chosen gallery thats on sd card, there no problem images stored on device. there dozens of similar or duplicate questions this, none of them working. the recommended approach (by @commonsware) use contentresolver , call openinputstream() , tried reading bytes openinputstream() creating temp file , using path, no luck. "bytes read: " system.err.println call shows 0 bytes read. i tried this , this , this , this , this , , this , none work. lot of these answers lead calling bitmapfactory#decodestream() , problem is, couldn't care less displaying image, need path!!. please help! code far: @override public void onactivityresult(int requestcode, int resultcode, intent data) { if(resultcode == activity.result_ok){ switch(requestcode){ case select_from_gallery: fromgallery = true; path = getrealpathfromuri(data.getdata()); system.err.println("*******path: " +

angularjs - @angular/cli build issue with default class -

i playing around @angular/cli tool projects , building , having issue 1 of classes. i trying add component lazyloaded on access of route: app route: const routes: routes = [ { path: '', redirectto: '/dashboard', pathmatch: 'full' }, { path: 'dashboard', loadchildren: 'app/dashboard/dashboard.module' } ]; and module loads components , routes (currently simple component says "dashboard"): import { ngmodule, modulewithproviders } '@angular/core'; import { routes, routermodule } '@angular/router'; import { dashboardcomponent, dashboardroutingmodule } './index'; @ngmodule({ imports: [dashboardroutingmodule], declarations: [dashboardcomponent] }) export default class dashboardmodule { } when run ng serve web page starts expected , can develop / see working on. when run ng build project builds ok without issues. when run ng

objective c - How do I query an NSArray when I know the attribute name and value? -

this question has answer here: how search array of objects in objective-c 4 answers nspredicate property of object in nsarray of nsarray 1 answer iterate through custom objects in uiview , find matching properties 2 answers i having hard time getting correct query type in nsarray search, tried following failed because not searching correct value bool iscashtender = [_tenderrows containsobject: @"cash"]; i want search inside nsarray there type attribute contains value cash i don't care how many rows/objects inside array need know if there @ least 1 type attribute containing value cash in there

Two Reactives R Shiny -

i need render table based on user input 1 of 2 possible tables. have defined first table filedata user selecting .csv file upload. second table, data_ranked_words , has same dimensions. what want output switch between 2 tables. defined each table in reactive() . however, know data_ranked_words reactive never being triggered. how trigger both of these reactives when user uploads file? in code issue 2 reactive() statements @ beginning of server.r . library(shiny) library(markdown) library(dt) library(d3tablefilter) options(shiny.maxrequestsize=50*1024^2) setwd('~/desktop/dsi/topic model app interface') # ui.r #------------------------------------------------------------------------------------- ui <- shinyui( navbarpage("start", tabpanel("from data", sidebarlayout( sidebarpanel( radiobuttons("plottype", "plot type", c("scatter"="p", "line

Understanding RAID 3 in Computer Storage -

i having hard time understanding raid 3. definition of parity in context?, how parity disk work? parity in context means checksum calculated data striped across other drives, , saved parity disk. whenever data read data drives, checksum read , rechecked. see https://simple.wikipedia.org/wiki/raid#raid_3_.22striping_with_dedicated_parity.22

PHP class for GIT GUI with commit tree -

i have re-seller account ( https://www.panthur.com.au/reseller ) php, git etc installed (scroll down page full specs). on 1 of cpanel accounts have set git server account host websites (there few sites on different sub-domains) can version control these sites , work other devs in maintaining sites. i set manage.domainname.com manage git. part of able few things merge , branch (i put behind login), see graphical tree of commits in sourcetree. swap between projects. i have found basic ones don't seem have large number of functions (most of projects not under current development), , don't seem have option of graphical tree. create main page have choice of repository dirs etc, suggestions classes may graphical tree etc? [for remote repo] since set git server on re-seller account, features view graphical tree etc need develop if panthur don’t support features. [for local repo] also can clone git server locally, , view local repo source tree or tortoisegit e

linux - Virtualbox - start vm failed after update -

i have updated virtualbox version 5.1.18 r114002 (qt5.5.1) on ubuntu 16.04 lts. virtualize (kali, windows 10). encounter following error: rtr3initex failed rc=-1912 (rc=-1912) the virtualbox kernel modules not match version of virtualbox. installation of virtualbox apparently not successful. executing '/sbin/vboxconfig' may correct this. make sure not mix ose version , puel version of virtualbox. where: supr3hardenedmaininitruntime what: 4 verr_vm_driver_version_mismatch (-1912) - installed support driver doesn't match version of user. i have excuted sudo '/sbin/vboxconfig' , get: vboxdrv.sh: stopping virtualbox services. vboxdrv.sh: building virtualbox kernel modules. vboxdrv.sh: starting virtualbox services. so, i've reinstalled virtualbox several times , tried lot of solutions. problem not solved! first uninstall virtualbox: sudo apt-get autoremove 'virtualbox*' then reins

Ruby Rails: wont save as decimal in postgresql -

im using ruby 2.4.1 rails 5.0.2 here code: total_price = 600.0 o = client.bills.new(client_id: client, total_price: total_price.to_f) #<bill id: nil, client_id: 21, created_at: nil, updated_at: nil, total_price: 0.6e3, bill_id: nil, discount_price: nil> o.save it save 0.00 instead of 600.0 or 0.6e3 in postgresql. oh, im using numeric(8,2) datatypes decimal, :precision => 8, :scale => 2 my migration: add_column :bills, :total_price, :decimal, :precision => 8, :scale => 2 any clues? i think have validation/callback preventing correct value written database. double check validations/callbacks in bill model.

Google Maps Android Api Geocoder quotas -

if using android google maps api , inside code use geocoder class such this: geocoder.getfromlocation( location.getlatitude(), location.getlongitude(), // in sample, single address. 1); am using android api or using geocoder api? ask because android api seems have unlimited quotas while geocoding api has quota? if make reverse geocoding calls android device limited?

c++ - How to access a method from a class defined in .DLL file from JAVA program? -

i have dll file has class defined 'handler' in turn contains method call getproperty(string,string). how can access such method java program?? ** see lot of examples on net allows invocation of global function defined inside dll, don't see examples can invoke method on native object. as mentioned in comments jni looking for, not able use "native" class/objects on java side. you'll need add "native c" bridge layer pure c api, wrap c++ interface , translate calls dll, because such api can used on java side via jni.

php - Rendering nested category entities from Doctrine 2 -

i'm working self-referencing entity , have build small list structure ( <ul><li> ) based on entity. however, list must take depth account, need use parent/children relationship base renderer. here's original entity: <?php use doctrine\common\collections\arraycollection; use doctrine\common\collections\collection; use doctrine\orm\mapping orm; /** * @orm\entity() * @orm\table(name="categories") */ class category { /** * @orm\id * @orm\generatedvalue(strategy="auto") * @orm\column(type="integer") */ protected $id; /** * @orm\column(type="string", length=255) */ protected $name; /** * @var category * * @orm\manytoone(targetentity="category", inversedby="children") * @orm\joincolumn(name="category_id", referencedcolumnname="id", nullable=true, ondelete="cascade") */ protected $parent;

How to loop through the spans in a SpannedString or SpannableString in Android -

Image
if have spannedstring (or spannablestring ) like this spannablestring spannablestring = new spannablestring("hello world!"); foregroundcolorspan foregroundspan = new foregroundcolorspan(color.red); backgroundcolorspan backgroundspan = new backgroundcolorspan(color.yellow); spannablestring.setspan(foregroundspan, 1, 8, spannable.span_exclusive_exclusive); spannablestring.setspan(backgroundspan, 3, spannablestring.length() - 1, spannable.span_exclusive_exclusive); textview.settext(spannablestring); how loop through spans of resulting string ? (i'm posting self answer since have been learning how recently.) looping through spans in order you can use getspans array of spans in spanned or spannable string . however, looping through getspans results not give them in order . them in order can use nextspantransition . here example spannedstring example in question. (a spannablestring work same.) green lines show span transitions are. text black def

jquery - Via VBA How to handle HTML Radio/drop-down buttons whose also effect other HTML elements -

Image
respected experts,i want handle html radio/drop-down buttons effect other html elements.please find below html code. appie.document.getelementbyid("maincontent_ddllevel1").selectedindex = 4 i mange handle 1st element via above code select diff. options. requesting kindly guide how can other elements change automatically via vba. in change when user select option's.

ASP.Net User Role Hierarchy -

i have in project user role hierarchy pages need more, imagine 2 roles can open adduser.aspx page can see here packages packages sending companies , companies have number. i when user of company opened page show packages him. difficult part writing code .. code examples : public string number { { return (string)cachemanagement.getcache( string.format("{0}{1}", "edistraintcache", currentsession.currentuser.userid), getnumber); } } and have if statemnt in 15 pages if (enum.getvalues(typeof(umroles)) .cast<umroles>() .any(umrole => currentuser.userroles.any(x => x.rolkey.contains(umrole.getstringvalue())))) { //... } have suggest code or idea writing better code ?.

Azure Blob download as byte array error "Memory Stream is not expandable" -

i want download blob byte array, above mention error occur. code follow dim fullfilebytes() byte = {} dim objazurestorage new azurecloudstorage dim fullimageblob microsoft.windowsazure.storage.blob.cloudblockblob = objazurestorage.cloudcontainer.getblockblobreference(row(0)) fullimageblob.downloadtobytearray(fullfilebytes, 0) since have not worked vb.net, let me provide answer in c#. have done read blob's contents in memory stream , converted byte array , return array. private static byte[] readblobinbytearray() { var cred = new storagecredentials(accountname, accountkey); var account = new cloudstorageaccount(cred, true); var container = account.createcloudblobclient().getcontainerreference("container-name"); var blob = container.getblockblobreference("blob-name"); using (var ms = new memorystream()) { blob.downloadto

android - Downloadable images are not displaying on marker on google map -

i have google map on markers placed. these markers custom imageview in it. want show downloaded images in markers. issue images getting downloaded images not reflecting in markers. can me solve issue. thanks ishan jain

javascript - how to create an array with 3 students and have them sorted by firstname and nid -

i need create object "student" 3 properties: first name, last name, nid (5-digit number). create array "myclass" 3 students. sort myclass firstname. sort myclass nid. i have of set don't know arrays , objects. need doing proper way , explained var student = (firstname, lastname, nid) { this.firstname = firstname; this.lastname = lastname; this.nid = nid; this.myclass = myclass; } var myclass = { "myclass": { student.firstname: "matthew", student.lastname: "stone", student.nid: 458293 }, "myclass": { student.firstname: "arian", student.lastname: "minaie", student.nid: 891023 }, "myclass": { student.firstname: "pelin", student.lastname: "schvechsky", student.nid: 496054 } } function myfunction1() { myclass.sort(); document.getelementbyid("post").innerhtm

android - Indoor navigation Beacons -

i want develop application indoor navigation. estimote not provides indoor navigation android. provide ios of now. my requirement : i want find nearest beacon. draw map beacons near google map region. i want exact view google map navigation direction user walking within shopping mall direction arrow should follow same. any 1 can help??? i need suggestion/code example same. thanks in advance. to meet of requirements, need create detailed map indoor location correct dimensions, doors, stairs etc. also need "connect" location of beacons map. besides estimote, there other companies has android , ios sdks such functionality.

ef core add-migration separate assembly for data and domainmodel -

i have 3 projects in (vs2017 , ef core) , want run add-migration. web - startup core - domainmodel - here entitys data - context , migrations here. , dependes on ef core the domainmodel have entities , want have migrationfiles/ output folder in data project context file. i want avoid having dependecies between domainmodel , entity framework. entityframeworkscore have dependecies data. suggestions how run add-migration setup migrationfiles in data instead of core/domainmodel? add-migration -name initmigration -outputdir migrations -context mydbcontext -project business\core according @joakimja solution run: add-migration command without -context mydbcontext -project business\core arguments.

php - Class spatie/Analytics/AnalyticsServiceProvider not found -

Image
i downloaded package on localhost. spatie/laravel-analytics google analytics package have followed documenation of package instead of installing 2.4.0 current version of package installed 1.4.1 after installation when add providers , aliases in config/app.php shows me errors this. and when publish config file shows "class spatie/analytics/analyticsserviceprovider not found" please me. use laravelanalytics instead of analytics ,because using old version or upgrade version of php php7 , update composer latest version of package

vba - Application-defined or object-defined error with formula -

i "application-defined or object-defined error" last formula block in code. other 2 work fine, , last formula, when inserted cell, works fine there, too. any ideas throws error? sub wells_cartesian_to_spherical() range("m1").value = "boret lengde" range("nj1").value = "asimuth" range("o1").value = "boret helning" dim rngx2 range set rngx2 = range(cells(2, 2), cells(rows.count, 2).end(xlup)).offset(, 11) rngx2.formula = "=sqrt(((b2-i2)^2+(c2-j2)^2)+(d2-k2)^2)" rngx2.value = rngx2.value dim rngy2 range set rngy2 = range(cells(2, 2), cells(rows.count, 2).end(xlup)).offset(, 13) rngy2.formula = "=degrees(asin(sqrt((b2-i2)^2+(c2-j2)^2)/(sqrt(((b2-i2)^2+(c2-j2)^2)+(d2-k2)^2))))" 'rngy2.value = rngy2.value dim rngz2 range set rngz2 = range(cells(2, 2), cells(rows.count, 2).end(xlup)).offset(, 12) rngz2.formula = "=degrees(if(i2-b2>0,(pi()/2)-((atan((j2-c2)/(i2-b2)))),if(i2-b2<0,

dictionary - Confused about python syntax -

i have looked on web , have not been able find answer question. trying understand python code , came across class declaration looks this: s_list = [] last_name = "" def __init__(self, last_name, curr_date, difference): self.last_name = last_name self.s_list = {curr_date:difference} self.d_list = [] self.d_list.append(curr_date) what happening inside curly braces? initializing dictionary? later in main file used this: n = n_dict[last_name] n.d_list.append(curr_date) n.s_list[curr_date] = difference where n temporary dictionary used add onto n_dict, n_dict being dictionary contains information class. why {:} notation used? there other way have been done? any answers appreciated! {curr_date:difference} created anonymous dictionary.instead, can create dictionary name : dict_name={} dict_name[curr_date]= difference self.s_list=dict_name also, can create dictionary using dict() : self.s_list=dict(curr_date=difference) there

routes - Laravel 5.4 vue and url parameters -

i new laravel , vue, , i'm lost not sure how ask question, if it's not clear please let me know. i have index.blade.php file calls vue component this: <order-grid></order-grid> in vue file create tabs jquery tabs: in template: <div id="tabs-nohdr" class="tabs ui-tabs ui-widget ui-widget-content ui-corner-all"> <ul> <li v-for="key in tabcolumns" @click="setstatus(key)" v-bind:class="{active: sortkey == key}"><a href="#tabs-1">{{ key }}</a></li> </ul> export default { mounted: function () { this.loaddata(); }, data: function () { return { query: '', gridcolumns: ['id', 'name', 'shipping method', 'created'], tabcolumns: ['new', 'paid', 'closed'], ... i call default activ

django - need random numbers in list using python code random.sample(range(1, 100), 3) -

can tell me if piece of code produce unique random numbers in list : random.sample(range(1, 100), 3) random.sample(population, k) return k length list of unique elements chosen population sequence. used random sampling without replacement. to choose sample range of integers, use range() object argument >>> import random >>> print random.sample(range(1,100),3) [77, 29, 45] >>> https://docs.python.org/2/library/random.html#random.sample

typeclass - Ambiguous type in Haskell type class -

i want use parametrized type class. below source code: class (ccontext3d c k v) => cbuilder3d c k v build3d :: c -> -> string -> hsl hlangjs hlangjs at compilation receive following error: could not deduce (cbuilder3d c k0 v0) context: cbuilder3d c k v bound type signature for: build3d :: cbuilder3d c k v => c -> -> string -> hsl hlangjs hlangjs the following code works correctly: class (ccontext3d c keycontext3d string) => cbuilder3d c build3d :: c -> -> string -> hsl hlangjs hlangjs how possibly release instance of class depending k , v types? suppose there call build3d . context of call, compiler has find proper instance. involves finding values variables c k v . however, type of build3d not mention k v , impossible find those. more concretely, if had instance cbuilder3d c k1 v1 ... instance cbuilder3d c k2 v2 ... their related build3d function have same type, , compiler has

SAS 9.4 How to quickly check for all data / variables -

sorry don't know if there previous questions ask problem. if there is, please show me link :) similar question check if there missing values , place '0' missing values. data new; set old; array change _numeric_; on change; if change = . change = 0; end; run; i wondering if want check data/variable positive or not: data new; set old; array change _numeric_; on change; if change <= 0 change = 0; if change > 0 change = 1; end; run; but doesn't expected. can do? and then, thinking if there quick way represent data/variable. i.e. data new; set old; if _all_ <= 0 ... = 0; if _all_ > 0 ... = 1; run; something this. your basic concept should work, looks syntax isn't quite right. you're creating 0,1 flag, can simplify code follows (you don't need if , then , else statement). this change each individual value. i'm not sure mean second point, saying if values negative or positive change

javascript - Trouble with replicate with PouchDB -

i try replicate couchdb database pouchdb have problem when try following: var localdb = new pouchdb('namedb'); var remote = new pouchdb('https://example.com:6984/namedb'); var rep = pouchdb.replicate( remote, localdb,{ live: true, retry: true }).on('change', function (info) { // handle change }).on('paused', function (err) { // replication paused (e.g. replication date, user went offline) }).on('active', function () { // replicate resumed (e.g. new changes replicating, user went online) }).on('denied', function (err) { // document failed replicate (e.g. due permissions) }).on('complete', function (info) { // handle complete }).on('error', function (err) { // handle error }); the console says :net::err_connection_closed , object {status: 0, name: "unknown", message: "getcheckpoint rejected ", result: object} message : "getcheckpoint rejected " name :

razor - Better CMS in a load balanced hosting environment -

we're getting few issues running bettercms on load-balanced server setup. we're seeing lot of errors following, across multiple pages: failed load cms page. ---> nhibernate.lazyinitializationexception: initializing[bettercms.module.pages.models.pagepropertie]-failed lazily initialize collection of role: bettercms.module.pages.models.pageproperties.categories, no session or session closed we're using version 2.0.3 of bettercms. turning off load balancing , running site through 1 server seems stop problems, ideally i'd know if there's allow load balance our traffic? can uninstall opengraph module? have issue in backlog https://github.com/devbridge/bettercms/issues/1533 , no eta it.

mysql - Error when updating value at SQL database -

i want updating data @ database sql vb.net. i'm facing problem. more specific, data updated when barcode textbox same @ datagridview column. here's code private sub nharga_textchanged(byval sender system.object, byval e system.eventargs) handles nharga.textchanged if cbarcode.text <> "" dim isi integer isi = me.datagridview1.currentrow.index datagridview1.rows.item(isi) if .cells(0).value = cbarcode.text try dim cmd new mysqlcommand("update transaksi_sementara set jumlah = jumlah + 1 barcode = '" & cbarcode.text & "'", dbkon) dbreader.close() if cmd.executenonquery = 1 call bersih() call tampil() end if catch ex exception msgbox(ex.message, msgboxstyle.critical) end try

selenium - Difference between webdriver.firefox.marionette & webdriver.gecko.driver -

i learning selenium , have met problem. i aware selenium supported old firefox version default without driver. , recent versions of firefox, have download driver , define using system.setproperty . according link , firefox 45 , 46, start driver code this: webdriver driver = new firefoxdriver(); my firefox version 45.5.1., above code still won't work. according link , have added system.setproperty("webdriver.firefox.marionette","c:\\geckodriver.exe"); and worked. then realized haven't installed geckodriver.exe on computer. see how goes, have changed code below. system.setproperty("webdriver.firefox.marionette",""); it still works. so, here comes first problem: happened? sure no geckodriver.exe exists on environment. if no location has been pointed, why should have set property? also, have seen code system.setproperty("webdriver.gecko.driver", "/tools/marionette/wires.exe"); my second ques

java - Convert image data InputStream to string and from this string back to image does not gives the image -

cq5 image component has binary image data, require data exposed in api. to tried input stream , read string. inputstream = jcrnode.getproperty(jcrconstants.jcr_data).getbinary().getstream(); string imagedata = jcrnode.getproperty(jcrconstants.jcr_data).getstring(); when trying write string fileoutputstream dont image. while trying download jcr:data manually , open file image viewer gives image. when converting string , doesn't work me. suggestions on this. thanks @i.net able solve per ur suggestions above. stringbuilder datauri = new stringbuilder(); datauri.append("data:image/jpeg;base64"); datauri.append(stringutils.newstring utf8(base64.encodebase64(imagebytearray,false))); datauri.tostring() string can used embedded reference images.

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

Image
is possible retrieve eta google's distancematrix api (or alternative api). fyi, eta different duration, when using public transport. following example clarify request. when leave on friday @ 8.15 i'll able catch train @ 8.30 , arrive @ 9.00 am. google says duration 30 minutes. however, when leave on saturday @ 8.15 i'll able catch first train @ 9.00 , arrive @ 9.30 am. google still says duration 30 minutes, means ignore delay. google map supports functionality there api around giving me eta instead of duration. can see, distance-matrix' response no good. clarifying question little. eta estimated time of arrival , it's clear user wants know entire duration of transport (including waiting time public transport).

Number(5) in Oracle what is it meaning in C# -

i created table , 1 of column area number(5), project_code number(5) not null , when entegred in model in c# like; public global::system.int16 project_code my question why getting int16 because int16 meaning short , max value "32767" if value 32768 oracle okay c#? because odpnet have specification inform of state of fact. oracle datatype mapping .net in code execution can have issue if manually set value incorrect range. recommand use same application set value, guarantee process.

Jenkins : delete workspace on slave too -

i have job configuration matrix perform build on 2 computer (master , slave). have "delete workspace before build starts" option checked on job. unfortunately, workspace delete on "master" node, node main job (job launch job necessary cover configuration matrix) perform. workspace on second node not delete. i think it's jenkins error : because job has configuration matrix, there master job launch other job. "delete workspace before build starts" option apply master job. think option should apply matrix configuration job. someone know if wrong ? after investigation found out slaves workspaces not deleted "delete workspace before build starts" method, workspace can deleted on master method (added https://wiki.jenkins-ci.org/display/jenkins/workspace+cleanup+plugin ). the best option in case use script: https://gist.github.com/rb2k/8372402 good resource additional info regarding jenkins workspace deletion is: https://ju

javascript - Filter on Formatted value and not on Model binding -

we have sap.m.table , in 1 column value formatted , shown in ui. so, lets assume data coming backend : "eventdatetime":"2017-04-05t12:32:35.276z". we receive time zone such timestamp. now, convert received data using time zone , show data in : 06:32 04/04/2017 format. now, need apply column filter table. can see there difference in backend value , value shown on screen ( data visible day behind due time zone conversion). now, apply filter on formatted value shown in ui rather value present in ui. so have basic filter date : new sap.ui.model.filter({ path: spath, operator: "bt", value1: avalue[1], value2: avalue[2] }) consider dummy data : { "root":[ { "eventdatetime":"2017-03-14t17:04:22.856-05:00", "createdatetime":"2017-03-10t19:38:11-05:00", "waybillid":827xxxx330697, "waybillserialnumber":60xx427

caching - Advanced Wordpress Setup for blazing Fast Speed -

hii maharshi, build sites hobby try makes wordpress site load better , better. use google cloud hosting service i got 100/100 in pagespeed & gtmatrix , around 600ms load time want optimise more what have... webserver ( nginx + php-fpm ) percona server mysql memcached in front of percona server caching. redis object caching zend opcache vestacp what want archive ? want setup geo replicated wordpress site • in detail • should live geo replicated. server should have exact same data ( including mysql ) @ real time , changes locations server data should instantly changed other servers visitor should able access data nearest location including authors,editors , more need access dashboard what can , problems facing ? google global load balancing ( want setup load balancing ssl proxy because want use varnish cache , knows varnish doesn't support ssl , using nginx webserver confusing setup nginx ssl proxy decided use google load balancer proxy h

html - text underline for full text -

i want create line below multi-line block of text length of longest line of text in block. want achieve that: `lorem ipsum, lorem ipsum, lorem ipsum =========================----------------` example did far http://jsfiddle.net/vhdyf/82/ if open using jquery could... get width of span append hr of width style hr needed fiddle $(function() { $('span').each(function() { var w = $(this).width(); var l = $('<hr />'); l.css("width", w); $(this).append(l); }); }); span { position: relative; display: inline; padding-bottom: 2px; } hr { width: 50px; margin-left: 0; border: 2px solid #000; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div> <span>lorem ipsum, lorem ipsum, lorem ipsum, lorem ipsum, lorem ipsum, lorem ipsum, lorem ipsum, lorem ipsum, lorem ipsum, lorem ipsum, lorem ipsum, lor

javascript - How to store the data in this json format? -

given following desired json api format: "type_of_advertisement":["atm","banner/poster","stalls"] i have defined ng-model this: .form-group .col-sm-offset-2.col-sm-10 label.checkbox-inline input(type='checkbox', value='atm', ng-model='type_of_advertisement') | atm label.checkbox-inline input(type='checkbox', value='mobile/communication tower', ng-model='type_of_advertisement') | mobile/communication tower label.checkbox-inline input(type='checkbox', value='banner/poster', ng-model='type_of_advertisement') | banner/poster label.checkbox-inline input(type='checkbox', value='hoarding board', ng-model='type_of_advertisement') | hoarding board label.checkbox-inline input(type='ch

html - Chrome Render Bug while resizing Table, header background stick on top of another div -

Image
i have 2 different panels resizable dragging. things working fine in other browsers in chrome somehow background of header stick parent div . seems new rendering problem of chrome skia graphics . please have on screenshot or video link attached, find glitch on video,help me out finding workaround this. and, tried compress problem applying background-color table , tbody and wrapper div still behaves same. if not right place put question please suggest me where? thanks. regarding fact glitch occurs outside table. try overflow: hidden on table wrapper.

ios - Pausing users background music -

in app developing, if music playing when app starts, allow continue. within app itself, fine , working, however, if interstitial ad shown, common sense , best practice dictate should pause background music in case interstitial has music of own. ideally restart music when interstitial dismissed. possible? there class mpmusic​player​controller handles music app functions.it has class methods system​music​player() may in achieving it. problem third party app. suppose music being played via third party app. in case won't able access method , in case of interrupt ,like said, paused.

MySQL - Check if column value (IP) appears in multiple references (orders) -

this table structure: (it's log) columns order id, ip, text, timestamp i have data this: orderref1 | 192.168.0.1 | text order | timestamp orderref1 | 192.168.0.1 | text order | timestamp orderref2 | 192.168.0.2 | text order | timestamp orderref3 | 192.168.0.3 | text order | timestamp orderref5 | 192.168.0.1 | text order | timestamp orderref3 | 192.168.0.3 | text order | timestamp orderref4 | 192.168.0.4 | text order | timestamp orderref2 | 192.168.0.2 | text order | timestamp as can see data above, 1 ip appears in 2 orderrefs. i need query shows me ip's have appeared in multiple orderid's , orderid's reference. so results ideally send out this: orderref1 | orderref5 | 192.168.0.1 as ip appearing in multiple orderref's result this should trick. show id's , ip's of every ip has more 1 different id's select group_concat(order_id), ip mytable group ip having count(distinct order_id)>1

express - Save array of objects in Postgresql using Sequalize.js -

i have comething this [{ "id":"3", "clientname":"john doe", "address":"street, 15", "latitude":"50.1212", "longitude":"30.1111", "timefrom":"2017-04-05t14:48:00.000z", "timeto":"2017-04-05t15:48:00.000z", "comments":"call before delivery" }] this part of model: order = sequelize.define('order', { latitude: { type: datatypes.float, allownull: false, defaultvalue: null, validate: { min: -90, max: 90 } }, longitude: { type: datatypes.float, allownull: false, defaultvalue: null, validate: { min: -180, max: 180 } }, { classmethods: { associate: function (models) { order.belongsto(models.user); } } }); return order; how write array of object via sequalize.js? if i'm trying write object, it's pass fine, [{},{}] got troubles you'll wan

How to remove Fractional value from timestamp MySQL -

fractional value timestamp mysql table: create table `note` ( `id` binary(16) not null', `note` text, `updated` timestamp(6) not null default current_timestamp(6) ', primary key (`id`) ) ; query: select unix_timestamp(updated) id = 1; result: 1491556345.0002231 somthing but want 1491556345 , how remove fractional value. thanks you can use truncate this: select truncate(unix_timestamp(updated),0) id = 1;

bash - Can't open macOS App. What does the + symbol represent in permissions? -

i working in terminal on macos. have macos app permissions: drwxr-xr-x+ 3 root admin what + @ end mean? there similar questions other environments. i can't launch app. error. lsopenurlswithrole() failed error -10810 file /path/to/file edit1 : have several user accounts setup. have used chown change usera root. hoped allow user open app. if login 'usera' account, can launch app, if use other user account, above error. jellybeans going on ??? edit2 : deleted app usera , re-downloaded / installed using userb. userb can launch app fine usera cannot (same error). user:group different time though (notice '+' isn't there default time. drwxr-xr-x 3 userb staff performing sudo chown root /path/to/file changed permissions drwxr-xr-x 3 root staff this made no change i.e. userb can launch , usera cannot. if can see + in file permission acl setup on file. means special permission has set on file allow owner of file provide access i

c# - LINQ: equivalent for string_agg from PostgreSql -

i need concatenate multiple columns values single value (separated coma example). can string_agg(u.name, ',') users in postgresql. tried in linq query syntax failed - time list split values instead of 1 row values concatenated in 1 field. let's assume have 3 tables: doc user doc_user +----+--------------------+ +----+-----------+ +----+-----------+ | id | path | | id | name | | docid | userid | +----+--------------------+ +----+-----------+ +----+-----------+ | 1 | "c:\\files\\a.txt" | | 1 | "adam" | | 1 | 1 | | 2 | "c:\\files\\b.txt" | | 2 | "benny" | | 1 | 2 | | 3 | "c:\\files\\c.txt" | | 3 | "charlie" | | 2 | 1 | +----+--------------------+ +----+-----------+ | 2 | 2 | | 2 | 3 |

java - Android: Make TableRow independet of TableLayout -

Image
here's issue, have tablelayout has multiple tablerows . i want them in table making right alignment, wanted 1 of tablerow's inside tablelayout independent of of sizes , independent , textview inside centered. this code: <framelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/white" android:paddingbottom="@dimen/activity_vertical_margin" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" tools:context="com.example.catarinaferreira.tripmanager.reservation_payment"> <!-- todo: update blank fragment layout --> <linearlayout android:layout_width="match_parent"