Posts

Showing posts from June, 2013

smtp - send email error : Error 550, User account support@mydomain.com has sent too many emails -

i have forum, base on php (for many years). 1 user pointed out in recent days, email sending system not work properly. went cpanel (in host) , tried send email (with squirrelmail or roundcube). but in squirrelmail, when send email, see following error : (( requested action not taken: mailbox unavailable 550 user account support@mydomain.com has sent many emails )) and in roundcube : (( smtp error (550): failed add recipient "example@yahoo.com" (user account support@mydomain.com has sent many emails). )) i've never sent spam e-mails , website ip not on blacklist emails. created new email accout (with no special restrictions), faced same error. that means point blank host trying send to, has blocked server. spam complaints or other abuse issues, or because server misconfigured. need contact host in question ask why have decided block server. should check see if server has been blacklisted. site use check is: mxtoolbox.com on message, providers pu

elasticsearch - How do I index hierarchical data in elastic search? -

i have data similar file paths index in elasticsearch. (basically list of tokens separated delimiter) ex data: a/b/c/d/e a/b/c/ a/m/n x/y/z once index, should able query immediate children given token shown below. for prefix of a, immediate children [b, m] prefix of x, immediate children [y] tokens @ root [a,x] have considered parent-child relationship? parent-child docs indexed such you'd able query following { "query": { "has_parent": { } } { "query": { "has_child": { } }

php - Why is form-getData() empty? (Symfony2) -

there html form, whish contains email , password field. send controller action using post. it works, if access inputs using $request->request->get('email') this code doesn't works. $data empty object reason: $form = $this->createformbuilder() ->add('email', 'email') ->add('pass', 'text') ->getform(); $form->handlerequest($request); $data = $form->getdata(); return new response('email: '.$data['email']); try this: $form->get('email')->getdata(); in twig template: <form action="{{ path('path-to-controller') }}" method="post"> {{ form_widget }} <input type="submit" value="send"/> </form>

Kubernetes-Mesos: building problems -

i following instructions on: http://kubernetes.io/docs/getting-started-guides/mesos/#deploy-kubernetes-mesos git clone https://github.com/kubernetes/kubernetes cd kubernetes export kubernetes_contrib=mesos make -bash-4.2$ pwd ~/kubernetes -bash-4.2$ ls api contrib federation makefile release build contrib.md godeps makefile.generated_files test changelog.md contributing.md hack _output third_party cluster design.md hooks pkg vagrantfile cmd docs license plugin vendor code-of-conduct.md examples logo readme.md www -bash-4.2$ make make: *** no rule make target `/*.go', needed `_output/bin/deepcopy-gen'. stop. do need before make or something?

php - How to get Double Buttons to "fire" in Bootstrap -

i have bootstrap form double buttons (2) shown below. the submit button fires , returns processing page (i.e., ['php_self']) however, cancel button nothing how can both buttons fire , return processing page? <form class="form-horizontal" method="post"> <fieldset> <legend>my form<</legend> <div class="form-group"> <label class="col-md-4 control-label" for="submit"></label> <div class="col-md-8"> <button id="submit" name="submit" class="btn btn-primary" value="1" type="submit">update profile</button> <button id="cancel" name="cancel" class="btn btn-default" value="0" type="submit">cancel update</button> </div> </div> </fieldset> </form> appended (per threaded comment @fred): added type="

javascript - How to include files from definitely typed in an Angular 2 project -

i'm working on angular 2/node.js app , i'm trying install typings project. when run server , start typscript compilerm following log: bash-3.1$ npm start > support-dashboard@1.0.0 start c:\mean_project > concurrently "npm run tsc:w" "node server.js" [1] magic happens on port 8080 [0] [0] > support-dashboard@1.0.0 tsc:w c:\mean_project [0] > tsc -w [0] [0] node_modules/angular2/platform/browser.d.ts(78,90): error ts2304: cannot find name 'promise'. [0] node_modules/angular2/src/core/application_ref.d.ts(38,88): error ts2304: cannot find name 'promise'. [0] node_modules/angular2/src/core/application_ref.d.ts(92,42): error ts2304: cannot find name 'promise'. [0] node_modules/angular2/src/core/application_ref.d.ts(151,33): error ts2304: cannot find name 'promise'. [0] node_modules/angular2/src/core/change_detection/differs/default_keyvalue_differ.d.ts(23,15): error ts2304: cannot find name 'map'. [0] no

Asp.net core publish no longer creates shell scripts -

