Posts

Showing posts from September, 2010

angular - Angular2 Custom Component - mark as pristine and untouched -

i have template driven form in angular 2.1 containing many standard controls ( <input>, <select> etc) , custom control contains multiple input elements. i've implemented controlvalueaccessor on custom control , propagating it's changed/touched/valid values correctly parent form. however .. on parent form have save button, on after saving want clear dirty/touched state (as affects css applied) this: save(myform: ngform) { myform.form.markaspristine(); myform.form.markasuntouched(); } this working ok elements in top level parent form , custom control but <input> fields within custom control still marked touched/dirty (and receiving pre-saved styling). is there way custom control can notified when it's dirty/touched state changed can clear it's child <input> elements match? seems if <input> elements within custom control don't updated calls markaspristine/untouched on parent form. thanks! try add con

css - GtkStyleProvider - providing own implementation -

i trying provide own implementation of gtkstyleprovider , since "normal" css provider lot of work , processing use in case. i want able provide widget styling based on internal state, , in css, i'd have write out huge string of css (translating things pango.fontdescription s css-style declarations) based on change in state, , feed gktcssprovider process back gtk-land. compare custom provider, signal (somehow) client widgets should ask style , hand out new styling based directly on state. it seems gtkstyleprovider way achieve - can make provider returns styling based on state, , add style provider relevant gtkstylecontext . (c) interface is // deprecated - return null in new code gtkiconfactory * gtk_style_provider_get_icon_factory ( gtkstyleprovider *provider, gtkwidgetpath *path);) // deprecated - return null in new code gtkstyleproperties * gtk_style_provider_get_style (

xml - XSD : Unordered list of element that contains xs:any -

Image
i have unordered list of elements contains xs:any , multiple combinations of choice , sequence tried , violate "unique particle attribution" . xml following : <mall id="andaal"> <eff>effrecorder</eff> <morr>id</morr> <todd>toddcurrenttype == toddidoldtype</todd> <mall id="donallid"> <morr>id</morr> <eff>effrecorder</eff> <other>quickcode</other> <mall id="mall2id"> <eff>tickerchaineff</eff> <morr>sourceid</morr> <other>tickercode</other> </mall> </mall> <mall id="mall2sourceid"> <eff>listing2sourceeff</eff> <morr>id</morr> <other>other2price</other> <other>expirydate</other> </mall> </mall> the

visual studio 2015 different theme for same user account -

is there way change theme visual studio 2015 without changing other people using same account? at work use same account , every time change theme dark changes else in office (although there 3 of , other guy not effected somehow). try uncheck environment - synchronized settings - synchronize settings across devices when signed visual studio option. see synchronized settings in visual studio more details.

powershell - Can Invoke-Command be used to call Invoke-Command on a third system? -

i've got segmented active directory network multiple vlan's can talk local ad server, ad servers can talk each other. i'd have script can proxy through each ad server run command on each system per vlan. however, code doesn't appear run commands. function runremote { param([string]$scriptblock,[string]$server,[string]$dc) $icm = '[scriptblock]$sb=[scriptblock]::create(' + $scriptblock + ');icm -cn ' + $server + ' -scriptblock $sb' icm -cn $dc -scriptblock { $icm } } $scriptblock = "date" $server = "comp01" $dc= "dc01" runremote $scriptblock $server i'm not receiving errors, none of commands sent being run on remote servers. if make interactive session ad server, invoke command works expected each vlan. i think have dubble hop problem. you're credentials aren't passed next hop. can send you're credentials first invoke parameters , in second invoke use p

android - Strange const definition with asm -

i trying build ne10 library android, cmake reports: -- target architecture: armv7 -- building type: release -- loaded toolchain: ../android/sdk/ndk-bundle//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc ../android/sdk/ndk-bundle//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ ../android/sdk/ndk-bundle//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-as -- cmake_c_flags: -std=c11 -fno-strict-aliasing -o2 -dndebug --sysroot=/home/gica/android/sdk/ndk-bundle//platforms/android-21/arch-arm/ -pie -mthumb-interwork -mthumb -march=armv7-a -mfloat-abi=hard -mfpu=vfp3 -wl,--no-warn-mismatch but compiler reports error: in file included ...ne10/common/ne10_mask_table.c:32:0: ..ne10/common/ne10_mask_table.h:41:65: error: expected '=', ',', ';', 'asm' or ' attribute ' before 'asm'

