Posts

Showing posts from September, 2015

google bigquery - Delta between query execution time and Java query call to finish -

context our container cluster located @ us-east1-c we using following java library: google-cloud-bigquery, 0.9.2-beta our dataset has around 26m rows , represents ~10g all of our queries return less 100 rows grouping on specific column question we analyzed last 100 queries executed in bigquery, these executed in 2-3 seconds (we analyzed calling bq --format=prettyjson show -j jobid , end time - creation time). in our java logs though, of calls bigquery.query blocking 5-6 seconds (and 10 seconds not out of ordinary). explain systematic gap between query finish in bigquery cluster , results being available in java? know 5-6 seconds isn't astronomic, curious see if normal behaviour when using java bigquery cloud library. i didn't dig point analyzed outbound call using wireshark. our tests executed in our container cluster (kubernetes). code queryrequest request = queryrequest.newbuilder(sql) .setmaxwaittime(30000l) .setuselega

javascript - Angular2 intelliJ config error.. Cannot find module '@angular/core' -

Image
i new angular2. following tutorial angular2 example . first simple tutorial called guess-the-number i used code described in github provided example https://github.com/chandermani/angular2byexample/tree/master/guessthenumber . it loads fine in browser. intellij setup i'm having issues. intellij returning following error.. seen in screenshot. cannot find module '@angular/core' my properties file follows systemjs.config.js system.config({ map : { 'app': 'app', 'rxjs': 'https://unpkg.com/rxjs@5.0.0-beta.12', '@angular/common': 'https://unpkg.com/@angular/common@2.0.0', '@angular/compiler': 'https://unpkg.com/@angular/compiler@2.0.0', '@angular/core': 'https://unpkg.com/@angular/core@2.0.0', '@angular/platform-browser': 'https://unpkg.com/@angular/platform-browser@2.0.0', '@angular/platform-browser-dynamic': 'https://unpkg.c

reactjs - How to prevent both routes from being matched in react-router v4? -

if path /posts/new , both components postsnew , postsshow below rendered, , :id matched, id being word new instead of number: reactdom.render( ( <provider store={createstorewithmiddleware(reducers)}> <router> <app> <route exact={true} path="/" component={postsindex} /> <route path="/posts/new" component={postsnew} /> <route path="/posts/:id" component={postsshow} /> </app> </router> </provider> ), document.queryselector('#root') ); in app.js: <div> <h1>an awesome app</h1> {this.props.children} </div> how can /posts/new not matched twice? we call "ambiguous routes" , there's example on our site here . the switch component should solve this. reactdom.render( ( <provider store={createstorewithmiddleware(reducers)}> <router>

php - Permission denied. Laravel linux server -

