Posts

Showing posts from September, 2015

r - Unable to save files from shinyapps.io to app directory on local machine -

i have shiny app gathers data facebook , displays in tables . there option save data in csv files , place in app directory.when run locally works when deploy app shinyapps.io account , use cannot see csv files being saved in app directory. not errors or warnings when using app. reason behaviour , how can resolve it? want app save files in app directory can access next time , display data without having need gather data again facebook.my app can read files directory not write files it. appreciated. regards, abhinav bais

sql - Neither percentile_cont nor percentile_disc are calculating the desired 75th percentile in PostgreSQL 9.6.3 -

working percentile functions, not getting desired output. "incorrect", functions working intended, , not understanding them properly. these numbers working with: n = 32 160000 202800 240000 250000 265000 280000 285000 300000 300000 300000 300000 300000 309000 325000 350000 358625 364999.92 393750 400000 420000 425000 450000 450000 463500 475000 475000 505808 525000 550000 567300 665000 900000 my understanding of percentile_cont aggregate 2 numbers if count in add them , divide two. understanding of percentile_disc select lowest number if count even. this understanding of calculating percentile using 50th (median) example: if number of numbers (n) odd, pick number in middle; if number even, average 2 numbers in middle. in case, there 32 numbers, median = (358625 + 364999.92) / 2 = 361812.46 . percentile_cont returns correct value since averages 2 values; percentile_disc returns incorrect value since picks lowest of two. regarding other percentiles, 10th ex

Python - KeyError in Pandas DataFrame -

when import dataset: dataset = pd.read_csv('lyrics.csv', delimiter = '\t', quoting = 2) it prints so: lyrics,classification 0 should have known better girl yo... 1 can shake apple off apple tree\nshak... 2 it's been hard day's night\nand i've been wo... 3 michelle, ma belle\nthese words go to... 4 can't buy me love, love\ncan't buy me love\ni'... 5 love you\ncause tell me things want to... 6 dig pygmy charles hawtrey , deaf ... 7 song robin sings,\nthrough years of endl... 8 love me tender, love me sweet,\nnever let me g... 9 well, it's 1 money,\ntwo sho... 10 words let know\nstill could... and if print (dataset.columns) , get: index([u'lyrics,classification'], dtype='object') but if try prints lyrics, so: for in range(0, len(dataset)): lyrics=dataset['lyrics'][i] print lyrics i following error: keyerror: 'lyrics' w

html - PHP Error - All Files or Directories created are 0 -

i coding registration script , wanted create folder inside folder called "users". somehow, folder created in root path (where php script located) , files, supposed written inside folder in file called 0. here's code: if (!isset($_post["method"])){ die("error"); } if (!isset($_post["usernamefld"])){ die("error"); } if (!isset($_post["passwordfld"])){ die("error"); } if ($_post["method"] == "register"){ if (!isset($_post["emailfld"])){ die("error"); } if(is_dir("./users/"+$_post["usernamefld"])){ die("taken"); } mkdir("/users/"+$_post["usernamefld"]); echo "test&

javascript - Creating a path from a PNG in fabricjs -

i have png image transparent area. i have photo. i using fabricjs i need create new image cropped transparent area of png. i understand can use clipto(path) function create new image. however, problem creating path in first place. how can create path transparent area of png? thanks in advance. as strange may seem, wasn't able find correct duplicate this... you don't need calculate path bitmap. canvasrenderingcontext2d api offers compositing , blending options , allow work directly bitmaps. fabricjs offers option: http://fabricjs.com/docs/fabric.object.html#globalcompositeoperation var c = new fabric.canvas('c', { imagesmoothingenabled: false }); fabric.image.fromurl( 'https://dl.dropboxusercontent.com/s/4e90e48s5vtmfbd/aaa.png', function(image1) { fabric.image.fromurl( 'https://upload.wikimedia.org/wikipedia/commons/5/55/john_william_waterhouse_a_mermaid.jpg', function(image2) { // 1 clipped

MySQL Select and LEFT JOIN multiple with AS statement -

i'm encountered couple errors contains multiple with statement. (for example, abc_table, def_table, qrs_table ones populated, containing similar column names have different metrics within each table. ) with abc as( select region,temporature,id abc_table) , def as( select region,temporature,id def_table) , xyz as(select region,temporature,id abc left join def on def.region=abc.region ) /*this 1 uses value previous with*/ select region,temporature,id,region_id qrs_table qrs /*this key table*/ left join xyz on xyz.id = qrs.id region_id=3 would appreciate thoughts/input thank you!

