date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/08 | 632 | 1,767 | <issue_start>username_0: In pandas and python:
I have a large datasets with health records where patients have records of diagnoses.
How to display the most frequent diagnoses, but only count 1 occurrence of the same diagnoses per patient?
Example ('pid' is patient id. 'code' is the code of a diagnosis):
IN:
```
pi... |
2018/03/08 | 1,699 | 4,773 | <issue_start>username_0: I have a dataframe where I want to replace the variables
* age\_1 with values of variable age1\_corr\_1 if age1\_corr\_1 is not NA
* age\_2 with values of variable age1\_corr\_2 if age1\_corr\_2 is not NA, ...,
* age\_n with values of variable age1\_corr\_n if age1\_corr\_n is not NA.
Then I'... |
2018/03/08 | 1,325 | 4,112 | <issue_start>username_0: I want to sort collection of data by specific values like in sql `ORDER BY VALUES()` but in PHP. I have array like this
```
$array = array(
array('name' => 'Milk', 'type' => 'drink'),
array('name' => 'Coffee', 'type' => 'drink'),
array('name' => 'Orange', 'type' => 'fruit'),
ar... |
2018/03/08 | 800 | 2,527 | <issue_start>username_0: Follow code:
**axml:**
```
xml version="1.0" encoding="utf-8"?
```
Result:
[](https://i.stack.imgur.com/IdNDS.png)
Text is centered to the left. How do I center in the middle?
**Update:**
Here is the code in C #, as I a... |
2018/03/08 | 464 | 1,636 | <issue_start>username_0: Can I host my angular 5 site to any web hosting provider?
If I do "ng build --prod" can I just deploy everything in the dist folder to the hosting provider? or does angular require you to find a specific web hosting service?
I was trying to use either Namecheap hosting or 000webhosting but I... |
2018/03/08 | 636 | 2,096 | <issue_start>username_0: Is there a way to remove the WordPress admin bar but just on a specific page?
I know that I can remove it or hide it completely by adding an action:
```
add_action('after_setup_theme', 'remove_admin_bar');
function remove_admin_bar() {
if (!current_user_can('administrator') && !is_admin()... |
2018/03/08 | 1,685 | 6,732 | <issue_start>username_0: I'm adding a static builder method to a record type like this:
```
type ThingConfig = { url: string; token : string; } with
static member FromSettings (getSetting : (string -> string)) : ThingConfig =
{
url = getSetting "apiUrl";
token = getSetting "apiToken... |
2018/03/08 | 3,940 | 8,302 | <issue_start>username_0: I asked a similar question [here](https://stackoverflow.com/questions/49144154/how-to-use-loc-with-multiple-conditions-and-groupby/49144209#49144209), but I want to expand on this question because I'm asked to do something a little different where I cannot use .duplicates()
I have a df that's ... |
2018/03/08 | 959 | 3,225 | <issue_start>username_0: I was working through a tutorial and I created a typo that stumped me. I know how to correct the code but I'm curious to know why wouldn't this code compile when I try to add items to the array unless its done inside a function? The typo in this code was that it needed to be inside of an init f... |
2018/03/08 | 589 | 1,609 | <issue_start>username_0: Is it possible to swap two adjacent rows with each other, and then move onto the next two rows, and swap their individual rows together? i.e. swap col1 value in row 1 with col 1 value in row2; swap col 1700 value in row 87 with col 1700 value in row 88.
sample data:
```
col1 col2
row1 a... |
2018/03/08 | 596 | 2,215 | <issue_start>username_0: I've seen a bunch of questions dealing with getting all types from a base type and so on, but that's not quite what I need. For instance, I have and abstract base class:
```
public abstract class BasePart
{
//whatever
}
```
And I have a bunch of classes that derive from it. Like...
```... |
2018/03/08 | 570 | 1,809 | <issue_start>username_0: I have an input and I want to mask and format the value that you enter in that.I have tried with below
```
var tempVar = myInputValue.replace("/D/g","").match("/d/g{3}","/d/g{2}","/d/g{4}");
var maskedValue = myInputValue[0]."-".myInputValue[1]."-".myInputValue[2];
```
Now the formatting is ... |
2018/03/08 | 902 | 3,361 | <issue_start>username_0: I have many strings which have **multiple spaces and one forward slash** like this:
```
string a="xxxxxx xxx xxxxxxxx xxxxxx aaa/xxxxxxxxxxxxxxx";
```
or
```
string b="xxxx xxx xxxxxx bbbbb/xxxxxxx xxx";
```
or
```
string c="xx xx 12345/x xx"
```
What I need to do is to replace the su... |
2018/03/08 | 370 | 1,185 | <issue_start>username_0: I want to load oneRunParams.py into my current program but won't know where it is till I run it. I want to have it as an input argument, accessed through argv. I was using:
from oneRunParams import \*
I now want to replace this with something that will do the same only with the path to oneRun... |
2018/03/08 | 443 | 1,443 | <issue_start>username_0: Any Windows python developers here?
I created a virtualenv, activated it and installed `django`. If I `run pip3 list`, it shows Django (2.0.3) as installed. The problem is when I try and use django, it never works, it just returns "no module django."
When I try `pip3 install django` again, it... |
2018/03/08 | 973 | 3,265 | <issue_start>username_0: I am new to smart pointers. Recently I started working on some parallel simulations and I thought `shared_ptr` will help prevent memory leaks. I heard that incrementing the number of instances can cause non-negligible extra time overhead, so I hope to avoid doing that.
In my code I was using a... |
2018/03/08 | 740 | 2,430 | <issue_start>username_0: I want to create a class A where one of its instance variables is an array consisting of objects of class B. Is it possible to access the method of class B through class A, so it possible to do something like:
```
classA.classB[0].getSth()
```
Or is there any other way to access the method i... |
2018/03/08 | 2,298 | 3,914 | <issue_start>username_0: ```
library(tidyverse)
```
Using the example data at the bottom, I'm trying to remove duplicates in the ID column, but only the duplicates where the "Year" column equals 2017.
I tried the code below, which doesn't seem to work.
```
DF <- DF %>%
group_by(ID) %>%
mutate(REMOVE = if_els... |
2018/03/08 | 690 | 2,670 | <issue_start>username_0: I have created two arrays called section one and two to feed in their data to my table.
```
let Sec1 = ["Section" , "One"]
let Sec2 = ["Section", "Two"]
```
And I have create an array called `sectionTitles` which contains the name of my sections.
```
let sectionTitles = ["Section1" , "Sect... |
2018/03/08 | 462 | 1,750 | <issue_start>username_0: I have a button on my sheet that when clicked is supposed to copy data from my "template" sheet below the first blank cell. Unfortunately it instead creates a whole new workbook with the copied data. I have it set to copy the template data when a new sheet is created that works as expected but ... |
2018/03/08 | 608 | 1,969 | <issue_start>username_0: I am trying to put values in variables to use it in html part but non of the solutions is working:
```
GetUserData(){
this.userService.GetUserDetails().subscribe(data=>{
if(Array.isArray(data))
this.user=data;
console.log(this.user);
});
}
```
This sets user v... |
2018/03/08 | 545 | 1,888 | <issue_start>username_0: I have production code that is parsing JSON. In my unit tests I want to duplicate what is happening in this code. You can see in the screenshot that after parsing the JSON the type is `Optional`. This can be cast to Int, Float or Double.
What type does `testValue` need to be to behave the sam... |
2018/03/08 | 447 | 1,640 | <issue_start>username_0: I am just testing something out. I am trying to build a tracking information tracker. I am also pretty new to MS Access.
```
Private Sub btn_Submit_Click()
CurrentDb.Execute _
"INSERT INTO TrackNum_Table(TrackingNum_TrackNum) " & _
"VALUES ('" & Me.txt_Track.Value & "')"
```
So far ... |
2018/03/08 | 671 | 2,791 | <issue_start>username_0: Hello I have enabled automatic migrations with code first in my asp.net mvc project : `Enable-Migrations –EnableAutomaticMigrations`.
I do not want to have the identity tables (user, roles, user roles, etc..) created by default in my .net application. How can I prevent them to be created?
I t... |
2018/03/08 | 610 | 2,232 | <issue_start>username_0: Im using **Android Studio 3.0.1**
graddle: **gradle-4.6-all**
I created a module with empty body structure, when i try to add `compile project (:testmodule)` to my **app** build.gradle and sync, it keeps saying `could not resolve project :testmodule`
This is my **app** *build.gradle*
```
ap... |
2018/03/08 | 889 | 2,828 | <issue_start>username_0: Assume there is Oracle table with column `empty` below
```
------------------
| empty | count |
| true | 0 |
| true | 0 |
| false | 1 |
| true | 0 |
| false | 2 |
| true | 0 |
| false | 3 |
| false | 4 |
| true | 0 |
| false | 5 |
| ........ |
2018/03/08 | 283 | 865 | <issue_start>username_0: ```
int main()
{
char *d = "1234";
char *p = d;
p = p+2;
p[0] = '2'; \\Error line
printf("%s", p);
}
```
If i remove the line "Error line" then there is no seg fault. Whats the problem here?<issue_comment>username_1: You're modifying constant memory. Even though you ... |
2018/03/08 | 1,629 | 6,300 | <issue_start>username_0: I'm trying to create a custom view that consists of a UILabel on top of a UIView. The idea is for this to be a small pop up message with the label essentially being the same size as the view. However, whenever I try to add this custom view (represented by the small gray box at bottom of the scr... |
2018/03/08 | 815 | 2,776 | <issue_start>username_0: [](https://i.stack.imgur.com/Jnnsg.png)
Can someone explain or give a notebook example how to use the new Form feature? It looks really exciting, but I cannot find any example or even an announcement anywhere.<issue_comment>username_1... |
2018/03/08 | 946 | 3,081 | <issue_start>username_0: I have the following array that I need to use in a laravel email view template
```
$inputs['test']
```
Which looks like this when I `dd($inputs['test']);`
```
Array:1[
"order" => array:2[
0 => 523
1 => 522
]
]
```
I've tried this in my foreach loop but it doesn't... |
2018/03/08 | 1,310 | 4,709 | <issue_start>username_0: I am trying to put my [React app](https://github.com/gitlwh/MembershipSample/tree/master/client) on the Heroku. The whole project include one API (express) and one client (ReactJS). I have put my API on heroku. But when I put my client on Heroku, it shows build succeeded. But when I [open](http... |
2018/03/08 | 1,146 | 4,022 | <issue_start>username_0: I am working on a piece of code that contains a list of tuples with duplicates and I want to remove the duplicates from this list WITHOUT using HASHSET or SET. I am only allowed to use Arrays, ArrayList, and Iterator.
The following code is going to overflow/infinite loop. I understand why is ... |
2018/03/08 | 701 | 1,833 | <issue_start>username_0: I'm looking over this [codepen css star display](https://codepen.io/Bluetidepro/pen/GkpEa) and I would like to know if I can change the overall size of the stars? I tried setting the font-size to 15px but it scewed the stars so that they didn't overlap anymore.
```css
@import "lesshat";
// Me... |
2018/03/08 | 391 | 1,246 | <issue_start>username_0: I have been reading everywhere for a solution and I have tried all of them. But I am getting and error with this snippet:
```
if (jQuery('.page-id-5356 .uts-main-login')[0]){
jQuery('.entry-content #em-wrapper').add('text');
}
```
Any ideas on why this isn't working? I either get nothing, ... |
2018/03/08 | 361 | 1,511 | <issue_start>username_0: I am trying to understand on how to implement access token request from WSO2 API Manager. Given I have a login page with username and password input, how do I request the access token by using only these two parameters?
Because by referring to the Token API, consumer key / secret is required ... |
2018/03/08 | 476 | 1,814 | <issue_start>username_0: I am trying to get a string of just upercase A - G chars ignoring any other characters in the alphabet. I tried a long if statement such as:
```
String initString;
for (int i = 0; i < 128; i++){
if (input.equals("A") || input.equals("B") || input.equals("C") || input.equals("D... |
2018/03/08 | 240 | 911 | <issue_start>username_0: The installation instructions omit any explicit path:
```
$ git clone -b beta https://github.com/flutter/flutter.git
$ export PATH=`pwd`/flutter/bin:$PATH
```<issue_comment>username_1: It doesn't really matter.
Use a place where you have proper permissions.
I think `~/flutter` is quite comm... |
2018/03/08 | 381 | 1,323 | <issue_start>username_0: Today, I create a new `Xamarin.Forms` project, in this project, I want to update the packages, see the picture:
[](https://i.stack.imgur.com/pV2Dj.png)
But, I got this error:
>
> Package restore failed. Rolling back package... |
2018/03/08 | 783 | 2,297 | <issue_start>username_0: I'm trying to extract texts from this webpage below:
```
Category1: [Text1 I want](SomeURL) > Category2: [Text2 I want](SomeURL)
```
I tried:
```
for div in soup.find_all('div', class_='MYCLASS'):
for url in soup.find_all('a', id='category1'):
print(url)
```
And it returned:
... |
2018/03/08 | 783 | 2,506 | <issue_start>username_0: JSON:
```
{
"time":"1520480018644",
"start":"0",
"search":{
"search":"",
"smart":"true",
"regex":"false",
"caseInsensitive":"true"
},
"columns":[
{
"visible":"false",
"search":{
"search":"",
"smart... |
2018/03/08 | 345 | 862 | <issue_start>username_0: I have a 600x30 sized .csv file all of whose data type is string but actually numeric, such as :
>
> '36,000' == 36000
>
>
>
I'd like to convert all of those into float most efficiently.
How can I do this?
>
> I can think of decomposing every str-typed number using split() then erase '... |
2018/03/08 | 991 | 3,782 | <issue_start>username_0: Just like this:
```python
x = keras.layers.Input(shape=(3,))
y = keras.layers.Dense(5)(x)
G = keras.models.Model(x, y,name='G')
G.compile(optimizer='rmsprop', loss='mse')
data_x = np.random.random((10, 3))
data_y = np.random.random((10, 5))
G.fit(data_x,data_y,shuffle=False,validation_data=... |
2018/03/08 | 515 | 1,752 | <issue_start>username_0: When I use dynamic prototypes, I found my label is overlapping.
"firstLabel" is the default text of the label I have inserted on storyboard and I set the text "ios" when the program run.
Following are my code.
```
@implementation ViewController{
NSArray* _books;
}
- (void)viewDidLoad {
... |
2018/03/08 | 332 | 1,057 | <issue_start>username_0: I am trying to setup minikube on my local machine with windows 7 with virtual box.
I tried to follow up the below steps

I also tried passing proxy with below command
```
minikube start --docker-env http_proxy=http://xxx:80... |
2018/03/08 | 328 | 1,195 | <issue_start>username_0: I'm trying to extract some values from a list.
<https://hastebin.com/ugijekegip.json>
`dimension_hour` filters correctly the list, but `dimension_days` gets assigned an empty list `[]` even if they are using the same to filter
```
dimensions_day = []
dimensions_hour = []
for element in list:... |
2018/03/08 | 1,235 | 5,100 | <issue_start>username_0: I have a Junit testing a method handling POST of a Controller class. the Junit is running fine. But I dont see in the log Request body being print for the MockHttpServletRequest. Can some one explain why?
```
package com.spring.batch.learnings.test;
import org.junit.Test;
import org.junit.runn... |
2018/03/08 | 740 | 2,505 | <issue_start>username_0: How to use a conditional case in the `where` clause using different conditional columns?
Please refer to the code below
```
if OBJECT_ID('tempdb..#MemberInfo') is not null
drop table #MemberInfo
DECLARE @GroupID varchar(60),
@Eoid varchar(60);
set @GroupID='23'
set @Eoid = null;
sele... |
2018/03/08 | 607 | 1,878 | <issue_start>username_0: So I'm trying to get a `scanf` to accept strings and store it which will not carry into the next `scanf`. I'm quite new to C.
For example:
```
#include
#include
int main(){
char word1[100];
char word2[100];
printf("Enter a sentence:");
scanf("%[^\n]s",&word1);
printf("Enter a second... |
2018/03/08 | 577 | 1,883 | <issue_start>username_0: I tried to insert tabs for UI built using React.js. I downloaded react-tabs using following command:
```
npm install react-tabs-navigation
```
It caused following error when I imported react-tabs-navigation.
```
import Tabs from 'react-tabs-navigation'
```
Error:
```
TypeError: React.Pro... |
2018/03/08 | 628 | 2,243 | <issue_start>username_0: I am trying to set a radio button so that if it is selected, on submit wait 2 seconds, then throw up an alert. This feels pretty close but not working:
```
```
My submit button:
```
```<issue_comment>username_1: `onsubmit` applies to a , not a . You'll need to put your submit button *and* ... |
2018/03/08 | 548 | 1,806 | <issue_start>username_0: Relevant lines of my .travis.yml file, which I got from the sample here:
<https://docs.codeclimate.com/v1.0/docs/travis-ci-test-coverage>
```
env:
global:
- CC_TEST_REPORTER_ID=MY_ACTUAL_ID
services:
- postgresql
before_script:
- curl -L https://codeclimate.com/downloads/test-repor... |
2018/03/08 | 295 | 1,245 | <issue_start>username_0: I have a NotificationService Extension in my iOS app which I use to modify the text and download attachments.
This works fine as long as the screen is unlocked. The moment the screen is locked, the service extension is not invoked and the notification is shown in its default state with no mess... |
2018/03/08 | 302 | 1,244 | <issue_start>username_0: Currently, data of all the users who are using my Android app is going to a single folder on Firebase Storage. But I want to auto-create a new folder for every new device. Means, the data of "harry's device" will be uploaded to "Harry Folder" on storage of Firebase. And the data of "Jane's devi... |
2018/03/08 | 513 | 1,742 | <issue_start>username_0: I'm trying to create a simple 1D array using the following code.
```
Sub Button3_Click()
Dim search() As Variant
Dim data() As Variant
Worksheets("IO List").Activate
Set searchitems = ActiveSheet.Range("A1", "U1")
Set ExportData = ActiveSheet.Range("A3", "U3")
search = searchitems.Value
MsgBox... |
2018/03/08 | 499 | 1,660 | <issue_start>username_0: I'm trying to create code to export PDF file ,And this statement to do that (at Controller.php):
```
$pdf=PDF::loadView('backend.diennuoc.diennuoc-pdf',$data);
return $pdf->download('Hoadondiennuoc.pdf');
```
it has a error :
```
Dompdf \ Exception
Frame not found in cellmap
```
I don't... |
2018/03/08 | 634 | 2,208 | <issue_start>username_0: This is a simple function to check whether the given number is prime or not and works for the most part except for 2 and 3 (as it doesn't enter the for loop) but they are already prime so no checking is required and the flag should remain untouched.But notice how I put the return statement insi... |
2018/03/08 | 1,906 | 6,216 | <issue_start>username_0: I am trying to loop through this JSON in order to get to the 'name' parameter. The data comes from Microsoft's Bing API. I can pass in coordinates to get the name of a place. I have pasted the response below. as well as my attempt. Please assist.
```
{
"authenticationResultCode":"ValidCre... |
2018/03/08 | 1,158 | 3,479 | <issue_start>username_0: I want to change the color of toggle button a tag when the dropdown menu opens. Unfortunately, all of the tag get highlighted. I wanted to target specific tag.
Here's my code:<issue_comment>username_1: I think a big part of your problem is you're using `this` for your local variable assignmen... |
2018/03/08 | 779 | 2,995 | <issue_start>username_0: I'm trying to implement facebook login button in my website, so far everything is going good but I'm stuck in a situation.
I have this facebook sdk js:
```
function statusChangeCallback(response) {
console.log(response);
if (response.status === 'connected') {
getUser();
} e... |
2018/03/08 | 437 | 1,527 | <issue_start>username_0: I want to save a plot created using matplotlib to a file but I do not want it to show as inline plot in Spyder IDE. My code:
```
import matplotlib.pyplot as plt
from math import sin,pi
import numpy as np
x = np.linspace(0,2*pi,100)
y = np.sin(x)
plt.plot(x,y)
plt.savefig('sin.png')
```
Whe... |
2018/03/08 | 402 | 1,478 | <issue_start>username_0: I have list of strings, and using not operator I wanted to select all values except one. But I couldn't find anything about not opertor in the firebase website. Please help me with this issue.
P.S: This [Link](https://stackoverflow.com/questions/47251919/firestore-how-to-perform-a-query-with-i... |
2018/03/08 | 940 | 3,394 | <issue_start>username_0: I would like not just to know if the substring exists in a buffer, but to get the position it ends. I am doing a ftp and it will look for @filestart; to start copying the file and only will return the file when it finds @fileend;
I will send the first message with something like that: @filestar... |
2018/03/08 | 647 | 2,000 | <issue_start>username_0: I want to create a condition to change row colour. But my script didn't working for me.
Below is my script:
```
if ($getType == 1){
if (($intervalDay > '1') && ($intervalDay < '7')) {
$strTblRes .= '|';
print\_r('warna hijau');
} elseif (($intervalDay > '7') && ($intervalDay < '14'... |
2018/03/08 | 1,033 | 3,880 | <issue_start>username_0: Is there a way to setup a Moshi `adapter` to automatically create a single `Object` or `List` based on the JSON response? Currently, I can do this explicitly. For example, I can receive the following responses:
```
{
"userId": "1",
"id": "2",
"body": "body...",
"title": "title.... |
2018/03/08 | 1,492 | 5,770 | <issue_start>username_0: I am facing problem with `loading URL` in `web-view`. `Web-view` shows blank because it is not logged in. How to access `course file` without login into moodle2.6 by using `url`.
**Using this url format**
<http://example.com/pluginfile.php/4418/mod_resource/content/10/xx-t2.pdf>
**Here is my... |
2018/03/08 | 662 | 2,345 | <issue_start>username_0: I am working in a project relating with raspberry pi 3 and windows iot. I have configured IoT on-boarding for changing it as access point. Now the access point works and i can connect with the internet through the access point.
Now i am in need of getting the connected devices from the raspbe... |
2018/03/08 | 1,264 | 2,869 | <issue_start>username_0: I have an array of data like
```
[
{ "day": "Mon", "time": "11:00AM – 10:00PM" },
{ "day": "Tue", "time": "11:00AM – 10:00PM" },
{ "day": "Wed", "time": "11:00AM – 10:00PM" },
{ "day": "Thu", "time": "11:00AM – 10:00PM" },
{ "day": "Fri", "time": "11:00AM – 11:00PM" },
{ "day... |
2018/03/08 | 392 | 1,390 | <issue_start>username_0: I'm using ngx bootstrap datepicker in the project
Needed only month and year to be selected like the above image
[](https://i.stack.imgur.com/bl93s.png)
```
```
is there any way to config the date-picker like this? or Su... |
2018/03/08 | 467 | 1,577 | <issue_start>username_0: Im trying to convert the JSX files of my ReactJS app, one by one to TS. Hence I will have both JSX and TS files running at the same time. (Hence added rules for both in webpack as given below):
This is the part of my webpack config that processes jsx and ts files:
```
module: {
rules:... |
2018/03/08 | 713 | 1,763 | <issue_start>username_0: I've got a csv that looks like this (there are more years):
```
year,title_field,value
2009,Total Housing Units,39499
2009,Vacant Housing Units,3583
2009,Occupied Housing Units,35916
2008,Total Housing Units,41194
2008,Vacant Housing Units,4483
2008,Occupied Housing Units,36711
2009,Owner Occu... |
2018/03/08 | 1,564 | 6,461 | <issue_start>username_0: I'm working on a web app which works fine. But recently from management request we need to serve our web app to multiple teams. So what we decided is to create a separate copy of DB schema for each team.
Let's say our team uses TEAM\_A schema & other team uses TEAM\_B schema. Both DB schema's ... |
2018/03/08 | 1,352 | 4,594 | <issue_start>username_0: I am practicing Swift Language.
I am solving Leetcode problems with playground in xcode.
I am confused by assining and binding optional value in linked list.
Here is my code.
```
// Definition for singly-linked list.
public class ListNode {
public var val: Int
... |
2018/03/08 | 278 | 1,009 | <issue_start>username_0: I am looking for a javascript equivalent of how I would write out this function
Write a function of type: add a -> a -> a
Thanks<issue_comment>username_1: If you mean something like
```
add a -> b -> a + b
```
Then assuming you are working in ES6 you could do that in a couple ways, includ... |
2018/03/08 | 397 | 1,516 | <issue_start>username_0: I used the following code to check if array is empty then show message else show the list. But it only shows list is working. ***"No messages"*** is not displaying. What's wrong here?
```
No messages
{{item.message}}
```<issue_comment>username_1: You are checking if globalArray is empty w... |
2018/03/08 | 679 | 2,496 | <issue_start>username_0: I would like to write a template function taking an optional argument using `std::optional`,
```
template
void fcn(T1 v1, std::optional v2)
{
}
int main()
{
fcn(1, 1); // failed to compile
fcn(1, std::nullopt); // failed as well
}
```
However, the compiler can't deduce `T2` for neither ca... |
2018/03/08 | 556 | 1,867 | <issue_start>username_0: I took the back-end response token and store it in `store.js` as a state.
How do I pass that token value to the `main.js`? I do want to attach it to the Authorization header. This is my code.
**store.js**
```
state:{
idToken:"a sample id token"
}
```
**main.js**
```
axios.defaults.headers... |
2018/03/08 | 784 | 3,114 | <issue_start>username_0: I am refactoring one of my old apps in MVP. I have refactored most of the logic and now I am stuck with following one.
In one of my Activities, I have implemented PhoneStateLister as following.
```
private class CallStateListener extends PhoneStateListener {
public void onCallStateChanged... |
2018/03/08 | 532 | 1,774 | <issue_start>username_0: I currently have a table that holds events with the following columns :
```
ID | Date_From | Date_To | Time_From | Time_To
```
When a user wants to create a new event through a form, I am trying to write the query that will verify if an event is already existent during the req... |
2018/03/08 | 349 | 1,437 | <issue_start>username_0: I am using wordpress social login 2.3.3 and enabled yahoo, twitter and facebook. But in my infrastructure i am using nginx for hosting webpage and there is another instance of nginx used for load balancing the traffic. My domain is registered and i am using non-standard port for HTTPS.
My iss... |
2018/03/08 | 617 | 2,243 | <issue_start>username_0: I have two httpGet methods in my api controller. I use attribute routing to differentiate between them.
When I navigate to localHost/api/Lockers/availableLockers
I get an error:
>
> the parameters dictionary contains a null entry for parameter 'id' of
> non-nullable type 'System.Int32' for m... |
2018/03/08 | 572 | 2,173 | <issue_start>username_0: I created a bucket and configured a static website hosting
I want to use SSL so instead of using
<http://my-bucket.s3-website.us-east-2.amazonaws.com/>
I have to use
<https://s3.us-east-2.amazonaws.com/my-bucket/>
the problem with this is that the **static website hosting** endpoint is stil... |
2018/03/08 | 660 | 2,512 | <issue_start>username_0: So I am trying to write a simple code that will do the Pythagorean theorem for me after I input A, B and C but the code is skipping my While statements, and I have tried rewriting them as if statements to see if that works and again it will skip it, I need some help Please and Thank you Btw I d... |
2018/03/08 | 744 | 2,785 | <issue_start>username_0: Trying to pass a data array to all views, but I keep getting the error `Undefined variable: data`. Not sure what the missing piece is.
All my page specifric controllers extend the following BaseController
**BaseController**
```
php
...
class BaseController extends Controller
{
public f... |
2018/03/08 | 531 | 2,020 | <issue_start>username_0: I want to register a component globally while passing some properties, so i can call it anywhere in the page but it seems its not working unless i use inline templates.
I don't want an inline template i want to organize my global component into single directory
```
import asidecomponent from ... |
2018/03/08 | 740 | 2,535 | <issue_start>username_0: I am working on a project. I want the background color to change when two checkboxes are checked. I tried the code below and it failed. I see the code working when we delete it "edit-container2" but I dont want it. I want the Javascript code to work on a different div. (Different example, CSS B... |
2018/03/08 | 762 | 2,558 | <issue_start>username_0: I need to distinguish variable names and non variable names in some expressions I am trying to parse. Variable names start with a colon, can have (but not begin with) numbers, and have underscores. So valid variable names are:
```
:x :_x :x2 :alpha_x // etc
```
Then I have to pick out othe... |
2018/03/08 | 2,360 | 9,087 | <issue_start>username_0: I have following code. Im trying to running a test case for create user.Following is what i have tried so far.
```
public class CreateUserCommandHandlerTest
{
private Mock> \_userManager;
private CreateUserCommandHandler \_systemUnderTest;
public CreateUserCommandHandlerTest()
{
\_us... |
2018/03/08 | 269 | 1,139 | <issue_start>username_0: I have my own Azure account, which I can connect to quite happily using Windows Powershell, using microsoft account and password. My client has an Azure account, which my microsoft account has been setup as an owner and co-administrator for, but when I login to Azure using Powershell Login-Azur... |
2018/03/08 | 666 | 2,472 | <issue_start>username_0: I am trying to upload a react-app to my github user page. I am successfully able to get my app running at my github user page url, but none of the images are showing up.
I have gone through both of these guides although I did not use create-react-app to make this web application.
<https://gi... |
2018/03/08 | 698 | 2,187 | <issue_start>username_0: I want to pass the array of string `names` in to the function and be able to generate the array of objects based on that.
Say I am passing `{ 'id', 'title' }` and as an output I am getting
```
[
{
id: '1',
title: 'o1'
},
{
id: '2',
title: 'o2'
},
]
```... |
2018/03/08 | 660 | 2,452 | <issue_start>username_0: I have the following code, but when I run my factory I got the following exception:
>
> Cannot redeclare questionIndex() (previously declared in
> /Users/user/Desktop/my-app/database/factories/QuestionFactory.php:42)
> in /Users/user/Desktop/my-app/database/factories/QuestionFactory.php
> ... |
2018/03/08 | 338 | 1,328 | <issue_start>username_0: I have started learning Android development and I have a very newbie question. I understand that Android can store data in SQLite for example, but what other approaches are there to the storage of data within your application?
Do Android apps ever have data 'embedded' within the application, ... |
2018/03/08 | 926 | 3,750 | <issue_start>username_0: Register.java
```
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.se... |
2018/03/08 | 499 | 1,819 | <issue_start>username_0: I'm working on a problem, where for the first time i want to upload **Excel file**, read it & store into a MySQL DB. I'm done with this part & everything is working as expected.
Form the 2nd time whenever i'll upload **Excel file** again(Excel file can have exactly same data as DB or modified ... |
2018/03/08 | 720 | 2,725 | <issue_start>username_0: The following line of code produces a compiler warning with HP-UX's C++ compiler:
```
strcpy(var, "string")
```
Output:
```
error #2167: argument of type "unsigned char *"
is incompatible with parameter of type "char *"
```
Please note: `var` is the `unsigned char *` here - its data ... |
2018/03/08 | 794 | 2,866 | <issue_start>username_0: My code is taking for 8 hours from time and date field but when i give both for example i set 9 am to 4 pm then its OK. but when i insert 9am to 6am it also allow that one its almost 21 hours difference so how can i do it any one please?
```
php
elseif (isset($_POST['from']) && ($_POST['to'])... |
2018/03/08 | 595 | 2,267 | <issue_start>username_0: Is there a way to iterate through a hashmap in java where the key is a String and a value Is an Integer trying to find the most frequent word that comes up<issue_comment>username_1: `C++` is being strict in checking the types where `std::strcpy` expects a `char*` and your variable `var` is an `... |
2018/03/08 | 699 | 2,280 | <issue_start>username_0: Can someone explain what is the difference between following two IIFE blocks:
```
a) (f1 = function(){console.log('IIFE Block1')})()
b) (var f1 = function(){console.log('IIFE Block2')})()
```
I understand that "b)" upon execution will throw error.
What is the use of defining the variable "f1... |
2018/03/08 | 432 | 1,554 | <issue_start>username_0: I want this approach.
```
const public int x;
```
at runtime
```
x = 10; //this value will change it another Class --> (Not internal)
x--> never change
```
is that possible any ways?<issue_comment>username_1: You cant assign value to const variable at runtime but still you can achie... |
2018/03/08 | 540 | 1,626 | <issue_start>username_0: I am trying to include `'com.squareup.retrofit2.converter-gson:2.3.0'` using Android Studio 3.2 Canary 5
See image below
[](https://i.stack.imgur.com/mmzFD.png)<issue_comment>username_1: as you can search in google, putting t... |