date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/04 | 594 | 1,964 | <issue_start>username_0: I'm not a script author.
But I would like to write more better script.
When Use repeated code, How can I write?
```js
$( ".lecture-0" ).click(function() {
$( ".lecture-0-video" ).css("display", "block");
});
$( ".lecture-1" ).click(function() {
$( ".lecture-1-video" ).css("display", "b... |
2018/03/04 | 577 | 2,094 | <issue_start>username_0: The frozenset docs says:
>
> The frozenset type is immutable and hashable — its contents cannot be altered after it is created; it can therefore be used as a dictionary key or as an element of another set.
>
>
>
However, the docs for for python sets says:
>
> Since sets only define part... |
2018/03/04 | 636 | 2,187 | <issue_start>username_0: Can you please help me understand why pygame shows my image as mirrored? Please see the attached image for more info:
[](https://i.stack.imgur.com/osw1l.jpg)
I am capturing an image from PiCamera into PiRGBArray stream, then ... |
2018/03/04 | 519 | 1,662 | <issue_start>username_0: I want to add a 3d matrix in the end to a 4D Matrix:
like this:
```
v=VideoReading('video.avi');
mat3d = zeros([n m 3],'double');
mat4d = zeros([n m 3 2],'double');
for i=1:10
mat3d = read(v,i);
mat4d = ????;
end
l=size(mat4d);
```
I would like to have the 10 frames added in the mat4d, l=[n ... |
2018/03/04 | 839 | 2,412 | <issue_start>username_0: I have written this code but it's not working. It is showing some extra characters in the end. Here's the code:
```
// Program to concate/join two string
#include
#include
main()
{
int i,j,n=0;
char str[100],str2[100],str3[100];
printf("Enter string 1:\n");
gets(str);
printf("Enter string... |
2018/03/04 | 264 | 1,094 | <issue_start>username_0: Automation Anywhere. How do I pick a value from dropdown. I tried 'set text' from a copied variable. Its very slow, and also doesnt seem to be the right away. I would want to pick a value from the dropdown. Any idea how this can be done ? Thank you<issue_comment>username_1: You can do it using ... |
2018/03/04 | 942 | 3,131 | <issue_start>username_0: I need to convert top-level newlines in a label to so that they actually look like newlines.
E.g. the label
```
Hello
therewho
knowswhat's going on
```
should become
```
Hello
therewho
knowswhat's going on
```
I tried already scanning the top-level text nodes using `.childNodes` and r... |
2018/03/04 | 952 | 3,125 | <issue_start>username_0: ```
export const Schools = [
{
value: "Alabama A & M University"
},
{
value: "University of Alabama at Birmingham"
},
{
value: "Amridge University"
},
{
value: "University of Alabama in Huntsville"
},
{
value: "Alabama State University"
},
{
value: ... |
2018/03/04 | 868 | 2,788 | <issue_start>username_0: I have the following call to create a named pipe:
```
mkfifo "$HOME/.quicklock/ql_named_pipe";
```
then I read from the named pipe:
```
while read line; do ql_on_named_pipe_msg "$line" "$$"; done < "$HOME/.quicklock/ql_named_pipe" &
```
but I get this error message:
>
> ./scripts/tsc.sh... |
2018/03/04 | 379 | 1,504 | <issue_start>username_0: It shows and when clicked a drop down always shows "Loading...", but nothing ever gets detected.
Even though adb detects the device.<issue_comment>username_1: Setting the **correct path for "Flutter SDK path"** under "Languages & Frameworks/Flutter" in Android Studio settings fixed the problem... |
2018/03/04 | 395 | 1,724 | <issue_start>username_0: My scenario:
I have an app that sends push notifications about articles on a daily basis. The iOS app has three UNNotificationActions attached to the notification -- one to read the article, one to share the article, and one to save the article for later. The read/share article actions are for... |
2018/03/04 | 604 | 1,992 | <issue_start>username_0: i'm new in jquery ajax and i need some help.
**This is my basic html.**
```
msg\_id:
msg\_replay
Click Me
msg\_id:
msg\_replay
Click Me
```
**This is my jquery:**
```
function getmsg(formID) {
var formName = '#replayForm' + formID;
$(formName).submit(function (e) {
e.prev... |
2018/03/04 | 583 | 1,942 | <issue_start>username_0: I have a question about parameters passing. I used generate for to do module instantiation. But how to pass different parameters to each module?
For example:
```
generate
for (i=0;i
```
For N modules, each with different p1 and p2. How to do that? By the way, the number of parameters is ve... |
2018/03/04 | 1,695 | 6,372 | <issue_start>username_0: I'm watching unity tutorials and in the control code of the ship I would like to make it rotate on its axis, that is, it can rotate 360 degrees continuously while I press the right key for example.
playerController:
```
using System.Collections;
using System.Collections.Generic;
using Unity... |
2018/03/04 | 1,044 | 3,314 | <issue_start>username_0: I'm having trouble reversing a LinkedList. In other words, I need them sorted in z-a order (in contrast to a-z). I've tried Collections.reverse but is not coming into effect? I have the following:
```
import java.io.*;
import java.util.*;
public class pa9Driver {
//create two list
//1st List i... |
2018/03/04 | 823 | 3,158 | <issue_start>username_0: Trying to delete a record by using JQuery/Ajax function so that my page will not reload everytime I delete. I have a Movie.php that serves as a model object for Movie and this is where I put the function called delete\_movie to delete based on movieId parameter. I have tried to call it inside m... |
2018/03/04 | 935 | 3,009 | <issue_start>username_0: I've been using a way to unsuscribe people from a website newsletter, and that works when a user replies to an email with the word "unsuscribe".
But I want to change that so people only click a link in the email they received, redirect to my website and succesfuly unsuscribe that user. But thi... |
2018/03/04 | 676 | 2,348 | <issue_start>username_0: I have been trying to get pip with python3 on WSL ubuntu 16.04 and have had no success. I have been running `sudo apt install --reinstall python3-pip`, but still have issues getting pip to work properly.
```
$ pip3
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in
from pi... |
2018/03/04 | 633 | 2,385 | <issue_start>username_0: My Angular Components tend to have a global state (or "mode") so I am looking for a way to code this efficiently. What I tried to do is this:
```
@Component({
....
})
export class AbcComponent implements OnInit {
enum State {
init, view, edit, create, wait
}
state: State = Sta... |
2018/03/04 | 914 | 3,272 | <issue_start>username_0: I'm trying to get my profile state into redux. the form and action are all working correctly but the action's payload is undefined when it goes to the reducer. Pretty sure it's a rookie mistake but I can't see it for the life of me.
I followed Ste<NAME>ider's udemy course as a template and hav... |
2018/03/04 | 823 | 2,921 | <issue_start>username_0: ```
contructor:
this.getMeSomething = this.getMeSomething.bind(this)//////
getMeSomething(abc, xyz, event){}
class xyz extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
{
this.props.cars.map((car) => {
return {car}
})
}
... |
2018/03/04 | 652 | 1,456 | <issue_start>username_0: I'm fairly new to R and currently trying to write a for loop to calculate and add to the currently existing dataset.
It's not exactly what I'm trying to do but the idea is as follows.
R code below:
```
x1 = rnorm(n=100, m=0, sd=1)
x2 = rnorm(n=100, m=3, sd=2)
x3 = x1 * 4.12
d = data.frame(x1... |
2018/03/04 | 362 | 1,315 | <issue_start>username_0: ```
class Word(var mDefultTranslation: String, var mArabicTranslation: String ) {
fun Word (defultTranslation : String , arabicTranslation : String ){
mDefultTranslation = defultTranslation
mArabicTranslation = arabicTranslation
}
}
val words = arrayListOf()
w... |
2018/03/04 | 1,349 | 3,972 | <issue_start>username_0: I need to use a python script to take a email and fine a link from it and them open use that link to send a packet to a server that has that verification link inside of it so it verifies an account. How would I use python to take the
```
https://www.boomlings.com/database/accounts/activate.php... |
2018/03/04 | 1,431 | 4,713 | <issue_start>username_0: I have a short but perhaps not simple question.
How would I format this code to avoid error?
```
def __str__(self):
return "\nTeam name is " +
self.teamName +
"\nTheir regular season record was " + self.record +
"\nTheir win streak is " + self.winStr... |
2018/03/04 | 810 | 3,148 | <issue_start>username_0: Please Help To Solve This Problem
My Controller
```
php namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesCommands;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\Authori... |
2018/03/04 | 3,427 | 10,045 | <issue_start>username_0: I'm defining classes as stand-ins for hardware registers in a Windows PC-based simulation environment for embedded code. To work seamlessly and appear to the embedded firmware code as if they were hardware registers, the classes have to implicitly convert to/from their appropriate standard fixe... |
2018/03/04 | 1,384 | 4,710 | <issue_start>username_0: I want a model with 5 choices, but I cannot enforce them and display the display value in template. I am using CharField(choice=..) instead of ChoiceField or TypeChoiceField as in the [docs](https://docs.djangoproject.com/en/dev/ref/models/instances/#django.db.models.Model.get_FOO_display). I t... |
2018/03/04 | 1,371 | 4,607 | <issue_start>username_0: I'm currently using PDO to do a select on a MySQL table and I have it printing the results, which are correct in terminal.
I'm trying to apply a 'while' loop to it that selects records from an odbc database where the `order_id` from the first query is equal to the `invnoc` in the 2nd query. I ... |
2018/03/04 | 783 | 2,593 | <issue_start>username_0: For example, if I wanted to test that number `x = 5`, I could write a test to test that indeed, `x` equals `5`. Would it then be necessary to add additional tests such as `x != 4` and `x != 6`? Or does the fact that checking for `x = 5` imply that those other tests are true too?<issue_comment>u... |
2018/03/04 | 738 | 2,493 | <issue_start>username_0: I wish to implement simple functionality of virus check to any downloaded file, similar to what Microsoft edge does. Is it possible to do so without having a own antivirus engine?<issue_comment>username_1: Well this is the common issue even when I started with django. So first let's look at dja... |
2018/03/04 | 1,218 | 4,876 | <issue_start>username_0: I would like to understand the difference between the format of having a pointer to an array of characters declared and initialised to an array of choice example `char *s = "Hello";` and having it done the more common way of declaring an array `char s[] = "Hello";`
I recreated memset and tried... |
2018/03/04 | 787 | 2,463 | <issue_start>username_0: Lets take a very simple usage of `clone(2)`
```
int stack_func(void *arg)
{
*(int*)arg = 10;
return 0;
}
int main()
{
int a = 50;
clone(stack_func, malloc(1024*1024) + (1024*1024), SIGCHLD, &a);
sleep(2); //Just to be sure
printf("%d\n", a);
return 0;
}
```
From ... |
2018/03/04 | 736 | 2,425 | <issue_start>username_0: I'm trying a very simple shallow test for a component:
```
it('renders without crashing', () => {
shallow();
});
```
In my sample component, I did a setState :
```
this.setState({myCurrentState: "InSample"});
```
Now somewhere in my return, I used that to output an element, say:
```
re... |
2018/03/04 | 456 | 1,782 | <issue_start>username_0: I am trying to search for users based on their names. My user schema looks like:
```
user: {
firstName: string,
lastName: string,
...
}
```
I can run the following query fine:
```
const userDocs = await UserModel
.find({
$expr: {
$eq: [
{
$concat: [
... |
2018/03/04 | 976 | 2,756 | <issue_start>username_0: I'm trying to append a columns contents to the end of each line. For example, I have:
```
0,<NAME>,Street,City
1,Jane L Doe,Street,City
2,<NAME>,Street,City
3,<NAME>,Street,City
4,Jane L Doe,Street,City
5,<NAME> Doe,Street,City
6,John L Doe,Street,City
7,Jane L Doe,Street,City
```
Tr... |
2018/03/04 | 854 | 2,518 | <issue_start>username_0: I was wondering how to compare the row elements of a matrix. I want to do that to verify if all of the row elements are multiple of themselves. I already know that a numer is multiple of another number if their `mod == 0`.
But, lets suppose that I have this matrix
[
Koalas

Tulips
, with some changes:
Say that I have 100 tweets.
In those tweets, I need to extract: 1) food names, and 2) beverage names. I also need to attach type (drink or food) and an id-... |
2018/03/04 | 2,262 | 7,362 | <issue_start>username_0: I tried almost every solution, but I think this is something specific to my project libraries.
This is my project level gradle.
```
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
m... |
2018/03/04 | 900 | 3,054 | <issue_start>username_0: This is my Angular5 project structure.
[](https://i.stack.imgur.com/tmbE7.png)
Both `tsconfig.app.json` and `package.json` contain this section
```
"include": [
"/src/main.ts",
"/src/polyfills.ts"
]
```
B... |
2018/03/04 | 476 | 1,300 | <issue_start>username_0: So I was trying to add 2 dimensional arrays to an array list like this:
```
public class game{
static ArrayList edges = new ArrayList();
static void setEdges(){
for(int i=0;i<8;i++){
for(int j=0;j<8;j++){
edges.add( {9\*i+j,9\*i+j+1} );
edges.add( {9\*i+j , 9\*i+j+9} );
}
}
}... |
2018/03/04 | 2,946 | 9,648 | <issue_start>username_0: I'd like to make an [Archimedean spiral](https://en.wikipedia.org/wiki/Archimedean_spiral) in SVG.
I [created a spiral](https://codepen.io/ericandrewlewis/pen/RQOdWG) with four quadratic bezier points, but I'm not sure where I should put the control points for each to get a perfect Archimedean... |
2018/03/04 | 352 | 1,136 | <issue_start>username_0: When I try to connect the MySQL Server by command:
```
mysql -u root -p
```
I get error "Access denied". I'm sure that the password is right.
When I use the
```
mysqld --defaults-files "xxx\my.ini" --console --skip-grant-tables
```
option, I can access in, but when I quit this, access is... |
2018/03/04 | 453 | 1,244 | <issue_start>username_0: I have a large list of URLS such as:
<https://www.walmart.com/ip/Cabbage-Patch-Kids-Naptime-Babies-Doll-Blonde-Hair-Blue-Eye-Girl/45792420>
<https://www.walmart.com/ip/My-Life-As-18-inch-Schoolgirl-Doll-Blonde/336940687>
<https://www.walmart.com/ip/My-Life-As-18-inch-Everyday-Girl-Doll-Afric... |
2018/03/04 | 1,719 | 3,901 | <issue_start>username_0: Here is a vector containing values ranging from 0 to 1:
```
a <- runif(100, 0, 1)
```
I want to do the following conversion
```
>= 0.975 becomes AA+
<= 0.025 becomes AA-
< 0.975 && > 0.025 becomes AA
a[a >= 0.975] = 'AA+'
sum(a == 'AA+')
3
a[a <= 0.025] = 'AA-'
sum(a == 'AA-') ... |
2018/03/04 | 378 | 1,232 | <issue_start>username_0: I am trying to round the corners of a stack layout, it works on android but on iOS, they still appear square but it does display the Frame shadow
My XAML is
```
. . .
```<issue_comment>username_1: >
> they still appear square
>
>
>
Actually, the `Frame` is round not the `StackLayout`... |
2018/03/04 | 441 | 1,294 | <issue_start>username_0: I am using this line to batch convert mp4 files to webm files. For all mp4 files i need the output files to be of same name but .webm extension. For example if i have video1.mp4 and video2.mp4 then after conversion i need two files i.e video1.webm and video2.webm. How can i achieve this using b... |
2018/03/04 | 1,033 | 2,747 | <issue_start>username_0: I have the following string,
```
szTemp="23.4 78.9"
```
I want to split it into two smaller strings,
```
szIndoorTemp="23.4"
szOutdoorTemp="78.9"
```
However doing this,
```
szIndoorTemp=${szTemp::-5}
szOutdoorTemp=${szTemp::5}
```
Does not produce this and causes the script to crash.... |
2018/03/04 | 1,012 | 2,479 | <issue_start>username_0: I have a table that is something like this:
```
ID Date
1 10/04/2015
1 28/04/2015
1 14/07/2015
1 30/07/2015
1 30/08/2015
2 10/04/2016
2 28/04/2016
2 14/05/2016
2 30/05/2016
```
but i am trying to achieve like:
```
ID Date
1 28/04/2015
1 30/07/2015
1 30/08/2015
2 ... |
2018/03/04 | 830 | 2,482 | <issue_start>username_0: I need a way to check if a Server already exist inside my JSON Array.
Here is an example JSON Array:
```
[{
"ID": 14,
"PID": 15728,
"Online": 1,
"Servers": "staging,dev,test"
}, {
"ID": 9,
"PID": 6048,
"Online": 1,
"Servers": ""
}, {
"ID": 8,
"PID": 13060,
"Online": 1,
... |
2018/03/04 | 925 | 2,272 | <issue_start>username_0: I have count data of species at multiple sites with information of site, year, month and day. Within this data, for several species there are multiple entries on certain days. For example, on 3rd of January, 2016, for species A1 there are two entries i.e. 10 and 20. At first step, I want to tak... |
2018/03/04 | 1,584 | 4,335 | <issue_start>username_0: I want to run a webpack project within Vagrant (installed on Windows 10) where I embedded a Ubuntu 16.04 virtual machine.
I was able to install `npm 5.6.0` and `nodejs v8.9.4` very successfully.
I tried to run `npm install` to install all my dependencies. After getting these errors :
```
..... |
2018/03/04 | 1,675 | 4,181 | <issue_start>username_0: I have 3 lists :
```
Names=["Jack","Jeni","Monsa","Mehus","Kuis","Tim","Tony","Yestgf","Pere"]
Years=[17,20,26,40,67,88,96,99,37]
Order=[1,2,3,4,5,6,7,8,9]
```
I'm trying to extract names from `Names` list using the order in `Order` list, it starts from Jack Jack and the 2nd set starts from ... |
2018/03/04 | 1,199 | 2,695 | <issue_start>username_0: ```
match p=(a:ACCT_NO)
-[r1:TRX_TO]-(n1:ACCT_NO)
-[r2:TRX_TO]-(n2:ACCT_NO)
-[r3:TRX_TO]-(n3:ACCT_NO)
-[r4:TRX_TO]-(b:ACCT_NO)
-[rb:BELONG_TO]->(c1:CUSTOM_NO{sensitivity:'1'})
-[:RELATE_TO*0..2]-(c2:CUSTOM_NO)
where r1.trxAmt > 10000 and r2.trxAmt > 10000 and r3.trxAmt > 10000 and r4.trxAmt > 1... |
2018/03/04 | 8,245 | 31,959 | <issue_start>username_0: I am facing this strange issue after factory reset of my Macbook.
Android studio is not able to build the project and showing the same issue every time I build.
Note: I have found various same threads on stackoverflow but none of them worked for me. Thats why I had to put it on stackoverflow.
... |
2018/03/04 | 816 | 2,036 | <issue_start>username_0: Input two table, `TABLE_A` and `TABLE_B`
```
TABLE_A TABLE_B
A_ID | A A_ID | B
1 | a 1 | b
2 | a1 1 | b1
3 | a2 2 | b2
```
Expecting Output `TABLE C`
```
TABLE_C
A_ID | A | C
3 | a2 | NULL <--- NULL if no matched A_ID in TABLE... |
2018/03/04 | 856 | 3,228 | <issue_start>username_0: I have a js file in my Angular application, data.js . This js file has some variables declared in it, something like below.
```
var data = 'test'
```
Now I have to access these variables and their values in my component (app.component.ts).
I read some where that declaring them as exports... |
2018/03/04 | 1,004 | 3,671 | <issue_start>username_0: I'm working on a very simple app that counts down to a date. I found several tutorials but nothing in Swift 4. It seems like a lot has changed as I keep getting compiler errors.
Here is my code:
```
class ViewController: UIViewController {
@IBOutlet weak var CountdownText: UILabel!
l... |
2018/03/04 | 1,085 | 4,260 | <issue_start>username_0: I have a problem where I have passed two models into a view model. In a particular view I only want to check validation for two properties, one from each model in the view model.
However both models contain other properties each with their own data annotations, which means the form won't subm... |
2018/03/04 | 1,388 | 2,917 | <issue_start>username_0: I'm building a TypeScript module that exports a function to users that can accept arbitrary string input. I would like to parse this input to result in an Enum value (and return if the input is not a valid Enum value.) I wan this to work for both string and numeric Enums.
How can I do that? He... |
2018/03/04 | 362 | 1,196 | <issue_start>username_0: I'm a beginner to javascript, I've been trying to add the `active` class to a `li` using jquery i.e. When its clicked, expand `li` and make it active:
```
$(document).ready(function() {
var url = window.location['pathname'];
jQuery('li a').each(function() {
if($(this).attr('href') == url... |
2018/03/04 | 730 | 2,953 | <issue_start>username_0: I am playing around with Xamarin.Forms (mvvm) with Prism and have noticed that [some tutorials](https://github.com/adrianhall/develop-mobile-apps-with-csharp-and-azure/tree/master/Chapter3) show navigating to another Page while [others](https://github.com/PrismLibrary/Prism-Samples-Forms/tree/m... |
2018/03/04 | 667 | 2,291 | <issue_start>username_0: I am working on transfering my plots to a presentation using `officer` package in R.
A ggplot can be transferred using the `ph_with_gg()` function but what is the function to transfer normal R plots? I am not finding any such function in the package.
These are few of the resouces that I am ... |
2018/03/04 | 1,570 | 5,101 | <issue_start>username_0: For the life of me I can't get to the NiFi Web UI. It makes me hate security.
---
TLDR; I can't find the right way to start NiFi in a docker container and still access the UI. Here's what I've tried (for 8 hours):
```
docker run --name nifi \
-p 8080:8080 \
-d \
apache/nifi:latest
```... |
2018/03/04 | 1,058 | 3,733 | <issue_start>username_0: I have the following two tables:
```
TableA:
+---------+--------+
| name | nm_key |
+---------+--------+
| Bob | 1124 |
| Sally | 3278 |
| Frank | 6484 |
| Mary | 1125 |
| Annette | 2798 |
+---------+--------+
TableB:
+--------+----------+--------+... |
2018/03/04 | 1,018 | 4,231 | <issue_start>username_0: I get TokenMismatchException when I make another ajax request from done of first one in jquery in laravel-5.0. I tried different Browsers but it yields to same output.
```
var setting = {
url : 'http://localhost/enduewitapi/login',
type : 'GET',
... |
2018/03/04 | 1,309 | 4,519 | <issue_start>username_0: I'm working with `enum` and I'm not sure that I've named them with the right names.
It looks like:
```
public class VietNam
{
public enum Regions
{
[Display(Name = "Khu vực miền Trung")]
Central = 0,
[Display(Name = "Khu vực miền Bắc")]
North = 1,
... |
2018/03/04 | 1,873 | 7,498 | <issue_start>username_0: **Update**: The question has been revised, more info can be read just before and after the large code example.
---
Consider the following list of search terms:
```python
searchterms = {'term1': address, 'term2': name, 'term3': 'coordinates'}
```
where all can be 'nan' (np.nan in DataFrame)... |
2018/03/04 | 681 | 2,968 | <issue_start>username_0: Recently while browsing through recent c# question/answers in this forum I stumbled upon a piece of linq-to-xml code than I cannot fully understand but being someone who likes working with linq-to-xml it bugs me as I cannot figure out the what the process is exactly doing in a step by step mann... |
2018/03/04 | 2,295 | 7,669 | <issue_start>username_0: I'm new to React.js and I'm trying to learn from the tutorials on [tutorialspoint](https://www.tutorialspoint.com/reactjs/index.htm) but I faced error. Here is the error on console when I execute npm start command:
```
C:\Users\HP\Desktop\reactApp1> npm start
> reactapp1@1.0.0 start C:\Users\H... |
2018/03/04 | 1,369 | 4,810 | <issue_start>username_0: I have a attribute where \* is present along with numerical values. I wish to remove this \* mark from the numerical value. What should I try?
Example- Transforming A to B
Column A - 54, 6\*, 9, 0, 189\*, 34, 58\*
Column B- 54, 6 , 9, 0, 189 , 34, 58<issue_comment>username_1: In webpack 3, webp... |
2018/03/04 | 893 | 3,342 | <issue_start>username_0: i have three table one is `category` table and another is `product` table and one more `product_to_category` table, and it has only `product_id` and `category_id` column.
Now i want to get top 10 categories with maximum number of product, with details of 10 products from each category.
What i... |
2018/03/04 | 471 | 1,648 | <issue_start>username_0: The following code snippet is meant to allow the user to input the answer to a question. They are allowed to enter four
answers: either `y` or `Y` for “yes”, or `n` or `N` for “no”. The program is supposed to print out the received answer if the
entry is valid, and print out an error message ot... |
2018/03/04 | 611 | 1,933 | <issue_start>username_0: I am reading a set of JSON files using glob and storing them in a list. The length of the list is 1046. When I am reading the JSON file one by one and loading it to run further code, it just runs on 595 files and gives the following error:
```
Traceback (most recent call last):
File "removeDel... |
2018/03/04 | 285 | 1,010 | <issue_start>username_0: I want to get search result from search bar which is in Activity and show all list in a fragment. How can I do it?
[](https://i.stack.imgur.com/UIIBM.png)<issue_comment>username_1: As Blender said, you need to find out which ... |
2018/03/04 | 334 | 1,297 | <issue_start>username_0: As I am learning PHP, I want to know if I ever wanted to put HTML tags in the middle of a PHP script, I want to know which one is better or must be, out of putting them in PHP *echo* or breaking the PHP script where the HTML has to be started and then continuing the PHP script using tags php st... |
2018/03/04 | 510 | 1,719 | <issue_start>username_0: Is there any decent way to set a variable equal to some property on an object and more or less have it act as a reference to that property? I've included a snippet of code for what I'm trying to see is possible; I'm looking to see if there is something at "???" that I can get the desired `conso... |
2018/03/04 | 941 | 2,923 | <issue_start>username_0: I am working on a program that reads gps data.
A NMEA string returns time like this: 34658.00.
My parser treats that as a double
```
InputLine = "\\$GPGGA,34658.00,5106.9792434234,N,11402.3003,W,2,09,1.0,1048.47,M,-16.27,M,08,AAAA*60";
//NMEA string
//inputLine=input.readLine();
... |
2018/03/04 | 555 | 1,886 | <issue_start>username_0: I'm new to C language. When I'm learning C language I learn something called macros. As I understood macros are like a functions in JavaScript that we can call when we needed. But then I learn that after compiling the program all the places that i have called to macros are replaced by the defin... |
2018/03/04 | 660 | 1,832 | <issue_start>username_0: I have code which needs the value of my loop counter after the scope exit. As such, I initialize `i` outside the loop.
```
size_t i;
for (i = 0; i < size / 16 * 16; i += 16) {
// Magical unicorns.
}
```
However, I was surprised to see the value of `i` will be the last valid value, not th... |
2018/03/04 | 1,162 | 3,550 | <issue_start>username_0: I am new to python. But I got a task and I need to Displaying/getting Images from an URL.
I have been using Jupyter notebook with python to try to do this.
```
import sys
print(sys.version)
3.5.2 |Anaconda 4.1.1 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)]
```
I wa... |
2018/03/04 | 1,201 | 4,340 | <issue_start>username_0: Found a confusing question while learning about file separators
Suppose that the file `c:\book\java` exists. Which of the following lines of code creates an object that represents the file? (Choose all that apply.)
`1. new File("c:\book\java");
2. new File("c:\\book\\java");
3. new File("c... |
2018/03/04 | 1,766 | 5,927 | <issue_start>username_0: I have an SQL table that I want to work with through Diesel:
```
CREATE TABLE records (
id BIGSERIAL PRIMARY KEY,
record_type SMALLINT NOT NULL,
value DECIMAL(10, 10) NOT NULL
)
```
This table generates the following schema:
```
table! {
records (id) {
id -> Int8,
... |
2018/03/04 | 2,035 | 7,293 | <issue_start>username_0: We have an **event** mysql table where we store the events generated from different kind of sensors. Below is the create table query for the same table.
```
CREATE TABLE `event` (
`id` varchar(36) NOT NULL,
`device_id` varchar(36) NOT NULL,
`device_type` varchar(45) NOT NULL,
`data` ... |
2018/03/04 | 511 | 1,513 | <issue_start>username_0: ```js
$(".sidebar>i:nth-child(3)").on("click", showMenu);
```
```html
Submit
Color Pallette:
```
I need to select the 2nd (Back to Menu) button. So why nth-child(3) works but not nth-child(2)?<issue_comment>username_1: From [JQuery's docs](https://api.jquery.com/nth-child-selector/):
>... |
2018/03/04 | 295 | 1,022 | <issue_start>username_0: I've question about how to get value from input html when the tag position is dynamic.
This is the example input:
```
```
This is what I'm able to do, but can not detect if tag value position before id position like in the second example.
```
//i
```<issue_comment>username_1: You can use "... |
2018/03/04 | 1,671 | 6,671 | <issue_start>username_0: I don't know in which part i made mistake. In `UploadItemAdapter.class,uploadingDetails.getTitle()` and `uploadingDetails.getDiscription()` both gives me null in my log cat. In android listView screen textView of item is also remains blank [Screenshot](https://i.stack.imgur.com/5kmix.png) .My C... |
2018/03/04 | 453 | 1,884 | <issue_start>username_0: I'm supposed to write a function which has three parameters and then it basically has to find the instance of the third parameter in the first parameter and then it should return the first instance of the second parameter after the third parameter.
Example:
```
print(find_instance_character(e... |
2018/03/04 | 641 | 2,333 | <issue_start>username_0: I have a basic question regarding the ++ Operator in Scala lists, and the type notation [B >: A].
It is most common to explain this as "Accept any B which is a Superclass of A"
But then I can do something like the below code and invoke `++` using a `class B` (Sprite) which is not superclass ... |
2018/03/04 | 1,146 | 3,518 | <issue_start>username_0: I am importing tensorflow in my ubuntu python
using following commands-
```
$ python3
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Illegal instruction (core dumpe... |
2018/03/04 | 499 | 2,017 | <issue_start>username_0: I'm building an Android app that processes saved Wi-Fi information. I have a function that returns an ArrayList of WifiEntry objects, but will return null if it can't access the Wi-Fi configuration file (for example, if root access isn't available). At the moment, I'm dealing with it like this:... |
2018/03/04 | 392 | 1,436 | <issue_start>username_0: problem >> 'jhipster' is not recognized as an internal or external command,
operable program or batch file.
Steps >>
1. Install Java 8
2. Install Node.js
3. install Yarn
4. install Yeoman: yarn global add yo
5. Install JHipster:
yarn global add generator-jhipster and yarn add generator-jhips... |
2018/03/04 | 785 | 2,828 | <issue_start>username_0: I am trying to debug react-native app running on VS emulator in chrome. The error I am getting at the moment is "Cannot set property 'volume' of null". It is like 4th or 5th cryptic error I am getting since starting, but the first one when I hit the wall. I will outline all configuration steps ... |
2018/03/04 | 1,834 | 5,779 | <issue_start>username_0: I am using this foo.cpp code below on a linux Debian system:
```
#include
#include
#include
#include
#include
std::mutex mtx;
std::condition\_variable cvar;
long next = 0;
void doit(long index){
std::unique\_lock lock(mtx);
cvar.wait(lock, [=]{return index == next;});
std::cout<< in... |
2018/03/04 | 1,365 | 4,753 | <issue_start>username_0: How do I call parent object attribute and functions in javascript? For example, if I had an object `gen0` with a child object `gen1` which had a child object `gen2`. How would `gen1` call its parents names and functions? How would `gen2` call its parents and grandparents functions (without usin... |
2018/03/04 | 1,219 | 4,145 | <issue_start>username_0: Want to allow certain tags & properties while pasting from Word/WebPage to TinyMCE4 Editor. I tried to set the configuration as below :
>
> oEvent.getParameters().configuration.valid\_elements="em,a[href|target=\_blank],strong/b,div[align],br,p[align]";
>
>
>
Now I am able to paste only ... |
2018/03/04 | 148 | 530 | <issue_start>username_0: 
Your help will be really appreciated<issue_comment>username_1: Your `cars` files ends with a blank line, as can be seen when you `cat` it. Thus, `tail -3 cars` prints the last three lines in the file: `Cadillac`, `Ford` and a... |
2018/03/04 | 245 | 775 | <issue_start>username_0: I am using go daddy cpanel email to send an email using laravel. This is the code i am using:
```
MAIL_DRIVER=SMTP
MAIL_HOST=sg3plcpnl0013.prod.sin3.secureserver.net
MAIL_PORT=465
MAIL_USERNAME=myusername
MAIL_PASSWORD=<PASSWORD>
MAIL_ENCRYPTION=tls
MAIL_FROM_NAME="Contact Us"
MAIL_FROM_ADDRES... |
2018/03/04 | 1,602 | 5,570 | <issue_start>username_0: I have already done creating a form that can submit array data, however I am having problem on updating the array when user wants to edit the form data.
Here is in the view
```
@foreach($prescriptions as $prescription)
| | | | | RM | - |
@endforeach
```
And here is in my controlle... |