Cec

0

votes
2

answer
17

views

How to make separate mean+errorbar on top of a scatter plot & how to make a horizontal mean line?

I want to make a position_dodged scatter plot with means represented as horizontal lines (with error bars). I'm having trouble position_dodging the mean and error bars using stat_summary() and making the mean appear as a horizontal line. I want to show that the mean is different between the sexes. I...
CeC
1

votes
1

answer
36

views

JAX-RS client inside a container ISO8601 date serialization

I have a JSON REST API featuring a POST /items endpoint, which expects an object like: {'name': 'item_name', 'timestamp': '2018-01-01T01:01:01.001'} I need to call this endpoint from a JEE7 application deployed on WildFly10. To model the object in Java I defined a simple DTO class: class ItemDTO { p...
Cec
1

votes
0

answer
104

views

angular material 2 custom component using mat-auto-complete

I have multiple forms where users have to specify their country through an auto-complete. I implemented a service performing the auto-completion (contact backend, handle responses and return suggestions) Now I want to create a component to reuse throughout all the forms. This component would depend...
Cec
1

votes
1

answer
133

views

angular5 dynamic compoments parent-chld communication

I'm implementing the approach described in the dynamic compoment docs. I need my dynamic components to be able to emit an event to the parent component and in response the parent component might need to call a method of the child component. I know how to bind child events to a parent's method when t...
Cec
1

votes
1

answer
161

views

Accessing pub/sub systems from web apps through WebSockets

I need instances of a web-app to receive notifications via WebSocket. These notifications derive from events in backend systems; these events need to be handled in multiple ways, not only pushed to clients. Thus a pub/sub system is ideal: events are published and n consumers handle them if they are...
Cec
1

votes
1

answer
540

views

Rails 3.2 Engines - routes not working in test cases

I mounted in my app the RailsAdmin engine ( according to the instructions from the wiki ) using mount RailsAdmin::Engine => '/backend', :as => 'rails_admin' I had to extend one controller from the engine to add a before_filter. When running my app in development, my extension and the other engine fe...
Cec
1

votes
1

answer
801

views

Barchart with ggplot 2 y axis labels

I have a little problem with a ggplot barchart. I wanted to make a barchart with ggplot2 in order to compare my Svolumes for my 4 stocks on a period of few months. I have two problems: The first one is that my y axis is wrong. My graph/data seems correct but the y axis don't 'follow' as I thought it...
Cec Jurczyk
1

votes
1

answer
35

views

configuring properties for dependent artifacts from inside a war

I'm writing a jee app deployed as a WAR to a container. This app depends (maven dep) on a java lib packaged as a JAR. The lib contains a client used by the jee app to talk to a backend. The lib accepts the base uri of the backend (host+port+context-path) as a configuration. What is the best way to c...
Cec
1

votes
1

answer
1.1k

views

RailsAdmin Custom Controller

I'm writing a custom rails_admin controller (Backend::ImagesController) which inherits from RailsAdmin::MainController. I followed the steps in this answer, but I'm getting an undefined_method error when my view uses the route helper backend_image_path(@image). The controller is defined under contro...
Cec
2

votes
2

answer
489

views

Import some json data

I would like to import json data in R. I know some discussions are already posted about this subject, but unfortunately I don't have the result I want with these codes or they have many errors with my file. I would like to import this: https://api.stocktwits.com/api/2/streams/symbol/AAPL.json in R....
Cec Jurczyk
2

votes
1

answer
1.2k

views

Batch file: How to redirect output from .exe with parameter?

I am trying to write a batch file to run a .exe with a parameter and that gives and output in .csv I wrote: start '' 'C:\Users\Me\Desktop\AnalysisSoftware\Video.exe' S1.avi>S1.csv This command is working but the created .csv file is empty. What's wrong? I also tried with ^ like that: start '' 'C:\Us...
Cec
2

votes
1

answer
169

views

rxjs observable reusing logic

I'm writing a angular file-upload component. Upon successful upload, it displays a notice and two buttons: replace : deletes uploaded file and opens the file-selector dialog remove : deletes uploaded file and displays a notice Deleting the uploaded file means making a HTTP DELETE request to a backen...
Cec
1

votes
1

answer
1.6k

views

Multiple linear regression for a dataset in R with ggplot2

I am testing to make an analysis of sentiment on a dataset. Here, I am trying to see if if there are any interesting observations between message volume and buzzs, message volume and scores... There is what my dataset looks like: > str(data) 'data.frame': 40 obs. of 11 variables: $ Date Time :...
Cec Jurczyk
4

votes
1

answer
1.1k

views

Angular 5 - instantiate a component from its name as a string

I know how to init components using ComponentFactoryResolver.resolveComponentFactory(AComponentType) but the method expects a Type, while in my code I have the name of the type as a string. In the Angular API is there a method to resolve by string? If not, how can I convert a string to a Type in Typ...
Cec
1

votes
1

answer
2k

views

Extract dates times from a data.frame in R

I have a dataset with some date time like this '{datetime:2015-07-01 09:10:00' So I wanted to remove the text, and then keep the date & the time as as.Date returns only the date. So I write this code but the only problem I have is that during the second line with strsplit, it only returns me the dat...
Cec Jurczyk
5

votes
0

answer
1.7k

views

JBuilder + OJ slow json rendering

I am rendering to json an array of records and their eager-loaded associations. Using ObjectSpace.each_object(ActiveRecord::Base) {|x| 1+1} I get 165 instances, thus my jbuilder views take 1 second to render 165 records into 69K of json. I'm already using OJ as the JSON backend. I have no experien...
Cec
3

votes
1

answer
510

views

Google Cloud Storage Budget Limit

Does Google Cloud Storage allow setting a monthly budget limit, similar to the one available for Google App Engine?
Cec
2

votes
1

answer
42

views

WildFly globally enable pretty print in development, but not in production

I'd like to globally enable JSON pretty-printing for my project on my dev machine, while leaving it off on production. What approaches could I follow?
Cec
2

votes
1

answer
139

views

angular5 dynamic component resolver

I have multiple modules, each containing various components, and a parent component that needs to contain one of these components. Since I cannot use routes to achieve this, I authored a service that given a moduleName :string and a compomnentName : string returns the corresponding component class....
Cec
8

votes
3

answer
5.8k

views

angular 5 template forms detect change of form validity status

are reactive forms the way to go in order to have a component that can listen for changes in the validity status of the form it contains and execute some compoment's methods? It is easy to disable the submit button in the template using templateRef like [disabled]='#myForm.invalid', but this does no...
Cec
5

votes
3

answer
611

views

typescript method with type as parameter

Given this class hierarhcy export class A { static m() { return 'a'}; } export class B extends A { static m() { return 'b'}; } export class C extends A { static m() { return 'c'}; } I need a method taking an array of classes (not instance) extending A and calls m() on each element of the array: func...
Cec
4

votes
4

answer
155

views

Java 8 DateTimeFormatter parsing optional sections

I need to parse date-times as strings coming as two different formats: 19861221235959Z 1986-12-21T23:59:59Z The following dateTimeFormatter pattern properly parses the first kind of date strings DateTimeFormatter.ofPattern ('uuuuMMddHHmmss[,S][.S]X') but fails on the second one as dashes, colons and...
Cec
2

votes
2

answer
5.7k

views

angular 5 nested form child component

I have a series of forms (each managed by 1 component). There is a pattern of inputs in these forms (e.g. many of them require to allow input of an address) that I have to refactor into re-usable components as they are used in multiple forms and I don't want to duplicate neither their logic nor thei...
Cec
4

votes
1

answer
817

views

Angular 5 dynamic templates using AoT

Thanks to this very insightful post I am able to create components on the fly with a dynamic template fetched from an endpoint, however these components are compiled at runtime using the RuntimeCompiler, which is disabled when using AoT compilation, AKA when in production. Is anyone aware of a simi...
Cec