php - Wordpress: Space between the slugs -

i have code display slugs of post: <?php $terms = get_the_terms( $post->id, 'project-category' ); foreach($terms $term){ echo $term->slug; } ?> but sticky each other like: cateogry-01cateogry-02 how can make like: cateogry-01 cateogry-02 change: echo $term->slug; to: echo $term->slug . ' ';

vim - Creating multiple .vimrc for multiple languages? -

i starting learn programming , saw possible configure vim through .vimrc file. i'm having trouble creating more 1 setting. want configuration java , c, not know how enable configuration when programming in particular language. i found following solution problem: if it's okay configure local exceptions centrally, can put such autocmd s ~/.vimrc : :autocmd bufread,bufnewfile /path/to/dir/* setlocal ts=4 sw=4 ( how load different .vimrc file different working directory? ) but did not understand solution. i figured should following: i wanted create c language setting on desktop. put in shell (i'm using mac os) following command vim ~/desktop/.vimrc , put desired configuration in file. then put following command in file ~/.vimrc : autocmd bufread,bufnewfile ~/desktop/.vimrc setlocal ts=4 sw=4 then went shell , created c file vim ~/desktop/myprogram.c , realized setup had not worked. obviously did wrong, not find error, because i'm still

Typings Error when using D3 V4 on Angular 2 and Typescript V2 -

i trying integrate d3 , angular 2, using typescript. of typings producing no errors, there 1 case produces error every instance in code. import { component, oninit } '@angular/core'; import * d3 'd3'; import * moment 'moment'; @component({ selector: 'app-select-d3', templateurl: './select-d3.component.html', styleurls: ['./select-d3.component.css'] }) export class selectd3component implements oninit { constructor() { } ngoninit() { var data = []; data[0] = []; data[1] = []; data[2] = []; data[3] = []; data[0][0] = [1, 2, 3]; data[0][1] = [4, 5, 6]; data[1][0] = [7, 8]; data[1][1] = [9, 10, 11, 12]; data[1][2] = [13, 14, 15]; data[2][0] = [16]; data[3][0] = [17, 18]; var width = 1000; var height = 240; var barwidth = 100; var bargap = 10; var margin = { left: 50, right: 50, top: 0, bottom: 0 }; var svg = d3.select("body").append("svg").attr("width", width).attr("height", h

javascript - Adding remote method to build-in User model not working in Loopback -

i new loopback. trying add new remote method build-in user model following link .but getting below error while trying access api. {"error":{"statuscode":401,"name":"error","message":"authorization required"}} but per above link, api can access users of application since configuring acl users in such way. doing wrong? any appreciated. in advance you did not add acl entry new remote method in the user's model configuration. you need add entry execute access type, similar to { "principaltype": "role", "principalid": "$everyone", "permission": "allow", "property": "mynewremotemethod", "accesstype": "execute" }

Maintaining value of a variable through many pages in PHP WITHOUT COOKIES,SESSIONS -

i having problem in maintaing value of variable through several pages(actually through same page through many refresh). first time navigated new page value of variable preserved , can used echo,but after refreshing page value cannot reused,it shows error variable has no value. making webapp chatting in php. want show name of user(sender) on every page(every page of sending message). using code <?php $writtervar = $_post['writter']; echo $writtervar; ?> i taking input through separate page,code is <form action="ddd.php" method="post"> enter name <input type="text" name="writter" > <input type="submit" id="submit" value="press" > </form> you can use session . base on code can try this: in start page (ddd.php) have set session values. <?php session_start(); $_session["writer"] = $_post["writter"]; ?> ... in other

java - Placement of Math.toRadians for solving quadratic and cubic equations -

i writing program solves either quadratic or cubic equations. thing don't know if placing math.toradians correctly. the code following: public double[] getraices(double a,double b, double c, double d) throws complexexception { if (a==0){ double discriminante=math.pow(c,2)+((-4)*b*d); if(discriminante>=0){ this.raices[0]=(c*(-1)+math.sqrt(discriminante))/(2*b); this.raices[1]=(c*(-1)-math.sqrt(discriminante))/(2*b); }else{ throw new complexexception("no hay solucion real"); } } else{ double f=((3*c/a)-(math.pow(b,2)/math.pow(a,2)))/3; double g=((2*math.pow(b,3)/math.pow(a,3))-(9*b*c/math.pow(a,2))+(27*d/a))/27; double h=(math.pow(g,2)/4)+(math.pow(f,3)/27); if(f+g+h==0){ raices [0]=math.cbrt(d/a)*(-1); raices [1]=math.cbrt(d/a)*(-1); raices [2]=math.cbrt(d/a)*(-1); }else{ if(h<=0){

c++ - SQLITE CHECK constraint for hex values -

i want store ip address using c++ in sqlite3 db in hex format. using text format storing hex values. want perform check on value being inserted in db. value range want check 0x00000000 - 0xffffffff. integer type can check - check (num between 0 , 100). there way add check constraint hex values? if there smarter way store ip address in sqlite please share me. thanks i think have 2 main choices: (a) store hex (i.e. text) , check "hex conformity", or (b) store integer , print hex when reading data. there may several reasons preferring 1 on other, e.g. if application provides , receives integer values. anyway, examples option (a) , option (b). option (a) - store text , check hex conformity the simplest way use check based on glob remarked cl: value text constraint "valueishex" check(value glob "0x[a-fa-f0-9][a-fa-f0-9][a-fa-f0-9][a-fa-f0-9][a-fa-f0-9][a-fa-f0-9][a-fa-f0-9][a-fa-f0-9]") if logic goes beyond supported glob, install u

jquery - Delete li entry in database with PHP -

i working on website user can enter money owes friend. on 1 page user can see entrys made far , should able delete them aswell. entrys inserted in db. overview page use following structure: <ul class="list-group"> <?php $isempty = true; while ($data = mysql_fetch_array($res)) { if ($data['isdebt'] == 0) { $isempty = false; ?> <form method="post" action="<?php echo htmlspecialchars($_server['php_self']); ?>" autocomplete="off"> <li class="list-group-item" name="debt_id" value="<?php echo $data['debt_id'] ?>"><span class="badge"><?php echo $data['value']; ?></span><?php echo $data['name']; ?> <button name="delete" type="submit" id="delete" class="btn btn-xs btn-danger pull-right">

jquery - Bootstrap DateTimePicker - on change event for Angular -

Image
given demo below: http://jsfiddle.net/adukg/8851/ i want every time date changes controller value update. every time new date selected box below value ng-model changes. however upon using following directive error written above. app.directive('datetimepicker', function () { return { restrict: 'a', require : 'ngmodel', link : function (scope, element, attrs, ngmodelctrl) { element.datetimepicker({ onrender:function (date) { // triggers digest update model scope.$apply(function () { ngmodelctrl.$setviewvalue(date); }); } }); } } }); how can detect changes in angular datetimepicker? bootstrap's datetimepicker plugin doesn't support change event in options of constructor, can use dp.change event of element added datetimepicker to: element.date

ruby on rails - Case statement two buttons under selection -

i'm trying put buttons under same case such as: when "invited" button_to "confirm", .... button_to "refuse", .... at minute 1 of buttons shown @ time, how can show both simultaneously? thanks! it's typically case last result returned, if want return multiple things: when 'x' [ button_to ..., button_to ] ... that return array of various buttons present.

node.js - Google Cloud Pub/Sub: unable to get request PUSH from GAE endpoint URL -

Image
i have deployed myapp google app engine, setting runtime: nodejs env: flex my app domain https://myapp.appspot.com but auto redirected https://myapp.appspot-preview.com i have created google pub/sub topic , add subscription, set push endpoint url https://myapp.appspot-preview.com/_ah/push-handlers/sample tested endpoint_url postman , it's sure work well, when publish message pub/sub nothing works. myapp (node.js) endpoint handler: var cors = require('cors'); var express = require('express'); var app = express(); var bodyparser = require('body-parser'); var http = require('http').server(app); var io = require('socket.io')(http); app.use(bodyparser.urlencoded({ extended: false })); app.use(bodyparser.json()); app.use(cors()); app.post('/_ah/push-handlers/sample', function (req, res){ console.log('pubsub_____',req.body); //this should printed out res.status(200).send(); }); /

node.js - Heroku application error H10 -

getting on logs on heroku deploy attempt: 2017-01-05t13:22:25.579047+00:00 heroku[router]: at=error code=h10 desc="app crashed" method=get path="/favicon.ico" host=fwc-node.herokuapp.com request_id=7c8a5b24-4af5-4c1b-a0d1-c373b4916459 fwd="2.102.204.147" dyno= connect= service= status=503 bytes= 2017-01-05t13:22:25.288450+00:00 heroku[router]: at=error code=h10 desc="app crashed" method=get path="/" host=fwc-node.herokuapp.com request_id=47e66938-a57d-4d83-b1cf-220030adb90e fwd="2.102.204.147" dyno= connect= service= status=503 bytes= 2017-01-05t13:22:25.543923+00:00 heroku[router]: at=error code=h10 desc="app crashed" method=get path="/favicon.ico" host=fwc-node.herokuapp.com request_id=10baa1a5-bcfc-496d-ae3a-f0dab4c01b36 fwd="2.102.204.147" dyno= connect= service= status=503 bytes= this package .json { "name": "application", "version": "0.0.2&q

crystal reports grand total showing on both sides of data -

i'm relatively new cr. i've created crosstab report , grans totals showing on both sides of grid on right side labeled total , on left there no heading. want keep total on right , hide or suppress values on right. appreciated. version of crystal reports 2013 support pack 7 version 14.1.7.1853 crosstab report grand totals on both sides never mind - not issue - total noob cr selection parameters creating issue - not issue

Converting array of string to array of integers in PHP -

i followed leads in questions this , this . i trying convert input stream of numbers array of integers. code should self explanatory. $handle = fopen("php://stdin","r"); print("enter space separated numbers made array\n"); $numstream = fgets($handle); print("creating array : {$numstream}\n"); //using explode create arrays //now have array of strings $numarray = explode(" ", $numstream); var_dump($numarray); print(gettype($numarray[0])); print("\n"); array_walk($numarray, 'intval'); print(gettype($numarray[1])); print("\n"); var_dump($numarray); print_r($numarray); i trying convert string array, array_walk($numarray, 'intval') the last 2 print blocks prints type of array element before , after conversion. the output string in both cases string string i wonder going on here? possibly.. the conversion wrong how type checked wrong or possibly both. adding complete input

javascript - Refreshing multiple partials with polling in Rails -

let's have list of statuses might this: ul#list - @list_items.each |item| li.loading item #{item.id} - status: #{item.status} li item #{item.id} - status: #{item.status} li item #{item.id} - status: #{item.status} li.loading item #{item.id} - status: #{item.status} which renders me: item 1 - status: loading item 2 - status: finished item 3 - status: finished item 4 - status: loading what periodically poll changes on individual list items , refresh them if status has changed. far able away refreshing whole list: ul#list == render 'status_list', list_items: @list_items coffee: if $('.loading').length > 0 setinterval (=> @refreshlistpartial() ), 5000 where @refreshlitspartial ajax function hits rails controller goes on refresh whole list partial: $("#list").html("<%= escape_javascript(render partial: 'status_list', locals: { list_items: @list_items } ) %>"); but how 1 go in or

html - Increase button on input range slider when its in a form that posts -

could please teach me how use increase button on slider when in form posts without page reloading overtime clicked. or point me html input range slider +/- buttons tutorial. <!doctype html> <html> <body> <form method='post' action=''> points: <input type="range" id="myrange" value="60"> <p>click button increment value of slider control "10" (each time click).</p> <button onclick="myfunction()">try it</button> <script> function myfunction() { document.getelementbyid("myrange").stepup(10); } </script> </form> </body> thank you.

osx - Gitlab CI can't fetch repo because keep asking for keychain password -

Image
i have project on company gitlab. project ios platform node building project mac mini os sierra. runner works great - connecting etc works. when try run pipeline message on node on picture. alert appear when gitlab runner wants checkout code. i checked in keychainaccess git-credential-osxkeychain app have access password gitlab on login keychain. how fix , disable dialog keychain password? config.toml file: concurrent = 1 check_interval = 0 [[runners]] name = "mac mini runner" url = "urltomygitlab" token = "token" executor = "shell" [runners.cache]

c# - Xamarin Studio: Can't Sign and Distribute Xamarin Forms Android App -

i have xamarin forms project in xamarin studio , want create self-signed apk file. after created archive, sign & distribute, select created certificate , defined file path, got error message: 1 or more errors occured. first time, after creating certificate worked, had rebuild app. after googling, found hint, problem: sign & distribute process not asking after password again. help. there step step guide understand process: https://blog.xamarin.com/android-archiving-and-publishing-made-easy/ if not need then, every time compile .apk generated inside .droid/bin/debug folder of project: com.xxx.xxx-signed.apk com.xxx.xxx.apk to understand difference between signed .apk file , unsigned 1 can read: android differences between signed , unsigned .apk files? https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/publishing_an_application/part_2_-_signing_the_android_application_package/

android - Onclicklistener for a child view inside a ListView item only fired second time after onitemclicklistener -

this situation: have listview items. inside each item there 2 clickable views shown after user clickes in parent item. it works this: productlist.setonitemclicklistener(new adapterview.onitemclicklistener() { @override public void onitemclick(final adapterview<?> parent, final view view, final int position, long id) { textview txtadd = (textview) view.findviewbyid(r.id.txt_add_units); txtadd.setvisibility(view.visible); txtadd.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { ... } }); textview txtremove = (textview) view.findviewbyid(r.id.txt_remove_units); txtremove.setvisibility(view.visible); txtremove.setonclicklistener(new view.onclicklistener() { @override public void on

sql - Insert a different value in underlying table when a view is updated -

consider following example have table , corresponding view: table | view t_emailaddress | v_emailaddress ----------------+---------------- id int | id status varchar | status valid int | column1 varchar | column1 columnn varchar | columnn i have program issues following queries: update v_emailaddress set status = 'valid' id = 1; update v_emailaddress set status = 'invalid' id = 2; is possible update underlying table status valid , invalid stored 1 , 0 inside valid column of underlying table. note cannot change table or query. can add "normal" columns table. you use instead of update trigger on view. when ever update statement on view completed, trigger fire. note instead of trigger means update blocked, , have write update statement underling table yourself. something along these lines should trick: create trigger v_emailaddress_io_update on v_emailaddress instead of update begin update t set colum

linux - n days ago from a given date on command line -

for example, given date '2016-12-31', n 2, expected output '2016-12-29'. survey date command , n days ago current date easy: date -d "2 days ago" +%y-%m-%d just mention date want extract 2 days from: $ date -d "2016-12-31 2 days ago" +%y-%m-%d 2016-12-29 or bit better grammatically-wise: $ date -d "2016-12-31 -2 days" +%y-%m-%d 2016-12-29

reactjs - Reparent relay connection element -

imagine have following structure, there connection of projects connection of tasks. viewer { id projects(first:10) { edges { node { id tasks(first:10) { edges { node { id project_id } } } } } } } if make mutation change project_id of task, task should move projects tasks. i cannot figure out how make relay getconfigs , return in payload of query. there missed? my current thoughts return both previous project , new project in payload. use range_delete removing task previous projects tasks , range_add add new projects tasks.

css - The div with id 'intro' should be hidden but it shows. What has gone wrong? -

the div id="intro" supposed hidden shows. main container , div "id=myquiz" , has width , height 650px , 'overflow' set 'hidden' . now, if div "class=intro" has margin 660px left , should hidden because it's margin higher maximum width of main container. code follows: <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>test knowledge: saturn</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" type="text/css" href="css/quiz.css"> </head> <body> <div id="myquiz"> <h1>test knowledge:<span>saturn</span></h1> <div class="progress"></div> <div class="intro"></div> <

How to create a database using JDBC in Clojure? -

this have tried, starting clojure.java.jdbc , map containing database connection details: (:require '[clojure.java.jdbc :as j])) (def mysql-db {:dbtype "mysql", :dbname "changelog_development", :user "root", :password "", :usessl true, :verifyservercertificate false} first tried use execute cannot use given connection configuration because database not yet exist: (j/execute! mysql-db "create database changelog_development") ;; mysqlsyntaxerrorexception unknown database 'changelog_development' so remove dbname key , tried again, error says have missing parameter: (j/execute! (dissoc mysql-db :dbname) "create database changelog_development") ;; illegalargumentexception db-spec {:dbtype "mysql", :user "root", :password "", :usessl true, :verifyservercertificate false} missing required parameter clojure.java.jdbc connection spec has many possible formats.

vba - Excel remove all empty rows 600 000 rows and reformat -

i have excel file 600 000 rows. it looks this: 1 2 3 4 value1: 1 5 value2: 2 6 value3: 3 7 8 9 10 value1: 1 11 value2: 2 12 value3: 3 13 14 15 ... 599998: value1: 1 599999: value2: 2 600000: value3: 3 my goal remove empty rows , place values this: b c 1 value1 value2 value3 2 ... i've tried selecting rows -> f5 special "empty values" says "selection big" 1000 rows ... anyone me out tiny bit forever thankful! many in advance! you have change sheetname name of sheet data is, in line : set ws = thisworkbook.sheets("sheetname") and put desired output in new sheet : sub testfranklucas() dim long dim lastrow long dim ws worksheet dim wsnew worksheet dim data() variant set ws = thisworkbook.sheets("sheetname") lastrow = lastrow_1(ws) redim data(1 3, 1 1) = 1 lastrow step 6 ws data(1, ubound(data, 2)) = .cells(i, 1).offset(3, 0)

Keras - Plot training, validation and test set accuracy -

i want plot output of simple neural network: model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy']) history = model.fit(x_test, y_test, nb_epoch=10, validation_split=0.2, shuffle=true) model.test_on_batch(x_test, y_test) model.metrics_names i have plotted accuracy , loss of training , validation: print(history.history.keys()) # "accuracy" plt.plot(history.history['acc']) plt.plot(history.history['val_acc']) plt.title('model accuracy') plt.ylabel('accuracy') plt.xlabel('epoch') plt.legend(['train', 'validation'], loc='upper left') plt.show() # "loss" plt.plot(history.history['loss']) plt.plot(history.history['val_loss']) plt.title('model loss') plt.ylabel('loss') plt.xlabel('epoch') plt.legend(['train', 'validation'], loc='upper left') plt.show() now want add , plot test set&

python - Pygame doesn't recognize mp3 files -

when try play pygames mp3 files error: 'pygame.error: unrecognized music format'. when try play .wav files works perfectly. own macbook , project mates own windows laptop , have no problems playing mp3 files, think has mac windows difference? any tips , helps appreciated! i run python 3.52 on macos sierra pygame.mixer.music.load('img/questionsound.mp3') pygame.mixer.music.play(0)

android - Why notifyItemChanged only works in post Runnable after setAdapter? -

public class mainactivity extends appcompatactivity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); recyclerview list = (recyclerview) findviewbyid(r.id.list); list.setlayoutmanager(new linearlayoutmanager(this)); final recyclerview.adapter adapter = getadapter(); list.setadapter(adapter); adapter.notifyitemchanged(1, new object());//this doesn't work list.post(new runnable() { @override public void run() { adapter.notifyitemchanged(1, new object());//this works } }); } @nonnull private recyclerview.adapter getadapter() { return new recyclerview.adapter() { @override public recyclerview.viewholder oncreateviewholder(viewgroup parent, int viewtype) { return new itemviewholder( layoutinflater.from(parent.getcontext()) .inflate(r.layout.list_view_item, parent, false));

php - create table from existing table1 mysql -

is there way achieve below in mysql ? if table exists insert data table1 condition if table not exists create new table same schema , data given condition new table generated based on condition of php code.so need queries that. i have tried below not working.i know there way in mysql achieve using queries. create table schema.new_accounts if not exists ( select * schema.accounts) no data below working me: create table if not exists `new_accounts` `accounts`; for data insert can run below sql condition: insert `new_accounts` select * `accounts` column=1; hope solves problem @ level

php - How to subscribe user with laravel notification channel for OneSignal -

Image
i trying use laravel-notifications-channel/onesignal , having problems users in laravel app set receive notifications. documentation on github page not cover how user authenticates them self receive notification. even reading on onesignal docs sending users onesignal not working me. how set when user using our web app notified receive notifications , can send notifications them using laravel notifications ? here assignedtotask notification file: <?php namespace app\notifications; use app\task; use illuminate\bus\queueable; use illuminate\notifications\notification; use illuminate\contracts\queue\shouldqueue; use illuminate\notifications\messages\mailmessage; use notificationchannels\onesignal\onesignalchannel; use notificationchannels\onesignal\onesignalmessage; use notificationchannels\onesignal\onesignalwebbutton; class assignedtotask extends notification { use queueable; protected $task; /** * create new notification instance. * *

qt - Teamcity compilation error only on triggered build -

i have few qt projects being built teamcity. when commit change vcs trigger build , got same build error @ same step: [15:27:20][custombuild] rcc'ing resources.qrc... [15:27:20][custombuild] system cannot find path specified. [15:27:20][custombuild] uic'ing src\commandcard.ui... [15:27:20][custombuild] system cannot find path specified. [15:27:20][custombuild] uic'ing src\myclass.ui... [15:27:20][custombuild] system cannot find path specified. [15:27:20][custombuild] uic'ing src\settings.ui... ... but when re-run build same revisions via ui , build executes without errors. if set "retry build trigger" retry after first error, error exists. after error, supposed missing files exists correctly in disk, in version control. windows 7 64 teamcity professional 10.0.4 (build 42538) (but issue appeared in older versions too) question posted teamcity community forum . posting own answer here: with teamcity staff, able find source of error: it

python - shutil.rmtree(dest,ignore_errors=True) deletes other files but not .log and .tresoslog file? -

i using python command shutil.rmtree(dest,ignore_errors=true) remove files .metadata folder generated when eclipse launched. this .metadata folder has .log file, .lock file , folder has plugins. when use command delete files inside .metadata folder .log file , plugins folder gets deleted not .lock folder. throws error saying process can't accessed since used process. is there way can delete lock file using python command or using batch script?

python - Pointwise Mutual Information from scratch -

i want write own pmi (python) code without relying on nltk. i know have use formula log(p(x , y)/p(x)p(y)) suppose have corpus c contains n words , looking bigrams. right in thinking that: p(x) = (the number of times first word occurs) / (n) p(y) = (the number of times second word occurs) / (n) p(x , y) = (the number of times first word , the second word occur bigram) / (the total number of bigrams) for example, if had sentence "the fox jumped on fence". the pmi(fox, jumped) worked out using: p(x) = 1/6 p(y) = 1/6 p(x , y) = 1/5 (as there 5 distinct bigrams pairs , 1 of them "the fox") any advice appreciated.

c++ - I am trying to reverse the stack using recursion. What is being passed in function fun()? s is an object of class stack -

//reverse stack fun() , fun1() /*i unable understand being passed in function fun(). not sure arguement of type stack <int> &s. whole stack being passed or 1 node?*/ void fun1(stack<int> &s, int k) { if ( s.empty()) { s.push(k); return; } int t = s.top(); s.pop(); fun1(s,k); s.push(t); } **void fun(stack<int> &s)** { if ( s.empty()) { return; } int t = s.top(); s.pop(); fun(s); fun1(s,t); } the program trying reverse stack using functions fun() , fun1(). question arguement stack &s takes address of what? in c++ reference alias existing variable. represented using ampersand ( & ); stack<int>& indicates reference stack<int> . arguments named s in functions fun , fun1 indicate references entire stacks, not individual nodes thereof.

