Posts

Showing posts from August, 2014

mobile - Google OAuth signin fail on Chrome (not private session) -

Image
i'm playing google oauth process , encountered strange issue google chrome on ios (v60.0.3112.89). on classic navigation, seems "native android panel" pop-up signin process (screenshot 1). after following steps, close , i'm stuck on blank page , url didn't changed (screenshot 2). on other hand, in private navigation have oauth signin process , works fine (screenshot 3). everything works fine on desktop version (even on phone emulation). works on safari mobile. i'm using php backend redirection same every clients. did ever had issue? wiki

html5 - Materialize Collapsible Dont Open with Javascript -

i'm inserting collapsible html receives json , adds information it. but collapsible not open, opens if insert same in html itself, can not leave have generate results json , create collapsibles each object. javascript: function generatepeoples__(objjson){ for(cat in objjson.categories){ document.getelementbyid('peoples-information').innerhtml += '<ul class="collapsible" data-collapsible="accordion">' + '<li>' + '<div class="collapsible-header"><i class="fa fa-id-card-o" aria-hidden="true"></i><strong>people ('+ cat +')</strong></div>' + '<div class="collapsible-body white">' + '<ul class="collection">' + '<li class="collection-item avatar">' + '<i class="fa fa-male circle blue" aria

c++ - How to free up heap memory created inside class -

i have class called "frame" has 2 member variables; 1 int , other void*. after instantiating frame, deallocate memory space created void* seems not clearing space. can please point me wrong code ? class frame { public: frame(int a) { = m_a; } frame(int a, void* b) { = m_a; b = m_b; } ~frame() { delete m_b; } public: int m_a; void* m_b; }; queue<frame*> q; size_t m_bufferbytes = 5606400; int main(void) { void* n = operator new(10000); frame* f = new frame(1, n); delete f->m_b; delete f; cout << "test\n"; return 0; } wiki

laravel - How to get a value in controller from get method and return it back to another view? -

