date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/04 | 1,066 | 3,701 | <issue_start>username_0: I am trying to learn the Stream API and i came across the below code:
```
public class Test{
public static void main (String[] args)
{
List a = Arrays.asList(2,3,4);
System.out.println(a.stream().filter(i -> i < 10).average());
}
}
```
It gives a
>
> symbol "average... |
2018/03/04 | 493 | 1,890 | <issue_start>username_0: The official ReactJS documentation suggests to run the following command in the terminal for generating the release APK
```
cd android && ./gradlew assembleRelease
```
I get an exception in response to this command:
```
cd android && ./gradlew assembleRelease '.' is not recognized as an int... |
2018/03/04 | 3,284 | 10,404 | <issue_start>username_0: So I need to have a promo image displayed as a banner on a page. I have 4 buttons underneath said banner. Each button corresponds with a different promo image banner.
I would like to use an `eventlistener` with the click function to display each corresponding image, but only one at a time. Th... |
2018/03/04 | 1,831 | 5,305 | <issue_start>username_0: I have browsed through various similar posts here to no avail. They all arrive at similar solutions about using `npm cache verify` or `npm cache clear`, etc.
I have even went as far as to completely remove npm and node using every possible method and start fresh. I even resorted to using `--f... |
2018/03/04 | 2,855 | 8,557 | <issue_start>username_0: ```
func RATE(nper: Double, pmt: Double, pv: Double, fv: Double, type: Double, guess: Double) -> Double{
var rate = guess
var y: Double = 0
var f: Double = 0
var FINANCIAL_MAX_ITERATIONS: Double = 128
var FINANCIAL_PRECISION = 1.0e-08
if (abs(rate) < FINANCIAL_PRECISION)... |
2018/03/04 | 2,406 | 8,194 | <issue_start>username_0: I have tried to limit the number of `Start-Process` running from a Powershell, but I can't seem to get it to work.
I tried to follow this process: <https://exchange12rocks.org/2015/05/24/how-to-limit-a-number-of-powershell-jobs-running-simultaneously/> and [Run N parallel jobs in powershell](h... |
2018/03/04 | 1,317 | 4,230 | <issue_start>username_0: I have installed GTK+ (specifically GTK3) via MSYS and MinGW on Windows. I now want to copy the GTK+ dlls to my application directory so that it can be run on a computer without a global GTK+ installation. Which dlls are required for GTK+ to operate?
**EDIT:** The GTK+ documentation now contai... |
2018/03/04 | 1,384 | 4,479 | <issue_start>username_0: In my main function I call these two functions.
My duplicate value function works, it tells the user how many duplicate values there are. However, my unique value function always tells the user that there are 0 unique values. Obviously that's false because the first value is always unique.
I t... |
2018/03/04 | 501 | 1,993 | <issue_start>username_0: I'm following this link: [Hyperledger Composer Queries Tutorial](https://hyperledger.github.io/composer/latest/tutorials/developer-tutorial.html) to update an existing business network. Till step:3 everything working fine for me. But whenever I am executing step:4 (2) command I'm getting some e... |
2018/03/04 | 311 | 1,248 | <issue_start>username_0: Is it a better practice to use Postgres default value or generate them before passing to Postgres?
For example, is it better to use DEFAULT CURRENT\_TIMESTAMP in Postgres or is it better to get current time on server and then pass to Postgres?<issue_comment>username_1: The network should be up... |
2018/03/04 | 750 | 2,734 | <issue_start>username_0: Consider this simple C++-17 program:
```
#include
#include
using namespace std;
class Fraction {
public:
int nom;
int den;
Fraction operator+ (const Fraction& other) {
int nn = nom \* other.den +
den \* other.nom;
int dd = den \* other.den;
return Fraction(nn, dd);
}
Fraction(int n... |
2018/03/04 | 661 | 1,992 | <issue_start>username_0: When I run `conda install django`, I get the following error:
>
> Solving environment: done
>
>
> ==> WARNING: A newer version of conda exists. <==
>
>
> current version: 4.4.10
>
>
> latest version: 4.4.11
>
>
> Please update conda by running
>
>
>
> ```
> $ conda update -n base... |
2018/03/04 | 769 | 2,686 | <issue_start>username_0: My code is as shown below:
```
function Person (firstName,lastName,age){
var firstName = firstName;
var lastName = lastName;
var age = age;
function getName(){
return firstName+ " " + lastName;
}
}
var person = new Person("m","t",297)
print(person.getName())
```... |
2018/03/04 | 429 | 1,862 | <issue_start>username_0: I know that static variables are common for all instances and instance variables can be different for different variables. But, when I initialize a static variable in a constructor, the static variable can be different for different instances. Why doesn't Java give me an error when I do this?Wh... |
2018/03/04 | 1,226 | 4,123 | <issue_start>username_0: let's say i have a project name ="Scrum" and that has some users the project and got sprints so \*\*i want dstinct users of the Project that the Sprints in Scrum \*\*. image attached.
[](https://i.stack.imgur.com/FWusZ.png)<... |
2018/03/04 | 874 | 2,746 | <issue_start>username_0: I read in a text and want to remove all the punctuation of it. My first idea was:
```
data = readlines("text.txt")
data = lowercase.(data)
data = replace.(data, [','], [""])
data = replace.(data, ['.'], [""])
data = replace.(data, ['?'], [""])
data = replace.(data, [';'], [""])
data = replace.... |
2018/03/04 | 614 | 1,932 | <issue_start>username_0: Trying to import a JSON file
Mongodb Version -- V3.6.3
Shell Version 3.6
Using this command to connect to cluster and import
```
mongoimport --host cluster0-shard-00-00-xxm0e.mongodb.net:24537 --db ny --type json --file C:/data/docs/ny.json --jsonArray --authenticationDatabase admin --ssl ... |
2018/03/04 | 505 | 1,920 | <issue_start>username_0: I tried several solutions to the following forms but had no luck. I want to send the value a radio button back to my Redux store using a function, `updateCategory(),` passed as a prop, but I can't get the onChange to fire. Also, how would I pass the value of a radio button as a param instead of... |
2018/03/04 | 1,115 | 3,812 | <issue_start>username_0: I created the default Angular app using the CLI like so:
```
ng new ng-test-deploy
```
to test out deploying a dummy app to Github pages.
I ran through the procedure as defined [here](https://www.npmjs.com/package/angular-cli-ghpages) which, to summarise, does this:
```
ng build --prod --b... |
2018/03/04 | 514 | 1,633 | <issue_start>username_0: I have 5 button like this:
```
1
2
3
4
5
```
When someone cliked on one of this button,that button be in the middle and the order do not chnage(about order, i mean order of 1 2 3 4 5 be consecutive,all of position will be change but the order will not ... |
2018/03/04 | 1,163 | 4,162 | <issue_start>username_0: The code outputs separate lines, but I want it to have added all the lines together instead.
Example testdata file:
<NAME> at 2014 Athletics Paralympic Meeting
<NAME>, an athlete with an artificial leg, competes in the long jump at the 2014 Athletics Paralympic Meeting in Stade Sébastien Cha... |
2018/03/04 | 996 | 3,773 | <issue_start>username_0: I have been unable to make it work the gesture recognizer in my app.
Under `viewDidLoad` I added these
```
let orangeIndicatorTap = UITapGestureRecognizer(target: self, action: #selector(self.orangeIndicatorClick(_:)))
orangeIndicatorTap.numberOfTapsRequired = 1
orangeIndicatorTap.del... |
2018/03/04 | 869 | 3,194 | <issue_start>username_0: I have two tables. One stores "locations":
```
TABLE location (
ID serial PRIMARY KEY,
name text NOT NULL,
description text NOT NULL
);
```
Each location has many rows of "data":
```
TABLE data(
ID ... |
2018/03/04 | 1,084 | 4,507 | <issue_start>username_0: ```
public class MainForm {
String varpass = "<PASSWORD> a string that has to be passed.";
public String t1(){
String text = "This is a non-static method being called.";
return text;
}
public static String t2(){
String text = "This is a static method bein... |
2018/03/04 | 514 | 1,912 | <issue_start>username_0: I have 5 Dropdown lists which are filled with the columns of my dataset.
That works well.
```
var query = ds.Tables["Input"].AsEnumerable().Select
(a => new
{ID = a.Field("ID"),
Element1 = a.Field(comboBoxElement1.SelectedItem.ToString()),
Element2 = a.Field(comboBoxElement2.SelectedItem.ToStr... |
2018/03/04 | 1,087 | 3,242 | <issue_start>username_0: I have a data frame in Python.
```
import pandas as pd
inp = [{'image':'001.jpg', 'x':100, 'y':200,'w':100, 'h':200, 'brand':'test1'}, {'image':'001.jpg', 'x':100, 'y':200,'w':100, 'h':200, 'brand': 'test1'}, {'image':'001.jpg', 'x':100, 'y':200, 'w':100, 'h':200, 'brand': 'test2'}]
df = pd.... |
2018/03/04 | 707 | 2,314 | <issue_start>username_0: I have a file which is file1snappy.parquet. It is having a complex data structure like a map, array inside that.After processing that I got final result.while writing that results to csv I am getting some error saying
```
"Exception in thread "main" java.lang.UnsupportedOperationException: CSV... |
2018/03/04 | 599 | 1,737 | <issue_start>username_0: I am doing a C++ program using Eigen library and when I executed my code I got my variable P as
```
`-4 -3 -2 -1 0 1 2 3 4 5`
```
But it should be `-4.5 -3.5-2.5-1.5-0.5 1.5 2.5 3.5 4.5`
The numbers are getting rounded to the nearest integers towards infinity.Please help me find a solution ... |
2018/03/04 | 2,509 | 9,927 | <issue_start>username_0: Threading-wise, what's the difference between web workers and functions declared as
```
async function xxx()
{
}
```
?
I am aware web workers are executed on separate threads, but what about async functions? Are such functions threaded in the same way as a function executed through setInte... |
2018/03/04 | 709 | 2,893 | <issue_start>username_0: ```
for (int i = 0; i < 3; i++) {
list.add("test" + i);
}
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
synchronized (list) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
e.pr... |
2018/03/04 | 324 | 1,331 | <issue_start>username_0: I want to build an app using Clean Architecture and I want to store the drawable id of an image in the presenter:
```
var heart = R.drawable.heart_red
```
My question now is can I use R in the presenter or does it count as an android dependency?<issue_comment>username_1: It's safe to use R i... |
2018/03/04 | 1,092 | 2,563 | <issue_start>username_0: I have a string of basketball player stats like in the example below:
```
stats <- c("40pt 2rb 1as 2st 2to 4trey 11-20fg 14-14ft",
"7pt 5rb 1as 2st 1bl 3to 3-5fg 1-4ft",
"0pt 1rb 1as 0-2fg")
```
Ideally I would like to transform this string into tabular format:
![stats... |
2018/03/04 | 360 | 1,346 | <issue_start>username_0: Im using Tablesaw in my Angular 5 project but its not working when Im getting my table data from service but its working with static data.
```
export class MmrParticipationListComponent implements OnInit {
pid; mid; participationList; approversList = [];
constructor(private activatedRoute: Ac... |
2018/03/04 | 712 | 2,522 | <issue_start>username_0: I want to sum up all bytes of my structure. I read that I should cast pointer of my structure from char to short. Why?
Does casting using (short) from char to short is correct?
My code
```
#include
#include
struct pseudo\_header
{
int var1;
int var2;
char name[25];
};
void csum(const... |
2018/03/04 | 1,049 | 2,173 | <issue_start>username_0: I have 2 loops:
The first loop:
```
number = 1234567
number_string = str(number)
for ch in number_string:
print(ch)
```
This will print:
```
1
2
3
4
5
6
7
```
I have another loop which is:
```
totalNum = len(str(abs(number)))
for i in range(totalNum, 0, -1):
print("* 10^ ",i... |
2018/03/04 | 825 | 2,559 | <issue_start>username_0: I am new to C Language.
I have a doubt regarding the lvalue Error.
As I can understand, We get an lvalue Error when there is no permanent-address-bearing-variable to store the Rvalue. Here I can see a variable on the left side. But still, I get lvalue error.
Can somebody please clear my concept... |
2018/03/04 | 864 | 3,111 | <issue_start>username_0: When I try to run the following code, it's generating an error:
>
> undefined symbol st
>
>
>
It's showing me an error on option 2 when I try to display full student records.
I'm running it on turbo C++ compiler.
```
void main()
{
int option, i;
while (5)
{
printf("=====... |
2018/03/04 | 1,352 | 4,402 | <issue_start>username_0: I used [mocker](https://github.com/kriomant/mockers/blob/0.9.4/README.md) to test my project. I have no idea what kind of type conversion is needed by `say_hello_brother`. The simplified code list below:
**lib.rs**
```
#![feature(plugin, custom_derive)]
#![plugin(mockers_macros)]
#[cfg(test)]... |
2018/03/04 | 772 | 2,473 | <issue_start>username_0: I'm on SQL Server 2008, and having trouble querying an audit table the way I want to.
The table shows every time a new ID comes in, as well as every time an IDs Type changes
```
Record # ID Type Date
1 ae08k M 2017-01-02:12:03
2 liei0 A ... |
2018/03/04 | 1,063 | 4,300 | <issue_start>username_0: I'm working on a `PUT` request to be able to modify data in my JSON file, using Flask and Python. The problem is it won't save the changes made.
Below is my code:
```
@app.route('/updated', methods = ['POST', 'PUT' 'GET'])
def update():
try:
title = request.form['title']
p... |
2018/03/04 | 923 | 3,328 | <issue_start>username_0: I try to fine this time and this name by this code
```
$start = new MongoDate(strtotime("00:00:00"));
$end = new MongoDate(strtotime("8:00:00"));
$t= $collection->find('$and' => array( array('date' => array('$gt' => $start, '$lte' => $end)),array('name' =>$name)));
```
but i get
```
Parse e... |
2018/03/04 | 886 | 3,347 | <issue_start>username_0: I am learning how to code in Qt and made a semi-Notepad like application.
It is working like a charm in my PC, but when I sent the executable file (I sent the whole debug folder with all the necessary .dll files in it) to my friend, their OS shows the following error:
>
> [This application ha... |
2018/03/04 | 353 | 1,235 | <issue_start>username_0: I have an ASP.NET Core 2.0 application with and Angular 5 SPA hosted in the same folder.
Currently to deploy to IIS, I do the following:
```
// First publish the release configuration
dotnet publish -c release
// Now delete the wwwroot directory as it is pulished with ng build
rm -r bin/rele... |
2018/03/04 | 913 | 3,328 | <issue_start>username_0: I'm really wondering about the relation of the datasheets and how does this change how thing are done on the programming level,
As far as i know 8 bit in a uC is the resolution of the ADC up to 256 values that signals can be sampled, the higher you go the higher the precision is on the sampled... |
2018/03/04 | 433 | 1,712 | <issue_start>username_0: I'm studying a-level computer science and my text shows array pseudocode declarations, some starting at 1 and others 0. Can anyone tell me why this is the case. Please note that I am studying Python.
```
DECLARE List1 : ARRAY[1:3] OF STRING // 3 elements in this list
DECLARE List2 : ARRAY[0:... |
2018/03/04 | 752 | 2,745 | <issue_start>username_0: I'm a beginner to node js and sequelize ORM.
Below is my code and it has while loop.
```
var arr = [];
var orgParntId = 7;
do {
console.log('LOG 1');
global.meal.findOne({
where: {
id: orgParntId,
... |
2018/03/04 | 346 | 1,268 | <issue_start>username_0: My training data consists of about ~700 unique samples (this is for a regression problem). The data is not shuffled, so the first N samples have the same label (say, the value *1.25*), then the next M samples have a the same label (say, *2.99*), etc. In total there's around 15 unique labels.
I... |
2018/03/04 | 246 | 897 | <issue_start>username_0: When we parse an XML document like
```
Sometext
```
using Javax.xml.Parsers.DocumentBuilder, we can always get the text node by
```
Document doc = ...
Node entry = doc.getFirstChild();
Node textNode = entry.item(0);
```
However, I wonder how can we get text node by using dom4j. It seems... |
2018/03/04 | 611 | 2,004 | <issue_start>username_0: I am using the following wrapper for Email Hunter API...
```
require_once '/home/mysite/public_html/path/to/hunterio/vendor/autoload.php';
use Hiraya\Hunter;
$hunter = new Hunter('MY_API_KEY');
```
They key method is ...
```
$hunter->findEmailByCompany('microsoft.com', '<NAME>');
```
Bu... |
2018/03/04 | 201 | 702 | <issue_start>username_0: <http://127.0.0.1/wordpress/>{{movie}}/watch-appetite-for-love-2016-free-on-123movieshub/
I want all my url to show movie word before postname<issue_comment>username_1: The only indication you can get from such pattern is that the learning rate is too large, you should decrease it until the lo... |
2018/03/04 | 409 | 1,575 | <issue_start>username_0: I am trying to store an array/set of unique elements in a MySQL cell.It would be something like following:
```
user_id liked_friends_id
1 [3,6,4]
2 [1,2,4]
```
Here the **liked\_friends\_id** is an array/set which stores all unique ids.
Is there any way to imp... |
2018/03/04 | 413 | 1,214 | <issue_start>username_0: If I have a subshell command:
```
output="$(runfoo)";
```
is there way to store only the last line of the output from `runfoo` into the variable `output`? Or perhaps only the first line?<issue_comment>username_1: Only stdout:
```
output="$(runfoo | tail -n 1)"
output="$(runfoo | head -n 1)... |
2018/03/04 | 963 | 3,228 | <issue_start>username_0: ```
from django.db import models
class Pet(models.Model):
SEX_CHOICES = [('M','Male'), ('F', 'Female')]
name = CharField(max_length=100)
submitter = CharField(max_length=100)
species = CharField(max_length=30)
breed = CharField(max_length=30, blank=True)
description = m... |
2018/03/04 | 338 | 1,174 | <issue_start>username_0: How i can extract files from zip in `storage/app/anyFolder`, but not public?
```
$directoryName = strval(time()).rand(1000, 9999);
Storage::makeDirectory('temp/'.$directoryName, 0777);
$path = 'storage/app/temp/'.$directoryName;
$zipArchive = Zipper::make('storage/app/resources/'.$id.'.zip')... |
2018/03/04 | 646 | 1,999 | <issue_start>username_0: I've searched across many tutorials/blogs/guides and official Tensorflow documentation to understand this. For example, see below lines:
```
lstm = tf.nn.rnn_cell.LSTMCell(512)
output, state_tuple = lstm(current_input, last_state_tuple)
```
Now if I unpack state,
```
last_cell_memory, last_... |
2018/03/04 | 1,020 | 3,405 | <issue_start>username_0: I'm almost done with my React Native view, but I'm not sure how to group individual items in a page that contains many.
How do I moved **Details** directly under **Header**?
[](https://i.stack.imgur.com/3k7Qg.png)
**view**
`... |
2018/03/04 | 1,145 | 3,957 | <issue_start>username_0: Edit : i also this post
[All com.android.support libraries must use the exact same version specification](https://stackoverflow.com/questions/42374151/all-com-android-support-libraries-must-use-the-exact-same-version-specification)
i upgrade downgrade multiple version of android support libra... |
2018/03/04 | 249 | 767 | <issue_start>username_0: Is there any way to get only values from a select using pdo?
```
select city from customer
```
I want as result an array with only cities values no index 'city', eg.:
```
['milano','rome']
```
thx.<issue_comment>username_1: Something like this:
```
$cities = array();
$stmt = $pdo->prepa... |
2018/03/04 | 689 | 2,067 | <issue_start>username_0: Not sure why the following css selector won't work. Want to enter 100 in all fields except last one in DOM. Would prefer a pure css solution, i.e. not add .not(":last") in jQuery.
```js
$("input[id^=FIELD]:not(:last-child)").val("100");
```
```html
```<issue_comment>username_1: ```js
$("inpu... |
2018/03/04 | 597 | 2,423 | <issue_start>username_0: I have the following view for my page to reset your password:
```
from django.contrib.auth.forms import PasswordChangeForm
def password_change(request):
if request.method == 'POST':
password_form = PasswordChangeForm(data=request.POST, user=request.user)
if password_form.... |
2018/03/04 | 456 | 1,742 | <issue_start>username_0: I have a form for editing an Entity that `hasMany` children. Within this form there's a `ReferenceManyField` component. This component lists items along with an action button that I have created to let's say “approve” things.
```jsx
```
UnassignButton performs a regular action:
```javascrip... |
2018/03/04 | 2,979 | 10,193 | <issue_start>username_0: I know it has been asked, but, this is different, please have a look below: I've just created a very simple test project, the folder structure is as such:
[](https://i.stack.imgur.com/36oAN.png)
Ignore the red marks, it's becaus... |
2018/03/04 | 1,225 | 3,156 | <issue_start>username_0: I want to combine two lists in to one dictionary type.
```
Name = ['John','Mary','Serena','Felicia']
Data = ['26','179','25','164','29','149','29','167']
```
desirable output in Json format
```
{"people":[{'Name': 'John',
'Age': '26',
'Height': '179'},
{'Name': 'Mary',
'Age':... |
2018/03/04 | 2,989 | 10,289 | <issue_start>username_0: A regular spreadsheet (tab) in Excel can be made into a table by selecting the data and `ctrl` + `T`. (This gives each column a header that allows filtering of values).
My spreadsheets are created using [Apache POI](https://poi.apache.org/) and the SXSSF streaming interface, I have to use the ... |
2018/03/04 | 654 | 1,549 | <issue_start>username_0: Write a Python function histogram(l) that takes as input a list of integers with repetitions and returns a list of pairs as follows:
for each number n that appears in l, there should be exactly one pair (n,r) in the list returned by the function, where r is is the number of repetitions of n in ... |
2018/03/04 | 495 | 1,273 | <issue_start>username_0: Really I don't know what to do. Please help to solve this problem. I have a CSV file, I transfer it to an array:
```
import csvToJson from 'convert-csv-to-json';
import fs from 'fs';
const URL_01 = `${__dirname}/URL/price.csv`;
//Unnecessary code removed for clarity...
app.get('/all', (req,... |
2018/03/04 | 338 | 1,133 | <issue_start>username_0: i run following codes in python3:
```
import sqlite3
conn = sqlite3.connect("data.db")
conn.execute("create table if not exists data(\
id int prinmary key,view int)")
conn.execute("insert into data (id,view) values (0,0)")
conn.execute("insert into data (id,view) values (1,'--')"... |
2018/03/04 | 260 | 769 | <issue_start>username_0: I have a couple of `DataFrames` from different files, which are named for example df001, df002 and so on.
Now I want to loop over those DataFrames to execute similar tasks. But I can't figure out how to address them.
This failed (AttributeError: 'str' object has no attribute 'iloc'):
```
nam... |
2018/03/04 | 1,890 | 6,216 | <issue_start>username_0: The output of the code show gibberish values for all the variables of the Student struct. When the display function is ran.
I've include the relevant code in each of the add and display function for the binary file.
For the second function, does the `seekg` pointer automatically move to read ... |
2018/03/04 | 1,575 | 5,324 | <issue_start>username_0: I am going to read a file from command line. And I want to store the lines in array. But the problem is I dont know the number of lines. So I dont know how to store it dynamicly in array. So please help for that. (By giving little example codes)<issue_comment>username_1: There are a lot of prob... |
2018/03/04 | 500 | 2,108 | <issue_start>username_0: I added `bool` variable into my `Settings.settings` file to store user configuration preferences:
[](https://i.stack.imgur.com/U7dWl.png)
And in code behind i am changing this this way:
```
Properties.Settings.Default.autoCh... |
2018/03/04 | 553 | 2,255 | <issue_start>username_0: Usage of the signal `currentIndexChanged` is clear, it's triggered when a different item from combobox is selected. But I'm facing a problem with the other signal. `editTextChanged` is triggered when the `editText` of combobox is changed manually by the user overwriting it, but also when anothe... |
2018/03/04 | 432 | 1,541 | <issue_start>username_0: I have an API that returns the following JSON content.
```
{"server_online":"0"}
```
I'm trying to update a div's content to say "Online" or "Offline" depending on the 0 or 1 value.
```
$.ajax({
url: "http://api.dev.net/get/server/status",
success: function(result) {
$('#ser... |
2018/03/04 | 378 | 1,253 | <issue_start>username_0: I have a date value "11/7/2016 11:51" which is currently in "mm/dd/yyyy hh:mm" format. I want to convert this date to "2016-11-07 11:51:00" i.e "yyyy-mm-dd hh:mm:ss" format using ***R language***.
I would like to have any suggestions/help. Thanks in advance.. !!<issue_comment>username_1: You ... |
2018/03/04 | 615 | 2,612 | <issue_start>username_0: I've just noticed something interesting in the `codeblocks` IDE, via the **editor settings > syntax highlighting**, Saying 'User keywords', I am aware that they are reserved keywords such as for, int, signed, etc but what are these supposed to be?
My best guess is that it really means 'symbol... |
2018/03/04 | 544 | 2,209 | <issue_start>username_0: still advancing in my tutorial to learn python, I am told to do that :
```
sudo pip install requests
```
here is what I get in return :
"
>
> The directory '/Users/gui/Library/Caches/pip/http' or its parent
> directory is not owned by the current user and the cache has been
> disabled. ... |
2018/03/04 | 1,199 | 4,000 | <issue_start>username_0: I have written a function for a web-based game I am designing, but whenever I call this function, it returns as undefined.
```js
function getRnd(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function getOttomanRival() {
return this.getRnd(1, 3)
if (ottoma... |
2018/03/04 | 1,133 | 4,929 | <issue_start>username_0: In my android application, when i insert repeated values it doesnt show in the database, essentially what i am doing is splitting the srting in 2 halves and inserting one string in one column by insertdata() and second string in second column by insertdata1() and following is my code
**main**
... |
2018/03/04 | 703 | 2,495 | <issue_start>username_0: I should preface this... I cannot use dplyr. It is just not installing in my version of R.
How would I do an action similar to a `countifs` or `sumifs` function in R?
```
P1 | P2 | Match | Same | count_of_friends
M | F | FALSE | FALSE| 6
M | M | TRUE | TRUE | 7
F | M | FA... |
2018/03/04 | 756 | 2,937 | <issue_start>username_0: This `function` toggles the active state of a hamburger icon when clicking on it. Also clicking anywhere on the document does the same but only if the dropdown is open.
```
var dropdownOpen = false;
$(".hamburger").click(function () {
$(this).toggleClass('is-active');
dropdownOpen = !... |
2018/03/04 | 803 | 2,940 | <issue_start>username_0: Trying to get the results of a joined table for this, with the code below. Is it possible to join together the results of a query with a join while at the same time, replacing NULL values? I tried the code below but I can't get them to work with the GROUP BY.
```
SELECT
tblAdmission.Admiss... |
2018/03/04 | 978 | 3,574 | <issue_start>username_0: I have an app which adds coroutines to an already-running event loop.
The arguments for these coroutines depend on I/O and are not available when I initially start the event loop - with *loop.run\_forever()*, so I add the tasks later. To demonstrate the phenomenon, here is some example code:
`... |
2018/03/04 | 1,634 | 5,845 | <issue_start>username_0: I wrote a code for a login page in PHP and MySQL. The code that I wrote is given below.
**logintest.php**:
```
php
session_start();
require_once('csrf.php');
?
php
//session_start();
require_once('connect.php');
$csrf = new csrf();
// Generate Token Id and Valid
$token_id = $csrf-get_... |
2018/03/04 | 927 | 3,236 | <issue_start>username_0: ```
import java.util.;
public class Student {
String Name;
String Group;
String Phonenumber;
public static void main(String[] args) {
ArrayList arrayList = new ArrayList();
Student student = new Student("Ayush", "L1N1", "9876543210");
arrayList.add(stu... |
2018/03/04 | 625 | 1,670 | <issue_start>username_0: I just want to delete points drawed by command "plt.plot(x,y)" in python package matplotlib.Would you give me some specific commands
```
x,y=self.forward(x,y,v,target1)
print a
print x,y
plt.plot(x, y, '*')
```<issue_comment>username_1: You can... |
2018/03/04 | 663 | 1,777 | <issue_start>username_0: I don't understand why this code is not iterating properly?
```
income = 0
expenses = 10
profit = income - expenses
if profit <= 0:
income += 1
print(profit)
```
I would expect it to increment the income by one until 10, however it only runs once, outputting:
```
-10
```
Sincere t... |
2018/03/04 | 261 | 946 | <issue_start>username_0: Am working on angular forms where I want to pass values of the select input field in my form.
I have 2 select input field where one works properly when one works fine if I use
```
```
but the other one is not working since if I use,
```
,
```
where user is an object. I cannot able to pa... |
2018/03/04 | 202 | 817 | <issue_start>username_0: Can we create UIDeviceOrientationDidChangeNotification event manually?
In AppDelegate.swif
I have
```
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask
```
this method will return a result depends on user setti... |
2018/03/04 | 177 | 696 | <issue_start>username_0: I installed an extension for creating notes and gave it a path for storing them in my vscode folder which is in program files, but vscode shows there is no permission to write in that folder. How can I fix it?<issue_comment>username_1: Open your editor as administrator.
Upvotes: 2 <issue_commen... |
2018/03/04 | 710 | 2,662 | <issue_start>username_0: The method `tableView(_:,editActionsForRowAt:)` works fine for devices running iOS 10 or above but is not called on devices running iOS 9.3
I am using
```
func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]?
{
"Code"
return [ "... |
2018/03/04 | 381 | 1,436 | <issue_start>username_0: I wrote a login form: First, you enter your email and password, then there's a checking to check your spelling of email and password. After that, the program runs to .jsp file to check if the user exists. If it exists, it sends the user/ admin to the homepage, else, it returns the guest to the ... |
2018/03/04 | 1,085 | 3,813 | <issue_start>username_0: On my ASP.net-based website I am aggregating feeds of my activities from several website.
One of those is the GitHub feed at `https://github.com/lucamauri.atom`: this is a valid feed correctly readable using a web browser and it properly worked on my website since a couple of weeks ago. Since t... |
2018/03/04 | 318 | 1,160 | <issue_start>username_0: I would like to use jQuery progress bar and add it to the top of the page only when the page is loading (and make it disappear afterwards), a behavior which is somehow similar to the progress bar in GitHub:
[](https://i.stack.... |
2018/03/04 | 453 | 1,725 | <issue_start>username_0: I'm trying to create a ViewController which will hold some large text. I used `UILabel` but since the text can be long, it won't work. Trying to switch to `UITextView`but I'm having some problems.
I'm using `ScrollView` since there is a image on the top and button on the bottom. So I don't it ... |
2018/03/04 | 877 | 3,037 | <issue_start>username_0: Tried all other codes on similar pages but failed to work.
This is my current version. Works only if I currently have a new email window open and oddly, my code will paste the .body and cell range details into 2 separate new email windows.
I just want the code to open a new email window with... |
2018/03/04 | 994 | 2,978 | <issue_start>username_0: My first array like this :
```
$photoList = array(
array(
'id' => 1,
'name' => 'chelsea.jpg'
),
array(
'id' => 2,
'name' => 'mu.jpg'
),
array(
'id' => 3,
'name' => 'city.jpg'
)
);
```
My second array like this :
```
$ph... |
2018/03/04 | 823 | 2,442 | <issue_start>username_0: I wonder why append add a number to every list that I have in my list. Not only to that one ([0]) that I have choosen. What's the difference between writing [0] or any other number next to append?
```
j = [[]] * 5
j[0].append(5) # add 5 to every list on list
j[1].append(4) # what's the diffre... |
2018/03/04 | 613 | 1,819 | <issue_start>username_0: I got below error while creating new rails application. I ran bundle install but didn't work it.
**Could not find gem 'mysql2 (< 0.5, >= 0.3.18)' in any of the gem sources listed in your Gemfile.**
**Gemfile**
```
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" u... |
2018/03/04 | 549 | 2,050 | <issue_start>username_0: I am new to Spring, I read **BeanFactory** is also called **basic IOC** and **ApplicationContext** is called **Advanced IOC**.
I read:
**BeanFactory Container** is the simplest container providing the basic support for DI and is defined by the org.springframework.beans.factory.BeanFactory int... |
2018/03/04 | 444 | 1,434 | <issue_start>username_0: I used to have a query like this
```
$topReferrals = User::orderBy('user_referrals', 'DESC')->get();
```
Recently I changed my database structure to not count user\_referrals for each user in an int datatype, but to have a column for each user called `referred_by` and have its value who they... |