date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/02/26 | 1,484 | 6,539 | <issue_start>username_0: I have a REST controller in a Spring boot application, simplyfied:
```
@RestController
@RequestMapping("/api")
public class MyRestController {
@Autowired
private Environment env;
private String property1;
@PostConstruct
private void init() {
this.property1 = env.g... |
2018/02/26 | 547 | 2,168 | <issue_start>username_0: I need to check if an element exists in my XML that's retrieved from calling a web service. I need to run a certain function if a particular element does not exist.
Here is what I have so far. This works if all of these elements are there. I need to make sure the "MembershipNumber" element exi... |
2018/02/26 | 937 | 3,331 | <issue_start>username_0: We have an Excel file with over 550,000 rows, and my task is to "clean up" this worksheet. This file contains all of the products that we get from different vendor and all the data that goes with it.
The specific task I am having trouble with is how to delete all of the rows in which column A ... |
2018/02/26 | 808 | 2,304 | <issue_start>username_0: I don't know how to do this:
I have a table `JOBS(IDJob, IDUser, Notes )` and a related table `JOBTIMES(IDJT, IDJob, JobTime, IDState)`
In table `JOBS` I have these records:
```
(IDJob, IDUser, Notes)
(1, 25, 'Table')
(2, 23, 'Chair')
(3, 25, 'Window')
```
And in table `JOBTIMES`
```
(IDJ... |
2018/02/26 | 507 | 1,758 | <issue_start>username_0: I would like to set up my page so that when the user hovers over a link in a div, the color of the body background is changed, but only while hovering. This is the css
```
body {
background-color: black;
}
a {
color: white;
text-decoration: none;
}
a:hover {
color: white;
backgroun... |
2018/02/26 | 1,694 | 5,580 | <issue_start>username_0: I'm having trouble wording this question, but hopefully this makes sense. I can add more detail.
How can I use linq to check if `End` ids: `1, 2` are part of `TestTable` grouped by the `Start` column? I want to check for each distinct list of `Start` contains a list of `End` that matches exac... |
2018/02/26 | 967 | 2,741 | <issue_start>username_0: First, I'm just starting out in HTML and CSS.
How I want to use this code:
<https://codepen.io/martinjkelly/pen/vEOBvL>
```css
.container {
width: 250px;
height: 250px;
position:relative;
background-color:grey;
}
.corner {
width: 0;
height: 0;
border-top: 150px solid... |
2018/02/26 | 848 | 2,616 | <issue_start>username_0: I am trying to make two compositions that are vertically responsive at browser resize. I have an example [here](http://inlumeapovestilor.ro/vertical/index.html) and I am using Adobe Muse.
The red box and blue box is what I am trying to achieve in terms of responsive when you resize the browse... |
2018/02/26 | 598 | 1,791 | <issue_start>username_0: I have some legacy routes and I should redirect all of them to page 404. All of them have `admin` and `user` at the beginning. What are best practices to do this?
e.g. is there anyway to use regular expresion?<issue_comment>username_1: You have to make some adjustments since the triangle will ... |
2018/02/26 | 1,030 | 4,186 | <issue_start>username_0: I have an assignment to create a record-keeping console application in C# for adding, viewing, and deleting records. I need to use an array, list, or dictionary (or some combination).
I have tried using arrays and lists, but so far dictionaries have proved the most successful (aka I know how ... |
2018/02/26 | 839 | 3,185 | <issue_start>username_0: Is there any way to make `std::max_element` return the `end` iterator if no element is grater than a certain value?
Imagine I have this vector:
```
std::vector vector{3, 6, 2, 5};
auto it = std::max\_element(vector.begin(), vector.end());
```
How would you make `it` point to `vector.end()` ... |
2018/02/26 | 748 | 1,485 | <issue_start>username_0: ```
A B C
0 mel 0.00 3.99
1 sid 7.23 13.30
2 alc 0.00 2.14
3 fas 8.12 108.00
```
I want to convert 0.00 values in their respective *C column* values.
The output must be:
```
A B C
0 mel 3.99 3.99
1 sid 7.23 13.30
2 alc 2.14 2.14
3... |
2018/02/26 | 2,441 | 9,116 | <issue_start>username_0: I'm a new entry in the programming world, so my skills are really poor. Anyway, I have to write a program for a school project, so I figured out one that *seemd* easy.
Basically, I have just a Frame, a Button, a Panel (that I will use later) and two textfields. I need that when I write somethi... |
2018/02/26 | 903 | 2,888 | <issue_start>username_0: I am trying to see if a sentence is present in the response back from a request.
```
import requests
r = requests.get('https://www.eventbrite.co.uk/o/piers-test-16613670281')
text = 'Sorry, there are no upcoming events'
if text in r.content:
print('No Upcoming Events')
```
I am gettin... |
2018/02/26 | 879 | 3,085 | <issue_start>username_0: Hi I am following [this](https://app.pluralsight.com/player?course=react-fundamentals&author=liam-mclennan&name=react-fundamentals-m3-jsx&clip=11&mode=live) tutorial. I have the Quiz component. Iam getting warning: "fail propType:Required prop 'books' was not specified in Quiz". And the books a... |
2018/02/26 | 1,025 | 3,304 | <issue_start>username_0: I am running `certbot --apache` but I get the following error:
```
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
Client with the currently selected authenticator does not support any
combination of challenges t... |
2018/02/26 | 655 | 2,018 | <issue_start>username_0: I'm trying to read line by line from a file and storing it into a 2-d array. I'm getting a very odd out put which is the screenshot below.
The input file looks like:
```
-x-
xx-
--x
```
and the code looks like:
```
int counter=-1;
while(getline(InputFile,line))
{
counter++;
//cout<<... |
2018/02/26 | 1,241 | 4,257 | <issue_start>username_0: I am currently starting out with Python 3.6 and using the IDLE development area. I have been looking online for a solution to the following problem:
I have two text files. The first is my input list, the second is my blacklist. I want to check for any instances where a line in my input list is... |
2018/02/26 | 879 | 2,849 | <issue_start>username_0: ```
@bot.command(pass_conetext = True)
async def info(ctx, user: discord.Member):
embed = discord.Embed(title = "Super Bot", description = "Thinking" , color = 0x00ff00)
embed.add_field(name = "Name", value = user.name, inline = True)
embed.add_field(name = "ID", value = user.id ,... |
2018/02/26 | 1,451 | 4,479 | <issue_start>username_0: I want to display real time data whit help of QCustomPlot in c++ . so I do this:
in header file:
```
class QtGuiApplication : public QMainWindow
{
Q_OBJECT
public:
QtGuiApplication(QWidget *parent = Q_NULLPTR);
private:
Ui::QtGuiApplicationClass ui;
//plot
QCustomPlot* plot_;
std::t... |
2018/02/26 | 1,027 | 3,284 | <issue_start>username_0: I have a variable that starts with OMX, but I only need the value that comes after it. How can I create a new variable that only has the value after OST;
Example: OSTN44X8 has to become N44X8 only
```
proc sql;
(Select *
From data01
WHERE RDATE between '2000-11-01' and '2018-02-25'
(SELECT... |
2018/02/26 | 450 | 1,499 | <issue_start>username_0: I am writing code for an assignment an it must follow these guidelines:
/\* returns true if s consists only of letters that
\* are also Roman numerals \*/
I have written code that looks like this:
```
if (!s.contains("I") || !s.contains("V") || !s.contains("X") ||
!s.contains("L") || !s.con... |
2018/02/26 | 810 | 2,775 | <issue_start>username_0: I have this code:
I try to initialize a pointer and after i use it to check if my list is empty
```
#include
#include
typedef long T;
typedef struct SortedList {
T value;
struct SortedList\* next;
} SortedList;
void init(SortedList\*\* list)
{
list = (SortedList \*\*) malloc (sizeof(S... |
2018/02/26 | 601 | 1,683 | <issue_start>username_0: I'm trying to read a sql file but it keeps giving me the error:
```
UnicodeError: UTF-16 stream does not start with BOM
```
I've created a fxn to read sql files specifically:
```
import pandas as pd
import pyodbc as db
import os
import codecs
def sql_reader_single(qry_file, server_name, da... |
2018/02/26 | 618 | 1,986 | <issue_start>username_0: I'm trying to set a `type` attribute for input:
```elm
input [ type "checkbox" ] []
```
But I get an error:
>
>
> ```elm
> It looks like the keyword `type` is being used as a variable.
> input [ type "checkbox" ] []
> ^
> Rename it to something else.
>
> ```
>
>
When I try to u... |
2018/02/26 | 945 | 2,955 | <issue_start>username_0: I've been told that the following pattern is more efficient than the simple match paradigm. I'm unsure if this is true, and I can't find any sources to corroborate.
Is using
```
values.headOption.map { x }.getOrElse(y)
```
more efficient than
```
values.headOption match { /* case statement... |
2018/02/26 | 1,122 | 3,446 | <issue_start>username_0: When I bin my data accordingly to `scipy.stats.binned_statistic` ([see here for example](https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.binned_statistic.html)), how do I get the error (that is the standard deviation) on the average binned values?
For example, if I bin my data... |
2018/02/26 | 689 | 2,346 | <issue_start>username_0: I generate my [blog](https://github.com/nathaneastwood/nathaneastwood.github.io) using blogdown, but when I have tried to submit it to R-Bloggers it is not accepted because [my feed](https://nathaneastwood.github.io/feed.xml) returns the following error:
>
> This XML document is invalid, like... |
2018/02/26 | 1,937 | 6,047 | <issue_start>username_0: Here's my use case: I regularly receive a large (GB+ size) XML file from a customer, and all the XML is contained in a single line, without a single cr/lf in the file. What this means is that if there is a data issue in the XML that requires manual investigation, opening it for reading becomes ... |
2018/02/26 | 674 | 2,398 | <issue_start>username_0: I am confused by how this C program is running. I am just trying to use a structure to store some variables and then be able to print them out in a separate function. Below is my code. What I don't understand is why is my first output includes both ip and key and not just ip.
```
#include
st... |
2018/02/26 | 540 | 1,965 | <issue_start>username_0: Using notepad++, how can I replace the `-`s noted by the carats? The dashes I want to replace occurs every 7th character in the string.
```
11.871-2-2.737-2.00334-2
^ ^ ^
123456781234567812345678
```<issue_comment>username_1: ```
strcpy(cred[0].ip, "192.16");
```
is unde... |
2018/02/26 | 1,071 | 3,463 | <issue_start>username_0: Found an interesting issue with Laravel and PHPExcel. Given the code below:
```
\Excel::create("TestingXLS", function($excel){
$excel->sheet("TestingSheet1", function($sheet){
$values = [];
for($i = 1; $i <= 257; $i++){
$values[] = $i;
}
for($j ... |
2018/02/26 | 636 | 2,959 | <issue_start>username_0: I would like to display the name and user type after registration and login. For this app, after a person registers, one is taken back to the log in screen. If the login is successful, the homepage activity will open.
I'm trying to send the name and user type value from registration to homepage... |
2018/02/26 | 1,066 | 3,342 | <issue_start>username_0: I am trying to parse a string but I am having a hard time. Here is an example piece of data. I need to get the part highlighted in bold so I can lookup the name up in our database.
[AZ - Domestic] **Acme Technologies LLC** - (8484383)"
So far, here is what I have tried:
```
$string = '[AZ - ... |
2018/02/26 | 770 | 2,703 | <issue_start>username_0: Basically, what I want to achieve is something like this:
```
mypath:= '~/Desktop/' || my_variable || '.csv'
COPY (SELECT * FROM my_table) TO mypath CSV DELIMITER ',' HEADER;
```
Where the value of my\_variable will change dynamically.
Can someone help me on this problem?<issue_comment>user... |
2018/02/26 | 439 | 1,935 | <issue_start>username_0: Is public blockchain implementation scalable enough so that it could be maintained on each computer normal users and why so much of data redundancy?
Consider if a normal user has to do any transaction or others keeps on updating the blockchain the size of blockchain increases which in turn eat... |
2018/02/26 | 1,164 | 3,912 | <issue_start>username_0: ```
#include
#include
#include
#define SIZE 100000
typedef struct {
int day;
int month;
int year;
} DATE;
typedef struct {
char name[100];
int age;
float hrlyWage;
float hrsWorked;
float regPay;
float otPay;
float totalPay;
DATE payDate;
} PAYRECORD;
int newRecord(struct PAYREC... |
2018/02/26 | 1,019 | 3,363 | <issue_start>username_0: still figuring a lot of things out and can use your help atm. I cant get my header list to be in the center of the page.
my HTML code:
```
* ##### Blog
* ##### List Builder [WIP]
* ##### CERBERUS
* ##### Math Hammer
* ##### Other
```
And my CSS code:
```
body {
background: black url... |
2018/02/26 | 983 | 3,135 | <issue_start>username_0: I'd like to create a new series of logical values based on the evaluation of multiple conditions.
For example
```
> df = pd.DataFrame({'id':[40, 20, 50, 5, 80], 'value': ['a', 'd', 'g', 'g', 'g']})
> df[(df.id > 40) & (df.value.isin(['a', 'g']))]
id value
2 50 g
4 80 g
```
However... |
2018/02/26 | 1,007 | 3,465 | <issue_start>username_0: I am new to JavaScript. I don't get it why it prints the value undefined on the console before the correct id.
I am trying to return the inserted id yet I get an "undefined" on the return, but the console shows the correct id.
```
VisaFam.dbs.addFamily = function(nom) {
var db = VisaFam.d... |
2018/02/26 | 1,308 | 4,552 | <issue_start>username_0: I'm working on a programming challenge for my Intro Java class. The question is to write a programming that stores two .txt files of the most popular names (one 'boys' and the other 'girls') into an ArrayList and asks the user to type in a name and the program will tell the user if it's among t... |
2018/02/26 | 1,132 | 3,648 | <issue_start>username_0: I am trying to import a large .csv file with time stamps, and the other columns as floats. The time stamps look as follows:
```
2013-08-01 00:00:00 PST
```
it is in a column labeled 'timestamp' in the df.
I am trying to use pandas to import it, specifically with the read\_csv function, and... |
2018/02/26 | 1,323 | 4,269 | <issue_start>username_0: I am trying to implement a very simple C++ code using Cython in macOS. This is the header of my C++ code (it's a file called `cs_test.h`
```
#include
void cs\_test(int n);
```
This is my C++ code (filename: `cs_test.cpp`:
```
#include "cs_test.h"
using namespace std;
int main(){}
void cs... |
2018/02/26 | 1,033 | 3,504 | <issue_start>username_0: I want to convert all the titlecase words *(words starting with uppercase character and having rest of the characters as lowercase)* in the string to the lowercase characters. For example, if my initial string is:
```
text = " ALL people ARE Great"
```
I want my resultant string to be:
```
... |
2018/02/26 | 1,010 | 3,461 | <issue_start>username_0: I found a gorgeous font called Slim Joe on a webpage whose link I posted below.
Even though I spent quite some time searching through their code, I couldn't find how/where exactly they included the font. I can see it being used in their CSS file (font: Slim-Joe), but I don't see where it's inc... |
2018/02/26 | 294 | 1,009 | <issue_start>username_0: I have a ListView with images that work as a menu in my Xamarin.Forms App. Here's the view:
[](https://i.stack.imgur.com/GPynn.png)
The last item is just a little bit out of the screen, so the ListView needs to scroll down in... |
2018/02/26 | 1,406 | 3,808 | <issue_start>username_0: I have something analogous to this, where `spark` is my `sparkContext`. I've imported `implicits._` in my `sparkContext` so I can use the `$` syntax:
```
val df = spark.createDataFrame(Seq(("a", 0L), ("b", 1L), ("c", 1L), ("d", 1L), ("e", 0L), ("f", 1L)))
.toDF("id", "flag")
... |
2018/02/26 | 1,140 | 4,175 | <issue_start>username_0: From the console, I am invoking a lambda which submits a batch job. The batch job fails, indicating that ECS is unable to assume the role that is provided to execute the job definition.
For the role, I've added the lambda and ECS services.
The error message:
>
> "ECS was unable to assume th... |
2018/02/26 | 712 | 2,589 | <issue_start>username_0: Let's say i have several routes in express like,
```
app.use('/login', login);
app.use('/blogs', blog);
app.use('/news', news);
app.use('/profile', profile);
```
Here, login, blog, news, profile is routes .js files which contains different get/post routes. I.E. `/blogs/new` or `blogs/:id/edi... |
2018/02/26 | 1,328 | 4,206 | <issue_start>username_0: I am trying to make a simple batch file that finds an exe file in a folder and does a silent install of it. So far I have been unsuccessful with this:
```
for /r "%CD%\folder1\folder2\" %%a in (*.exe /sPB) do start "" "%%~fa"
```
Of course this gives me the error:
>
> Windows cannot find '... |
2018/02/26 | 1,462 | 4,886 | <issue_start>username_0: I have an editor which inserts span wrapped letters as you type. This allows each letter to be selected as nodes so styling can be applied. They are unwrapped later during export.
Although I have width set on the parent, the child span nodes are not "word wrapping" as they normally would.
In ... |
2018/02/26 | 706 | 2,666 | <issue_start>username_0: I developed a web application for running email campaigns. A cron is running to send multiple emails (upto 100 in single request) per minute.
```
SELECT id,email,email_text FROM recipients
WHERE sent_status=0 LIMIT 100
```
This script takes approx 70-100 seconds to send all the email usin... |
2018/02/26 | 837 | 2,263 | <issue_start>username_0: I want to extract the string before certain keywords and the first element right after the keyword. Given the following strings and the keywords,
```
s <- c("E123Apple12", "EJ23ZGrape0Z", "J8BananaZ!")
keywords <- c("Apple", "Grape", "Banana")
```
I would expect the output to be: `E123`, `E... |
2018/02/26 | 1,477 | 5,127 | <issue_start>username_0: I'm trying to get to this result of colors in the console app:
[](https://i.stack.imgur.com/StCgr.png)
But this is my result right now:
[](https://i.stack.i... |
2018/02/26 | 266 | 771 | <issue_start>username_0: So I know how to delete rows based off one column condition. How do I do it for multiple conditions?
Date Frame = "olddata"
```
Letter Number Color
X 1 Blue
Y 3 Red
Z 5 Yellow
D 1 Red
F 1 Yellow
X 2 Green
```
For example, to delete rows with the Letter X in it, and rows with color green, yo... |
2018/02/26 | 1,014 | 3,768 | <issue_start>username_0: I have been trying to make a program to round doubles after decimal point- for example-4.45 will turn 4.50 and 3.23-3.20 and so on.
for that I have tried to count how many numbers are after the decimal point them multiply it by 10 powered that number that I found add or deduct accordingly to ma... |
2018/02/26 | 469 | 1,789 | <issue_start>username_0: I have a map with many polygons that are loaded from a kml file. I would like when clicking on a polygon to zoom in and center the map on this polygon.
Can you please guide me? I can't find a relative example in google maps api documentaton.<issue_comment>username_1: This is a good starting po... |
2018/02/26 | 610 | 2,305 | <issue_start>username_0: I am making a couple of similar http calls in my angular 5 application. I also need to apply similar data transformation logic and add the results to an array to display it on the page.
The 2nd call is not mandatory and is conditional.
On http subscribe, am doing the data transformation and p... |
2018/02/26 | 392 | 1,311 | <issue_start>username_0: I'm trying to write a selector which selects s with `class="my-rating"` only when their children contain none of 3 classes below.
Example html:
```
```
Where I want to select `parentA` and `parentB` and exclude C and D.
Something like this:
```
$('.my-rating').children().filter(':not(.rat... |
2018/02/26 | 658 | 2,125 | <issue_start>username_0: *Hello there!*
**I've been a given a Task like so:**
* Request the user to enter a number
* Check if the user input is not empty. Also, check value entered is a number
* Write on the HTML document a triangle out of the numbers as follow:
**E.g. output: (let’s say the user entered number 10)*... |
2018/02/26 | 679 | 2,547 | <issue_start>username_0: I'm using metabase to generate client reports on multiple metrics. I have beginner knowledge in SQL but the GUI has helped in building most queries except a few.
I have two tables
1. User table including timestamp for when user registered and user ID
2. Purchase table including user IDs (seen... |
2018/02/26 | 306 | 1,194 | <issue_start>username_0: I have a pandas dataframe that contains a mix of categorical and numeric columns. By default, `df.describe()` returns only a summary of the numerical data (describing those columns with `count`, `mean`, `std`, `min`, `quantiles`, `max`)
when iterating through all the columns in the df and desc... |
2018/02/26 | 213 | 860 | <issue_start>username_0: I want to update a remote rep by adding more content but am wondering if I can do that without having to clone all its content first.
Is it possible to establish the same kind of connection between the folder on my machine and an existing remote rep without downloading the remote content?<issu... |
2018/02/26 | 2,783 | 6,172 | <issue_start>username_0: Say I have a NumPy array:
```
>>> X = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]])
>>> X
array([[ 1, 2, 3, 4],
[ 5, 6, 7, 8],
[ 9, 10, 11, 12]])
```
and an array of indexes that I want to select for each row:
```
>>> ixs = np.array([[1, 3], [0, 1], [1, 2]])
>>... |
2018/02/26 | 1,003 | 2,478 | <issue_start>username_0: Is there a way in PySpark to explode array/list in all columns at the same time and merge/zip the exploded data together respectively into rows?
Number of columns could be dynamic depending on other factors.
From dataframe
```
|col1 |col2 |col3 |
|[a,b,c]|[d,e,f]|[g,h,i]|
|[j,k,l]|[m,n... |
2018/02/26 | 430 | 1,234 | <issue_start>username_0: I am trying this code to get all images src from the link (<https://www.vfmii.com/exc/aspquery?command=invoke&ipid=HL26423&ids=42337&RM=N>)
But it is showing nothing to me. Can you suggest me some better way?
```
php
include_once 'simple_html_dom.php';
$html = file_get_html('https://www.vfmii... |
2018/02/26 | 395 | 1,251 | <issue_start>username_0: I have came across one type of usage of operator `=`. It was something like this:
```
A += B == 1;
```
where A and B are integers and this kind of usage I found in a function body.
I just kind of confused with the second `==` usage.
Of course I know the meaning of `A = B = 1;`
Can anybod... |
2018/02/26 | 504 | 1,532 | <issue_start>username_0: I have a struct array like this:
```
SmallArray[0].X , SmallArray[0].Y and
SmallArray[1].X , SmallArray[1].Y and
```
etc...
Now I have to insert this array to a cell of another array, for example:
```
BigArray[0] = SmallArray //Not a single cell but the whole small array
```
As if th... |
2018/02/26 | 478 | 1,570 | <issue_start>username_0: I got this piece of code from W3 HTML website.
```
**Hello**
=========
```
I know that this 'h1' was edited using w3 class. For my understanding, editing a tag inside the tag itself has more priority than the class edits. Anyway, I tried to change the `font-family` or `font-size` but that ... |
2018/02/26 | 877 | 2,740 | <issue_start>username_0: I have the following sqlfiddle: <http://sqlfiddle.com/#!15/e971e/10/0>
So, I am running the query against two tables simultaneously. I'd like to get all info for "fran" even if she isn't in 1 table or the other. I have:
```
WITH tableA AS(
SELECT id, name, age
FROM a WHERE name = 'fran'
... |
2018/02/26 | 663 | 2,465 | <issue_start>username_0: I have a JavaScript function that prevents a user from typing any character but numbers and a period. I also am trying to prevent a user from typing multiple periods. From my observations of how this script is working, if a user types a period and then a number (".1"), they won't be able to typ... |
2018/02/26 | 1,742 | 6,137 | <issue_start>username_0: I following this online tutorial on downloading and installing web files from GIT HUB. I got down to the topic: Starting Our Static Website, there I'm prompted to enter the commands to download and install the web files. However, when I enter the command yarn install, I get the following prompt... |
2018/02/26 | 1,916 | 6,680 | <issue_start>username_0: I have a simple acceptance test written in the [modern](https://guides.emberjs.com/v3.0.0/testing/acceptance/) [RFC 268 format](https://github.com/emberjs/rfcs/blob/master/text/0268-acceptance-testing-refactor.md) for Ember `3.0`.
The test is for a page where, if the user is unauthenticated, t... |
2018/02/26 | 845 | 2,922 | <issue_start>username_0: I have a project that I'm working on using `Node.js` and I'm having trouble when I try to iterate through object properties. I'm new to this kind of iteration. I'm used to write `data.value` to access a value, but I can't access a value like that, I need to access the value by using iteration i... |
2018/02/26 | 558 | 1,930 | <issue_start>username_0: I have a yaml file, that has some config information and I use it in a module that I want to test. But when I test it I want to mock it so it only has simplified and static data, so it's easy to test and if the config is changed I don't have to edit the tests. Here is what I tried so far:
```
... |
2018/02/26 | 757 | 2,055 | <issue_start>username_0: There is a function that sets a pointer to a `nil` value:
```
func nilSetter(x *int) {
x = nil
}
```
I have such snippet of code:
```
i := 42
fmt.Println(&i)
nilSetter(&i)
fmt.Println(&i)
```
Which prints:
```
0xc42008a000
0xc42008a000
```
While I expect:
```
0xc42008a000
nil
```... |
2018/02/26 | 539 | 1,688 | <issue_start>username_0: I am grouping by panda frame based on two columns and adding the sum of a third column to this groupby object. It works perfectly, but I am trying to figure out how should I iterate through this returned object.
Below is the command I used to groupby and sum.
```
groupby_abundance=df.groupby(... |
2018/02/26 | 1,415 | 4,964 | <issue_start>username_0: Here is what I am trying to accomplish:
I have an ID in Column DA. I have a product in Column CB. I want to count the number of unique products for each ID (ID can have multiple lines). I then want to write the number of unique products to a new column (DB).
My logic was to write two diction... |
2018/02/26 | 800 | 2,919 | <issue_start>username_0: I've been a procedural programmer for a while now, and just trying to switch my mindset to use functional programming (in Python 3 for now).
So, instead of writing a for-each loop, I'm trying to grasp the interaction between `map` and `list(map(..))`
Lets say I have a simple `for-in` loop whi... |
2018/02/26 | 649 | 2,976 | <issue_start>username_0: I have an if statement that is supposed to execute code if a variable returns false, but even though I have checked and made sure the variable returns false, the code does not execute. Here is the code:
SOLUTION: i seem to have accidentally misplaced the if statement, and have moved it and fix... |
2018/02/26 | 1,933 | 5,254 | <issue_start>username_0: ```
Contents
[Google what time is it](https://www.google.com/search?q=Google+what+time+is+it)
It's 4:38.
2018. 2. 5. 5:38:41 PM
]
```
In the code above, I want to extract the answer ("It's 4:38") and the timestamp. For the question, I used
>
> for link in soup.find\_all('a'): Ques... |
2018/02/26 | 251 | 676 | <issue_start>username_0: Is there way to simplified the query before?
I must use the function to find words that contains a, b, c, etc.
```
IIf([T1].[as] LIKE ('*cat*')
OR [T1].[as] LIKE ('*dog*')
OR [T1].[as] LIKE ('*coke*')
OR [T1].[as] LIKE ('*hi*')
OR [T1].[as] Like ('*hello*')
OR [T1].[as] Like ('*example*')
... |
2018/02/26 | 493 | 2,093 | <issue_start>username_0: I have a web app running on my Amazon EC2 instance. How can I integrate a Web Application Firewall with my EC2?
I have tried setting up the WAF, but it can only be associated with either a CloudFront distribution or an Elastic Load Balancer. Do I need to setup a CloudFront distribution and poi... |
2018/02/26 | 1,302 | 3,837 | <issue_start>username_0: In doc of sympy <http://docs.sympy.org/latest/modules/integrals/integrals.html> we can read:
>
> The manualintegrate module has functions that return the steps used (see the module docstring for more information).
>
>
>
but calling `help(sympy.integrals.manualintegrate)` we get:
```
Help... |
2018/02/26 | 1,220 | 5,413 | <issue_start>username_0: There's a way in which I can call and modify the visibility of the ProgressBar from my main layout on the adapter?
I need to call a web service after an item was clicked, this to show to the user something is happening.
```
public class MyViewHolder extends RecyclerView.ViewHolder {
publi... |
2018/02/26 | 452 | 1,423 | <issue_start>username_0: I'm getting this as an error after installing magento via bitnami xammp.
>
> Deprecated: The each() function is deprecated. This message will be suppressed on further calls in C:\xampp\apps\magento\htdocs\vendor\colinmollenhour\cache-backend-file\File.php on line 81
> There has been an error... |
2018/02/26 | 536 | 1,501 | <issue_start>username_0: Using the code below I get values for `precision`, `recall`, and `F scores` but I get `None` for `support`
```
import numpy as np
from sklearn.metrics import precision_recall_fscore_support
ytrue = np.array(['1', '1', '1', '1', '1','1','1','1','0'])
ypred = np.array(['0', '0', '0', '1', '1','1... |
2018/02/26 | 409 | 1,506 | <issue_start>username_0: I saw this other answer: <https://stackoverflow.com/a/47250621/2809729>
So can I abort multiple fetch request using just one signal?<issue_comment>username_1: At the time I was writing the question, I already found the solution in [this post on how to abort fetches](https://developers.google.c... |
2018/02/26 | 682 | 2,513 | <issue_start>username_0: I have two collections that i am trying to aggregate together to produce the below desired output but am struggling with how to limit the fields in the array returned by the lookup. Any help would be greatly appreciated.
```
project
{
_id: ObjectId("ABC")
projectName: "Project One"... |
2018/02/26 | 761 | 2,925 | <issue_start>username_0: ```
import Queue_PlistLR as queueList
class Stack_2Queues():
def __init__(self, name, salary):
self.items = []
self.name = name
self.salary = salary
def isEmpty(self):
return len(self.items) == 0
... |
2018/02/26 | 1,005 | 3,011 | <issue_start>username_0: I want to generate JSON from TOML files. The JSON structure should be something like this, with arrays of objects within arrays of objects:
```json
{
"things": [
{
"a": "thing1",
"b": "fdsa",
"multiline": "Some sample text."
},
{
... |
2018/02/26 | 541 | 1,785 | <issue_start>username_0: I am trying to run telnet in gitbash on windows, but when I enter the command `telnet`, I just get returned to my command line. I already enabled the telnet client like the link at the bottom of this question explained.
The problem now is that when I type telnet into gitbash, nothing happens, ... |
2018/02/26 | 1,020 | 3,637 | <issue_start>username_0: I'm trying to write a SQL Select statement that will tell me the total number of practices and the total number of shows that an artist has logged.
I have 3 tables, Artists, Practices and Shows.
The Practices and Shows tables have a Artist\_ID in them as a foreign key, as well as their own aut... |
2018/02/26 | 354 | 1,189 | <issue_start>username_0: I am trying to convert xml to xslt using the script below. The conversion is done flawlessly. Now, i want to write the contents into a new xml file. When i try to do so, I get just one line in my xml file. However when I print it in console i get multiline outputs. Can any one spot what I am do... |
2018/02/26 | 916 | 3,456 | <issue_start>username_0: On an asp.net mvc 5.2.4 model I have an email address field decorated thusly, with the System.ComponentModel.DataAnnotations.EmailAddressAttribute:
```
[DataType(DataType.EmailAddress)]
[EmailAddress(ErrorMessageResourceName = "EmailField", ErrorMessageResourceType = typeof(Messages))]... |
2018/02/26 | 734 | 2,660 | <issue_start>username_0: I am thinking to build a multichatbot architecture but I don't know what is the best. I have like 10 chatbots specialized in many fields (customers with phone problems, sellers, help with this or that product, etc...) and potentially 30 more.
What is the best design to go with to centralize al... |
2018/02/26 | 820 | 3,031 | <issue_start>username_0: I am new to Javascript and trying to add a and Query to a js file.
I have added a checkbox this is required to be checked for the submit button to show.
In the original there was already one checkbox with the js query but I have added a second. How do I make the js only allow the button to be c... |
2018/02/26 | 1,118 | 3,954 | <issue_start>username_0: so i have a few vendor files that i need to run from window scoped (it's a bunch of window scoped functions) plus i have some polyfills that i would like to bundle into the vendor bundle as well.
So i tried something like this:
```
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',... |
2018/02/26 | 1,037 | 3,606 | <issue_start>username_0: When I try to query a row for a specific tag, I get the correct row but I don't get all the row's tags. However, when I remove the query for the tag and just search by 'name' I get the correct row + all the row's tags.
```
SELECT communities.name,array_agg(community_tags.tag) as tag
FROM comm... |
2018/02/26 | 483 | 2,192 | <issue_start>username_0: User.Identity.IsAuthenticated is always false. I've been googling for hours and I cannot get this to work. I have a set of claims and I'm creating the identity and signing in with it using OWIN, but for some reason, IsAuthenticated is always false.
Here is my web.config relevant portion:
```
... |