javascript - console.log always printing same thing when code is different in Angular 1 app -

i trying complete angular 1.5 tutorial youtube series: angular 1.5 tutorial . angular 1 because work still uses , need become better it. the problem follows: created blog-list.component.js , blog-list.module.js file along app.module.js file. writing console.log() message in component file says console.log("hello sir"); , had console.log("hello"); . whenever try change console.log message console logs hello, not updated console message. not sure have done wrong, can't seem able find mistake. perhaps might able see it? here file contents: blog-list.component.js: 'use strict'; angular.module('bloglist'). controller('bloglistcontroller', function() { console.log("hello sir"); }); blog-list.module.js: 'use strict'; angular.module('bloglist', []); app.module.js: 'use strict'; angular.module('try', ['bloglist']); index.html file: <!doctype html> <html ng

wordpress - ACF plugin relationship field, if no value in nav tab,want to hide the tab -

i using bootstrap nav tab , acf custom field in wp theme. want hide nav tab if there no value in relation. how that? below code-- want hide compatible tab, if relation dont return value <!-- nav tabs --> <ul class="nav nav-tabs nav-justified" role="tablist"> <li role="presentation" class="active"><a href="#home" aria-controls="overview" role="tab" data-toggle="tab">overview</a></li> <li role="presentation"><a href="#compatibility" aria-controls="compatibility" role="tab" data-toggle="tab"> compatibility </a></li> <li role="presentation"><a href="#datasheet" aria-controls="datasheet" role="tab" data-toggle="tab">datasheet</a></li> <li role="presentation"><a href="#order" ar

SQL - MYSQL One query recieving set limit on different column values -

lets have table set of different columns (offcourse), example : table id col1 integer(1), // 0 || 1 col2 // --||-- col3 // --||-- col4 // --||-- is possible, in 1 query select 4 rows col1=1 , select 4 rows col2=1 , select 4 rows col3=1 etc etc. think understand mean. what have done far make 4 different queries or make 1 query , (col1 = 1 or col2=1 or... etc). this works if limit result lets 16, might 15 rows col1=1 , maybe 1 row col2=1 , col3,col4 - no result. so dear fellas; there way in 1 query (i think not) select * table col1=1 limit 4 union select * table col2=1 limit 4 union select * table col3=1 limit 4 union select * table col4=1 limit 4 this 1 result 16records max. if there less 4rows certin criteria, you'll less rows. duplicates removed, resulting in less 16 rows. not different rows. if single row col1=1 , col2=1 , might returned twice if use union all , union slower large datasets

html - Inline-Flex messes with vertical align -

having inline item next inline-flex nested flex box messes vertical alignment (it ignores top margin), 1 solution found put ::before in inline-flex item, i'm not sure why fixes it. the first 1 ignores top margin on label, top margin works on second one, because of ::before . label { margin: 20px 5px 0 0; } .input-container { display: inline-flex; } .with-before::before { content: ''; } .buttons { display: flex; flex-direction: column; } <div> <label>top margin ignored:</label> <div class="input-container"> <div class="buttons"> <button>&lt;</button> <button>&gt;</button> </div> <input type="text"/> </div> </div> <br/> <div> <label>top margin works:</label> <div class="input-container with-before"> <div class="button

Can event delegation be implemented if the jQuery .on() receives only two parameters? -

i reading delegated events @ https://learn.jquery.com/events/event-delegation/ , http://api.jquery.com/on/ . examining following syntax: .on( events [, selector ] [, data ], handler ) in order implement event delegation, optional [, selector ] in syntax above must used, correct? example, not implementing event delegation (notice how .on() receiving 2 parameters): // attach directly bound event handler $( "#list a" ).on( "click", function( event ) { event.preventdefault(); console.log( $( ).text() ); }); this implementing event delegation (notice how .on() receiving more 2 parameters): // attach delegated event handler $( "#list" ).on( "click", "a", function( event ) { event.preventdefault(); console.log( $( ).text() ); }); can event delegation implemented if jquery .on() receives 2 parameters? impression is not possible have confirmation. thank you. technically can. optional selector parameter

html - Angular 2 anchors with routing -

