date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/10 | 982 | 3,916 | <issue_start>username_0: Good Evening,
I’m doing some troubleshooting on the beginning of my home automation system. I am trying to toggle a relay using a Raspberry PI 3 and Windows IOT in C#. I’ve been playing with the code and I can see the relay toggle once or twice, but then the app crashes. I’m an IOT Noob, so is... |
2018/03/10 | 353 | 1,326 | <issue_start>username_0: The Google Assistant can currently do this but I'm not sure if there is a way to display a clean table with the [Actions on Google](https://developers.google.com/actions/assistant/responses) library. I would like to reproduce a table similar to what is displayed in the following screenshot:
[![... |
2018/03/10 | 807 | 3,138 | <issue_start>username_0: I'm trying to create a powershell script to allow my kids to reboot my Raspberry Pi from their Windows computer if need be. I've tested everything and have gotten it to work, but the only hitch is that it's prompting for a username and password. I realize the line that's doing it is:
```
New-S... |
2018/03/10 | 426 | 1,320 | <issue_start>username_0: I'm trying to go through an array from any position l to the end, but once it reaches the last position instead of leaving the while cycle it shows me an error "list index out of range"
```
while l <= len(ordenado):
ñ = ordenado[l]
contador2 = contador2+ñ
l = l+1
```
I've s... |
2018/03/10 | 622 | 1,514 | <issue_start>username_0: I have a data frame as below.
```
In [23]: data2 = [{'a': 'x', 'b': 'y','c':'q'}, {'a': 'x', 'b': 'p', 'c': 'q'}, {'a':'p', 'b':'q'},{'a':'q', 'b':'y','c':'q'}]
In [26]: df = pd.DataFrame(data2)
In [27]: df
Out[27]:
a b c
0 x y q
1 x p q
2 p q NaN
3 q y q
```
I want... |
2018/03/10 | 801 | 2,763 | <issue_start>username_0: I've got a long list of commands strung together (aws cli, jq, cut, sed) that works for me with which I'm trying to now run within a bash script. I'm having problems with the single and double quotes.
If I ran this manually it would be the following:
```
aws \
--profile app-prod \
--regi... |
2018/03/10 | 1,726 | 6,633 | <issue_start>username_0: Problem
=======
When using mongoose to find documents by a specific field, if the type of the field is different from the type of the queried value, then mongoose will attempt to cast the query value to the same type as the field.
However, if the value cannot be casted, then mongoose will thr... |
2018/03/10 | 685 | 2,503 | <issue_start>username_0: ```
```
if Name is empty or null, bind with NameOpt
Something like this:
```
```<issue_comment>username_1: May be my answer is a bit silly and straight forward. But I would like to do it this way.
```
fooSchema.statics.findOneByBar = function(id: any) {
if (!mongoose.Types.ObjectId.isVal... |
2018/03/10 | 4,177 | 12,811 | <issue_start>username_0: I am attempting my first go at JFrames in Java, and whenever I run my program an empty window shows up. I have added my buttons, my panel, yet it is completely blank. Is there anything specific about JFrame that I should know that could cause this mistake? The final product has no buttons at al... |
2018/03/10 | 515 | 2,050 | <issue_start>username_0: I am trying to run the simple Jaunt example from the website and got an error for Null Pointer Exception. I am not sure what to do because there is very little support for using Jaunt in Android Studio. Here is my code:
```
public class MainActivity extends AppCompatActivity {
@Override
prote... |
2018/03/10 | 516 | 1,508 | <issue_start>username_0: I am trying to format datafile but my problem is some files have more variables included than others. I want to change the column names to fit my master datafile.
For example
```
df <- data.frame(
f =c(111,123,128),
w = c(99,84,102),
s = c(122,105,112) )
```
Returns
`... |
2018/03/10 | 1,260 | 4,666 | <issue_start>username_0: how to implement a tail recursion functions in scala with futures as return values:
**Example code**
```
def getInfo(lists: List[Int]): Future[List[Int]] = {
def getStudentIDs(lists: List[Int]): Future[List[Int]] = {
//here a web service call that returns a future WS response
v... |
2018/03/10 | 366 | 1,345 | <issue_start>username_0: I have a string with the name of the file that I want (R.drawable.square) to put in the imageview.
```
String shape = "square"
```
I am trying to use the method below to show the image
```
imageView.setImageResource()
```
Hardcoding the filename in works but I want to be able to pass dif... |
2018/03/10 | 376 | 1,471 | <issue_start>username_0: I have an angular 4 app on an IIS 8 backend. The angular app gets its configuration from a JSON file stored in assets/data/config.json. The request is via httpClient.get() method. Problem is I need to have the angular app to receive the file when needed but I would like to prevent somebody to t... |
2018/03/10 | 1,388 | 4,269 | <issue_start>username_0: I have a JSON file that is about 8GB in size. When I try to convert the file using this script:
```
import csv
import json
infile = open("filename.json","r")
outfile = open("data.csv","w")
writer = csv.writer(outfile)
for row in json.loads(infile.read()):
writer.write(row)
```
I get t... |
2018/03/10 | 2,352 | 7,523 | <issue_start>username_0: Im a little confused on why.
for some reason with my draw function my textures are drawing from the bottom up.
So 0 is the bottom have i done something wrong with my code.
The width is drawing from left to right like normal.
```
void Texture::draw(float x, float y)
{
// OpenGL calls
... |
2018/03/10 | 782 | 3,126 | <issue_start>username_0: I'm trying to get the `LaravelLocalization::getCurrentLocale()` in the `boot()` method of the Laravel `AppServiceProvider` class, and although my default locale is **pt** I always get the **en**. The package I'm using is `mcamara/laravel-localization`. Code I have:
```
public function boot()
{... |
2018/03/10 | 860 | 3,380 | <issue_start>username_0: I am trying to complete my first successful join but just can't make it work.
Here are my 3 table name and columns:
STORE columns: id (primary), name, type, country
BANKING columns: id, currency
STORE\_BANKING (an intermediary table) columns: store\_id, banking\_id
I have a simple htm... |
2018/03/10 | 2,285 | 7,530 | <issue_start>username_0: I was attempting to generate a public ECDSA key from a private key, and I haven't managed to find much help on the internet as to how to do this. Pretty much everything is for generating a public key from a public key spec, and I don't know how to get that. So far, this is what I've put togethe... |
2018/03/10 | 1,720 | 5,464 | <issue_start>username_0: The documentation isn't 100% clear on this:
>
> Note: when training, the moving\_mean and moving\_variance need to be updated. By default the update ops are placed in tf.GraphKeys.UPDATE\_OPS, so they need to be added as a dependency to the train\_op. For example:
>
>
>
(see <https://www.... |
2018/03/10 | 672 | 1,983 | <issue_start>username_0: I'm trying to achieve an input field with an underline. As it is visually more appealing to me, I'm trying to make underline as close as possible to the font. I did achieve the closeness, but now, input field cuts tail parts of the letters with tails. Is there a possible workaround for this? Ca... |
2018/03/10 | 545 | 1,953 | <issue_start>username_0: I'm new to react and building a simple app with a node/express backend and react front-end. I'm trying to render my App component. I've tried using `ReactDOM.render`, but I'm already importing render from 'react-dom' and making that change did nothing. The file path to the App component is corr... |
2018/03/10 | 1,706 | 5,303 | <issue_start>username_0: I want to be able to report "Unhealthy" when a container becomes so (based on various conditions), for now I just return 500 on an even call and 200 OK on a odd numbered call.
My docker file looks like so:
```
FROM golang:alpine
RUN apk update
RUN apk add curl
RUN mkdir /service
COPY health... |
2018/03/10 | 882 | 3,167 | <issue_start>username_0: We have been using Springboot 1.X for our applications.
Now were are getting ready to start on a few new applications and was wondering if we should go with SpringBoot2.0 or stick with SpringBoot 1.X?
Any thoughts on one version or the other?
Also, what are the differences between Spring Boot... |
2018/03/10 | 719 | 2,353 | <issue_start>username_0: I have a Formula
```
CRange = "B" & CStr(Offset + 1)
IRange = "C" & CStr(j)
ActiveSheet.Range(CRange).Select
'Sheets("Iteration Details").Select
value = CStr(-1 - CInt(Offset) + 3)
Value1 = CStr("R[" & value & "]C")
Dim r As Range
Set r = Range(Value1)
ActiveCell.FormulaR1C1 = _
"=IF(ISTEXT(r... |
2018/03/10 | 821 | 2,804 | <issue_start>username_0: ```
import tensorflow as tf
feature_names = ['length_1',
'width_1',
'length_2',
'width_2']
FILE_TRAIN = 'iris_training.csv'
FILE_TEST = 'iris_test.csv'
def my_input_fn(file_path, perform_shuffle=False, repeat_count=1):
def decode_csv(line):
par... |
2018/03/10 | 365 | 1,259 | <issue_start>username_0: I have to print A (either int or list) as a set.
For example:
How would I print `[[1,2],[4,5,6],[9],[]]` as a set? when I do `set()` with that list inside the `()`, it returns with error: `unhashable type`.
I know I can use recursion, so far I have:
```
def printSet (A):
if A == int:
... |
2018/03/10 | 363 | 1,302 | <issue_start>username_0: ```python
import sys
from class_vis import prettyPicture
from prep_terrain_data import makeTerrainData
from sklearn.tree import DecisionTreeClassifier
from sklearn.metrics import accuracy_score
import numpy as np
import pylab as pl
features_train, labels_train, features_test, labels_test = ma... |
2018/03/10 | 497 | 1,604 | <issue_start>username_0: When I try to print a method that return int using declaration tag usually scriplets and expression tags can print that method.
```
<%! int print(int i, int j, int k) {
return i + j + k;
}%>
<%= print(10, 20, 30)%>
<% out.print(print(10, 20, 30... |
2018/03/10 | 391 | 1,365 | <issue_start>username_0: I'd like to implement a search box on my site. To be more specific, I want to invoke the search function when I hit enter key in the search box. The html code block I use:
```
- Submit
```
And the js code block:
```
function search() {
let query = $('input').val().trim();
console.lo... |
2018/03/10 | 2,501 | 7,190 | <issue_start>username_0: I know every hive version has some reserve keywords, which cant be used as a column name.
But the problem is my data comes from a json, and my column name are according to the json values.
And I cant modify the data off course.
Is there any alternative??
here is one row of the sample data an... |
2018/03/10 | 763 | 3,076 | <issue_start>username_0: I want to have a function with optional argument. However, VC++ is throwing an error I cannot comprehend. The code is as simple as follows:
```
#include
#include
#include
using namespace std;
void myFunction(string something, int w);
int main()
{
myFunction("a string");
int a = 1;
}
v... |
2018/03/10 | 759 | 2,906 | <issue_start>username_0: I really need help, I can't seem to find an answer to this. What I want to happen is during the inbound of data from the xml to the system, the PRNUM will be queried to the PRLINE object (which is the child object of the PR) so that I can get the CONTRACTNUM field, but I cant seem to get a valu... |
2018/03/10 | 239 | 976 | <issue_start>username_0: I have installed Android Studio but I can't find the way to run facebook app on emulator.
Here is the snapshot of running Android Studio:
[](https://i.stack.imgur.com/NcK7m.png)
This seems like an tool to develop app.
How c... |
2018/03/10 | 259 | 1,077 | <issue_start>username_0: I am running the following command within a batch script:
```
netsh advfirewall firewall show rule name ="MyCustomRule"
```
And it gives out either a string "No rules match the specified criteria." or multiple rows.
I would like to be able to assign its output to a variable something like:
... |
2018/03/10 | 340 | 1,198 | <issue_start>username_0: I have this table:
```none
Parenttbl
ID Name ParentID
---------------------
1 Mary Null
2 Jane 1
3 Jenny 2
4 Jessa 3
```
I wanted to create a query that will loop from child to parent. For example if I give number 4 as `ID` it will return `3`, `2` , `1`, `Null` ... |
2018/03/10 | 642 | 1,974 | <issue_start>username_0: I want to multiply a PHP variable value and a JavaScript variable and display it on the screen.
Here's my code (PHP file):
```html
php
require 'config.php';
session_start();
?
php
$uname = $\_SESSION['username'];
$query = "select \* abc where username='$uname'";
$query\_run = mysq... |
2018/03/10 | 1,306 | 4,261 | <issue_start>username_0: When I upload my code , after 3 iterations of the loop() , I get an soft wdt reset and the NodeMCU restarts. It happens everytime. What would be the error ?
```
#include
#include
#include
#include
// Set these to run example.
#define FIREBASE\_HOST "plugmatebeta.firebaseio.com"
#define FI... |
2018/03/10 | 599 | 1,730 | <issue_start>username_0: In Python 3, is there a way to do a list comprehension where some object, x, gets inserted into the list if it's not already in the same list. I basically want the code to do this:
```
my_list = ["aa", "aa", "bb", "bb"]
new_list = [c for c in my_list if c not in new_list] ## Add each c from m... |
2018/03/10 | 469 | 1,730 | <issue_start>username_0: Hi I've tried to uninstall global @angular/cli but I still can use ng -v and it reports warning: Your global Angular CLI version (1.7.0) is greater than your local
I tried:
```
npm uninstall -g angular-cli
npm uninstall -g @angular/cli
npm cache verify
```
But ng -v still report the warning... |
2018/03/10 | 438 | 1,325 | <issue_start>username_0: I have an array and select multiple fields. What I am trying to do is whenever the file load all the select option will get selected using the array ID. My array is
>
> Array( [0] => 3 [1] => 5 [2] => 9 )
>
>
>
And what my select field is:
```
php
$myArray = explode(',',$empInfo[0]['... |
2018/03/10 | 2,351 | 6,806 | <issue_start>username_0: I have a worksheet where I copy data from Table1 to Table2.
Once I have copy-pasted the data to Table2, which sits below Table1, I select the first cell in the first column of Table2 and press `Ctrl`+`Shift`+`Down` to select down to the last used cell. Finally, I apply a concatenation array fo... |
2018/03/10 | 3,602 | 6,996 | <issue_start>username_0: Okay - I have this hex data and I have a list of tags:
the raw data may look like this:
```
5F201A54444320424C41434B20554E4C494D49544544205649534120204F07A00000000310105F24
```
Because I have a list of tags I can see there are multiple values here
Tags [5f20, 4f, 5f24]
>
> Ex:
> **5F20**... |
2018/03/10 | 486 | 1,941 | <issue_start>username_0: C++ standard introduces new APIs while keeping compatible with C APIs. The headers of C wrappers begin with "c" such as , and . Their correspondent C++ headers are , and .
My question is why STL doesn't provide a new math library even though there are a number of flaws in old C APIs. The fla... |
2018/03/10 | 283 | 940 | <issue_start>username_0: I am new in python and I want to print a range, but when I run the program dosent print anything.
```
dec_value=int(input("ENTER THE DECREMENTED VALUE"))
for i in range(100,0,dec_value):
print(i)
```
Can someone please tell me what I am doing wrong?<issue_comment>username_1: `dec_value` (... |
2018/03/10 | 856 | 2,788 | <issue_start>username_0: Preface: This question is not a duplicate of this one:
[switch case indentation](https://stackoverflow.com/questions/5263692/switch-case-indentation)
This question is also not opinion-based. I am not seeking the "best" style. I am not asking what is the "right" thing to do.
What I am asking ... |
2018/03/10 | 549 | 1,189 | <issue_start>username_0: how can we swap the multiple element in the list?
```
a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
```
if i want to swap 1, 2, 3, 4 to the bottom and 11, 12 to the top, like:
```
a = [11, 12, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4]
```
i've used tuple method:
```
(a[:4], a[10:]) = (a[10:], a[:4])
... |
2018/03/10 | 755 | 2,449 | <issue_start>username_0: I have a .txt file with the date and time stamped between [ ] on each new line, and then other text after the fact. I want to retain only the text after the time stamps and the names, so how would I code this in bash using sed substitution?
The timestamps are of varying character lengths, as ar... |
2018/03/10 | 832 | 2,835 | <issue_start>username_0: I have the same database on 2 servers. One is with Cpanel running mysql other one its CWP with mariadb. Both databases are identical, tables have the same index, mysql variables are identical but the performance its way different:
```
SELECT
DISTINCT item_id
FROM ... |
2018/03/10 | 564 | 2,473 | <issue_start>username_0: While studying operating systems concepts, I saw the term trap instruction.
"A TRAP instruction is performed to switch from
user mode to kernel mode." I failed to understand what a trap instruction does.<issue_comment>username_1: A trap is an exception in a user process. It's caused by division... |
2018/03/10 | 1,304 | 3,620 | <issue_start>username_0: I have two data files as below:
```
course.txt
id,course
1,Hadoop
2,Spark
3,HBase
5,Impala
Fee.txt
id,amount
2,3900
3,4200
4,2900
```
I need to list all course info with their fee:
```
sqlContext.sql("select c.id, c.course, f.amount from course c left outer join fee f on f.id = c.id").... |
2018/03/10 | 677 | 2,501 | <issue_start>username_0: If I do "mysqld --initialize-insecure", it will be fine with login after initialization, but if I omit "insecure", that will be secure initialization, after which I need a password to login, but I haven't set any password yet.
The menu [data-directory-initialization-mysqld](https://dev.mysql.c... |
2018/03/10 | 621 | 2,406 | <issue_start>username_0: When setting cookies, PHP url-encodes the cookie value (at least when not using `setrawcookie`) **and it url-decodes the cookie value** before making it available to the application in `$_COOKIE`.
Is this an accepted standard? If I set a raw cookie value of `a%3Db`, would I get back `a=b` in m... |
2018/03/10 | 881 | 3,163 | <issue_start>username_0: What's the real use case of this?
```
std::integral_constant
```
I can understand this is a wrapper with value 2:
```
typedef std::integral_constant two\_t
```
But why not just use 2 or define a const int value with 2?<issue_comment>username_1: `2` is value, while `two_t` is a type. They ... |
2018/03/10 | 1,468 | 3,740 | <issue_start>username_0: I have two dataframe A & B with same columns in both except primary key (in the real data I have more than 50+ column like that), Now I want to compare the 'summary' stastics (normal R summary() command) for both the dataframe but for comparison purpose I want to see it next to each other as gi... |
2018/03/10 | 1,473 | 3,926 | <issue_start>username_0: I'm working on a redesign of my photography site and am setting up a simple slider for some of my photos. I'm having issues getting the images to be centered in divs with padding all around. I'm trying to mimic how photos look on my [Instagram](https://www.instagram.com/joe_scotto/) where they'... |
2018/03/10 | 523 | 1,837 | <issue_start>username_0: I'm trying to create a program to calculate (initial price-discount+shipping)\*tax. I have to use alert and prompt function, but my alert function doesn't seem to work...I've tried moving it and generally copy/pasting frantically (evident in the code), but it seems that the code just doesn't ru... |
2018/03/10 | 701 | 2,701 | <issue_start>username_0: I have a bit of a problem with multiple inheritances. I have a class C that has two base classes, A and B. A is the main base class and B provides a specialization. However, B needs to be able to call a method that is part of A.
My question is, how can I expose A.foo() to B so that it can be c... |
2018/03/10 | 619 | 2,396 | <issue_start>username_0: An answer to this question must exist somewhere but unfortunately I lack the proper vocabulary and terms to find it.
Here is my problem:
I'm creating a multiple choice questions test, and it is made of **slides**. Each Slide contains one *or more* **Questions** so for instance I could have the... |
2018/03/10 | 602 | 1,980 | <issue_start>username_0: I'm trying to write code which is supposed to print all lines which have more then 5 characters, and I don't know where the problem is in my code. Can you help?
```
#include
int main()
{
int i, s, n ;
char c, t[100];
n=0;
puts("start taping lines");
while(c=getchar()!=EOF)
{
s=0;
wh... |
2018/03/10 | 883 | 2,672 | <issue_start>username_0: MySQL, PHP, HTML
So, I'm trying to make "like" buttons for each of my MySQL rows that are displayed on my html page from my table. I have the like button created, and it increases the value, but it increases the value of ALL rows, and I need it to only increase the value of the row that it sit... |
2018/03/10 | 1,047 | 1,579 | <issue_start>username_0: I want to extract the result by indexing an array
```
a = np.array([[10,20,30,40,50,60],
[15,25,35,45,55,65]])
b = np.array([[0,1,2,2,3,4,5,2,5,1,3,4,2,2,3,4,5,2,5,1],
[0,4,5,2,5,1,3,0,2,1,2,2,3,4,5,2,5,1,3,4]])
```
Expected output:
```
a[:,b]
[[10 20 30 30 4... |
2018/03/10 | 418 | 1,631 | <issue_start>username_0: I am using VueJS/Nuxt and Vuex store, and I have the following method defined:
```
async UpdateData () {
try {
await this.$store.dispatch('updateMyData', this.data)
successMsg({ message: 'Data updated successfully' })
} catch (e) {
errorMsg({ message: 'Some error' })
}
}
```... |
2018/03/10 | 1,170 | 4,247 | <issue_start>username_0: EDIT: I installed the v1.0.0.36 beta version and copied the sample from that versions docs (which looks identical to me) and it worked straight away. Not sure what the problem was but thanks for replies
============================================================================================... |
2018/03/10 | 708 | 2,191 | <issue_start>username_0: Example
```
id |u_id
1 | 1
2 | 1
3 | 2
4 | 1
5 | 2
6 | 3
```
I know, the `id` 4 has `u_id` of 1, but I want to select the last row having `u_id` 1 before that with `id` 4 i.e. I want to select the row with the `id` 2.
Note that I don't know this `id`.
How can I achieve t... |
2018/03/10 | 586 | 1,846 | <issue_start>username_0: I'm working on some project and came up with the messy situation across where I've to split the data frame based on the first column of a data frame, So the situation is here the data frame I've with me is coming from SQL queries and I'm doing so much manipulation on that. So that is why not po... |
2018/03/10 | 924 | 2,949 | <issue_start>username_0: I am trying to write a kafka consumer in java using Apache spark. The code is not executing due to some Log4jController error. Don't know what I am missing.
pom.xml file is as follows:
```
org.apache.spark
spark-core\_2.11
2.3.0
org.slf4j
slf4j-api
1.7.25
org.apache.spark
spark-str... |
2018/03/10 | 1,679 | 5,841 | <issue_start>username_0: I am trying to download 12,000 files from s3 bucket using jupyter notebook, which is estimating to complete download in 21 hours. This is because each file is downloaded one at a time. Can we do multiple downloads parallel to each other so I can speed up the process?
Currently, I am using the ... |
2018/03/10 | 812 | 3,030 | <issue_start>username_0: I have an array which looks like:
```
var containers = [2,0,false,"", '12', true];
```
When `filter` method is used like following :
```
var containers = containers.filter(Boolean);
console.log(containers);
```
It prints: `[ 2, '12', true ]`
This holds true even if `Number`, `String` or `... |
2018/03/10 | 2,688 | 10,062 | <issue_start>username_0: How can I create a database seeder factory for the following configuration?
**User**
```
// create_users_table.php
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
...
}
// User.php
public function notes()
{
return $this->morphMany('App\Note', 'note... |
2018/03/10 | 376 | 1,320 | <issue_start>username_0: Whenever I tried to save my table using double data type this error appears please help I'm a newbie.
<issue_comment>username_1: There might have issue in Table Structure.
You have to Set `Double` Datatype with Length,Values ... |
2018/03/10 | 1,302 | 4,661 | <issue_start>username_0: ```
class Program{
void Apple(){
List apple = new List { (new Banana(Cucumber, 5)), (new Banana(Dates, 6)) };
}
}
class Banana{
public Banana(Type eggplant, int feijoa){
new eggplant(feijoa);
}
}
class Cucumber{
public Cucumber(int feijoa){
}
}
class Dates{
public Dates(in... |
2018/03/10 | 275 | 914 | <issue_start>username_0: I have a Ubuntu machine. How can I install Visual Studio Code IDE?
This is the announcement but couldn't figure out how to install in Ubuntu.
<https://blogs.msdn.microsoft.com/pythonengineering/2018/02/15/visual-studio-code-is-now-shipping-with-anaconda/>
Can I do a conda install?<issue_comm... |
2018/03/10 | 499 | 1,426 | <issue_start>username_0: Using bootstrap 3, I have customized a list group like this:
```
[**Item 1**](/path)
[**Item 2**](/path)
[**Item 3**](/path)
```
**CSS**
```
.list-group-item-mine {
background-color: #f1f9fb;
border-top: 1px solid #0091b5;
border-left-color: #fff;
border-right-color: #fff;
}
... |
2018/03/10 | 1,520 | 5,075 | <issue_start>username_0: Here is my code:
```
div {
width: 250px;
}
table {
white-space: nowrap;
}
th {
max-width: 175px;
overflow: hidden;
text-overflow: ellipsis;
}
th:hover {
overflow: visible;
position: relative;
}
th:hover span {
background-color: white;
}
td {
width: 100%;
}
| | |
| --- | --- |
| ... |
2018/03/10 | 1,023 | 3,897 | <issue_start>username_0: why this code compiles
```
var Person = function() {
console.log("CALLED PERSON")};
Person.prototype.saySomething = function() {
console.log("saySomething PERSON")};
var ape = new Person();
ape.saySomething();
```
and this code throws error Cannot set property 'saySomething' of undefined
... |
2018/03/10 | 2,500 | 6,400 | <issue_start>username_0: ```
start = pd.to_datetime("2017-02-21 22:32:41",infer_datetime_format=True)
end = pd.to_datetime("2017-02-22 01:32:41",infer_datetime_format=True)
rng = pd.date_range(start.floor('h'), end.floor('h'), freq='h')
left = pd.Series(rng, index=rng ).clip_lower(start)
right = pd.Series(rng + 1, inde... |
2018/03/10 | 687 | 2,629 | <issue_start>username_0: User is authorized in main app, and Firebase is initialized inside Today Extension:
```
// We check if FIRApp has already been configured with a static var, else it will crash...
if !TodayViewController.isAlreadyLaunchedOnce {
FirebaseApp.configure()
TodayViewController.isA... |
2018/03/10 | 921 | 3,101 | <issue_start>username_0: I'm not sure if I'm checking in the wrong area or if my code to check is wrong. I am attempting to check if employee Id is valid in format 999-A. Any help would be appreciated.
```
public class Employee {
private String name;
private String employeeNumber;
private String hireDate;
... |
2018/03/10 | 539 | 1,930 | <issue_start>username_0: I need help in making the rows enable only when the checkbox is check. The default rows should be disabled but when the checkbox is only check, that row will be enabled. Here's the link to my code
[LINK CODES](https://stackblitz.com/edit/angular-unckmj?file=app/app.component.ts)
```
patchV... |
2018/03/10 | 2,434 | 6,839 | <issue_start>username_0: I am building a map where circles appended to cities on a US map are sized based upon a value in the CSV (guns column or `d.guns` in the JavaScript).
I was able to get the circles to resize using `Math.sqrt()` while appending the circles, but I do not think this is the right way to do it (or i... |
2018/03/10 | 1,803 | 5,264 | <issue_start>username_0: As the title states, I'm having trouble finding a way to send data from an electron.js app to a remote db/server.
I can use mysql to connect directly with a database but it doesn't strike me as a secure thing to do. I would like to send the data, probably a json string, to a php or js file on... |
2018/03/10 | 1,930 | 5,570 | <issue_start>username_0: I am trying to generate dashboard report using jmeter 4.0. First have generated CSV file in Gui mode of jmeter script working fine created ViewGraph10.csv file.Now my requirement is to create dashboard report.
To generate dashboard report I performed below steps.
1.Open command prompt.
2.go to... |
2018/03/10 | 1,771 | 5,056 | <issue_start>username_0: I formatted the date using Carbon in my `.blade` template like this:
```
{{ Carbon\Carbon::parse($event['date_from'])->toFormattedDateString() }}
```
**And it outputs:**
```
Mar 20, 2018
```
So, how to localize the date to for example Russian format:<issue_comment>username_1: The error, I... |
2018/03/10 | 1,889 | 5,397 | <issue_start>username_0: Assume s is a string of lower case characters.
Write a program that prints the number of times the string 'bob' occurs in s. For example, if s = 'azcbobobegghakl', then program should print
Number of times bob occurs is: 2
I wrote this program below.
```
s = 'azcbobobegghakl'
count = 0
if(s.f... |
2018/03/10 | 1,846 | 5,409 | <issue_start>username_0: I am building my site with angular5. I guess for now my site is not so complicated. But I am not sure what is the proper/conventional way to organize my code.
So I have a nav bar with associated components(after hitting the buttons it will direct to component html). Say component A B C D. So:
... |
2018/03/10 | 1,272 | 3,751 | <issue_start>username_0: I need a regular expression that identifies the following: "[the or a] [text] [number]"
For example, In the following string:
```
"The foo or the bar 100. A large machine 200."
```
I need a regular expression that separately matches
```
"the bar 100"
"A large machine 200"
```
without... |
2018/03/10 | 1,473 | 4,015 | <issue_start>username_0: ```
numbers = [i for i in range(1,11)]
def table(num):
three = num * 3
four = num * 4
five = num * 5
six = num * 6
seven = num * 7
eight = num * 8
print(three,four,five,six,seven,eight)
answer = [i for i in numbers if table(i)]
```
This code looks a bit childis... |
2018/03/10 | 1,275 | 3,798 | <issue_start>username_0: I am working in HTML 5 and wanted to add an image over a video looked on stack exchange and found this answer:
[https://stackoverflow.com/questions/5802183/image-over-a-video-html5#*=*](https://stackoverflow.com/questions/5802183/image-over-a-video-html5#_=_)
however, when inserting the code ... |
2018/03/10 | 393 | 1,441 | <issue_start>username_0: When trying to run all migrations to a rails app with `rake db:migrate`, keep on receiving this error:
```
`ERROR: relation "users" does not exist at character 323
PG::UndefinedTable: ERROR: relation "users" does not exist
LINE 5: WHERE a.attrelid = '"users"'::regclass
```
... |
2018/03/10 | 1,716 | 4,626 | <issue_start>username_0: I wrote a script on python 2.7 using kivy. When I run the program in python IDLE it works fine but when I run in in Spyder I get the following error:
```
runfile('C:/Users/Roelof/Documents/ubuntu_share/plate_count_program/script.py', wdir='C:/Users/Roelof/Documents/ubuntu_share/plate_count_pro... |
2018/03/10 | 877 | 2,799 | <issue_start>username_0: I have a table EMPDATA with the following data:
```
EntityId MeetDate SourceCode Status
1 06.11.2017 AB FNL
1 05.2.2018 AB NO
1 09.3.2018 AB FNL
3 07.12.2016 AB FNL
3 09.2.2015 AB ... |
2018/03/10 | 1,456 | 6,396 | <issue_start>username_0: I am trying to add some value to a database as:
```
fab1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
/*Intent i = new Intent(PlacesActivity.this, AddItemActivity.class);
startActivity(i);
finish();*/
//Dia... |
2018/03/10 | 375 | 1,608 | <issue_start>username_0: I'm training a CNN for a classification task and I split the dataset into three parts: 70% for training, 15% for validation and final 15% for testing. I use the training set to train the network and use the validation set to choose the hyper-parameters. After all the works, I tested my model us... |
2018/03/10 | 349 | 1,311 | <issue_start>username_0: I am new to Inheritance..
```
#include
using namespace std;
class base
{ public:
void show()
{
//do something here
}
};
class derive:public base
{ public:
void show(int n,int m)
{
//do something
}};
int main()
{
derive D;
D.show();
D.show(4,5);
}
```
So the compiler is giving... |
2018/03/10 | 1,062 | 3,540 | <issue_start>username_0: ### Question
Is it possible to nest captureless lambdas when passing them around in C++?
From what I can gather, seems to not be the case; rather, it seems you'd have to make a template class, and define static functions, and then pass those around.
### Background
Related to this post, for ... |
2018/03/10 | 1,534 | 4,811 | <issue_start>username_0: Here is the html code:
```
< input class="form-control input-lg input auto-complete" id="ymMsgInput" type="text" placeholder="Type your message ..." autocomplete="off" >
```
Code:
```
i = s.find_element_by_id("ymMsgInput");
```
Python - Selenium Chrome webdriver error:
```
Traceback (mos... |
2018/03/10 | 1,351 | 4,408 | <issue_start>username_0: I need to input a 4-digit octal number to output the next 10 octal numbers. I do not get any errors but my program cannot convert the inputted number into an array (as required) so it naturally can't output the next 10 octal numbers too.
My source code is the following:
```
int main()
{
in... |
2018/03/10 | 424 | 1,783 | <issue_start>username_0: I have done git init and created a Git Repository for my project. When I "cd .git" I enter the folder. But my problem is that in the Git Repository the .git file does not get uploaded. I tried changing directory and doing a fresh git init, but the problem persists. As a result when someone clon... |
2018/03/10 | 447 | 1,758 | <issue_start>username_0: For SEO i need create URL in the form of uppercase or lowercase.
For example (Original URL):
```
https://example.com/CATEGORY/product
```
If user run this URL:
```
https://example.com/category/product or https://example.com/CATEGORY/PRODUCT
```
Converto to:
```
https://example.com/CATE... |