date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/16
576
2,100
<issue_start>username_0: We plan to have a large database with objects that have structure like this: Person1: skills: ['a','b','c'] Person2: skills: ['a','b'] Person3: skills: ['d','e','f'] Person4: skills: ['a','b','d'] And then given an input of skills, the algorithm/technology shoud be able to quickly find...
2018/03/16
1,207
4,758
<issue_start>username_0: I use io.fabric8.kubernetes-client, version 3.1.8 to do RollingUpdate of kubernetes resource. It is fine for Deployment. But I meet an exception for StatefulSet. But it is also fine if I use 'kubectl apply -f \*\*\*.yaml' for the StatefulSet. Code to RollingUpdate Deployment: ``` public void ...
2018/03/16
614
2,489
<issue_start>username_0: How should I configure SwiftGen when using Cocoapods and multiple targets? I have a project with two targets (MyProject and MyProject Dev) which has SwiftGen integrated with Cocoapods. I can build the first target with no problems whatsoever. However the 'Dev' target always fails. The script...
2018/03/16
3,868
12,923
<issue_start>username_0: I am trying to complete some homework in a DeepLearning.ai course assignment. When I try the assignment in Coursera platform everything works fine, however, when I try to do the same `imports` on my local machine it gives me an error, ``` ModuleNotFoundError: No module named 'lr_utils' ``` ...
2018/03/16
661
2,475
<issue_start>username_0: I have a number of methods in a React class component. The component itself receives a number of props. I am wondering if I should take the props and add each of them as `this.propName` in the constructor and then access the props using `this.propName`. Here is an example. What is best practi...
2018/03/16
641
2,472
<issue_start>username_0: I made a main menu in unity so now I'm down to the scripting. I have tried the `mouseup` / `mousedown` functions but nothing is wrong with my code but it won't work period no debug logs not errors just plain nothing. Here's my C# Script to change levels. ``` using System.Collections; usin...
2018/03/16
274
895
<issue_start>username_0: I have a row that is created through jQuery via append, which contains a delete button. **Desire Output:** 1. Instead of the word "delete" I would like to implement a font-awesome "fa-fa-trash" icon in the button. 2. What is the proper way to implement this? ```js function dataTable(data) {...
2018/03/16
911
2,930
<issue_start>username_0: *QGIS* installer keeps telling "QGIS requires Python 3.6." after which it quits installing on *Mac*. However I have python 3.6.4 at least on 4 locations 1) ~/anaconda/bin/python 2) /usr/bin/python3 3) /usr/local/bin/python 4) /usr/local/bin/python3.6 (through a symbolic link). All these fi...
2018/03/16
376
1,080
<issue_start>username_0: I have: ``` $regExge = "/(?!((<.*?)))\b(Öffnung)\b(?!(([^<>]*?)>))/s"; $replacege = "Öffnung"; ``` And I used preg\_replace to replace Öffnung string to html `Öffnung` ``` $content = preg_replace($regExge, $replacege, $content); ``` But it not working, only working with normal string. Th...
2018/03/16
389
1,266
<issue_start>username_0: For example, ``` hash09 Update something5 hashNew Update something4 hashOld Update something3 hash03 Update something2 hash02 Update something hash01 Add something ``` If I want to see what has beed introduced in hashNew, should I use ``` git diff hashNew..hashOld ``` or ``` git diff...
2018/03/16
358
1,183
<issue_start>username_0: I am very new to Scala. I would like to assign a string as variable name: ``` val names = Vector("a","b","c") for (name <~ names){ val = "test" } ``` I would like to have three variables assigned as: ``` a: String = test b: String = test c: String = test ``` How do I code to get this re...
2018/03/16
341
1,186
<issue_start>username_0: ``` Optional> optionalList = getList(someInput); ``` How do i retrieve an element from this list? How to iterate this list?<issue_comment>username_1: You can unwrap the list and use it like a normal list. ``` List list = optionalList.orElseGet(Collections::emptyList); list.forEach(System.out...
2018/03/16
647
1,923
<issue_start>username_0: ``` #include #include int \*squares(int max\_val) { int \*result = malloc(max\_val \* sizeof(int)); int i; for(i = 1; i <= max\_val; i++) { result[i-1] = i\*i; } return(result); } int main() { int \*sq = squares(10); int i; for(i = 0; i < 10; i++) { printf("%d\t", sq[i]); } pri...
2018/03/16
530
1,938
<issue_start>username_0: VERY new, barely understand functions. Here is an example of my issue: ``` function getx() { x = 3; } function gety() { y = 2; } getx(); gety(); document.write("The sum of x and y is " + x + y); ``` `OUTPUT:...
2018/03/16
1,981
7,111
<issue_start>username_0: I am running Docker in Docker (specifically to run Jenkins which then runs Docker builder containers to build a project images and then runs these and then the test containers). This is how the jenkins image is built and started: ``` docker build --tag bb/ci-jenkins . mkdir $PWD/volumes/ dock...
2018/03/16
1,817
6,823
<issue_start>username_0: Title says the majority of whats going on. Basically I have two DropDownLists with one doing an SQL search based off the previous's value, which requires to update it every time it changes. This is my code: ``` protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) {...
2018/03/16
1,733
5,885
<issue_start>username_0: Here is the code example: ``` namespace A { int k; } void k(int,int){/*dosomething*/} int main() { using namespace A; k(1,1);//ooop!k is ambiguous! } ``` What happened? I thought it should not be ambiguous since they are different types. Why is it ambiguous? With `int k` it is not poss...
2018/03/16
295
851
<issue_start>username_0: By using numpy, I could index an array as below ``` x[mask==1] ``` Assuming `x` and `mask` are both numpy array and `mask` contains only `1` and `0`. Now I have both `x` and `mask` as `Tensor`s and want to mimic above behavior. What should I do?<issue_comment>username_1: Use `boolean_mask`....
2018/03/16
370
1,030
<issue_start>username_0: I have the following code: ``` html = html + '![](img/loaded.gif)'; ``` which outputs ``` ![](img/loaded.gif) ``` If I move the variable over like this: ``` html = html + '' + arr[i].loc + '![](img/loaded.gif) ``` I get this: ``` 304-1477 West Pender Street, canada![](img/loaded.gif) ...
2018/03/16
384
1,274
<issue_start>username_0: I have a custom UIView that consists of 9 equally-sized subviews. It essentially looks like a tic-tac-toe board. I've added a UIPanGestureRecognizer to this custom view. Each time the user pans over one of the subviews, I want to take an action. For example, the user could pan over the first 3...
2018/03/16
1,940
6,314
<issue_start>username_0: I am trying to achieve this sample output from a small Perl project like this ``` content1 relatedcontent1 relatedcontent2 relatedcontent2 content2 relatedcontent1 relatedcontent2 ``` here is my code ``` #!C:/Perl64/bin/perl.exe use stric...
2018/03/16
1,855
5,904
<issue_start>username_0: With my select below, if blank string is passed in I get the following error: Null or empty full-text predicate in my DBAdapter when fetching rows from the database. If I provide a value, such as Well, I do not get results when I should as Well is in the r.[Desc] column. If I pass in Well One, ...
2018/03/16
1,554
5,021
<issue_start>username_0: I have a multi-level XML file that needs to parse with python, I have xml or lxml. How do I parse? I could not find any useful solution.Please help me, thanks a lot! Ideally, I want to parse the XML file and convert to Python DataFrame. This for loop does not work. ``` for child in root: ...
2018/03/16
1,377
4,491
<issue_start>username_0: Hey guys I've been trying to get an array with the past 30 days in laravel. Trying to use Carbon to get the days now and want to get count it back 30 days any idea how i can get that done? Example 19,18,17,16,15,14 etc.<issue_comment>username_1: You have declared the two subroutines and you are...
2018/03/16
321
1,275
<issue_start>username_0: Whenever I boot up emacs the packages that I installed on the previous session disapear and I have to reinstall them. I run this command to allow multiple terminals, if I close emacs and reopen it, this package and all others will have to be reinstalled. ``` package-install multi-term ``` W...
2018/03/16
487
1,905
<issue_start>username_0: I am refactoring a code base, which is something like a house. A house has walls, windows, doors, etc. Currently, everything is put inside house class, such as ``` class House { public: void setDoorColor(int color); void setDoorWidth(int width); void setWallColor(int color);...
2018/03/16
602
2,198
<issue_start>username_0: I am trying to setup kafka for messaging service. I am using kafka\_2.9.2-0.8.1.1 version, I have started zookeeper, kafka and created a topic with no partition and replication factor. Once I start my consumer, I get the following error ``` ./kafka-console-consumer.sh --zookeeper localhost:...
2018/03/16
2,580
10,722
<issue_start>username_0: I read that a perfectly predicted branch has zero / almost-zero overhead. (For example in an answer on [Effects of branch prediction on performance?](https://stackoverflow.com/questions/289405/effects-of-branch-prediction-on-performance/289860#289860)) I don't quite understand what people mean...
2018/03/16
812
2,140
<issue_start>username_0: I want to convert this ``` 1:a,b,c 2:d,e,f ``` into this ``` [[1, ['a', 'b', 'c']],[2, ['d', 'e', 'f']]] ``` My code ``` letters = open("letters.txt") alist = [] for line in favmovies: line = line.strip().split(":") line[0] = int(line[0]) alist.append(line) ``` but it give...
2018/03/16
1,018
4,476
<issue_start>username_0: Before I use Bcrypt on a custom implementation of UserDetailsService, I first want to see if I can use it in an in-memory database. ``` package com.patrick.Security; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org....
2018/03/16
676
2,686
<issue_start>username_0: I just want to ask if it is possible to save/export the values/data in a html Select Tag using javascript or jquery into text file? This is my select tag. ``` ``` Then Im trying to use this javascript code, got it from the internet but it did'nt work. It creates a text file but it didnt get...
2018/03/16
977
2,782
<issue_start>username_0: I want to crawl score of university homepage. So I used selenium and succeed to login homepage. But I can't get "score board page" after login. What I can do? ``` var webdriver = require('selenium-webdriver'); var chrome = require('selenium-webdriver/chrome'); var driver = new webdriver.Bui...
2018/03/16
280
932
<issue_start>username_0: In R, I have a dataframe with around 700 attributes and 6000 rows. Each cell holds a number between 0 and 5 for how many times something has happened. But instead of numbers, I would like to have yes/no. I know that for each attribute I can do ``` df$col <- ifelse(df$col>=1, "Yes", "No") ```...
2018/03/16
979
3,685
<issue_start>username_0: While I am able to replace words using regex and here is my code: ``` public static string replacestring(string input) { var Words = "memory|buffer overflow|address space|stack overflow|call stack"; string cleanword = Regex.Replace(input, @"" + Words + "", "", RegexOptions.IgnoreCase); ...
2018/03/16
1,185
3,542
<issue_start>username_0: Below is example code: ``` List1 = [['a', 'b', 'c'], ['e', 'f', 'g'], ['1', '2', '3']] range_value = len(List1) * 2 for x in range(0, range_value): if x == 0 or x == 1: for y in List1[0]: print y print x if x == 2 or x == 3: for y in List1[1]: ...
2018/03/16
428
1,451
<issue_start>username_0: I write the code for couchbase view. follow this <https://blog.couchbase.com/understanding-grouplevel-view-queries-compound-keys/> ``` const mapDate = `function(doc, meta) { emit(dateToArray(doc.updatedAt), { _id: meta.id, _rev: meta.rev, updatedAt: doc.updatedAt }); }` ``...
2018/03/16
714
2,165
<issue_start>username_0: I have a JSON array ***conf=*** ``` [ { "fraudThreshold": 4, "fraudTTLSec": 60 }, { "fraudThreshold": 44, "fraudTTLSec": 60 } ] ``` I want to loop through its items. So I have done the following: ``` for configy in $(echo "${conf}" | jq -r ".[]"); do echo configy=$configy done ```...
2018/03/16
1,754
6,407
<issue_start>username_0: I read the documentation yesterday and done some coding with python to fetch data in the following way. It's working fine. ``` import logging as log import adal import requests import json import datetime from pprint import pprint # Details of workspace. Fill in details for your workspace. ...
2018/03/16
444
1,547
<issue_start>username_0: I have a select element ``` All One Two Three ``` Then in my component I have ``` methods:{ changeFilter(){ var that = this console.log(that.filter) // this gives me the value from the last select // If I then use Jquery that.filter = window...
2018/03/16
846
2,696
<issue_start>username_0: How do I return a single record from this scope? I tried both ways. ``` class Subscription < ApplicationRecord has_many :invoices, dependent: :destroy class Invoice < ApplicationRecord belongs_to :subscription scope :current, -> do # where(paid: nil).order(:created_at).last w...
2018/03/16
790
2,836
<issue_start>username_0: [Here is a similar question](https://stackoverflow.com/questions/24384020/why-does-the-compiler-stops-the-name-lookup-on-overloads), but in this question it works, however, it fails in the following circumstance, why? ``` namespace A { int k; } namespace B { class test{}; void k(const t...
2018/03/16
687
1,958
<issue_start>username_0: I am trying to make a basic layout with CSS grid and the responsive part with the new specification of [CSS level 4](https://www.w3.org/TR/mediaqueries-4/) , but it is not working for me when compiling the content of the sass, Am I failing in something? Do I miss any detail? **custom-media.scs...
2018/03/16
2,052
7,027
<issue_start>username_0: How can I get the Cookies' `csrftoken` in `Axios.interceptors.request`'s config? ``` Axios.interceptors.request.use( config => { if ( config.method === "post" || config.method === "put" || config.method === "delete"|| config.method === "get" ) { } i...
2018/03/16
1,213
3,986
<issue_start>username_0: I need to make the background image in div tag and it has to change automatically, I already put the array of images inside the javascript, but the images is not showing when i'm run the site.The background should behind the menu header. This is the div ``` ``` below of the div is containi...
2018/03/16
551
1,863
<issue_start>username_0: I am new to programming and stack overflow, so please forgive me if I am not formatting my question properly :) I'm trying to loop through an array containing three spans, and log the 'data-strength' attribute value. I am able to get the individual spans with `$el[i]`, and am also able to get ...
2018/03/16
408
1,324
<issue_start>username_0: The website I want to go is pixiv.net, and after I ping it I found out it's ip, which is 192.168.3.11, but if I directly putting this ip as address in a browser, I got a access forbidden. But I can visit pixiv.net. And then I tried to bind this ip with pixiv.net in my host file. I can still get...
2018/03/16
1,791
5,633
<issue_start>username_0: How can I print a tibble to the console along with a message? I want to write a function which outputs a tibble along with a verbose message that contains some information about the nature of that tibble. Here is a highly simplistic example of what I have in mind. In the first attempt, the fu...
2018/03/16
838
2,696
<issue_start>username_0: I'm having issues with the code below, why am I not able to check if "if(Person[i][0] < 18)" I get error stating "Incomparable types". I have found articles stating that I can use "if (Person[i][0].equals(18)), but how can I check if it is greater than? ``` Object[][] Person = new Object...
2018/03/16
536
1,991
<issue_start>username_0: Supposed that I have some xml input which contains something like this. Where `w15` maybe other things like `w`, `w1`. ``` ``` Does anybody know what is the best way to make the replacement? w15:userId="First Last" -> w15:userId="Something else" I don't want to use things like `sed` as I a...
2018/03/16
767
2,468
<issue_start>username_0: Trying to write a simple makefile to compile Markdown files to HTML with Pandoc. I don't want to have to add all the prerequisite `.md` files explicitly to the makefile, so I've tried to use a pattern rule along with a wildcard prerequisite: ``` all: www/*.html www/%.html: src/%.md pandoc...
2018/03/16
979
3,533
<issue_start>username_0: I am facing some difficulties in backtracking. 1. How do I define a global list to be used in the problems of backtracking? I saw a couple of answers and they have all suggested using 'global' keyword in front of the variable name, inside the function to use as global. However, it gives me an...
2018/03/16
313
1,310
<issue_start>username_0: I installed VSCode, downloaded official Python 3.6.4. VSCode detected and set the environment right - I do see "python.pythonPath" user setting set correctly. But, when using VS Code using `Ctrl`+`F5`to run a Python file, I am always getting asked for "select environment" and it shows me two ...
2018/03/16
617
1,347
<issue_start>username_0: I want to use the `awk` utility to list the maximum score of individual player. This is my `cricketer.txt` file: ``` Virat Kohli:30 Suresh Raina:90 Shikhar Dhawan:122 Virat Kohli:33 Shikhar Dhawan:39 Suresh Raina:10 Suresh Raina:44 MS Dhoni:101 MS Dhoni:33 Virat Kohli:39 Virat Kohli:93 Virat...
2018/03/16
638
2,102
<issue_start>username_0: I am looking for a way on how to implement file download functionality using gRPC but I can't find in the documentation how this is done. What is an optimal way to do this? I wanted to have a gRPC server that holds files and a gRPC client to request something from gRPC. I have looked at the e...
2018/03/16
730
2,579
<issue_start>username_0: First off, forgive me on the title. Not really sure how to ask this question: I have an application that I need to convert to a console application (note the application runs fine as a VCL style windows app). The app uses a few 3rd party widgets that have callback functions. However, when I at...
2018/03/16
862
2,644
<issue_start>username_0: I am trying to write a SQL query on finding if two people went to the same place on the same days. For example, if John went to Walmart on 15/03/2018, 10/02/2018, and 03/01/2018 and if Doe went to Walmart on those same days the show the results. But if Doe went to Walmart on 15/03/2018, 10/...
2018/03/16
4,907
16,684
<issue_start>username_0: I have a Scroll Progress Bar to let the user know how long a post is. The first approach was to calculate the height of the entire site with $(document).height and it works. ``` $(window).scroll(function(){ var wintop = $(window).scrollTop(); var docheight = $(document).height(); var winheigh...
2018/03/16
4,762
16,146
<issue_start>username_0: I have a table in which `labels` are not unique with unique ids, How to select unique `labels` with any ids associated with it. ``` @questionnaireload = Questionnaire.select("DISTINCT label","id") ``` but this gives me ``` #, #, #, #]> ``` I want either or not both, I looked upon pluck...
2018/03/16
481
1,469
<issue_start>username_0: floating point numbers need to be formatted and displayed in grid. eg 123,456,567.82. Data from backend is 123456567.82. How can this be formatted in ag grid and have other features like sorting, filter work too. i did find a link in stack overflow to use Math. floor (num). tostring and applyin...
2018/03/16
467
1,370
<issue_start>username_0: I have a `List>`. I want to remove it from the list if the key exist in List For example: Input: `List,Map,Map>` (here is a Map) , `List` Explanation: Since, key in map exists in the `List`, I want to remove Map from the `List,Map,Map>` Output: `List,Map>`<issue_comment>username_1: ```html...
2018/03/16
1,069
3,914
<issue_start>username_0: I'm trying to grab and drag the scroller canvas horizontally. I can scroll left & right with my mouse (Apple Magic Mouse), but have not been able to figure out how to implement the grab and drag left & right. I tried to follow the instructions on the link below, but the pageX & clientX seems t...
2018/03/16
1,877
5,304
<issue_start>username_0: I'm working on an assignment for my programming I class. I'm brand new to C++. What we're trying to do is take year, month, and day arguments provided by the user at the time of execution and calculate the difference between them and the current date. In my main function, I have the following ...
2018/03/16
1,235
3,123
<issue_start>username_0: I've got a head-scratcher that I'm not sure can be solved in one or two lines of code, which I'm trying. I can more or less do it without a dataframe (e.g., if the data is simply .txt), but I want to see if it can be done with pandas. Below is the `df.head(10)`, and I want to create a diction...
2018/03/16
520
1,184
<issue_start>username_0: I just installed angular 4 and generated the project, it is compiled correctly but it is not displayed in the browser ![1](https://i.stack.imgur.com/2Gcn3.png) this is what my browser shows ![2](https://i.stack.imgur.com/VYBSv.png)<issue_comment>username_1: This can definitely be answered in...
2018/03/16
542
2,204
<issue_start>username_0: I know the query below is not supported in DynamoDB since you must use an equality expression on the HASH key. `query({ TableName, IndexName, KeyConditionExpression: 'purchases >= :p', ExpressionAttributeValues: { ':p': 6 } });` How can I organize my data so I can efficiently make a query ...
2018/03/16
524
2,187
<issue_start>username_0: I have a question about using them, so i don't know how can i explain the question but i'll use a scenario so you can understand me. I started a repository and my partner told me we have to use branches so we can work without any problem(replacing any code using git add --all) and we will work...
2018/03/16
1,165
3,462
<issue_start>username_0: I would like to transpose a square matrix, the following is my code. ``` #include #define SIZE 10 void transpose2D(int ar[][SIZE], int rowSize, int colSize); void display(int ar[][SIZE], int rowSize, int colSize); int main() { int ar[SIZE][SIZE], rowSize, colSize; int i,j; printf("Enter ...
2018/03/16
2,608
9,489
<issue_start>username_0: I know it should be simple, but I couldn't find a way to do it and I have a feeling that is simple but I am stuck. I am trying to display a message every time a checkbox is checked. I have the code below but I can only display the message for the first checkbox. I am just starting with Javascri...
2018/03/16
2,874
10,654
<issue_start>username_0: I want to add all properties values assigned during instantiation of Course class into text File. ``` CourseManager courseMng = new CourseManager(); Course prog1 = new Course(); Console.WriteLine(prog1.GetInfo()); Console.WriteLine(); prog1.CourseCode = "COMP...
2018/03/16
246
1,019
<issue_start>username_0: Can a developer tell fork/join pool to create certain number of threads? If yes then is it guaranteed that those many number of threads will be created by pool?<issue_comment>username_1: Source : <https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ForkJoinPool.html> > > A ForkJoin...
2018/03/16
1,066
4,224
<issue_start>username_0: When I use django to design a website and delopy, I find I have some trouble if I use MySQL that the **Binlog** is activate( format:**STATEMENT**). There are my settings for this deployment: * Django based website * uwsgi * Ningx * MySQL The first step, I need to migrate my models to databes...
2018/03/16
2,745
7,526
<issue_start>username_0: I am using a `query` to generate a count. Below is my query ``` SELECT COUNT(DISTINCT sur.`customer_id`) AS 'Survey Done' ,COUNT(CASE WHEN sn.operator_name LIKE '%Zong%' AND sn.`signal_strength` = 'No Signal' THEN 1 ELSE NULL END) AS 'Zong No Signal' ,COUNT(CASE WHEN sn.operator_name LIKE '...
2018/03/16
552
1,994
<issue_start>username_0: I want to use the same `onChange` handler for a series of inputs. ``` ``` so I am attempting to use this html data attribute to store the input's name. When I go to pull the attribute off in JavaScript, I am unable to access it. ``` handleInputChange = (event) => { this.setState([event....
2018/03/16
254
874
<issue_start>username_0: [![enter image description here](https://i.stack.imgur.com/qlicx.png)](https://i.stack.imgur.com/qlicx.png) I am new to opencv. I found the following code swaps red and blue channel when I fed sRGB png to it. Which function should I blame, imread or fromarray?<issue_comment>username_1: Yes, Op...
2018/03/16
788
2,614
<issue_start>username_0: I am trying to get all combinations of a list. The result for `[1,2,3]` should be `[(1,2),(1,3),(2,3)]`. My implementation below, however, gives `[(1,2),(2,3)]`. ``` parings [d] = [] parings (y:ys) = (y, head ys): parings ys ```<issue_comment>username_1: I don't know why you're opposed to lis...
2018/03/16
501
1,603
<issue_start>username_0: **ERROR Message** > > Order\_ID could refer to more than one table in the FROM clause of the SQL statement > > > ``` SELECT Customer_ID, o.Order_ID, o.Order_Date, p.Product_Description, p.Product_Finish FROM Order_T AS o, Order_Line_T AS ol, Product_T AS p WHERE o.Order_ID=ol.Order_ID AN...
2018/03/16
469
1,579
<issue_start>username_0: ``` if (isset($_SESSION['cart'])) { foreach($_SESSION['cart'] as $key => $value) { $sql = "SELECT product_name, image, price, sum(price) AS subtotal FROM items WHERE id = '$key' "; $result = mysqli_query($conn, $sql); if (mysqli_num_rows($result) >...
2018/03/16
584
2,446
<issue_start>username_0: I am creating a practice SQL Server database project, and I'm trying to enter text into a SQL Server database through a Windows Form. I'm not sure if my text data was really entered to my database. How do I view if it was entered? I'm a beginner so please try to use beginner SQL and VS vocabula...
2018/03/16
702
2,321
<issue_start>username_0: ``` * Smokey * Teddy ``` how do I change those class names here? I tried; ``` document.querySelectorAll('li').className = "corgitype" ``` and `document.querySelectorAll('li').classList = "corgitype"` but nothing changes. `corgitype` is the new class name that I want to overwrite on `bea...
2018/03/16
1,189
3,653
<issue_start>username_0: My goal is to create a nav bar, perfectly centered horizontally at the top of a screen, with some text in the left hand corner. I have seen a lot of questions/solutions to horizontal centering, but I'd like to understand how I can 'ignore' the elements to the left or right of what I'm trying ...
2018/03/16
901
2,615
<issue_start>username_0: I'm new to python can anyone help me with this. For example, I have a data frame of ``` data = pd.DataFrame({'a': [1,1,2,2,2,3], 'b': [12,22,23,34,44,55], 'c'['a','','','','c',''], 'd':['','b','b','a','a','']}) ``` I want to sum a and ignore the different in b ``` data = ({'a':[1,2,3],'c...
2018/03/16
707
2,506
<issue_start>username_0: I want to set the same weight for parts of positive samples. However,`tf.nn.weighted_cross_entropy_with_logits` can only set the weight for all positive samples in my opinion. for example, in the ctr predicition, I want set 10 weights for the order samples, and the weight of click samples and...
2018/03/16
1,127
3,960
<issue_start>username_0: So I was following a simple react/firebase chat room on youtube: <https://www.youtube.com/watch?v=or3Gp29o6fE> as a reference to what I'm doing with my project. I am making a bug/issue tracker, so that a user can enter a station #, bug/issue, then a description of it. I keep getting an error: ...
2018/03/16
905
3,162
<issue_start>username_0: I am new to coding & I am taking ruby on rails online class. I have followed the lecture and documented everything but I am getting "NonMethod" error. Here what I have in my file **Controller** ``` class CoursesController < ApplicationController def index @search_term = 'jhu' @cours...
2018/03/16
394
1,333
<issue_start>username_0: Here is my code ``` ``` Here mat-error-0 will change to mat-error-1 on page refresh and mat-error-1 will change to mat-error-2 and so on.. There is no unique class or role attribute here that i can take here. Please advise.<issue_comment>username_1: As long as innerHTML stays consistent af...
2018/03/16
360
1,234
<issue_start>username_0: I'm developing a drop-down form with values from a database. My question is how can I display values from the database to the `drop-down` without displaying the same values. I have 2 data in my database which consist of the same value `(Paid)` but when I display it on my dropdown it shows 2 "Pa...
2018/03/16
416
1,289
<issue_start>username_0: I have a table as below : [![Table](https://i.stack.imgur.com/8Tpum.png)](https://i.stack.imgur.com/8Tpum.png) How can I craft a SQL `select` statement so that `MIN AND MAX EVENT DATE` groups results by `FLAG (0,1)`? So the result would be: [![Result](https://i.stack.imgur.com/wJIEs.png)](h...
2018/03/16
536
1,575
<issue_start>username_0: I want to merge 2 csv file with a similar column but different header name. a.csv: ``` id name country 1 Cyrus MY 2 May US ``` b.csv: ``` user_id gender 1 female 2 male ``` What I need is, c.csv: ``` id name country gender 1 Cyrus MY female 2 May US male ``` But the result I get whe...
2018/03/16
2,013
6,689
<issue_start>username_0: I am trying to store information for the delivery object on the truck itself. I can't seem to access the delivery, even though the foreign key is set on the belongs\_to attribute of the model. Thereafter, I should be able to access the delivery\_order nested attribute inside of the rails view. ...
2018/03/16
555
1,680
<issue_start>username_0: If I have an object like this ``` const myobj ={ "Computer" : [{ "file" : MyDirectory/A/text1.txt", "line": [23,56]}, {"file" :"MyDirectory/B/text5.txt", "line" :[32,91]}] , "Book" : {"file": MyDirectory/A/text1.txt", "line": [13,46]} } ``` and suppose a function yields something like `...
2018/03/16
953
3,091
<issue_start>username_0: Current it seems we cannot run both **Neo4J Server** and **Gremlin Server** at the same time. Is there any way to have run both? 1. NEO4J is running and I try to start to Gremlin Server then I get the following error > > java.lang.RuntimeException: GraphFactory could not instantiate this > ...
2018/03/16
2,080
7,894
<issue_start>username_0: I used this method because I am storing an array of classified messages, I would like to vividly understand why it doesn't update. Here's the db.js: ``` const mongoose = require('mongoose'); const Schema = mongoose.Schema; const ObjectId = mongoose.Types.ObjectId; const usersessionSchema = ...
2018/03/16
599
2,413
<issue_start>username_0: [![enter image description here](https://i.stack.imgur.com/jo0WC.png)](https://i.stack.imgur.com/jo0WC.png) I need to change the position of compass from left to right in app.It always shows in left.Is it possible to change position?? ``` // change compass position try { assert ...
2018/03/16
417
1,386
<issue_start>username_0: i'm making chat and i want to select the list of user's message like fb or twitter that user have sent or received. I've tried this query ``` SELECT DISTINCT * FROM message WHERE `userFrom` = 2 OR `userTo` = 2 ``` but it returned what in this photo Below is an image to explain my problem [...
2018/03/16
1,114
4,003
<issue_start>username_0: For the collection page (<https://bloomthis.co/collections/on-demand-blooms>), when each product is hovered on, the alternate image is displayed. The alternate image is the last image added in the product page. I'm working on to have a "Buy Now" button on top of the alternate image. Currently ...
2018/03/16
669
1,994
<issue_start>username_0: I want to count how many hours and minutes between two timestamp which are generated by `Date.parse`. After I get the difference, I need to convert it into hours and minutes like `2.10` (means, 2 hours and 10 minutes). Once I have read that to do it you need to divide it with 3600 so I tried th...
2018/03/16
1,069
3,619
<issue_start>username_0: I am getting back some data from a service and I am struggling to change the structure. Any help would be greatly appreciated. **Current Structure:** ``` { "key1": { "description":"lorem ipsum", }, "key2": { "description":"lorem ipsum", } } ``` **New Structu...
2018/03/16
1,394
3,826
<issue_start>username_0: I am trying to match a six digit version (seperated by a dot `.` ),lets say `9.130.46.32.6.2` and it works fine but it matches a seven digit version (seperated by a dot `.`) aswell,lets say `9.130.46.32.6.2.1'`,how to ensure it only matches a six digit version but not anything else? ``` import...
2018/03/16
580
2,080
<issue_start>username_0: I have created a chatbot using MS Bot Framework and bot application, in C#. I added the Web chat to my html website through iframe got from bot framework. Now I want to delete the chat caption which is embedded with the Web chat. Instead of that I want to add my Chat bot's name. So how can i e...
2018/03/16
4,630
13,850
<issue_start>username_0: Guys I do hope you can help me. Back in February I went through all the hassle of creating a certificate as Apple Developer and asking my tutor to create me a provisioning file and add my devices (Apple Developer University Program). It all worked on my MacBookPro and I was happy. Unreal would...