i had similar problem questions asked here asp.net core publish , have followed answers , got asp.net core web app publish seems unlike earlier version no longer creates shell , cmd scripts did before when --no-source used dotnet publish. there anyway back? no, they're gone. don't need them anymore, should able start project via dotnet.exe or mac/linux equivalent.

admob - iOS: Wrong instruction in installing Google Mobile Ads SDK? -

i'm following tutorial put google ad on page: https://firebase.google.com/docs/admob/ios/quick-start at step: gadmobileads.configurewithapplicationid("ca-app-pub-8123415297019784~8909888406"); and error occurred: appdelegate.swift:58:9: type 'gadmobileads' has no member 'configurewithapplicationid' and after checking, see there no member configurewithapplicationid . what's wrong instruction? , why have install firebase/core in version? here methods in gadmobileads, there no configurewithapplicationid objective c version. how stupid http://i.imgur.com/od0vkpg.png remove cocoapods line instruction , replace line: pod 'google-mobile-ads-sdk' it install google sdk version 7.9.0 , you'll see configurewithapplicationid method. error google swift.

java - Local variable log defined in an enclosing scope must be final or effectively final -

i'm new lambda , java8. i'm facing following error. local variable log defined in enclosing scope must final or final public javardd<string> modify(javardd<string> filteredrdd) { filteredrdd.map(log -> { placeholder.foreach(text -> { //error comes here log = log.replace(text, ","); }); return log; }); return null; } the message says problem is: variable log must final (that is: carry keyword final) or final (that is: assign value once outside of lambda). otherwise, can't use variable within lambda statement. of course, conflicts usage of log. point is: can't write external within lambda ... have step , other ways whatever intend do. in sense: believe compiler. , side node: instead of posting error message here; try first google (that called "prior research" , expected do).

javascript - Using gulp with request -

i have following gulpfile.js : 'use strict'; const gulp = require('gulp'), request = require('request'); const paths = { vendor: [ 'https://raw.githubusercontent.com/jquery/jquery-dist/master/dist/jquery.min.js', 'https://raw.githubusercontent.com/kenwheeler/slick/master/slick/slick.js' ] }; gulp.task('vendor', (res) => { const url = request.get(paths.vendor).pipe(res); return gulp.src(url) .pipe(gulp.dest('public/vendor')); }); gulp.task('default', gulp.parallel('vendor')); i'm getting following error: error: options.uri required argument with method trying dicthing client-side package managers, bower. there way use request gulp , looping through list of object? edit: i placed code testing, returning first line loop: gulp.task('vendor', () => { (let i=0; i<paths.vendor.length; i++) { return console.log(paths.vendor[i]); }; }); just

SIMULINK: Managing (saving) variable state in embedded matlab function -

each time matlab function called stateless, have values of input variables. how manage state (i.e., values of variables) between cycles? example, on step 100 made calculation, need use on step 200. have used global variables, not supported. this persistent variables for. see >>doc persistent more information, want following function y = fcn(u) %define persistent variables persistent b c % initialize persistent variables (at t=0) if isempty(a) = 1; b = 10; c = 12; end % update variables = a+7; b = b+4; % update out y = u + + b + c;

java - CountDownTimer not working at all -

i trying run countdowntimer inside thread, won't work.. so in mainactivitys oncreate start on button click that: public void onclick(final view v) { log.d("main", "onclick"); runonuithread(runner); } runner instance of class implements runnable : private countdownlatch donesignal = new countdownlatch(1); @override public void run() { log.d("wr", "run"); this.countdown(20); log.d("wr", "waiting"); try { donesignal.await(); } catch (final interruptedexception ex) { log.e("wr", ex.getmessage(), ex); } log.d("wr", "waited"); } private void countdown(int time) { final countdowntimer timer = new countdowntimer(time * 1000, 1000) { @override public void ontick(final long millisuntilfinished) { log.d("wr", "ontick"); } @override public void onfinish() {

clang - Undefined reference to symbol __cxa_free_exception@@CXXABI_1.3 -

using clang link program fails: /usr/bin/x86_64-pc-linux-gnu-ld: stackoverflow.o: undefined reference symbol '__cxa_free_exception@@cxxabi_1.3' like gcc, have use clang++ link c++ programs

Active Record/Ruby on Rails -> Delete image by click on link: Set attachment columns to NULL via -

i not sure how this. have table called "animals". can add image display animal. i use statement in form-view changing image: f.file_field :attachment, :accept => 'image/jpeg' when submit form got nice looking image in show-view. like said, can change image, not know how delete it. in perfect world prefer, press link , image gets deleted, rest of animals attributes stay alife, following columns set null , file gets deleted server: "attachment_file_name" "attachment_content_type" "attachment_file_size" "attachment_update_at" (should set current date, or set null) any apreciated. if using paperclip gem need set attachment nil , save. this: @animal.attachment = nil @animal.save more info here in case, if want add link remove, create route , action this. i suggest adding checkbox nearby file field , verify @ update/create.

c# - Why is this access token invalid instantly? -

scenario: created google+ sign-on button user log in. works. saved access token , printed out on index/home page make sure access token exists. works. attempt use same token authorize user account (mine in case) make authorized calls google apis. keeps responding "invalid_token". so, why token invalid request made after save , print out access token page? calling wrong uri or providing wrong parameters? access token created response below see, includes status code, reasonphrase, requestmessage, headers, , content: google response: unauthorized - unauthorized - method: get, requesturi: ' https://www.googleapis.com/consumersurveys/v2/surveys?key= {my_api_key}', version: 1.1, content: , headers: { accept: application/json authorization: bearer abcdefghijklmnopqrstuvqxyz123456789 } - vary: x-origin, origin, accept-encoding x-content-type-options: nosniff x-frame-options: sameorigin x-xss-protection: 1; mode=block alternate-protocol: 443:quic alt-svc: quic=

sprite kit - GKGraph GKGraphNode GKGridGraphNode, what's relationship for them? -

Image
i've read document still confused of them, guy can give me explaining, e.g.any image comparison? thanks. the wikipedia article on pathfinding might help, might related topics on graphs , graph search algorithms linked there. beyond that, here's attempt @ quick explainer. nodes places can be, , connections other nodes define can travel between places. together, collection of (connected) nodes form graph. gkgraphnode general form of node — these nodes don't know in space, connections other nodes. (that's enough basic pathfinding, though... if have graph connected b , b connected c, path c goes through b regardless of nodes located, below.) gkgraph collection of nodes, , provides functions work graph whole, the important 1 finding paths . gkgridgraphnode , gkgraphnode2d specialized versions of gkgraphnode add knowledge of node's position in space — either integer grid space (like chessboard) or open 2d space. once you've added kind of i

Exactly wait for a timer overflow on the MSP430 -

is there easy way wait timer overflow on msp430? the timer overflow interrupt little late , not exact, depending on timing of executed instruction. waiting loop doesn't snap on single system cycle either. so guess 1 schedule compare interrupt before timer overflows , cpu based wait until timer hits 0. instructions use for? possible c code only?

html - Get Different Images from one URL -

for example, http://placeimg.com/640/480/people is 1 url. if reload page, comes new image. website has background image, , want random image of 2 images: http://bit.do/bgimage1 http://bit.do/bgimage2 how can achieve this? , calling of image in css. in javascript function setrandomimg(){ var items = ['url','url'] var item = items[math.floor(math.random()*items.length)]; document.getelementbyid(id-of-your-body/container).style.background-image='url('+item+')' } and add onload container (example <body onload='setrandomimg()'> )

java - How to design my messaging application to be compliant with Spring Integration Framework? -

Image
i have messaging application working not designed in elegant way (please, see image). manager fan of spring integration, suggests me change application according spring integration pattern (version 3). sending use ledgermessage serialized spring simplemessageconverter , sent in client spring amqp template. as 1 can see in diagram sending ledgermessage originated in several places, , content of message different. once message received sender have several options process message based on value of long orderid. choosing processing method based on ordereid not elegant way, because if orderid positive used further processing. in case of errors use log4j log error. theoretically can send email informing error. also, can send email informing end of batch operations taking long time. so, suggestion, graphical presentation appreciated.

python - pygame crash right after taking an action -

im new @ python, problem @ code silly one. right after image of player moving, window of pygame crashing without error message @ idle. im using python 2.7. here's code: import pygame,sys pygame.locals import * pygame.init() dis=pygame.display.set_mode((1084,638),0,32) pygame.display.set_caption('ledders , snakes') fps=30 fpsclock=pygame.time.clock() white=(255,255,255) img=pygame.image.load('smal.gif') bg = pygame.image.load("under.gif") cax=150 cay=150 di='right' flag=true while flag: dis.blit(bg, (0, 0)) if di=='right': cax+=10 cay-=10 if cax==280: di='down' elif di=='down': cay+=10 cax+=10 if cax==410: flag=false dis.blit(img,(cax,cay)) event in pygame.event.get(): if event.type==quit: pygame.quit() sys.exit() pygame.display.update() fpsclock.tick(fps) i through progr

javascript - Unable to bootstrap angular 2 app -

i'm working on app in angular 2/ nodejs , i'm trying bootstrap application. i've defined root component in app.component.ts : import {component} 'angular2/core'; @component({ selector: 'pm-app', template:`<div><h1>{{pagetitle}}</h1> <div>my first component</div> <div>` }) export /** * name */ class appcomponent { //constructor(parameters) {} pagetitle: string = "acme product managment"; } and when app loads, page title should injected index.html page in <pm-app> tag: (index.html) <html> <head> <title>angular 2 quickstart</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href= "node_modules/bootstrap/dist/css/bootstrap.css" rel= "stylesheet" /> <link rel="app/app.co

visual studio - How to disable test name too long warnings? -

i'm using xunit theory , automoqdata attribute generate test values, , causing test functions signatures long apparently. test explorer shows test function names, in console output see lot of these: contents of string 'test name ...' exceeds max of '449', string has been truncated. they might hide other more important warnings, there way prevent these appearing? example test: [<theory; automoqdata>] member this.``test name bla bla bla`` logger uri credentials jsonstring = ...

c# - Chrome Postman add a certificate to the request sent to a service -

is possible pass certificate in request being sent postman? need postman send request service when service receives httprequestmessage(request) , request.getclientcertificate(), certificate being sent postman request. i noticed if enter https url, postman gives pop-up certificates installed on computer, allows select certificate , attach request. service received request able request.getclientcertificate() , certificate in request.

Linux Ubuntu and Symfony cache directory -

after composer install symfony cache:clear , lose permission in app/cache directory , must execute chmod 777 command again. this should connected ownership of directory or? the problem here is, executing composer current user lets symfony create cache-files user , not www-data user (or whatever user webserver configured). try running composer install / bin/console webserver's user, eg. sudo -u www-data bin/console cache:clear / sudo -u www-data composer install . regards

r - Removing all columns with a name on the fly -

i'm using read_excel speed , simplicity import excel file. unfortunately, there's yet no capability of excluding selected columns won't needed data set; save effort, naming such columns "x" col_names argument, easier trying keep track of x1 , x2 , , on. i'd exclude such columns on fly if possible avoid step of copying, in pseudocode: read_excel("data.xlsx", col_names = c("x", "keep", "x"))[ , !"x"] we can use sample data set included readxl package illustration: library(readxl) df <- read_excel(system.file("extdata/datasets.xlsx", package = "readxl"), col_names = c("x", "x", "length", "width", "x"), skip = 1l) the approaches i've seen work don't work on fly, e.g., having stored df , can do: df <- df[ , -grep("^x$", names(df))] this works requires making copy of df storing it, o

javascript - Google Maps SVG marker with animation -

can’t svg animate marker on google maps <svg width="120px" height="120px" viewbox="0 0 120 120" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g fill="none" fill-rule="evenodd" stroke-width="1" stroke="black" stroke-opacity="0.3"> <circle cx="50" cy="50" r="50"> <animate attributename="r" begin="0s" dur="3s" values="0;50" keytimes="0;1" keysplines="0.1,0.2,0.3,1" calcmode="spline" repeatcount="indefinite"></animate> <animate attributename="stroke-opacity" begin="0s" dur="3s" values="0;.3;.3;0" repeatcount="indefinite"></animate> </circle> <circle cx="50" cy="50" r

checking goodness of fit for Gompertz distribution in R -

i know how check weibull , exponential using fitdistr , ks.test. but don't work gompertz. i think need use maxlik , rgompertz , ks.gompertz don't understand how use maxlik find estimates of alpha , theta. i found in maxlik pdf: estimate parameter of exponential distribution t <- rexp(100, 2) loglik <- function(theta) log(theta) - theta*t gradlik <- function(theta) 1/theta - t hesslik <- function(theta) -100/theta^2 estimate analytic gradient , hessian <- maxlik(loglik, gradlik, hesslik, start=1) summary( ) how change gompertz?

postgresql - Redshift count number of Mondays in a given time range -

i want use redshift count number of mondays in given time range. i've tried using date_part, returns day of week. can't use simple count there multiple instances on same day. if have dates table reference can use following code select count(distinct my_table.date) my_table date_part(dow,my_table.date)=1 , my_table.date between '2015-01-01' , '2016-01-01' in case query count mondays during 2015, you can change dates range the day week . date_part(dow,my_table.date)=1 -- monday date_part(dow,my_table.date)=2 -- tuesday and on if don't have dates table , should create cartesian product

css - Is this the most efficient way of dead centering a div? -

#outer { display:table; position:absolute; height:100%; width:100%; } #middle { display:table-cell; vertical-align:middle; } #inner { margin:50px auto 50px auto; width:600px; } <body> <div id="outer"> <div id="middle"> <div id="inner"> dead centered onto screen </div> </div> </div> </body> is efficient, or accepted, way of dead centering div in middle of screen? ask because using tables tabular data, architecting interface, frowned upon. use css transforms or flexbox. option 1: css (2d) transforms. global support: 90.8% . trick position element 50% top , left, , offset own dimensions, half, in opposite direction. drawback of method might lead fuzzy text rendering because of subpixel translations. body { margin: 0; padding: 0; } .wrapper { background-color: #eee; min-height: 10

replication - MySQL : Timestamps replicating inconsistently depending on local timezone of server? -

can explain mysql 5.5 handling of replication between 2 servers. this structure of 1 of table. id int(10) unsigned not null primary key default 'null' auto_increment kot_no varchar(45) not null default 'null' emp_id int(10) unsigned not null foreign key default '0' description varchar(45) null default 'null' created_date timestamp not null default '0000-00-00 00:00:00' created_by int(10) unsigned not null default '0' modified_date timestamp not null default 'current_timestamp on update current_timestamp' modified_by int(10) unsigned null default '0' state tinyint(1) unsigned not null default '1' in database every table has last 5 columns , binlog format statement based replication when i'm executing insert kot (kot_no, emp_id, created_date) values (1, 1, now()) on server these results on 2 servers. on server a id kot_no emp_id description created_date created_by modified_date

python - Django Migrations - how to insert just one model? -

i made mess in local django project , realized somehow i'm out of sync migrations. tried apply initial , realized of tables exist, tried --fake . made migration pass, i'm missing 1 table wanted add... how can prepare migration 1 model or make django re-discover database missing , create that? i using models directory. adding import of model __init__.py allowed me control whether it's visible makemigrations or not. found using strace .

MAX() in ORACLE SQL -

i have table stores list of records maintenance tasks have been done , date , time done. i'm trying sub-query pull out records each task has recent date. sql statement is: select "engineering_compliance"."eo" "eo", "engineering_compliance"."ac" "ac", "engineering_compliance"."pn" "pn", "engineering_compliance"."pn_sn" "pn_sn", "engineering_compliance"."hours_reset" "hours_reset", "engineering_compliance"."minutes_reset" "minutes_reset", "engineering_compliance"."cycles_reset" "cycles_reset", "engineering_compliance"."reset_date" "reset_date", "engineering_compliance"."reset_hour" "reset_hour", "engineering_compliance"."reset_minut

how do you subset data frame beteen times in R -

i have data frame called df: structure(list(date = structure(c(1468555240, 1468555242, 1468555246, 1468569649, 1468555251, 1468555257, 1468641020, 1468641021, 1468641021, 1468641021, 1468641021, 1468641021), tzone = "", class = c("posixct", "posixt")), scpu = c(7.28602, 9.49307, 7.70778, 8.51675, 6.97994, 8.46983, 4.14684, 2.51154, 3.27359, 1.84363, 2.47815, 3.29061 )), .names = c("date", "scpu"), row.names = c(na, -12l), class = "data.frame") i data points between 12 noon 23:59, midnight. don't want data points after midnight 12 noon. how in r? i've tried creating time column called t , did this: subset(df, t<times(c("23:59:00"))&t>times(c("12:00:00")) 04:00 still shows on final subsetted data, ideas how this? this should it: library(lubridate) dfsub <- df[hour(df$date)>11,] however, data has no values in time range. here's working example new

How to show Google Places reviews on company website? -

there used simple way embed reviews company , display them on company's website. google has removed feature , have no idea how work without manually copying/pasting text , hard-coding on page. find regarding outdated source. so, how 1 go getting own reviews on own site google? if owner of place in google business, can retrieve reviews place via google business api. please have @ documentation: https://developers.google.com/my-business/content/review-data hope helps!

Process non-ascii characters such as pound in python -

this question has answer here: decoding utf-8 strings in python 2 answers i wanna process sentence such as: "the gift costs £100" the sentence in text file. read in python , when print get: print "text",text text gift costs £100. i tried replace code (and when finish processing use function unmapstrangechars original data): def mapstrangechars(text): text = text.replace("£","1pound1 ") return text def unmapstrangechars(text): text = text.replace("1pound1 ","£") return text but error saying £ not acii character. how can fix it? it helpfull learn @ least how cound replace non acii char specific char, recover letter. example: original:the gift costs £100. copy1: gift costs 11pound11 100. output: gift costs $100. output actually: print text whole code(in txt file says

c - custom memstr (strstr) speed optimisation -

i writing routine find string within specified block of memory in embedded (arm cortex m0 @16mhz) application , wondering why 2 different versions have written run @ different speeds. char* memstr(char* mem, uint32_t n, char* str) { if( (str[0] == '\0') || (n == 0) ) return null; uint32_t = 0; char* max_mem; max_mem = mem + n; while( mem < max_mem ) { if( *mem != str[i] ) { mem -= i; = 0; } else { if(str[i+1] == '\0') return mem - i; i++; } mem++; } return null; } char* memstr2(char* mem, uint32_t n, char* str) { if( (str[0] == '\0') || (n == 0) ) return null; uint32_t c = 0; uint32_t = 0; while( c < n ) { if( mem[c] != str[i] ) { c -= i; = 0; } else { i++; if(str[i] == '\0') return &mem[c - + 1]; } c++; } retur

html - Automatically Embed Youtube Videos -

i'm looking way automatically embed youtube videos solely based on youtube urls, rather having go video, click share, click embed, , copy-paste html code site. an example: the youtube video https://www.youtube.com/watch?v=dqw4w9wgxcq (warning: rick roll) when click share --> embed --> code given <iframe width="560" height="315" src="https://www.youtube.com/embed/dqw4w9wgxcq" frameborder="0" allowfullscreen></iframe> notice how placed embed in there , altered lot of url i have 100s of videos need for, going in , manually editing them isn't going work out. is there way embed youtube video without altering url? thanks help so part of youtube url after v= video id. corresponds second after embed. if somehow list of video ids should able make type of loop run through , put video id after embed section.

ios - Slide out menu - When switching back to original controller, Nav bar disappears -

Image
i have slide out menu in app, , let know, i'm new ios/swift, if don't explain well, or use correct terms, that's why. i use swrevealviewcontroller library sliding out menu. the code use view controllers is self.view.addgesturerecognizer(self.revealviewcontroller().pangesturerecognizer()) the issue is, when app first opens, shows navigation item's title , on viewcontroller1(default view), when using slide out menu go viewcontroller2 or 3, , going viewcontroller1, whole navigation bar/item disappears. i tried use nav_item.title = "whatever" within viewdidload(), doesn't work, far when switch first view. funny thing is, if programmatically change title doing that, changes when first loads when change view2 , change view1, disappears. here few images of mean, if didn't explain enough, because said i'm still new. development of app coming along pretty because i'm going off android version i've had done while. here when first

r - Shiny: "quantile" not working in reactive context -

i'm having problems using quantile take percentiles of user-specified variable in shiny app i'm writing, , using these percentile values set x limits histogram output. i've tried bunch of fixes suggested in answers related questions keep getting different errors relating reactivity, variable type, , nas (even though have na.rm = true ). this example pared down more complex app can't show i've tried, i'm pretty sure problem happening in quantile command, , there may several different issues code. having trouble taking percentiles group_by_ , i'm not sure i've accounted nse. here server file (problems in here): {if (!require("devtools")) install.packages("devtools") if (!require("ggplot2")) install.packages("ggplot2") if (!require("dplyr")) install.packages("dplyr") if (!require("lazyeval")) install.packages("lazyeval") } #load librarie

c++ - Finding position of an element in vector of vectors -

let a vector of vectors of type double , i.e. vector<vector<double> > a , b same integers, i.e. vector<vector<int> > b . assume size of a , b same (and sizes of every nested vectors equal well). i check if j contained in i -th vector of b using std::find , write std::find(b[i].begin(), b[i].end(), j) != b[i].end() . now, if true return value in a corresponding [i][position_of_j_found_in_b[i]] . how can accomplish this? my code follows: class sparsematrix { private: vector<vector<double> > entries_; vector<vector<int> > columnindices_; public: sparsematrix(); sparsematrix(vector<vector<double> >,vector<vector<int> >); ~sparsematrix(); // getters vector<vector<double> > getentries(); vector<vector<int> > getcolindices(); double operator()(cons

python - Python2.7: How to create bar graph using index and column information? -

Image
i have started learning python 2.7 data science , encounter difficulty not solve after googling... appreciate if me how create bar graph. so have data frame this. created data frame original data using pivot table, allocating popular activities index , countries in column. data inside total # of votes popular activity in each country. make bar graphs based on each country. this. i appreciate if give me tips make kind of graph? not figure out how allocate index on y axis , frequency in x axis. thank you! i think need dataframe.plot.barh : import matplotlib.pyplot plt df.plot.barh() #pandas version bellow 0.17.0 #df.plot(kind='barh') plt.show()

Facebook Open Graph - images too small -

trying images fb open graph, working correctly. image size parameter not, , receiving 150x150px sized images. the url used in function follows. can advise on how set actual size of image received? thanks $url = " https://graph.facebook.com/ {$album_id}/photos?fields=picture&limit=4&access_token={$access_token}"; as per docs : picture link 100px wide representation of photo what need images field: images different stored representations of photo. can vary in number based upon size of original photo. and pick image works you.

recursion - Julia - equivalent of recursive sapply function in R -

i had function in r ( onestep below) took argument vector v , returned new vector v output function of input vector. iterated function niter times , kept output vectors of each iteration (which not same length , can end having length 0) in function iterate follows (minimal example) : onestep = function (v) c(v,2*v) iterate = function (v, niter) sapply(1:niter, function (iter) {v <<- onestep(v) return(v) } ) example : v=c(1,2,3) iterate(v,3) [[1]] [1] 1 2 3 2 4 6 [[2]] [1] 1 2 3 2 4 6 2 4 6 4 8 12 [[3]] [1] 1 2 3 2 4 6 2 4 6 4 8 12 2 4 6 4 8 12 4 8 12 8 16 24 i wondering compact , idiomatic way such recursive function returns intermediate results in julia? thoughts? (apologies if trivial new julia) not sure on compact , idiomatic front, how i'd it onestep(v) = [v 2*v] function iterate(v, niter) results = array(array, niter) results[1] = oneste

tomcat - Notice: Undefined property: java_Client::$cancelProxyCreationTag in http://localhost:8080/JavaBridge/java/Java.inc on line 1994 -

Image
i'm trying use jasper report php yii application. i've installed jasper-report-server obviouslly tomcat , apache php. i've make configuration download reports , i'm having error: fatal error: uncaught [[o:exception]:"java.lang.exception: createinstance failed: new org.altic.jasperreports.jdbcconnection. cause: java.lang.classnotfoundexception: org.altic.jasperreports.jdbcconnection screenshot here: fatal error: uncaught [[o:exception]:"java.lang.exception: createinstance failed: new org.altic.jasperreports.jdbcconnection. cause: java.lang.classnotfoundexception: org.altic.jasperreports.jdbcconnection vm: 1.7.0_101@ http://java.oracle.com/ " at: #-10 org.apache.catalina.loader.webappclassloader.loadclass(webappclassloader.java:1702) #-9 org.apache.catalina.loader.webappclassloader.loadclass(webappclassloader.java:1547) #-8 java.lang.class.forname0(native method) #-7 java.lang.class.forname(class.java:278) #-6 php.java.bridge.util.classfornam

web - Alternate templates not showing up in the template dropdown -

i have page.special.liquid (alternate template) under templates folder in theme file. when go 'add page', select template option, template not showing up. going wrong here? appreciated. if not working on published theme, make sure have alternative template same name (in case page.special.liquid) in active theme.

php - Space between two buttons mobile site -

Image
i have problem buttons when site switch on mobile version html is: <p style="text-align: right;"> <a class="button btn-primary" href="index.php/reprogrammation/193-bmw"> retour "choix de la marque" </a> </p> <p style="text-align: center;"> <a class="button btn-primary" href="#">2005 - e8x</a>      <a class="button btn-primary" href="#">2007 - e8x</a>  <a class="button btn-primary" href="#">2011 - f2x</a> </p> <p><img style="float: right;" src="images/marques/bmw/serie1.png" alt="" width="400" height="150" /></p> css is: .btn-primary { background: transparent none repeat scroll 0% 0%; border: 2px solid #c01c32; border-radius: 20px; font-family: "montserrat",sans-serif; font-size: 13px; text-

javascript - Scrollbar to horizontal div -

Image
i have csgo gamble site , want current items in pot show in horizontal div scrollbar have done here code of it: <?php @include_once('set.php'); @include_once('steamauth/steamauth.php'); @include_once "langdoc.php"; $lang = $_cookie["lang"]; $gamenum = fetchinfo("value","info","name","current_game"); if(!isset($_session["steamid"])) $admin = 0; else $admin = fetchinfo("admin","users","steamid",$_session["steamid"]); $ls2=0; //$rs69 = mysql_query("select * `game".$gamenum."` group `userid` order `id` desc"); $rs69 = mysql_query("select * `game25` group `userid` order `id` desc");?> <?php if(mysql_num_rows($rs69) == 0): ?> <?php else: ?> <?php $row69 = mysql_fetch_array($rs69); ?> <?php if(!empty($row69['userid'])): $ls2++; $avatar = $row69["avatar&q

assembly - Intel 8086 TASM - illegal number -

i've been doing program, need compare values of register number. while emulating on emu8086 had no troble, tasm compiler gave me error on lines such: cmp bx, 0xf7f0h the error looks this: ***error*** div.asm(163) illegal number any ideas how solve this? of course put f7f0h value register, or variable, i'd prefer keeping constant value. tasm doesn't understand 0x... notation. if complains f7f0h (because thinks label), have add leading zero: 0f7f0h .

python - How to correctly write out a TSV file from a series in Pandas? -

i have read manual here , saw this answer, not working: >>> import pandas pd >>> import csv >>> pd.series([my_list]).to_csv('output.tsv',sep='\t',index=false,header=false, quoting=csv.quote_none) traceback (most recent call last): file "<stdin>", line 1, in <module> typeerror: to_csv() got unexpected keyword argument 'quoting' without quoting argument, works. pd.series([my_list]).to_csv('output.tsv',sep='\t',index=false,header=false) but incompatible intended usage. to make things more confusing, when wrote out table way, there no quotes, , no errors: my_dataframe.to_csv('output2.tsv',sep='\t', quoting=csv.quote_none) any idea going on? the internal pandas implementation of series.to_csv() first converts series dataframe , calls dataframe.to_csv() method: def to_csv(self, path, index=true, sep=",", na_rep='', float_for

javascript - Rails association form with Ajax update -

i have model, book, has_many association, owns. have set user can click button add book collection. controller looks such: def create @book.owns.where(user_id: current_user.id).first_or_create @own = own.where(user_id: current_user.id, book_id: @book.id) own.update(@own, :quantity => "1") respond_to |format| format.html { redirect_to @book} format.js end end the view looks such: <% if user_signed_in? && current_user.owns?(@book) %> <%= link_to book_own_path(@book), method: :delete, remote: true, class: "btn btn-danger btn-circle", title: "remove collection", data: { toggle: "tooltip", disable_with: "<span class='fa fa-minus'></span>"} %><span class="fa fa-heart-o"></span><% end %> <% else %> <%= link_to book_own_path(@book), method: :post, remote: true, class: "btn btn-success btn-circle", title

node.js - Crawler over unstructured html with nodejs -

i need crawl/scrap static unstructured html, i'm trying content nodejs code, tried cheerio , xpath unsuccessfully. http://static.puertos.es/pred_simplificada/predolas/tablas/cnt/pas.html the xpath of first element /html/body/center/center/table/tbody/tr[3] , need every td text in tr. if try tbody node var parser = new parse5.parser(); var document = parser.parse(response.tostring()); var xhtml = xmlser.serializetostring(document); var doc = new dom().parsefromstring(xhtml); var select = xpath.usenamespaces({"x": "http://www.w3.org/1999/xhtml"}); var nodes = select("//x:tbody", doc); i receive [] nodes. with cheerio try iterate tr elements mentioned above unsuccessfully. var $ = cheerio.load(response); $('tr').each(function(i, e) { console.log("content %j", $(e)); }); it seams cheerio not working unstructured , without css html. so, tried workaround using yql following

jspm - How to get rid off Angular Material extra styles and CSS linked by it 'forcefully' -

Image
i using jspm/systemjs i using angular material , lib tables (which imports angular material too) i would love use sass version of angular material @import 'angular-material.scss' but when , link compiled app.css lot angular material: i multiple <style> tags in <head> zillion of css styles (?????) i 2 <links> in <head> each import of 'angular-material.js' package systemjs (one js , 1 library - different versions) that's because me , lib import js angular-material package. not asked - want app.css . so, how can rid of tags ? i guess problem angular-material adds package.json's jspm section: "shim": { "angular-material": { "deps": [ "./angular-material.css!" ] } }, and jspm changes angular-material.js in first lines: "format global"; "deps ./angular-material.css!"; i see annoying bug not feature - makes impo