vba - passing value of listfield to textfield -

im looking way pass values listfield textfield. the listfield looks this: sid hid central date time abc ab yes 15.02.2017 15:00 def de no 15.02.2017 17:00 ... .. .. .......... ..... is there way pass value of selected entry textfield? need pass hid value of selected entry textfield of form. if select first entry " ab " should send value textfield " hid2 "

html - border-image-width in css -

Image
this how mdn explains border-image-width . the border-image-width css property defines width of border image defining inward offsets border edges. if border-image-width greater border-width, border image extends beyond padding (and/or content) edge. what not tell happen if border-image-width less border-width ? i did example on it. ran on chrome 56. here code : <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>border image</title> <style> p.checkborderimagewidth{ border: 40px solid black; width:500px; border-image-source: url("1.png"); /* note border-image-slice defaults 100% */ border-image-width: 10px; outline: 1px solid black; } </style> </head> <body> <p class="checkborderimagewidth">hi demo</p> </body> </html>

oracle - Splitting time range based on activities in sql -

i need oracle sql show following output given sample input. basically, employee schedule 9 hour shift. need split activities during day separate records. general activity of cash. need create new records. activity start time end time shift 2010-01-01 8:00:00 2010-01-01 17:00:00 open 2010-01-01 8:00:00 2010-01-01 9:00:00 cash 2010-01-01 9:00:00 2010-01-01 16:00:00 break 2010-01-01 10:00:00 2010-01-01 10:15:00 lunch 2010-01-01 12:00:00 2010-01-01 13:00:00 break 2010-01-01 14:30:00 2010-01-01 14:45:00 close 2010-01-01 16:00:00 2010-01-01 17:00:00 output: activity start time end time open 2010-01-01 8:00:00 2010-01-01 9:00:00 cash 2010-01-01 9:00:00 2010-01-01 10:00:00 break 2010-01-01 10:00:00 2010-01-01 10:15:00 cash 2010-01-01 10:15:00 2010-01-01 12:00:00 lunch 2010-01-01 1

