date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/01 | 760 | 2,718 | <issue_start>username_0: I'm relatively new to SQL Server, so bear with me if I'm missing something obvious.
I have a database with tables `Retailers`, `Wholesalers`, and `RetailerWholesaler`.
Currently each retailer can have zero, one, or two wholesalers (but of course that could change with little notice!). I'm ha... |
2018/03/01 | 1,072 | 3,805 | <issue_start>username_0: I have three divs with ids red green and blue inside another div with id pink. What I expect is red, green, and blue would all be justified to the top of pink. I also expect that the width of each would be equal to the width of the widest child element inside it. But what is happening is they a... |
2018/03/01 | 1,060 | 3,904 | <issue_start>username_0: Im attempting to recreate [this exact](https://jsfiddle.net/gehtwxeo/89/) inline editing functionality in on of my vue components. However, and I may be wrong, I see some of the syntax is outdated Vue, in particular the `v-el` directive being used. I've attempted to update the syntax like so:
... |
2018/03/01 | 1,804 | 7,419 | <issue_start>username_0: Problem Background:
I have a Powershell script that I can execute from my Microsoft Access Form that scans through file folders that contain information on different facilities, and produces a CSV that looks something like:
```
SiteCode FacilityNumber DocumentType HyperlinkPath
DKFZ ... |
2018/03/01 | 2,558 | 8,413 | <issue_start>username_0: this might be difficult to explain. I am working on a program that takes in a file with numbers in it. the first two numbers are the dimensions of a matrix rows and then columns. the rest of the numbers are the elements of the matrix. what I am having trouble with is that after I created a func... |
2018/03/01 | 337 | 1,039 | <issue_start>username_0: I want to select the previous day in a calendar. For example, if I have 02-28-2018 I need to set 27 automatically.
I have tried the below code but it fails when the date is 1st.
```
String currentDate = new SimpleDateFormat("dd").format(new Date());
int previousDay = Integer.parseInt(currentD... |
2018/03/01 | 598 | 1,506 | <issue_start>username_0: I have a spreadsheet of expenses, sorted by categories in columns `C` through `P` (eg, "rentals" in column `C`, "catering" in column `D`, etc). The date is in column `A`. I want to find the sum of all expenses in columns `C:P`, but only those where the date is between a certain range. Here's wh... |
2018/03/01 | 594 | 2,028 | <issue_start>username_0: I am trying to aggregate product of two columns where numbers are stored as strings. I tried to convert the columns into numeric values then multiply and aggregate, but I am getting errors.
**The query is built in Amazon/Athena environment (Presto)**
**UPDATE**
**After further investiga... |
2018/03/01 | 552 | 2,236 | <issue_start>username_0: I have a topic named mytopic. There are one producer and 2 consumer for this topic. What I need to do is filtering the messages that produces by the producer, according to their prefix. For example, if a message starts with 'a' prefix, then only the first consumer must take it. If it starts wit... |
2018/03/01 | 303 | 1,025 | <issue_start>username_0: How can I get a figure caption to align right under an image within a div? I doesn't have to be a caption tag. Any tag that will align the text will do. I've tried the following but it distorts everything within my div:
```
 height="80" width="80" onerror="th... |
2018/03/01 | 1,048 | 3,352 | <issue_start>username_0: I wrote a small C++ asio program and now I want to add a backup server to the server "list" of the client. The client is trying to connect to the server via the asio resolver, but if the server is offline, the client should automatically connect to the "backup server". So can I add multiple add... |
2018/03/01 | 1,420 | 4,773 | <issue_start>username_0: I'm adding ink annotations to PDFDocument using the PDFAnnotation() class with subtype ink. The idea is to capture signatures that are drawn using touch.
Inspired by UberSignature my UIBezierPath is a series of rectangles that are supposed to be filled with a color. However, when I add the ann... |
2018/03/01 | 539 | 2,104 | <issue_start>username_0: So I am fairly new to Javascript, and I am working on some code that converts decimal numbers to binary numbers. However when I run this program, I can't seem to get the output I am looking for. The best I have done was get my function to output an exact number already inside of the function, w... |
2018/03/01 | 456 | 1,761 | <issue_start>username_0: I have an Azure Service Bus Queue. Messages that are not processed are moved to the Dead Letter Queue for investigation by a person. I am using Service Bus Explorer to peek at messages in the Queue.
When a message is dead lettered, I want to *move* it from the DLQ to main so that the system c... |
2018/03/01 | 734 | 2,202 | <issue_start>username_0: I'm getting the following build error when compiling my react-native project in Xcode env: node: No such file or directory
Not sure whats causing it?
Node v8.9.4
React-Native v0.50.4
NPM v5.6.0
And I'm using nvm<issue_comment>username_1: Here is one of the solutions for this error if you're ... |
2018/03/01 | 728 | 2,996 | <issue_start>username_0: We have SAS datasets, for which many people have access to read and write. Many a times user click those tables and open. Table gets locked. To circumvent this problem, I tried to created views in same library, if people double click the view it opens table and locks the table again.
One solu... |
2018/03/01 | 553 | 1,933 | <issue_start>username_0: In Python, there are two ways to use `if` and `else`: either for Boolean flow control, in which case it is used with colons and indentation, or as an expression on a single line as described in <https://www.pythoncentral.io/one-line-if-statement-in-python-ternary-conditional-operator/>.
As fa... |
2018/03/01 | 1,173 | 4,649 | <issue_start>username_0: Web Api .net framework
I have an authentication service done with IdentityServer4 .net core 1.1.
The client settings are as follows:
```
new Client
{
ClientId = "client",
AllowedGrantTypes = GrantTypes.ClientCredentials,
ClientSecrets =
{
new Secret("secret".Sha256(... |
2018/03/01 | 533 | 2,005 | <issue_start>username_0: So, in C, this perfectly works:
```
int myArray[] = {1, 2, 3};
```
why does the following give me a runtime error when accessing an element?
```
int * myArray2 = {1, 2, 3};
myArray2[0];
```
when `myArray2[0]` basically means `*myArray2`, which does also not work?<issue_comment>username_1:... |
2018/03/01 | 711 | 2,048 | <issue_start>username_0: ```none
Name Class Species
a 1 3
b 2 4
c 3 2
a 1 3
b 2 1
c 3 2
```
This above mentioned data will be from CSV file. need to convert this to structured array using numpy. need header from the csv become the columns labels for the array.
Ne... |
2018/03/01 | 750 | 2,865 | <issue_start>username_0: I am on a system running Mac OS X. I am using Eclipse Oxygen.2 for C/C++, in my case C++. I am attempting to create a project that uses the GSL and Boost libraries. However, Eclipse appears to not be able to locate the GSL library and appears to recognize the Boost library, but doesn't appear t... |
2018/03/01 | 656 | 2,495 | <issue_start>username_0: I'm trying to simplify the introduction of loops to children in JS and p5.js with writing some helper functions to ease difficult things. What I'm aiming for is something like `repeat(5){ //code to be executed 5 times }`
something similar can be achieved with a higher order function, but it's ... |
2018/03/01 | 913 | 3,284 | <issue_start>username_0: I have a .NET Core Web API that is returning a 415 Unsupported Media Error when I try to post some data to it that includes some json. Here's part of what is returned in the Chrome Debugger:
```
Request URL:http://localhost:51608/api/trackAllInOne/set
Request Method:POST
Status Code:415 Unsupp... |
2018/03/01 | 534 | 2,001 | <issue_start>username_0: In a fluid template I have a start date and an end date. How do I get the dates in between so I have a list of all dates?
```
{newsItem.datetime}
{newsItem.eventEnd}
```<issue_comment>username_1: Try using `[FromForm]` instead of `[FromBody]`.
```cs
public IActionResult Post([FromForm] Playe... |
2018/03/01 | 817 | 3,349 | <issue_start>username_0: I have a function that creates falling skspritenodes. The function makes a skspritenode that an action moves to the bottom and then removes. It is called every second. I am trying to create a new function that would find the lowest of these skspritenodes at a given time. I have tried to use enu... |
2018/03/01 | 1,032 | 4,069 | <issue_start>username_0: Beginner here. I am trying to find a way how to access property of object in array without always using "array[0] as ClassName" when they are not the same type of objects. No need detailed answer. You can also just recomend/guide me to where should i read about these things, because maybe the a... |
2018/03/01 | 957 | 3,640 | <issue_start>username_0: I'm planning on making a fairly complex GUI in Python using Tkinter for a senior project. I came across [this](https://stackoverflow.com/questions/7546050/switch-between-two-frames-in-tkinter) link that provides a great structured way to go about handling switching between frames by stacking th... |
2018/03/01 | 1,027 | 3,355 | <issue_start>username_0: I'm following a tutorial about `webpack`, but it seems that the tutorial is making use of an older version of `webpack`. I'm trying to minimize the `.js` files but every time I run `npm run webpack` I get this error message in the console:
>
> webpack.optimize.UglifyJsPlugin has been removed... |
2018/03/01 | 553 | 1,574 | <issue_start>username_0: So i installed LEMP (nginx, mysql, php..) by following the digital ocean guide. But ubuntu 16.04 only comes with php7 by default and i need greater then 7.1 to run Laravel. I am confused on why every time i replace php 7 with php 7.2-fpm from ondrej
>
> sudo add-apt-repository ppa:ondrej/php
... |
2018/03/01 | 698 | 2,023 | <issue_start>username_0: I'm trying to find the number of minutes an instance has been up using the python boto3 library for aws. I'm not able to find a direct way to do this. I can get the status of a machine using:
```
ec2 = boto3.resource('ec2')
instance = ec2.Instance(instance_id)
status = instance.state['Name']
... |
2018/03/01 | 711 | 2,030 | <issue_start>username_0: could you please tell me how to hide the component in reactJS and show another component?I have one button and text (`hello`).on button click, I want to hide button as well as text and show another text `bye`
here is my code
<https://codesandbox.io/s/50lj63xvk>
```
showBankDetail = () => {
... |
2018/03/01 | 980 | 2,695 | <issue_start>username_0: I need to display a cumulative sum in a list using lambda expressions. Do you have any idea how I can do it?
I have this return:
```
[
{
"dt_created": "2018-02-25",
"qtNewItens": 1
},
{
"dt_created": "2018-02-26",
"qtNewItens": 1
},
{
"dt_created": "2018-02-27",
"qtNewI... |
2018/03/01 | 1,703 | 6,282 | <issue_start>username_0: The question is not as easy as it sounds, but I couldn't find a way to cover it fully without probably confusing the readers
I have a json message stored in an url, which has an url field itself.
So it would look something like this:
```
{ "type": "text", "url": "http://pastebin.com/raw/1U5v... |
2018/03/01 | 1,278 | 4,645 | <issue_start>username_0: I don't know how to edit my `.travis.yml`. Every time travis-ci check fail, I am almost crazy!
This is my travis-ci link: <https://travis-ci.org/liman123/DebugMan>
This is my `.travis.yml`, is there anything wrong? Thanks!
```
osx_image: xcode8.3
language: objective-c
script:
- set -o pipef... |
2018/03/01 | 1,303 | 4,412 | <issue_start>username_0: I'm curious what would happen if I create the exact same package that exists in an API that the project has (e.g. `java.util` from core Java API). Would the compiler give me an error or something?
If the compiler allows this, what would happen if I create a class with a name that the original ... |
2018/03/01 | 602 | 2,420 | <issue_start>username_0: I'm having issues creating `@Relation`. I previously was using a complicated query to handle M:N, but I wanted to try the simpler `@Relation` and rely on ids. However, I get an error whenever I extend or embed the `@Relation` class. This works:
```
@Entity(tableName = "meta",
foreignKeys = [Fo... |
2018/03/01 | 381 | 1,399 | <issue_start>username_0: I am running into some difficulty with the following situation:
I have a 3D matrix called 'ch'. I would like to sum in the z direction in groups of 5 matrices and save them to a different matrix, 'ch\_sample' e.g. ch\_sample(:,:,1) = ch(:,:,1) + ch(:,:,2) ... + ch(:,:,5) ; ch\_sample(:,:,2) =... |
2018/03/01 | 1,014 | 3,854 | <issue_start>username_0: Need help with finding the null, I cant quite figure it out for this one. Specifically checking to find a null and then putting the output saying that's a null
```
public int EXP;
public static void Main(string[] args)
{
Console.Write("Check to see if its a prime number!strong text Enter... |
2018/03/01 | 826 | 3,300 | <issue_start>username_0: what is the best approach to identify the session storage value change from react application and based on which the state should be updated?
instead of continuous looping and checking is there any better way to achieve this without losing performance.<issue_comment>username_1: Do a check befo... |
2018/03/01 | 320 | 1,096 | <issue_start>username_0: I am building the React/Redux application, and I was wondering if it's possible to apply styling only to icons without links. I use fontawesome icons in a form of tag, and wrap it with tag. I want to make the icons into grey only when there is no value in the href attribute of the parent tags. ... |
2018/03/01 | 810 | 2,375 | <issue_start>username_0: I was trying to make it look like this one. This is made from a psd file:
[](https://i.stack.imgur.com/JRFid.png)
```css
.drinks-section {
position: relative;
margin-left: 2rem;
padding-left: 2rem;
display... |
2018/03/01 | 810 | 2,596 | <issue_start>username_0: I am trying to solve the following question on Leetcode: <https://leetcode.com/problems/word-ladder/description/>. The question is:
>
> Given two words (`beginWord` and `endWord`), and a dictionary
> `wordList`, we have to find the length of the shortest transformation
> sequence from `begi... |
2018/03/01 | 437 | 1,507 | <issue_start>username_0: I am using [this](https://www.npmjs.com/package/react-grid-gallery) library for a photo gallery on a **create-react-app** project.
Loading the images as http works fine
ie:
```
const IMAGES = [{
src: "https://c2.staticflickr.com/someimage.jpg"
....
}];
`... |
2018/03/01 | 465 | 1,734 | <issue_start>username_0: I am trying to write a unit test for a simple component that wrote.
Here is my component:
```
const ErrorWrpper = (props) =>(
{props.message}
)
export default ErrorWrpper;
```
And here is my test:
```
import React from 'react';
import { expect } from '../../test_helper';
import { shallo... |
2018/03/01 | 993 | 3,867 | <issue_start>username_0: I have a table view loaded with 4 rows inside.
Row 3 will have a checkbox. I want to enable Row 4 only when Row3 check box is checked
so I have an outlet for checkbox (which is button) and action on tap of that checkBox.
My question is how can i get reference to next cell and make it enabl... |
2018/03/01 | 776 | 3,285 | <issue_start>username_0: So we are having issues where our customers are not getting DocuSign emails. The emails are being flagged as SPAM, and this is creating problems for us.
We are thinking of just sending our own emails.
To do that, I would need to build the url that DocuSign sends out, so that people can click... |
2018/03/01 | 1,720 | 5,646 | <issue_start>username_0: ```css
.col-6 h1 {
color: white;
text-align: center;
}
h1 {
background-color: red;
}
.COL1, .COL2 {
border: 1px solid red;
}
```
```html
Lorem ipsum dolor sit amet consectetur adipiscing elit risus conubia ante, congue faucibus ac a non aptent nisi per commodo facilisi id, ... |
2018/03/01 | 581 | 1,861 | <issue_start>username_0: I have a React-Native project that renders a list of items.
I was using .map function to do it but since I'll have several items in the future, I'm trying to migrate the function to [flatlist](https://facebook.github.io/react-native/docs/flatlist.html).
The documentation provided by React is ... |
2018/03/01 | 584 | 2,163 | <issue_start>username_0: Working on character animation for a super simple jQuery game.
My problem is that there is about a half second delay if you switch between the movement keys quickly. For example, if you are holding down W then press D very quickly there is an unwanted delay. I want it to be instant. Is there a... |
2018/03/01 | 408 | 1,474 | <issue_start>username_0: Im facing some problems with AWS S3, i figured out that if i set some **RoutingRules**, it will only works at `.s3-website-us-east-1.amazonaws.com` endpoint but this endpoint don't have SSL, is there another endpoint that has SSL `s3.amazonaws.com/` but these RoutingRules doesn't work there.
I... |
2018/03/01 | 731 | 2,645 | <issue_start>username_0: So I have been playing around with type systems in JavaScript and for the most part things are working however there is an issue with styled-components. I can't seem to find a good way to apply flow to the props of a styled-component. So far the only solution I see is:
```
export type ButtonPr... |
2018/03/01 | 1,331 | 3,990 | <issue_start>username_0: I am able to filter my dataset using the strings in a particular column, here's a sample dataset and how I did it.
```
ID = c(1, 2, 3, 4)
String = c("Y N No", "Y", "Y No", "Y N")
df = data.frame(ID, String)
```
The problem is - I want to only pick the IDs that have N in them - or - IDs that ... |
2018/03/01 | 1,340 | 4,702 | <issue_start>username_0: I'm trying to wrap my head around async/await and how to use them. I'm following some examples I've seen to the letter (I think), but it the await is not actually waiting for ajax response. Here is the code:
```
async function doAjaxGet(ajaxurl) {
const result = await $.ajax({
url:... |
2018/03/01 | 1,098 | 3,809 | <issue_start>username_0: I am trying to click into a radio button inside a span. Trying to execute:
```
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
chromeDriver = webdriver.Chrome()
chromeDriver.get('https://www.flytap.com/pt-br/')
#Works Fine
chromeDriver.find_element_by_id('orig... |
2018/03/01 | 1,825 | 3,326 | <issue_start>username_0: I have a dataset as .csv format. This data includes a timestamp-like format:
```
> head(HC_40,n=10)
obs_id SiteId Timestamp ForecastId Value
937757 5338068 40 03/07/2015 14:30 1002 6.997.984.367.355.440
937758 3210822 40 03/07/2015 15:30 ... |
2018/03/01 | 564 | 1,764 | <issue_start>username_0: I have been trying to generate random values so that I can construct a circle.
The values of x and y are expected to satisfy the following equation
x^2 + y^2 = 1
Here is the code that I used.
```
par(type = "s")
x <- runif(1000, min = -1, max = 1)
y <- sqrt(1 - x^2)
z <- NULL
z$x <- x
z$y <-... |
2018/03/01 | 827 | 2,623 | <issue_start>username_0: I want to make an app that identifies your BAC levels but I do not understand why the values do not save alcc and Raw.
I have my methods that calculate these variables and have return statements but for some reason when trying to compile it, I get the "cannot find symbol" error.
Thank you for l... |
2018/03/01 | 712 | 2,384 | <issue_start>username_0: I have a table: t
My goal: To extract only the "id" with the highest score in the table and group it by the week\_number.
Query:
```
SELECT id,
CAST(EXTRACT(WEEK FROM TIMESTAMP_SECONDS(created_utc)) AS STRING) AS week_number,
MAX(score) AS highest_score
FROM t
WHERE body='r/... |
2018/03/01 | 519 | 2,123 | <issue_start>username_0: Kind of new with the integration runtime.
I had a pipeline running with no issues but recently we had an AD upgrade and the local on premesis SQL db changed my user from 'bluecompany\joe' to 'redcompany\joe'
This has caused my datafactory to stop working properly . as it can't connect to the SQ... |
2018/03/01 | 721 | 2,250 | <issue_start>username_0: I have the following code:
```
function checkCashRegister(price, cash, cid) {
// Move cid into an object
var cashReg = cid.reduce(function(prev, curr) {
prev[curr[0]] = curr[1];
return prev;
}, {});
// Total money in the register
var regSum = Object.value... |
2018/03/01 | 544 | 1,703 | <issue_start>username_0: Is there a way to do this?
ex:
I have a dict
```
sounds = {
'sound1.mp3': 0,
'sound2.mp3': 0,
'sound3.mp3': 0
}
```
when a keys value (sound1 in this ex) gets updated, the command prompt will go from
```
sound1.mp3: 0
sound2.mp3: 0
sound3.mp3: 0
to
sound1.mp3... |
2018/03/01 | 696 | 2,309 | <issue_start>username_0: I need to run this query in MySQL using Hibernate (HQL):
```
SELECT t.atrib2, MY_FUNC(attrib1), MY_FUNC(attrib2), o.atrib1
FROM (SELECT t.atrib1, t.atrib2, t.atrib3,o.atrib1
FROM myTable t JOIN otherTable o
ON O.ID = T.O_ID
ORDER BY cr... |
2018/03/01 | 328 | 798 | <issue_start>username_0: I'm really stuck on this. I could do it with integer division and multiplication but I have no idea how to find the remainder without any of these operators. (can't import anything either. the main premise is to use while loops).<issue_comment>username_1: ```
>>> def solution(a, b):
... whi... |
2018/03/01 | 453 | 1,249 | <issue_start>username_0: I have a problem getting javascript content into HTML to use it for scripting. I used multiple methods as phantomjs or python QT library and they all get most of the content in nicely but the problem is that there are javascript buttons inside the page like this:
[Pls see screenshot here](http... |
2018/03/01 | 668 | 1,356 | <issue_start>username_0: ```
"crops": [
{
"Crop": "Red Beans",
"Date": "2018-Feb-28",
"Market": "Gulu",
"Price": "5002"
},
{
"Crop": "Red Beans",
"Date": "2018-Feb-28",
"Market": "Busia",
"Price": "4889"
},
{
"Crop": "Red Beans",
"Date": "2018-Feb-28",
"Market": "Kasese",
"Price": "50... |
2018/03/01 | 767 | 2,903 | <issue_start>username_0: I'm converting our old program written in VB6 to C# WPF, and there is this code that I'm having a hard time trying to convert.
In our old VB6 project. The code is written like this:
```
Select Case paymentType
Case "CASH":
Set dlgpayment = New dlgPaymentCash
dlgPaymentCash.lblCh... |
2018/03/01 | 2,596 | 7,985 | <issue_start>username_0: Consider the following situation:
We want to use a regular expression to validate the syntax of a command with X number of fields - one mandatory, two optional. The three fields can be shown in any order, with any number of spaces separating them, and have limited dictionaries of acceptable val... |
2018/03/01 | 928 | 3,039 | <issue_start>username_0: I am working on an assignment where I must instance several different objects and format them on the screen. I am having trouble getting the strings to output properly; in place of text I get an output like this
```
run:
First Name Last Name Student ID Number
studentdemo.StudentDemo@6d06... |
2018/03/01 | 798 | 1,638 | <issue_start>username_0: I am still new to R and I was trying to put values in my dataframe to zero, if they are in the interval IR e {-0,5: 0,5}
The data frame looks like this:
```
var1 var2 var3
1 -0.2 1.0 0.7
2 0.2 -0.5 -0.2
3 1.0 0.2 3.0
4 0.5 2.0 4.0
5 -0.7 4.0 0.3
```
I found easy solutions only ... |
2018/03/01 | 600 | 1,689 | <issue_start>username_0: Trying to wrap my brain around how I should tackle filtering an array of objects and only returning results that satisfy **all of the tags**.
The tags could be any of the fields - `fname`/`lname`/`email`/`position`/`etc`
```
let search_tags = ['CEO', 'Steven'];
let contacts = [
{ fname: 'S... |
2018/03/01 | 567 | 2,067 | <issue_start>username_0: So I have the following object that I have in javscript to send as a JSON object:
```
var authMessage = {
MessageType: "authRequest",
Payload: {"ClientAuthString": "<PASSWORD>"}
}
ws.send(JSON.stringify(authMessage))
```
This code works great, does exactly what I need... now ... |
2018/03/01 | 1,405 | 6,600 | <issue_start>username_0: ***Background:*** In one of my projects I am doing [component testing](https://martinfowler.com/bliki/ComponentTest.html) on Spring Batch using JUnit. Here application DB is MYSQL. In Junit test execution I let the data-source switch between
* MYSQL and
* H2(jdbc:h2:mem:MYTESTDB;DB\_CLOSE\_DE... |
2018/03/01 | 752 | 2,397 | <issue_start>username_0: I want to create a print statement that displays three values. 1) Counter variable which shows number of iterations. 2) Array recorder which records the values of the elements and 3) the value of these elements + 5.
There is a change method which takes all of the values in the array and adds 5... |
2018/03/01 | 1,459 | 5,092 | <issue_start>username_0: I've put this in the simplest terms for this question.
if element is clicked, 'active' class is added to element, 'active' class is removed from other elements.
However, if the element is 'active' and it's clicked for a second time the 'active' class should not be "re-applied" (or called for... |
2018/03/01 | 1,590 | 5,880 | <issue_start>username_0: Is there any working sample to integrate UPI payment gateway using Android Deep Link. I went through NPCI specifications and implemented it with no success. Transaction is not getting completed.
```
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
... |
2018/03/01 | 642 | 2,380 | <issue_start>username_0: I have a class that is of the form
```
template
class c {
bool hasChild = \*something\*;
T \*child;
public:
T getChild() {
if(hasChild) {
return \*child;
} else {
return 0; // <<-- this line
}
}
```
My actual class is very different, but this represents the specific problem I'm ... |
2018/03/01 | 583 | 2,050 | <issue_start>username_0: This is a question on leetcode. For some reason my code only works for 7/164 test cases. i would like to know why my algorithm is not efficient.
what is a solution to this? what is wrong with my code?
here is link to the problem
<https://leetcode.com/problems/remove-duplicates-from-sorted-list... |
2018/03/01 | 445 | 1,475 | <issue_start>username_0: I'm getting headache with regex.... again....
Having the text: //Edit1: I had to change the text since I'm not starting with the values each line
```
lorem ipsum 1 $input_value sample
lorem ispum 2 "$input_notvalue"
lorem ipsum 3 helloworld $input_theme samplemeh
$input\_value
```
I want to... |
2018/03/01 | 614 | 2,090 | <issue_start>username_0: I have several nested components on the page with parents component having `@click.native` implementation. Therefore when I click on the area occupied by a child component (living inside parent), both click actions executed (parent and all nested children) for example
```
```
So I have a lis... |
2018/03/01 | 906 | 4,112 | <issue_start>username_0: I have broadcast like this:
```
private final BroadcastReceiver locationReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if(intent.getAction().matches(LocationManager.PROVIDERS_CHANGED_ACTION)){
//do stuff
... |
2018/03/01 | 371 | 1,259 | <issue_start>username_0: I am new to sails js, I have to read json file in a sails generated controller and process the data in it. If its, express I generally use jsonfile module like this in app.js
```
let jsonfile = require('jsonfile')
let file = '/tmp/data.json'
jsonfile.readFile(file, function(err, obj) {
conso... |
2018/03/01 | 623 | 2,389 | <issue_start>username_0: There are buttons in the each rows of the table. When user click it, a sweetalert is fired to display confirmation window. If user click yes, then an AJAX is executed to post the row values.
The post process is working, but I am unable to change the button attribute and a label text after AJA... |
2018/03/01 | 2,158 | 6,871 | <issue_start>username_0: First of all, sorry for my English. I'm from Buenos Aires, and I've started learning Python just a few weeks ago. Furthermore, I have a really basic knowledge in programming. All I was able to do so far was by getting the info from internet (no formal education in this matter-I was studying Acc... |
2018/03/01 | 520 | 1,997 | <issue_start>username_0: My problem
----------
My card views defined through XML are **not showing their proper rounded corners (they are being covered by its subviews) in Android studio preview**.
**Although it shows up fine after rendering in the simulator**, I fear that this "glitch" may be a symptom of me doing ... |
2018/03/01 | 404 | 1,388 | <issue_start>username_0: In es5.5, how to determine whether a field is numeric?
```
if (is_numeric(ctx._source.some)) {
ctx._source.some = ctx._source.some + 2
}
```<issue_comment>username_1: The [instanceof](https://www.elastic.co/guide/en/elasticsearch/painless/5.5/_operators.html#_instance_of) operator might h... |
2018/03/01 | 668 | 2,257 | <issue_start>username_0: I need to get only specific characters from a text file. I am using the `getline()` function in C++. my compiler keeps giving me the error that there is no matching member function call for `getline()`, how can I fix that?
I'm trying to pull last names and scores from the file.
the file looks... |
2018/03/01 | 545 | 2,030 | <issue_start>username_0: Consider the following example with several layers of inheritance:
```
struct A {
void operator()(double x);
};
struct B: A {
using A::operator();
template void operator()(T... x);
};
struct C: B {
using B::operator();
void operator()() const;
void operator()(int x) const;
};... |
2018/03/01 | 375 | 1,380 | <issue_start>username_0: I'm trying to write a script that will search an entire page and remove the attribute `disabled` from all objects of type `button`. What is the best method to accomplish this? Looking for plain JS solutions.
For example I would like to turn this:
```
My button
```
into:
```
My button
```
... |
2018/03/01 | 968 | 3,806 | <issue_start>username_0: I'm using the [Null Object](https://robots.thoughtbot.com/rails-refactoring-example-introduce-null-object) pattern in my Rails application to implement the concept of a guest user account.
Like many apps, I have a method on `ApplicationController` called `current_user`.
In the case of a non-l... |
2018/03/01 | 1,228 | 4,286 | <issue_start>username_0: How to exit from a method, i.e how can i return from a function in this recursion in java?
```
public class solution {
public static int countZerosRec(int input){
int n=0;
int k =0;
int count=0;
//Base case
if(n==0)
{
return; // How can i retur... |
2018/03/01 | 941 | 3,659 | <issue_start>username_0: I wish to do a scrollable Grid Layout with Card View items.
I have try quite a number of solution online but it seems like dont satisfy the outcome I want.
After some investigation i found out that it is regarding to the whole project.
With new activity created, in the xml file i have tr... |
2018/03/01 | 450 | 1,831 | <issue_start>username_0: right now I have a problem where I want to raise a specific TypeError if there is one. However, what ends up happening is the interpreter sees the first error, and then in the middle of handling it it raises the other one as well saying "During handling of the above exception, another exception... |
2018/03/01 | 559 | 2,207 | <issue_start>username_0: New to python and attempting to download the NIST NVD JSON files. I have tried several methods but it only write about 324 bytes file. If I do one file that does in fact work but there are several files to download for this.
I did try to adjust the chunk\_size but still can't get a 1 to 6mb zi... |
2018/03/01 | 1,592 | 4,586 | <issue_start>username_0: The codes:
```
#include
#include
#include
typedef unsigned int uint32\_t;
float average(int n\_values, ... )
{
va\_list var\_arg;
int count;
float sum = 0;
va\_start(var\_arg, n\_values);
for (count = 0; count < n\_values; count += 1) {
sum += va\_arg(var\_arg, signed long long i... |
2018/03/01 | 766 | 2,765 | <issue_start>username_0: How do I change the JavaScript code to find the `input` `label`'s HTML `background-color` instead of having to manually insert the color into the JavaScript like in this snippet?
```js
function ChangeColor(color) {
var clrDiv = document.getElementsByClassName("colorDiv")[0];
clrDiv.style... |
2018/03/01 | 613 | 1,944 | <issue_start>username_0: I have two variable length arrays of values, TargetName[] and TargetCpu[], which I need to return across the ENDLOCAL boundary. I've tried the following, but only the first value on the first array gets returned.
```
for /L %%i in (0,1,%MaxIndex%) do (
for /f "delims=" %%j in (""!TargetNam... |
2018/03/01 | 2,320 | 4,791 | <issue_start>username_0: I tried to write a code to solve a 2nd order ODE but somehow it did not work as I intended.
the equation is 2y" + 5y' +3y = 0 ,y(0) = 3 and y'(0) = -4
The final answer will be y(x) = 3-4x << edit this is wrong
therefore y(1) = -1 and y'(1) = -4
But the program output is y(1) = 0.81414 y'(1)... |
2018/03/01 | 1,668 | 3,671 | <issue_start>username_0: I wanted to know when my Application class' onCreate is called, whether it was created due to user opening the app or by itself due to some reason like broadcast received/job started etc. Please help.<issue_comment>username_1: In your for loop in `test2ndorder`, you use the constant `x0`, `y0`,... |
2018/03/01 | 572 | 1,922 | <issue_start>username_0: I am trying to display the percentage of pets per owner in a pie chart, how do i push data to the piechart? the for loop keeps getting a SyntaxError: Unexpected token var. here's my code.
```
window.onload = function() {
var count = "php echo($i)?";
var name = [];
var per = [];
var j = -1;
va... |
2018/03/01 | 700 | 2,127 | <issue_start>username_0: I just began learning Python. So I am a beginner. I have a question about "for statement." I think I still don't know the rule of it.
Please see below.
example:
```
list1 = []
list2 = []
def forStatement():
for i in range(3):
for j in range(5, 7):
list2.append(j)
... |