date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/01 | 403 | 1,653 | <issue_start>username_0: I am developing an application for dealing with kubernetes runtime microservices. I actually did some cool things, like moving a microservice from a node to another one. The problem is that all replicas go together.
So, Imagine that a microservice has two replicas and it is running on a namesp... |
2018/03/01 | 369 | 1,339 | <issue_start>username_0: I am trying to test (pytest) some code in python.
I instantiate a logger object with
```
import logging
logging.getLogger()
```
Now I would like to retrieve the logger object created in order to perform some asserts on it.
But if I inspect the global variables I cannot see it.
Where is t... |
2018/03/01 | 489 | 1,476 | <issue_start>username_0: I'm trying to rewrite this Python2 code to Python3 accepted syntax. The .index() methods generates the following error:
AttributeError: 'dict\_values' object has no attribute 'index'
This is because .index() is no valid syntax in Python3. I've read that a list should be used to work around th... |
2018/03/01 | 379 | 1,266 | <issue_start>username_0: Consider the next HTML:
```
* Small
```
How can I add a class to the `li` element using the id of the `span` element inside the `li`?<issue_comment>username_1: Since `li` is the parent of `span`, you can use `.parent()`
Here is a snippet:
```js
$(function() {
$("#package_s").parent().ad... |
2018/03/01 | 633 | 2,436 | <issue_start>username_0: I am attempting to create an upload document which will upload a profile picture. I am having trouble capturing the data from the `changePicture` form which only has an input for the images and a submit. I have never used the `FormData` object to date, so I am still learning around this. Any gu... |
2018/03/01 | 1,391 | 4,471 | <issue_start>username_0: well I can run my app on device in debug mode and there is no problem but if I want to generate signed apk it gives this error
>
> Error:Execution failed for task ':app:transformDexWithDexForRelease'.
>
>
>
> >
> > com.android.build.api.transform.TransformException: com.android.ide.common... |
2018/03/01 | 1,032 | 3,571 | <issue_start>username_0: So this is my code :
```
var result = JSON.parse(res);
if (result.data.status === 404) {
client.chatMessage(steamid,"Please check that the order id is correct, Code = ERR:404")
} else {
var meta = result.meta_data;
... |
2018/03/01 | 188 | 660 | <issue_start>username_0: I want to go to the cart after submit a form.
This is my form :
```
Send
```
How can we do this please ?
Thanks :)<issue_comment>username_1: You can use the *redirect* function from *Tools* class to perform redirections.
Just put the code below in your controller, once you've processed th... |
2018/03/01 | 813 | 2,405 | <issue_start>username_0: I think you guy already heard of a code like this
```
(c & (1 << i)) ? '1' : '0';
```
I already stored this on an array but it gives me a wrong binary.
Here's the additional code
```
int i;
char test[8];
for(i=7 ; i>=0; i--){
test[i] =(c &(1 << i)) ? '1' : '0';
}
int j = atoi(test)... |
2018/03/01 | 931 | 2,980 | <issue_start>username_0: This is some working code that I wrote to call a JSON file and cache it on my servers.
I'm calling the cached file. If the file exists I use json\_decode on it. If the file doesn't exist I then call the JSON and decode that. Then after calling the JSON url, I write the contents to the cached ... |
2018/03/01 | 815 | 3,565 | <issue_start>username_0: I have a piece of code that sets up a work space and download files from tfs work space programmatically. I want to extend to specify what solutions can I download in that work space. Any ideas how I can do this?
```
private GetStatus DownloadLatestFiles()
{
Workspace workspace = n... |
2018/03/01 | 2,313 | 6,189 | <issue_start>username_0: Hi guys I'm using bootstrap 3 and trying to get my navbar to look something like this :
[](https://i.stack.imgur.com/qCpxt.png)
The problem I'm facing is trying to get the logo to float to the left and then the icons to float... |
2018/03/01 | 289 | 1,338 | <issue_start>username_0: I am new and experimenting with Google Cloud Storage. I deleted my bucket while trying to learn how to restore my data back. I was under the impression that even if you delete a bucket it can be restored. But I am not finding that option on the console.
How can I restore the bucket I deleted o... |
2018/03/01 | 1,578 | 5,854 | <issue_start>username_0: Whenever I made the position style 'absolute' for this view, it disappears. I have no idea why it is happening.
```
import React, { Component } from 'react';
import { Text, View, Image, TouchableOpacity, StyleSheet } from 'react-native';
export default class App extends Component {
render()... |
2018/03/01 | 475 | 1,658 | <issue_start>username_0: I can't seem to get jquery find working on a product grid I have. Any idea how I can set it up?
```
[Email
me when available](#)
```
Javascript code:
```
jQuery('.notify-me').click(function() {
alert('hello');
jQuery($(this).parent().find('.notify-me-wrapper').fadeIn());
... |
2018/03/01 | 1,224 | 3,992 | <issue_start>username_0: I have a simple vue app with 3 routes using vue-router package. Lets say homepage has 3 big square columns, about one big text block and contact a form with 4 form rows.
When I use the default element around my element it fades in- and out nicely, but I want specific animations for each rout... |
2018/03/01 | 1,330 | 4,535 | <issue_start>username_0: For example:
If the string is ' "normal" script ' - output should show that substring `normal` is in double quotes whereas the substring `script` is not.
To trace double quoted substring from a string, I tried with the regex:
>
> r' "([^"]\*)" '
>
>
>
We can use `split()` method to get... |
2018/03/01 | 1,165 | 3,906 | <issue_start>username_0: ```
export class Person{
name:string,
age:number,
listAdress:Map
}
```
I need to parse all adresses of each person
```
==> it is possible ??
```
how can I iterate all adresses with key of Map
if we suppose that the key of Map is 'Fes'<issue_comment>username_1: I know that `split()` is ... |
2018/03/01 | 1,161 | 4,652 | <issue_start>username_0: I'm trying to make a UWP app with a `NavigationView`. My problem is to find a way that the `Header` changes for the current shown page. My app is based on the Microsoft UWP example "AppUIBasics". In the example the `Header` of the `NavigationView` shows always "Welcome" because its hardcoded bu... |
2018/03/01 | 758 | 2,633 | <issue_start>username_0: I want to plot a dark green and a dark green dashed graph, but unfortunately MatLab complains that the vector does not have the same length
>
> Error using plot
>
>
> Vectors must be the same length.
>
>
> Error in EasySim (line 174) `
>
>
>
```
plot(x,z1,'b--',x,z2,'c--',x,z3,'b',x,z... |
2018/03/01 | 653 | 2,514 | <issue_start>username_0: I have created a list ['A', 'B', 'C', 'D'] and I would like to know if any of those 4 elements are found or not.
I tried to use count command in list but this function can check a specific element. Is there any other function which checks the all elements in the list?<issue_comment>username_1... |
2018/03/01 | 637 | 2,072 | <issue_start>username_0: Now this is a little confusing for me, but std::string::iterator actually yields a char (as revealed by typeid). I need it as a string though. How can I do this?
```
#include
#include
int main(){
std::string str = "Hello World!";
for( std::string::iterator it = str.begin(); it != str.end(... |
2018/03/01 | 744 | 2,918 | <issue_start>username_0: I have the following code to send messages to the bus:
```cs
var queueClient = new QueueClient(ServiceBusConnectionString, QueueName);
var message = new Message(poco.SerializeToBytes());
await queueClient.SendAsync(message);
```
But they seem to be going straight into the DEAD-LETTER MESSA... |
2018/03/01 | 485 | 1,744 | <issue_start>username_0: I want to generate a JSON schema from POJO array using Jackson 2.7.0:
```
JsonSchema schema = mapper.generateJsonSchema(MyClass[].class);
```
So I expect to get JSON schema:
```
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string... |
2018/03/01 | 1,373 | 4,818 | <issue_start>username_0: I have used solidity to push data into an array. Is there a similar function for pop ?
```
string[] myArray;
myArray.push("hello")
```
What is the best solution for this ? How do I delete an element in a dynamic array in solidity ?<issue_comment>username_1: **Update 2-19-2019**: As Joel poin... |
2018/03/01 | 814 | 2,756 | <issue_start>username_0: I would like to use Jupyter Notebook for editing JModelica python scripts; however after installing, the Jupyter notebook cannot locate key libraries, such as pymodelica.
Here is the process I followed to install Jupyter Notebook for JModelica Version 2.1:
1. In the IPython terminal: `!pip i... |
2018/03/01 | 646 | 2,127 | <issue_start>username_0: I have set up two containers for Nginx and NodeJS in Ubuntu 16.04 Xenial on AWS. I use docker-compose. Everything works fine.
I would like to look into the Nginx container. For the same I use the command:
```
sudo docker exec -it bash
```
And I get the following error
```
oci runtime erro... |
2018/03/01 | 462 | 1,540 | <issue_start>username_0: so i want to do the same with alphabets that i did with numbers take a look
```
num1=int(input("enter Ist digit:"))
num2=int(input("enter IInd digit:"))
num3=int(input("enter IIIrd digit:"))
num4=int(input("enter IVth digit:"))
num5=int(input("enter Vth digit:"))
```
i want to enter letters ... |
2018/03/01 | 783 | 2,686 | <issue_start>username_0: I've got a scripts
`"build": "rimraf dist webpack --progress --config webpack/prod.js",`
But actually,it removed not dist but all file inside webpack folder. But I need delete only dist
```
Structure:
-dist
-webpack
-somefiles.js
```<issue_comment>username_1: Npm scripts are basically... |
2018/03/01 | 289 | 927 | <issue_start>username_0: Hi I am a newbie in web development and I want to know what should PHP server to install in my laptop with a linux operating system?<issue_comment>username_1: On a Debian based distro (like Ubuntu) it is a good idea to install PhpMyAdmin, as this package includes all the necessary dependecies (... |
2018/03/01 | 883 | 2,749 | <issue_start>username_0: I have a django project built with `Django 1.10.7` and `mysql 14.14 Distrib 5.5.54`
If I do:
```
$ python manage.py makemigrations my_app
```
I get:
>
> Migrations for 'my\_app':
>
> my\_app/migrations/0023\_auto\_20180301\_1419.py:
>
> - Alter field reference on league
>
>
>
... |
2018/03/01 | 1,208 | 4,183 | <issue_start>username_0: I use
[*smartmatch*](https://perlmaven.com/smart-matching-in-perl-5.10)
to check whether a string matches a regex pattern. It stopped working after I decided to store the regex in a text file.
```
my $str = '123456, some text.';
my $regex = qr/^\d+, some text\.$/;
print "Regex: $regex\n";
`... |
2018/03/01 | 531 | 1,468 | <issue_start>username_0: So what I want to do is to add columns to a dataframe and fill them (all rows respectively) with a single value.
```
import pandas as pd
import numpy as np
df = pd.DataFrame(np.array([[1,2],[3,4]]), columns = ["A","B"])
arr = np.array([7,8])
# this is what I would like to do
df[["C","D"]] =... |
2018/03/01 | 984 | 3,189 | <issue_start>username_0: I have an Appbar and a drawer right beneath it. Under both components I have 3 `divs` with bootstrap and in each `div` I have a group of buttons.
The problem is that the Drawer covers the Appbar and I just can't seem to move it.
Here's my code:
```
title
1
2
1
2
<NAME>
```
After ... |
2018/03/01 | 1,810 | 5,135 | <issue_start>username_0: I have a table which has multiple columns and rows. I want to access the each value by its `column name` and `rowname`, and make a plot with these values.
The table looks like this with `101 columns`:
```
IDs Exam1 Exam2 Exam3 Exam4 .... Exam100
Ellie 12 48 33 64
... |
2018/03/01 | 236 | 804 | <issue_start>username_0: I am looking for this solution in xslt 2.0:
Input: `+47(12)1234567`
Output: `+47121234567`
I tried to use this:
`replace(replace('$Input', '(',''), ')','')`
But it throws an error as '(' and ')' are unable to be escaped with the above code.
Please can some one point out the correct solut... |
2018/03/01 | 868 | 3,751 | <issue_start>username_0: The following service fails to rollback persisting the `Foo` object if an `IllegalStateException` is thrown although I have marked `MyServiceImpl` as `@Transactional(rollbackFor = IllegalStateException.class)`. I have also tried to mark the `upload` method as `@Transactional(rollbackFor = Illeg... |
2018/03/01 | 1,139 | 2,810 | <issue_start>username_0: I have a select dropdown which is in dd/MM/yyyy date formate, but it also contains a non-date option. how to dismiss the non-date option when sorting?
sort function:
```
function str2Date(strD){
var from = strD.split("/");
var f = new Date(from[2], from[1] - 1, from[0]);
retur... |
2018/03/01 | 1,052 | 2,931 | <issue_start>username_0: Is there a way, to animate a loaded JSON model colors in three js?
As you could see it, I used the the `ObjectLoader()` in my code and it renders the model, but after that I would like to animate the color of it.
```
var objectLoader = new THREE.ObjectLoader();
var model;
... |
2018/03/01 | 761 | 2,720 | <issue_start>username_0: I am trying to send an invitation email to my Laravel Web App, in which some parameters also have to be passed. Im not able to send an email and guess the problem is not with my configuration. Can someone help me on this?
This is my form to send the invitation to an email:
```
{!! Form::open(... |
2018/03/01 | 187 | 685 | <issue_start>username_0: I would like some help on how to SUM numbers of a column only if some criteria is matched and SUBTRACT from the first SUM only if some other criteria is matched?
Looking at the screenshot below. Iam basically looking for a formula to give me the balance for each metal.
[![enter image descript... |
2018/03/01 | 1,135 | 4,051 | <issue_start>username_0: Here what appears in the console when I run my code:"Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "isChecked"".
I have seen what other posts s... |
2018/03/01 | 1,540 | 6,387 | <issue_start>username_0: I am having difficulty using a custom index.html and other assets with swashbuckle. Swashbuckle/Swagger do not seem to recognizing or using them at all. I do have app.UseDefaultFiles() and app.UseStaticFiles() set. I am trying to understand what I am doing incorrectly.
I have attempted to set ... |
2018/03/01 | 341 | 1,326 | <issue_start>username_0: ```
$ flutter doctor
```
Downloading Dart SDK 2.0.0-dev.16.0...
Unknown operating system. Cannot install Dart SDK.
error got shown up,why it occurs.<issue_comment>username_1: $ flutter doctor
Run this command in either a Command Prompt or PowerShell window. Currently, Flutter does not suppo... |
2018/03/01 | 1,219 | 4,178 | <issue_start>username_0: I am trying to use python to find four-line blocks of interest in two separate files then print out some of those lines in controlled order. Below are the two input files and an example of the desired output file. Note that the DNA sequence in the Input.fasta is different than the DNA sequence ... |
2018/03/01 | 1,655 | 5,531 | <issue_start>username_0: I will admit that Excel is far from my strength, so any help would be appreciated.
We have a large pull of data in an excel spreadsheet (~15,000 lines) that needs to be reported against.
For each item in Column A, there are one or more values in Column B.
The table below depicts what I mean,... |
2018/03/01 | 1,050 | 3,030 | <issue_start>username_0: Initializing an array of pointers to structs in C can be done using compound literals.
```
typedef struct {
int a;
int b;
} s;
```
In C:
```
s *ptrArray[] = {
&(s){
.a = 1,
.b = 2
},
&(s){
.a = 4,
.b = 5
}
};
```
How can this be done in C++... |
2018/03/01 | 655 | 2,556 | <issue_start>username_0: I included scripts as follows in angular-cli.json file:
```
"scripts": [
"assets/app/vendors/js/vendors.min.js",
"app-assets/js/core/app-menu.js",
"app-assets/vendors/js/charts/raphael-min.js",
"app-assets/vendors/js/charts/morris.min.js",
"app-assets/js/scripts/charts/mor... |
2018/03/01 | 634 | 2,466 | <issue_start>username_0: I try add Node to ListView so:
```
auto nodeToAdd = loadCcbAsNode("fileccb.ccbi").get();
for (size_t i = 1; i < 10; i++)
{
listView->addChild(nodeToAdd); // it's cocos2d::ui::ListView
// which i load to scene
}
```
But get so error:
>
> C... |
2018/03/01 | 2,164 | 5,811 | <issue_start>username_0: This code:
```html
body {
font-family: "Lato", sans-serif;
}
.sidenav {
width: 130px;
position: fixed;
z-index: 1;
top: 20px;
left: 10px;
background: #eee;
overflow-x: hidden;
padding: 8px 0;
}
.sidenav a {
padding: 6px 8px 6px 16px;
text-decoration: none;
f... |
2018/03/01 | 358 | 1,755 | <issue_start>username_0: I am using MySQL database, when I am doing:
```
models.modelA.findAll({
attributes: [
['modelA.id','id']
],
raw: true,
include:
[
{
model: models.modelB,
... |
2018/03/01 | 1,279 | 4,825 | <issue_start>username_0: I found a very simple problem using Java Duration.
```
LocalTime SaturdayStart = LocalTime.of(22, 30);
LocalTime SaturdayEnd = LocalTime.of(01, 00);
System.out.println(SaturdayStart);
System.out.println(SaturdayEnd);
System.out.println(Duration.between(SaturdayStart, ... |
2018/03/01 | 1,336 | 5,033 | <issue_start>username_0: I have this dataframe:
```
df:
type . size . margin . height
0 . A . 2 . 5 . 1
1 . A . 3 . 4 . 1
2 . B . 1 . 1 . 3
```
I want to groupby type, count the number of companies in each type and calculate the medians for all col... |
2018/03/01 | 980 | 3,280 | <issue_start>username_0: I have created the following simple Fibonacci implementations:
```
#![feature(test)]
extern crate test;
pub fn fibonacci_recursive(n: u32) -> u32 {
match n {
0 => 0,
1 => 1,
_ => fibonacci_recursive(n - 1) + fibonacci_recursive(n - 2)
}
}
pub fn fibonacci_impe... |
2018/03/01 | 1,311 | 4,837 | <issue_start>username_0: I'm trying to execute this following program but I'm getting some errors (I've commented the lines that have errors with /\*\*/, while normal comments have //)
Essentially I'm:
1. Selecting records from a mysql table where status is not 'S'
2. Holding the ID and status code for those records ... |
2018/03/01 | 785 | 2,785 | <issue_start>username_0: ```
## class restaurant ##
```
>
> Implemented superclass
>
>
>
```
class Restaurant():
def __init__(self, restaurant_name, cuisine_type):
self.restaurant_name = restaurant_name
self.cuisine_type = cuisine_type
def describe_restaurant(self):
print('This restaurant is called... |
2018/03/01 | 995 | 2,625 | <issue_start>username_0: I Have a JSON input format, here's an exemple :
```
{
"friends": [
{
"id": "5a8d4euyiuyiuyhiuyc022c7158d5",
"name": "<NAME>"
},
{
"id": "5a8d4e2rytuyiyuyiytiy3e426",
"name": "<NAME>"
}
]
}
```
I would transform it to an array key: value arrays, som... |
2018/03/01 | 1,257 | 3,244 | <issue_start>username_0: I have 2 tables, one being a date list and the other being a list of objects with a corresponding start date. I would like to join the tables such that the ID appears alongside a date from the date list given that it's start date is greater than or equal to the start date of the object.
```
... |
2018/03/01 | 532 | 1,610 | <issue_start>username_0: I have the following folder structure:
* app/ (contains index.php, js/, public/)
* v1/
* .htaccess
Requests to v1 should work as usual.
All other requests should go to /app without changing the URL
```
www.xxx.com/ (displays: app/index.php)
www.xxx.com/v1 (displays: v1/inde... |
2018/03/01 | 533 | 2,104 | <issue_start>username_0: I want to trigger a Lambda function from s3 event and sns event.
Current version is like that:
```
public class LambdaFunctionHandler implements RequestHandler {
public Object handleRequest(S3Event input, Context context) {
context.getLogger().log("S3Event: " + input);
return null;
}
}
... |
2018/03/01 | 560 | 2,258 | <issue_start>username_0: Can someone help me how to get the value of the string `x` and put it to another class? I want to use the value of string `x` in another class.
```
namespace WindowsFormsApp6
{
public partial class Titles : Form
{
public Titles(string strToDisplay)
{
Initial... |
2018/03/01 | 678 | 2,474 | <issue_start>username_0: I have the following `class` where I specify a `Date` type for the `birtDate`.
When I create an instance of the class, and I fill the date in the following way, this is what I get on the front-end: `Sun Jun 17 2012 00:00:00 GMT+0200 (CEST)`
I only want the `Jun 17 2012`part, so what format sh... |
2018/03/01 | 746 | 2,652 | <issue_start>username_0: I am using SpringBoot "1.5.10.RELEASE" to manage .properties file like this:
```
#Queue1
br.net.enterprise.server.name.1=server1.company.net
br.net.enterprise.server.port.1=4416
br.net.enterprise.server.protocol.1=t3
br.net.enterprise.server.queue.1=DistributedQueue-ERROR
br.net.enterprise.ser... |
2018/03/01 | 505 | 1,927 | <issue_start>username_0: I finished my cross platform (Xamarin) App for iPhone, tested on a real device (from friend) with Free Provisioning. Everything is fine.
Now I am ready to distribute in the App Store, so I paid for the Developer Program. But it's still pending, and now I have to give the iPhone back - so don'... |
2018/03/01 | 323 | 1,080 | <issue_start>username_0: I have code that will remove a string from a file if the string contains `:` at the **start** of the string.
```
with open("test1.txt") as the_file:
for each_line in the_file:
each_line = " ".join(filter(lambda x:x[0]!=':', each_line.split()))
print(each_line)
```
What i... |
2018/03/01 | 369 | 1,376 | <issue_start>username_0: Need help getting the save function to work, Im new to CoreData and im just following along with a treehouse course but either the treehouse course was using a previous version of xcode or a different version of swift because when i followed along it gave me an error.
the error says "value of... |
2018/03/01 | 269 | 976 | <issue_start>username_0: I want to create a function for woocommerce with which when a visitor adds more than one product in their cart, $2 is added in addition every product quantity to the shipping cost for every product.
For example one product, shipping cost is applicable. For additional product or more than 1 qua... |
2018/03/01 | 676 | 2,011 | <issue_start>username_0: I am using openblas on the AMD Epyc 'zen' cpus. To install it I simply did make TARGET=ZEN
I have a system with 2x 7601 (i.e. 2 x32 cores) and I can run across all cores and get an ok GFLOPS number from DGEMM using export OMP\_NUM\_THREADS=64
But I am now trying to pin it to a smaller set of ... |
2018/03/01 | 598 | 2,284 | <issue_start>username_0: I have some existing C++ code that I am editing under eclipse Oxygen. It is reporting errors in the IDE because the original project under a different IDE was configured to include a specified default header file automatically. How can I do this in eclipse.
Not asking how to change a template... |
2018/03/01 | 793 | 2,538 | <issue_start>username_0: I am new to vim. I read online that one of the best fuzzy finder in vim is fzf. I have started using it. But whenever I write the command :Ag I get `ag is not found`. I don't know what it means and I don't know how to fix it.<issue_comment>username_1: You need to install [ag](https://github.com... |
2018/03/01 | 1,678 | 6,608 | <issue_start>username_0: Thank you guys for all your help thusfar with setting up this recursive loop in Team drive. Below is what I have so far. My only problem at this point is that there are tens of thousands of folders in my specified Team Drive. So I think I need to get a continuation token to keep the script runn... |
2018/03/01 | 1,055 | 3,964 | <issue_start>username_0: Ionic newbie here. I'm using Ionic 3 and the BLE plugin. The way this plugin works is you start scanning for Bluetooth devices, you are notified with each new scan result, and then when you are done you cancel the scan. I'm just trying to append an element into an `ion-list` each time a new sca... |
2018/03/01 | 619 | 2,151 | <issue_start>username_0: okay so after a lot of searching i decided to ask the question i've tried doing print[0] but i got the error
```
Traceback (most recent call last):
```
File "", line 1, in
print[0]
TypeError: 'builtin\_function\_or\_method' object is not subscriptable
```
['a', 'c', 'e']
[1, 3, 5]
```
... |
2018/03/01 | 3,013 | 8,867 | <issue_start>username_0: I'm using [JSQCoreDataKit](https://github.com/jessesquires/JSQCoreDataKit) for setting up Core Data stack.
My setup includes two CoreData stacks, one backed by SQLite database, the second in-memory only.
In my app, during log out, I'm resetting both stacks - see the code: <https://github.com/... |
2018/03/01 | 173 | 649 | <issue_start>username_0: I have my application written in Nodejs using Express and mongoose. I deployed it on a server using pm2 with 4 instances. However, I need to deploy it onto multiple servers. Is there a way possible with pm2?<issue_comment>username_1: You can see PM2 deploy : <http://pm2.keymetrics.io/docs/usage... |
2018/03/01 | 1,659 | 6,370 | <issue_start>username_0: I do have an Observable of Contacts in my onInit method and I also will set the first contact of the Observable into my form.
Has anyone a hint how to do this?
```
ngOnInit() {
let contactsObservable: Observable =
this.contactService.getAllContacts();
contactsObservable.subscribe(cont... |
2018/03/01 | 2,411 | 8,522 | <issue_start>username_0: I have a html page with a simple form. This page is loaded as the '/' index of my application.
with this script:
```
$(document).ready(function(e){
$('#auth').on('submit',function(){
getValues();
});
});
```
I call an external file that gets the value of the inputs and has t... |
2018/03/01 | 527 | 2,114 | <issue_start>username_0: I am beginner. I have a UILabel called display. it only displays number . Its a calculator App. now when I click a button with currentTitle "." I want to insert a point to the already existing number on display. Lets Say this is the number "78" now when "." is tapped I want it to be "78." I kno... |
2018/03/01 | 1,279 | 4,548 | <issue_start>username_0: I have a form with some inputs and a CSS attached to them that uses attribute value selectors to change the background color of the input depending on the value.
Example
```
input[value="foo"] { background-color: red; }
```
If I use `foo` as a value when loading, as in the code, the field... |
2018/03/01 | 1,507 | 4,690 | <issue_start>username_0: Please assist me with the SQL query shown below.
This is the error I get:
>
> System.Exception: TransformerException ---> Library.Utilities.TransformerException: Transformer transforming [00000000000**85153227**:documentId] using [4:transformId] with time remaining [00:00:54.4517645:TimeSpan... |
2018/03/01 | 1,545 | 4,441 | <issue_start>username_0: Suppose that I have lower triangular matrix i.e.,
```
w1 <- c(0,0.6,0.3,0.6,0.7,
0,0,0.6,0.6,0.7,
0,0,0,0.6,0.6,
0,0,0,0,0.7,
0,0,0,0,0)
w1 <- matrix(w1,5,5)
```
Then, I would like the second matrix to be a lower triangular matrix, say `w2` where each non-zero values of `w2` ... |
2018/03/01 | 515 | 1,946 | <issue_start>username_0: I want to pull the src of the active image inside bootstrap carousel each time it changes. Below is what I have now which works for the first image, but doesn't change when the next one fires.
```
$(document).ready(function() {
$('#galleryCarousel').on('slide.bs.carousel', function () { ... |
2018/03/01 | 545 | 2,063 | <issue_start>username_0: Situation:
I just created an Azure Storage file share and I figured out how to upload files via script (C#) to the Azure BLOB storage.
Problem:
I want to upload files via script to my Azure storage file share (not BLOB). I already installed the Azure CLI but the problem is I have to login firs... |
2018/03/01 | 2,581 | 8,680 | <issue_start>username_0: I'm having troubles retrieving `balance` information from my table. Dataset looks like this:
```
| Name | Last Name | Balance | Update Date |
+---------------+---------------+---------+-------------+
| John | Doe | $1600 | 2017-01-01 |
| John | Doe ... |
2018/03/01 | 763 | 2,053 | <issue_start>username_0: I have an empty list called 'label', where depending on which bucket is more appropriate, it will fill the 'label' list with 0,1,or 2.
'label' is associated to the 3 'buckets':
```
# Bucket 0: 0 -7 Days --------------------------> 0
# Bucket 1: 1 - 6 Weeks (8 - 42 Days) ----------> 1
# Bucke... |
2018/03/01 | 644 | 2,052 | <issue_start>username_0: I have some mappings in my .vimrc with ALT. They are:
```
nnoremap :m .+1==
nnoremap :m .-2==
```
Expected behavior: These two mappings are supposed to move a line up and down. But they are not working. I am not even getting any error or warning. But when I use shift, they are working fine... |
2018/03/01 | 349 | 1,192 | <issue_start>username_0: I need to write a function that will take a string 'camelCased' and then format it to add spaces to it: 'camel Cased'.<issue_comment>username_1: You can use regex to split on capitals and then rejoin with space:
```
.split(/(?=[A-Z])/).join(' ')
```
```js
let myStrings = ['myString','myTestS... |
2018/03/01 | 1,142 | 4,454 | <issue_start>username_0: For whatever reason, the `If zoneChanged.Columns(-5).Value <> correctZone.Columns(2).Value Then` statement always evaluates as true, despite values in the cells being the same. Perhaps at this point the values are never the same, but I cannot figure out why. Also, the results that are returned ... |
2018/03/01 | 1,760 | 6,240 | <issue_start>username_0: I am currently working on weather monitoring.
For example a record of temperature has a date and a location (coordinates).
All of the coordinates are already in the database, what I need to add is time and the value of the temperature. Values and metadata are in a CSV file.
Basically what I'm d... |
2018/03/01 | 1,223 | 3,876 | <issue_start>username_0: How can I set up a cron job to monitor multiple PIs (via SSH) that are running the same daemon script (service)?
I was thinking of using a cron job to monitor the service status and write to a file on my server if the status of the service is active or inactive, and then I can later use the co... |
2018/03/01 | 1,116 | 3,484 | <issue_start>username_0: I have a given function
```
def unnorm(x, alpha, beta):
return (1 + alpha * x + beta * x ** 2)
```
Which I then integrate to find a normalization constant for in a range, and turn it to a lambda function that takes the same parameters as `unnorm`. Now, to create a fit-able object, I comb... |
2018/03/01 | 715 | 2,180 | <issue_start>username_0: Hope all goes well.
I am working on a data set that has 7 binary variables ( they are all 0 and 1) and they are not mutually exclusive.
I need to convert them all into one categorical variable which will have 2^7 levels.
I was wondering if anyone has done such a thing in R before?
I really a... |
2018/03/01 | 951 | 3,635 | <issue_start>username_0: I'm trying to test custom validations in Angular 4 and am using the 'appForbiddenName' validation provided by angular [here](https://stackblitz.com/angular/moovprgmmrab?file=src%2Fapp%2Fshared%2Fforbidden-name.directive.ts).
Here is my code set up:
```html
First Name
\*Required
Min l... |
2018/03/01 | 763 | 2,743 | <issue_start>username_0: Hello everbody @Stackoverflow,
currently I am trying to write a simple parser for the .obj File format but somehow my parser is stuck in an infinite loop after reading the last comment in my file.txt.
But it also happens in-between.
The parser should do following:
If the current char is a '#... |
2018/03/01 | 1,067 | 3,737 | <issue_start>username_0: I would like to test a filter function I wrote which return a date formatted using Intl.DateTimeFormat('en-GB', options):
```
// module "date.js"
export default function (dateISOString) {
const options = {
year: 'numeric',
month: '2-digit',
day: '2-digit',
t... |
2018/03/01 | 745 | 2,313 | <issue_start>username_0: I am currently working on a web-form project and have created a navigation bar. I was wondering what I'd have to do in order to make the navigation bar responsive so that when the window size is readjusted, the navigation bar will change accordingly instead of squishing together.
The code that... |
2018/03/01 | 1,512 | 4,656 | <issue_start>username_0: I have a snippet of code that defines (what I believe to be) an empty array, i.e. an array containing no elements:
```
int a[] = {};
```
I compiled the snippet with gcc with no problem
A colleague attempting to get that same code to compile under MSVS made the modification:
```
int* a = NU... |
2018/03/01 | 1,296 | 3,432 | <issue_start>username_0: I have a large dataset with company names and years:
```
2001 company 1
2002 company 1
2003 company 1
2004 company 1
2001 company 2
2002 company 2
2001 company 3
2003 company 3
2004 company 3
```
I need to write a function that will, given years n and m, provide me a list of compani... |
2018/03/01 | 391 | 1,583 | <issue_start>username_0: I have an application with multiple projects. Of course, each project create it's own dll. Then we can use `AppDomain.CurrentDomain.GetAssemblies().ToList()` to get all assemblies to use reflection for many reasons.
The `AppDomain.CurrentDomain.GetAssemblies()` is going to scan every assembly ... |
2018/03/01 | 579 | 1,869 | <issue_start>username_0: Why Scala case class copy method parameterised only with the variables defined in the case class?
The question based on on the Q&A:
[Case class copy does not maintain state of an inherited trait](https://stackoverflow.com/questions/48812293/case-class-copy-does-not-maintain-state-of-an-inheri... |