Nodejs Express framework caching

Node.js
I am using Nodejs and Express Js. Also I add NowJS to the Express Js to do some real-time stuffs. In the configuration file I have app.configure('pr...
9 months ago

Why functions do not give integer overflow

Pascal
I have wrote functions in C++ and Pascal that give me n-th Fibbonacci number. As expected for large n-values(n>92,because even f(93) > 2^63+1) I was g...
9 months ago

Convert historical german local time record to UTC in JavaScript

Node.js
I need to convert German local time records, without zone info, i.e., var data = [ "2017-12-02 20:27:02", "2017-12-02 20:50:00" ] to UTC record...
9 months ago

How does the '\b' character in perl work?

Perl
According to my research the '\b' character used in perl print statements should act like a "backspace", that is, moving the cursor one character back...
9 months ago

Perl regex hash to match string

Perl
Right now I have the following code... %strings = ( 'a' => 'x', 'b0' => 'y', 'b1' => 'y', 'b2' => ...
9 months ago

How to detect emoji as unicode in Perl?

Perl
i have text file that contain emoji unicode caracter for exemple
9 months ago

SVM - How can I vectorize a kernalized gram matrix?

Python
I implemented a support vector machine in python using the cvxopt qp solver where I need to compute a gram matrix of two vectors with a kernel functio...
9 months 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:/...
9 months 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]] ...
9 months 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...
9 months 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...
9 months 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 ...
9 months ago

issue while creating an endpoint in Flask using Python

reST (reStructuredText)
I'm trying to write a microservice for a RESTful web service. I've a database created in 'Postgresql' and currently using Flask and psycopg2 (for conv...
9 months ago

Is there any concise way to convert the type from `Int` to `Double` after applying `splitAt` to a `List`?

Scala
My input is like this: 1 1 1 1 1 44 33 and the result I would like to get is like this: val listA = List(1, 1, 1, 1, 1) val listB = List(44.0, 33....
9 months ago

Blocking a REST API response until another API is called

reST (reStructuredText)
I have following scenario: There are two API calls in an application: api1 and api2. api1 is invoked multiple times from multiple users. I want to b...
9 months ago

Smarty Section Making the selected Link Bold

Smarty
How can I make the selected link from the List below, bold, that you see you are on Page ex. 3 or 5 With this code, If you click on a Link you don't...
9 months ago

how to assign a function's expression to a variable in smarty

Smarty
say I've got a text like this: {l s='Total'} 'l' is a function. The string 'Total' in fact will be a translation: 'l' will output that. I would nee...
9 months ago

REGR_SLOPE in Teradata SQL Query Returning 0 Slope

SQL
I am a relative newbie with Teradata SQL and have run into this strange (I think strange) situation. I am trying to run a regression (REGR_SLOPE) on s...
9 months ago

How to improve query execution time?

SQL
I have a rather complex query, which takes 1-2 minutes to execute. Is there a way to improve execution time? Here is the query: select o.orders_id,...
9 months ago

Same select criteria with multiple where conditions in SQL Server

SQL
Is it possible to do something like this when there are same fields required from the table but having different where conditions. I have tried to do...
9 months ago