when try register , send email user got error. working till yesterday. today gives me , cant figure out why. way on local testing work's. i'm stuck. please errorexception in compiled.php line 7512: file_put_contents(/var/www/html/storage/framework/views/53de219dee4f11a2db4f64a2c574ad02db5613f4.php): failed open stream: permission denied in compiled.php line 7512 @ handleexceptions->handleerror('2', 'file_put_contents(/var/www/html/storage/framework/views/53de219dee4f11a2db4f64a2c574ad02db5613f4.php): failed open stream: permission denied', '/var/www/html/bootstrap/cache/compiled.php', '7512', array('path' => '/var/www/html/storage/framework/views/53de219dee4f11a2db4f64a2c574ad02db5613f4.php', 'contents' => 'please activate account clicking on following link. <a href="<?php echo e(route('auth.activate', $token)); ?>"><?php echo e(route('auth.activate', $token)); ?

c# - SQL server where clause equals instead of IN -

this question exact duplicate of: linq equal instead of contains 3 answers here generated t-sql linq select [extent1].[id] [id], [extent1].[name] [name] [dbo].[hospital] [extent1] ( exists (select 1 [c1] ( select [extent2].[id] [id] [dbo].[hospitaldepartment] [extent2] [extent1].[id] = [extent2].[hospitalid] ) [project1] exists (select 1 [c1] ( select [extent3].[id] [id] [dbo].[unit] [extent3] [project1].[id] = [extent3].[hospitaldepartmentid] ) [project2] exists (select 1 [c1] [dbo].[device] [extent4] ([project2].[id] = [extent4].[unitid]) , ([extent4].[devicetypeid] in (10,20)) ) ) i need use equal instead

python - Pandas two dataframes multiplication? -

i have 2 data frames (a , b) a: column 1, column 2, column 3 0.1 0.5 0.7 b: row 1 5 row 2 6 row 3 7 how perform multiplication like (0.1)*5, (0.5)* 6, , (0.7)*7? in other words, how multiply value in first row of b value in first column of a, second row of b value in second column of b, , etc? you want multiply values without respect whether rows or columns. pd.series(a.values.ravel() * b.values.ravel()) 0 0.5 1 3.0 2 4.9 dtype: float64

node.js - How to check multiple conditions to be true or false using protractor ,so that it helps in validating input before click -

here code want check value of inputs nick_name , room_name before clicking button(createroom_btn).but not getting how check multiple conditions in single if statement using protractor. var nick_name = element(by.model('user.vcard.nickname')); var room_name = element(by.model('roomname')); var createroom_btn = element(by.tagname('button')); describe('protractor demo app', function () { it('should click on create room button', function () { condition = function () { return [ nick_name.getattribute('value').then(function (value) { return value.length > 0 }), room_name.getattribute('value').then(function (value) { return value.length > 0 }) ]; }; browser.wait(condition, 8000, "text still not present").then(function (resp) { }); //button click

c# - Populate routetable of wcf from database -

i want add end points dynamically routing table of wcf. code: [aspnetcompatibilityrequirements(requirementsmode = aspnetcompatibilityrequirementsmode.allowed)] public class personservice : ipersonservice { [webinvoke(uritemplate = "", method = "get")] public void getperson() { string k = "a"; } } [servicecontract] public interface ipersonservice { [operationcontract] void getperson(); } public class global : system.web.httpapplication { protected void application_start(object sender, eventargs e) { routetable.routes.add(new serviceroute("api", new webservicehostfactory(), typeof(personservice))); } } i have end points saved in database table below : /customer/{customer}/address /customer/{customer}/address/{address} now want populate routetable of wcf service hosted in iis environment , running. i ha

vba - I need to vlookup in a close book without opening it. But i only get #VALUE -

function csimplex(codigo string) dim rg range set rg = workbooks.open("c:\users\mvela\documents\prueba.xlsm").worksheets("simplex").range("a:z") csimplex = application.worksheetfunction.vlookup(codigo, rg, 3, false) end function you cannot refer closed workbook in vba, not vlookup, not evaluate. solution snap workbook open, return value close workbook. function csimplex(codigo string) variant dim wb workbook, rng range set wb = workbooks.open("c:\users\mvela\documents\prueba.xlsm", readonly:=true) set rng = wb.worksheets("simplex").range("a:z") csimplex = application.vlookup(codigo, rng, 3, false) wb.close savechanges:=false `<~~ close workbook! end function an .xlsb smaller otherwise identical .xlsm , load, retrieve , close faster. if large number of times, build static array of values , use that.

javascript - Connecting to Virtual COM port with node serialport on Windows -

i'm trying use node serialport ( https://www.npmjs.com/package/serialport ) connect virtual com port (usb001) in windows. is possible serialport? not appear in list returned serialport.list(). i've used serialport connect standard com ports on windows new serialport('\.\com2') - virtual com ports?

C# reset value in for loop(visual studio) -

int number =0; int [,] type = {{900, 750, 1020 }, {300, 1000, 2700 }, {500, 700, 2100 }, {400, 900, 1780 }, {600, 1200, 1100}, {575, 1150, 1900 }, {600, 1020, 1700 } }; int[] loot = {200,800,1100,600,900,300};enter code here (int row = 0; row < type.get length(0); row++) { (int column = 0; column < type.get length(1); column++) { first = type[row, column]; (int = 0; <= 5; i++) { if (loot[i] ==first) { number++; console.waterline("print"+number); }//end if else { }//end else }//end i'm trying match value type loot, find number accumulate after run want ask how reset number 0 every time run loop? bother me long time. advice to find count of m

Compare two lists in my python -

i have python function has input 2 variables so-called current_level , current_affect . function calculates rules using training data , rules can calculating decisions using 2 variables current_level , current_affect . code contained 2 lists list_a , list_b . lists contained following: list_a = [["'easy'", "'c'", "'4'", '0.714', '\n'], ["'easy'", "'d'", "'5'", '0.778', '\n'], ["'easy'", "'e'", "'5'", '0.500', '\n'], ["'easy'", "'f'", "'6'", '0.750', '\n']] list_b = [["'easy'", "'b'", "'2'", '1.000', '\n'], ["'easy'", "'c'", "'3'", '

api - return access token and user when authenticate passport laravel -

i want ask make me confused. create api laravel 5.4 , passport. api authorization password grant type. sample request this. $http = new guzzlehttp\client; $response = $http->post('http://your-app.com/oauth/token', [ 'form_params' => [ 'grant_type' => 'password', 'client_id' => 'client-id', 'client_secret' => 'client-secret', 'username' => 'taylor@laravel.com', 'password' => 'my-password', 'scope' => '', ], ]); return json_decode((string) $response->getbody(), true); this request send post /oauth/token and response this. { "token_type": "bearer", "expires_in": 3155673600, "access_token": "eyj0exaioijk...", "refresh_token": "lbxxgld2s..." } but want directly response authenticated user this, not twice request when login use

Display bill total, Java public void display() error -

i'm having trouble executing total bill display. asked professor gave me small block of code, modified meet needs, reason not executing , has error: illegal start expression line --> public void display(). the compiler suggests end semi colon don't believe accurate. what missing public void display() not being executed , erroneous? import java.util.scanner; public class coffeeshop { /* author: date: program: create coffee shop application uses while loop build customer order. coffee shops sells coffee ($3.25), espresso ($4.25), , tea ($2.75). coffee selection presents customer choices of iced (no charge), cream (50 cents), , sugar (50 cents). espresso selection presents customer choice of caramel (no charge) , chocolate (no charge) 1 shot (no charge) or 2 shots ($1.25) of espresso. once customer done, or receive bill of total price. after each selection, customer have choice of returning main menu additional purchases. use nested loops handle cu

java - I want to convert httpresponse to json object -

resp=callapi(protocol+"://"+host+":"+"5443"+"/webhook/tokens/",httpop.post, contenttype.json, credentials.tostring(), headers(headers)); string resp_body = entityutils.tostring(resp.getentity()); jsonobject jsobj = new jsonobject(resp_body); this throwing exception: org.json.jsonexception: jsonobject text must begin '{' @ character 1 because resp_body below : "{\"auth\":{\"token\":{\"id\":\"eyj0exaioijkv1milcjhbgcioijiuzi1nij9.eyjzdwiioiiyy2nkytm4nzvinjflodmymde1yjyxztg2yjfjmdazocisinjlznjlc2hfdg9rzw4ioijtrwu3turxl0twm1pqcfhna2lhstfnyzarn3p1rlfmdjjpb3oxs0xrd3jpdumwblc4r3dkv1rndhlqy2d0tvg3c3r4vxz0v3nxd3nnmzllagrvwdzmemerduzytvloafk3l29zrek2yudyvehcwk1undfvbxpxu2nktge2qno3m0q0vuc4mdlmshz0ohfsog1on1bpskeyc1y0strnrxp6nw5wdxcrbtq2zwp1mtj6yvpguwvrc2zobdbtcwfxyjrxnep2n1i5tvncmuztznnirkzcc2huceewymrjzkz0m0sznhgwoctfcworajlfmenrn2hxu3brck85ow1ld2s5reqrskfsu2h2mepuc21csfp0clbqdte5ctiwuul6cu5rs21

ios - How to delete cells in tableView with matching core data in swift 3? -

i have core data table named menu , have inside many items , have inside identity , show columns , have static nsmutabledictionary (allmenu) datas , want check menu items display in tableview nsmutabledictionary inside (identity) == core data menu table inside identity , show == true , "cellidentifier" == "menu" ones in allmenu data, try doesn't work codes under below. my coredata menu table; id string name string identity string show boolean my nsmutabledictionary table view menu data allmenu = [ [ "cellidentifier" : "menu", "id" : "1", "name" : "menu 1", "identity" : "m1", "show" : true ], [ "cellidentifier" : "menu", "id" : "2", "name" :

Capture the individual Eloquent Model event in Laravel 5.4 -

by default, laravel eloquent model fires following events : 'creating', 'created', 'updating', 'updated', 'deleting', 'deleted', 'saving', 'saved', 'restoring', 'restored' i using listing eloquent events using wildcard listener in appserviceprovider : /** * bootstrap application services. * * @return void */ public function boot() { \event::listen(['eloquent.*'], function ($a){ var_dump($a); }); } i getting nothing when dump $a . i know can capture events observable. there other ways this? this might little bit late answer question , prefer perform using event subscriber . you can have on it: https://laravel.com/docs/5.4/events#event-subscribers you need create event subscriber this: usereventsubscriber.php namespace app\listeners; class usereventsubscriber { /** * handle user created e

android - Default DatePicker & TimePicker label not localize -

Image
i'm using datepicker , timepicker . functionality works fine, when change language japanese "ok" label not translated. works fine in other language spanish. so there way? i native japanese speaker , believe "ok" correctly translated. "ok" translated "ok" japanese. most japanese people understand "ok" means , it's usual japanese people see label saying "ok" on phone. screen shot below ios facebook messenger app asking camera access on iphone (language set japanese). see label saying "ok". if japanese tap "ok", camera access allowed.

connection - unable to connect to local server in SSMS 2014 (SQL Server 2014) -

Image
i need run ssms own practice , create local database on machine. unable connect local server i have microsoft sql server 2014 installed. comes sql server management studio version 12.0.4100.1 i type server name (localdb)\v11.0 but getting error i tried searching server names clicking on 'browse more' option in drop down of ssms connection window, not find server mentioned there. i ran sql server configuration manager , went sql server services. there no items available there i tried running below command through command prompt net start sqlserveragent but gave 'server name invalid' error can suggest other steps debug , run local server thanks @ross bush , @wei_dba had installed setup sqlmanagementstudio_x86_enu.exe. didn't realize setup did not contain provision install db engine. ran installer sqlexprwt_x64_enu.exe. , while running setup, selected database engine services checkbox , installed. able connect local server. than

jquery - Can't fill text on a form inside a modal (materializecss) -

i've been trying populate form elements inside modal when opens can't seem it. been searching hours , can;t seem find proper answer. modal: <div id="editmodal" class="modal modal-fixed-footer"> <div class="modal-content row"> <div class="center-align"> <h4>update task</h4> <p><b>note:</b> can update task name , task type</p> </div> <form class="col s10 offset-s1" id="form" method="post"> <div class="input-field col s10 offset-s1"> <input id="edttaskname" type="text" class="validate" required> <label for="edttasknamelbl">task name</label> </div> </form> </div> <div class="modal-footer"> <a href=&quo

jsp - mysql data substraction from column of one table to column of another table -

i have 2 different table named 1. users 2. transaction , both table have 'amount' name column. i need subtract users-> amount column transaction-> amount column , store subtracted value users-> amount column. table structure: users have column: id(primary key),username,amount transaction have column: id (primary key),username,transaction_id,amount here want users.amount = users.amount - transaction.amount id of both table same. try following update query: update users t1 inner join transaction t2 on t1.id = t2.id set t1.amount = t1.amount - t2.amount this assumes that, said, id columns both tables identifies user. assumes want update every record in users table without restriction. if not, can add where clause update query.

hibernate - Oracle jdbc driver: Constraint [null] -

we using oracle 12c java/spring/hibernate rest application. ui guys forgot validate 1 of values on save not null, hibernate threw dataintegrityviolation. when happens locally, exception stack trace shows me actual constraint violated. on test server, exception shows constraint [null]. i remember having jump through seemingly ridiculous hoops download , integrate oracle jdbc driver maven. there similar hoops getting driver work on server? maven dependency: <!-- oracle 12c driver version --> <oracle.version>12.1.0</oracle.version> <dependency> <groupid>com.oracle</groupid> <artifactid>ojdbc7</artifactid> <version>${oracle.version}</version> </dependency> here partial stack trace: org.springframework.dao.dataintegrityviolationexception: not execute batch; sql [insert omg_table (omg_cd, created_by, created_dt, omg_difference, filerentry_omg, modified_by, modified_d

javascript - Vue.js mounted function not accessing component properties -

Image
i'm not new vue.js why feel i've been running mad morning :). while creating component, do, quite frequently, in case, had initialize google maps within mounted function, seems right place that. in mounted function, access id property of nested input field , attach event listener it. pretty simple right? well, figured when try use component multiple times on page, i'm somehow accessing same (seemingly shared) this variable within mounted function. not sure why happens and/or if it's feature make weirder, props yield correct values within template. (and within methods well) component definition <template> <div class="locationinput"> <input type="text" :id="id" /> </div> </template> <script> export default { name: 'locationinput', props: ['id'], mounted() { console.log('component object representation ==> ', this) console.log

Getting specific value from JSON in php from UPCitemdb API -

this question has answer here: how extract data json php? 2 answers i trying 1 attribute-value pair called title. this sample code website , returns whole json data. how return title , store string variable in php? <<?php $user_key = 'only_for_dev_or_pro'; $endpoint = 'https://api.upcitemdb.com/prod/trial/lookup'; $ch = curl_init(); curl_setopt($ch, curlopt_ssl_verifyhost, 0); curl_setopt($ch, curlopt_ssl_verifypeer, 0); curl_setopt($ch, curlopt_returntransfer, 1); curl_setopt($ch, curlopt_header, 1); curl_setopt($ch, curlopt_followlocation, 1); curl_setopt($ch, curlopt_maxredirs, 5); curl_setopt($ch, curlopt_httpheader, array( )); // http curl_setopt($ch, curlopt_post, 0); curl_setopt($ch, curlopt_url, $endpoint.'?upc=4002293401102'); $response = curl_exec($ch); $httpcode = curl_getinfo($ch, curlinfo_http_code); if ($httpcode

sql - REGEXP to insert special characters, not remove -

how put double quotes around 2 fields missing it? able use instr/substr/replace in 1 statement accomplish it? string := '"es26653","abcbeverages","861526999728",606.32,"2017-01-26","2017-01-27","","",77910467,"dorothy","","rapp","14219 pierce street, apt1","","omaha","ne","68144"'; expected string := '"es26653","abcbeverages","861526999728","**606.32**","2017-01-26","2017-01-27","","","**77910467**","dorothy","","rapp","14219 pierce street, apt1","","omaha","ne","68144"'; please suggest! thank you. this answer not work in case, because fields contain commas. leaving in case helps else. one rather brute force method internal fields is:

hosts - Using custom hostnames for docker local development containers -

i playing around docker windows (just starting out) , have simple docker-compose.yml works great: version: '2.1' services: db: image: mysql:latest container_name: wordpresslab_db volumes: - db_data:/var/lib/mysql restart: environment: mysql_root_password: wordpress mysql_user: wordpress mysql_database: wordpress mysql_password: wordpress phpmyadmin: image: phpmyadmin/phpmyadmin container_name: wordpresslab_phpmyadmin volumes: - /sessions ports: - "8090:80" depends_on: - db wordpress: image: wordpress:latest container_name: wordpresslab_wordpress volumes: - ./:/var/www/html ports: - "8080:80" depends_on: - db restart: environment: wordpress_db_host: db:3306 wordpress_db_password: wordpress volumes: db_data: once run docker-compose -d creates containers database

html5 - Creating objects in javascript as functions - and control them with arrow keys in game -

i trying make simple "game" in html5 (mainly javascript), move ball around. i create ball (which can moved arrow keys) drawing circle on canvas. possible, or approach simpler? i create function, have means selecting ball. anyways, able draw triangle, not circle. code: var canvas = document.getelementbyid("mycanvas"); var ctx = canvas.getcontext("2d"); canvas.width = canvas.height = 500; function circle() { // circle - doesnt show ctx.beginpath(); ctx.arc(50, 50, 25, 0, math.pi * 2, true); ctx.fillstyle = "blue"; ctx.fill(); } cicle(); function drawtriangle() { // triangle - works ctx.beginpath(); ctx.moveto(200, 100); ctx.lineto(170, 150); ctx.lineto(230, 150); ctx.closepath(); // fill color ctx.fillstyle = "rgba(255, 204, 0, 1)"; ctx.fill(); } drawtriangle(); can figure, why circle doesn't appear? important: circle appears perfectly, wh

microsoft ajax minifier - AjaxMin stops after @media in css -

i added step in build task in vs2010 minify css , jss ajaxmin. minify messes css because when reaches @media tag stops. there no errors in build output. basically @ point in css: .dropdown-submenu > ul {margin-left:20px;} @media (min-width:768px) { .blurb {margin:0 25px 25px 25px;} } in minifies .dropdown-submenu>ul{margin-left:20px}@media and done. there lot more css after @media tag, looks minifier stops. this first time using minifier, not sure if missing, or happening? thanks what version of ajax minifier using? seems problem fixed in version 5.7 https://ajaxmin.codeplex.com/workitem/20611

sails.js - Ng-include doesnt work in Sails Js -

i have problem ng-include. in layout.ejs have de html ng-app code: homepage.ejs: <div class="slide"> <div class="container" ng-controller="slide"> <h1 class ="main-title"> equipo mate </h1> <ng-include src ="'partial.html"></ng-include> </div> </div> angular.js: angular.module('app',[]) .controller('slide', function($scope){ }); and partial.html, have "hello world" this error: angular.js:12410get http://localhost:1337/partial.html 404 (not found) somebody can me? angularjs client side framework. <ng-include src ="'partial.html"></ng-include> which means, line executed in browser , angular tries http://localhost:1337/partial.html include in view. now have ensure partial.html available @ (or public path). you should put partial.html inside assets

how to search by foreign key in algolia instant search? -

suppose, have 5 countries , there 10 cities in each country , again, there 20 different places in each city.there 3 tables in rdbms , thing want implement search using algolia instant search js. can please tell me, how can achieve search like, when search or filter 1 country , search results show places of particular country. tables needs indexed in algolia? create 1 algolia record each place. inside of document, should include attributes of city , country you'd search on (city.name, country.name, etc).

jquery - Class toggles but re-attaches itself after the animation and class removal completes -

i'm trying create design click on box, it'll slide view more content, , when click arrow, it'll return. the problem this: $(boxes).one('webkitanimationend mozanimationend msanimationend oanimationend animationend', function() { boxes.parent().css({ 'height' : '0', 'opacity' : '0', 'overflow' : 'hidden' }); fboxcontentcover.css({ 'height' : 'auto', 'opacity' : '1', }); fboxcontentcover.removeclass('fadeoutleft').addclass('animated bounceinright'); }); $(fboxcontentcover).one('webkitanimationend mozanimationend msanimationend oanimationend animationend', function() { fboxcontentcover.css({ 'height' : '0', 'opacity' : '0'

I wrote a python script to dedupe a csv and I think it's 90% working. Could really use some help troubleshooting one issue -

the code supposed find duplicates comparing firstname, lastname, , email. duplicates should written dupes.csv file, , uniques should written deduplicated.csv, not happening.. example: if row shows in orginal.csv 10 times, code writes a1 deduplicated.csv, , writes a2 - a10 dupes.csv. this incorrect. a1-a10 should written dupes.csv file, leaving unique rows in deduplicated.csv. another strange behavior a2-a10 getting written dupes.csv twice! i appreciate , feedback first professional python script , i'm feeling pretty disheartened. here code: import csv def read_csv(filename): the_file = open(filename, 'r', encoding='latin1') the_reader = csv.reader(the_file, dialect='excel') table = [] #as long table row has values add table row in the_reader: if len(row) > 0: table.append(tuple(row)) the_file.close() return table def create_file(table, filename): join_file = open(filename, 'w+

java - com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of TestAcceptanceCriteria out of START_ARRAY token -

given following json file: [ {"name":"test_12345_54321", "acceptancecriteria": [ { "given":"i developer", "and":"i have test case write", "when":"i run test", "then":"i report generated details." } ] }, {"name":"test_2", "acceptancecriteria": [ { "given":"i developer test 2", "and":"i have test case write test 2", "when":"i run test test 2", "then":"i report generated details.2" } ]

customizing sankey plot in r using rcharts -

Image
i trying build sankey chart application similar 1 shown at https://www.r-bloggers.com/generating-sankey-diagrams-from-rcharts/ here sankey plot numbers 24407... , 8450... source , target , customer... sector i build sankey chart sector in middle , source , target on either side of chart here code followed group topics data frame has columns source, target, value, sector grouptopics$source<-as.character(grouptopics$source) grouptopics$target<-as.character(grouptopics$target) grouptopicstemp<-aggregate(value~sector+source,grouptopics,sum) colnames(grouptopicstemp)<-c('source','target','value') gruptopicsa<-subset(grouptopics,select = c('source','target','value')) grouptopicsb<-rbind(grouptopicstemp,gruptopicsa) sankeyplottopics <- rcharts$new() sankeyplottopics$setlib('http://timelyportfolio.github.io/rcharts_d3_sankey/libraries/widgets/d3_sankey') sankeyplottopics$set( data = grouptopicsb,

java - Spring social - Exception while completing OAuth 2 connection: Authorization is required for the operation, -

i composing spring-social. when click / signin / facebook button: exception while completing oauth 2 connection: org.springframework.social.missingauthorizationexception: authorization required operation, api created without authorization. i have encountered error. result of debugging, facebook access token seems received. an error occurs in part after normal login of facebook. connectsupport class: accessgrant accessgrant = connectionfactory.getoauthoperations().exchangeforaccess(code, callbackurl(request), null); this composition. socialconfig: @inject private datasource datasource; @autowired userrepository userrepository; @autowired postsocialsigninadapter postsocialsigninadapter; @override public useridsource getuseridsource() { return new cuseridsource(); } @override public void addconnectionfactories(connectionfactoryconfigurer cfconfig, environment env) { string appkey = "4123213121231231212331"; string appsecret = "5

bash - egrep output doesn't forward all lines to file -

i trying compose command monitor stability of script on server curling every couple of minutes (actual path script replaced): while :; date +"%t" >> monitor.txt; time curl -is http://googel.com | egrep "http|m.\." >> monitor.txt; echo ================ >> monitor.txt; sleep 30; done the problem reason part of output not forwarded file monitor.txt. file contains following lines: $ cat monitor.txt 19:39:10 http/1.1 301 moved permanently ================ 19:39:40 http/1.1 301 moved permanently ================ ..while time details go default output: $ while :; date +"%t" >> monitor.txt; time curl -is http://googel.com | egrep "http|m.\." >> monitor.txt; echo ================ >> monitor.txt; sleep 30; done real 0m0.075s user 0m0.005s sys 0m0.003s real 0m0.106s user 0m0.004s sys 0m0.005s could please point out, missing here? run command in background , check monitor.txt results.

ruby on rails - Passing large data sets between forms? -

i'm trying build step step form transforms large sets of data in batches. want have data saved database on last step. way i've seen create forms save data in session storage. session[:stored_data] = large_dataset but gives me cookieoverflow error when trying save it. what other options? stuck saving data database between steps? you store in form itself. on first form might have... <%= f.text_field :name_of_dog %> ...and on second form store first form's fields in hidden field. <%= f.hidden_field :name_of_dog %> this way carry data through subsequent forms , when final form submitted, have complete data need persist database. i single db records amount of information may overwhelming end user or when you're displaying limited amount of record data per page (say, because you're in iframe). i have attr_accessor called :page when create or edit action called know page has submitted.

php - Why sql cannot see the column? -

Image
unknown column 'ft_template' in 'field list for reason, happens. print whole request , copy. it's works if execute manually. in case of php got error. it's here but update `portal_settings` set `ft_template`='123' `id` = 1; didn't work. there work. in php not. copy paste , see if works: "update portal_settings set ft_template='123' id = 1"

jquery - using only one <div> tag or a single <header> tag to cycle through background images using fadeIn() -

does have solution using 1 tag or single tag? solutions uses 2 div tags: <div id="background1"></div> <div id="background2"></div>. cycle through background images using fadein() checkout stretch. nifty library maybe alternative you're writing. http://www.jquery-backstretch.com/

kubernetes - custom metrics with HorizontalPodAutoscaler on GKE -

i'm trying set custom metrics horizontalpodautoscaler on 1.6.1 alpha gke cluster. according https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#prerequisites need set --horizontal-pod-autoscaler-use-rest-clients on kube-controller-manager enable metrics collection. gke, it's not clear whether it's possible set flags on kube-controller-manager . ideas? has gotten custom metrics working hpa on gke? you can't manipulate of kubernetes cluster component directly in gke(google container engine), google job, if want achieve may need deploy own kubernetes cluster.

c# - LINQ: How Can I Use Equals in query -

i need use equals method or similar instead of using contains method because want search in database exact values in selecteddevicetypeids array not of it. ienumerable<guid> selecteddevicetypeids = devicetypeids .split(',') .select( guid.parse ) .asenumerable(); query = query .where( j => j.hospitaldepartments.any( jj => jj.units.any( m => m.devices.any( w => selecteddevicetypeids.contains( w.devicetypeid ) ) ) ) ); here full code: public httpresponsemessage getavailablehospitalsbyajax(system.guid? directorateofhealthid = null, system.guid? unittypeid = null, string devicetypeids = null) { context db = new context(); var query = db.hospitals.asqueryable(); if (devicetypeids != null) { ienumerable<guid> selecteddevicetypeids = devicetypeids.split(',').select(guid.parse).asenu

typescript - Angular CLI AOT build error cache? -

i have angular (2) app failing build using aot compiler. what's strange nuked component error , rebuilt ground adding 1 line @ time trace issue (the aot error useless). rebuilt error appeared, removed last thing added , reason error persisted. went far take component way basic structure provided angular cli error message persisted. idea what's happening? see below component in it's current does-nothing state throwing following error: error in /path_removed/$$_gendir/app/dashboard-chart/dashboard-chart.component.ngfactory.ts (49,9): supplied parameters not match signature of call target. using build command ng serve --aot --prod dashboard-chart.ts import { component, oninit, onchanges, input, viewchild, elementref, viewencapsulation } '@angular/core'; @component({ selector: 'dashboard-chart', templateurl: './dashboard-chart.component.html', styleurls: ['./dashboard-chart.component.css'], encapsulation: viewencapsulation.