date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/04 | 2,765 | 4,232 | <issue_start>username_0: I have a file which has a content like below
```
14.678 14.652 14.636 14.623 14.615 14.608 14.603 14.599 14.596
17.448 17.427 17.413 17.402 17.395 17.390 17.386 17.384 17.382
18.271 18.252 18.240 18.231 18.223 18.217 18.212 18.211 18.209
20.239 20.216 20.198 20.188 ... |
2018/03/04 | 1,050 | 2,138 | <issue_start>username_0: An `array(10^5 size)` of 32-bit binary numbers is given, we're required to count the no. of ones for every bit of those numbers.
**For example:**
```
Array : {10101,1011,1010,1}
Counts : {1's place: 3, 2's place: 2, 3's place: 1, 4's place: 2, 5's place: 1}
```
No bit manipulation te... |
2018/03/04 | 701 | 2,514 | <issue_start>username_0: I've tried a number of things within my CSS after reading some existing q&a's but nothing (yet) working.
Basically what I need is a navbar with links centered on the page and a logo floated to the right. I want them to be vertically aligned.
Managed to get them vertically aligned when the lin... |
2018/03/04 | 540 | 1,877 | <issue_start>username_0: I'm new to python scripting in Abaqus. I'm trying to make sense of the documentation but I don't get it. So far I found the following documentation:
1. This abaqus scripting user guide: <http://abaqus.software.polimi.it/v6.13/books/cmd/default.htm?startat=pt02ch06s01.html>
2. This abaqus scrip... |
2018/03/04 | 733 | 2,016 | <issue_start>username_0: I've been using this extend:
```
const extend = require('util')._extend;
```
but just noticed it modifies the original object:
```
> let hello = {a: 5};
> extend(hello, {poop: 'whas'})
{ a: 5, poop: 'whas' }
> hello
{ a: 5, poop: 'whas' }
```
What's a concise way I can extend objects with... |
2018/03/04 | 700 | 2,016 | <issue_start>username_0: I want to increment the number of likes on a post (say for *postid* 109) whenever I click Like.
I added a new column **likecount** and all values are 0 by default. They do not increment on clicking Like button.
I've tried a lot and searched for similar questions, but to no help.
**HTML**
... |
2018/03/04 | 506 | 1,603 | <issue_start>username_0: I'm trying to call a class name listed from the array. I have the code below but it seems it doesnt work. Not sure why.
```
```
Below is the PHP Code.
```
php
$rdiv = array("onediv", "twodiv", "threediv", "fourdiv", "fivediv");
$rand_keys = array_rand($input, 1);
?
```
Any help wo... |
2018/03/04 | 1,743 | 5,832 | <issue_start>username_0: So I've created a database which stores user information and their hashed password, which is hashed using a **Python** script using the `bcrypt` module.
Now to login using my Java client, I am using the `JBCrypt` library included as a Maven dependency in my IntelliJ project. It retrieves the h... |
2018/03/04 | 620 | 2,010 | <issue_start>username_0: I have this:
```
list_name = [0, 1, 2, 3]
list_name[0] = {}
list_name[0]['test'] = 'any value'
```
I want to know if a key of the list exists or not. Usually I use:
```
if 3 not in list_name:
print("this doesn't exist")
else:
print("exists")
```
And testing this for example for nu... |
2018/03/04 | 1,640 | 5,592 | <issue_start>username_0: I want to split function argument list by arguments.
An argument can be a function invocation like:
```
foo(...)
```
or any sequence of character. For instance:
```
"fisrt_arg, some_foo(arg1, foo2(arg1, arg2, foo3()), arg3), third_arg"
```
I want to get:
```
List("first_arg", "some_fo... |
2018/03/04 | 1,600 | 6,954 | <issue_start>username_0: I'm trying to make a Spring MVC app with Spring boot, Spring Security and Thymeleaf.
The problem is - when i'm requesting a page with it's html and css, i'm not getting the correct MIME type for my css file, thus why Chrome cannot load it with status "**canceled**" and the message "**Refused t... |
2018/03/04 | 274 | 1,153 | <issue_start>username_0: I have website login system and after logging in, users can withdraw amount that is stored in database, the problem is when someone login using multiple devices and submit withdraw form at the same time he/she will recieve the amount multiple times. How to prevent users submitting at the same t... |
2018/03/04 | 1,389 | 4,290 | <issue_start>username_0: I'm trying to make a loading screen for my project. I need the javascript to remove the CSS property "Display: none" from (page) I can't figure out why my code doesn't work.
**The Problem was:**
window.onload is not a function and i should use something like
"window.onload = loader;" instead... |
2018/03/04 | 848 | 3,280 | <issue_start>username_0: I have a compilation error in one of my projects
>
> Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
>
>
>
because it does not find all the classes from another project that I already included using
```
com.laberint
laberint-core
0.0.1-SNAPSHOT
```... |
2018/03/04 | 1,462 | 4,819 | <issue_start>username_0: I am having issues getting python to import the \_analog\_swig gnuradio module in order to run gnuradio code on a Windows 8.1 64bit machine.
Some background: I am running Python 2.7.10 (installed in C:\Python27) and have installed the latest gnuradio binary (v3.7.11.1/v1.3 64-Bit Any CPU) fro... |
2018/03/04 | 797 | 3,179 | <issue_start>username_0: I'm using `Feign` from the `spring-cloud-starter-feign` to send requests to a defined backend. I would like to use `Hystrix` as a circuit-breaker but for only one type of use-case: If the backend responds with a `HTTP 429: Too many requests` code, my Feign client should wait exactly one hour un... |
2018/03/04 | 266 | 1,124 | <issue_start>username_0: When I am trying to create a new web application project using maven, I am getting duplicate src folder in the project directory structure. Is it expected or I am doing anything wrong?
If it is expected why is it creating two directories with the same name, Is there any specific reason?
[![en... |
2018/03/04 | 864 | 2,613 | <issue_start>username_0: I'm trying to sort objects based by its property (price)
```
var arr = [{
name: 'Apple',
price: '1.03'
},
{
name: 'Cherry',
price: '0.33'
},
{
name: 'Mango',
price: '0.53'
}
]
```
Now i use lodash to sort it by its price:
`... |
2018/03/04 | 598 | 2,234 | <issue_start>username_0: I have a sequelize query from multiple tables inner joined together. I need to group them by on a nested `include` model but the sequelize query throws the primary key every time, even if I mention the attributes as: `attributes:[]`.
However `attributes:[]` is working for nested `include` mode... |
2018/03/04 | 887 | 2,931 | <issue_start>username_0: What is the best way and best practice to achieve this layout? Meaning it will stay consistent on iPad, Android or desktop. CSS Grids? Flexbox? Logo div should be centered on the page vertically and horizontally. Text divs should be centered in the middle of the logo div.
[here is the layout m... |
2018/03/04 | 1,131 | 3,239 | <issue_start>username_0: I am trying to plot a simple time-series. Here's my code:
```
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from datetime import datetime
%matplotlib inline
df = pd.read_csv("sample.csv", parse_dates=['t'])
df[['sq', 'iq', 'rq']] = df[['sq', 'iq', 'rq']].apply(pd.t... |
2018/03/04 | 735 | 2,485 | <issue_start>username_0: I am doing a classification task in Python to classify audio files of different musical instrument into their respective class, in my case there are 4 class, which are Brass, String, Percussion, and Woodwind. I used SVM algorithm as the classifier. My code looks a bit like this (I do not change... |
2018/03/04 | 1,800 | 4,396 | <issue_start>username_0: I have three columns in df
```
Col1,col2,col3
X,x1,x2
Z,z1,z2
Y,
X,x3,x4
P,p1,p2
Q,q1,q2
Y
```
I want to do the following
when col1=x,store the value of col2 and col3
and assign those column values to next row when col1=y
expected output
```
X,x1,x2
Z,z1,z2
Y,x1,x2
X,x3,x4
P,p1,... |
2018/03/04 | 1,063 | 4,626 | <issue_start>username_0: I have one question regarding **Spring Framework** `WebClient`
In my application I need to do many similar API calls, sometimes I need to change headers in the calls (Authentication token). So the question arises, what would be better of the two options:
1. **To create one WebClient for all i... |
2018/03/04 | 879 | 3,813 | <issue_start>username_0: when i tried that
```
using (var db = new NewDbContext())
{
var AllItems = new ObservableCollection();
ItemsDataGrid.ItemsSource = AllItems;
}
```
i got that error
>
> 'db' is a variable but is used like a type
>
>
><issue_comment>username_1: Two key things here about `WebClient`:... |
2018/03/04 | 835 | 3,114 | <issue_start>username_0: I am using djoser for auth purposes. I want to customize the create user end point of djoser. I have a User app. Here is my User model
```
from django.db import models
class User(models.Model):
email = models.CharField(max_length=100, blank=False)
name = models.CharField(max_length=10... |
2018/03/04 | 523 | 1,586 | <issue_start>username_0: I was wondering how to take a string and cut off one part of it and put that part into the beginning of another string
for example:
```
string1 = 'abcdefg'
string2 = 'gfedcba
```
How could I take the first four letters of string one and put them at the beginning of string2 so it looks like ... |
2018/03/04 | 859 | 2,951 | <issue_start>username_0: I built an app and everything is displayed perfectly in Chrome, but if I open the app in Windows Explorer the containers are smaller than they should be.
I'm using `width: fit-content`. Is this something that only works with Chrome.
How can I make it so that it works with all browsers?<issue_... |
2018/03/04 | 783 | 2,347 | <issue_start>username_0: I've found documentation regarding C ++, but not much with python.
The basic code to display in python is:
```
import numpy as np
import cv2
# Load an color image in grayscale
img = cv2.imread('messi.jpg',0)
cv2.imshow('image',img)
cv2.waitKey(0)
cv2.destroyAllWindows()
```
To show the ima... |
2018/03/04 | 1,282 | 4,731 | <issue_start>username_0: I am trying to implement the fastadapter. I just copied the sample code and tried to get it working. When I try it out it does not show anything in my recycler view. With debugging I found out that bindView() ist not getting called.
My SampleItem.jave
```
public class SimpleItem extends Abstr... |
2018/03/04 | 1,300 | 4,031 | <issue_start>username_0: I want to use [arulessequences](https://cran.r-project.org/web/packages/arulesSequences/index.html) for sequence mining. I have to use it in Oracle R distribution version R 3.3.0 (last released) and The problem is that the last version of the arulesSequences package is R >= 3.3.2. So I get an e... |
2018/03/04 | 696 | 2,282 | <issue_start>username_0: **Please note that the structure I've provided is just an example but can be anything**.
The main goal is to change the keys' values of my choice recursively, at any level, to a value of my choice.
Here's the example for clarification:
```
var items = {
price: 10,
child: {
... |
2018/03/04 | 333 | 1,175 | <issue_start>username_0: Is there is any Drush Command for Drupal 7 to give all permissions to a newly created role?<issue_comment>username_1: Well, I hope this help you:
1. You shouldn't grant all permissions to an anonymus role, because it is not even login into the Drupal site. And it could be extremly dangerious.
... |
2018/03/04 | 501 | 1,670 | <issue_start>username_0: I am using following code to insert entry in my database. But i can add same entry multiple time and i wanna that whenever i submit same entry in input type then message will show "[Nickname already exists](https://i.stack.imgur.com/eTLAT.png) "
```html
name
marks1
marks2
marks3
... |
2018/03/04 | 1,083 | 4,072 | <issue_start>username_0: First of all, I'm NOT really familiar with C#, but I am with C++. I didn't find any info about this. Through what mechanism is a C# property is being set when it only have a get implemented and the set is hidden. It's a read-only property that is being set continuously, inside a loop.
My hunch... |
2018/03/04 | 936 | 3,749 | <issue_start>username_0: Before I ask my question, I am fully aware that leaving an input stream open can cause a memory leak, and therefore doing so is bad practice.
Consider the following preconditions:
* Only a single file is needed to be read
* The file in question is a text file which contains rows of data
* Thi... |
2018/03/04 | 432 | 1,700 | <issue_start>username_0: I have had a look and cannot find anything like my problem.
I have a form where I cannot get the validation to work. I know the JavaScript file is loading since other functions on the page are working without issue. My code is as follows:
```
```
There is then the form and the button is cod... |
2018/03/04 | 330 | 1,109 | <issue_start>username_0: I do not understand the difference between `${var:-value}` and `${var:=value}`.
It seems that both commands in shell work identically.
What is the difference?<issue_comment>username_1: If `var` is unset or null:
* `${var:-value}` will expand to "value"
* `${var:=value}` will expand to "val... |
2018/03/04 | 457 | 1,535 | <issue_start>username_0: I got a .txt file with some data that i would like to import into a google sheet document.
The text file looks like this:
```
["Note"] = "<00001>",
["Name"] = "test1",
["Note"] = "<00002>",
["Name"] = "test2",
["N... |
2018/03/04 | 679 | 2,649 | <issue_start>username_0: I would like to know how can I modify the default artifact in order to have the following structure for my artifact published with SBT:
```
my_artifact.zip
-config/default.conf
-my_package.jar
```
It is actually quite straightforward case. I want my final artifact con... |
2018/03/04 | 2,080 | 6,902 | <issue_start>username_0: I have the following table:
```
┌────────────────────────────────┬──┬──┬──┬──┬──┬──┬──┬─────┬──┬──┬──┬───┐
│ I │ │ │ │ │ │ │ │ L │ │ │ │ S │
├────────────────────────────────┼──┼──┼──┼──┼──┼──┼──┼─────┼──┼──┼──┼───┤
│ │ ... |
2018/03/04 | 2,534 | 7,782 | <issue_start>username_0: I have looked at the other "out of gas" SO posts and they haven't solved my problem.
I am using ganache-cli started with
```
ganache-cli --account="<KEY> 2000000000000000000000000000000"
```
I then execute
```
truffle migrate --reset
```
It returns with an error
```
Error encountered,... |
2018/03/04 | 292 | 940 | <issue_start>username_0: I've the following javascript file:
```
onShowFunction = function(e){
//Some JQuery code
}
window.onpageshow(onShowFunction);
```
The index console log appears:
```
[Error] TypeError: window.onpageshow is not a function.
(In 'window.onpageshow(onShowFunction)', 'window.onpageshow' is nu... |
2018/03/04 | 579 | 1,485 | <issue_start>username_0: ```
CustomerList = []
CustomerList.append (c1)
CustomerList.append (c2)
CustomerList.append (c3)
CustomerList.append (c4)
CustomerList.append (c5)
for c in CustomerList:
print ("%8s %25s %35s %15s %15s" % (c.name, c.birth, c.address, c.hkid, "$"+str(c.balance)+"HKD"))
```
I have c1-5 val... |
2018/03/04 | 1,227 | 4,681 | <issue_start>username_0: I'm trying to switch one of my DB tables over to utf8mb4 from utf8\_general\_ci.
```
ALTER TABLE d4b80le1jha CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin
```
This brings up the following error:
>
> 1071 - Specified key was too long; max key length is 1000 bytes
>
>
>
I've read ... |
2018/03/04 | 953 | 3,302 | <issue_start>username_0: I am aware that you can / should not call virtual functions in the constructor and that a pure virtual destructor is not possible.
I have two classes, Base and Child.
Base has a pure virtual function and a normal function which calls the virtual one.
```
// base.h
class Base {
public:
vi... |
2018/03/04 | 1,288 | 4,328 | <issue_start>username_0: What I'd like to do is replicate what `SQLAlchemy` does, with its `DeclarativeMeta` class. With this code,
```
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class Person(Base):
__tablename__ = 'person'
... |
2018/03/04 | 1,835 | 6,215 | <issue_start>username_0: I am new to spark programming and scala and I am not able to understand the difference between map and flatMap. While using flatMap, why is "Option" used in method is working fine
```
def parseNames(line: String) : Option[(Int,String)] = {
var fields = line.split('\"')
if (fields.length ... |
2018/03/04 | 1,434 | 4,984 | <issue_start>username_0: 
I have installed Visual Studio Code, but I can’t type anything in terminal. How can I correct this issue?<issue_comment>username_1: Click on the gear on the left bottom of Visual Studio Code, click on *Settings*. On search se... |
2018/03/04 | 356 | 1,073 | <issue_start>username_0: I am trying to modify all the files in a directory by changing all the lowercase characters to uppercase characters with this script:
```
#!/usr/bin/env bash
for file in "/home/user/*"
do
tr '[:lower:]' '[:upper:]' < "$file" > "$file"
done
```
But with that script, all the content in the ... |
2018/03/04 | 439 | 1,264 | <issue_start>username_0: I am fetching data from an Access database using a JavaScript `while` loop:
```html
test
function fnadd()
{
var a=[];
var con=new ActiveXObject("ADODB.Connection");
var rs=new ActiveXObject("ADODB.Recordset");
con.open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source= C:test.mdb;Pers... |
2018/03/04 | 340 | 1,047 | <issue_start>username_0: I made a sequence in Oracle and when I delete a row (making active 0) in java desktop, deleted row became invisible in desktop. But it stays in database. That's why, when I try to insert a new row in desktop, the sequence considers deleted id too and id sequence id desktop becomes 1, 3, 7 etc. ... |
2018/03/04 | 1,004 | 2,721 | <issue_start>username_0: I made a program that calculates the maximum value of an array using the divide and conquer algorithm, but the output is 0.
```
#include
using namespace std;
int array[50];
void maximum(int index1, int index2, int&max\_number) {
int max\_number1;
int max\_number2;
int half;
if (index1 ==... |
2018/03/04 | 1,688 | 6,712 | <issue_start>username_0: In my app, I was calculating date time difference. On inserting a node in firebase, I save current time in which node is created. And in an adapter, I want to display the difference in a `cardview` in seconds minutes or days.
Problem is that there is no compile time error in the adapter. Bu... |
2018/03/04 | 313 | 1,293 | <issue_start>username_0: We are developing an ASP.Net/Angular Single Page Application and are considering using Telerik Reporting. During development we use a SQL LocalDb database. Does anyone know if Telerik Reporting can connect to SQL LocalDb please?<issue_comment>username_1: You are using the wrong patterns, which ... |
2018/03/04 | 583 | 2,293 | <issue_start>username_0: I have followed an online tutorial and successfully created a web scraper identical to that when following it step by step.
However, when trying to implement this code on my desired website, blank data is all that is being returned on my console. I was hoping someone could look at the short co... |
2018/03/04 | 681 | 1,773 | <issue_start>username_0: A sample values like this:
```
fdsfsf345#3gt#$%3^#$T$#tr43r43
test spaces
"test spaces"
"fdsfsf345#3gt#$%3^#$T$#tr43r43" #comment
"test spaces" #comment
```
A script:
```
$re = '/(.*)(?:\"|\'|)(?: )#?(.*)|(.*)/mi';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
var_dump($matches);... |
2018/03/04 | 1,657 | 4,763 | <issue_start>username_0: ```
package main
import (
"fmt"
"os"
"io"
)
func main() {
f1,_ := os.Create("f1")
io.WriteString(f1, "some content")
buf := make([]byte, 8)
f1.Read(buf)
fmt.Println(buf)
}
```
I create a file, then write in some string. then read out, but there is no co... |
2018/03/04 | 1,309 | 4,553 | <issue_start>username_0: Whatever I try, since I switched to Python 3 I can run scripts with imports only from the root folder of the project, but not from subfolders. I am aware that there are lots of questions here about the error messages I get, but the proposed solutions don't work for me. Could someone please prov... |
2018/03/04 | 894 | 3,182 | <issue_start>username_0: I have a node express app, and I'm writing some tests for it with mocha, chai and sinon. I have a module that contains endpoint handlers. It roughly looks like this:
```
var db = require('./db-factory)();
module.exports = {
addUser: function(req, res) {
if (req.body.deviceID === und... |
2018/03/04 | 240 | 776 | <issue_start>username_0: How can I format, according to Locale.getDefault() of device, a float greater than 999.
For decimal format currently I'm using this:
```
DecimalFormat decim = new DecimalFormat("#.##");
tv.setText(decim.format(someFloat));
```
And for thousand separator:
```
tv.setText(String.format(Local... |
2018/03/04 | 562 | 2,204 | <issue_start>username_0: I do have a file which have many records or columns in a single row. This file is being used across multiple systems. Hence not all fields are required for my requirement. Hence if i set only a subset of values as shown below
```
```
I get an exception as below
```
org.springframework.batch... |
2018/03/04 | 387 | 1,586 | <issue_start>username_0: I am trying to send messages from python 3.5 program running on android to the python program running on my laptop.
I searched Google so many times but nothing had me .
So anyone can help to go in the right direction .
Thank you in advance<issue_comment>username_1: The exception is saying that ... |
2018/03/04 | 530 | 1,742 | <issue_start>username_0: I have this code, and I want to print the object `Persona`.
The project is called `testOggetti`.
```
static void Main(string[] args)
{
Persona p = new Persona("nome1", "cognome1", 18);
Persona p2 = new Persona("nome2", "cognome2", 14);
List listaPersone = new List();
listaPers... |
2018/03/04 | 253 | 871 | <issue_start>username_0: I try to iterate through *dictionary*, but it shows me this **error**:
>
> "cannot convert from 'System.Collections.Generic.KeyValuePair' to 'string'".
>
>
>
Can you tell me how to solve this problem?
Here's the code:
```
var dict = new SortedDictionary();
foreach(KeyValuePair ugh in ... |
2018/03/04 | 1,072 | 2,480 | <issue_start>username_0: Need perl one liner to find the line having greater date time stamp of two lines.
The below two sample lines in csv format contains first field as date time stamp:
```
2018-02-15 06:10:55-05;2BBB519037;2.1.575017;YY990;Company1;0;0;0;0;0;0;0;0;0;1;1;0;0;4498
2018-02-15 15:40:12-05;2BBB1519... |
2018/03/04 | 915 | 3,606 | <issue_start>username_0: I've read that the new Angular's HttpClient can perform TypeChecking, based on that I write the following code
```
post(path: string, body: Object = {}): Observable {
return this.http.post(path, JSON.stringify(body))
.map((data: ValorTest) => {
console.log(typeof data); // Why console displa... |
2018/03/04 | 524 | 1,904 | <issue_start>username_0: I'm trying to reproduce `OutOfMemoryError` with this code:
```
List objects = new LinkedList<>();
while (true)
objects.add(new Object());
}
```
But it actually never happens, I used -Xmx512 and JVM just takes about 497 MB each time and then memory isn't consumed.
I use jdk1.8.0\_151
Could... |
2018/03/04 | 554 | 1,826 | <issue_start>username_0: I'm trying to split a string like
```
0 2 5 6 8 13
```
by using
```
string[] exampleStringArray = exampleString.Split(null)
```
However, I don't end up getting the strings
```
0, 2, 5, 6, 8, 13
```
in my array but there is one **empty** string at the index 0. How do I prevent this fr... |
2018/03/04 | 916 | 2,993 | <issue_start>username_0: I am using JSON in Ruby and every time I run the program, I get the error of "unexpected token at." I am not sure what is going on, I tried reading information from other users that had the same problem, but I do not seem to figure out what is going on.
This is my code for my .rb page:
```
de... |
2018/03/04 | 848 | 2,548 | <issue_start>username_0: For example consider the following code -
```
fscanf(fp,"%d:%d:%[^:]:%[^\n]\n",&pow->no,&pow->seen,pow->word,pow->means);
printf("\ntthis is what i read--\n%d:%d:%s:%s:\n",pow->no,pow->seen,pow->word,pow->means);
```
here pow is pointer to an object declared before,
when I put `s` as i... |
2018/03/04 | 1,008 | 3,400 | <issue_start>username_0: I have two tables TEILNEHMERKURS and KURS.
Kurs:
```
| Bezeichnung |
| ---------------- |
| Java Programming |
| Java Programming |
| Database |
```
and the second Table TEILNEHMERKURS
```
| Bezeichnung |
| ---------------- |
| Database |
| Java Programmin... |
2018/03/04 | 1,199 | 4,307 | <issue_start>username_0: I'm using Rails5 app and deployed it to EB container successfully.
But webpacked assets -- served in `public/packs` directly, return 404 in production environment.
In current situation, I set `RAILS_SKIP_ASSET_COMPILATION = false` so I precompile assets before deploying the app everytime.
I ... |
2018/03/04 | 2,909 | 10,839 | <issue_start>username_0: Since nestjs is an express app, it's possible to use any library to handle upload using nest, and since it provides Midlewares, it's also possible to use multer. My question is: What's the best way to handle file uploads using nestjs?<issue_comment>username_1: As informed by @Kamyl on issue <ht... |
2018/03/04 | 3,207 | 11,740 | <issue_start>username_0: How to map column of one CSV file to column of another CSV file in R. If both are in same data type.
For example first column of data frame A consist some text with country name in it. While column of second data frame B contains a standard list of all country .Now I have to map all rows of fir... |
2018/03/04 | 3,169 | 11,535 | <issue_start>username_0: I want to start a bash script from a html page.
This script is supposed to modify a file and reload asterisk service.
I'm using PHP to do so.
My php script :
```
php
$field1 = $_GET["P1"];
$field2 = $_GET["P2"];
$field3 = $_GET["P3"];
echo "$field1 $field2 $field3 ";
$output = shell_exec("/va... |
2018/03/04 | 997 | 3,665 | <issue_start>username_0: I'm using **create-react-app** and trying to write a **jest** test that checks the output of a `console.log`.
My function to test is:
```
export const log = logMsg => console.log(logMsg);
```
My test is :
```
it('console.log the text "hello"', () => {
console.log = jest.fn('hello');
ex... |
2018/03/04 | 498 | 1,978 | <issue_start>username_0: I want to build a mobile application which is social networking and allows users to have video chats. The video chats should also be able to get recorded and shared. So I am opting for Hybrid app development as I can release the app both in iOS and android.
For my requirements what Hybrid plat... |
2018/03/04 | 371 | 1,356 | <issue_start>username_0: I am trying to create a quick language parser in Ruby. The entire thing works, and I can successfully run code in my new language, but I couldn't get **#define** to work. I'd like **#define** to be the keyword for creating functions in my weird temporary language.
So far, I've used Regular Ex... |
2018/03/04 | 286 | 1,063 | <issue_start>username_0: I have a question about passing a single column of a matrix to a function. I only need to operate on one column of the whole matrix but I don't seem to have an idea how to do this. I searched the net for an answer, but it seemed that nobody had this question. Thanks for ideas!<issue_comment>use... |
2018/03/04 | 3,108 | 11,882 | <issue_start>username_0: could you advice why javascript / vuejs is crashing on my [JSFiddle](https://jsfiddle.net/dascorp/ghLmnm2c/) when I focus on a start date datepicker (it hangs the browser).
Try to you uncomment endDate computed property and comment current one it works ok however the functionality is gone.
`... |
2018/03/04 | 1,287 | 4,561 | <issue_start>username_0: I'm currently learning about how C functions can accept multidimensional arrays, by following the treatment in the book [*C primer plus*, by <NAME> (6th edition)](http://catalogue.pearsoned.ca/educator/product/C-Primer-Plus/9780321776402.page).
In the book, the author mentions that function th... |
2018/03/04 | 1,227 | 4,157 | <issue_start>username_0: When I call the following function, {:a, 2} in Keyword list 1 is never gets transferred, however {:b, 4} in List 2 gets transferred to the resulting list even though there's no matching pair Keyword List1. Anyone known why?
`iex> Keyword.merge([a: 1, a: 2, b: 2], [a: 3, b: 3, b: 4], fn _k, v1,... |
2018/03/04 | 1,035 | 3,395 | <issue_start>username_0: Why is the following command able to download `index.html` from `www.example.com`?
`wget --reject-regex .* http://www.example.com/`
```
$ wget --reject-regex .* http://www.example.com/
--2018-03-05 11:21:26-- http://.keystone_install_lock/
Resolving .keystone_install_lock... failed: nodename... |
2018/03/04 | 376 | 1,126 | <issue_start>username_0: 28517 This is my folder id. **how can i put 2 or more different folder id there?**
```
$where_text = "`indir`= '28517'";
$data = $db->select("SELECT *
FROM `". MAI_PREFIX ."files`
WHERE $where_text
ORDER BY `".$set->plugins["top_s... |
2018/03/04 | 647 | 1,518 | <issue_start>username_0: In R, I have some matrices of numbers and I am going to convert each number to its equivalent letter; 1 to "a", 2 to "b", and so on.
Assume this is the matrix:
```
set.seed(1)
x <- data.frame(matrix(sample(1:16,12,T),nrow=3,ncol=4))
# X1 X2 X3 X4
#1 5 15 16 1
#2 6 4 11 4
#3 10 15 11 3
... |
2018/03/04 | 829 | 3,013 | <issue_start>username_0: Are F# module signature files mostly useless, unlike OCaml, because F# doesn't have functors?
What are use cases for F# module signature files?<issue_comment>username_1: **Clarification for future readers**: this answer was written for the original question, before it was updated. The original... |
2018/03/04 | 335 | 1,131 | <issue_start>username_0: I have list, it should be converted to map where the key is elements of collection and value is a count of entrance of this elements.
I tried to do like this, but it leads to inconsistent result:
```
def list = ["first","first","second"]
def mapList = [:]
mapList = list.collectEntries{
... |
2018/03/04 | 919 | 3,361 | <issue_start>username_0: I'm developing a simple game webstore. The idea is that developers can upload games that will be displayed on an iframe (so the games are simply just URLs) and then they can be played.
The problem is, when publishing a game, the icon image does not get uploaded. So the image cannot be displaye... |
2018/03/04 | 587 | 2,434 | <issue_start>username_0: **Solved** (solution at the bottom)
In my activity I need to read preferences and then override configuration. In constructor Context is not ready yet:
>
> Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
>
>
>
In `on... |
2018/03/04 | 381 | 1,319 | <issue_start>username_0: This is a simple recursive example in foreach loop ubable to understand the result why am I getting this result?
Answer will be appreciated.
```
function sub($i = 1){
$level = array(1,2);
if($i <= 2){
foreach ($level as $count){
echo "count => {$count} and i => {$i}
... |
2018/03/04 | 956 | 2,753 | <issue_start>username_0: In the same file path I have many different files which start with the same name. Example `"myfile_"`.
The are `csv` file.
I have a specific code which I would like to execute for every file.
The output of this code is 5 variables/columns.
Is there any way to read the data of every file ins... |
2018/03/04 | 1,705 | 5,864 | <issue_start>username_0: I have a table with a Unique Key on columns Pfx, Bse and Sfx.
While inserting data, it seems to me like SQL Server is internally applying an RTRIM and causing an issue with my Sfx column which has a space in the second row. Is it possible to prevent this RTRIM or am I missing something?
```
IN... |
2018/03/04 | 745 | 2,744 | <issue_start>username_0: Just another vim source code comment question here. I have this mapping for my python source code files:
```
map i#
imap # i
```
On Ctrl-C it puts # in the beginning if the line to comment it out. This improves productivity a lot. But when I want to uncomment lines, I have to do this manua... |
2018/03/04 | 685 | 1,840 | <issue_start>username_0: Trying to launch upsource on docker container via instructions on <https://www.jetbrains.com/help/upsource/docker-installation.html>
`docker run -it --name upsource -v /Users/rudskoy/desktop/upsource/data/:/opt/upsource/data -v /Users/rudskoy/desktop/upsource/config/:/opt/upsource/conf -v /Use... |
2018/03/04 | 498 | 1,684 | <issue_start>username_0: I'd like to simply compute multiplication of two matrices.
But instead of real numbers I'd like to use elements of a finite group in the matrix.
Namely I want to use elements of F4={0,1,x,1+x} (so i only have 4 possible elements). In this group, addition and multiplication are well-defined, an... |
2018/03/04 | 512 | 1,757 | <issue_start>username_0: I am using the Table API on Flink 1.4.0. I have some `Table` objects to be convert to a `DataSet` of type `Row`. The project was built using Maven and imported on IntelliJ. I have the following code and the IDE cannot resolve the method `tableenv.toDataSet()` method. Please help me out. Thank y... |
2018/03/04 | 727 | 2,122 | <issue_start>username_0: This is my index.html
```
Random quotes machine
New Quote
```
And here's come my button attribute. There are more, but I cut it.
```
#buttonAtt {
-moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
-webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
box-shadow:inset 0px 1px 0px 0px... |
2018/03/04 | 624 | 2,071 | <issue_start>username_0: I have `user` table with `innoDB` Engine which has about million drivers
```
CREATE TABLE user (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`Column2` varchar(14) NOT NULL,
`Column3` varchar(14) NOT NULL,
`lat` double NOT NULL,
`lng` double NOT NULL,
PRIMARY KEY (`Id`)
) ENGINE=InnoDB
... |
2018/03/04 | 906 | 2,910 | <issue_start>username_0: A program has the main window, the menu bar, the menu item (**QAction** in **Qt**), the tab widget, the text edit. I try to receive the sequenced numeration in the tabs when I press on the menu item (New Tab).
When I press on the **New Tab** then **tab 1**, **tab 2**, **tab 3**, **tab 4** and ... |