date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/10 | 535 | 1,813 | <issue_start>username_0: I want to replace some function from standard Go library (`os.Exit` specifically). Can I do that? I tried:
```
myExitValue := reflect.ValueOf(func() {
fmt.Println("exiting")
})
reflect.ValueOf(os.Exit).Set(myExitValue)
```
But it panics: `reflect: reflect.Value.Set using unaddressable va... |
2018/03/10 | 590 | 2,154 | <issue_start>username_0: I have made a chatbot in c++ using gcc compiler which uses basic file handling operations to handle user queries but now I wanted to upgrade the same.For this I thought of linking my code to internet,opening windows programs and providing it a GUI interphase.As I have recently learned python an... |
2018/03/10 | 502 | 1,781 | <issue_start>username_0: When a user searches they get a list of items that are included in their search, I cannot work out how to sort this from items that include the lowest amount first. Example I search "potato", "leek" I am returned all items that include this, but the first item may include 15 and next 5, I want ... |
2018/03/10 | 389 | 1,298 | <issue_start>username_0: When I start apache in XAMPP. The program cant start because api-ms-win-crt-runtime-|1-1-0.dll is missing from your computer.
How I fix it?!<issue_comment>username_1: You need to install the following windows update: [KB2999226](https://support.microsoft.com/de-de/kb/2999226) (Update for Univer... |
2018/03/10 | 834 | 3,365 | <issue_start>username_0: I have variables that i want to share between threads but they are giving me some problems! I have an Integer that i want the main program to share with the threads it is creating and allow the threads to change its value and being seen by the other threads and the main program (I hace two diff... |
2018/03/10 | 489 | 1,519 | <issue_start>username_0: I want to use an array of `data class` where one of the parameters is `Date`, I could not use [Date()](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.js/-date/index.html) as it looks to be related to `KotlinJS`, so I tried using `LocalDate` so I wrote the below code:
```
import java.time.... |
2018/03/10 | 568 | 2,123 | <issue_start>username_0: I was thinking of using a plist file to configure how I would upload a form to my server but then I realised I don't know how I could do one crucial part of this or even if this is possible since you can't dynamically declare variables with swift.
Basically I was thinking of using a dictionary... |
2018/03/10 | 523 | 1,888 | <issue_start>username_0: Recently I am working on OpenCV to complete a design, I now have got an IP camera and just by typing the IP address of the camera and the port in my browser, like 192.168.1.1:8080, I can watch the video.
I have installed VS2010 and correctly complete the setting. I now can deal with pictures in... |
2018/03/10 | 1,170 | 3,372 | <issue_start>username_0: I am creating a table by using bootstrap 3.7:
```css
body {
padding: 20px;
box-sizing: border-box;
}
table {
width: 300px;
}
thead tr {
background-color: #eee;
border: 1px solid blue !important;
}
thead tr th {
border: 1px solid blue !important;
}
thead ... |
2018/03/10 | 1,505 | 4,229 | <issue_start>username_0: I'm trying to build a website but the header and list items kind of merge or go on top of each other on resize
I'm not sure why.
is there a way to solve this without JS or Bootstrap?
[Screenshot of the problem](https://i.stack.imgur.com/Pzqpi.png)
It looks fine in normal full-screen mode but t... |
2018/03/10 | 1,089 | 3,425 | <issue_start>username_0: I'm using PhpStorm 2017.2.4, and programming with PHP 5.6 (for technical purposes).
Because I'm using PHP 5.6, since Xdebug only supports PHP 7 and upwards, I cannot use it to debug my code - hence I have to use Zend Debugger.
I've been trying to attach Zend Debugger to PhpStorm by followin... |
2018/03/10 | 663 | 2,192 | <issue_start>username_0: I have 2 tables in my C# code, `dtProducts` filled from a SQL Server table, and `dtProductdetails` filled from MS Access.
`dtProduct` has columns `code` and `name`, and `dtProductdetails` has columns `id`, `code`, `localname`, `price`.
I need to replace `localname` in `dtProductdetails` and r... |
2018/03/10 | 234 | 834 | <issue_start>username_0: I just need to copy the value of `data.notes`. I have used below code. But still `detailsOfCurrentNotes` value changes according to the value of `data.notes`. So could you tell me how to do this?
`notes :Note[]`
```
const detailsOfCurrentNotes = Object.assign({}, data.notes);
//here data.no... |
2018/03/10 | 318 | 1,056 | <issue_start>username_0: I am trying to plot a point in the complex number plane like that:
```
from matplotlib.pyplot import*
i = complex(3,1)*2
plot(i,'b.')
show()`
```
However the resulting plot displays the point `z=3+0i`. How can I make it take the imaginary component into account?<issue_comment>username_1: Yo... |
2018/03/10 | 682 | 2,340 | <issue_start>username_0: I am trying to remove the first 7 characters of an item within an array, more specifically im trying to remove "mailto" so it will just render out the email
I thought using [:7] would do the trick however python ignores the request.
any suggestions ?
```
def businessprofile(self, response):
... |
2018/03/10 | 1,226 | 4,436 | <issue_start>username_0: I'm new to C programming and have been reading about it [here.](https://www.tutorialspoint.com/cprogramming/c_data_types.htm)
I found out that `int` data types can be used to declare variables for a number/integer with value range between `-32,768 to 32,767` or `-2,147,483,648 to 2,147,483,647... |
2018/03/10 | 1,025 | 3,961 | <issue_start>username_0: Can this be made robust? at various points I'm finding that `5 % 2 = 0`
and I've never encountered this 'quirk' before, and probably due to ignorance around precision :/
```
$checkPrimeCubeRoots = array(125, 124);
foreach ($checkPrimeCubeRoots as $int)
{
$cubeRoot = pow($int, 1/3); // dou... |
2018/03/10 | 571 | 2,254 | <issue_start>username_0: I am new in ruby on rails and I want to write a simple test to check the login functionality of my system. I am following this official documentation <http://guides.rubyonrails.org/testing.html#integration-testing>
I run the command rails test:integration but this is showing this error
```
ra... |
2018/03/10 | 751 | 2,550 | <issue_start>username_0: I would like to redirect a content with a PHP function:
```
$content
```
in case of condition on my navbar
```
- [Information](#)
* Submenu\_1
* Submenu\_2
* Submenu\_3
`
```
I am trying with this navbar.php and bellow phpfunc.php
navbar.php
```
### INFORMATION
* [Information](#) ... |
2018/03/10 | 1,119 | 4,057 | <issue_start>username_0: I have a N-by-N matrix containing only zeroes and ones, and each column must only have one '1' in it. The elements below the diagonal must be zero (A[1][1], A[2][1], A[2][2], A[3][1], A[3][2], A[3][3] = 0). For example:
```
A = [[1, 0, 0, 1], [0, 1, 0, 0], [0, 0, 0, 0], [0, 0, 0, 1]]
```
I n... |
2018/03/10 | 617 | 2,332 | <issue_start>username_0: I know the procedure and also how to configure an automated docker hub from GitHub or BitBucket.
But what I have to do right now is to create two docker hub repositories called `Test/main` and `Test/depend`.
The first repository `Test/main` is connected with GitHub and whenever there is a n... |
2018/03/10 | 1,180 | 4,644 | <issue_start>username_0: Because **'Extensions may not contain stored properties'** I've seen people getting around this by using getter / setter with `objc_getAssociatedObject` / `objc_setAssociatedObject`
(See) [How to have stored properties in Swift, the same way I had on Objective-C?](https://stackoverflow.com/que... |
2018/03/10 | 2,297 | 8,771 | <issue_start>username_0: I'm working on unittesting some python3 code that calls sendmail on an `SMTP` class via a context manager and attempts to catch exceptions to log them. I can successfully mock the `SMTP` class and do some checking on it in other tests (e.g. verifying that `send_message` was actually called), bu... |
2018/03/10 | 1,927 | 6,931 | <issue_start>username_0: ```
Sheet1
ID First Last Street City State Zip
--- ----- ------ ----------------- ---------- ----- -----
51 <NAME> 636 Charla Lane Richardson TX 75081
52 <NAME> 4956 Center Street Umatilla OR 97882
53 <NAME> 3149 W... |
2018/03/10 | 652 | 2,671 | <issue_start>username_0: I mock a static function of a class in a test but i will effect on other test. because of nature of static function, the code is:
```
test('A', async () => {
expect.assertions(2);
let mockRemoveInstance = jest.fn(() => true);
let mockGetInstance = jest.fn(() => true);
User.re... |
2018/03/10 | 829 | 2,466 | <issue_start>username_0: I have installed angular **cli 1.5** from the command below:
```
C:\ANGULAR-WORKBENCH>npm install --global @angular/cli@1.5.0
```
after completion of installation the following lines were displayed on terminal
```
+ @angular/cli@1.5.0
added 115 packages and updated 1 package in 105.694s
... |
2018/03/10 | 770 | 2,785 | <issue_start>username_0: This is the full error i am getting, I do have the moc file in my build folder
I am trying to debug and this message apears
```
Debugging starts
QObject::connect: No such slot MainWindow::numberClicked(QString buttonInput) in ..\calculator\mainwindow.cpp:14
QObject::connect: (sender ... |
2018/03/10 | 602 | 2,545 | <issue_start>username_0: I'm using blob to download files, Problem is I want to keep Object URL even after downloading the file, without making major changes in code base.
So one of the option is not to call `URL.revokeObjectURL();`
Is it safe to depend on browser's garbage collector to avoid any memory leak?
Do I ... |
2018/03/10 | 364 | 1,445 | <issue_start>username_0: I'm fairly new to Spring boot.
I'm currently writing a small microservice which will bulk load data from a CSV file into a MySQL database table. I understand that there are many ways to achieve this, but one of the ways I was thinking was to use the MySQL `LOAD DATA FILE` command to parse the ... |
2018/03/10 | 1,899 | 6,161 | <issue_start>username_0: This is my code!
My tensorflow version is 1.6.0, python version is 3.6.4.
If I direct use dataset to read csv file, I can train and no wrong. But I convert csv file to tfrecords file, it's wrong. I google it in Internet and almost people say tensorflow should be updated, but it don't work for m... |
2018/03/10 | 520 | 2,002 | <issue_start>username_0: I've been trying to get the data that I need from Facebook's graph api explorer but unfortunately, cant pass the fields necessary in URL via C#.
Here's what I've tried so far
```
using (var client = new HttpClient())
{
client.BaseAddress = new Uri("https://graph.f... |
2018/03/10 | 443 | 1,709 | <issue_start>username_0: Spring boot has option to increase number of threads of underlying embedded server (`server.tomcat.max-threads`).
When its deployed through kubernetes there is also an option to increase number of replicas (`kubectl scale`).
If the kubernetes cluster is deployed on a cloud (say gcp) there is ... |
2018/03/10 | 621 | 2,028 | <issue_start>username_0: This is my code and i basically want to add CHANGEBUTTONS to the on click event that looks like @click.
```
Delete from favorites
new Vue({
el:'#app',
data:{
show: true,
paletteid : <?=$palette\_id;?>,
action: "add",
action2: "delete",
number: ""
},
methods: {
enviarform: function()... |
2018/03/10 | 612 | 2,164 | <issue_start>username_0: I have tried to build project in `gradle` with 3 modules, where:
1) `module1` - common module with `expect` classes
*empty build.gradle dependencies*
2) `module2` - common module with `expect` classes and with dependency from module 1:
build.gradle dependencies: `compile project... |
2018/03/10 | 480 | 1,726 | <issue_start>username_0: I want to build a Slack bot that can answer support queries. I've designed the conversation in Watson Conversation, but now I want to deploy it to Slack channels.
Ideally I don't want to have to develop and host an application to broker messages between the two systems.
Is there any platform ... |
2018/03/10 | 871 | 3,117 | <issue_start>username_0: I have three buttons in one "line".
A - B --- C
I have programatically added these constraints:
A has constraints:
```
leading to superview (value = 16)
width (value = 49)
height (value = 40)
trailing to B (value = 16)
top to top layout guide (value = 16)
```
B has constraints:
```
width... |
2018/03/10 | 399 | 1,447 | <issue_start>username_0: I have a number in a database (e.g 12) and I want to display that number in the dropdown list on a webform, however, not the number itself but a range of numbers from 1 to 12 (so 1,2,3....12). Is there a property I can use or a way to get a list of numbers from SQL Statement?
1. Read the Numb... |
2018/03/10 | 902 | 2,496 | <issue_start>username_0: I want to set an image centre of div & just next it want to set a new image in the same line. I don't want to set it in next line.
I have tried below code it set first image in centre but not other image next to it. It put image in next line.
```css
div {
margin: 0 auto;
overflow: auto;... |
2018/03/10 | 998 | 2,815 | <issue_start>username_0: I have tried to create two foreign keys within the one table but I get the following error message : #1215 - Cannot add foreign key constraint
Here is my sql query:
```
CREATE TABLE `files` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`users_id` int(12) unsigned NOT NULL,
`users_name` var... |
2018/03/10 | 602 | 2,168 | <issue_start>username_0: Just started working with typescript. Unfortunately when I try to build for production it fails.
Firstly I run
`tsc`
This passes without any error, but when I try to run the build file I get import errors
`node build/index.js`
The error I get is below:
```
[0] (function (exports, require,... |
2018/03/10 | 874 | 2,975 | <issue_start>username_0: Update: I am sorry that I wasn't clear about my case. The content script is not literally content script but a js file embedded into the page via the `createElement` method.
It's something like:
```
// this is "content.js"
var scriptElement = document.createElement('script');
scriptElement.sr... |
2018/03/10 | 677 | 2,245 | <issue_start>username_0: I have a RelativeLayout and inside this layout i have fab button:
```
```
Now , in java I want to now, where is the fab position on the screen.I used this method according this post : [enter link description here](https://stackoverflow.com/questions/7203740/retrieve-the-x-y-coordinates-of-a-... |
2018/03/10 | 446 | 1,784 | <issue_start>username_0: I am trying to save some data from the Mapper to the Job/Main so that I can use it in other jobs.
I tried to use a static variable in my main class (that contains the main function) but when the Mapper adds data to the static variable and I try to print the variable when the job is done I fin... |
2018/03/10 | 470 | 1,882 | <issue_start>username_0: I have following code, and what I am doing here is adding an inline style for background-color, and its working fine as well, but what my requirement is, when I mouseover on the div `containerLink` it should remove the inline style which I have added using the following and when mouseout, it sh... |
2018/03/10 | 862 | 2,323 | <issue_start>username_0: There was a problem in the simplest example of linear regression. At the output, the coefficients are zero, what do I do wrong? Thanks for the help.
```
import sklearn.linear_model as lm
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
x = [25,50,75,100]
y = [10.5,17,23.... |
2018/03/10 | 845 | 2,580 | <issue_start>username_0: I want to get info about commissions on Binance. Especially about trading commissions (exchange operations, for example I want to buy ETH and pay by BTC). I've looked over all binance git: <https://github.com/binance-exchange> and found nothing about that.
The closest what I found is account i... |
2018/03/10 | 1,159 | 3,641 | <issue_start>username_0: I have a div with unknown width and height, this div is one of the children of a bigger div.
```css
#myDiv {
/* Blah blah blah */
}
#inner {
position: absolute;
width: 100%;
height: 100%;
}
```
```html
```
But the problem is that the `#inner` div doesn't fit properly, it's ... |
2018/03/10 | 1,439 | 4,745 | <issue_start>username_0: ```
import java.util.Scanner;
public class Exercise1{
public static void main(String args[]){
int i=1,mark,totalmarks=0,highestmark=0;
Scanner input = new Scanner(System.in);
do{
System.out.print("Please enter the mark of student " + i + ":");
mark = input.nextInt... |
2018/03/10 | 1,389 | 4,387 | <issue_start>username_0: Hi I would like to get the index number when the user taps on the annotation. I have the following code..
```
class ShopLocation: NSObject, MKAnnotation{
var identifier = "Shop location"
var title: String?
var subtitle: String?
var coordinate: CLLocationCoordinate2D
init(name:String,... |
2018/03/10 | 1,024 | 3,445 | <issue_start>username_0: I have a template class in my header file, I also need a .hpp file for the function implementation.
The issue is with VS Code or MinGW.
In VS Code:
* I installed the C/C++ extension by Microsoft
* Here is my c\_cpp\_properties.json file:
```
{
"configurations": [
{
"name": "Win3... |
2018/03/10 | 516 | 2,200 | <issue_start>username_0: I am new to hyperledger and bit confused about hyperledger composer & nodejs api.
I saw using composer we can create assets, transactions, participants and chaincode and in last we have to archive it this all into .bna file and finally we deploy this chaincode into network using admin card
But... |
2018/03/10 | 606 | 2,400 | <issue_start>username_0: I wrote this if block but am not fully satisfied with it. Is there a way to further reduce the lines and still be readable leveraging ES6 or ES7?
```
export default function validation(str, props) {
const {
length, minLength, maxLength, required,
} = props;
if ((required && str.len... |
2018/03/10 | 626 | 2,359 | <issue_start>username_0: Maybe this is a duplicate, but I could find the similar question.
For example we have and we have a `var studentObj = {...}`. Can I assign `studentObj` to input `data-student` attribute? Will it contradict the standards?<issue_comment>username_1: Sure will! HTML doesn't accept a data type of... |
2018/03/10 | 1,845 | 5,635 | <issue_start>username_0: I have 10 greyscale brain MRI scans from [BrainWeb](http://brainweb.bic.mni.mcgill.ca/brainweb/). They are stored as a 4d numpy array, `brains`, with shape `(10, 181, 217, 181)`. Each of the 10 brains is made up of 181 slices along the z-plane (going through the top of the head to the neck) whe... |
2018/03/10 | 521 | 2,136 | <issue_start>username_0: I found an implementation of the LZW algorithm and I was wondering how can I represent its output, which is an int list, to a byte array.
I had tried with one byte but in case of long inputs the dictionary has more than 256 entries and thus I cannot convert.
Then I tried to add an extra byte ... |
2018/03/10 | 1,547 | 4,329 | <issue_start>username_0: I am new to Github. I have uploaded my Django app to Github that I will be using on Heroku.
I successfully added files and folders on the web interface of Github but realized that I incorrectly uploaded folders.
I cloned my github repo on my local machine. I have a sub-folder that I want to ... |
2018/03/10 | 753 | 2,510 | <issue_start>username_0: I am getting the above error when running the following code in my express app. When I go to localhost:3000/cards.
This is in my cards.js file.
```
const express = require('express');
const router = express.Router();
const { data } = require('../data/flashcardData.json');
const { cards } = da... |
2018/03/10 | 1,885 | 8,001 | <issue_start>username_0: I am trying to create a Spring boot application with JFrame. I can see my beans in applicationContext but they are not getting autowired. I am unable to find the reason for this issue. Can someone help me with this?
Here is the code:
JavauiApplication - ***it is showing both userManager and ... |
2018/03/10 | 1,698 | 3,115 | <issue_start>username_0: say n = 4:
then i want to generate the following matrix:
```
1 0 0 0 1 0 0 1 1 0 1 1
0 1 0 0 1 1 0 0 1 1 0 1
0 0 1 0 0 1 1 0 1 1 1 0
0 0 0 1 0 0 1 1 0 1 1 1
```
which you can get by appending 3 matrices, (A0, A1, A2) horizontaly
if I'=
```
0 0 0 1
1 0 0 0
0 1 0 0
0 0 1 0
```
the... |
2018/03/10 | 357 | 1,472 | <issue_start>username_0: I'm currently trying to share data between my two fragments with the help of a view model [Android ViewModels](https://developer.android.com/topic/libraries/architecture/viewmodel.html#implement).
In the this article they use "ViewModelProviders.of(getActivity()).get(SharedViewModel.class);" ... |
2018/03/10 | 975 | 2,451 | <issue_start>username_0: ths is probably a dumb question... I'm working with some data that is generated, line by line, after an iteration and I'd like to store the result for further processing in a multiline string. As an example, let me show you this:
```
is_string = """"""""
for i in range(1, 101):
is_string +... |
2018/03/10 | 573 | 1,637 | <issue_start>username_0: How can I remove new lines using **Perl** and / or Sed at the bash command line but avoiding a specific set of characters?
The closest I came from this is:
```
perl -C -i -p -e 's/[^.:]\n//' ~/Desktop/bak2
```
The above code is working well on avoid removing lines ended with a dot or a colo... |
2018/03/10 | 575 | 1,643 | <issue_start>username_0: I am trying to display a div (.mydiv3) when another is hovered, but the div I want to display...
```css
.mydiv1, .mydiv2, .mydiv3 {
display:none;
}
.trigger {
text-align:center;
padding:10px;
color:teal;
}
.trigger:hover{
background:red;
}
```
```html
Hover Trigger
... |
2018/03/10 | 461 | 1,338 | <issue_start>username_0: What is the return type of `driver.findelement`
and what is the return type of `driver.getwindowhandles()`?<issue_comment>username_1: You can use `~` in CSS to get the desired result. Check the snippet.
```css
.mydiv1, .mydiv2, .mydiv3 {
display:none;
}
.trigger {
text-align:center;
... |
2018/03/10 | 521 | 2,039 | <issue_start>username_0: I created a simple C program a while ago. It's a simple command-line generator that takes some number, prints the results and stops. I always ran it in the editor's command line enviroment that automatically paused after the program ran, so I omitted adding a `getchar()` at the end.
I now reg... |
2018/03/10 | 905 | 3,335 | <issue_start>username_0: How to implement DRY in express's controller? I found I have repeated code for catch function.
```
exports.getUsers = (req, res) => {
Ad.find({})
.then(data=>{
res.json({status:1, data})
})
.catch(err => {
res.status(400).send({
msg: err
})
})
}
exports.ge... |
2018/03/10 | 837 | 3,055 | <issue_start>username_0: i have problem with compile less file.
In grunt config file themes.js i added
```
: {
area: 'frontend',
name: '/',
locale: 'de\_DE',
files: [
'css/styles-m',
'css/styles-l'
],
dsl: 'less'
}
```
and when i use commend
```
grunt less:
```
i get
```
Destination pub/static/fronten... |
2018/03/10 | 341 | 1,194 | <issue_start>username_0: I cannot link my Logic App to the Integration Account as described here: <https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-enterprise-integration-create-integration-account>.
In the Logic App View under Settings i cannot find Integration Account:
[My Logic App](https://i.stack.img... |
2018/03/10 | 2,124 | 3,890 | <issue_start>username_0: I have a dataframe as given below:
```
vdate=c("12-04-2015","13-04-2015","14-04-2015","15-04-2015","12-05-2015","13-05-2015","14-05-2015"
,"15-05-2015","12-06-2015","13-06-2015","14-06-2015","15-06-2015")
month=c(4,4,4,4,5,5,5,5,6,6,6,6)
col1=c(12,12.4,14.3,3,5.3,1.8,7.6,4.5,7.6,10.7,12,15... |
2018/03/10 | 1,973 | 3,242 | <issue_start>username_0: Below is my input dataframe:
```
ID RID PID check_in check_out
10000 1 1 18-07-2014 9.30 19-07-2014 9.30
10000 2 2 21-07-2014 9.30 22-07-2014 9.30
10000 3 2 23-10-2012 9.30 07-02-2013 9.30
10000 4 1 25-09-2012 9.30 30-09-2012 9.30
```
I am trying to get... |
2018/03/10 | 342 | 1,113 | <issue_start>username_0: I feel like this should be easy, but I can't figure it out ..
Let's say I have two tables
```
x y
1 1 2
2 2 3
3 3 4
```
and
```
x y
1 4 2
2 16 1
3 5 1
4 5 3
```
and I want to find the difference between the row counts (so 4-3 here).
I tried
```
ALTER TABLE table1 ADD COLUMN TB... |
2018/03/10 | 902 | 3,106 | <issue_start>username_0: I've recently watched a Python tutorial in which the author kept juggling various Python string formatting expressions and I was struck by a thought:
*Why are there so many string formatting flavours in Python?*
* There's the C language `printf` based approach (which, by the way, in various s... |
2018/03/10 | 842 | 2,798 | <issue_start>username_0: I wonder if Is it posible filter by post title OR custom taxonomy.
For example: I search 'human', I want to show the posts that contain the word 'human' in the post title and the category 'human'.
-No exclude posts if 'human' category not exists and there are posts with the title 'human'
-N... |
2018/03/10 | 1,479 | 5,485 | <issue_start>username_0: I'm console.log this and it's look perfectly.
This is logger picture: <https://i.stack.imgur.com/PSRhV.jpg>
Like it show something like this initialState-->case 1 --> case 2
```
renderCoinCards() {
const { crypto } = this.props;
console.log('Crypto.data : '+crypto.data+' , '+'... |
2018/03/10 | 706 | 2,303 | <issue_start>username_0: Why my dict does not update? Isn't DictProxy's purpose to work with cases like this ?
```
from multiprocessing import Pool, Manager
def func(logtree):
logtree['x'] = 'x'
def main():
manager = Manager()
logtrees = manager.dict()
logtrees['a'] = {}
logtrees['b'] = {}
l... |
2018/03/10 | 678 | 1,869 | <issue_start>username_0: How to initialize a vector of size 26 by English Alphabet?<issue_comment>username_1: Yes you can. You can easily do this with `std::iota` and the ASCII character sequencing starting at letter `A`.
```
#include
#include
#include
int main()
{
std::vector alphabet(26);
std::iota(alphabet.be... |
2018/03/10 | 733 | 2,182 | <issue_start>username_0: **code show below:**
```
var data = make([]map[string]interface{}, 0)
var area = make(map[string]interface{})
maps_temp := []map[string]interface{}{{"id":1, "value":"a"},{"id":2, "value":"b"},{"id":3, "value":"c"}}
for _, value := range maps_temp {
area["id"] = value["id"]
area["... |
2018/03/10 | 1,084 | 4,065 | <issue_start>username_0: How can I convert a big decimal integer to a byte array.
```
var number = "969837669069837851043825067021609343597253227631794160042862620526559";
```
Note that I can't use `BigInteger` because I'm using Unity under .NET 3.5.<issue_comment>username_1: I, personally, would use `BigInteger`. Y... |
2018/03/10 | 651 | 2,438 | <issue_start>username_0: I just want to add a progress bar to my page and I cannot even get it to display! I stripped the website down to a bare minimum to try to isolate what could but can't figure it out! I was thinking it was my custom css file I created, but I removed it and the issue persisted.
```html
STEMuli... |
2018/03/10 | 3,616 | 12,174 | <issue_start>username_0: I have a table
```
items
id int unsigned auto_increment primary key,
name varchar(255)
price DECIMAL(6,2)
```
I want to get at least 30 random items from this table where the total sum of price equals 500, what's the best approach to accomplish this?
I have seen this solution which looks h... |
2018/03/10 | 560 | 1,921 | <issue_start>username_0: I cannot find solution of such problem. I need that $sql variable shows all values except the specified values as username != $var2 array values.
```
$user_data = user_data($session_user_id, 'user_id', 'username', 'blocked_emails');
$var = $user_data['blocked_emails'];
$var2 = ex... |
2018/03/10 | 465 | 1,353 | <issue_start>username_0: ```
Array
(
[123] => Array
(
[shipment_id] => 123456
)
)
```
I need the value from shipment\_id, but I don't always know the array name '123' since it's different for each shipment.
I'm trying:
```
$array = $order->get_meta('_shipments');
echo $array[123]['shipment_id']; <- ... |
2018/03/10 | 461 | 1,285 | <issue_start>username_0: from nested dictionary create directory in python:
```
{1: {'name': 'John', 'age': '27', 'sex': 'Male'},
2: {'name': 'Marie', 'age': '22', 'sex': 'Female'}}
```
In simple dictionary ;
i just want directoires like,
```
1/name
1/age
1/sex
2/name
2/age
2/sex
```
How to attain it ?... |
2018/03/10 | 819 | 3,016 | <issue_start>username_0: im practicing adding elements in array and i did add a while loop to prevent adding if the array has already existing elements and must input a different character from the array. the problem is that in my example, i input a character 'a' and then 'b' after 'b' i tried to input 'a' again and it... |
2018/03/10 | 830 | 2,864 | <issue_start>username_0: I am trying to use the weatherunderground api to display weather information.
When running my code I get the following message.
>
> TypeError: undefined is not an object (evaluating
> 'parsed\_json['location']['city']')
>
>
>
I'm not sure why this is or how to fix this. I am new to Java... |
2018/03/10 | 1,448 | 4,377 | <issue_start>username_0: I'm creating an program for my Graduation exercise and I'm stuck with the `Else Error`.
When I set off the line marked with `#` no problem appears.
I'm currently using [repl.it](https://repl.it/) to program it and that's the code below
Error message:
```
Traceback (most recent call last):
... |
2018/03/10 | 801 | 2,614 | <issue_start>username_0: How do I create a loop for naming label widget. I do not know how to set the widget name as a variable.
```
from tkinter import *
def dofunc():
v1.set("one")
v2.set("two")
v3.set("three")
widget4.config(text="four")
v1=StringVar()
widget1=Label(root,width=10,textvariable=v1)
... |
2018/03/10 | 1,454 | 5,442 | <issue_start>username_0: i made an app with MDCTabBar and it look perfect but i don't know how to setup childView with it
what i already done is :
```
let Tab = MDCTabBar()
Tab.items = [some items]
Tab.itemAppearance = .titles
Tab.autoresizingMask = [.flexibleWidth, .flexibleBottomMargin, .flexibleTopMargin]
Tab... |
2018/03/10 | 1,350 | 4,503 | <issue_start>username_0: My market API service discontinued the call I was using to grab data into my C# application. They have since released a "batch quote" feature that could actually save lot of work in my application. It returns the data in JSON. I'm using Newtonsoft to parse my old API call, which returns a very ... |
2018/03/10 | 971 | 3,084 | <issue_start>username_0: I have taken 2 div: When I hover to .box1, .box2 will move from bottom to top; when I don't, .box2 will be invisible immediately, but I want .box2 moving slowly from the top to bottom then invisible, how can I do that?
```css
.box1 {
width: 200px;
height: 200px;
backgroun... |
2018/03/10 | 408 | 1,147 | <issue_start>username_0: I have a list which is holding names as below
```
d=[['Srini'], ['Rahul'], ['Mano'], ['Rahul'], ['Srini'], ['Mano], ['Srini'], ['Rahul']]
```
I am using the below code to convert the list to dictionary which should hold names as Keys and the count of names as value.
```
dic={}
for words in ... |
2018/03/10 | 1,463 | 4,911 | <issue_start>username_0: I have a problem I've been struggling with for a long while now. I'm trying to build a repeated table design where I have two rows with key value pairs and then another row with a single column which should span across both the above columns. Like this:
Key: Value
Key: Value
Comment
Key: Va... |
2018/03/10 | 960 | 3,312 | <issue_start>username_0: This is my code for FCFS CPU scheduling algorithm. When I replace j=1 then the output changes.
```
#include
#include
#include
main()
{
char pn[10][10],t[10];
int arr[10],bur[10],star[10],finish[10],tat[10],wt[10],i,j,n,temp;
int totwt=0,tottat=0;
//clrscr();
printf("Enter the number of pro... |
2018/03/10 | 1,389 | 3,234 | <issue_start>username_0: I need to get the values of all the neighbors around an element in a matrix in python. Suppose I have a matrix like below,
```py
matrix=[
[1, 2, 3, 4],
[5, 6, 7, 8],
[9,10,11,12]
]
```
For the first element i.e., `matrix[0][0]`, the neighbors are `[2,5,6]`.
For `matrix[0][1]`, t... |
2018/03/10 | 415 | 1,551 | <issue_start>username_0: I need to know if it's possible to create a UI for my Python application. I created a very simple programm that you can see ***[here](https://github.com/feRpicoral/Biologia)*** and i would like to create a UI, so the user can use it like a "real program", not only in CMD/Python Shell.
And anot... |
2018/03/10 | 473 | 2,055 | <issue_start>username_0: I wonder in swift and xcode: how do I delete photos added in specific albums but not in others. For example photos added in camera rolls but not in other albums? I know in principle, apple make it only a reference link of the same photo in camera rolls in other album, so if delete in one, you w... |
2018/03/10 | 427 | 1,893 | <issue_start>username_0: I am having dataset which contains categorical attribute state which can take New York, California and Florida.
* After encoding these values in dummy variables why we need to drop
one variable?
* Can someone explain me what is dummy variable trap
situation in linear regression.
* Why we need... |
2018/03/10 | 1,586 | 4,566 | <issue_start>username_0: Consider below is my data frame and I want to populate Percentage column by dividing individual marks with Total to get the percentage.
```
Name Marks
0 Total 100
1 Name1 45
2 Name2 65
3 name3 93
4 name4 89
```
I have written the code like this
```
for i in rang... |
2018/03/10 | 697 | 2,621 | <issue_start>username_0: I have a get request that returns a whole HTML page and
I want to get a specific information from that page that is under one of the many 'td' tags. The tags are simple and dont have any classes or ids.
```
axios.get("https://example.com")
.then(res =>{
console.log(res.data.body) /... |
2018/03/10 | 438 | 1,490 | <issue_start>username_0: Please tell me, how to run another programs (for example: Skype, notepad, imagemagik, etc.) in python, receive from them need data and work with them?
Also, please, answer me: why such programs as Skype, notepad run in python, but another, such as MicrosoftWord, Excel don't run?
Thank You.<issu... |