date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/12 | 471 | 1,742 | <issue_start>username_0: I want to create cells same like that of Username and Password tabs in fb or gmail. The cells must show the values to be entered in that cell i.e. "Enter username here" and "Enter Password here". As i click on it, the text in that cell i.e. "Enter Username here" in it must get invisible. If i c... |
2018/03/12 | 846 | 3,127 | <issue_start>username_0: I have to iterate each row in my table User in MySQL.
I need to create a new row Address for each iteration in User with some conditions described below.
I have 3 tables:
```
User: id, stuff, id_person, email
Person: id, stuff, id_address
Address: id, email
```
I need to create a new row i... |
2018/03/12 | 841 | 1,974 | <issue_start>username_0: This is what I do:
```py
import pandas as pd
t = pd.DataFrame(data={'i1':[0,0,0,0,1,1,1,1,2,2,2,2],
'i2':[0,1,2,3,0,1,2,3,0,1,2,3],
'x':[1.,2.,3.,4.,5.,6.,7.,8.,9.,10.,11.,12.]})
t.set_index(['i1','i2'], inplace=True)
t.sort_index(inplace=True)
t.i... |
2018/03/12 | 1,100 | 4,862 | <issue_start>username_0: In my recipe I have to download git repository and run CMake. After CMake finish its work additional directory OUT is created which contain setup.py file that I like to run in do\_install?
I have tried:
```
DEPENDS = "setuptools python"
do_install () {
python OUT/setup.py install
}
```
Bu... |
2018/03/12 | 2,383 | 8,110 | <issue_start>username_0: I would like to define a `List` of elements implementing a common type class. E.g.
```
trait Show[A] {
def show(a: A): String
}
implicit val intCanShow: Show[Int] = new Show[Int] {
def show(int: Int): String = s"int $int"
}
implicit val stringCanShow: Show[String] = new Sho... |
2018/03/12 | 509 | 1,347 | <issue_start>username_0: I have an array of data which a 2 dimensional array with 3 features :
[[1,2,3], [4,5,6]] and I want I reshaped it to fit into keras with a reshape(1,2,3) to have an array like :
```
trainX = [[[1,2,3], [4,5,6]]].
```
The training array is nearly the same :
```
trainY = [[4,5,6], [7,8,9]]
... |
2018/03/12 | 676 | 1,699 | <issue_start>username_0: Suppose I have a pandas table, with one column the stock ticker, another the date, and I want to, for each date, rescale the returns to follow the uniform distribution. Now, `sklearn.preprocessing` has a perfectly fine `quantile_transform` function for this, but I can't seem to shoehorn it into... |
2018/03/12 | 913 | 2,935 | <issue_start>username_0: Am loading some blog data from a database with title and body but the body contains some `HTML` and `CSS` codes like the following below in the `JSON` data
```
{[News_Body: "The Lagos State Local Government
Election Appeal Tribunal have received 22 Appeals from the July
22 council polls in... |
2018/03/12 | 414 | 1,434 | <issue_start>username_0: In manifest file, I set:
```
```
But in activity when I call:
```
getApplication()
```
it returns android.app.Application instance not MyApplication instance.
I think it causes by I am using Dagger2. I am new to dagger2<issue_comment>username_1: If jQuery is an option you could achieve so... |
2018/03/12 | 764 | 2,554 | <issue_start>username_0: I'm pulling contact information (text) from a website and I can currently pull all the class data, using the following XPath syntax:
```none
//*[@id="nomapdata"]/div/div/div/div[2]/div[1]
```
Using this XPath expression for the element, I get the following text as the result:
```none
Name
T... |
2018/03/12 | 8,484 | 10,443 | <issue_start>username_0: I found "unk" token in the glove vector file glove.6B.50d.txt downloaded [from https://nlp.stanford.edu/projects/glove/](https://nlp.stanford.edu/projects/glove/). Its value is as follows:
```
unk -0.79149 0.86617 0.11998 0.00092287 0.2776 -0.49185 0.50195 0.00060792 -0.25845 0.17865 0.2535 0.... |
2018/03/12 | 785 | 2,696 | <issue_start>username_0: For example there is some folder:
```
.
├── file_a.py
├── file_b
│ └── __init__.py
└── file_b.py
```
where `file_a.py` has something like:
```
from file_b import some_function
```
I know this is definitely not good practice, but what is the order of resolution behind?
i.e. How python d... |
2018/03/12 | 2,729 | 9,307 | <issue_start>username_0: Consider this piece of code:
```
struct Base
{
int x;
};
struct Bar : Base
{
int y;
};
struct Foo : Base
{
int z;
};
Bar* bar = new Bar;
Foo* foo = new Foo;
Base* returnBase()
{
Base* obj = !bar ? foo : bar;
return obj;
}
int main() {
returnBase();
return 0;
}
... |
2018/03/12 | 552 | 1,537 | <issue_start>username_0: I read in a column of a data frame using `fread` from the `data.table` package. Approximately half of the numbers in the vector have double precision while the other half only have integer precision.
```
head(data$value)
#[1] 3 1.2 3.1 1 1.0 5
```
I want to separate the vector into two by pr... |
2018/03/12 | 842 | 3,239 | <issue_start>username_0: According to The [Apple Swift documentation](https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Closures.html#//apple_ref/doc/uid/TP40014097-CH11-ID94): Global functions are closures that have a name and **do not** capture any values. But I ran... |
2018/03/12 | 762 | 3,095 | <issue_start>username_0: I have a Query that Groups by a column which is needed so I get the result that I need, and then I need to return results which should be done by Grouping the previous results by another field.
So basically I have a Survey table,
```
sql = SELECT * FROM Survey S
WHERE S.UserId = 79
... |
2018/03/12 | 556 | 1,058 | <issue_start>username_0: I have the following DataFrames:
```
A =
0 1 2
0 1 1 1
1 1 1 1
2 1 1 1
B =
0 5
0 1 1
5 1 1
```
I want to 'join' these two frames such that:
```
A + B =
0 1 2 5
0 2 1 1 1
1 1 1 1 0
2 1 1 1 0
5 1 0 0 1
```
where A+B is a new dataframe<issue_comment>username_1: Using `add` ... |
2018/03/12 | 631 | 1,494 | <issue_start>username_0: tab\_names (fictional example)
```
id name
3 - Fred
5 - Fred - Family
7 - Marie
9 - Marie - Family
```
In the following very specific situation, 'Fred' and 'Fred - Family' are the same entity.
I need to get 'Fred' id from 'Fred - Family' id.
I know it's strange ...
My idea to solve:
1-... |
2018/03/12 | 578 | 1,958 | <issue_start>username_0: I am trying to run a standard nginx container on one of my GCP VMs. When i run
```
docker run -it --rm -p 80:80 tiangolo/uwsgi-nginx-flask:python3.6
```
I get the following error:
```
Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use
```
However it is a c... |
2018/03/12 | 1,127 | 2,794 | <issue_start>username_0: I would like to populate the 'Indicator' column based on both charge columns. If 'Charge1' is within plus or minus 5% of the 'Charge2' value, set the 'Indicator' to RFP, otherwise leave it blank (see example below).
```
ID Charge1 Charge2 Indicator
1 9.5 10 RFP
2 22 20... |
2018/03/12 | 1,225 | 3,186 | <issue_start>username_0: **Hey, guys!
I have simple R script for parse JSON file:**
```
json <-
rjson::fromJSON(readLines('http://data.rada.gov.ua/ogd/zpr/skl8/bills-
skl8.json', warn=F))
bills <- data.frame(
id = numeric(),
title = character(),
type = character(),
subject = character(),
rubric =... |
2018/03/12 | 385 | 1,129 | <issue_start>username_0: I am running a cURL command in Linux that is returning 200.
```
curl -sL -w "%{http_code}" "http://google.com" -o /dev/null
```
However, If I run the same as below, I get "Fail" as output:
```
if [ "curl -sL -w "%{http_code}" "http://google.com" -o /dev/null" == "200" ]; then echo "Success... |
2018/03/12 | 585 | 1,825 | <issue_start>username_0: I'm noticing that Firefox is not displaying my table correctly, Chrome and IE are working as desired. Where I see the issue is on the top and bottom rows of a table. I'm rounding the edges of the table using the following
```
table {
border-radius: 15px;
}
.topLeft {
border-top-left-r... |
2018/03/12 | 779 | 2,581 | <issue_start>username_0: I am creating an `express` server. This is the snippet.
```
const app = express();
app.use(cookieParser()); // mainly used to retrieve and store CSSO tokens
app.use(bodyParser.json());
app.use(function(req, res, next) {
res.header("Access-Control-Allow-Origin", "https://the.real.url.com:... |
2018/03/12 | 747 | 2,238 | <issue_start>username_0: i'm trying to impl some post mortem debugger ,
means to catch only exception who not handled by the program,
so i'm sets unhandled exception filter (and make sure no one set it after me)
but i have some cases (e.g in mshtml.dll) that access violation occur but no unhandled exception filter call... |
2018/03/12 | 898 | 3,672 | <issue_start>username_0: I want to share my own apk file to other, in cordova application. I had tried many plugin, but all the plugin are used to just share the app name and some description only.
<https://www.npmjs.com/package/cordova-plugin-share>
<https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin>
S... |
2018/03/12 | 1,077 | 4,407 | <issue_start>username_0: We're in the process of moving our frontend into a separate project (out of Django). It's a Javascript single page application.
One of the reasons is to make it easier for our frontend developers to do their work, not having to run the entire project -- including the API -- locally. Instead, w... |
2018/03/12 | 2,112 | 8,408 | <issue_start>username_0: I just wanna update my ListView, but I cant. I dont know what. What did I do Wrong? I guess that the Adapter that I created is missing something to return the real adapter that I can handle.
Home.java (MainActivity)
```
protected void onCreate(Bundle savedInstanceState) {
super.onCre... |
2018/03/12 | 708 | 2,102 | <issue_start>username_0: Given the following text
```
KEYWORD This is a test
We want to match the following groups 1:YES 2:YES 3:YES
```
I want to match with "`1:YES`", "`2:YES`" and "`3:YES`" using
```
((\d):YES)
```
If and only if the first word in the complete text is "`KEYWORD`"
Given this test:
```
This is... |
2018/03/12 | 448 | 1,732 | <issue_start>username_0: I cloned a **VSTS (NOT GitHub)** repository with bash on windows using URL like <https://myproj.visualstudio.com/repo> and now I'd like to be able to use in-built **VS2017** git window for my work, however when I do say **Pull** I get a window asking for my username/password and after I provide... |
2018/03/12 | 1,433 | 5,789 | <issue_start>username_0: I know there are a few similar questions around relating to this, but it's still not completely clear.
For example: If in my C source file, I have lots of defined string literals, as the compiler is translating this source file, does it go through each character of strings and use a look-up ta... |
2018/03/12 | 676 | 3,249 | <issue_start>username_0: I store the user id in the SharedPreferences when the user logged in
and I check when the user open the app if the id in the SharedPreferences is not null so the app will open its main screen without asking the user to log in again. Also, when the user logged out I delete his id from SharedPref... |
2018/03/12 | 811 | 3,237 | <issue_start>username_0: At the past, I can convert and save an usercontrol to an JPEG image with this code:
```
private string CreateBitmapImage(FrameworkElement usefulData, string name) // Tekli görev kartını masaüstünde oluşturmak için, resim yaratma fonksiyonu.
{
try
{
string fu... |
2018/03/12 | 272 | 1,013 | <issue_start>username_0: I want to join two subqueries in knex.js and produce this sql result.
```
SELECT '*'
FROM
(
SELECT
`*`
FROM
`A`
WHERE
A.id = 1
) AS `t1`
LEFT JOIN
(
SELECT
*
FROM
`B`
WHERE
B.id = 2
) AS `t2`
ON
`t1`.`c` = `t2`.... |
2018/03/12 | 450 | 1,542 | <issue_start>username_0: When I run this ggplot2 code using With this dataset ([download here](https://drive.google.com/file/d/15gnRA_5arCCisLxDYNPsRLLM1KLhTSP1/view?usp=sharing))...
```
ggplot(data=P4L_melt, aes(variable, y=value)) + geom_boxplot(aes(fill=Species), alpha=0.7, lwd=0.5, outlier.shape=NA) + geom_point(p... |
2018/03/12 | 929 | 3,630 | <issue_start>username_0: So, dijkstra algorithm is (the best one) used to search for the shortest path of a weighted(without negative) and connected graph. Dijkstra algorithm can be used to find the shortest path of two points/vertices. AND it can be used to find the shortest path of all the vertices.
questions:
is m... |
2018/03/12 | 789 | 3,105 | <issue_start>username_0: i am trying to understand reactnavigation and i am setting up a concept app to understand.
What i am struggling at first is, that i get the Error Message "The component for route "SomeRoute" must be a React Component"
I do know, what it means, but i do not understand why this error is thrown.... |
2018/03/12 | 1,136 | 4,367 | <issue_start>username_0: I'm using `react-router-dom` for my routing and, since I'm also using GitHub Pages, I need to use `HashRouter` in my `Router.jsx` like so
```
import React from 'react';
import { HashRouter as Router, Route, Switch } from 'react-router-dom';
import Home from './Home';
import Customer from './C... |
2018/03/12 | 2,600 | 8,079 | <issue_start>username_0: This is my HTML page:
<https://jsfiddle.net/62czmtvt/2/> (to actually see the HTML page working)
Code from JSFiddle:
```css
:root {
background-color: #FFFACD;
}
div.infoguide {
width: 240px;
font-family: Arial, sans-serif;
font-size: 13px;
background-color: #F0FFF0;
}
d... |
2018/03/12 | 453 | 1,816 | <issue_start>username_0: I want to save a value from my LoginActivity and Provide that to my MainActivity, but currently Log.d does not Show anything.
I tried using shared preferences.
My LoginActivity:
```
// I want to save email to mainactivity
SharedPreferences webrtcOptions = getSharedPreferences("webrtcOptions",... |
2018/03/12 | 347 | 1,399 | <issue_start>username_0: If i have micro with no PWM module , how to generate output of duty cycle (20%) on pin 1 , and output with duty cycle(80) on pin2
using one counter and interrupt not polling.<issue_comment>username_1: Configure a timer to interrupt periodically. The timer period should be 1/100th (or 1/10th or... |
2018/03/12 | 505 | 1,428 | <issue_start>username_0: When I ssh into a server and run the command, it works:
```
$ssh -q postgres@XXXXX
Last login: Mon Mar 12 12:30:16 2018 from 10.101.XXX.X
[postgres@pgsdba203 ~]$ df -hP | grep pgsql | awk '{ if ($5 >= 70) print $0 }'
/dev/mapper/pgvg-pg_log 9.9G 7.2G 2.2G 77% /var/lib/pgsql/data/pg_log
``... |
2018/03/12 | 1,034 | 4,089 | <issue_start>username_0: I'm trying AWS auto-scaling for the first time, as far as I understand it creates instances if for example my CPU Utilization reaches critical level, that I define.
So I am curious, after I lunch my instance I spend a fair amount of time configuring it and copying the data, if AWS auto-scales ... |
2018/03/12 | 386 | 1,658 | <issue_start>username_0: I am trying figure out best possible way to write a common logic in Spring MVC application. I have a Controller A which would be called which would invoke any another Controller based on request attributes which return [json](/questions/tagged/json "show questions tagged 'json'") data.
I want ... |
2018/03/12 | 754 | 2,929 | <issue_start>username_0: I'm trying to reference an image like this:
```

```
This works until the attribute has a plus sign. I already know that the + sign has a semantic meaning but I'd like to keep it, because some values have the plus sign.
I've tried:
```
 remains empty unless I go into the Excel interface and list the Addins, then Application.Addins will populate with all the addins.
I tried using "Application.VBE.AddIns.Update" and "Exc... |
2018/03/12 | 723 | 2,685 | <issue_start>username_0: I have a table with primary key, indexed field and an unindexed timestamp field.
* Does it more efficient to query by timestamp too? lets say - 12 hours period?
* Is it enough to query by primary key or is it better to use indexed fields too? Lets say that query by the indexed field is not a m... |
2018/03/12 | 510 | 1,664 | <issue_start>username_0: I need to optimize a table (It's INNODB) where I'm going to do a query using `IN` in two columns.
This is the query:
```
SELECT `emails`.* FROM `emails`
WHERE (`from` IN ('<EMAIL>', '<EMAIL>') OR `to` IN ('<EMAIL>', '<EMAIL>'))
```
the `from` and `to` fields are `VARCHAR(255)`
How I can... |
2018/03/12 | 1,909 | 7,031 | <issue_start>username_0: I have a reducer named "leagues" in the redux state tree, which is just an array of individual league objects. Each league has a unique id (assigned in the backend), and a name.
I'm trying to write a Component that represents an individual league, and so I want to have a mapStateToProps funct... |
2018/03/12 | 1,504 | 5,733 | <issue_start>username_0: Im fairly new to c# and learning more daily though im stuck with this and can't find anything similar
On form load i would like to display:
\* Current windows user
\* Current IP
\* Hostname
And other system info directly into labels. Any pointers to where i can learn how do this or an examp... |
2018/03/12 | 505 | 1,980 | <issue_start>username_0: I am stuck trying to write a test case that will check whether the code goes inside of an `except` block.
My method `foo()` in case of an exception doesn't throw/raise it, it just logs information.
I have tried to use [assertRaises](https://docs.python.org/2/library/unittest.html#unittest.Tes... |
2018/03/12 | 627 | 1,849 | <issue_start>username_0: I'm making a multipart upload. Its request headers look like:
```
Accept:application/json,text/javascript
Accept-Encoding:gzip, deflate, br
Accept-Language:en-US,en;q=0.9
Connection:keep-alive
Content-Length:733
Content-Type:multipart/form-data; boundary=----WebKitFormBoundary9Am5omyM263xjTB2
... |
2018/03/12 | 592 | 1,957 | <issue_start>username_0: I've a problem that I am not able to solve. I'm studying a Convolutional Neural Network for traffic sign recognition but I don't understand how python .p files are organized, what these files contain and how to create a .p file to insert my images and labels associated with such images. Can any... |
2018/03/12 | 1,983 | 7,163 | <issue_start>username_0: I want to access a class variable.but assign data in a constructor.
EX:
```
class Student {
constructor(data) {
this.data = data;
this.extraVariable = "Value"
}
getData() {
return this.data
}
}
var s = new Student({name: 'Abcd', subject: 'Javascript'});
... |
2018/03/12 | 1,057 | 2,461 | <issue_start>username_0: I'm not quite sure what I'm doing wrong, but I cannot get fillna() to work on my dataframe. Here's the snippet:
```
print(featureframe.mean())
featureframe = featureframe.fillna(featureframe.mean().to_dict())
if featureframe.isnull().values.any():
print("Still NaN in data")
print(featu... |
2018/03/12 | 1,133 | 2,508 | <issue_start>username_0: I have an Array full with dictionaries,
```
(
{
"id_color" = 8;
nombre = "Amarillo p\U00e1lido";
},
{
"id_color" = 9;
nombre = "Amarillo p\U00e1lido/toffy claro";
},
{
"id_color" = 13;
nombre = Azul;
},
{
"id_color" = 12;
nombre = Magenta;
},
... |
2018/03/12 | 1,233 | 4,046 | <issue_start>username_0: When initializing my postgres database with sqalchemy, I am getting an AttributeError: can't set attribute error:
```
Traceback (most recent call last):
File "manage.py", line 567, in
manager.run()
File "/usr/local/lib/python3.6/site-packages/flask\_script/\_\_init\_\_.py", line 417, in r... |
2018/03/12 | 900 | 2,902 | <issue_start>username_0: I recently decided to make a change to a div (#BG) which automatically keeps it horizontally centered with a css rule:
margin:25px auto 0 auto
Unfortunately this also makes other divs (#nextBtnBG and #nextBtn) inside of it not align to the right like it used to. If I make the window wider it ... |
2018/03/12 | 863 | 2,995 | <issue_start>username_0: I want to do this:
```
import { var1, var2, var3 } as Vars from './file';
```
Because I don't want ALL of the files, which I could accomplish using:
```
import * as Vars from './file';
```
Any reason this is not supported in ES6?
**edit:** Any workarounds? Bundler optimizations are more... |
2018/03/12 | 1,142 | 5,001 | <issue_start>username_0: Have a question for Android Developers. I've been in the Udacity Android Beginners course over the last couple of months and had a fellow student tell me I should be calling the `finish()` method on my intents when I move to a new Activity. I googled around and looked at developer documentation... |
2018/03/12 | 407 | 1,172 | <issue_start>username_0: I have an URL of the form:
```
http://www.foo.com/bar?arg1=x&arg2=y
```
If I do:
```
request.url
```
I get:
```
http://www.foo.com/bar?arg1=x&arg2=y
```
Is it possible to get just `http://www.foo.com/bar`?<issue_comment>username_1: Edit:
There is a way to do this via requests library
... |
2018/03/12 | 728 | 2,404 | <issue_start>username_0: My goal is to build a RESTful API communication, between a python server and an android (java) client.
I want to start with a client using the URL in chrome, and then with an android-java client.
I have a very simple Flask server:
```
from flask import Flask
app = Flask(__name__)
@app.route... |
2018/03/12 | 430 | 1,612 | <issue_start>username_0: I am new to JavaScript.
I have been creating a game- which includes the number of goes a person has had to guess a random number.
I have created the button however I am having problems trying to restart the game - making a new random number to be generated and the number of goes to return to ... |
2018/03/12 | 902 | 2,924 | <issue_start>username_0: I wanted to export data from *netezza database* to *CSV* file.
The format for the data will be:
```
col1,col2,col3
```
OR:
```
"col1","col2","col3"
```
I am using the query:
```
CREATE EXTERNAL TABLE 'H:\\test.csv' USING ( DELIMITER ',' REMOTESOURCE 'ODBC' ) AS
SELECT * FROM TEST_TABLE... |
2018/03/12 | 740 | 2,662 | <issue_start>username_0: Application insight connector in oms is not pulling custom properties that were logged in application insight.
I have application where i write additional request specific context data in custom properties when calling trace, error, warning methods.
In oms i want to filter based on these cust... |
2018/03/12 | 799 | 2,967 | <issue_start>username_0: I am using CKEditor. Within my page, the user can dynamically add/remove the element containing the WYSIWYG ckeditor text editor.
`CKEDITOR.instances` returns an object which contains within it all the ck\_editor objects on my page.
When the user clicks the `add` button, then the following c... |
2018/03/12 | 871 | 3,050 | <issue_start>username_0: I am getting stuck in a situation, where I am creating a table and according to the table i want to create a procedure, but its showing an error.
I will provide snaps of that errors and i will provide table structure and proc structure:
Please help.. thank you
Table :
```
create table Stude... |
2018/03/12 | 328 | 1,277 | <issue_start>username_0: I would like to use the following code for a request to dynamoDB:
```
var result = dynamodb.getItem(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else {
console.log(data); // successful response
}
});
```
and subsequently use th... |
2018/03/12 | 584 | 2,157 | <issue_start>username_0: I have this code:
```
$( "#drawingSurface" ).mousedown(function(event) {
$('.infoText').text('Started! Please Wait..');
compilation(); // this takes a long time.
}
```
Now no matter what I do, `$('.infoText').text('Started! Please Wait..');` will just not execute. The element is there, it ... |
2018/03/12 | 3,472 | 11,650 | <issue_start>username_0: ```
from tkinter import *
import os
creds = '<PASSWORD>'
def start():
global rootE
rootE = Tk()
rootE.title('welcome')
greeting = Label(rootE, text='What yould you like to do?' )
sign = Button(rootE, text='register', command=Signup)
login = Button(rootE, text='log in', c... |
2018/03/12 | 654 | 2,296 | <issue_start>username_0: How do I save a shared query in App Insights? I can't seem to find any info on this. Am I missing it?
When I go to save a query, I don't see anything asking me about the location.
[](https://i.stack.imgur.com/sSRHL.png)
I do see [... |
2018/03/12 | 1,008 | 3,939 | <issue_start>username_0: I'm trying to get a script working which is able to batch export .mts format video files via quicktime into .mov files in 1080p. The script fails with the following error: "The action “Run AppleScript” encountered an error: “QuickTime Player got an error: Can’t make file (document "00000.MTS") ... |
2018/03/12 | 448 | 1,310 | <issue_start>username_0: I have a pandas dataframe that looks lie:
```
A
3 days
NaT
4 days
```
Is there a way to replace the NaT with 0 days ?
thanks,
Ed<issue_comment>username_1: ```
df.A = pd.to_timedelta(df.A)
df.fillna(0)
A
0 3 days
1 0 days
2 4 days
```
Upvotes: 3 <issue_comment>usern... |
2018/03/12 | 667 | 1,895 | <issue_start>username_0: I'm trying to save some ID values from CSV that are automatically converted to exponent numbers by Excel.
Like `382383816413` becomes `3.82384E+11`. So I'm doing a full import into my MySQL database with:
```
LOAD DATA LOCAL INFILE
'file.csv'
INTO TABLE my_table
FIELDS TERMINATED BY ';'
ENC... |
2018/03/12 | 649 | 1,945 | <issue_start>username_0: I need to parse a remote JSON file using a header with a get request in **Angular 5**. Not sure how to do it with **GET** along with **header**.
Something like this but in **Angular 5**:
```
let headers = new Headers({
'key': 'Value',
'key2' :'value2'
});
let request_option = new RequestO... |
2018/03/12 | 465 | 1,625 | <issue_start>username_0: I wrote a case statement in my select query as follows. I am not sure about the syntax for If else in SQL Server and also I want to name the column using 'as' but it's throwing error saying wrong syntax near 'as'. Please help. T
```
select
a.account_id as [Account Id],
substring(a.acc... |
2018/03/12 | 1,433 | 3,559 | <issue_start>username_0: I have a big CSV file containing contacts, all the non-latin characters are displayed like that:
Zürich (Zürich)
Grône (Grône)
Chesières (Chesières)
Genève (Genève)
I tried to replace them with their right characters, like:
```
str_replace('ü', 'ü', $string);
```
They don... |
2018/03/12 | 1,337 | 3,420 | <issue_start>username_0: I need my customers to add their credit card info, but I don't want to charge them right away. Is there any way, I can add their details to charge later when using Stripes `checkout` solution and just store their card token first?
I am using Laravel Cashier on the backend.<issue_comment>usern... |
2018/03/12 | 710 | 2,212 | <issue_start>username_0: ```
class A {};
class B{
unique_ptrupA;
public:
B() : upA(make\_unique()) {}
void set(A a){
upA.reset(move(a)); //error
//upA.reset(a); //error
//upA = move(a); //error
}
};
```
How can you re-assign (a.k.a set) class member that is unique\_ptr?<issue_comment>username_1: It depend... |
2018/03/12 | 2,098 | 7,900 | <issue_start>username_0: I have an Interface `ISomeThing`:
```
public interface ISomeThing {}
```
and 2 types implementing it:
```
public class SomeThing1 : ISomeThing {}
public class SomeThing2 : ISomeThing {}
```
and then I have a type using those types:
```
public class FooBar
{
public ICollection Foo { ... |
2018/03/12 | 1,176 | 4,102 | <issue_start>username_0: I am trying to run PHP code on Microsoft VS Code. When I click launch the only thing that happens is an error in the debug console saying:
>
> spawn php ENOENT
>
>
>
To fix this, I have put the dll file for XDebug into the ext folder. I copied php.ini-development into a new file called ph... |
2018/03/12 | 644 | 2,296 | <issue_start>username_0: I want to export charts to a PPT and am using the officer package to achieve the same. However, the default resolution of the charts is low and I would like to change that. I am currently using the following call
```
ph_with_gg(p1,type = "chart",res = 1200)
```
where p1 is a ggplot objec... |
2018/03/12 | 349 | 1,097 | <issue_start>username_0: I know that I could use `locals()` or `globals()` to either get all of the local or global variables used in a Python script environment, but does Python have a keyword that I can use to call only the variables inside a function?
For example:
```
def function():
a = 3;
b = 4;
c =... |
2018/03/12 | 595 | 1,852 | <issue_start>username_0: I have seen multiple answers on deleting most recent commit but can't find any where an older commit is deleted as well.
I have the last four commits as:
```
bc8354f Revert Merge branch 'repo/develop' into M372046"
edce31a Good commit2 M372046
926b7de Good commit1 M372046
422f6cb Merge branch... |
2018/03/12 | 2,345 | 8,110 | <issue_start>username_0: I am trying to upgrade the version of activemq from 5.7 to 5.14.5.
Steps I followed are as follows:
1. Downloaded new files for 5.14.5
2. Replaced with the existing 5.7 files.
3. Modified Activemq.xml for the customized configuration and also added ojdbc14.jar to lib folder. Modifed some of t... |
2018/03/12 | 316 | 1,131 | <issue_start>username_0: Do you have an idea to pass this UnitTest?
```
@Test public void convert() {
byte[] num = {1,0,0,0};//little endian
byte[] answer = {0,0,0,1};//big endian
assertArrayEquals(answer , Convert.converting(num));
}
public static byte[] converting(byte[] value) {
//TO DO ... |
2018/03/12 | 727 | 2,207 | <issue_start>username_0: I have found many examples showing how to copy the contents of a boost::beast::multi\_buffer to a string, but how do I assign the contents of a string to a multi\_buffer that has previously been created in a class instance?
If I have the example declarations in my class:
```
private:
boos... |
2018/03/12 | 873 | 3,508 | <issue_start>username_0: I've been unsuccessful in locating a call that would allow me to create a KMS encrypted bucket in S3 (using the Java AWS SDK).
Does such a method exist? And if so, where can I find examples/documentation?<issue_comment>username_1: [Have a look at this example](https://docs.aws.amazon.com/sdk-f... |
2018/03/12 | 929 | 3,737 | <issue_start>username_0: I have a `ListView` display file from SD card. I want to add a button for deleting all items from `ListView` and from SD card. I tried the following, but it deletes one. And after clicking the button a second time, it deletes another one.
```
Button delete = (Button) findViewById(R.id.delete);... |
2018/03/12 | 1,089 | 3,556 | <issue_start>username_0: Apologies if this is a duplicate, but I could not find a similar question.
I have a toy dataframe:
```
A B participant
0 1 3 1
1 2 4 1
2 5 8 2
3 4 9 2
```
I have a list that corresponds to a *single* measurement made for each partici... |
2018/03/12 | 1,646 | 4,421 | <issue_start>username_0: I'm trying to print a `list` with `{}` curly braces.
For example:
```
the_list = [1, 2, 3]
```
and I want to print the list as
```
{1, 2, 3}
```
How can I do that?
Thanks!<issue_comment>username_1: You can do this like this:
`print('{' + ', '.join([str(x) for x in the_list]) + '}')`
`'... |
2018/03/12 | 1,686 | 4,659 | <issue_start>username_0: I have some SQL (not written by me) and I cannot find the meaning of it.
Statement is similar to:
```
INSERT INTO OPENQUERY (linkedServerName, "SELECT col1, col2 FROM service WHERE ServiceId < 0")
(col1, col2)
SELECT col1, col2 FROM Service
```
I get the point with "insert into" part, bu... |
2018/03/12 | 700 | 1,985 | <issue_start>username_0: I am trying to extract pixel values from an image as a list:
```
from PIL import Image
im = Image.open('exp.jpg','r')
pix_val = list(im.getdata())
pix_val_flat = [x for sets in pix_val for x in sets]
print(pix_val_flat)
Error:
File "C:/Users/anupa/Desktop/All Files/LZW/Code/image.py", lin... |
2018/03/12 | 306 | 1,137 | <issue_start>username_0: i need a trick, i have in my xamarin.forms app a listview, but it don't feel my screen, and it's orrible to see it now, because it take off a quarter of screen without nothing, could you helo me?
XAML:
```
```
I want the heghtrequest will scale automatically with the device or have a standar... |
2018/03/12 | 347 | 1,304 | <issue_start>username_0: I have an excel file of which I need to convert a string into a date. The string is written in dutch, so "15 juli 2018", instead of "15 july 2018". My excel is in english. I know that Excel has many date formats built in, but it doesn't recognize the dutch string as a date. So my problem is tha... |
2018/03/12 | 870 | 3,276 | <issue_start>username_0: I have a recyclerview that yields all contacts and each contact's phone numbers if they have more than one. When I test my code, in my logcat, I get all the phone numbers. For instance:
```
I/System.out: name : <NAME>, ID : 1
I/System.out: 018-65 5678
I/System.out: 597-676-643-64
```
However... |
2018/03/12 | 659 | 2,216 | <issue_start>username_0: ```
function makeMultiplier(multiplier) {
var myFunc = function (x) {
return multiplier * x;
};
return myFunc;
}
var multiplyBy3 = makeMultiplier(3);
console.log(multiplyBy3(10));
```
So I got this example from an online course, the console prints: **30**
I don't exactly understa... |
2018/03/12 | 611 | 2,097 | <issue_start>username_0: I set up a Django 2 app (and Python 3.6) with a remote MySQL DB (using `mysqlclient`), with proper permissions.
When I run my unit test, I get the following error: `django.db.utils.ProgrammingError: (1146, “Table ‘test_.’ doesn’t exist”)`.
When I manually open the website at `localhost`, ever... |
2018/03/12 | 2,025 | 5,182 | <issue_start>username_0: I'm trying to encode my blob data to base64 so I can pass an image to XML BI Publisher
I initially tried this:
```
select UTL_ENCODE.base64_encode(dbms_lob.substr(EPHOTO, 4000,1))) as
string1 FROM EMPL_PHOTO WHERE emplid='1234';
```
But I get the error:
```
ORA-06502: PL/SQL: numeric or v... |
2018/03/12 | 714 | 2,161 | <issue_start>username_0: How i get the timestamp for time only or this is not possible to do?
```js
h = now.getHours();
m = now.getMinutes();
if(h < 10)
h = '0' + h;
if(m < 10)
m = '0' + m;
var timestring = h + ":" + m;
console.log(now.getTime())); //getTime is get the timestamp consist of date.
```... |