date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/14 | 416 | 1,190 | <issue_start>username_0: Suppose x is a real number between 0 and 1
If n = 2 there are two fractions ranges 0 to 0.5 and 0.5 to 1
If n = 3 there are three fractions ranges 0 to 0.33, 0.33 to 0.66 and 0.66 to 1
I want to know the most efficient algorithm that tells which fraction x belongs to.
If x = 0.2 and n = 3, ... |
2018/03/14 | 1,055 | 3,034 | <issue_start>username_0: So, my data is travel data.
I want to create a column `df['user_type']` in which it'll determine if the `df['user_id']` occurs more than once. If it does occur more than once, I'll list them as a frequent user.
Here is my code below, but it takes way too long:
```
#Column that determines ... |
2018/03/14 | 1,379 | 3,299 | <issue_start>username_0: I have a DataFrame like this
```
dict_ = {'Date':['2018-01-01','2018-01-02','2018-01-03','2018-01-04','2018-01-05'],'Col1':[1,2,3,4,5],'Col2':[1.1,1.2,1.3,1.4,1.5],'Col3':[0.33,0.98,1.54,0.01,0.99]}
df = pd.DataFrame(dict_, columns=dict_.keys())
```
I then calculate the pearson correlation ... |
2018/03/14 | 548 | 2,246 | <issue_start>username_0: I was wondering if anybody knows what happens if you have a Cron setting on an Azure Function to run every 5 minutes if its task takes more than 5 minutes to execute. Does it back up? Or should I implement a locking feature that would prevent something, say in a loop, from handling data already... |
2018/03/14 | 454 | 1,487 | <issue_start>username_0: I have two commands to execute in release phase and as per this tutorial (<https://devcenter.heroku.com/articles/release-phase>), I have included them in a shell script named *release.sh* (located in the root of my Django project).
```
#!/bin/bash
python manage.py migrate
python manage.py com... |
2018/03/14 | 1,215 | 3,251 | <issue_start>username_0: We're working on panel data, and there is a command in Stata, `xtsum`, that gives you within and between variance for the variables in the data set.
Is there a similar command for R, that produces clean output?<issue_comment>username_1: I have used a little function to do it.
The function XTS... |
2018/03/14 | 754 | 2,593 | <issue_start>username_0: I have a method that generates an array based on the min and max provided to it. I am getting an error while pushing the value to the method. The error states that Cannot read property genArray. Not sure what the problem is
```
public genArray: number[];
ngOnInit() {
generateArray... |
2018/03/14 | 502 | 1,873 | <issue_start>username_0: First I enqueue a script using:
```
wp_enqueue_script( "script", plugins_url( "/test/js/script.js", PATH ), array("jquery"), VERSION, true );
```
Then I'm inserting an inline script after "script".
```
wp_add_inline_script( "script", "console.log('hello world');" );
```
Now I need to add ... |
2018/03/14 | 540 | 1,841 | <issue_start>username_0: I have created a portfolio page for myself.
<https://alonoparag.github.io/index.html#home>
My problem is that when I check the page using Google Developers tools or with my android (samsung galaxy s4) device, the navbar's items are always behind the content of #home.
I tried tweaking the z ... |
2018/03/14 | 1,125 | 4,587 | <issue_start>username_0: I have a database, where I store some fixed values like product categories. When I create a new product and I want to assign a category to it, I do it this way:
```
$categories = new ProductCategoryRepository();
$category = $categories->find(ProductCategory::EXAMPLE);
$product = new Product()... |
2018/03/14 | 837 | 3,297 | <issue_start>username_0: Given string "<NAME>., <NAME>.: Introduction to Java"
I need to extract only "<NAME>." and "<NAME>." from given string using regex how can I do it?<issue_comment>username_1: If you don't want it to hit the database every time you could just store it in the Cache:
```
public function getCatego... |
2018/03/14 | 641 | 2,223 | <issue_start>username_0: How can I get page URL from `window.location.href` without decode in javascript?
For example we can not get exactly this URL: `http://example.com/report#title=example_report&url=project_chart%2F%3Fproject_id%3D77`.
When we use `window.location.href` in javascript , we will get this URL:
`ht... |
2018/03/14 | 603 | 2,095 | <issue_start>username_0: I am new to angular little confused,
When I am calling the Rest API, Getting the JSON response
But I need to store that JSON response into a `(Map)`,
cloud please help to fix this.
**Edit 1:**
On calling `api/user/id` getting below json response
```
{
"firstname":"test",
"lastname":"testla... |
2018/03/14 | 342 | 1,465 | <issue_start>username_0: I have developed my microservice ecosystem and i managed to deploy and run it localy using docker containers and minikube. For each service i have specified two files: deployment.yml (pod specification) and service.yml (service specification). When I deploy each service to minikube cluster i si... |
2018/03/14 | 998 | 3,431 | <issue_start>username_0: I am having an issue with my scoring in my blackjack game. It works in finding the right score, but when the user draws a new card it will incorrectly add the score.
For example:
Orginial hand is : 4 and 5 (so score 9)
User draws a 10.
Instead of score being 19 is will instaed be 19+9 or 28.
... |
2018/03/14 | 933 | 3,284 | <issue_start>username_0: This code works:
```
@ mutable.Seq(1, 2).asInstanceOf[Seq[Int]]
res1: Seq[Int] = ArrayBuffer(1, 2)
```
But this doesn't:
```
@ mutable.Map(1 -> 2).asInstanceOf[Map[Int, Int]]
java.lang.ClassCastException: scala.collection.mutable.HashMap cannot be cast
to scala.collection.immutable.Map
am... |
2018/03/14 | 323 | 1,257 | <issue_start>username_0: I have the following `Java` method that searches `MongoDB` for a specific entry:
```
public List search(String collection, String entry){
List documentList = new ArrayList<>();
createIndexforCollection(collection);
getCollection(collection).find(Filters.text(entry)).forEach((Block super ... |
2018/03/14 | 551 | 1,873 | <issue_start>username_0: I am making a search function. I want to search where several selected columns have given value but must be restricted to where `user_id='x'`. What I have gives all results and not just where `user_id='x'` and that is what I want :
Below my query that returns everything and not just search da... |
2018/03/14 | 873 | 2,671 | <issue_start>username_0: Why is the `datetime` type lost after inserting them in a Sqlite database?
```
import sqlite3, datetime
dbconn = sqlite3.connect(':memory:')
c = dbconn.cursor()
c.execute('create table mytable(title text, t timestamp)')
c.execute('insert into mytable (title, t) values (?, ?)', ("hello2", date... |
2018/03/14 | 804 | 3,363 | <issue_start>username_0: We use this function to convert an SKProduct into a localised price per item for our consumable bundles:
```
static func pricePerUnit(_ product: SKProduct, quantity: NSDecimalNumber) -> String? {
let numberFormatter = NumberFormatter()
numberFormatter.numberStyle = .currency
number... |
2018/03/14 | 1,922 | 6,979 | <issue_start>username_0: It looks like there are several similar questions but after several days I do not find the proper answer. My question is how to know if the server has closed the websocket and how to try to reconnect. I have seen several examples but none of them worked properly when I wanted to implement the f... |
2018/03/14 | 803 | 2,975 | <issue_start>username_0: I am implementing a factory pattern to create two concrete classes in an abstract which has the factory methods overloaded (see below):
```
public abstract class User {
...
public static User make(int id, String name) {
return new Admin(id, name);
}
public static User... |
2018/03/14 | 3,936 | 9,466 | <issue_start>username_0: Our AD Team is going to disable RC4-HMAC so I have to change our JBoss-applications to AES.
I added the aes types to krb5.conf and created new keytabs but that seems to not work. Tests besides the application with kinit show the same results.
There was an [similar issue](https://stackoverflow.... |
2018/03/14 | 504 | 1,808 | <issue_start>username_0: I have a set of `.tf` files that reflect an `AWS` infra.
The files in my `terraform` folder are more or less:
```
eip.tf
instance.tf
key.tf
provider.tf
rds.tf
route53.tf
securitygroup.tf
terraform.tfstate
terraform.tfstate.1520442018.backup
terraform.tfstate.backup
terraform.tfvars
terraform.... |
2018/03/14 | 1,885 | 7,849 | <issue_start>username_0: I am making an app which has login page. I am using default django username and password fields.I want to add some css to it.How can we modify the default style and make it look good
My HTML is of this form
```
{% load staticfiles %}
Purple Admin
### Login
Username:
{{ form.username... |
2018/03/14 | 1,014 | 3,898 | <issue_start>username_0: Anyone else experiencing issues with the status bar always being grey since using sdk 26 or 27? I recently updated Android Studio and using 27 as my target sdk and now every Activity that is launched has a grey status bar. I have not changed the styles or themes, yet they are always grey.
Anot... |
2018/03/14 | 323 | 1,279 | <issue_start>username_0: I cannot for the life of me figure out the table name that would enable me to see the approval queue.
There is time pending approval in the approval process "TLReportedTime" and I'm looking for a table to build a report so that I can see **who** the approval is pending with...<issue_comment>u... |
2018/03/14 | 1,720 | 6,863 | <issue_start>username_0: I want to parallelise my application. I am using Tomcat8 to deploy my web application. I am using Tomcat Default settings(HTTP Connector Thread count 200 and Default JVM settings). I want to use CompletableFuture in Java to complete the task in parallel. Ex - If I have 3 tasks TASK1,TASK2,TASK3... |
2018/03/14 | 1,252 | 3,784 | <issue_start>username_0: Anybody was wondering how to get these weird time strings in BigQuery look like the ones in Google Analytics?
They consist of `[any amount of hours]:[minutes]:[seconds]` that's why normal time functions don't really work.
Examples:
* 85667:34:02
* 260:59:34
* 02:01:01<issue_comment>username_... |
2018/03/14 | 429 | 1,542 | <issue_start>username_0: Right now I put `console.log(something)` where I want to see what's happening in those places where I put it. When I see it's fine, I remove it.
How do I better implement logging functionality which I can easily turn on/off, e.g. with a start command line parameter `node app.js debug=true`?<is... |
2018/03/14 | 597 | 2,198 | <issue_start>username_0: I have this code where I have defined two classes using generics.
1. Section which can have a generic type of data.
2. Config which uses kind of builder patterns and stores list of such sections.
On running this code it gives compilation error and I am no where to understand why. I have ment... |
2018/03/14 | 486 | 1,754 | <issue_start>username_0: I am learning A\* algorithm and dijkstra algorithm. And found out the only difference is the Heuristic value it used by A\* algorithm. But how can I get these Heuristic value in my graph?. I found a example graph for A\* Algorithm(From A to J). Can you guys help me how these Heuristic value are... |
2018/03/14 | 921 | 3,609 | <issue_start>username_0: For a project I am working on I created a trigger to run my makeCopy() function at the beginning of every year. The goal is to make a copy of a spreadsheet and save it in a folder already created in my drive. In this function I also create a new folder for the new year.
```
function makeCopy(... |
2018/03/14 | 1,734 | 5,800 | <issue_start>username_0: I have an array of objects
```
var arrayOfObjects: [Object]?
```
And they all have a property called `depth`. I want to find the **very next** object in that array that has the same depth with a specific object I know the index of:
```
[
...objects_before...,
object_I_know: {depth:3},... |
2018/03/14 | 3,432 | 10,604 | <issue_start>username_0: So I'm creating an app that uses the Google Places API to gather a list of restaurants. Using the API provides me with a JSON file full of details about each location like lat, long, rating, priceLevel, openNow, photos, etc. Below is the code used to gather said JSON from my given parameters:
... |
2018/03/14 | 1,156 | 4,596 | <issue_start>username_0: Im pretty new in TFS and need to create a hub extension.
The thing is I can't find a way to specify a collection project for the extension so it will exist only when this project is selected on the TFS and not for all projects.
Maybe there is a way to specify this in the extension-manifest.jso... |
2018/03/14 | 468 | 1,722 | <issue_start>username_0: I have the following class:
```
@Builder @NoArgsConstructor
public class ConsultationPointOfContact {
private String fullName;
private String phoneNumber;
private String userLogin;
}
```
When the `@Builder` annotation exists, it is causing problems with the `@NoArgsConstructor... |
2018/03/14 | 461 | 1,649 | <issue_start>username_0: I'm using country picker from Bootstrap form helper:
[Country Picker](http://bootstrapformhelpers.com/country/)
Problem is that i need to initialize it dynamically with a country. I'm using data-country="US" as default, anyways i need to change it on document ready function.
```
```<issue_c... |
2018/03/14 | 706 | 2,379 | <issue_start>username_0: First things first I should say I spend my time to read all topics in this case but no success, recently I faced with a problem with client/browser cache on my website, It occurred without any change. Server side cache is good but client side working so bad, I should press `CTRL+F5` everytime, ... |
2018/03/14 | 3,788 | 12,177 | <issue_start>username_0: I am very new to selenium and trying to set up selenium in my laptop to begin. I am unable to invoke IE from my simple code. The details are given below. Can you please help me to understand where the issue is
IE version: IE 11,
IE Driver: 64-bit,
OS: Windows 10 64 bit,
Selenium version: 3.1... |
2018/03/14 | 1,040 | 3,951 | <issue_start>username_0: I have some software with an event-based networking protocol for control which is using a `IObservable` for handling in bound messages.
In many cases a sent message will expect a specific response (or sequence, such as to report progress). In order to not potentially miss the response a task i... |
2018/03/14 | 1,176 | 3,920 | <issue_start>username_0: While working on a project, I ran into the following issue I could not explain to myself.
I have the following [is\_in\_set(..) function](https://stackoverflow.com/questions/1701067/how-to-check-that-an-element-is-in-a-stdset), which simply checks if a cstring is in an unordered\_set of cstri... |
2018/03/14 | 1,572 | 7,049 | <issue_start>username_0: I have successfully upload a Users profile image to the Firebase storage area under their UserID.
From there I have put the file path to that image in the Firebase database under the usersID
[Firebase Database Structure, Showing he profileImage uri that is linked to the firebase storage area... |
2018/03/14 | 663 | 2,418 | <issue_start>username_0: I have a YML file, which I parse to Map using yamlBeans library.
I don't know how deep the nested map goes.
for example:
>
> * key1:
> + key2: value1
> + key3:
> - key4: value2
> - key5: value3
>
>
>
I need to find a specific value in this map, update it, and write the map back to Y... |
2018/03/14 | 1,435 | 4,644 | <issue_start>username_0: I'm trying to recreate an input box using divs so that I can create fractions, surds etc inside. I want a user to be able to click on the div and press a key and the correct character appear inside the div, but nothing happens when I click on the div and press a key.
JS
```
$(document).ready... |
2018/03/14 | 3,275 | 10,750 | <issue_start>username_0: I have some server that provides access to data by cryptographic API. I need to write client in C# that can create requests to server and read responses from.
For doing it I need to create public and private RSA keys and convert them to bytes array. I had the working example in java:
```
... |
2018/03/14 | 3,259 | 10,781 | <issue_start>username_0: I am trying to do a simple thing:
check if a parameter is on the URL and then set a state for my component. This state will determine if some html code should be displayed or not.
Basically this dummy sample may give you an idea of what I have:
```
class Lalala extends Component {
constru... |
2018/03/14 | 513 | 1,737 | <issue_start>username_0: so i'm new to powershell and i'm training myself by doing my first script with a menu, and from time to time i'm adding stuff to understand and learn new things
so now i have a question, when the user is asked to input a choice, let say number 1, he then will get asked to input a number of pc'... |
2018/03/14 | 1,077 | 3,810 | <issue_start>username_0: I am encapsulating a std::list to make it safely iterable when iterating can potentially mark contents as 'invalid', and 'invalid' contents are skipped in the iteration. Specifically, during the iteration the current object could schedule itself or other objects for removal from the list and ma... |
2018/03/14 | 873 | 3,097 | <issue_start>username_0: I am using laravel eloquent. I have fetched data from two table using eloquent.
I have `post` table and `chat` table. For `post` table I have model `Post.php` and for `chat` table I have model `Chat.php`. Here is the the eloquent relation I have created to fetch chat for individual post for a ... |
2018/03/14 | 758 | 2,865 | <issue_start>username_0: I wish I could do the following:
```
type Logger = {
warn : System.Type -> string -> unit
// also methods for error, info etc
}
// during application startup
let warn (serviceProvider : IServiceProvider) (t : Type) s =
let loggerType = typeof>.MakeGenericType(t)
let logger = serv... |
2018/03/14 | 1,150 | 4,197 | <issue_start>username_0: I have an array containing strings.
I have a text file.
I want to loop through the text file line by line.
And check whether each element of my array is present or not.
(they must be whole words and not substrings)
I am stuck because my script only checks for the presence of the first array el... |
2018/03/14 | 822 | 3,488 | <issue_start>username_0: I developed an app a few months back for iOS devices that generates real-time harmonic rich drones. It works fine on newer devices, but it's running into buffer underruns on slower devices. I need to optimize this thing and need some mental help. Here's a super basic overview of what I'm curren... |
2018/03/14 | 1,325 | 4,930 | <issue_start>username_0: I have just started using c++ and saw that their is a null value for pointers. I am curious as to what this is used for. It seems like it would be pointless to add a pointer to point to nothing.<issue_comment>username_1: Basically, pointers are just integers. The null pointer is a pointer with ... |
2018/03/14 | 448 | 1,759 | <issue_start>username_0: I have an integration test setup that uses RSpec + Capybara. We recently switched from PhantomJS to headless Chromedriver and I miss that javascript errors are not displayed anymore.
Is there a convenient way of configuring Chromedriver so that javascript errors show up in the log output of ca... |
2018/03/14 | 309 | 1,374 | <issue_start>username_0: I have a Sony A7S2 - is there a way to access the Remote Camera API endpoint while the camera is connected to an access point - and, while we're at it: is it possible to keep the camera connected to an AP and the endpoint running all the time, even during "normal" operation? As soon as I exit t... |
2018/03/14 | 853 | 2,021 | <issue_start>username_0: I've a simple question: suppose that I would like to make an operation on one column (in this case multiplying by 1000 column Measure) according to the value of another column (in this case when Unit is equal to L).
Is there any efficient way to do?
I'll report a simple example but you don't ... |
2018/03/14 | 934 | 2,029 | <issue_start>username_0: I need to duplicate some values contained in a given colum by the value contained in another column of a dataframe.
For example, this is my dataframe:
```
Year <- rep(c('2011', '2012', '2013', '2014', '2015', '2016'), 3)
LT <- rep(c(8, 9, 10), each=6)
Nind <- rep(c(10, 7, 5), each=6)
df <- dat... |
2018/03/14 | 1,005 | 4,252 | <issue_start>username_0: I'm using Xamarin.Forms but I'm having a few problems handling push notifications. **They only work fine when app is in foreground.**
When the app is in background, all notifications are received and displayed correctly but I can't manage to get them to vibrate or even turn led on. I have foun... |
2018/03/14 | 655 | 2,056 | <issue_start>username_0: I want to create a table and put on it all the param which are not empty in param like this
```
http://localhost:5002/5u3k0HRYqYEyToBB53m1=<EMAIL>&m2=<EMAIL>&m3=&m4=&m5=&m6=&m7=&m8=&m9=<EMAIL>&m10=&m11=<EMAIL>&m12=&m13=&m14=&m15=&m16=&m17=&m18=&m19=&v=4.1.2&hw=6
```
And after this i want to... |
2018/03/14 | 525 | 1,984 | <issue_start>username_0: I am looking for a way to iterate over an array and only output the first item, and when iterating again, output the second item.
```
var array = [1,2,3]
iterate : function () {
$.each(array, function(a,b) {
console.log(a); // This will log 1 and 2 and 3
});
```
This will log 1,2... |
2018/03/14 | 716 | 2,641 | <issue_start>username_0: I am using springboot and springdata with Mysql.
I have 2 entities, Customer & Order:
```
@Entity
@Table(name = "customers")
public class Customer {
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
@Column(name="id", nullable = false)
protected long id;
@Column(nam... |
2018/03/14 | 2,444 | 7,586 | <issue_start>username_0: I'm trying to prove that a number is prime using the Znumtheory library.
In Znumtheory primes are defined in terms of relative primes:
```
Inductive prime (p:Z) : Prop :=
prime_intro :
1 < p -> (forall n:Z, 1 <= n < p -> rel_prime n p) -> prime p.
```
So to prove that 3 is pr... |
2018/03/14 | 979 | 2,913 | <issue_start>username_0: In one of my assignments I came across a weird implementation, and I was curious if it's a bug or the designed behavior.
In Python 3, division by `/` returns a floating point number, and `//` means integer division and should return an integer. I've discovered though that if either of the valu... |
2018/03/14 | 862 | 2,630 | <issue_start>username_0: I've been struggling to find how I could display an icon in a Cell in a ReactTable (from the library react-table). All I could find is that it accepts HTML symbols. There's a lot of symbols, but what I'm looking for is to show flags...
```
Cell: () => (
♥
)
```
I already tried to use for ... |
2018/03/14 | 361 | 1,150 | <issue_start>username_0: I am trying to read .dta files with pandas:
```
import pandas as pd
my_data = pd.read_stata('filename', encoding='utf-8')
```
the error message is:
```
ValueError: Unknown encoding. Only latin-1 and ascii supported.
```
other encoding formality also didn't work, such as **gb18030** or **g... |
2018/03/14 | 597 | 1,661 | <issue_start>username_0: ```
CREATE TABLE `Students` (
`id` int(11) NOT NULL,
`name` varchar(500) NOT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `Students` (`id`, `name`) VALUES
(1, 'Student 1'),
(2, 'Student 2'),
(3, 'Student 3');
CREATE TABLE `lessons` (
`id` int(11) NOT NULL,
`name` varch... |
2018/03/14 | 331 | 1,099 | <issue_start>username_0: How do I check for an empty JSON object in Javascript? I thought the key was
```
var isEmpty = (response || []).length === 0;
```
but this isn't it. In my JS console, I have tried
```
jsonresp = {}
{}
jsonresp.length
undefined
```
What's driving this is I have a Ruby on Rails controller t... |
2018/03/14 | 327 | 1,059 | <issue_start>username_0: ```
I have a the following dataframe using pandas.
Names
Jason
<NAME>
John
<NAME>
Nate
Dave
```
I want to get the unique names. In this case, the output I am looking for is
```
Nate
Dave
```
I have the following codes but it does not print what I am looking for.
```
df = pd.DataFrame(d... |
2018/03/14 | 804 | 2,618 | <issue_start>username_0: We have a dedicated server with proxmox on OVH. The idea is to connect the containers locally but also trough internet. So far I have 2 containers.
I added a bridge network for local IP and that is working since I am able to ping the containers from each other.
Also added `bind-address=... |
2018/03/14 | 675 | 1,686 | <issue_start>username_0: I have office 365 id on message divs. such as
```
Message Subject
```
But when I call it in functions. It gives `jquery-2.1.1.js:2 Uncaught Error: Syntax error, unrecognized expression:`
This **works** on devtools console.
```
$('#AQMkADFGFGDFGDFG<KEY>ADI4LTAwAi0wMAoALgAAA1IXzflHRQlLlY3LI... |
2018/03/14 | 769 | 2,499 | <issue_start>username_0: so I have a string:
"I am a dentist in a health organization."
I would like to extract the first word that contains more than three letters and put it into a new column in a datatable, i.e. in this case "dentist". I suppose I have to use strsplit, but I have no idea on how to proceed.
Any he... |
2018/03/14 | 986 | 3,524 | <issue_start>username_0: I have a numpy array X that has 3 columns and looks like the following:
```
array([[ 3791, 2629, 0],
[ 1198760, 113989, 0],
[ 4120665, 0, 1],
...
```
The first 2 columns are continuous values and the last column is binary (0,1). I wou... |
2018/03/14 | 1,858 | 7,877 | <issue_start>username_0: I have flicked through few popular Event Sourcing frameworks written in a variety of different common languages. I have got the impression all of them affect the domain models to a really high degree. As far as I understand ES is just an infrastructure concern - a way of persisting aggregate st... |
2018/03/14 | 419 | 1,134 | <issue_start>username_0: Am trying to add the values in my tuple to get the total figure with the below code
```
Black = (("Hans","100"),("Frank","20.5"))
for v in Black:
print(v[1])
print (v[1]+v[1])
```
But when i do it this way it concatenate the values like 100100 and not total figure of the values<iss... |
2018/03/14 | 412 | 1,239 | <issue_start>username_0: i want to call the isAuthenticated() method within the logout function.
(Im not sure what you call this layout its like a variable object containing functions)
```
var svc = {
logout: function () {
isAuthenticated() // Call isAuthenticated function here
},
login: function... |
2018/03/14 | 492 | 1,309 | <issue_start>username_0: I have the following data set:
```
data =
{
a:[1,2,3]
b:[3,4,5]
c:[5,6,7]
...
}
```
And I am trying to find the smallest number from the index 1 from all the lists.
The only way I could imagine doing it would be this:
```
num = []
index_number = 1
for var in data:
num.append(data.ge... |
2018/03/14 | 928 | 2,040 | <issue_start>username_0: I have a multi-hierarchical pandas dataframe shown below. How, for a given attribute, attr ('rh', 'T', 'V'), can I set certain values (say values > 0.5) to NaN over the ***entire set*** of pLevs? I have seen answers on how to set a specific column (e.g., df['rh', 50]) but have not seen how to s... |
2018/03/14 | 931 | 3,140 | <issue_start>username_0: I am getting crazy to achieve this very simple task.
I need to set an Output Variable in an Azure CLI task on Visual Studio Team Services, because next task in the Release definition will be executed according to the value of this variable.
I wrote this simple code
```
call az extension add... |
2018/03/14 | 565 | 1,892 | <issue_start>username_0: I have 3 tables, user, artist and a join table.
I'd like to find for a particular user, the ordering of the rest of the user table by the number of artists they have in common in the join table, or potentially just the `n` other users who are have the most in common with them.
For example in t... |
2018/03/14 | 1,860 | 6,527 | <issue_start>username_0: In a project with [Spring Boot 2.0.0.RELEASE](https://docs.spring.io/spring-boot/docs/2.0.0.RELEASE/reference/htmlsingle/), when I start the application the first time, when the database tables are being created, I'm getting the following warning message:
```
Hibernate: alter table if exists b... |
2018/03/14 | 1,217 | 4,497 | <issue_start>username_0: I am having issues uploading new code to an Arduino Leonardo board. This happens after uploading previous buggy code (e.g., array out of range indexing error). Once I fixed the buggy code, I can upload it to another hardware unit, but not the same unit that previously had the buggy code.
I am ... |
2018/03/14 | 370 | 1,269 | <issue_start>username_0: `Path::exists` is not suitable, since its documentation states:
>
> This function will traverse symbolic links to query information about the destination file. In case of broken symbolic links this will return false.
>
>
><issue_comment>username_1: [`std::fs::read_link`](https://doc.rust-la... |
2018/03/14 | 406 | 1,223 | <issue_start>username_0: I want to join on Column1 and (Column2 if there is a match, null if there isn't)
```
Table1
a,x
a,null
a,y
Table2
a,x,1
a,null,2
```
Join Result
```
a,x,1
a,null,2
a,y,2
```<issue_comment>username_1: [`std::fs::read_link`](https://doc.rust-lang.org/std/fs/fn.read_link.html) seems what yo... |
2018/03/14 | 1,604 | 2,743 | <issue_start>username_0: I'm trying to create a new series within a dataframe that maps a dictionary along two-dimensions, first matching the key, then matching the value within an array . The existing series is a datetime and the key match is against the date and the value match is the hour (thus the new series `'dh'`... |
2018/03/14 | 1,578 | 6,975 | <issue_start>username_0: I have the following code to configure Jetty server:
```
@Configuration
public class RedirectHttpToHttpsOnJetty2Config {
@Bean
public ConfigurableServletWebServerFactory webServerFactory() {
JettyServletWebServerFactory factory = new JettyServletWebServerFactory();
... |
2018/03/14 | 1,265 | 5,300 | <issue_start>username_0: I have a dilemma I am trying to find out the best way to compare a string variable called (code) to an array of strings. if it equal it i want it to break the for loop. Which would should I select. I think the 2nd one will work but the 1st one seems like it would and its simpler. Any advice wou... |
2018/03/14 | 521 | 2,113 | <issue_start>username_0: I am trying to reinstall anaconda 64 bit on Windows 7 to use Python 3.6 and the installations works right till the end but it fails executing the post install script with following error.
[](https://i.stack.imgur.com/gk82Zh.j... |
2018/03/14 | 711 | 2,840 | <issue_start>username_0: I have method to calculate installed applications storage size, data size, and cache size using IPackageStatsObserver, but on actual device callback.onSucces() is not triggered. On emulator is working fine, but on board success in never called. I also have GET\_PACKAGE\_SIZE permission in manif... |
2018/03/14 | 1,003 | 3,655 | <issue_start>username_0: I have a static site (`mysite.com`) hosted via Netlify. Netlify currently manages my DNS, so that I have nameservers like so:
* `dns1.p07.nsone.net`
* `dns2.p07.nsone.net`
* `dns3.p07.nsone.net`
* `dns4.p07.nsone.net`
I have a bucket on my S3 named `dl.mysite.com`. I want to have it so that w... |
2018/03/14 | 538 | 2,013 | <issue_start>username_0: How can I tell `MockRestServiceServer` to expect a specific `json` content during a junit `@Test`?
I thought I could expect just a json string as follows:
`.andExpect(content().json(...))`, but that method does not exist. So how could I rewrite the following?
```
private MockRestServiceServer... |
2018/03/14 | 1,166 | 4,214 | <issue_start>username_0: I have an async function and in the middle of the function body I have two awaits before finally some logic and a return. How does this get executed? Does AsyncCall1 finish before AsyncCall2 starts or are they started in parallel? What happens in the interim before they both have results?
pseu... |
2018/03/14 | 2,189 | 6,613 | <issue_start>username_0: Here is my query:
```
INSERT INTO aa_Tanks_Ponds ([User_Name],
[Type],
Site_Name,
Species,
Year_Class,
Tank_Pond,
Letter,
... |
2018/03/14 | 623 | 2,000 | <issue_start>username_0: I am fairly new to SQL and I'm stumped on a query I'm trying to make. I have a dataset similar to this
Player
```
masterID firstName lastName
11111 Rob Caspian
22222 Bob Harper
33333 Jon Willow
44444 Ron Anderson
55555 Doug B... |
2018/03/14 | 1,023 | 3,760 | <issue_start>username_0: I'm currently looking for simplest possible JSON log messages that would simply write a severity and a message to Stackdriver logging from a container that is run in Kubernetes Engine and is using the managed Fluentd daemon.
Basically I'm writing single line JSON entries as follows.
```js
{"s... |
2018/03/14 | 1,640 | 4,405 | <issue_start>username_0: How to do 2-tier sorting on an array using below criteria:
`edd` value groups:
1. 1-10
2. 11-20
3. 21-30
The array is
```
$var_array = [
['name' => 'product1', 'edd'=>16, 'price' => 89],
['name' => 'product2', 'edd'=>21, 'price' => 99],
['name' => 'product3', 'edd'=>2, 'price' =... |
2018/03/14 | 364 | 1,380 | <issue_start>username_0: I have a new project for a new job. The project will not build on my computer. It has yellow triangles under every reference that isn't a project in the solution. It even has a yellow triangle for microsoft.csharp. I have been digging and tried many things online and on stack overflow. Anyone h... |
2018/03/14 | 1,059 | 2,672 | <issue_start>username_0: I have a dataframe with columns "pid", "code", "type" and "note". Each pid (patient id) is is coupled to diagnose and medicine. These have both a code, and a note (see example). Each code can have several notes. How to replace all codes with the corresponding first seen note and type? Doing a f... |
2018/03/14 | 733 | 1,974 | <issue_start>username_0: I created a plain vanilla app using ember-cli v 3.0.0 and added a route to it. When I build the app and serve it using ember-serve, all routes are loaded successfully. However, when I change working working directory to dist and serve it using http-serve, none of the routes load.
Is there any... |
2018/03/14 | 1,448 | 5,857 | <issue_start>username_0: I have a pretty standard setup related to `JMS` - `Spring Boot` and `ActiveMQ`. It works fine, until i tried to do a simple integration test. After some investigation I found that both the Spring context and the embedded broker are closed after the first JMS message has been consumed, no matter... |