i'm building angular 4 app , want use anchor-ing in it. it's one-page website, on have 4 containers, listed vertically. so: --------------- | | | | | | --------------- --------------- | | | | | | --------------- etc... say 2 of boxes 'about us' , 'location'. @ top of app there navbar , want on click @ <li> , angular scroll down transition , stop @ proper component (1 of these 4 containers). i'm new angular 4, i'm still studying , i'm asking advice. can achieve anchor effect ng's router, given i'll need attach scroll-down animation it, or should stick ? way better go with? , also, if should router there specific things have know kind of redirection or it's going again {path: 'about', aboutcomponent }; ? transition planning do, shall read @angular/animations or going plain typescript?

visual studio - How to break when entering own code? -

the "just code" feature permits limit debugging operations user code (unoptimized code available pdb). is possible break whenever program flow invokes "my code" in visual studio? potential application: when debugging issues in libraries used complex third-party application, anything called when issue occurs starting point. breaking when entering own code permit without excessive logging. it doesn't seem so. however, if own code within few namespaces, windbg can used workaround (the following unmanaged code; assume there's way managed code): > bm modulename!namespacename::* will set breakpoints entry point within given namespace. if access single-threaded, windbg can print list of actual entries performed in execution: > bm modulename!namespacename::* "bd *; ln; l+t; p \"dv; pt \\\"be *; r $retreg; g\\\"\"" will add breakpoints potential entry points automatically perform actions log , out aga

php - SELECT query inside html code gets no results -

i'm trying install php code inside html file present club friends using select query mysql. can't see results inside page. need help. here's entire php code (and html) integrated inside html: <h2> club members</h2> <br/> <table dir="ltr" align="center" border="1"> <tr> <td><b>private name</b></td> <td><b>family name</b></td> <td><b>e-mail</b></td> </tr> <?php // create connection $conn = mysqli_connect('localhost','root',""); //check if connection opened, if not prompt error page. if (!$conn) { die('could not connect: ' . mysqli_error()); } //select data base. mysqli_select_db($conn, "club"); //set character set utf-8 allow hebrew. mysqli_query($conn, "set names 'utf8'"); //sql query - user details $sql = "select fname, lname, mail customers&quo

validation - Xampp and Sublime do recognize my php. I can't figure out why -

in sublime there no syntax coloring, xampp ouputs plain text, , php validator used comes $arr not variable.... can't see wrong it. ˂?php $arr = array( 'properties' => array( array( 'property' => 'email', 'value' => 'apitest@hubspot.com' ), array( 'property' => 'firstname', 'value' => 'hubspot' ), array( 'property' => 'lastname', 'value' => 'user' ), array( 'property' => 'phone', 'value' => '555-1212' ) ) ); $post_json = json_encode($arr); $hapikey = readline("/"); $endpoint = 'https://api.hubapi.com/contacts/v1/contact?hapikey=' . $hapikey;

php - org.json.JSONException: Value <br of type java.lang.String cannot be converted to JSONObject (Andriod Studio) -

i'm trying android app developed in android studio send data register user activity database. idea once user types in required information , clicks register button data should go database , login activity should re-appear. however, when click on register button on register user activity nothing happening, no redirection login activity or data being sent database. below register user activity code: package com.example.vi5h.split; import android.content.intent; import android.support.v7.app.alertdialog; import android.support.v7.app.appcompatactivity; import android.os.bundle; import android.view.view; import android.widget.button; import android.widget.edittext; import com.android.volley.requestqueue; import com.android.volley.response; import com.android.volley.toolbox.volley; import org.json.jsonexception; import org.json.jsonobject; public class registeruseractivity extends appcompatactivity { @override protected void oncreate(bundle savedinstancestate) { super

How do you get a custom element to load using Aurelia -

i have custom element nav-bar in skeleton-navigation except not using router part. can't seem fire events. code: nav-bar.html <template> <ul id="topmenu"></ul> </template> nav-bar.js attached() { alert('test') } containing page: <template> <require from="./nav-bar.html"></require> <div class="desktop" id="container"> <nav-bar></nav-bar> </div> </template> when load custom element using .html @ end of path, aurelia not load .js file. change require element following, , work expect: <require from="./nav-bar"></require>

linux - Getting all output from terminal in C -

