date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/17
645
1,988
<issue_start>username_0: `jq` is suppose to > > process/filter JSON inputs and producing the filter's results ***as JSON*** > > > However, I found that after the `jq` process/filter, output result is no longer in JSON format any more. E.g., <https://stedolan.github.io/jq/tutorial/#result5>, i.e., ``` $ curl ...
2018/03/17
1,608
6,464
<issue_start>username_0: What is the easiest and shortest method to determine the current location of the device in Android? An approximate, city-level location is good enough, and I need the Lat/Long coordinates, not the name. Think of weather location. But I'm using it for sunrise/sunset calculations. All other exam...
2018/03/17
361
1,460
<issue_start>username_0: I need to use win2D in my cppwinrt project. Using the Win2D sample file as a model I’ve tried to mimic its setup, putting in the package file for win2d from that project, duplicating the custom build step, but I can’t get it to compile. I remember some talk about Win2D being added soon to the s...
2018/03/17
668
2,292
<issue_start>username_0: I am trying to run a subquery with a condition that returns a running total. However, I am receiving the following error: > > Only one expression can be specified in the select list when the subquery is not introduced with EXISTS. > > > Is there any way this code can be salvaged? Please b...
2018/03/17
477
1,547
<issue_start>username_0: I have a list of e-mail ids among which I have to select only those which do not have **ruba.com** as domain name with regex. For examples, if I have <EMAIL>, <EMAIL> and <EMAIL>, then my regular expression should select first two Ids. What should be the regular expression for this problem? I ...
2018/03/17
679
1,679
<issue_start>username_0: Using pandas IndexSlice, is it possible to use a list of integers? I get KeyError: 'the label [xxxx] is not in the [columns]' when I use a list of integers (even when the values in the multiIndex level are formatted as strings): ``` vals = np.random.randn(4) df = pd.DataFrame({'l1': ['A', 'B',...
2018/03/17
2,868
9,521
<issue_start>username_0: I am having trouble converting/comparing dates extracted from a calendar to the current date I get a red line in eclipse under my if statement My goal is to evaluate the current date against the dates in the rows/cell and select/click the button beside the row/cell. however to get to the secon...
2018/03/17
7,046
20,649
<issue_start>username_0: I noticed that `margin: 0px` has no effect. If you look on the screenshot, then you can see that the margin is still there even though it was set to 0 for left and right. [![enter image description here](https://i.stack.imgur.com/mkYsO.png)](https://i.stack.imgur.com/mkYsO.png) First I checke...
2018/03/17
1,063
3,867
<issue_start>username_0: I have a small data set with 47 samples. I'm running linear regression with 2 features. After running LinearRegression I ran Ridge (with sag). I would expect it to converge quickly, and return exactly the same prediction as computed solving the normal equations. But every time I run Ridge I g...
2018/03/17
579
1,813
<issue_start>username_0: I have a data.frame that has 15 columns and looks like the following: ``` Word Syllable TimeStart TimeEnd Duration PitchMin PitchMax TimePitchMin Einen "aI 0.00 0.11 0.11 98.173 106.158 0.053 Einen n@n 0.11 0.24 0.13 ...
2018/03/17
684
1,952
<issue_start>username_0: Okay so I want to move all digits from end of the line to the front of the line, example of lines: ``` example123 example321 example2920 ``` expected output: ``` 123example 321example 2920example ``` the following sed command works to place numbers at the start to end - ``` sed -E 's/^([...
2018/03/17
839
3,051
<issue_start>username_0: I am trying to subscribe from a service, it builds without error but I get the error "this.myService.getAll is not a function" when viewing in the browser. Service: ``` import { Injectable } from '@angular/core'; import { Http } from "@angular/http"; @Injectable() export class MyServiceServ...
2018/03/17
480
1,705
<issue_start>username_0: I would like to now what are (in theory) the differences between using ``` if (a == x && b == y) ``` and ``` if (a == x){ if (b == y){ } } ``` Edit : My question is not about the result but more about the performances. I find out that sort a table then search something into it i...
2018/03/17
539
1,977
<issue_start>username_0: I am trying to write a simple array, I have written many arrays but I don't understand why on this occasion I am not getting the desired result. Below is the code I am using, so I am generating a report name and putting them in an array to retrieve later on by referencing the index number, So...
2018/03/17
440
1,586
<issue_start>username_0: I want to achieve something you can see in the Android BlueTooth settings: two listviews and one activity. First listview contains already paired devices, second - newly discovered (this one doesn't have fixed size). How can I develop activity like this? Putting listviews in scrollview isn't ve...
2018/03/17
942
2,632
<issue_start>username_0: I need help parsing this XML message into a JSON structure. I have tried using Jackson library using `XmlMapper`. It keeps giving a parsing error. Do I need to parse out extra characters? ``` xml version="1.0" encoding="utf-8" standalone="yes"? sim\_default\_CouponType sim\_default\_Cou...
2018/03/17
532
1,751
<issue_start>username_0: I am trying to do a search on my database where it returns results based on exact surnames and first names with the initial of the name entered in an input box. For instance, if the user enters `<NAME>` it will return all users with the initial `S` for the first name and `Burns` for the Surname...
2018/03/17
735
2,428
<issue_start>username_0: I have an App which retrieves a random statement from a postgres table when a button is clicked: ``` getRandomQuote() { axios.get('http://localhost:3100/quote').then(response => { console.log('1111111', response); this.setState( { quote: response.data[0].quote_te...
2018/03/17
1,204
4,495
<issue_start>username_0: I have been using Github as an individual for some time. Now I need to create an organization and start a repo in the organization. So, logged in to Github as myself, I created the new organization. I then created a repo. Viewing the repo I can see that I am a contributor to the repo. The repo...
2018/03/17
478
1,464
<issue_start>username_0: I'm trying to use the inverse CDF of the Gumbel Dist. to simulate random numbers. However for the inverse I get `mu-x*log(-log(beta))` which spits out imaginary numbers which can't be write. The original CDF is `e^-e^(-(x-mu)/beta)`. And my code is: ``` n=1000 #sample size set.seed(1) #Mak...
2018/03/17
757
2,897
<issue_start>username_0: I have the following piece of code, which receives a history object as prop: ``` const ChildComponent = ({ history }) => ( history.push(routes[4].path)}> Click me ); ``` How do I add typecheck for this history prop, **which is received by wrapping it's parent with withRouter HOC**? One ...
2018/03/17
957
3,771
<issue_start>username_0: I've got an ArrayList of Object and I am trying to edit the field of one of those object, but when I do it I am receiving ConcurrentModificationException . I've read that I need to use Iterator, but even with this I am still receiving the error message. My code: ``` if(summedEmotionValuesArra...
2018/03/17
1,011
3,527
<issue_start>username_0: Say i have 974 lines of data. What i am trying to do is to create a new np.array from a dataframe in the following format: Add first 10 lines to an np.array until the end of dataframe only if the length is 10. Here how i have solved this: ``` clen = len(df) X = [] for i in range(clen): if...
2018/03/17
789
2,000
<issue_start>username_0: I have an object like this for example: ``` var obj = { 107: {name: "test", id: 772}, 124: {name: "hello", id: 123}, 120: {id: 213} } ``` How can I retrieve an array of `name`s from `obj`, for example the output should be: `["test", "hello"]` How would I go about doing this?<is...
2018/03/17
515
1,895
<issue_start>username_0: I have a Laravel query that looks like this ``` $users = DB::table("users") ->select('id') ->where('accounttype', 'standard') ->get()->all(); ``` It is working and returning the id for all standard accounts, I am trying to limit it to ...
2018/03/17
713
2,369
<issue_start>username_0: What I'm dealing with is a nested for loop that finds perfect numbers. The iterations to find the perfect number came about pretty quickly. However, I need the output to show a string that says, "perfect number found" and have that happen once. Then on the same line, print out all the perfect n...
2018/03/17
2,399
8,269
<issue_start>username_0: I have a function `foo()` protected by a mutex `m` which is defined as a local static variable of `foo()`. I'd like to know whether it's safe to call `foo()` in the destructor of an object `bar` with static storage duration: ``` // foo.h void foo(); // foo.cpp #include "foo.h" #include void ...
2018/03/17
1,835
6,319
<issue_start>username_0: I am trying to create a database for my Neo4J Desktop, but everytime I attempt to do so, I get the following: Database failed to create: Error: Could not change password How can I fix this and successfully create the Database? I'm running Neo4J Desktop 1.0.18 and attempting to work with Neo4J...
2018/03/17
806
2,982
<issue_start>username_0: I have to make a basic bash script that keeps an eye on a specific file and if I decide to delete this file a warning should come up to confirm the delete. The script should accept one parameter ( the file that is going to be checked on delete) How can I achieve this? I don't understand how I c...
2018/03/17
682
2,454
<issue_start>username_0: I have successfully wrapped the function "notMyFunction" in a promise so I can use "notMyFunction" as if it were a promise. Like so: ```js // I do not have access to "notMyFunction" function notMyFunction(a, cb) { if (a === 'latest') { cb('123'); } else { cb('error...
2018/03/17
1,370
5,717
<issue_start>username_0: I had some issues with async calls, but after understanding event-driven functions in Node a bit better, I have the following code. It basically does 2 SQL queries. The first checks to see if an existing phone number is in the table. If there is, nothing happens. If there isn't, then it runs a ...
2018/03/17
701
2,043
<issue_start>username_0: I have a DataFrame ``` customer_number purchase_time quantity 14 2007-03-01 07:06:00 10 20 2007-03-12 13:05:00 13 ``` I tried to find the total quantity bought in the morning and afternoon. I converted `purchase_time` into datetime ``` df['purchas...
2018/03/17
764
2,166
<issue_start>username_0: I am unable to click a drop-down item. I am at: I can click the proxy location option using the code below, but I can't select any items from the drop-down; ``` driver.FindElement(By.XPath("/html/body/main/div[2]/form/fieldset/div[2]/div[1]/p")).Click(); ``` how can I click the Germany or...
2018/03/17
953
4,012
<issue_start>username_0: Suppose I have this code: ``` public Foo { public enum Bar {FooBar, BarFoo, FooFoo, BarBar} public Foo (Bar bar) { //Do something } } ``` Now, when creating an object, I have several different cases for what migth be created: `FooBar, BarFoo, FooFoo, BarBar`. Depending on...
2018/03/17
1,281
3,557
<issue_start>username_0: Currently I have a code that extracts information from an XML sheet, the problem is that I can not show the information as I want. demo.xml ``` xml version="1.0" encoding="UTF-8"? `111111` The Name The Brand 5 4 `222222` The Name The Brand 6 4 ``` index.php ``` php if (file_e...
2018/03/17
1,153
3,313
<issue_start>username_0: I was creating a query that could create a post and add image links, hashtags and genres to it but... 1. I'm not sure if it's the good way to do it like I'm doing. 2. My query fails every time MATCH doesn't find a node and that could happen often. This is my code: ``` MATCH (user:User) WHER...
2018/03/17
1,001
2,937
<issue_start>username_0: I'm very much used Lua where you are able to do this, so please excuse me if this is not possible. Lets say on client.js I have 2 variables, both of these requiring modules ``` var EmbedManager = require('Embed'); var client = require('Client'); new EmbedManager() .init() .output(...
2018/03/17
328
1,201
<issue_start>username_0: I am trying to create a table that includes a column that contains just the current date-not timestamp-using the MariaDB base. Which is the command that sets the content of the column as the current date upon table creation?<issue_comment>username_1: MariaDB introduced `DEFAULTs` for `DATETIME`...
2018/03/17
520
1,691
<issue_start>username_0: I have a function with an input parameter "text" , which consists of a string containing unknown number of 2-character Hexadecimal numbers separated by space. I need to read them and put them in separate array indexes or read them in for loop and work with them one by one. Each of these values ...
2018/03/17
738
2,451
<issue_start>username_0: Have the list of lists "d" like that: ``` [OrderedDict([('id', '1'), ('name', 'Jack'), ('email', '<EMAIL>'), OrderedDict([('id', '2'), ('name', 'Ricky'), ('email', '<EMAIL>')] ``` I would like to save the output using csv module but wi...
2018/03/17
1,311
4,851
<issue_start>username_0: So, without boring anyone with the backstory, I need to access data from a number of APIs in order to run my script. The data needs to all be loaded before I execute the script, which I'm normally comfortable doing: I just declare some fetch requests, write a Promise.all, then continue on with ...
2018/03/17
359
1,269
<issue_start>username_0: So, i think this should be pretty simple but i can't seem to get it right, say i have an empty div: This div gets filled dynamically with data from database with ajax, i want on button click to empty this div but keep one element with a specific id ex: , i tried: ``` $(document).on('click', '...
2018/03/17
1,272
4,897
<issue_start>username_0: I have a small problem. On my wordpress based website I want to create an Order-Status form where people can use a code and check their order's progress. It's not an online store so I don't use woocommerce. The file containing the order's progress is a CSV file. I tried to use that through a f...
2018/03/17
279
891
<issue_start>username_0: I have uploaded my HTML files to my website. Now i need to find a way to redirect users to a Home.html page when they enters www.mywebsite.com i have tried to to this in htaccess but it did not work, i am not sure if it is correct ``` RewriteEngine On #if request is mywebsite.co.uk/something...
2018/03/17
523
1,552
<issue_start>username_0: I have 3 tables: * customers(name, id), * items(name, price, id), * purchases(id, items\_id, customers\_id) When I run: ``` select customers.name, SUM(items.price) as "price" from items INNER JOIN purchases ON items.id = purchases.item_id INNER JOIN customers ON purchases.customer_id = c...
2018/03/17
3,468
7,263
<issue_start>username_0: I have a dataframe in which each row is the working hours of an employee defined by a start and a stop time: ``` DF < - EmployeeNum Start_datetime End_datetime 123 2012-02-01 07:30:00 2012-02-01 17:45:00 342 2012-02-01 08:00:00 2012-02-01 17:45:00 8...
2018/03/17
654
1,814
<issue_start>username_0: Attempting to build an application based on OpenCV, I see two lines warning me of missing libraries for `libjpeg` and `libpng`. Here is an extract of the console output, which then goes on with a number of similar Qt-related issues. ``` /usr/bin/ld: warning: libjpeg.so.9, needed by /usr/local/...
2018/03/17
936
2,587
<issue_start>username_0: I found this snippet of code online and am having difficulty in understanding what each part of it is doing as I'm not proficient in Python. > > The following routine takes an array as input and returns a dictionary that maps each unique value to its indices > > > ``` def partition(array)...
2018/03/17
438
1,662
<issue_start>username_0: In JavaScript tutorial on Redux, there is a following JavaScript construct: ``` export default connect(mapDispatchToProps)(RemoveCounter); ``` Without going into depths of Redux (unless necessary), and I think `connect(..)` is a function call, how it is possible to specify the parameter twic...
2018/03/17
742
2,643
<issue_start>username_0: Helo. I am beginner in this JavaScript journey, and i just hit a wall. I am learning .filter() function on Array. My exercise is: > > Return only the rows in the matrix that have all positive integers > > > I have no problems with single arrays. For example my code with single array: ```...
2018/03/17
1,225
4,606
<issue_start>username_0: I have a Django Web-Application that uses celery in the background for periodic tasks. Right now I have three docker images * one for the django application * one for celery workers * one for the celery scheduler whose `Dockerfile`s all look like this: ``` FROM alpine:3.7 ENV PYTHONUNBUFF...
2018/03/17
273
956
<issue_start>username_0: I'm familiar with firebase and fire storage, but new to G-Cloud-SDK. I found this topic <https://groups.google.com/forum/#!msg/firebase-talk/oSPWMS7MSNA/RnvU6aqtFwAJ> and tried to copy the results, but get "IOError: [Errno 2] No such file or directory: u'cors-json-file.json'" from the terminal....
2018/03/17
991
3,759
<issue_start>username_0: I'm really confused about why I can not return the JSON result from `amazonMws.products.search()` and could use some help understanding what is going on. When I write it this way gives me `undefined`: ``` function listMatchingProducts(query) { const options = { Version: VERSION, ...
2018/03/17
1,827
6,602
<issue_start>username_0: With Woocommerce, I am trying to make a WP\_Query for product variations post type with a product category 'Apple'. ``` $args = array( 'product_cat' => 'Apple', 'post_type' => array('product', 'product_variation'), 'post_status' => 'publish', 'key' => '_vi...
2018/03/17
1,022
3,522
<issue_start>username_0: I'm trying to create an installation script and display a progress bar during the install. ``` $localfolder= (Get-Location).path start-process -FilePath "$localfolder\Installer.exe" -ArgumentList "/silent /accepteula" -Wait ``` and as progress bar I want to add: ``` for($i = 0; $i -le 100; ...
2018/03/17
724
1,902
<issue_start>username_0: I want to add a variable value to a dataframe based on the order of the observation in the data frame. ``` … Subject Latency(s) 1 A 25 2 A 24 3 A 25 4 B 22 5 B 24 6 B 23 ``` I want to add a third column called `Trial` and I want the values to be either T1...
2018/03/17
643
1,680
<issue_start>username_0: Hello i want to use "var" on multiple Id´s. ```js // Get modal element var modal = document.getElementById('modal1'); // Get open modal button var modalBtn = document.getElementById('Info1'); // Get close button var closeBtn = document.getElementById('closeBtn1'); ``` This is the code th...
2018/03/17
825
3,336
<issue_start>username_0: Is the following `add()` function referentially transparent? ``` const appState = { runningTotal: 0 } function add(x, y) { const total = x + y; appState.runningTotal += total; return total; } ``` I'm unsure of the answer due to a handful of definitions I've found for referen...
2018/03/17
774
2,967
<issue_start>username_0: What is the best way to get some Json data from a public api such as [British Air quality](https://api.carbonintensity.org.uk/intensity) i.e and create a new endpoint with some of the data under a different name like ``` { "data":[{ "from": "2018-03-17T22:00Z", "to": "2018-03-17T22...
2018/03/17
609
2,094
<issue_start>username_0: I've just recently started trying to learn C through the tutorials on Wikibooks. I've read the beginning C pages listed [here](https://en.wikibooks.org/wiki/C_Programming) and am attempting to do the exercises. I'm having a problem with the second question on loops: wherein I'm trying to make a...
2018/03/17
2,106
6,486
<issue_start>username_0: I need to get the following output: ``` * ** *** **** ***** ****** ******* ******** ********* ********** ``` So its 10 rows,and my stars will start at 1 and go to 10. Currently I am getting: ``` ********** *********** ************ ************* ************** *************** **************...
2018/03/17
703
1,939
<issue_start>username_0: I have a data frame input that looks like: > > > ``` > col1 col2 col3 > 0 3 1 NaN > 1 NaN 7 8 > > ``` > > How to collapse *all* rows while concatenating the data in the rows with `', '`? The desired data frame output: > > > ``` > col1 col2 col3 > 0 3 1, 7 8 ...
2018/03/17
759
2,789
<issue_start>username_0: I have a `ClassA` object that sets method references inside of `ClassB1` and `ClassB2` objects. `ClassB1` and `ClassB2` objects will later use this method reference while running their methods. But, sometimes we do not set the method reference: ``` public class ClassA { public ClassA() { ...
2018/03/17
487
1,956
<issue_start>username_0: The errors I am facing is " setCredentials - can't resolve this method initializeApp - can't resolve this method ``` FileInputStream serviceAccount = new FileInputStream("path/to/serviceAccountKey.json"); FirebaseOptions options = new FirebaseOptions.Builder() .setCredentials(Google...
2018/03/17
2,060
6,284
<issue_start>username_0: I am trying to rename all files and subdirectories in a given directory. I create vectors of the old and new names, and map a renaming function over the two vectors. The vectors of file paths are created ok but the mapping `(map #(re-name (as-file %1) (as-file %2)) flist new-flist)))` does not ...
2018/03/17
1,154
4,258
<issue_start>username_0: How can I create an authorization schema for pages? For example: I have * pages like `page1`, `page2`, `page3` and `page4` with * users as `user1`, `user2`, `user3` and `user4`. When I login * user1 should get only page1 and page4 * user2 --> page2 and page3 * user3 --> page1 and page3 * u...
2018/03/17
1,112
3,895
<issue_start>username_0: I have a script that pulls information from an API and is supposed to write it to a CSV file which I have in the same directory. For some reason, all the code seems to execute fine but the CSV never actually contains any data. Am I missing something crucial? I've checked the documentation for t...
2018/03/17
549
1,883
<issue_start>username_0: Hello me need get variable from function me return in answer undefined ```js function etr() { var img = new Image(); img.onload = paramsImg; img.src = picFile.result; function paramsImg() { return img.height; }; }; var vvvr = etr(); alert(vvvr); ```<issue_comment>user...
2018/03/17
844
2,961
<issue_start>username_0: I used below scripts to log into the following website with a username and password. It used to work fine. However, I think recently Etsy set the username ( and maybe password too) to hidden type. So username cannot be sent to the Email address field. Here are the scripts. Anyone knows how to f...
2018/03/17
842
2,767
<issue_start>username_0: When I run the following from a Windows computer (via [Cygwin](https://cygwin.com)) I get an error: ``` ssh <EMAIL> 'cd ./bin && ./script.rb' ./script.rb:2:in `gsub': invalid byte sequence in US-ASCII (ArgumentError) ``` Running the same code (the entire `ssh` line above) from Terminal on Ma...
2018/03/17
803
2,640
<issue_start>username_0: I am still extremely new to Python, and I am working on an assignment for my school. I need to write code to pull all of the html from a website then save it to a `csv` file. I believe I somehow need to turn the links into a list and then write the list, but I'm unsure how to do that. This ...
2018/03/17
654
2,490
<issue_start>username_0: Trying to use "dotnet ef" command in Package Manager Console. the PMC is cd to the .csproj directory, and still getting: ``` dotnet : Specify which project file to use because this 'C:\Users\PC-NAME\Source\Repos\TestProject\Test" contains more than one project file. At line:1 char:1 dotnet ef...
2018/03/17
977
4,171
<issue_start>username_0: I'm writing a genetic algorithm to minimize a function. I have two questions, one in regards to selection and the other with regards to crossover and what to do when it doesn't happen. Here's an outline of what I'm doing: ``` while (number of new population < current population) # Evaluat...
2018/03/17
479
1,457
<issue_start>username_0: Documentation says: ``` fun bundleOf(vararg pairs: Pair): Bundle ``` > > Returns a new Bundle with the given key/value pairs as elements. > > > I tried: ``` val bundle = bundleOf { Pair("KEY_PRICE", 50.0) Pair("KEY_IS_FROZEN", false) } ``` But it is showing error....
2018/03/17
1,519
4,874
<issue_start>username_0: Im trying ti replicate a sentence classification model from this github <https://github.com/bgmartins/sentence-classification/blob/master/sentence-classification.py> **Here is my code:** ``` data = [ ( row["sentence"] , row["label"] ) for row in csv.DictReader(open("./test-data.txt"), delimi...
2018/03/17
1,236
4,581
<issue_start>username_0: In the homepage there is a menu with some categories and below there are the latest 10 posts. A post can have many categories and one category can belong to many posts so there are 2 models and a pivot table "category\_post" with 2 columns: id and name. So in the homepage, there is a menu wi...
2018/03/17
1,358
4,615
<issue_start>username_0: I'm creating an online courses website, in which you create a course object and add chapter objects to it. Each chapter has a foreign key to a course object: ``` class Course(models.Model): title = models.CharField(max_length=140, null=False) description = models.TextField(null=False) ...
2018/03/17
537
1,993
<issue_start>username_0: Assume I have an assortment of colors the user can put in. For now let's say we have three colors, red, blue, and yellow. Each color has a color ID, Red(1), Blue(2), and Yellow(3). I'm wondering if I can make a table that's something like this: ``` CREATE TABLE Colors ( Color CHAR(10) NOT ...
2018/03/17
238
798
<issue_start>username_0: ``` 4 7.99 31.96 10 ``` invoice i\_invoicenumber i\_invoicedate i\_payment i\_emailaddress i\_subtotal ``` 50 06-FEB-18 Cash 40 <EMAIL>@test ```<issue_comment>username_1: Give this a try... ``` UPDATE invoice i INNER JOIN ( ...
2018/03/17
709
2,387
<issue_start>username_0: I have made a Google Sheet for handling my medication. In column A, I have a dropdown of medication that I take. The time I initially take the medication isn't important, but what is important is when I take the next pill and it is different for each one. One pill, after taking it, I need to t...
2018/03/17
3,875
12,907
<issue_start>username_0: I'm using [fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) within my React app. The application was deployed on a server and was working perfectly. I tested it multiple times. But, suddenly the application stopped working and I've no clue why. The issue is when I send a `...
2018/03/17
2,396
5,936
<issue_start>username_0: What is the difference between `git push --all` and `git push --mirror`? I only know this: * With deleted local branch, `--all` doesn't push it and `--mirror` does. This is correct? Any other differences?<issue_comment>username_1: As it says in [the documentation](https://www.kernel.org/pub...
2018/03/17
741
2,084
<issue_start>username_0: I have this object: ``` obj = {key : val, key1 : val1, key2 : {key21 : val21,key22 : val22}, key3 : val3} ``` I want to generate a new object to be like: ``` objnew = {key : val, key1 : val1, key21 : val21, key22 : val22, key3 : val3} `...
2018/03/17
744
2,141
<issue_start>username_0: I am using create-react-app. When you go to localhost:3001/test - it *does* serve up the HTML. But all you see is an empty page because nothing in the id "root" is rendered. This is the code I have in my server: ``` app.get('/test', (req, res) => { res.sendFile(__dirname + '/public/inde...
2018/03/17
937
2,875
<issue_start>username_0: I've been trying to write an automated uploader that will sort through a directory and upload the next file in the directory with each run. I read that I should first create a text file that will write the names of the files. ``` static String fileName; static int i; public static void increm...
2018/03/17
803
2,665
<issue_start>username_0: I have confluent kafka, zookeeper, schema-registry and ksql running in containers on Kubernetes cluster. Kafka, zookeeper and schema registry works fine, a can create topic and write data in Avro format, but when I'm trying to check ksql and create some streaming with curl like: ``` curl -XPOS...
2018/03/17
726
2,462
<issue_start>username_0: How would I create a lambda expression for a task that returns a string? This is what I have tried but I get an error. Thank you for any help. ``` public static async Task GetStringAsync(string path) { try { var task = new Task(async () => { var response = await Client.GetAsync(path);...
2018/03/17
2,306
7,497
<issue_start>username_0: I've tried a few variations of CSS star ratings via different methods, and am trying to implement the following via FontAwesome rather than using a sprite. I want to be able to include half stars ideally, but this is where the example below is failing. This is what I've tried so far. I can't ge...
2018/03/17
615
1,992
<issue_start>username_0: I have an Excel file which includes lots of rows of information. I have actually a single problem which is I can't get the parent of each cells according to the information in the cell. It looks like this [![enter image description here](https://i.stack.imgur.com/bRYZR.jpg)](https://i.stack.im...
2018/03/17
912
3,109
<issue_start>username_0: I cant get my second if statement to work like expected. It is adding data into the array even though it's validated as incorrect. For example: The console prompts; > > Enter Score: 1 for student: 1 > > > Then if 500 is entered, the following prompt appears: > > Please enter a value bet...
2018/03/17
662
2,159
<issue_start>username_0: I am using Picasso 2.5.2 to use it with OkHttp 2.5.0 The code in `onCreate()` is like below: ``` File mypath = new File(getFilesDir().getAbsolutePath()+"/"+ date + "image.png"); if (mypath.exists()) { Picasso.with(FullscreenImage.this).load(mypath).into(fullImage);...
2018/03/17
2,110
7,919
<issue_start>username_0: I am writing an Android app that display pizza places near your location to do that I am using a call to google map using URL: <https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=>{latitude,longitude}&type=pizza&sensor=true&key={MY\_KEY} I am processing the data by extending...
2018/03/18
786
2,787
<issue_start>username_0: I'm trying to have a text input box that when you press keys on the keyboard it shows the ASCII codes underneath in a list. When you first click on the box the paragraph above is hidden. When you click away from the box I want the paragraph to reappear only if there is no list of codes unde...
2018/03/18
483
1,659
<issue_start>username_0: I'm trying to complete an img tag src using a filename stored in a mysql database. At the moment I have to load two images from this one MySQL query (They are chosen at random) moving forward however I will likely need to do more. This is my current query: ``` // Get random 2 $query="SE...
2018/03/18
798
2,583
<issue_start>username_0: Hello there is the code ``` $bot.on("presenceUpdate", (oldMember, newMember) => { if(oldMember.presence.status !== newMember.presence.status){ const memberID = newMember.user.id; if(newMember.user.presence.status === "online"){ membersOnline.push(memberID); console....
2018/03/18
853
3,317
<issue_start>username_0: I've been facing a weird issue lately with my React App. I'm trying to parse a JSON object that contains arrays with data. The data is something like this: {"Place":"San Francisco","Country":"USA", "Author":{"Name":"xyz", "Title":"View from the stars"}, "Year":"2018", "Places":[{"Price":"Free"...
2018/03/18
914
3,197
<issue_start>username_0: I may be misunderstanding here. I have a node server running at `localhost:3000`, and a React app running at `localhost:8080`. The React app is making a `get` request to the node server - my server code for this looks like: ``` const cookieParser = require('cookie-parser'); const crypto = re...
2018/03/18
804
2,784
<issue_start>username_0: In function types, you can write ``` ()->()? ``` And it builds fine! What is the `()?`?<issue_comment>username_1: Yes. ``` ()? ``` means optional void. I used to write it as (Void)? Don't think optional and void are the same thing. They are absolutely not. Essentially: ‘void’ is a type...
2018/03/18
482
1,883
<issue_start>username_0: I am making an app, and in that app, users login and I am storing their information; however, I have noticed that I don't have a users' password information after they register. Is it a good idea to store users' password when they register through Firebase? And is there a point where I will nee...
2018/03/18
807
3,330
<issue_start>username_0: I understand that react doesn't update state immediately then can someone tell me how i can log this state synchronously as my state is not a boolean and this answer didn't help me [setState doesn't update the state immediately](https://stackoverflow.com/questions/41278385/setstate-doesnt-updat...