oauth 2.0 - oAuth2 authentification with Deezer on mobile with manage_library perms -

i try make oauth authentification on ios perms set "manage_library,basic_access,email". after login, basic_access suggested deezer web authentification page ? where issue ? why deezer not use "standart" oauth2 mechanism scope parameters ?

json - Building Roku channel with vimeo as a feed -

i'm sorry bothering guys simple appears you. trying develop public roku channel awesome minister know has 100's of videos. (hoping naz vanof or knows lot can help) i attempted find information on how use vimeo json feed provider , didn't find tutorials. (the online @ vimeo no help). first there needs done each video uploaded vimeo account prepare them used json? tried using provided url vimeo account on direct publisher feed link , wouldn't accept it. i've been searching 2 days on subject , not getting anywhere , place see related content here (naz). videos using have permission developer downloaded youtube through keepvid online program computer uploaded vimeo. issue? sorry lack of knowledge excited feet wet on , have high aptitude in other fields, i'm total newbee in field. starting 2 days ago went through tutorials on roku , did prep establishing developer account, , learned how side load , alter channel templates, need know how url link connect ,

html - Adjusting image sizes and padding in bootstrap -

Image
i using bootstrap , divided row in 4:8, in col-4 displaying paragraph while in col-8 trying display thumbnail carousel of 3 picture in each col, problem facing picture having margins on left , right of carousel, want remove , secondly want display 3 images of 240*158 (actual) size each in carousel. here code actually want have thing that html <div class="col-md-8"> <h1> current projects </h1> <div class="carousel slide" id="mycarousel" style="background:#ccc"> <div class="carousel-inner"> <div class="item active"> <ul class="thumbnails"> <li class="col-md-4"> <div class="fff"> <div class="thumbnail"> <a href="#"><img src="http://placehold.it/100x20"