date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/02/25
397
1,428
<issue_start>username_0: I installed Ubuntu terminal as now Windows 10 supports it. I built the Nuttx RTOS using the terminal but in Ubuntu I cannot access USB devices except for a pen drive. How can I flash the bin file to stm32f4developer?<issue_comment>username_1: You can use windows tools. All of the files in the...
2018/02/25
699
2,327
<issue_start>username_0: I am trying to get selected columns from a table using hibernate criteria query ``` Criteria cr = session.createCriteria(OfferCashbackMaster.class) .setProjection(Projections.projectionList() .add(Projections.property("txnType"), "txnType") .add(Projections.property("off_Discri...
2018/02/25
659
2,177
<issue_start>username_0: setTimeout does not work on the page. I cannot find the error. the console does not display any. Here is my JQuery ``` var timer; function sliderColorMain(){ $('.news-main').mouseenter(function(){ timer = setTimeout(function(){ $(this).find('.sliding-color').slideDown(500); }...
2018/02/25
1,461
3,955
<issue_start>username_0: ``` A B 0 2002-01-16 0 1 2002-01-16 4 2 2002-01-16 -2 3 2002-01-16 11 4 2002-01-16 12 5 2002-01-17 0 6 2002-01-17 -18 7 2002-01-17 16 8 2002-01-18 0 9 2002-01-18 -1 10 2002-01-18 4 results = {} g...
2018/02/25
641
2,452
<issue_start>username_0: I try to get custom-extension static files from my web-server (asp.net core 2.0). I try to run next: ``` public class Startup { public Startup(IConfiguration configuration) { Configuration = configuration; } public IConfiguration Configuration { get; } public vo...
2018/02/25
513
2,006
<issue_start>username_0: I have one form but because of the design I can't use the same button on the mobile and web. I created two buttons, one is hidden on the mobile, one on desktop. However, one of them does not work. Is there a way to have two submit buttons that do the exact same thing? I found lots of examples ...
2018/02/25
192
686
<issue_start>username_0: I have written the following code to print the list in descending order in terms of index position. ``` ``` But somehow, it is only printing the data in ascending order only in terms of index. Is there anything missing here?<issue_comment>username_1: You got to use the `reverse` parameter in...
2018/02/25
1,174
4,608
<issue_start>username_0: Quite new to programming in Swift, what is the reason to my error and how can I fix it? Many thanks. ``` import UIKit import Photos class PhotosViewController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource , UICollectionViewDelegateFlowLayout, UIImagePickerController...
2018/02/25
968
3,284
<issue_start>username_0: I have the following code: ``` #include int main() { long long int x = 4294967296; long long int y = 2^32; // 4294967296 printf("%lld \n", x); printf("%lld \n", y); } ``` It outputs: ``` 4294967296 34 ``` This is a contrived example but how can I force an arithmetic expression to a ...
2018/02/25
950
3,398
<issue_start>username_0: I am an experienced `c` programmer trying to come to terms with `Python`. `location` is `tuple` and I can print with the following ``` print(" %s %s" % (date_time, model)) print("Lat: %-.4f, Lon: %-.4f" % (location)) ``` I tried to combine this into a single print, but get error `TypeError:...
2018/02/25
862
3,127
<issue_start>username_0: I'm writing a docker script and therefore I cannot rely on bash scripts. I need the docker script to fail if the sha256sum of a downloaded file (though wget) hash is incorrect. I see that there exists a check option in sha256sum, but I can't find how to use it. It's something like `sha256sum -...
2018/02/25
564
1,387
<issue_start>username_0: If I have: ``` mylist <- lapply(1:10, function(x) matrix(NA, nrow=2, ncol=2)) ``` And I want to replace, for example, the first, second and fifth element in the list with a: ``` mymatrix=cbind(c(1,1),c(1,1)) ``` What can I do? I tried with: ``` mylist[c(1,2,5)]=mymatrix ``` But I can't...
2018/02/25
448
1,165
<issue_start>username_0: I'd need to create Divs from the position where I click on the page that move from left to right. Is there a way to change constantly the position where I can start the animation? instead of having a fixed left and a fixed right? I was using keyframes with CSS.<issue_comment>username_1: Would t...
2018/02/25
723
2,389
<issue_start>username_0: I have five images, I try to change the source of any of them when the mouse is on it, the problem is that only first image will change when I hover it but the other not, How can I solve it ``` var img1 = document.querySelector("#image1"); var img2 = document.querySelector("#image2"); var img3...
2018/02/25
1,252
4,148
<issue_start>username_0: Instead of uploading the precompiled dist directory, I want to compile src at server side instead. Here are my scripts inside package.json: ``` "scripts": { "test": "echo \"No test specified\" && exit 0", "start": "node dist/app.js", "postinstall": "tsc" } ``` Here are the dep...
2018/02/25
562
2,147
<issue_start>username_0: Fairly new to Python with a question regarding class instances. I have something like ``` class Headers: def login_headers(self): return { 'origin': 'address.com', 'accept-encodig': 'gzip, deflate, br', 'more': '...' } ``` In my main file I'm importing `from heade...
2018/02/25
516
1,915
<issue_start>username_0: I am using the default Django authentication system. In my urls, I have : ``` urlpatterns = [ ... path('', include('django.contrib.auth.urls')), ... ] ``` Now I have a custom decorator that I want to apply on the login view, similar to how I have applied it on signup. ``` @examp...
2018/02/25
1,599
4,798
<issue_start>username_0: I have a ListModel and a repeater. The repeater draws the Items from the ListModel, one on top of a another. That works fine so far. Except that for on each application start I want to have a different draw order. So i guess it would be best, to "shuffle" the ListElements in the ListModel b...
2018/02/25
517
1,764
<issue_start>username_0: sorry for the short question, I just don't know even how to ask google this question. (maybe because of my bad English) this is example picture what I want to do, I want my software to be like all the icons there... [![this is example picture what I want to do, I want my software to be like a...
2018/02/25
839
2,523
<issue_start>username_0: I have two columns in SQL Server. I have a SQL bulk insert and it stores date in following format inside the database: 1. The first column type is `DATETIME` - it stores dates in this format: `2018-07-02 00:00:00.000` 2. The second column type is `DATE` and it stores this format: `2018-07-02` ...
2018/02/25
703
2,274
<issue_start>username_0: Clicking the buttons 'hi' and 'helo' must change the content of `'.admin-text'` to the respective text according to the plan, but it simply changes it to `'undefined'`. ```js var admin_text = document.querySelector('.admin-text'); var infra_btns = [document.getElementById('hi'), document.get...
2018/02/25
2,048
6,642
<issue_start>username_0: I have been working on a D&D Character creator app to learn a bit of NodeJS. The following code was working fine until I created a few new unrelated functions in a separate file yesterday (dice.js). Now when running `node app.js newCharacter` from the command line I get the following `TypeErro...
2018/02/25
361
1,270
<issue_start>username_0: I'm learning python but I'm not good at and I didn't find enough information about the class structure. İ want to add items array by the user but I didn't it. can you help me? ``` class Student(): def __init__(self, no,name,departmant): self.no=no self.name=name ...
2018/02/25
895
1,914
<issue_start>username_0: I would like to convert the following dictionary: ``` {'Stockholm': ['235', '35'], 'Helsinki': ['285', '15'], 'Copenhagen': ['180', '60'], 'Berlin': ['185', '85'], 'Prague': ['190', '115'], 'Warsaw': ['260', '105'], 'Moscow': ['370', '80'], 'Sofia': ['275', '170'], 'Ankara': ['340', '190']...
2018/02/25
854
2,839
<issue_start>username_0: I found this nodejs package and I have working code with correct results. But, I don't know how to pass these results to other functions. What I want is: get some info from web page, store it in variable, pass to onesignal function and send onesignal notification (I'm using onesignal-node packa...
2018/02/25
450
1,424
<issue_start>username_0: How can I move files from current folder to previous folder ? for example, if I am in folder the contain file with name `f.txt` and I want to move it to the previous folder, how can I do it? I tried something like that, but it's not working: ``` mov f.txt ./ ```<issue_comment>username_1:...
2018/02/25
453
1,685
<issue_start>username_0: I am using django rest framework for authentication. ``` 'DEFAULT_AUTHENTICATION_CLASSES': ( 'rest_framework.authentication.SessionAuthentication', 'rest_framework.authentication.BasicAuthentication' ), ``` But in my register function: ``` class UserRegister(APIView): ...
2018/02/25
473
1,650
<issue_start>username_0: I want to create a simple program that has two loops and I can change between them by pressing a physical button, like a mode selector. MODE 1: Heating MODE 2: Cooling ``` import RPi.GPIO as GPIO import time GPIO.setup(21, GPIO.IN, pull_up_down=GPIO.PUD_UP) mode = 'heating' def my_callb...
2018/02/25
883
3,604
<issue_start>username_0: This may seem like a simple question, but I am stumped: I have created a database about cars (in Oracle SQL developer). I have amongst other tables a table called: *Manufacturer* and a table called *Parentcompany*. Since some manufacturers are owned by bigger corporations, I will also show the...
2018/02/25
1,993
5,208
<issue_start>username_0: I'm trying to export my Network Admin card from the Playground UI, but the export icon is disabled. In addition, I see the following error in my Chrome console: Error: The current identity, with the name 'admin' and the identifier '<KEY>', must be activated. How do I export the Network Admin ...
2018/02/25
2,372
6,720
<issue_start>username_0: I have a task to ask user for input (user's name) and then to print a rhombus pattern out of it. For example: If user's name is Thomas, then the output should be like this: ``` T Th Tho Thom Thoma Thomas homas omas mas as s ``` This is my code so far. I am having trouble with ...
2018/02/25
2,386
6,629
<issue_start>username_0: I am getting the following error while installing the Angular 4 cli. Error: ``` Microsoft Windows [Version 6.1.7600] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\User>node -v v8.9.4 C:\Users\User>npm -v 3.3.8 C:\Users\User>npm install -g @angular/cli npm ERR! Windo...
2018/02/25
335
1,287
<issue_start>username_0: Why can I not use a `TextCell` like this in a `ListView` item template? When I use it the rows render but they are empty. ``` ``` When using a `Label` I can see the text contents in each row: ``` ``` Is there anyway I can use the `TextCell` inside the list item template? I am trying to bu...
2018/02/25
1,766
6,991
<issue_start>username_0: I'm trying to use [`Win32_NTEventLogFile`](https://msdn.microsoft.com/en-us/library/aa394225(v=vs.85).aspx) WMI class to export the `Applications` branch of the Windows Event log, but filter it only for a specific source. (Otherwise the log contains too much unnecessary information.) So, just ...
2018/02/25
986
3,623
<issue_start>username_0: I know this example is quite contrived but I am still curious wether or not this can be considered a pure function: ``` const addAsync = (x, y) => new Promise((resolve, reject) => { setTimeout( () => resolve(x + y), Math.random() * 1000 ); }); ``` Every call to this f...
2018/02/25
1,713
6,084
<issue_start>username_0: I don't know how to start the question, but the main problem is that I can't make the 3 technologies work together: Electron + Typescript + Webpack I've encountered few boilerplates, but in them either the whole typescript is built with **tsc** (instead of Webpack), or only render-part is buil...
2018/02/25
1,667
6,568
<issue_start>username_0: I'm using [marmelroy/Zip framework](https://github.com/marmelroy/Zip) to zip/unzip files in my project, and [JGProgressHUD](https://github.com/JonasGessner/JGProgressHUD) to show the progress of the operation. I'm able to see the HUD if I try to show it from the ViewDidLoad method, but if I us...
2018/02/25
381
1,145
<issue_start>username_0: I have two SQL Server queries, and I need to display final output result in a C# gridview: ``` Select * From PayBack Where DATEDIFF(day, GetDate(), (Expirydate)) < 0 and DATEPART(yyyy, Expirydate) = '2018' and DATEPART(Month,Expirydate) = '02' Select Nomclient, Numero1, Numero2, Numer...
2018/02/25
542
2,090
<issue_start>username_0: I have been pushing and pulling files to and from my github repositories without problems for the last 4 years. Two days ago, I tried pulling from the repos with the same command i have been using ever since: `git pull origin master` but i keep getting the error **`"error: while accessing https...
2018/02/25
694
2,421
<issue_start>username_0: I'm trying to get an input when the user taps on a cell of a UITableView. That's my code: ``` import UIKit class TableView: UIViewController, UITableViewDataSource { public var data = Array>() func numberOfSections(in tableView: UITableView) -> Int { return 1 } func tableView(\_ ta...
2018/02/25
453
1,598
<issue_start>username_0: When I use correlation function in RstudioThis I get below error message: ![My error](https://i.stack.imgur.com/hcZsA.png) The dataset that I have imported is show below and V1,V2 are given by default to the columns: ![My dataset](https://i.stack.imgur.com/bRVEx.png)<issue_comment>username_...
2018/02/25
497
2,124
<issue_start>username_0: I am looking for any option like dynamic fields (Solr) in Vespa. I need to add new fields to the existing schema without redeployment of the whole application. Anything related to this is mentioned in documentation of Vespa <http://docs.vespa.ai/documentation/search-definitions.html#modify-se...
2018/02/25
736
2,745
<issue_start>username_0: I've been trying to redirect users to the "action" part of Web push coming from the backend (PHP). ``` return (new WebPushMessage) ->title('Title') ->icon('icon.png') ->body('Body Msg') ->action('Open Notification', 'open_notification') ->data(['id' ...
2018/02/25
2,022
7,681
<issue_start>username_0: I am solving an performance issue on PostgreSQL 9.6 dbo based system. Intro: 12yo system, similar to banking system, with most queried primary table called `transactions`. ``` CREATE TABLE jrn.transactions ( ID BIGSERIAL, type_id VARCHAR(200), account_id INT NOT NULL, date...
2018/02/25
872
2,420
<issue_start>username_0: If I have a string such as: "You id is (1) and your number is (0000000000)" What is the best way to extract these these strings into a list of strings. The numbers between the brackets can increase in digits thus searching for the strings between the brackets is a better technique. I can use...
2018/02/25
869
2,321
<issue_start>username_0: In Linux, I can change the creation date of a file using [touch](https://askubuntu.com/a/711243/55365): ``` touch -a -m -t 201512180130.09 file.txt ``` In Python, I can use the touch command to change the creation date, but I don't see any arguments to set it to a different date than the cur...
2018/02/25
510
1,641
<issue_start>username_0: I'd like to make a multi-purpose function accepting both integer, and array of integers, like how e.g. some Numpy function like [delete](https://docs.scipy.org/doc/numpy/reference/generated/numpy.delete.html#numpy.delete) does: ``` def foo(bar): # type(foo) can be integer or an array of inte...
2018/02/25
487
1,788
<issue_start>username_0: In my Asynctask's onPostExecute method ``` LinearLayout ll=(LinearLayout) findViewById(R.id.mylinlay); TextView tv=new TextView(Download_İmage.this); tv.setText("try"); ImageView tempimg=new ImageView(Download_İmage.this); Glide.with(getApplicationContext()).load("http://inthecheesefactory.co...
2018/02/25
903
3,778
<issue_start>username_0: I am just new to world of electronics. I was just looking about Raspberry Pi as I want to work on it, but a thing that I found that everyone is installing an OS first on the Raspberry Pi. I have worked upon **PICs(16f)** and **Arduino** board and it doesn't need that I just write a code and mak...
2018/02/25
581
2,128
<issue_start>username_0: I have json data that has a "product\_ref" field that can take these values as an example: ``` "product_ref": "N/A" "product_ref": "90323" "product_ref": "SN3005" "product_ref": "2015-05-23" ``` When pushing the data to the index i get a mapping error: ``` {"error":{"root_cause":[{"type":"i...
2018/02/25
1,083
5,141
<issue_start>username_0: I have the following `build.gradle` file for my package ``` buildscript { ext.kotlin_version = '1.2.21' repositories { jcenter() mavenCentral() } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbra...
2018/02/25
494
1,912
<issue_start>username_0: Google People API gapi.client.people.people.connections.list returns error 403 with error message **Request had insufficient authentication scopes** even though the initialization includes the required scope ``` gapi.client.init({ apiKey: '***masked***', discoveryDoc...
2018/02/25
1,074
3,718
<issue_start>username_0: I'm trying to model a relationship which can be reversed. For example, the reverse of North might be South. The reverse of Left might be Right. I'd like to use a case class to represent my relationships. I found a similar solution that uses case Objects here, but it's not quite what I want, [he...
2018/02/25
732
2,740
<issue_start>username_0: I am building a desktop app using electron. I want to keep the list of all the recent files opened, for this I am using jquery ajax. here is my code ``` // this function is expected to add a file entry to my json file this.add_recent_file = function(file_id, file_name, date_opened) { // Ex...
2018/02/25
781
2,499
<issue_start>username_0: I am requesting your advice about the following: I have two tables: Customers and Orders. I am printing the data of customers inside a table using a while loop: ``` $sql = "SELECT * FROM wccrm_customers where status = '1' order by date desc"; $result = mysql_query($sql, $db); while ($da...
2018/02/25
922
3,267
<issue_start>username_0: I have one table CONFIG\_PRAM which contains columns like `colname` , `datatype` and many more details of existing tables. Example ``` CREATE TABLE CONFIG_PRAM ( colname varchar(40), datatype varchar(40) ); ``` I have to compare those columns and datatype present in CONFIG\_PRAM ...
2018/02/25
860
2,872
<issue_start>username_0: How can I export my scraped data into a CSV file. My code below prints out all of the data correctly, but I would like to export it the same way to a CSV file, line by line. How can I write the data to a csv file? ``` import requests import json import csv with open('Links.csv', 'r') as csvf...
2018/02/25
806
2,441
<issue_start>username_0: I would like to order a column containing characters like this: ``` K3SG1-105-1051-1 ``` However, using the arrange function will result in this: ``` K3SG1-105-1051-1 K3SG1-105-1051-10 K3SG1-105-1051-100 K3SG1-105-1051-1000 ``` Instead of what I want: ``` K3SG1-105-1051-1 K3SG1-105...
2018/02/25
759
2,662
<issue_start>username_0: So on Left click it alerts the value `0` On right click it alerts the value `2`. Instead of alerts, I want on each button click to change the input value to the following: > > When left click the input clicked should show the value 0 > > > When right click the input clicked should show ...
2018/02/25
314
1,316
<issue_start>username_0: Is that possible to move a running application from a computer to another one that have an identical configuration? My problem is the following : I have a process on my computer that is running since 4 days and I want to restart the computer without loosing the 4 days work.<issue_comment>usern...
2018/02/25
1,474
4,395
<issue_start>username_0: I am trying to build a model to predict house prices. I have some features X (no. of bathrooms , etc.) and target Y (ranging around $300,000 to $800,000) I have used sklearn's Standard Scaler to standardize Y before fitting it to the model. Here is my Keras model: ```py def build_model(): ...
2018/02/25
2,026
5,745
<issue_start>username_0: I'm trying to send emails using PHPMailer and it works just fine on dev environment (locally - my private leptop) but doesn't work at all on production environment(Azure Host). This is the code I'm using: ```html require 'PHPMailer-master/PHPMailerAutoload.php'; $mail = new PHPMailer(true);...
2018/02/25
653
1,876
<issue_start>username_0: I am a bit new to Python and I am trying to parent objects in maya depending on their name. Example I have in scene "spineA\_jnt", "spineB\_jnt", "spineC\_jnt" and "spineA\_jb", "spineB\_jb", "spineC\_jb". How to select them all and parent "spineA\_jnt" to "spineA\_jb" and so on. Any tips would...
2018/02/25
372
1,556
<issue_start>username_0: Since the last 3 days I experience problems when connecting with externals tools to Git repos on VSTS. I use GitKraken and I always had to generate Git-credentials in VSTS and the use them. Everything worked fine. In the last days now GitKraken started to prompt for login data again. Using th...
2018/02/25
229
811
<issue_start>username_0: ```html <% if(!currentUser) %> <% { %> <%}%> <%else{%> <%}%> ``` This is the code, please help. Thanks in advance.<issue_comment>username_1: The tag before `else` has to be paired with the end tag of the previous. Otherwise the statements will e...
2018/02/25
808
2,906
<issue_start>username_0: Say I have this code: ``` export interface ImportedType { new (name: string); } export interface Extended { foo: (value: any) => any; } export function doSomething(Class: T & ImportedType): Extended { let name = Class.name; Class.foo = function \_for(value) { // do stuff }; return C...
2018/02/25
1,356
4,905
<issue_start>username_0: I participated in kickstart of google code jam contest and got stuck in problem 1A called Gbus count My code is passing the sample test case provided in the problem but when I submit the small input by outputting it to a file it gives me an error, incorrect response. Problem link - [https://co...
2018/02/25
720
2,395
<issue_start>username_0: again I need a bit of help from you people:-)! I want to sort data in \*ngFor by value "finished" [![enter image description here](https://i.stack.imgur.com/NEY1W.jpg)](https://i.stack.imgur.com/NEY1W.jpg) I get my data with : ``` this.db.list(`/avatars/`).valueChanges().subscribe(d => { ...
2018/02/25
506
1,735
<issue_start>username_0: Using `messaging.getToken()` triggers error in the console: > > messaging/incorrect-gcm-sender-id Please change your web app manifest's > > > But when I removing `messaging.getToken()` instruction, the error goes by.<issue_comment>username_1: You can use javascript built in sort function....
2018/02/25
575
2,207
<issue_start>username_0: 1. I made a custom collectionview cell in storyboard. 2. I added a button to collectionview cell, and set autolayout (0,0,0,0) to cell. 3. I made a custom collectionviewcell class. At this class, I set cell's contentview.translatesAutoresizingMaskIntoConstraints = false 4. Cell's button's autol...
2018/02/25
977
3,297
<issue_start>username_0: ``` Public DateRng As String Private Sub DateLookup() 'Dim ColCnt As Integer 'Prompt Date to look for DateRng = InputBox("Insert date in format dd/mm/yy", "User date", Format(Now(), "dd/mm/yy")) If IsDate(DateRng) Then DateRng = Format(CDate(DateRng), "dd/mm/yy") ColumnDateCheck ...
2018/02/25
952
3,448
<issue_start>username_0: I have game with chat panel, and I have two functions to send and repeat my messages. I want to stop my reapeat function on click "stop" button. I made someting like this, but in this way I crashed all my game session. Where I'm doing a mistake? ``` $("#start-spam").click(function () { v...
2018/02/25
2,260
6,684
<issue_start>username_0: Today I was trying to install ruby 2.5.0, but I am getting this error every time. **console output with the error I got** ```html rvm install ruby-2.5.0 Searching for binary rubies, this might take some time. No binary rubies available for: osx/10.13/x86_64/ruby-2.5.0. Continuing with compila...
2018/02/25
1,054
3,717
<issue_start>username_0: i would like to use SDWebImage to load tableview image stably, but it doesn't work, it keep start the previous image of the reuse cell before loading the correct images. ``` func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tabl...
2018/02/25
943
3,103
<issue_start>username_0: Have this class which is never used directly, only inherited: ``` class ApiBase {} ``` How do I define a generic static singleton `default` here? - So I can: ``` class FooApi: ApiBase {} // Want only one instance of `FooApi` class BarApi: ApiBase {} // Want only one instance of `BarApi` ...
2018/02/25
837
2,652
<issue_start>username_0: I'm trying to learn Webpack but I've got an error when I try to do the most simple webpack command so it's very frustating. Here is my error : ``` PS D:\Projets\#Bazar\WebPackTry> webpack src/js/main.js dist/bundle.js Hash: 67b5c95f9d0dfcab805d Version: webpack 4.0.0 Time: 227ms Built at: 2018...
2018/02/25
776
2,765
<issue_start>username_0: I just started adding tests in this project and decided to add Circle CI. It is working great so far, including the tests. But when I run it in CircleCI, it fails. circleci.yml ``` version: 2 jobs: build: working_directory: ~/project docker: - image: circleci/node:8 steps:...
2018/02/25
793
2,929
<issue_start>username_0: i'm created simple laravel project with this [Laravel-Vue SPA starter project template](https://github.com/cretueusebiu/laravel-vue-spa) and im uploaded this project to ubuntu server. all settings corect but i run this project returns this error "The Mix manifest does not exist. (View: /var/www...
2018/02/25
652
1,977
<issue_start>username_0: Hello i'm using Javascript to create a random dice output (from 1-6) including an image of the dice side. The mathRandomDice function is working fine but my 'if' condition which assigning it to the image is not... My goal is to assign the Math.random value to an image. ``` function math...
2018/02/25
971
4,085
<issue_start>username_0: I have a layout that include another layout with 2 data model of which one in common. Have an Activity that make binding and sets the models. But there is something that escapes me because I just can't make it work. I created an example, I publish it below: The first layout is parent\_layout.xm...
2018/02/25
569
2,263
<issue_start>username_0: I have a realtime database that contains a child "users". This child has different users. Each user has a bunch of attributes like this: user(email,name,age,phonenumber,gender). I've separated them using the push function with an unique generated ID: ![RealtimeDatabase2é](https://i.stack.img...
2018/02/25
351
1,225
<issue_start>username_0: I am trying to write this code to display **popups** using **folium** on a default map. The following loop is searching through my **database** for the location of each **point**, to display the picture belonging to it. The code works nicely, but I cannot customize the size of the image to fit ...
2018/02/25
927
3,380
<issue_start>username_0: I am unable to deserialize the json result I am getting from google api during an API call. The API request is successful, but I can't deserialize it. **Code for deserialization is as follows :** ``` var datareceived = JsonConvert.DeserializeObject(response); ``` **Please find below the j...
2018/02/25
244
836
<issue_start>username_0: I have a very basic css question. The code to color my h1 tags is not displayed in the html document (the documents are properly connected) and I simply have no clue what the reason might be. If I add background color in my css file, that is displayed in the html file for instance.Thanks to eve...
2018/02/25
929
2,919
<issue_start>username_0: I have Dockerfile which I have committed to a git repo. I'm trying to build the container in stages and only save the final container stage with static go binary installed in it. However also "staging" container seems to be saved to my system. I have tried to automatically delete it by using ...
2018/02/25
1,819
6,776
<issue_start>username_0: I'm currently trying to decode JSON which looks like this: ```json { "result": { "success": true, "items": [ { "timeEntryID": "1", "start": "1519558200", "end": "1519563600", "customerName": "Test-Customer", "projectName": "Test-Project",...
2018/02/25
595
2,151
<issue_start>username_0: I'm trying to compare a date from user input with a date stored in an Access database, using ASP Classic. The user inputs a date (`SearchedStartDate`), which is submitted through a form, and then my SQL statement should select records where the start date field is more recent than the date the...
2018/02/25
378
1,161
<issue_start>username_0: Basically what I'm thinking about is: ``` template class Foo { void Bar(Types var) {};... }; ``` which when specialized like this: ``` Foo foo; ``` to expand to: ``` class Foo { void Bar(S1 var){}; void Bar(S2 var){}; void Bar(S3 var){}; }; ``` Obviously, it does not make ...
2018/02/25
2,888
8,933
<issue_start>username_0: I am trying to do analysis on a bike share dataset. Part of the analysis includes showing the weekends' demand in date wise plot. My dataframe in pandas with last 5 row looks like this. [![enter image description here](https://i.stack.imgur.com/I3vLy.png)](https://i.stack.imgur.com/I3vLy.png) ...
2018/02/25
572
2,198
<issue_start>username_0: I try to render a StreamField of a child page in a Page. I don't manage to render the different StructField within the StreamField. Here is my code ``` class DefinitionPage(Page): body = StreamField([ ('definition', blocks.StructBlock([ ('heading', blocks.CharBlock(label='Titre'))...
2018/02/25
332
1,247
<issue_start>username_0: I have this: ``` Item findItem(std::string name) { for(std::list::iterator it = listItem.begin(); it != listItem.end(); it++) { if((\*it)->name() == name){ return \_\_\_; } } } ``` how can I return correctly the element?<issue_comment>username_1: ``` return **it; ``` i...
2018/02/25
397
1,303
<issue_start>username_0: I am trying to call my function resultin a other function. Is there any way to do that? I attached an example. **Here is my function which I want to call it again, or reach the varaibale:** ``` $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { var tab= $(e.target).attr("href");...
2018/02/25
590
2,489
<issue_start>username_0: I created a project on Visual Studio Code on Mac and wanted to set my default page. I wrote the code on the "Startup.cs", but it's not working. When I run the project and open the browser it shows that is not finding the controller. Follow the Startup.cs code: ``` using System; using System...
2018/02/25
651
2,227
<issue_start>username_0: I am attempting to run 3 Docker images, MySQL, Redis and a project of mine on Bash for Windows (WSL). To do that I have to connect to the Docker engine running on Windows, specifically on `tcp://locahost:2375`. I have appended the following line to `.bashrc`: `export DOCKER_HOST=tcp://127.0.0...
2018/02/25
420
1,388
<issue_start>username_0: ``` [2, 'hello', 3, 'good'] - is stored in myfile.txt on one line with open(myfile,'r') as f: myList = f.readlines() ``` but when I try to retrieve the first index, so "2' by using myList[0], the first square brackets is retrieved. How can I set the imported line into a list?<issue...
2018/02/25
406
1,671
<issue_start>username_0: How can I add another add to cart button as well as product variant selection above product description in my Woocommerce product page?<issue_comment>username_1: Clone the `plugins/woocommerce/templates/content-single-product.php` to your theme following the instructions from the file. Change i...
2018/02/25
1,482
4,931
<issue_start>username_0: Please find below 5 sentences and have a look on word "further". I need to frame a logic in such a way that i need to pick two words before "further" word and pick two words after "further" word. For instance observe below five sentences, For sentence 1- I need to pick two words before furthe...
2018/02/25
1,316
4,232
<issue_start>username_0: Let's imagine code like this: ``` private static readonly ThreadLocal MyInt = new ThreadLocal(() => 3); DoSomething() { var A = DoSomethingElse() MyInt += A; } ``` So, every thread would have a copy of MyInt. but if we did something like that: ``` private static readonly ThreadLocal MyI...
2018/02/25
1,313
4,609
<issue_start>username_0: I have an object with JSON like string which is returned by a function tableToJson(). This is what it looks like. ``` { {"Item Code":"sthing","Product Name":"sthing","Qantity":"1","Unit Price":"0","Item Total":"0"}, {"Item Code":"sthing","Product Name":"sthing","Qantity":"1","Unit Price":"0","...
2018/02/25
1,383
4,179
<issue_start>username_0: **PROBLEM DESCRIPTION** I'm getting this error while calling a python script : ``` Traceback (most recent call last): File "/path/t/file/file.py", line 61, in from sklearn.externals import joblib File "/anaconda2/lib/python2.7/site-packages/sklearn/\_\_init\_\_.py", line 20, in impor...