Hybris Create Web Service with Intellij

reST (reStructuredText)
I'm really new in Hybris. I have Hybris commerce 6.4 and im working with Intellij. Can anybody tell me how to create a web service rest? I need th...
1 year ago

Swift 4 URLsession with Authentication API Key

reST (reStructuredText)
I am trying to make a POST Request for the Shippo REST API in Swift, but since it needs an API Authentication key I cannot figure out how to implement...
1 year ago

R: "label" a row based on conditions from another data.table

R
I have a data.table (A) that is over 100,000 rows long. There are 3 columns. chrom start end 1: chr1 6484847 6484896 ...
1 year ago

Show foreign key in DJANGO REST

reST (reStructuredText)
My first question here. Glad to be part of this community. My question: I'm using python3 and the django rest framework to create an API. I have the ...
1 year ago

R data scraping / crawling with dynamic/multiple URLs

R
I try to get all decrees of the Federal Supreme Court of Switzerland available at: https://www.bger.ch/ext/eurospider/live/de/php/aza/http/index.php?l...
1 year ago

Probabilities of events grouped by their outcome

R
Say there are $n$ independent events. Each has a probability $p_n$ and an associated loss $l_n$. My goal is to produce a list of all possible loss amo...
1 year ago

Does my Retrofit/ReactiveX method actually retrieve data asynchronously?

reST (reStructuredText)
swipeRefreshLayout.setOnRefreshListener(() -> { swipeRefreshLayout.setRefreshing(true); retrieveData(mCardAdapter, db); }); For some reason the...
1 year ago

Error when predicting with DirichletReg package in R

R
I am trying to make predictions on a test set using the DirichReg function from the DirichletReg package. When I run the model with only a few predict...
1 year ago

What is the correct REST method for performing server side validation?

reST (reStructuredText)
If I don't want to update a resource, but I just want to check if something is valid (in my case, a SQL query), what's the correct REST method? I'm n...
1 year ago

For loop returns last result

R
I have a small number of csv files, each containing two columns with numeric values. I want to write a for loop that reads the files, sums the columns...
1 year ago

StatET in Eclipse and R

R
I've managed to install StatET into eclipse, and I have a Java project called "Test" with some code in there. I'd like to be able to keep a .R file in...
1 year ago

Add count labels to clustered bar graph ggplot2

R
I tend to struggle with adding labels to bar graphs. I am trying to add count labels next to each bar in this graph, but the numbers are not placed in...
1 year ago

How to find Previous Sunday in R

R
It seems the Internet has not answered this question for R yet: If I have a date. Say the 20th of march: as.Date("2015-03-20") how do I get, in R, th...
1 year ago

Downsample a 1D numpy array

Python
I have a 1-d numpy array which I would like to downsample. Any of the following methods are acceptable if the downsampling raster doesn't perfectly fi...
1 year ago

Undefined reference errors when including Rcpp.h

R
I am using 64bit Ubuntu, and I am trying to write C++. I discovered if I use #include <Rcpp.h>, I don't even need to call any functions in the...
1 year ago

Python sublist for a condition

Python
I have 3 lists x, y, z and I plot them with: ax.plot3D(x, y, z, linestyle = 'None', marker = 'o'). What is the easiest way to only plot the points ...
1 year ago

Factor to date conversion produces NA

R
I'm working on a kaggle dataset and here's some sample code: Before: Date Open High Low Close Volume Adj.Close 1 6/29/2010 19.00 25.00 17.54...
1 year ago

How to combine lists of different lengths repeating elements?

Python
so I have say two lists: list1 = [1,2,3] and list2 = [4] and I need to combine them to produce the following output: list3=[[1,4],[2,4],[3,4]] ...
1 year ago

Appending error messages to log file while running multiple script components in R

R
I am attempting to write error messages for my script to a log file. It works when I do: test <- file("error_file.log", open = "wt") sink(test, ty...
1 year ago

ctags, vim and python code

Python
I generate ctags with the following command ctags -R --fields=+l --languages=python --python-kinds=-iv -f ./tags apps/employees/models.py and this ...
1 year ago

filter rows in pandas dataframe with specified interval

Python
I have a dataframe table with shape (104238, 88). I want to extract only rows with values either 1 or 0 (not boolean) Dataframe_input Index C1 C2 ...
1 year ago

SWIG: How to pass a vector of complex numbers from C++ to python

Python
I need to pass a list of complex numbers from python to C++ to initialize a vector and after some operations, I need to pass the vector of complex dou...
1 year ago

failed when using str_replace

PHP
i am new in PHP, i am trying to delete a post with an image, before delete the image in the storage drive, I have to change the image path from http:/...
1 year ago

Concatenate Numpy arrays without copying

Python
In Numpy, I can concatenate two arrays end-to-end with np.append or np.concatenate: >>> X = np.array([[1,2,3]]) >>> Y = np.array([[...
1 year ago

confirmation Email and how to access and alter user's profile fields?

Python
I am following a tutorial and everything is working fine, except being able to access the user's profile fields , and so far i am able to set the 'is...
1 year ago