the problem looks basic painful! i'm using method , getting value in controller , want same value return in view. how can that??? please help!!! function controller: public function guest(){ if (input::get('cash on delivery')){ $get = input::get('cash on delivery'); return redirect::to('guest/guestview/'.$get); } well, regards answer, using $_request directly not laravel's way of doing things :( i believe better public function guest(request $request) { if ($request->payment_method == ('cash on delivery')) { return view('guest/guestview', ['guest'=>$request->payment_method]); } } wiki

html - Keep Text Centered when resizing -

so have looked @ other questions this, yet none have solved problem. want able resize window of browser, yet keep text in centre of window. html: <div id=inside> navjeeven mann </div> css: #inside { position:relative; width: 100%; height: 100%; font-size: 60px; text-align: center; color: black; top:50%; left:50%; } what looks now to keep centred horizontally, remove top:50%;left:50%; #inside { position:relative; width: 100%; height: 100%; font-size: 60px; text-align: center; color: black; } <div id="inside"> navjeeven mann </div> to center horizontally , vertically, flex job well, unless have support older browsers. html, body { margin: 0; } #inside { display: flex; width: 100vw; height: 100vh; align-items: center; justify-content: center; font-size: 60px; } <div id="inside"> navjeeven mann </div> wiki

opencv - What are the different ways of constructing cv::Mat? -

opencv version 3.2.0 i reading bradski , trying make different cv::mat constructors - single channel. can please tell, why constructors not work? float data1[6] = {1,2,3,4,5,6}; float data2[6] = {10,20,30,40,50,60}; float data3[6] = {100,200,300,400,500,600}; cv::mat mat1(3,4,cv_32fc1); //ok cv::mat mat2(3,4,cv_32fc1,cv::scalar(33.3)); //ok cv::mat mat3(3,4,cv_32fc1,data1,sizeof(float)); //ok cv::mat mat4(cv::size(3,4),cv_32fc1); //ok cv::mat mat5(cv::size(3,4),cv_32fc1,cv::scalar(66.6)); //ok cv::mat mat6(cv::size(3,4),cv_32fc1,data2,sizeof(float)); //ok int sz[] = {8, 8, 8}; cv::mat bigcube1(3, sz, cv_32fc1); // ok cv::mat bigcube2(3, sz, cv_32fc1, cv::scalar::all(99)); // ok cv::mat bigcube3(3, sz, cv_32fc1, data3, 4); // not ok, how initialise 3d data? std::cout << mat1 << std::endl << mat2 << std::endl << mat3 << std::endl << mat4 << std::endl << mat5 << std::endl << mat6 << std::endl; // ok

java - Setting variables and expected values in Citrus Framework -

i have following scenario want test: perform call service a, number of elements in jsonarray call service b perform given action perform call service again, verify jsonarray has new element on it ps: there no correlation between service b call in step 2 , verification in step 3. can verify element count increased in 1. i can perform step 1 using citrus http() , .extractfrompayload() , add variable i can perform step 2 http() call however stuck @ step 3, since can't modify value of variable taken in step 1. have tried using action(new abstracttestaction() {...}) don't happen in between test not working. is there way of accomplishing this? i've adapted solution citrus framework - can variable assigned response? . able accomplish via: adding step test (before making step 3 above): groovy(new classpathresource("addvariable.groovy")); this content of addvariable.groovy int expected = context.getvariable("currentdataxyz&quo

openerp - Odoo xpath roat -

this code original report. goal put my_field_name before product. how can reach xpath. <table class="table table-condensed" t-if="o.pack_operation_ids"> <t t-set="has_barcode" t-value="any([pack_operation.product_id , pack_operation.product_id.sudo().barcode or pack_operation.package_id pack_operation in o.pack_operation_ids])"/> <t t-set="has_serial_number" t-value="o.pack_operation_ids.filtered('pack_lot_ids')" groups="stock.group_production_lot"/> <thead> <tr> <th><strong>product</strong></th> <th class="text-right"><strong>quantity</strong></th> <t t-if="o.picking_type_id.code != 'incoming'"><th><

camera - How to add registry entries while installing drivers -

i made changes camera driver inf , added few registry entries under [cameramodel_device.addreg] (this after [cameramodel_service_inst] in inf file). but after installing modified inf , don't see entries added in registry under camera guid --> device parameters. can me should add entries in inf custom entries under device parameters? wiki

Python: Merge Pandas Data Frame with Pivot Table -

i have 2 following dataframes want merge. df1: id time station 0 22.08.2017 12:00:00 a1 1 b 22.08.2017 12:00:00 a3 2 22.08.2017 13:00:00 a2 ... pivot: station a1 a2 a3 0 time 1 22.08.2017 12:00:00 10 12 11 2 22.08.2017 13:00:00 9 7 3 3 22.08.2017 14:00:00 2 3 4 4 22.08.2017 15:00:00 3 2 7 ... it should like: merge: id time station value 0 22.08.2017 12:00:00 a1 10 1 b 22.08.2017 12:00:00 a3 11 2 22.08.2017 13:00:00 a2 7 ... now want add column in data frame right value pivot table. failed including column labels merge. constructed that, not work: merge = pd.merge(df1, pivot, how="left", left_on=["time", "station"], right_on=["station", pivot.columns]) any help? edit: as advised, instead of pivot table tried use foll

linked list - Find Record Form - Include Related Records? -

Image
i have following structure: contact (id, txtcontact, txtnotes) match (id, fkcontact, txtmatch, txtnotes) contact match record (id, fkmatch, txtsomestuff, txtnotes) i user starts new record assigning contact , match. have had add 2 tables structure, user can on record , link other contacts and/or other matches. those tables follows: select [id] ,[fkrecord] ,[fkcontact] [dbo].[tblmcontacts_relatedcontacts] select [id] ,[fkrecord] ,[fkmatch] [dbo].[tblmcontacts_relatedmatches] now struggling update rowsource listbox, on form finding record. when user looks record, go form looks this: this row source of list box, functions off user choosing option contact combo box, match combo box, or both. select tblmcontacts.id, tblcontact.contactid, tblmatch.matchid, tblcontact.contactid [contact#], tblmatch.matchid [match#], tblcontacttype.txtcontacttype type, tblmcontactstatus.txtcontactstatus status, tbldoctype.txtdoctype [doc type], tbldmd

iOS Accessibility: Fetching the user's "Always Speak Notifications" VoiceOver preference -

i've sifted through available uiaccessibility capabilities here haven't found way fetch user preference specific setting. thought might uiaccessibilityisspeakscreenenabled() not case. alternatively, there way have uiaccessibilityannouncementnotification respect these preferences? any ideas? wiki

angular - Order Json object -

i'm creating simple movie listing app angular 4. i'm making http request fetch movies stored in json file. have fields "id", "title", "genre", "duration", etc. when i'm listing movies, how can order them id descending, last 1 appear first? here's code using json data: on data service file: getmovies(){ return this.http.get('assets/data/movies.json') .map(res => res.json()); } on component.ts file: export class maincomponent implements oninit { movies: movies[]; username:string; userimg:string; constructor(private userservice:userservice, private dataservice:dataservice) { } ngoninit() { this.dataservice.getmovies().subscribe((movies) =>{ this.movies = movies; }); } } interface movies { id:number, title:string, year:number, rating:number, cover:string, genre:string, duration:string, description:string, favourite:number

php - Need to make a Code like a Banner for custom posts -

i have idea haven't knowlage make alive. i have site ads on wordpress , need make code wich on right side on widget , hook images ads (1 image each ad) , make them clickable link ad. ads on custom posts type. so let's start: need "start code" after "get custom post checkbox checked", "get 1 image", "get link of post" allso need make max number each user don't care if ads randomly chosen. i know checkbox on ad (on admin page) can hooked get_post_meta( get_the_id(), 'top_ad', true ) when it's checked. it can made like <div id=1>the code of 1st ad</div> <div id=2>the code of 2d ad</div> etc... no repeats that's know, hope it's can done. wiki

git - Is it possible to select a branch just before the build in TeamCity? -

tfs allows me specify branch against build run. teamcity's build configuration has default branch , branch specification parameters statically defined. but want manually start same build different feature branches. for example have gated-checkin build configuration monitors prs, want run build not yet merged branches. wiki

java add values of same elements in ArrayList -

my first arraylist contains 3 values in each row: 191601, salt lake city, 7 191601, omaha, 8 191601, new york, 413 191601, salt lake city, 8 191601, omaha, 18 my second arraylist contains 2 values in each row , numbers of dublicated cities added. should this: salt lake city, 15 omaha, 26 new york, 413 my code kinda messy. if needed can copy , paste part of it. note: have searched on internet, non of them has solved problem. wiki

sqlite - C - How to use variables as part of an SQL Query? -

introduction i'm attempting incorporate variables queries using c. i'm following tutorial using sqlite tutorialspoint , , first exposure using sql. tutorial has shown me how use queries such these: query sql = "update company set salary = 25000.00 id=1; " \ "select * company"; *so how go incorporating variables statement, example if wanted replace 1 variable assigned 'id'. for example(my failed attempt) sql = "update company set salary = 25000.00 id=" + variable + ";" \ "select * company"; i've googling around couldn't find material on using variables in sql queries using c language syntax. how go in correct , safe way, incorporate variables , without making program vulnereable sql injection? the c-api provides functions sqlite3_prepare_v2 , sqlite3_bind can bind parameters prepared statements . means is, can use placeholder want substitute parameters within string. e

Expected Expression Error Swift 3 -

i'm getting silly error can't find out it's coming from. if can on code that'd great, it's super simple i'm looking over! error "expected expression" on last line of code! thank you! // // viewcontroller.swift // intern // // created lani daniels on 8/1/17. // copyright © 2017 lani daniels. rights reserved. // import uikit import firebase import firebasedatabase import firebaseauth class homeviewcontroller: uiviewcontroller, uitextfielddelegate { @iboutlet weak var emailfield: uitextfield! @iboutlet weak var passwordfield: uitextfield! @iboutlet weak var actionbutton: uibutton! override func viewdidload() { super.viewdidload() //do additional setup after loading view, typically nib. self.passwordfield.delegate = self; } @ibaction func createnew(_ sender: any) { self.performsegue(withidentifier: "createaccount", sender: self) } @ibaction func signintapped(_ se

Installing InfluxDB on Kubernetes Cluster -

i looking install influxdb on kubernetes cluster (built using kubeadm). single pod running on node (since non-enterprise influxdb doesn't support clustering). looking persist data whatever node pod hosted on (i.e. hostpath solution kubernetes provides). i brand new kubernetes world , looked online config files use generate instance of influxdb seem revolve around heapster not looking for. attempted install via helm unable persistence working (when enabled persistence pod remained stuck in pending state) any resources, configuration files, or can provide appreciated! take @ helm, it's package manager kubernetes, here package of influxdb : https://github.com/kubernetes/charts/tree/master/stable/influxdb =) wiki

pageobjects - Can you override content in the "static content" block when extending classes in geb? -

i have 2 classes 1 extends other listed below: class tabledpage extends page { static content ={ table {$(by.xpath("//tbody"))} headers {$(by.xpath("//thead"))} } navigator gatallrows(){ return table.children() } navigator getrow(int index){ return table.children()[index] } navigator getrow(string name){ return table.children().find{it.text()==name} } navigator getcolumn(navigator row, int column){ return row.children()[column] } } and class extends above class: class somepage extends tabledpage{ static content ={ table(required: false){$(by.xpath("//table[contains(@class,'w-100 table-striped wi-table-hover')]//tbody"))} // want overwrite table def in tabledpage } } so in app testing of pages have 1 table, in cases there 2 tables (one hidden depending on screen size) want able override table definition in case point specific ta

javascript - Regex replace with captured -

this question has answer here: using $0 refer entire match in javascript's string.replace 2 answers i want replace non alphanumeric character in string self surrender "[" , "]". i tried this: var text = "ab!@1b*. ef"; var regex = /\w/g; var result = text.replace(regex, "[$0]"); console.log(result); i expecting get: ab[!][@]1b[*][.][ ]ef but instead get: ab[$0][$0]1b[$0][$0][$0]ef how can using javascript(node)? you need wrap group in parentheses assign $1, this: var text = "ab!@1b*. ef"; var regex = /(\w)/g; var result = text.replace(regex, "[$1]"); console.log(result); wiki

asp.net core mvc 2.0 - Why does UseHosting not strongly type requirements? -

i'm looking @ usestartup method in aspnetcore.hosting: public static microsoft.aspnetcore.hosting.iwebhostbuilder usestartup<tstartup>(this microsoft.aspnetcore.hosting.iwebhostbuilder hostbuilder) aspnet hosting project. the documentation here states: "the startup class must public , contain following methods:" public void configureservices(iservicecollection services) { } public void configure(iapplicationbuilder app) { } my question is, why isn't enforced in method signature usestartup? seems unusual me. wiki

r - Conditional mutate with data from two data frames -

i have 2 data frames, number 1 contains new values of rows of data in data frame 2 (data frame 2 has lot more data no. 1). have earlier used following code overwriting (from data frame 1 data frame 2) specific column values based on number in column: for(i in 1:nrow(dataset1)){ sak.i <- dataset1$column1[i] rad.i <- which(dataset2$column1 == sak.i) dataset2$column2[rad.i] <- dataset1$column2[i] dataset2$column3[rad.i] <- dataset1$column3[i] ... } this works fine. however, wanted not overwrite create new column information. wanted insert new values column if rad.i = true, otherwise use values present in second data frame. came this: for(i in 1:nrow(dataset1)){ sak.i <- dataset1$column1[i] rad.i <- which(dataset2$column1 == sak.i) mutate(new_column_name = ifelse( dataset2$column2[rad.i], dataset1$column2[i], dataset2$column2) ) mutate(new_column_name2 = ifelse( dataset2$column3[rad.i], dataset1$column3[i], dataset2$column3)

vba - Code for checking to see if a new message with a specific subject line has been already created Lotus -

i'm not programmer apologize in advance. i have 3 different worksheets in workbook. each sheet has specific macro after numbers entered, shift supervisors can press button assigned macro , metrics sheet copied , pasted different worksheet in format filter-able/pivot-able columns. saves , closes data, goes shift report worksheet, copies pertinent cells, opens lotus , formats new message subject line stating correct shift number , date , pastes shift report data body of e-mail. since there different button press on 3 worksheets, , can't count on supervisors enter numbers in specific order, need able tell if lotus has opened , created e-mail specific subject line see if needs created or if exists information in body. know if possible? dim nsession object dim ndatabase object dim nuiworkspace object dim ndoc object dim nuidoc object dim wordapp object dim worddoc object dim msg string msg = "leads report " & now() & vbnewline & vbnewline &

Can Android studio go to previous opened file after i Ctrl+F4 to close current? -

it's interface problem using android studio. like other multiple tab application, using ctrl + f4 close current window/ file gets previous one. for example, if edit mainactivity.java , switch activity_main.xml i'm used behavior when click ctrl + f4 close activity_main.xml goes previous file mainactivity.java reason (even after changed keymap visual studio) goes random file. does know how change behavior? before answer i'm not looking shortcut key reopen last opened window. file still opened, i'm looking regular behavior focus go last file automatically after closing file. file > settings > editor > general > editor tabs > when closing active editor > activate opened tab wiki

Python - While loops simple -

i trying write function calculates number of days species of bacteria takes initial population reach final population given each day population doubles. code is; def num_doublings(initial_population, final_population): time = 0 while initial_population < final_population: time+= 1 initial_population = initial_population * 2 print(time) this prints each day, want print total number of iterations takes while loop stop. output of code when function called num_doublings(2, 8) is 1 2 3 but need output 3. how fix ? you can try this: def num_doublings(initial_population, final_population): time = 0 while initial_population <= final_population: time+= 1 initial_population = initial_population * 2 return time the function return time variable 3 in example gave wiki

json - Getting KeyError using Gmail API with Python -

this code copied page: https://developers.google.com/gmail/api/quickstart/python from __future__ import print_function import httplib2 import os apiclient import discovery oauth2client import client oauth2client import tools oauth2client.file import storage try: import argparse flags = argparse.argumentparser(parents=[tools.argparser]).parse_args() except importerror: flags = none # if modifying these scopes, delete saved credentials # @ ~/.credentials/gmail-python-quickstart.json scopes = 'https://www.googleapis.com/auth/gmail.readonly' client_secret_file = 'client_secret.json' application_name = 'gmail api python quickstart' def get_credentials(): """gets valid user credentials storage. if nothing has been stored, or if stored credentials invalid, oauth2 flow completed obtain new credentials. returns: credentials, obtained credential. """ home_dir = os.path.expanduser('~

Multiple UIViewControllers inside master UIViewController in Swift -

Image
i building game in swift 3 tvos. game has cpu intensive game background includes several animations. background uiviewcontroller dedicated task. use background in other uiviewcontrollers. when navigating between viewcontrollers background animation need continue smoothly. best way this? schematic example of shared background uiviewcontroller: use parent child view controller containment. create parent view controller. have constant animation run in view controller's content view. add container view view controller , embed segue, linked first child view controller want go inside container view. then use view controller child view controller support methods , transition methods swap child view controller child view controller. (see transition(from:to:duration:options:animations:completion:) . see section "implementing container view controller" in uiviewcontroller class description in xcode docs. in particular, bit: here essential methods might

algorithmic trading - Algorithm to calculate the price volatility of a commodity -

i trying design algorithm calculate how volatile price fluctuations of commodity are. the way work if price of commodity goes , down, should have higher score if price of commodity gradually increases , falls in price rapidly. here example of mean: commodity a: 1 -> 2 -> 3 -> 2 -> 1 -> 3 -> 4 -> 2 -> 1 commodity b: 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 2 commodity c: 1 -> 2 -> 3 -> 4 -> 5 -> 4 -> 3 -> 2-> 1 commodity has 'wave' pattern in price goes , falls down on regular basis. commodity b has 'cliff' pattern in price goes gradually , falls steeply. commodity c has 'hill' pattern in price rises gradually , falls gradually. a should receive highest ranking, followed c, followed b. more of wave pattern price of commodity follows, higher ranking should have. does have suggestions algorithm this? thanks! my approach looks this. for algorithm, considering

r - dplyr filtering with lubridate::hhmm format with minute() -

answering question temperature curve in r came across weird behavior of dplyr::filter - lubridate::minute combination. see test data dta below. dta$time lubridate::hhmm format. library(lubridate) library(dplyr) dta$time <- hm(dta$time) to rows full hours (i.e. 0 minutes) 1 can subset using lubridate::minute this: dta[minute(dta$time) == 0,] # time temp1 temp2 # 1 0s 18.62800 18.54458 # 7 1h 0m 0s 18.45733 18.22625 # 13 2h 0m 0s 18.33258 18.04142 however, when using dplyr 's filter , this dta %>% filter(minute(time) == 0) # time temp1 temp2 # 1 0s 18.62800 18.54458 # 2 10m 0s 18.45733 18.22625 # 3 20m 0s 18.33258 18.04142 the result not fit expectation. ( update : values of temp1 , temp2 correct, time corrupt... @brian btw giving hint. ) additionally warning returned: warning message: in format.data.frame(x, digits = digits, na.encode = false) : corrupt data frame: columns truncated or padded nas

gtk3 - Undefined gdk_pixbuf_major_version during link -

this question has answer here: error 3 error lnk1104: cannot open file 'gtk-3.lib' 2 answers undefined reference symbol 'gdk_pixbuf_major_version' 2 answers i posted question few days ago in gdkpixbuf: my question perhaps gtk3 better place post this? direction appreciated! thanks. wiki

php - dokuwiki; dynamically display info from excel file? -

i have complicated excel file. want put info sheet onto wiki page, i'm concerned won't able give excel making changes. is there way create page excel doc each time page accessed. i'm thinking of sharepoint, don't need edit doku excel file. thanks wiki

jmeter - Confusion in choosing delay between Iterations -

Image
my goal give exact 5000 milliseconds delay between iterations. below 2 approaches have followed. approach #:1 :threadgroup>add testaction>add jsr223 timer (see below screenshot). i clear on approach #1 , can see below lines in jmeter.log(5000-prev gettime)from got confirmation delay between iterations working. 2017-08-21 16:23:08,260 info o.a.j.t.jsr223timer: 4831 2017-08-21 16:42:37,871 info o.a.j.t.jsr223timer: 4835 approach #:2 : threadgroup>add testaction (see below screenshot). after executed test in jmeter.log, couldn't find number indicating delay between iterations. my questions: 1.for 5000 milliseconds delay between iterations approach should follow approach #:1 or approach # 2. 2.if use approach #:2 how can , can cross check 5000 milliseconds applying each iterations. 3.is approach #:2 correct mean missing anything? please advise me! soo confused. thanks, raj your approach #1 flaky delay between requests less 5 second

algorithm - How to use Kmodes in R (Categorical data clustering) -

i want cluster categorical data csv file. want use kmodes algorithm csv file example(50 row data): https://drive.google.com/file/d/0b-z58id3by5wuzduoxuwudh1ovu/view?usp=sharing library(klar) setwd("d:/skripsi/tmc polda metro jaya 2014-2016/----data fix clear 2014- 2016/kmodes") data.to.cluster <- read.csv('data kecelakaan twitter 2014 -2016 fix -2(untuk k- means) - versi 3.csv', header = true, sep = ';') cluster.results <- kmodes(data.to.cluster[,2:5], 3, iter.max = 10, weighted = false) i cant result code. to honest i'm new data-visualization how can result kmodes in r/visualize it? there algorithm categorical data in r relevant documentation? wiki

c# - Binding not Updating after Invoking PropertyChanged -

Image
i'm developing kind of time tracking application. the model looks this: my datagrid bound observablecollection<entry> : public class entry : inotifypropertychanged { public string ticketid {get; set;} //simplified since working.. private observablecollection<timebooking> _timebookings; public observablecollection<timebooking> timebookings { { return _timebookings; } set { _timebookings = value; onpropertychanged(); } } public timebooking monday //same other days... { { return bookings.where(b => b.date == selectedweek.firstday); } } } timebooking looks this: public class timebooking : inotifypropertychanged { public timebooking(datetime date) { date = date.date; } public datetime date { get; set; } private timespan _value; public timespan value {

Angular 4 - Code response value is undefined -

i loading data json file in html table, this method in component file: getparticulars(){ this._particularservice.getparticulars().subscribe( result => { console.log("code: ", result.code); if(result.code != 200){ console.log("respuesta: ", result); }else{ console.log("si tengo datos para particulares"); this.particulars = result.data; } }, error => { console.log(<any>error); } ); } this method in service file: getparticulars(){ return this._http.get(this.url).map(res => res.json()); } this file json: [ { "code": "200" }, { "field1": "1", "field2": "2", "field3": "3", "field4": "31/1

json - Copy as Response body dynamic value in xml -

Image
when working xml responses dont have option copy response body dynamic value? facility available json? update-1: can't seem working i can add request object key path (dotted xpath) desired data not giving expected results. using "plan.link" so xml this <plan> <id>7286</id> <piuid>1</piuid> <title>bollard positions</title> <link>http://<my-server-name>/port/1/plan/7286.gif</link> </plan> and want pick url link element (plan.link) but paw not reading right , changes request get / http/1.1 host: echo.paw.cloud connection: close user-agent: paw/3.1.3 (macintosh; os x/10.11.6) gcdhttprequest i'm doing wrong not sure what. any suggestions? that's true, sadly cannot right-click , pick copy response body dynamic value xml responses (only works json , form url-encoded). though, can manually set dynamic value point field. right-click on field want insert reference

Unable to scale non client area for windows MDI child window on DPI change -

i facing issue have mdi window , non client area contains controls minimize/maximize/close , the title window. when change dpi have handled scaling of text in client area , text on title bar (non client area) scaled size of title bar (non client area). found following post not solution such, scaling non-client area (title bar, menu bar) per-monitor high-dpi support wiki

javascript - Get Movie Banner & Poster IMAGE by external URL (wordpress) -

i need banner e poster image external url(image hosting website). how can that? thanks screenshot this part of code need edit: <?php defined( 'abspath' ) or die; /** * * field: image * * @since 1.0.0 * @version 1.0.0 */ class amyframework_option_image extends amyframework_options { public function __construct( $field, $value = '', $unique = '' ) { parent::__construct( $field, $value, $unique ); } public function output() { echo $this->element_before(); $preview = ''; $value = $this->element_value(); $add = ( ! empty( $this->field['add_title'] )) ? $this->field['add_title'] : __( 'add image', 'amy-framework' ); $hidden = (empty( $value )) ? ' hidden' : ''; if ( ! empty( $value ) ) { $attachment = wp_get_attachment_image_src( $value, 'thumbnail' );

python - How to inspect or save large matrix to file in Spark -

i have created large block matrix in pyspark called mtm 85k x 85k dimensions. inspect matrix make sure created way wanted. have tried different routes , of them failed memory issues exit code 143 or 92. options have tried far: 1. convert matrix rdd , take @ first entry: mtm_coor = mtm.tocoordinatematrix() mtm_rdd = mtm_coor.entries mtm_rdd.take(1) save text file mtm_rdd.saveastextfile('./mtm.txt') convert dataframe mtm_df = mtm_rdd.todf() my question figure out workflow in pyspark. how inspect large matrix without running out of memory , how save large matrix file without running memory issues? wiki

android - AudioManager -setSpeakerphoneOn() generates noise and interference -

i´m using sinch make app-to-app phone call. problem comes when try enable speaker. works generate ugly noise or interference. i create static instance of audio manager in oncreate() of activity: public static audiomanager audiomanager = (audiomanager) context.getsystemservice(context.audio_service); when user enable speaker, following code executed: final handler mhandler = new handler(); mhandler.postdelayed(new runnable() { @override public void run() { audiomanager.setspeakerphoneon(true); } }, 500); when user disable speaker use code: audiomanager.setmode(audiomanager.mode_in_call); audiomanager.setspeakerphoneon(false); finally, when phone call finish reset audio next code: @override public void oncallended(final call endedcall) { audiomanager audiomanager = myactivity.audiomanager; audiomanager.setmode(audiomanager.mode_in_call); audiomanager.setspeakerphoneon(fals

javascript - 'Uncaught TypeError: vairable.fadeOut is not a function' in for loop -

i'm trying set classname variable , fadeout(). i'm able use fadeout() on query selector directly, not when store in variable. here's code: var sections = ["$('.start')", "$('.one')", "$('.two')", "$('.three')", "$('.four')", "$('.five')", "$('.six')","$('.seven')","$('.eight')"]; var begin = $('.begin'); var = 0; var currentsection = sections[i]; var nextsection; begin.on('click', function(){ for(i=0; < sections.length; i++){ console.log(currentsection); currentsection.fadeout(); currentsection = sections[i+1]; } }); here's video no sound showing what's up: http://screencast-o-matic.com/watch/cbj3rvl8yf am missing something? here's link codepen rest of code: https://codepen.io/naturalhanglider/collab/bd90327af7cb6da2620e3a3c4d7f398f/?editors=1010 i du

html - How to display the checkbox value on same page without submit button and form in php? -

i have checkbox , if user selects check box value of checkbox display on same page without refresh page. index.php <input type="checkbox" value="<?php echo $value;?>" name="value_r" id="value_r"/> if(!isset($_post['value_r'])) echo $_post['value_r']; } if ajax can 1 know how display value ajax? $("#value_r").change(function () { var ischecked = $(this).is(":checked") ? 1:0; $.ajax({ type: "post", url: "index.php", async: true, data: { ischecked: ischecked }, success: function (response) { } }); }); instead of using ajax or javascript can using css . check updated snippet below.. input[type=checkbox] + label{ display: none; } input[type=checkbox]:checked + label{ display: inline-block; } <input type="checkbox" value="<?php echo $value;?>" na

html - make div side by side in django simple template? -

Image
i learning django , want know how put div in for loop side side know how without loop here have on div loop more 1 time: {% albums in all_albums %} <div id="album" class="some-class" style="background-image: url({{ albums.album_logo }})"> {% if albums.is_favorite %} <img src="http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/16/actions-rating-icon.png" > {% endif %} </div> <a href="{% url 'detail' albums.id%}"><h3>{{ albums.title }}</h3></a> <p>{{ albums.song_set.count }} songs inside</p><br> {% endfor %} i want wiki

function - c++ template argument in vector return value -

i have specific question can't find answer in questions regarding template member functions. want write function gets me data , return vector of specific type. i have following: #include <vector> class testclass { public: template <typename t> std::vector<t> getdata(int column); }; template <typename t> std::vector<t> testclass::getdata(int column){ std::vector<t> returndata; return returndata; } and call function: int main() { testclass t; std::vector<int> data = t.getdata(0); return 0; } when compiling error: ../templatetest/main.cpp:9:31: error: no matching member function call 'getdata' std::vector<int> data = t.getdata(0); ~~^~~~~~~ ../templatetest/testclass.h:8:42: note: candidate template ignored: couldn't infer template argument 't' template <typename t> std::vector<t> getdata(int column);

What is the Swift 2 equivalent to the Swift 3 "String contains" function? -

i want ask equivalent in swift 2 of swift 3 string contains function? because contains function won't work in xcode 7. func gettingsongname(){ let folderurl = nsurl(fileurlwithpath: nsbundle.mainbundle().resourcepath!) { let songpath = try nsfilemanager.defaultmanager().contentsofdirectoryaturl(folderurl, includingpropertiesforkeys: nil, options: .skipshiddenfiles) song in songpath { var mysong = song.absolutestring if mysong.contains(".mp3") } } wiki

c++ - Multi clients not working properly on Qt4 Multi thread server? -

friends! have written code multi threaded tcp server in qt4. server listening remote client connection requests. whenever client connects server, takes ip, name , port number , verifies if recognized (authorized) client (that can checked through pre-stored text file having names, ips , port numbers of registered clients). if is, communication proceed. otherwise, server terminates connection. edit1: here excerpt mythread.cpp void mythread::run() { // thread starts here qdebug() << socketdescriptor << ("starting thread..."); socket = new qtcpsocket(); if(!socket->setsocketdescriptor(this->socketdescriptor)) { emit error(socket->error()); return; } connect(socket, signal(readyread()), this, slot(readyread()), qt::directconnection); connect(socket, signal(disconnected()), this, slot(disconnected()), qt::directconnection); qdebug() << socketdescriptor << ("client connected!"