i working on ssh program , want able have full control on terminal via networking. question is, if send command server run in terminal, how output terminal prints? have seen many posts saying use popen() command have tried can't change directories , other commands using this, simple things such ls . there other way output terminal besides sending file command > filetoholdcommand . in advance! i put comment, dont have enough rep i'm new. cd built in shell command want use system(). cd have no effect on process (you have use chdir(), that),so want start shell subprocess via fork/exec, connect pipes stdin , stdout,then pipe commands duration of user session or connection. following code give general idea. basic, , flawed - use select() not usleep() one. int argc2; printf( "server started - %d\n", getpid() ); char buf[1024] = {0}; int pid; int pipe_fd_1[2]; int pipe_fd_2[2]; pipe( pipe_fd_1 ); pipe( pipe_fd_2 ); switch ( pid = fork() ) { case -1:

javascript - React native bridge restarting when app goes to background? -

i using rctrootview inside view controller keep alive time in app , present modally time time. when app goes background (i press home button in iphone) , app, rctrootview flashes white screen moment, restarting bridge . how can avoid behaviour?

Tkinter in python 2.7 to 3.6 -

this code snippets trying out. in python-2.7 changed 1 line found needed changed: from tkinter import * to from tkinter import * well... very wrong on that. guess moduals got removed between python-2.7 , python-3 ??? causes modualnotfounderror whenever try run it. these moduals: tkfiledialog tkmessagebox note: update when find more tkinter libraries outdated those modules named filedialog , messagebox . you can check tkinter documentation on modules more information update: see example tkinter on python 3. from tkinter import * tkinter import messagebox, filedialog window_size = '200x100' top = tk() top.geometry(window_size) def msgbox_hello(): messagebox.showinfo('messagebox title', 'messagebox content') def filedialog_world(): file_name = filedialog.askopenfilename() # display file name if file_name: messagebox.showinfo( 'selected file name', 'you se

python - Split dataframe column into two columns based on delimiter -

Image
i preprocessing text classification, , import dataset this: dataset = pd.read_csv('lyrics.csv', delimiter = '\t', quoting = 2) dataset prints on terminal: lyrics,classification 0 should have known better girl yo... 1 can shake apple off apple tree\nshak... 2 it's been hard day's night\nand i've been wo... 3 michelle, ma belle\nthese words go to... however, when inspect variable dataset closer using spyder , see have 1 column, instead of desired 2 columns. considering lyrics have commas , "," delimiter not work, how correct dataframe above in order have: 1) 1 column lyrics 2) 1 column classification with correspondent data each row? if lyrics not contain commas (they do), can use read_csv delimiter=',' . however, if not option, use str.rsplit : dataset.iloc[:, 0].str.rsplit(',', expand=true) df lyrics,classificat

sql - Scala/Apache Spark Converting DataFrame column values and type, multiple when otherwise -

i have primary sql table reading spark , modifying write cassandradb. have working implementation converting gender 0, 1, 2, 3 (integers) "male", "female", "trans", etc (strings). though below method work, seems inefficient make seperate array mappings dataframe, join main table/dataframe, remove, rename, etc. i have seen: .withcolumn("gender", when(col("gender) === 1, "male").otherwise("female") that allow me continue method chaining on primary table have not been able working more 2 options. there way this? have around 10 different columns on table each need own custom conversion created. since code processing tbs of data, there less repetitive , more efficient way accomplish this. in advance! case class gender(tmpid: int, tmpgender: string) private def creategenderdf(spark:sparksession): dataframe = { import spark.implicits._ seq( gender(1, "male"), gender(2, "female"),

apache - Webserver for Angular and Spring application -

Image
i'm building small web application personal project. angular web application talk spring-boot service layer in turn read/write stuff mongodb. i hope host on single ec2 instance in aws. question how configure web server (like apache doesn't have be) 'beautify' urls bit. example, without touching angular run @ host:4200 , service layer @ host:8080 . have map proper domain host in aws, hiding of ports etc gets murky me. i want able hit web app @ domain.com (no ports etc) , want service layer ideally have similar setup e.g. domain.com/service (no ports etc). how configure webservice me? examples or pointers specific examples ideal, pointer right documentation helpful. this thread kind of similar want not helpful: how deploy spring framework backend , angular 2 frontend application in online server? you can use setup aws cloudfront reverse proxy , cdn cache. can map domain name , ssl certificates(you can use aws issued free ssl certificates through a

c# - Set value in app.config file to null -

i'm updating app.config value during runtime, want update value null value far empty string. still want able set empty string purpose, how value return null? try remove key, if remove value null. var val = system.configuration.configurationmanager.appsettings["key"] you can remove key in code configuration config = configurationmanager.openexeconfiguration(configurationuserlevel.none); config.appsettings.settings.remove("key");

How to make this php opencart 2.0 compatible? How to implement SQL CASE for calculation purpose -

i found code on opencart forum qphoria. seems 1.x.x know right way opencart 2.0? function recalculateprice() { $response =& $this->locator->get('response'); $database =& $this->locator->get('database'); $url =& $this->locator->get('url'); $products= $database->getrows("select product_id, price product"); foreach ($products $product) { $sql = "update product set price = '?' product_id='?'"; $database->query($database->parse($sql,($product['price'] - $product['price'] * 0.02)), $product['product_id'])); } $response->redirect($url->ssl('product')); } what want calculate query. thought in part. example fields: $product['wholesale'] $product['cost 1'] $product['cost 2'] $product['cost 3'] $product['cost 4'] $product['minimum_profit'] (cash) $product['margin'] $database-&

java - I am having trouble running my program that creates html templates each time it is ran -

i writing program in java creates html template each time ran. reads input bio txt file made of 4 headings , paragraphs 1 line each. takes txt , stores headings , paragraphs parallel array. have array written html file. problem when run there no input onto file , says reader never closed. here's program , output. thank suggestions. package edu.txstate.cs3320.qwt1; import java.util.arraylist; import java.io.bufferedreader; import java.io.filereader; import java.io.filewriter; import java.io.ioexception; import java.io.bufferedwriter; public class bio2 { private static final string output_file = "./iofiles/bio.html"; private static final string input_file = "./iofiles/bio.txt"; private static final string title = "my life"; private static bufferedwriter writer = null; private static arraylist <string> headings = new arraylist <> (); private static arraylist <string> paragraphs = new arraylist <>

android - When I clear the app data it doesn't work anymore -

i doing app using xamarin forms, tested on celphone, apk there. when clear data on android, app doesn't open anymore... did see that? problem?? yes, normal xamarin.android apps built in debug mode. if clear data removing directories/files used debugging: before clearing data: .: drwxrwx--x 2 u0_a93 u0_a93 4096 2017-09-11 21:15 cache drwxrwx--x 2 u0_a93 u0_a93 4096 2017-09-11 21:15 code_cache drwxrwx--x 5 u0_a93 u0_a93 4096 2017-09-11 21:24 files lrwxrwxrwx 1 root root 60 2017-09-11 21:15 lib -> /data/app/com.sushihangover.geneticcancerdnamapper-1/lib/x86 ./cache: ./code_cache: ./files: drwxrwxrwx 3 u0_a93 u0_a93 4096 2017-09-11 21:24 .__override__ drwxr-xr-x 2 u0_a93 u0_a93 4096 2017-09-11 21:24 .config drwxr-xr-x 3 u0_a93 u0_a93 4096 2017-09-11 21:24 .local ./files/.__override__: drwxrwxrwx 2 u0_a93 u0_a93 4096 2017-09-11 21:24 links ./files/.__override__/links: lrwxrwxr

amazon web services - Error Spring integration xsd for aws sqs -

i'm getting error: caused by: org.xml.sax.saxparseexception; linenumber: 16; columnnumber: 44; cvc-complex-type.2.4.c: matching wildcard strict, no declaration can found element 'aws-messaging:sqs-async-client'. @ com.sun.org.apache.xerces.internal.util.errorhandlerwrapper.createsaxparseexception(errorhandlerwrapper.java:203) @ com.sun.org.apache.xerces.internal.util.errorhandlerwrapper.error(errorhandlerwrapper.java:134) @ com.sun.org.apache.xerces.internal.impl.xmlerrorreporter.reporterror(xmlerrorreporter.java:396) @ com.sun.org.apache.xerces.internal.impl.xmlerrorreporter.reporterror(xmlerrorreporter.java:327) @ com.sun.org.apache.xerces.internal.impl.xmlerrorreporter.reporterror(xmlerrorreporter.java:284) @ com.sun.org.apache.xerces.internal.impl.xs.xmlschemavalidator$xsierrorreporter.reporterror(xmlschemavalidator.java:452) @ com.sun.org.apache.xerces.internal.impl.xs.xmlschemavalidator.reportschemaerror(xmlschemavalidator.java:3230) @ com.sun.org.apache.xerces.

C++ Reading file with some information omitted -

i have text file structured this: g 15324 2353 d 23444 q 23433 32565 i want store each piece of information variable , contain within vector: ifstream fin; fin.open("file.txt"); vector<someclass> test; someclass temp; while (fin >> temp.code >> temp.datapoint>> temp.dataleague) { test.push_back(temp); } however, within file third value ( temp.dataleague ) omitted , left blank. code above not work put garbage within field. how do when it's uncertain if third field contain value or not? you can try using: std::istream::getline this allow each line inside buffer , process wish. char buffer[256]; fin.getline(buffer,256); you can parse different fields using: std::string line = std::string(buffer); int index = line.find(' '); if (index>0) std::cout << "my value is: " << line.substr(0,index); with example: ifstream fin; fin.open("file.txt"); vector<someclass> t

mongodb - Server Exception occurs in running sbt project in IntelliJ -

i starting learn scala , running application intellij ide. trouble in running project following serverexception . explain briefly project. connect mongodb scala application , use scala version 2.10.0 , jdk 8. this build.sbt name := "mongodbandscala" version := "0.1" scalaversion := "2.10.0" librarydependencies ++= seq( "org.mongodb" %% "casbah" % "2.6.0", "org.slf4j" % "slf4j-simple" % "1.6.4" ) scalacoptions += "-deprecation" this common.scala import com.mongodb.casbah.imports._ case class stock (symbol: string, price: double) object common { def buildmongodbobject(stock: stock): mongodbobject = { val builder = mongodbobject.newbuilder builder += "symbol" -> stock.symbol builder += "price" -> stock.price builder.result } } this mongofactory.scala import com.mongodb.casbah.mongoconnection object mongofactory { pri

php - How to remove letter in front of the word laravel -

Image
based on picture above result of var_dump() , dd() of same variable ,when var_dump() , apostrophe (') symbol in black diamond of question mark , when dd() same variable , apostrophe can seen letter 'b' appear in front of words what want can me result : loreal's sdn bhd and @ same time want remove special character ( excluding these 4 symbols (-) ,(_) ,('),(,) ) simply escape special character resolve issue. mysqli_real_escape_string resolve issue. $name = mysqli_real_escape_string($request()->user); or use addslashes function() $name = addslashes($request()->user);

python - How to swap the column header in pandas pivot table? -

following question i got datframe after pivoting . avg grossprofit avg pmv loss% sales parentauction copart iaa copart iaa copart iaa copart iaa make acura 112.99 nan -15.53 nan 36.46 nan 96.0 nan how change column levels format of columns ? parentauction copart iaa avg grossprofit avg pmv loss% sales avg grossprofit avg pmv loss% sales make acura 112.99 -15.53 36.46 96.0 nan nan nan nan use swaplevel sort_index sorting multiindex : df = df.swaplevel(0,1, axis=1).sort_index(axis=1) print (df) parentauction copart iaa \

angularjs - How to define same path in all machins in Ubuntu using javascript for protractor -

i want define same path in ubuntu in windows(user.dir) want soulution currently using : projectpath="/home/local/nexteducation/**anandgoudp**/workspace/nexterp which static, in place of anandgoudp want user name in meching have logged in. using shell command whoami can logged in user name. execute shell command using node js, can use shelljs npm module. example: var shell = require('shelljs'); var projectpath="/home/local/nexteducation/{{username}}/workspace/nexterp"; var currentusername = shell.exec("whoami").stdout.replace("\n",""); projectpath= projectpath.replace("{{username}}",currentusername);

c# - Assign started application to a specific task bar icon -

at work use lot of browser based applications (sharepoint, jira , many others). of require special browser used (e.g. sharepoint works in internetexplorer, jira in chrome). => whole situation (three different browsers, lots of bookmarks) quite unsatisfactory :-) so decided create tool wraps web links executables: each "launcher" opens specific link each launcher knows browser use each launcher has nice icon identify web application opens the launchers can added start menu easily now 1 thing isn't should be: when such launcher opens specific browser, browser (obviously) appear new icon on task bar. there way how "group" started browser application under launcher's icon in task bar? (windows 10) search taskbar settings on start menu. go combine taskbar icons dropdown list , select "always combine, remove labels"

php - Send custom data via stripe.js -

path custom data stripe.js i have 3 subscription courses, made 3 button such. index.html.twig <form action="{{ path('acme_payment_charge') }}" method="post"> <input type="hidden" name="plan" value="basic"><!-- wish works.--> <script src="https://checkout.stripe.com/checkout.js" class="stripe-button" data-key="pk_test_fpfpjy1etetetetetete"  data-amount="2980"  data-name="basic" data-description="testtest" data-image="https://stripe.com/img/documentation/checkout/marketplace.png" data-locale="ja" data-currency="jpy"> </script> <form action="{{ path('acme_payment_charge') }}" method="post"> <script src="https://checkout.stripe.com/checkout.js" class="stripe-button" data-key="pk_test_fpfpjy1etetetetetete"  data-amoun

css - How to disable horizontal scroll and shrink the size of elements on mobile view? -

Image
i using material-ui project. right have lot of anchor elements displaying table within paper component mui. because table long, generates horizontal scroll bar in mobile view not want. i'm wondering there way shrink width of table-like anchor elements horizontal scroll bar won't appear? (i don't want use overflow-x: hidden hide elements) a simplified version of code: class row extends react.component { render() { const cell = (<a class="linkcell" key={cell.id} href="#"></a>); const row = []; (let = 0; < 20; i++) { row.push(cell); } return <div>{row}</div> } } class wholetable extends react.component { render() { const row = <row key={row.id}/> const table = []; (let = 0; < 100; i++) { table.push(row); } return <paper>{table}</paper> }; } what looks (before , after horizontal scrolling): any appreciated! in css file, use widt

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

Image
i trying build cypher statement neo4j know 2-n starting nodes name , need find node (if any) can reached of starting nodes. at first tought similar "mutual friend" situation handled (start1)-[*..2]->(main)<-[*..2]-(start2) in case have more 2 starting points around 6 know name. so puzzled how can include third, fourth , on node cypher able find commmon root amongst them. in above example neo4j website need path starting 'dilshad', 'becky' , 'cesar' check if have common friend (anders) excluding 'filipa' , 'emil' not friends of three. so far create statement programmatically looks like match (start1 {name:'person1'}), (start2 {name:'person2'}), (start3 {name: 'person3'}), (main) (start1)-[*..2]->(main) , (start2)-[*..2]->(main) , (start3)-[*..2]->(main) return distinct main but wondering if there more elegant / efficient way in cypher possibly use list of names parameter

version control - SVN Commit Dialog does not complete. i see the commits propagate to server but the dialog does include committed revision and successful message -

Image
svn commit on specific repository not show successful message in commit dialog instead commit dialog hangs on "committing transaction" happens specific repository, have updated repo permission of repo in server did svn verify find if there corrupt revisions. (svn client 1.9.7, server - 1.8.15) has experienced similar behavior ? the question lacks necessary details precise answer. however, can guess several potential root causes: the affected repository has pre-commit hook script hangs , prevents transaction being promoted new revision. there antivirus on server side interferes svn server operations.

android - Kotlin getParcelableArray from intent bundle not able to cast it to custom type -

i running weird problem . have class implements parcelable interface in kotlin. i passing array of class 1 activity no issues here. var arrayofa:array<a> // tell type assume array initialised value intent.putextra("array", arrayofa) but while receiving in activity , not able assign variable of type array asking me assign array when on type parcelable why not able assign variable. in second activity var arrayofa:array<a>?=null arraya=intent.get("array") array<a> // problem here. class cast exception i not able understand why. can 1 me here. don't want change type of variable array as many inter depedencies.(the class here demonstration) ======================================== class a(val a:string?,val b:string?):parcelable { constructor(parcel: parcel) : this( parcel.readstring(), parcel.readstring()) { } override fun writetoparcel(parcel: parcel, flags: int) { parcel.writestri

visual studio code - How to build and run wasm using emscripten and vscode -

firstly if don't mind please refer following links: mdn hackernoon kripken webassembly standalone demo one of stackoverflow question weasssembly.org dev guide above links provide simple guidance appropriate examples.but stackoverflow question , hackernoon links embeded emscripten vscode creating task in vscode . question how set visual studio code(a.k.a vscode) emscripten framework in order compile .c or .cpp (c/c++ functions/data) emcc/em++ , generate required .wasm (webassembly bytecode) .js and.html source. there external .js , .html files required in run-time too. how can achieve in windows environment ? (using external bat command , vscode tasks can helpful,i have no clear idea) if can provide step step procedure it's helpful. thank you.

c# - Single property for inhertance hierarchy -

i have property returns result, how can write property such result remains same derived classes. have tried // in base class // gives new object everytime public virtual result propertyx=> new result(); public virtual result propertyx { // returns new object classes derived derived class // of base class( grand child class may be!!!) get{ return result?? new result();} set{ resultfield=value;} } supposing hierachy base- derived1- grandchild1 when derived class intantiated result property set, problem is, when grandchild instantiated result intantiated again, want check if result set, if result set should reused.

checkbox - Is it possible to use HTML5's details tag in lieu of the check box hack? -

i love checkbox hack. isn't knock on checkbox hack at all , i've run situations cannot use checkbox hack because of limitations put in place cms. in theory, think <details> , <summary> tags used mimic checkbox hack. tabbed areas, example, created checkbox hack, i'd think recreated using styled details. likewise burger menus, push toggles, etc. i've never seen done anywhere, though, makes me wonder if trying exercise in folly. or, checkbox hack preferred alternative jquery in these instances? so, question remains same: possible use <details> tag recreate can checkbox hack? , if not, why not ? i've run situations cannot use checkbox hack because of limitations put in place cms. as @wayne indicates in comment above, can't use use <details> / <summary> in either ie11 (or before) or in edge 14/15/16. see: http://caniuse.com/#feat=details however , there technique can use in place of checkbox h

oracle - SQL - keeping index for a editable UI table -

our ui needs create editable table user can edit position(index) each row, , change must saved permanently. if change row position lets 5 1, rest of rows index must changed well(1->2, 2->3 ...). for example editable position table . my question best way implement in oracle table? 1-keeping integer index each row? 2-keeping timestamp , update row each time user changed one? thanks or other idea implantation.

mysql - How to manage entity duplication in database table -

Image
i working on simple database design of application. have book illustrator , editor table. modelling 1 relation between with model, think here duplication of column name in each author editor , illustrator table. what if book author, illustrator , editor person same, in case, data duplicated across 3 tables. but in case of searching faster, guess no of items per table less. modelling 2 modeling, author, illustrator , editor info saved in single table , confused should name of table. with approach. data won't' duplicated searching double compared model 1. can suggest me model should choose. feel modeling 2 better. it purely taste model should use. second 1 has advantage wont duplicates. both models can results 1 query select * books left join names auth on (auth.id = author_id) left join names ill on (ill.id = illustrator_id) left join names ed on (ed.id = editor_id) books.id = 1; sqlfiddle gives example of model 2. if want obtain data mo

c# - What is the simplest way to apply themeing -

Image
let's have resourcedictionary with: update: <solidcolorbrush x:key="aquabrush" color="#257d8e"/> <solidcolorbrush x:key="greenbrush" color="green"/> lets app: i have combobox items (aqua, green , gray) when select aqua button, should display this: , button , other control want set should update background aqua too. how can bind splitview , button , other control's background 1 property , when select "aqua" use "aquabrush" , when select "green", use "greenbrush"? thanks. since have solidcolorbrush resource defined in xaml, can code behind changing background color based on conditions @ runtime : if(some condition){ relativepanelname.background = (solidcolorbrush)resources["navpanebackgroundbrushblue"]; }else { relativepanelname.background = (solidcolorbrush)resources["navpanebackgroundbrushgreen"]; } hope helps..! edit :

javascript - Cancel click event of parent element only -

i having div structure. <div id="parentdiv"> employee data <a>click here</a> </div> parent div's click event ready registered third party plug in, not in control of me. doing validation on div click. i want perform action on click of anchor tag 'click here', don't want perform validation, registered div click. but when user click 'employee data' should perform validation registered click event. i tried <a onclick="(arguments[0]||window.event).stoppropagation();">click here</a> <a onclick="(arguments[0]||window.event).cancelbubble=true;"></a> but cancel own click event i.e anchor tags click event. stoppropagation() require, need call directly on click event raised. can using jquery, this: $('#parentdiv').click(function() { console.log('parent clicked'); }) $('#parentdiv a').click(function(e) { e.stoppropagation()

php - Fedora 25 TSQL - Conversion failed when converting date and/or time from character string -

i have web server fedora server 25 (kernel 4.11.9-200) configured with: httpd, php 7.0.22, mysql 5.x, freetds v1.00.47 and ms sql server 12.0.5203 web server work fine mysql, php, http pages. problem when try send request ms sql server. on sql server have 2 databases. on first database have table , can query via freetds - php (odbc_exec) - httpd fine!. on second database have stored procedure 3 input parameters (code, year, month). i try call sp tsql (command line). can connect server when call sp have error: msg 241 (severity 16, state 1) sqlserver-02, procedure elab_table line 50: "conversion failed when converting date and/or time character string." my sql code is: exec elab_table @code = 'abcd', @year = 2017, @month = 4 note: in sql server 2014 stored procedure work fine! i obtain same error when try php (odbc or pdo function) of course.... this tsql -c output: compile-time settings (established "configure&qu