date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/02 | 1,363 | 5,274 | <issue_start>username_0: I'm working on building a 2048 game and trying to build a stopping condition. But facing some issues with two variables. The idea I tried was simple - stop the execution when two matrix values (one that holds the current 4x4 board values and another the previous step's values) equals each other... |
2018/03/02 | 576 | 2,032 | <issue_start>username_0: So basically what I'm trying to achieve is to make the placeholder of the inputs change when I change the select. The first input successfully changes, but that doesn't seem to be the same with the second input. Below is the code that I am using:
```js
function onChange(fromOrTo) {
if (from... |
2018/03/02 | 1,351 | 4,322 | <issue_start>username_0: In TypeScript it's possible to create a class with a constructor that takes parameter with access modifiers and it automatically convert those parameters in class fields.
```
class Item {
constructor(
public id: number,
public updatedAt: number,
public createdAt: number,
) {}
}... |
2018/03/02 | 1,392 | 4,125 | <issue_start>username_0: So I need to set a variable to an index of a list if it is higher than the value from the first list but lower than the value from a second list. I have flowDir as a value from 0 to 360. I am trying to set Direction variable to the right index
```
new_array1 = [22.5, 67.5, 112.5, 157.5, 202.5,... |
2018/03/02 | 738 | 2,367 | <issue_start>username_0: I have a Combobox with values: "none", "1", "2", "3" and "4". And I want to have visible the number of pages shown by the Combobox. How can I achieve that? i.e. combobox = 3 - Pages 1, 2 and 3 become visible.<issue_comment>username_1: Finally got it
```
Private Sub ComboBox1_Change()
Select Ca... |
2018/03/02 | 767 | 2,606 | <issue_start>username_0: I want to know what php version other site is using of which I cannot access to the server.
I thought server would give the PHP version when browser communicate with server if the site is made by PHP, but I could not find that information on Network tab of Google Developer Console.
(HTTP Heade... |
2018/03/02 | 911 | 3,560 | <issue_start>username_0: I want to make decorator with class variables.
How can I make decorator to class function?
Because I have a lot of functions that need to lock.
I don't want to write down
```
with self.lock: or self.lock.release()
```
every function.
this is my code!
```
class Something:
self.lock = L... |
2018/03/02 | 1,088 | 3,896 | <issue_start>username_0: there is a JSON file that has this kind of view
```
{
"A":
{
"B": 0,
"C": 1
},
"D":
{
"E": 2,
"F": 4
}
}
```
I need that after reading the file by the program, each field of structures "A" and "D" to be given a random value from a certain range to get a new JSON file, for exa... |
2018/03/02 | 6,057 | 9,286 | <issue_start>username_0: I need to disable emojis for my react native keyboard app. When my keyboard appear, the emoji icon is visible and i need to make it unavailable to prevent user to insert emojis in texts.
Any suggestions ?<issue_comment>username_1: You can try with the `keyboardType="ascii-capable"` in the `Tex... |
2018/03/02 | 563 | 2,038 | <issue_start>username_0: Got this sequence in some code. Looking to convert the c-style cast in the function call to c++ style cast.
```
char* messageBuffer{ nullptr };
const unsigned long size{ FORMAT_MESSAGE(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
0,
... |
2018/03/02 | 235 | 869 | <issue_start>username_0: If i have multiple tables like on the picture below, then I want to get the most active user (counted from posted\_by column), for example on this picture Mike is the most active user, what query should i run? Thank you
[](... |
2018/03/02 | 1,031 | 3,343 | <issue_start>username_0: I'm trying to copy multiple NSImages to the Pasteboard using Swift 4 - like this:
```
private func putItemsOnPasteboard (_ items: [Int]) {
if let images = mainImageController?.getNSImages(for: items) {
NSPasteboard.general.clearContents()
NSPasteboard.general.writeObjects(i... |
2018/03/02 | 941 | 2,688 | <issue_start>username_0: I am new to python sorry if I have made any errors
I have a data like this
```
ENSG1 1:24 2:56 3:47 4:68 5:89
ENSG2 1:25 2:57 3:48 4:69 5:90
ENSG3 1:26 2:58 3:49 4:70 5:91
```
The first column is the {key} and the remaining columns will be the {valu... |
2018/03/02 | 1,434 | 5,003 | <issue_start>username_0: I am new on MVC. How can I combine two action result on my below code:
```
public ActionResult TreeView()
{
var db = new PCNMSContext();
return View(db.AssetRegisters.Where(x => !x.ParentAssetID.HasValue).ToList());
}
public ActionResult AssetRegisterIndex(string Sea... |
2018/03/02 | 530 | 2,027 | <issue_start>username_0: I am currently using the redigo library for my project where i create a redis pool
I use `defer` to release the redis connection every time i get one from the pool
```
c := redisPool.Get()
defer c.Close()
```
But it will block forever in this scenario if `MaxActive` has been set
```
func f... |
2018/03/02 | 538 | 2,027 | <issue_start>username_0: I have this code:
```
#include
int main() {
char\* name;
std::cout<<"Ingresa tu nombre: \t";
std::cin>>name;
std::cout<<"Tu nombre es: \t"<
```
When the variable name is of type `int`, it works fine, but when the variable is of type `char`, to store the whole name, when entering it the p... |
2018/03/02 | 770 | 2,092 | <issue_start>username_0: I have a dataset with n observations and say 2 variables X1 and X2. I am trying to classify each observation based on a set of conditions on their (X1, X2) values. For example, the dataset looks like
```
df:
Index X1 X2
1 0.2 0.8
2 0.6 0.2
3 0.2 0.1
4 ... |
2018/03/02 | 1,168 | 3,484 | <issue_start>username_0: I've implemented my program but I am getting an exception `java.lang.ClassCastException`
This is the code:
```
import java.util.NoSuchElementException;
public class BasePQStack implements Stack {
// TODO: implement this object.
private int N = 0;
private MaxPQ pq = new MaxPQ<>();
private in... |
2018/03/02 | 813 | 2,501 | <issue_start>username_0: Forgive me if this has been asked before, but I couldn't find the answer to this.
I want to count the pairs in two separate lists. Each pair is counted including duplicates (this is why I believe sets wont work) For example:
```
fun(A, B):
return count
if A = [1 1 0 0] and B = [1 2 2 1]
re... |
2018/03/02 | 1,662 | 5,998 | <issue_start>username_0: How can I export my php table with pagination into excel and pdf format? I've tried many plugins and tutorials on youtube still no luck but they only get the data displayed not the entire table itself. I want to export my table to at least printable version better if I can convert my table into... |
2018/03/02 | 932 | 3,558 | <issue_start>username_0: The `time` function in the header `time.h` is defined by POSIX to return a `time_t` which can, evidently, be a signed int or some kind of floating point number.
<http://en.cppreference.com/w/c/chrono/time>
The function, however, returns `(time_t)(-1)` on error.
Under what circumstances can `... |
2018/03/02 | 850 | 2,979 | <issue_start>username_0: I am joining two table and I want to update all the rows.
```
php
include("connection/mysqlconnect.php");
$sql=" SELECT course.duration, course.id, students.ID
FROM course, students
where course.id=course_id and course.duration = '2'";
$result = $conn-query($sql);
$count=mysqli_nu... |
2018/03/02 | 791 | 2,784 | <issue_start>username_0: I have a matrix like below:
```
temp=[1 1 6;
1 2 6;
1 3 7;
1 4 1;
2 1 1;
2 2 2;
2 3 5;
2 4 6;
3 1 4;
3 2 3;
3 3 5;
3 4 7;];
```
Fi... |
2018/03/02 | 904 | 2,572 | <issue_start>username_0: So these bullets I have in this list are uneven and I want them to be even. I came across the answer some time ago but I could not find it for the life of me now. Any help is appreciated.
```css
#div1 {
border: black;
border-style: inset;
margin-top: 5em;
text-align: center;
}
.... |
2018/03/02 | 1,874 | 5,560 | <issue_start>username_0: I have a list of lists, and I would like to duplicate the effect of `itertools.product()` without using any element more than once.
```
>>> list = [['A', 'B'], ['C', 'D'], ['A', 'B']]
>>> [''.join(e) for e in itertools.product(*list)]
['ACA', 'ACB', 'ADA', 'ADB', 'BCA', 'BCB', 'BDA', 'BDB']
>>... |
2018/03/02 | 854 | 3,339 | <issue_start>username_0: I built a 3D image classification model with CNN for my research. I only have 5000 images and used 4500 images for training and 500 image for test set.
I tried different architectures and parameters for the training and
the F1 score and the accuracy on the training sets were as high as 0.9. It... |
2018/03/02 | 3,601 | 9,115 | <issue_start>username_0: I can connect to Postgres via the command line no problem, however if I try to connect via Python using the psycopg2 module I get the error below. Interestingly I have just tried connecting with PSeqal.app and it crashes with the same error.
Environment:
------------
* MacOS: 10.13.3
* Xcode ... |
2018/03/02 | 789 | 2,603 | <issue_start>username_0: I referred [this page](https://sonarcloud.io/web_api/api/measures/component) as described below and could get some values.
`$ curl -v "https://sonarcloud.io/api/measures/component?metricKeys=violations&component=key" | jq`
But how can I get these values with language filter?<issue_comment>u... |
2018/03/02 | 1,180 | 4,156 | <issue_start>username_0: So a quick rundown about the program I am testing. The program is a small app that register athletes' track records from all kinds of track meet. Right now I am testing the functionality of the option to create a new meet "CreateMeet". Every meet have different type of events: track, javelin, e... |
2018/03/02 | 664 | 2,077 | <issue_start>username_0: I am trying to format a string where the same variable sometimes needs to be appended with new line and tab and other times not.
I don't see any other options but using two different variables, do you think this could be achieved using the same variable?
**Example String**
The actual string... |
2018/03/02 | 1,459 | 5,520 | <issue_start>username_0: I am working on implementing [Image convolution](https://en.wikipedia.org/wiki/Kernel_(image_processing)) in C++, and I already have a naive working code based on the given pseudo code:
```
for each image row in input image:
for each pixel in image row:
set accumulator to zero
... |
2018/03/02 | 679 | 1,837 | <issue_start>username_0: ```
struct r() {
return 1, "hello";
}
int main() {
int x;
char y[100];
x, y = r(); // set x to int 1, and set y to "hello"
}
```
Is there anyway I can do this ? I believe this is possible in C<issue_comment>username_1: A function cannot return multiple values.
You can howe... |
2018/03/02 | 904 | 2,859 | <issue_start>username_0: Hi I'm having problems finding a way to have an auth state change auto direct to a page for logged in users. Before a user is created however I want to push to my database a user Profile.
So I create the user then add to the database with this code
```
firebase.auth().createUserWithEmailAndPa... |
2018/03/02 | 636 | 2,517 | <issue_start>username_0: I have a channel that I want stop animations from happening if running on a slower device like Roku Express and keep them on a faster device like Roku Premiere. Except I'm not sure what's the best way to go about it.
I wanted to filter by the amount of available ram, but I couldn't find an api... |
2018/03/02 | 626 | 2,005 | <issue_start>username_0: I would like to ask why the ini file created using my code is empty.
I intend to create an ini file on the same directory as that of the py file.
So far, the ini is generated but it is empty.
```
import os
import configparser
config = configparser.ConfigParser
#directory of folder
testdir = ... |
2018/03/02 | 2,298 | 7,998 | <issue_start>username_0: I'm new to C++ and I have to make a program that lets the user enter a specified number of test scores and calculate the average, highest, and lowest scores. (It doesn't have to check if values are between 1 and 100.) For some reason, when it goes to print out the average score and sum of the s... |
2018/03/02 | 1,898 | 6,817 | <issue_start>username_0: I'm trying to write a program in Python that multiplies two 2x2 matrices. I'm having trouble with the user input where the user is required to enter 2 digits which represents one row of the matrix.
```
userin = int(input("Enter first 2x2 matrix: ")).split(' ')
print(userin)
```
I'm getting ... |
2018/03/02 | 987 | 2,999 | <issue_start>username_0: Ranging over string
```
func main() {
str := "123456"
for _, s := range str {
fmt.Printf("type of v: %s, value: %v, string v: %s \n", reflect.TypeOf(s), s, string(s))
}
}
```
<https://play.golang.org/p/I1JCUJnN41h>
And ranging over rune slice (`[]rune(str)`)
```
func ma... |
2018/03/02 | 1,194 | 4,056 | <issue_start>username_0: 1. I have to put in an extra "test score" to get an answer.
(i.e i have to enter six 5' to get 25)
2. I can't get the do/while & if statements to loop if there is more than one number outside the "while" range. I haven't been coding for very long, a couple weeks so try and break down the answer... |
2018/03/02 | 1,787 | 5,652 | <issue_start>username_0: I designed a robot framework testing library, a specific method defined as below:
```
import json
from robot.api import logger
```
...
```
@staticmethod
def select_list_first_element_info(select_list, select_key):
if select_list and isinstance(select_list, list) and select_key:
... |
2018/03/02 | 431 | 1,606 | <issue_start>username_0: I know i might get downvoted for asking this but i really need to know:
I have index.php and no index.html
In my index.php, i dont see a body section.
I need to add some code to the body section.
I'm using wordpress theme named: "responsive".
Here is the link for it:
<https://en-ca.wor... |
2018/03/02 | 1,432 | 6,109 | <issue_start>username_0: I'm currently setting up a multiple publisher/single subscriber architecture, using Azure Storage Queues to buffer events and Azure Functions as the subscriber.
```
Publisher -> Queue -> Function
```
Creating the function is no problem, the part I am trying to work out is how to set up a dev... |
2018/03/02 | 1,444 | 6,092 | <issue_start>username_0: I am very new to Java. I am running somebody else's program on my computer, and they have imports like:
```
import weka.classifiers.CostMatrix;
import weka.classifiers.Evaluation;
import weka.classifiers.meta.CostSensitiveClassifier;
import weka.core.*;
```
The program actually works for me,... |
2018/03/02 | 3,974 | 12,588 | <issue_start>username_0: I'm looking for a faster approach to improve the performance of my solution for the following problem: a certain DataFrame has two columns with a few *NaN* values in them. The challenge is to replace these *NaNs* with values from a secondary DataFrame.
Below I'll share the data and code used t... |
2018/03/02 | 544 | 2,253 | <issue_start>username_0: At first I decided to organize my routes like I have in the code given below. However, I quickly realized that I couldn't access the routes in the group that uses middleware guest as soon as I log in. Does that mean that routes which I want to be accessible by anyone no matter whether they're l... |
2018/03/02 | 662 | 2,764 | <issue_start>username_0: My *understanding* is that in a multi-master DB architecture:
* You have 2+ DB servers, both acting as read/write masters; and
* It either up to some type of load balancer to balance operations across these multiple masters; and
* Whenever a server gets a read, it fetches and returns the queri... |
2018/03/02 | 1,250 | 3,430 | <issue_start>username_0: I am trying to work with a dataset that has distinct columns. I am looking at adding a column that provides sum of quantity against each row based on the Order ID. Please see below the input and desired output:
Input:
```
+----+---------+-----+----------+
| ID | OrderID | PID | Quantity |
+--... |
2018/03/02 | 422 | 1,385 | <issue_start>username_0: If I have the following code:
```
// objective C++ code .mm
id texture = ...;
void\* ptr = (void\*)CFBridgingRetain(texture);
share\_ptr\_with\_native\_code(ptr);
[texture do\_stuff]; // is this valid?
// native code .cpp
void share\_ptr\_with\_native(void\* ptr)
{
ptr->do\_stuff();
CFBridg... |
2018/03/02 | 489 | 1,562 | <issue_start>username_0: My question is this. Assume I have an array called `A` and I only want certain operations to happen depending on a condition. What is more efficient:
I)
```
A.forEach(x => {
if (condition1) {
//do stuff1
}
else if (condition2) {
//do stuff2
}
else if (condition3) {
//... |
2018/03/02 | 858 | 3,119 | <issue_start>username_0: When I use setState function, it seems that render function works and html changes. However, the css webkit animation does not play again and stops at its final position. Here is my CSS code
```
.enemy{
width: 80px;
height: 160px;
position: absolute;
top: 0px;
-webkit-anima... |
2018/03/02 | 753 | 2,875 | <issue_start>username_0: I am using Babel with React js.
Problem is I don't want to convert es6 to es5. I want to keep using es6.
I only need to transform jsx to js.
This is my .babelrc
```
{
"plugins": ["transform-react-jsx"]
}
```
This is my code:
```
import React from "react";
/****** Header *******/
export c... |
2018/03/02 | 263 | 1,078 | <issue_start>username_0: In my angular 4 application I want to get windows username. Is it possible with typescript or java-script ? I am using the Chrome browser.<issue_comment>username_1: For security measures, I don't think it's possible to get the windows OS user information from browser using javascript/typescript... |
2018/03/02 | 1,738 | 5,299 | <issue_start>username_0: I have an array of object like:
```
var arr = [{index: 1, key: undefined}, {index: 2, key: undefined},{index: 3, key: undefined},{index: 4, key: undefined},{index: 5, key: undefined},{index: 6, key: undefined},{index: 7, key: undefined},{index: 8, key: undefined},{index: 9, key: undefined},{in... |
2018/03/02 | 884 | 3,261 | <issue_start>username_0: My program has an Update button that downloads the latest version zip from GitHub.
It worked for many months but now the progress bar no longer updates and it doesn't download a file from the GitHub Release URL.
However, I tested it with a Google Drive URL and it works, but URL naming conven... |
2018/03/02 | 1,376 | 3,986 | <issue_start>username_0: I am new to Python and I am stuck with a problem. I have an input file which contains data as below:
```
12345 67890 afghe
abcde 23456 0abcd
34567 __fred01 45678
123.456 12345a 123.
.456 ab00cd 00ab00
```
By using regular expression is need to parse each literal... |
2018/03/02 | 807 | 2,678 | <issue_start>username_0: I'm making a discord bot. I have a command called love. I want it to pick a random quote from a list, but I am unsure how to do this.
Here is what I have so far:
```
if (message.content === config.prefix + "love" ) {
message.reply(LoveRnd());
}
function LoveRnd(){
var items = items["... |
2018/03/02 | 1,111 | 3,232 | <issue_start>username_0: I have a page (in codepen) that uses css to create a background of grey squares. The page allows for the creation of a table (grid) that you can click and change the color to make an image. The issue I am having is that when a table is created that causes the page to grow beyond the window size... |
2018/03/02 | 1,735 | 6,742 | <issue_start>username_0: There appears to be an almost philosophical difference in the meaning of "equality" between C++ and Python. I [became aware](https://stackoverflow.com/q/49060812/704972) of this distinction through an attempt to do in Python something that is quite difficult in C++: distinguishing between two e... |
2018/03/02 | 727 | 2,619 | <issue_start>username_0: I am new to Docker and find that there are numerous images that are getting created (as seen in `sudo docker images`) and found somewhere in stackoverflow to periodically run `sudo docker rmi $(sudo docker images -q)` to remove all images. Why so many images get created? is there something wron... |
2018/03/02 | 878 | 3,734 | <issue_start>username_0: Hello My code will following a sequence process.
Every part possible got a fail situation.
And I want to know the process is blocked by which part.
So there is a state to know the process is fail on which method.
```
public class MethodSequenceDesign {
public static final int STATE_WAIT ... |
2018/03/02 | 487 | 1,816 | <issue_start>username_0: if I have following table :
```
+------+--------+---------+-------+-------+
| id | name | Surnmae | email |address|
+------+--------+---------+-------+-------+
| 1 | | Lee | aaa |23 a st|
| 2 | a | | aaa | |
| 3 | c | | ccc | ... |
2018/03/02 | 558 | 2,276 | <issue_start>username_0: I came across a scenario where in other languages I would detach the model object from the transaction then I can alter it all I want without worry of an automatic-update to the record.
Question
--------
1. Does rails not support attaching\detaching a model object?
2. What is the alternative,... |
2018/03/02 | 803 | 2,182 | <issue_start>username_0: I have the input in timestamp , based on some condition i need to minus 1 sec or minus 3 months using scala programming
Input:
```
val date :String = "2017-10-31T23:59:59.000"
```
Output:
For Minus 1 sec
```
val lessOneSec = "2017-10-31T23:59:58.000"
```
For Minus 3 Months
```
val les... |
2018/03/02 | 878 | 2,692 | <issue_start>username_0: ```
def convert(list: List[String]): Seq[Either[String, Int]] = list match {
case head :: Nil => Right(head.toInt) :: Nil;
case head :: tail => Right(head.toInt) :: convert(tail) :: Nil;
}
print(convert(List("3", "4", "55")))
```
I need a seq of either, but it transforms into a l... |
2018/03/02 | 868 | 3,133 | <issue_start>username_0: The question is: Write a function that will delete leading white
space from a string. Example: `cutWhitespace [" x","y"," z"]` Expected answer: `["x","y","z"]`
Heres what I have:
```
cutWhitespace (x:xs) = filter (\xs -> (xs /=' ')) x:xs
```
This returns `["x", " y"," z"]` when the input is... |
2018/03/02 | 663 | 2,068 | <issue_start>username_0: I want to scrape a website's amount of likes. Using BeautifulSoup, this is what I got so far:
```
user = 'LazadaMalaysia'
url = 'https://www.facebook.com/'+ user
response = requests.get(url)
soup = BeautifulSoup(response.content,'lxml')
f = soup.find('div', attrs={'class': '_4bl9'})
```
The... |
2018/03/02 | 420 | 1,372 | <issue_start>username_0: TypeScript is a powerset of JavaScript.
My question is whether we could only code JavaScript (without using TypeScript) in Angular 5?<issue_comment>username_1: The likes are in span tag inside class "\_4-u3 \_5sqi \_5sqk".Here is the code that will extract likes.
```
import requests
from bs4 ... |
2018/03/02 | 454 | 1,416 | <issue_start>username_0: I have a very basic question to ask but I can't find it in Google and Stack Overflow too.
How to get current time with format example: 2018-01-22T11:48:39.396000Z in JavaScript?<issue_comment>username_1: The likes are in span tag inside class "\_4-u3 \_5sqi \_5sqk".Here is the code that will e... |
2018/03/02 | 849 | 2,887 | <issue_start>username_0: I am trying to create ansible playbooks to install and configure kerberos on centos7.
I have a task which yum installs the required rpms
```
- name: install kerberos
yum: name={{ item }} state=present
with_items:
- krb5-server
- krb5-libs
```
And a task to start the service
```... |
2018/03/02 | 2,257 | 7,241 | <issue_start>username_0: I am trying to create add the nginx ingress controller to my kubernetes cluster. My current cluster has 3 nodes and they all have open firewall rules in between them. (Note: This is a bare metal cluster for educational purposes)
I have created a deployment with the following config
```
apiVe... |
2018/03/02 | 1,372 | 4,391 | <issue_start>username_0: I have the following query that is returning two columns of data `UserID` & `ServiceID` from tables `a` & `b`
```
SELECT a.UserID, b.ServiceID FROM TableA a
JOIN TableB b
ON b.EventID = a.EventID
WHERE a.EventID = 1892286
AND a.Attendance IN (1,2)
```
The above query returns the following da... |
2018/03/02 | 449 | 1,371 | <issue_start>username_0: I would like to perform a query that counts the number of rows that have a close date within 60 days of open\_date by store.
Sample: Table A
```
Store Open Date Close Date
A 2017-01-01 2017-01-31
B 2017-02-02 Null
A 2017-01-02 2018-01-21
```
Thanks in advance.<issue... |
2018/03/02 | 1,789 | 5,162 | <issue_start>username_0: I have the following json response.
```
var loginJsonString= {
"odata.metadata": "http://xxxxxxxx:7048/DynamicsNAV90/OData/$metadata#vehicle",
"value": [{
"Model": "",
"Description": "",
"ETag": "16;kF8BAAJ7AAAAAAA=6;3481190;"
}, {
"Model": "8889",
"Description": "",
"E... |
2018/03/02 | 472 | 1,412 | <issue_start>username_0: excuse me if this common question or newbie question..
i am wondering why JS calculation return wrong result, i have calculation like this
```
console.log(((11000 * 100) / (100 + 1) * 1) / 100);
```
when i using calculator it returns 110, but when i calculate using JS it returns 108.9108910... |
2018/03/02 | 4,260 | 18,365 | <issue_start>username_0: I'm using `Retrofit`, `OK-HTTP` and `RxJava2` to handle network calls, I created below interceptor to handle the Network error response for each network calls, Is there a better way to Handle this?
Is this the case for EventBus?
I don't want to check this error exceptionin each method,
//HTTP... |
2018/03/02 | 372 | 918 | <issue_start>username_0: I have a table that looks similar to:
```
C1 C2 C3 C4 C5 C6
R1 2 3 5 7 8 8
R2 1 5 8 9 2 13
R3 4 5 7 9 1
```
I want to create a new column "C6" such that the value is derived from R1C4 plus R2C1 giving 8 and repeating for the next row R2C4 plus R3C1 giving 13 in C6 and would... |
2018/03/02 | 559 | 2,141 | <issue_start>username_0: The first table consists of Accounts with State and Country information which are mostly correct with few wrong rows:
```
ID Account State Country Text
1001 Acc1 NJ USA
1002 Acc2 NY Null
1003 Acc3 Texas ... |
2018/03/02 | 306 | 1,014 | <issue_start>username_0: Newbie question:
Let's say I have an int array that can store 10 values
How do I take a user input 1 time to only fill 1 bracket and then stop untill a new user stores a value? I've only ever know how to fill arrays in loops, but I'm guessing no loops are used to just store 1 value.<issue_com... |
2018/03/02 | 386 | 1,398 | <issue_start>username_0: Using Micro Services approach, I have Service A with 3 instances (A1, A2, A3) that can communicate with Service B which has (B1, B2, B3) instances via AMQP Message based Async communication. Example, by Azure Service Bus queues.
Part of Service A's action implementation, I have 5 Steps to be t... |
2018/03/02 | 466 | 1,503 | <issue_start>username_0: I am using angular 5. In .ts file when i try to typecast my element to HTMLSelectElement it throws some error. I checked the documentation but the value option is available in HTMLSelectElement. I don't know what i'm doing wrong;
.ts file:
inside get\_department function:
```
var selected_bo... |
2018/03/02 | 617 | 1,942 | <issue_start>username_0: Made this login script for website but whenever I try to submit I get the Index.php?Login=Error even though I ran the same SQL into database and it works fine. Bet I've made a tiny mistake.
[Picture of database rows](https://i.stack.imgur.com/jkR5T.png)
```html
php
session_start();
include... |
2018/03/02 | 262 | 880 | <issue_start>username_0: Im working on stackoverflow data dump .csv file and I need to to find the distribution of scores for questions.
I opened the file in R and extracted the two columns that I need which are the PostTypeID and Score.
example :
[](https://i.stack.img... |
2018/03/02 | 555 | 2,300 | <issue_start>username_0: I've been managing our Terraform code by myself for a few months. Now that there are additional team members in my group, I would like them to learn TF and build things using the existing code I have. The state files are stored in S3. For each environment, I ran the following command.
```
terr... |
2018/03/02 | 387 | 1,672 | <issue_start>username_0: I have an ASP.NET Core MVC site with multiple tenants. The tenant id is passed in on the query string on the GET request for the login and kept in session. Tenant names on navigation and some other tenant-specific customization are displayed.
If the user logs off I can grab the tenant id from ... |
2018/03/02 | 411 | 1,642 | <issue_start>username_0: I add a Header and a Footer to my listview like this:
```
lv = (ListView) findViewById(R.id.lv_process_person)
View header = getLayoutInflater().inflate(R.layout.activity_input_forward_department_header, null);
View footer = getLayoutInflater().inflate(R.layout.activity... |
2018/03/02 | 1,153 | 3,909 | <issue_start>username_0: I am currently learning Visual Studio Code. I come from a WebStorm background. Is there an option or extension to merge 3 ways?
Where in Visual Studio Code can I merge conflicts?
At the moment, I thought I had resolved all the changes but when I run `git status` it says there are still unmer... |
2018/03/02 | 1,035 | 3,235 | <issue_start>username_0: I have some working code which I'm trying to optimize using a loop but am having trouble concatenating the name of a parameter.
```js
var objlocations = {};
$.get('https://example.com/something/ajax-state?somevar=' + somevar, function(data) {
$.each(data, function(index,DBRow){
obj... |
2018/03/02 | 437 | 1,434 | <issue_start>username_0: I have seen many post regarding explicit keyword but no where find the answer for why its failing. I have seen other post in stack overflow also but Regarding the conversion its very confusing kind of explanation given
```
class Foo {
public:
explicit Foo(int x);
};
int main()
{
Foo a = 42; ... |
2018/03/02 | 625 | 1,976 | <issue_start>username_0: I have a custom logger that adds extra formatting when outputting to console.
```
class Logger {
Log(moduleId, message, ...args) {
var d = new Date(),
h = (d.getHours()<10?'0':'') + d.getHours(),
m = (d.getMinutes()<10?'0':'') + d.getMinutes(),
... |
2018/03/02 | 1,127 | 4,229 | <issue_start>username_0: I am trying to populate specific datatable values into a table. I am using the table value parameter. While adding the tabletype parameter i am thrown to no mapping exists. Can you find the bug in this part.
Below is my .NET Call
```
cmdabsSQL = dbabsSQL.CreateCommand()
cm... |
2018/03/02 | 602 | 2,047 | <issue_start>username_0: I think a follow-up question based on the problem from HackerRank, and wonder if it is possible to solve by SQL.
Sample Input
Let's say that CITY has four entries: DEFG, ABC, PQRSER, and WXY
Sample Output
```
ABC 3
DEFG 4
PQRSER 6
```
I was wondering if I can use SQL to ordered length of ... |
2018/03/02 | 2,101 | 7,433 | <issue_start>username_0: So my girlfriend was asked to group the girls in her sorority into groups of 4. She needs to do this for 4 different events (1 event per week). There are 168 girls total (convenient that it fits into groups of 4 evenly). The caveat is that no girl can be in a group with a girl that they've alre... |
2018/03/02 | 720 | 2,273 | <issue_start>username_0: I'm new to the go-lang. I want to use go command to build a binary named `cryptogen` (hyperledger/fabric tool). I download the source code from github and type the following command accroding to readme:
```
CGO_CFLAGS=" " GOBIN=/hyperledger/src/github.com/hyperledger/fabric/build/bin go instal... |
2018/03/02 | 780 | 2,653 | <issue_start>username_0: I want to implement a very simple server side application for a mobile game mainly to serve my needs for analytics and tweak some settings on the fly.
* The game is a single player game
* At the launch of every session, the game downloads about 5KB worth of settings
* After each game/loop the ... |
2018/03/02 | 1,910 | 5,731 | <issue_start>username_0: I'm using CodeIgniter 3.1.7 with url helper autoloaded and enabled.
How to code `assets_helper.php` that make use of `base_url();` to parse `https://something.tld/` and put the first group as the subfolder if there is no group then it will use the base assets folder?
From
```
php echo assets... |
2018/03/02 | 626 | 2,467 | <issue_start>username_0: I'm getting a string response from the API of this format
```
document.getElementById('formRedirectToPayment').submit();
```
Below is the code that sets the webview.
```
override func viewDidLoad() {
super.viewDidLoad()
if let rootVC = navigationController?.viewControllers.first {... |
2018/03/02 | 1,026 | 3,519 | <issue_start>username_0: I like to use the Source Editor / data viewer invoked by View() in R. I use multiple monitors and it's really nice to have a viewer or two open on a side monitor while I code in the main RStudio window. It's a bit inconvenient to have to do View(df) and then click the "show in new window" butto... |
2018/03/02 | 1,238 | 4,529 | <issue_start>username_0: I am testing my React-Redux app with Jest and as part of this in my API calls I am importing a fetch module `cross-fetch`. I want to override or replace this with `fetch-mock`. Here is my file structure:
**Action.js**
```
import fetch from 'cross-fetch';
export const apiCall = () => {
ret... |
2018/03/02 | 386 | 1,442 | <issue_start>username_0: Depending on the conditions, I need to use different comparator classes on the same `vector`
```
priority_queue> pq;
if (something...)
priority\_queue, Comp1> pq;
else if(...)
priority\_queue, Comp2> pq;
else
priority\_queue, Comp3> pq;
... All further code works on pq & does not change o... |
2018/03/02 | 2,289 | 6,471 | <issue_start>username_0: As an exercise in functional programming, I've decided to go through one of my projects and replace functions containing for loops with `Array.prototype`'s *higher order functions* such as `map` and `reduce`.
One function in my project averages columns in a two dimensional array. It takes an a... |