date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/18
1,360
4,707
<issue_start>username_0: I have a block of data for scatter plots - about 500 rows, single column of X values and 10 columns of Y values. I have a second block of data for scatter plots with 200 rows, single column of X values and as high as 20 columns of Y values. It's easy to plot separate scatter plots for each bloc...
2018/03/18
578
2,054
<issue_start>username_0: I'm attempting to create a function that returns if the ending of a string is the same as a given variable without using .endsWith(). I'm not sure why this isn't working. Chaining .join("") and comparing the two values as strings works, but not as arrays. ``` const confirmEnding = (str, targe...
2018/03/18
789
2,873
<issue_start>username_0: Using Selenium 3.8.1 with Python 2.7 with Firefox Portable 54, 64 bit, I get the following error message when running this script: ``` from selenium import webdriver from selenium.webdriver.firefox.firefox_binary import FirefoxBinary binary_argument = FirefoxBinary(r'C:\Users\[removed]\Firefo...
2018/03/18
3,226
8,400
<issue_start>username_0: I need to have a circular progress bar which I can use to show a user what percent they got in a test. Ideally, there would be some fixed HTML and then change the value in the JavaScript or jQuery. They could look like any of the circles below. [![like thisre](https://i.stack.imgur.com/4NA2D.j...
2018/03/18
725
2,371
<issue_start>username_0: I was expecting vowel free string from the code below but it doesn't give me what I'm expecting. Help please. ``` def disemvowel(word): words = list(word) for i in words: if i.upper() == "A" or i.upper() == "E" or i.upper() == "I" or i.upper() == "O" or i.upper() == "U": ...
2018/03/18
693
2,256
<issue_start>username_0: I have a named array of cells called `Cars` which runs from say `A1:B10` Inside this I have a named cell called `Toyota` say at `A4` position. So i do: ``` Private cars As Variant cars = Range("Cars").Value Dim toyota As String toyota = cars.Range("Toyota").Value ??? ``` I am a beginner i...
2018/03/18
487
1,716
<issue_start>username_0: when I try to pass a image template to style in react element, the image doesn't show up in the background. ``` ``` when I try to inspect the element. it shows ``` ``` the style is not set. what am i doing wrong here?<issue_comment>username_1: Probably, your expression `'/images/covers/$...
2018/03/18
641
2,286
<issue_start>username_0: How do I add a new empty Parent instance to the list of parents in the code sample below? I keep getting ``` UnimplementedFeatureError: Copying of type struct Test.Child memory[] memory to storage not yet supported. ``` Minimal example: ``` contract Test { struct Child { } struct Paren...
2018/03/18
454
1,500
<issue_start>username_0: I am trying Instagram api to fetch followers list. I have generated client id, secret and access token. ``` https://api.instagram.com/v1/users/self/?access_token=72951<PASSWORD>.9<PASSWORD>.6<PASSWORD> ``` This API works properly. It shows follows count as 2. But when I run below API with s...
2018/03/18
2,910
8,962
<issue_start>username_0: I need to send stock market data and the formatting sucks right now. Need to send something liike this ``` | Symbol | Price | Change | |--------|-------|--------| | ABC | 20.85 | 1.626 | | DEF | 78.95 | 0.099 | | GHI | 23.45 | 0.192 | | JKL | 98.85 | 0.292 | ``` This is what I have tried...
2018/03/18
433
1,246
<issue_start>username_0: I have a ul/li menu that I'm trying to add `:hover` and `:focus` attributes to: ``` * [Item 1](/page1) * [Item 2](/page2) * [Item 3](/page3) * [Item 4](/page4) ``` So using the following CSS I'm able to grab the first 2 items, but nothing of the latter 2. Adding additional selectors for the...
2018/03/18
469
1,672
<issue_start>username_0: `.env` file is parsed when running a Symfony 4 command (if dotenv is available). This is working fine when developping, but also, I want to test my code (so another environment), hence I need to load another `.env` file. I love what Docker did to run a container: ``` docker run -e MYVAR1 --e...
2018/03/18
1,054
3,565
<issue_start>username_0: I am currently writing a program that is composed of a string vector full of words that have a certain letter all in the same position. For example my vector might look like this: ``` vector v = { "CRYPT", "CYSTS", "WRYLY", "TRYST" }; ``` The idea is a letter is guessed i.e "Y" in this cas...
2018/03/18
1,141
4,281
<issue_start>username_0: I'm using EF Core 2.1 preview which was supposed to reduce N+1 queries problem. I'm trying to make query, that selects Forum Threads with authors of posts: ``` dbContext.ForumThreads .Include(t => t.Posts) .Take(n) .Select(t => new { t.Id, t.Title, PostAuhtors = t...
2018/03/18
794
3,098
<issue_start>username_0: I have a class called accountinfo and I want to display the username after the user logs in. ``` public class accountinfo extends AppCompatActivity { TextView name; TextView nameTV; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); s...
2018/03/18
1,161
3,180
<issue_start>username_0: I am trying to retrieve json data into a php array and giving me the error on foreach() loop Json Data is as given bellow: ``` {"_id":{"$oid":"59043fcee557e6ad53662ed5"},"url":"http://farm3.staticflickr.com/2893/34203321321_f9a2ff200b_b.jpg","asc":0,"id":1} {"_id":{"$oid":"59043fcee557e6ad5366...
2018/03/18
664
2,261
<issue_start>username_0: Table `employeeAccount`: ``` CREATE TABLE employeeAccount ( employAccID NUMBER(2), emplyUsername VARCHAR(20), emplyFirstName VARCHAR(20), emplyLastName VARCHAR(20), ) INSERT INTO employeeAccount(employAccID ,emplyUsername ) VALUES (1,'TestAccount1') INSERT INTO employeeAccoun...
2018/03/18
2,983
8,794
<issue_start>username_0: I received a question in a code interview that I unfortunately was not able to solve in an efficiant manner. I solved it as O(n^2) and I believe it can be solved in O(n log n). Here's my attempt to it, is it the right way to solve it or can it be improved? Question ======== You have arrays ...
2018/03/18
911
3,250
<issue_start>username_0: In my website I use oauth for login via google, twitter and facebook. Since 24 hours I noticed that the facebook login does not work anymore. I get the following error message when I try to log in: "Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load ...
2018/03/18
727
1,650
<issue_start>username_0: **input**: ``` random abcD .and$ 5487>1.2.3.4:random fghij & 9101112 ``` **output**: ``` 1.2.3.4 ``` **What I have done so far**: ``` sed -e 's/'>'\(.*\)':'/\1/' ``` **I have also tried**: ``` sed -e 's/>\(.*\):/\1/' ``` *note*: I can do it with awk: ``` awk 'BEGIN { FS = ">...
2018/03/18
504
1,541
<issue_start>username_0: So I am going to be working with Php and summing values up so I need the last div to be generated after all the other divs are. Is there a way to align the last div (Div #4) with the top right of the beige box? My issue is I have to place it right below or above Div #1 in order for it to float...
2018/03/18
1,344
4,956
<issue_start>username_0: I'm baffled to find out neither of `typing.Awaitable` nor `collections.abc.Awaitable` cover a generator-based coroutine which is one of *awaitable*s defined in * <https://www.python.org/dev/peps/pep-0492/#await-expression> As of Python 3.6, several `asyncio` APIs such as `sleep()` and `open_c...
2018/03/18
878
3,297
<issue_start>username_0: I am using charles proxy to collect http logs in my automation test framework, I want to launch the charles from terminal after initializing the automation framework. Is there any way to launch charles proxy and stop without manually launching the same. I am using mac.<issue_comment>username_1...
2018/03/18
1,142
3,815
<issue_start>username_0: I am writing a code that would display images one by one after the user sends input signal like enter.Following is my code ``` import numpy as np import matplotlib.pyplot as plt from logistic_regression_class.utils_naseer import getData import time X,Y=getData(balances=False) // after getti...
2018/03/18
549
1,935
<issue_start>username_0: I want to store my images using ck editor. But it returns 419 http status even if I set csrf token to request header. ``` let token = document.head.querySelector('[name=csrf-token]').content, document.querySelector('#article_editor').on('fileUploadRequest', function (evt) { var xhr = evt.d...
2018/03/18
514
1,761
<issue_start>username_0: How can I use CONVERT from mysql within Doctrine. ``` $now = new \DateTime('now', new DateTimeZone('Europe/Berlin')); $selectedDate = new \DateTime($flightDate); $selectedDate = $selectedDate->format('Y-m-d H:i:s'); $query= $this->createQueryBuilder('o') ->where('CONVERT(:selectedDate,...
2018/03/18
623
1,991
<issue_start>username_0: mongodb service cannot start with `systemctl start mongodb.service`, it would ask for a password. After then when I try `mongo` command, it throws : `MongoDB shell version v3.6.2 connecting to: mongodb://127.0.0.1:27017 2018-03-18T16:05:39.307+0700 W NETWORK [thread1] Failed to connect to 127....
2018/03/18
586
2,099
<issue_start>username_0: I am following a tutorial in React. I have created my very first component and expecting to see component in my application homepage, but I don't. I am not getting any error either. In my homePage.Js **(This is a component that I am trying to render)**, I have : ``` var React = require('react...
2018/03/18
397
1,522
<issue_start>username_0: [![C# code](https://i.stack.imgur.com/i8Xzm.png)](https://i.stack.imgur.com/i8Xzm.png) I am a new c# learner, that' why I have some of the dumbest question! But I want to know if we have already used "using System" statement in our app then why do we need to use statements like "using System.D...
2018/03/18
244
813
<issue_start>username_0: i cannot print my desire path in the form action i set a condition that id the **$edit** array is set then page goes to **add\_new\_proposal** function which i define in my controller and if the **$edit** variable is not set then it goes to **edit\_new\_proposal** function **here is the code o...
2018/03/18
302
1,117
<issue_start>username_0: I had a few Javascript projects and I need to copy or move to another machine. And I would like to ignore files which are already in `.gitignore`. Now, when I copy the folder I got git ignored folders and files. But, I want to ignore those when I copy (`Command` + `C`). How can I configure it?<...
2018/03/18
1,371
4,318
<issue_start>username_0: I want to do a simple timer who can run from 25 to 0 and reset whenever we want to. For this I've made a clickable div, and I want one click to start the timer and another one to reset it to 25 and stop the timer, is this possible ? A toggable start/reset timer? This is what I came up with so...
2018/03/18
535
1,740
<issue_start>username_0: The following example seems to compile with Clang but not with gcc. Which one is right? ``` #include template struct MyType { constexpr MyType () = default; //constexpr MyType () {} constexpr bool is\_int () const { return std::is\_same\_v; } }; constexpr auto foo () { MyType retval...
2018/03/18
3,198
8,258
<issue_start>username_0: I have been going through [Introduction to Algorithms](https://mitpress.mit.edu/books/introduction-algorithms), and have been trying to implement the `MERGE-SORT` algorithm in C programming language to gain a better understanding of it. The book presents two pseudo-codes: [![<code>MERGE</code...
2018/03/18
650
2,464
<issue_start>username_0: I joined two tables and get different columns from both tables to load them into dataTable. I want to order the columns by using dataTable but how can I understand which columns belogns to which tables? I mean, when I click order button on a **last\_name column** from datatable, how can I write...
2018/03/18
334
1,262
<issue_start>username_0: Is it at all possible to post HTML to an HTML file using jquery's post method. for example: ``` $.post("database.html", "Content") ``` once a button is clicked I want to post to the database file and have this current file load in content from the database file using. ``` $.load("database....
2018/03/18
357
1,449
<issue_start>username_0: Debug tab: ``` { "response": "We're sorry, but something went wrong. Please try again.", "expectUserResponse": false, "conversationToken": "", "audioResponse": "" } ``` I create the sample project in Dialogflow and it works, but in the simulator Actions on Google it doesn't!<issue_co...
2018/03/18
468
1,806
<issue_start>username_0: I have a little task that I am struggling with. So basically we have to read columns from a TSV file and export all possible subsets of the columns to a CSV. Before exporting we have to sanitize the code (remove special chars except .,spaces). I came across this subset code but I am not sure h...
2018/03/18
759
1,804
<issue_start>username_0: I'm constructing a `data.table` from two (or more) input vectors with different lengths: ``` x <- c(1,2,3,4) y <- c(8,9) dt <- data.table(x = x, y = y) ``` And need the shorter vector(s) to be filled with `NA` rather than recycling their values, resulting in a `data.table` like this: ``` ...
2018/03/18
819
2,755
<issue_start>username_0: I have the first pandas.DataFrame ``` first_key second_key 0 0 1 1 0 1 2 0 2 3 0 3 4 0 3 ``` and also the second pandas.DataFrame ``` key statu...
2018/03/18
639
2,508
<issue_start>username_0: I'm working on Android project that related to GPS I still new to android so I don't know a lot about it. My project is an app where it calculates the distance between user location and a specified other location so if the distance is less than (X) say 1KM the app will send a notification to t...
2018/03/18
666
2,408
<issue_start>username_0: I use the dynamic route in the detail component: ``` dataCenterDetail: '/data-center/detail/:id' ``` in the component there is a props with `id`: ``` export default{ props: { id:{ type: Number, required: true } }, ``` when I push to the detail route: i...
2018/03/18
623
2,326
<issue_start>username_0: I want to change a icon for an element on success (Ajax), here is how my icons looks: ``` $.ajax({ url: '@Url.Action("getClass", "app")', type: "GET", data: { id: ClassID }, success: function (data) { // How to get element above i change it's class } ); ``` Acctually I'm wondering ...
2018/03/18
617
2,478
<issue_start>username_0: I am building a Spring-boot application where I am using Spring data jpa feature. Please find below my dao layer code ``` package com.adv.dao; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @Repository public interface Custome...
2018/03/18
410
1,422
<issue_start>username_0: Assume I have such Dockerfile: ``` FROM ubuntu:16.04 EXPOSE 5000 CMD ["some", "app"] ``` And such docker-compose.yml: ``` version: '2.3' services: app: build: context: . exposes: - 6000 ``` After I do docker-compose up -d docker ps outputs: ``` CONTAINER ID ...
2018/03/18
553
1,578
<issue_start>username_0: I have configuration: * Open Server 5.2.8 (WAMP) * PhpStorm 2017.3.4 * Yii 2.0.14 basic I added to the `%PATH%` path to PHP and to the Codeception folder: [![Path to PHP](https://i.stack.imgur.com/ug2jo.png)](https://i.stack.imgur.com/ug2jo.png) [![Path to Codeception](https://i.stack.imgur.c...
2018/03/18
640
2,023
<issue_start>username_0: I have a bytes variable in Python that I want to pass to a C++ function, and then want to return the bytes later on, also via a C++ function. The C++ code is wrapped in Swig. Does anyone know how I can do this or have a basic example? I have tried using void\* as the type in C++, but I can't ge...
2018/03/18
1,494
4,409
<issue_start>username_0: I am trying to start up a Spring Boot application but it is failing to start up. This is my stack trace: ``` 11:27:59.772 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Included patterns for restart : [] 11:27:59.775 [main] DEBUG org.springframework.boot.devtools...
2018/03/18
602
2,162
<issue_start>username_0: I've gone over a ton of documentation on this topic and still aren't sure if the 25 custom params/property limit in Firebase is per app or per event name? Say I have 50 different events with 5 unique property names each, that would be a total of 250 unique property names. Is such a thing suppo...
2018/03/18
918
3,472
<issue_start>username_0: So I have the following user registration form which I want to style. My forms.py look something like this. : ``` from django.contrib.auth.models import User from django import forms class UserForm(forms.ModelForm): password = forms.CharField(widget=forms.PasswordInput()) class Meta:...
2018/03/18
792
3,037
<issue_start>username_0: This is my first development using html/javascript and since my previous career was programming aircraft, it all seems very strange! So ... I picked up a Raspberry Pi and decided to develop server/client software so I can control my garden lighting and water features from my mobile using my wi...
2018/03/18
773
1,823
<issue_start>username_0: I have a DataFrame, `df`, in pandas with series `df.A` and `df.B` and am trying to create a third series, `df.C` that is dependent on A and B as well as the previous result. That is: `C[0]=A[0]` `C[n]=A[n] + B[n]*C[n-1]` what is the most efficient way of doing this? Ideally, I wouldn't have ...
2018/03/18
711
1,730
<issue_start>username_0: i want to put comma's in numbers The output is this which is encoded in json array ``` [{"total2":"7619627.0000"}] ``` I want to change the number in this format ``` [{"total2":"7,619,627"}] ``` heres the php code ``` $sql2 = "SELECT SUM(NettoPrice) AS total2 FROM Sales WHERE OrderType ...
2018/03/18
969
2,783
<issue_start>username_0: In section 9.2 of the book *The C++ Programming Language*, <NAME> wrote: > > Note that a variable defined without an initializer in the global or a namespace scope is initialized by default. This is not the case for local variables or objects created on the free store. > > > But the follo...
2018/03/18
1,048
3,225
<issue_start>username_0: I have a page with absolutely no interface at all. It is literally just a string of text (it grabs text every X seconds that could be of various lengths in terms of characters and words.) I need this text to fill exactly 100% of the browser window height and width. Basically the window would be...
2018/03/18
929
2,670
<issue_start>username_0: I interchanged the positions of map and filter. Does it make any difference related to number of iterations done by code ? ``` List Aname3 =names.stream() .map(name->name.toUpperCase()) .filter(name->name.startsWith("A")) .collect(Collectors.toList()); List Aname4 =names.stream() .filte...
2018/03/18
1,242
2,121
<issue_start>username_0: gurus, i stumbled in hive rank process, i woluld like to rank transaction in each day (with no repeating rank value for the same trx value) ``` date hour trx rnk 18/03/2018 0 1 24 18/03/2018 1 2 23 18/03/2018 2 3 22 18/03/2018 3 4 21 18/03/2018 4 5 20 18/03/2018 ...
2018/03/18
434
1,512
<issue_start>username_0: Is Docker Swarm supported on Docker for Mac? When I try to use Docker Swarm I get an error: ``` $ docker swarm init docker swarm init is only supported on a Docker cli with swarm features enabled ``` I need Docker Swarm on my local Mac to test Docker features which are only available for Do...
2018/03/18
1,583
5,396
<issue_start>username_0: Recently I have been learning more about hashing in Python and I came around this [blog](https://www.journaldev.com/17357/python-hash-function) where it states that: > > Suppose a Python program has 2 lists. If we need to think about > comparing those two lists, what will you do? Compare eac...
2018/03/18
1,290
4,636
<issue_start>username_0: Problem: -------- Vulkan right handed coordinate system became left handed coordinate system after applying projection matrix. How can I make it consistent with Vulkan coordinate system? Details: -------- I know that Vulkan is right handed coordinate system where * **X+** points toward righ...
2018/03/18
617
2,142
<issue_start>username_0: I am experiencing a problem with debugging in vscode just after the last update. There's something going on (<https://github.com/Microsoft/vscode/issues/45657>) I'd like to check the previous version to see if my case is a problem here or in vscode but I can not find instructions on how to dow...
2018/03/18
1,150
4,179
<issue_start>username_0: I have been trying to extract array elements from my JSON, but unable to, so far. I have the following JSON: ``` { "Sample JSON": [{ "Title": "Title1", "Audit": [{ "auditId": "01", "type": "sampleType", "a...
2018/03/18
1,237
3,146
<issue_start>username_0: I have some trouble with a drop-down menu (Bootstrap 4). So I have a table: [![enter image description here](https://i.stack.imgur.com/AbqTX.png)](https://i.stack.imgur.com/AbqTX.png) When I'm clicking on settings in first row I have a drop-down: [![enter image description here](https://i.st...
2018/03/18
573
2,108
<issue_start>username_0: I am building a Nodejs Note app and I am very new at this, so here the delete function doesn't work it, deletes everything from the array and I want to delete only title There are two file app.js and note.js. Here's the content of app.js file ``` if (command === "add") { var note = notes....
2018/03/18
1,525
5,266
<issue_start>username_0: Let us say i have following main menu structure for which i need to add class active class to nav if part of url matches the menu link for example `www.domain.com/en/blog/this-is-firt-blog` in this case i need to add `active` class to second item in name `/blog` ``` * [Home](/en/) * [All B...
2018/03/18
663
2,495
<issue_start>username_0: Just discovered that I can use the getState() to pass state values to action creators. However I am noticing that getState() is returning all the combined states rather than the one specified in the argument. What am I doing wrong, as I don't suppose this is the correct behavior? Reducer: ```...
2018/03/18
731
2,777
<issue_start>username_0: I'm calling native function from Java: ``` String pathTemp = Environment.getExternalStorageDirectory().getAbsolutePath()+Const.PATH_TEMP String pathFiles = Environment.getExternalStorageDirectory().getAbsolutePath()+Const.PATH_FILES engine.init(someInt, pathTemp, pathFiles); ``` And I have t...
2018/03/18
423
1,621
<issue_start>username_0: I'm creating (for the first time) a small Mac only app using Electron. I am trying to use ipcRenderer to communicate between my app menu and the content in the main BrowserWindow. I have the menu set up as follows to send the message 'select-active': ``` const {Menu} = require('electron') con...
2018/03/18
1,048
2,680
<issue_start>username_0: ionic build android error gradle error > > Exception in thread "main" > > > java.lang.RuntimeException: java.util.zip.ZipException: error in > opening zip file > > > at > org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78) > > > at org.gradle.wrap...
2018/03/18
1,660
5,759
<issue_start>username_0: I am new to Spring Boot and following some video tutorials to get started. I created a Maven project, added a parent dependency of artifact id `spring-boot-starter-parent`, added dependency for `spring-boot-starter-web` and `spring-boot-starter-test`. This is the `Application.java`: ``` @RestC...
2018/03/18
432
1,311
<issue_start>username_0: I've got a string like: "The delivery time will be 3-4 days. If you choose 'express' the delivery time will be 1-2 days. Pay within 30 days.". How can I add 1 day to every number in the string without re-creating the string? The result should be: "The delivery time will be 4-5 days. If you ch...
2018/03/18
336
1,062
<issue_start>username_0: I have an HTML5 date input element like this: if you choose a date in this input a string will be the value, for example: `"2018-12-31"` In my model I want the date to be presented as the following string: `"2018-12-31T00:00:00.000Z"` and not the simplified string. How do I make sure that th...
2018/03/18
1,115
4,179
<issue_start>username_0: I'm trying to get the element density from the abaqus output database. I know you can request a field output for the volume using 'EVOL', is something similar possible for the density? I'm afraid it's not because of this: [Getting element mass in Abaqus postprocessor](https://stackoverflow.com...
2018/03/18
1,547
4,208
<issue_start>username_0: [![enter image description here](https://i.stack.imgur.com/q0A1y.png)](https://i.stack.imgur.com/q0A1y.png) [![enter image description here](https://i.stack.imgur.com/qxb9j.png)](https://i.stack.imgur.com/qxb9j.png) I would like to ask how to shorten the code below? Have any other ways to achi...
2018/03/18
1,192
4,584
<issue_start>username_0: I want to an image while I hit an API like `localhost:8080:/getImage/app/path={imagePath}` While I hit this API it will return me an Image. Is this possible? Actually, I have tried this but it is giving me an ERROR. Here is my code, ``` @GET @Path("/app") public BufferedImage getFullImage(@...
2018/03/18
760
2,479
<issue_start>username_0: How to collect to Map from List where null values are excluded/skipped? This code doesn't skip null values: ``` val map = listOf(Pair("a", 1), Pair("b", null), Pair("c", 3), Pair("d", null)) .associateBy({ it.first }, { it.second }) println(map) ``` Workaround solution. But collects int...
2018/03/18
1,730
6,952
<issue_start>username_0: I have TableView with customs cell representing events. It looks very close to first and third image here. [![enter image description here](https://i.stack.imgur.com/3yUNd.jpg)](https://i.stack.imgur.com/3yUNd.jpg) As you can see (sorry for small resolution) on some events there are photos of...
2018/03/18
1,303
5,049
<issue_start>username_0: I want to apply positive or negative class as per the value in element which is part of v-for loop. Below given is the template ``` | {{value}} | ``` I want to add class named 'positive' if 'value>0' , else apply class 'negative'. What is the best way to do this?<issue_comment>username_1: ...
2018/03/18
668
2,500
<issue_start>username_0: Let's say I have a vector of values, and a vector of probabilities. I want to compute the percentile over the values, but using the given vector of probabilities. Say, for example, ``` import numpy as np vector = np.array([4, 2, 3, 1]) probs = np.array([0.7, 0.1, 0.1, 0.1]) ``` Ignoring `pr...
2018/03/18
1,149
2,811
<issue_start>username_0: I have one large dataframe `df1` with many observations including the date of the observation. There are multiple observations for each date. I also have another dataframe `df2` which contains two variables, a date and a new variable I would like to add to `df1`, which we'll call `VarC`. We can...
2018/03/18
299
1,212
<issue_start>username_0: I am doing a course in regression and I have to edit a certain jupyter notebook file as an assignment. However, at the end of each cell, they have put 'raise NotImplementedError()'. If I remove it, everything seems to work according to instruction. But if I leave it, naturally, I get an error. ...
2018/03/18
902
3,530
<issue_start>username_0: I am using httpclient 4.5.5 i want to get large files upto 1 gb in response. But it seems like > > `CloseableHttpResponse response = httpClient.execute(httpGet); > HttpEntity entity = response.getEntity();` > > > This returns whole response so its not good to have whole response in memo...
2018/03/18
347
1,200
<issue_start>username_0: What I am trying to do is to count all the files in a directory using shell script. For example, when execute the program, ``` ./test.sh project ``` it should count all the files in the folder called "project". But I am having trouble with the directory part. What I have done so far is, ...
2018/03/18
1,320
4,454
<issue_start>username_0: Have been suffering with this error the whole day. **Please don't mark this question as a duplicate.I have gone through many similar questions and none of the answers worked for me.** Full error : ``` Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'. > java.io...
2018/03/18
681
1,467
<issue_start>username_0: Can someone please let me know how can I use Indian currency symbol in SAS program? Like we do for dollar as below ``` format Salary :dollar8.; ```<issue_comment>username_1: A similar format can be built like this: ``` %let inr=%sysfunc(unicode(\u20B9)); proc format; picture rupee ...
2018/03/18
879
2,112
<issue_start>username_0: ``` import pandas as pd d = [{'col1' : ' B', 'col2' : '2015-3-06 01:37:57'}, {'col1' : ' A', 'col2' : '2015-3-06 01:39:57'}, {'col1' : ' A', 'col2' : '2015-3-06 01:45:28'}, {'col1' : ' B', 'col2' : '2015-3-06 02:31:44'}, {'col1' : ' B', 'col2' : '2015-3-06 03:55:45'}...
2018/03/18
2,476
6,685
<issue_start>username_0: I have used Embedded derby earlier in my spring boot projects. But now when i created the project through Spring Initializr with the derby dependency. I get the below error : **Schema 'SA' does not exist** followed by **org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing D...
2018/03/18
681
2,325
<issue_start>username_0: I have the following code: ``` x = range(100) M = len(x) sample=np.zeros((M,41632)) for i in range(M): lista=np.load('sample'+str(i)+'.npy') for j in range(41632): sample[i,j]=np.array(lista[j]) print i ``` to create an array made of sample\_i numpy arrays. sample0, sam...
2018/03/18
650
2,420
<issue_start>username_0: Actually i want to return true if set1 contains some values(b and d) of set2. If any one value exist in any of the set then it should return true ``` class TreeSetExample{ public static void main(String[] args){ TreeSet set1 = new TreeSet(); TreeSet set2 = new T...
2018/03/18
640
2,257
<issue_start>username_0: I am trying to auto update a website from remote git repo. As it's on a shared hosting i use a webhook on github & phpseclib 1.0. Here is my code: ``` $ssh = new Net_SSH2(SITE_DOMAIN); $key = new Crypt_RSA(); $key->loadKey(file_get_contents('/home/'.SSH_USERNAME.'/.ssh/'.KEYPAIR_NAME)); if (!$...
2018/03/18
499
1,859
<issue_start>username_0: How could I show a `JOptionPane` at the beginning of a certain function, by having for example, "Working...", and then programmatically dismiss it at the end of said function/piece of code?<issue_comment>username_1: Please configure you JPA Configuration as per your requirement. I've configured...
2018/03/18
572
2,070
<issue_start>username_0: I have this form ```html ``` and this validation ```js if ($("#name").val() == "") { return false; } return true; ``` what I am trying to do, is to disable the submit button, I tried to use submit function for the form but its not triggered, the problem is I don't have access to html ...
2018/03/18
685
2,413
<issue_start>username_0: I am trying to load images from folder via jquery and ajax and I'm using the solution provided [here](https://stackoverflow.com/questions/18480550/how-to-load-all-the-images-from-one-of-my-folder-into-my-web-page-using-jquery). However, this throws a 404 error - even though the directory defini...
2018/03/18
666
2,347
<issue_start>username_0: I'm doing a lot of calculations writing the results to a file. Using multiprocessing I'm trying to parallelise the calculations. Problem here is that I'm writing to one output file, which all the workers are writing too. I'm quite new to multiprocessing, and wondering how I could make it work....
2018/03/18
784
2,118
<issue_start>username_0: I have a data frame consisting of 400 rows of x, y and z values, and I would like to plot the x column against the y column. This is what I have got so far: ``` sample3d = function(n) { df = data.frame() while(n>0) { X = runif(1,-1,1) Y = runif(1,-1,1) Z = runif(1,-1,1) ...
2018/03/18
809
2,483
<issue_start>username_0: i'm trying to make right click> search by image for website, but source images will be 1 specific website only, so website needs only "images1/image1" from "<http://example.com/images1/img1.jpg>" ``` var url = 'example.com/search/'; chrome.contextMenus.onClicked.addListener(function(info, tab...
2018/03/18
695
2,431
<issue_start>username_0: I know variations of this have been asked hundreds of times, but after searching and reading dozens of similar questions am being particularly thick and i can't come close to working out the whys and hows of it happening, so at the risk of being shot down in flames... Troubleshooting it i trim...
2018/03/18
980
3,289
<issue_start>username_0: This is the task: * Display the usage message "Please input test scores with values between 0-100. * Enter 999 to finish." * Accept test scores within the range 0-100. If the number is out of range, display the message "Invalid Test Score", disregard that input and continue collecting values *...
2018/03/18
1,084
3,726
<issue_start>username_0: Im trying to create a Login but everytime I type my credentials and click on Login, I get "No database selected" Here is my PHP code ``` php define('DB_HOST', 'localhost'); define('DB_NAME', 'phplogin'); define('DB_USER','adminuser'); define('DB_PASSWORD','<PASSWORD>'); $con=mysql_connect(...
2018/03/18
721
2,898
<issue_start>username_0: I am trying to get some data from my server via HttpClient Post request. the request completes well. it returns the desired data. this process is handled by a service. this service in turn returns the data to the method calling from a component. the problem here is the service receives the dat...