date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/02/28 | 2,240 | 6,315 | <issue_start>username_0: My problem: apply a predicate to filter a list **in parallel**
==============================================================
I have a list, and I have a predicate. In practice, it's a long list and the predicate takes a while. I want to output just the elements of the list which satisfy the p... |
2018/02/28 | 480 | 1,344 | <issue_start>username_0: I have a pandas dataframe containing the below data, and i would like to add a new column which, for each date, returns the most frequently occurring 'weather\_type' over the previous 3 days. Where the result is a tie, i'd like the most recent 'weather\_type' to be returned.
```
d = {'date': [... |
2018/02/28 | 362 | 1,478 | <issue_start>username_0: >
> **TL:DR;**
> How would you centralize a webpack 3.x build setup for multiple modules?
>
>
>
I'm in the planning phase of restructuring my company's entire module library and making them available on npm. This however have created some debate on how to maintain the modules afterwards.
... |
2018/02/28 | 387 | 1,329 | <issue_start>username_0: I'm trying to loop over a collection, display it's pages as links and on those links have each of that page's tags be distinct class names. I have everything working except for the fact that the tags jumble together without any spaces.
Here's how I have the tags in the front matter of a page:
... |
2018/02/28 | 601 | 2,241 | <issue_start>username_0: I am trying to define a model using sqlalchemy such that one of the columns i only need in memory for processing, i do not have a corresponding database column for that. I need it such that when i save the in memory object, it should not try to persist that special column.
More context: I am m... |
2018/02/28 | 715 | 3,150 | <issue_start>username_0: If AWS Cloudfront caches your website content for visitors, what’s the point of also setting up an ELB, instead of a standard, single web-server EC2 instance?
As surely, it’s only a few Cloudfront connections that will communicate with the server.<issue_comment>username_1: This is a broad ques... |
2018/02/28 | 351 | 997 | <issue_start>username_0: I have a question,How can I create multiple thumbnail at different times of video?
Mean operate like this schematic:
```
input.mp4 => 00:10:00 => 1.jpg
input.mp4 => 00:20:00 => 2.jpg
input.mp4 => 00:25:00 => 3.jpg
```
I mean, with one command I produce multiple thumbnails from diffe... |
2018/02/28 | 518 | 1,384 | <issue_start>username_0: I have a class that looks like this:
```
class A(object):
def __init__(self):
self.var_a = []
self.var_b = []
```
Is there a way I can define `__str__` on `A` such that I can pass an index in this fashion:
```
instance_a = A()
# do stuff with instance_a causing v... |
2018/02/28 | 621 | 1,886 | <issue_start>username_0: We have installshield 2016 and inside this we are running installer script. That script is call through custom action.
So we are written following commnad to register "mydll.dll" as below mentioned command,
C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe /codebase mydll.dll
The above... |
2018/02/28 | 562 | 2,088 | <issue_start>username_0: I have two libraries, I want to call routines in the first library, they then call routines in the second library, but crash because those symbols are undefined. Is it possible to say "load these symbols" from library XX even though I don't want to call them?
testlib1.c:
```
#include
void su... |
2018/02/28 | 1,204 | 3,986 | <issue_start>username_0: >
> Implement function `add_record` that adds a new struct animal record to the dynamic array, and reallocates the array as needed. The start of the dynamic array is given in parameter `array`, and the current length of the array is given in parameter `size`. The new information to be added is... |
2018/02/28 | 658 | 2,233 | <issue_start>username_0: My problem is the following:
I have a list of a specific type, lets call it `A`.
`A` is defined by `A(name:String, value: Int)`.
This would make my list look like `[("a", 10) ("b", 12) ("c" 14)]`.
Now I want to use a map function to extract only the secondary values. that is construct a ... |
2018/02/28 | 1,842 | 4,317 | <issue_start>username_0: Like the title says, I have several matrices that I would like to stack in the 3rd dimension. I currently have a solution for stacking unequal vectors horizontally, which reads like so:
```
A = [1;2;3;4];
B = [1;2];
[i1,j1] = ndgrid(1:size(A,1),1:size(A,2));
[i2,j2] = ndgrid(1:size(B,1),(1:siz... |
2018/02/28 | 423 | 1,487 | <issue_start>username_0: I am trying to create a Batch File where you can get input from the user and i want it to look like this:
```
###################
# Batch File #
# #
# Enter Value #
# > #
###################
```
So i am using this code:
```
echo Batch Title
echo.
echo ... |
2018/02/28 | 578 | 2,495 | <issue_start>username_0: Given that I create an Azure 'App Service'
How do I ensure that this service is only callable from ...
A.> 2 existing external servers (whose IP addresses will be known)
B.> 3 other App Services which I will be creating, but whose IP Addresses may not be known since I may need to scale those... |
2018/02/28 | 1,736 | 5,792 | <issue_start>username_0: When I ask about the foldl type, what I see is this:
```
*Main> :t foldl
foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b
```
In this case, what is `t a`?
I guess it means that the function is using a `Foldable` parametrized with `a` but I'm not even really sure about the syntax. For ... |
2018/02/28 | 1,370 | 3,177 | <issue_start>username_0: I'm new to python and I'm trying to perform a simple task which is to read a .csv file and save it in a specific data structure. I'm using numpy to load the data and I get a `ndarray` of `ndarray`'s, which is not exactly what I want.
My code:
```
import numpy
filename = '../HTRU2/HTRU_2.csv'
... |
2018/02/28 | 1,035 | 3,470 | <issue_start>username_0: I have the following code snippet to allow me flip easily between double and float representations of floating point values:
```
#define FLOATINGPOINTSIZE 64
#if FLOATINGPOINTSIZE == 64
typedef double FP_TYPE;
#define FP_LIT_SUFFIX
#else
typedef float FP_TYPE;
#define FP_LIT_SUFFIX f
#endif
... |
2018/02/28 | 1,563 | 6,405 | <issue_start>username_0: we are moving from monolithic to microservice architecture application, we're still in planning phase and we want to know what is the best practices of building it.
suppose we have two services :
1. **User**
2. **Device**
* getUserDevices(UserId)
* addDevice(DeviceInfo, UserId)
* ...
**Ea... |
2018/02/28 | 593 | 2,213 | <issue_start>username_0: My software produced following error on a computer that had no debugger. I've been only sent the error message, and all I am able to understand is that somewhen a function called a get Item on a datagridview with a index that was too big. also this function has been called by a timer... Is ther... |
2018/02/28 | 2,567 | 6,393 | <issue_start>username_0: Given the following list of lists
```
arrayNumbers = [[32,3154,53,13],[44,34,25,67], [687,346,75], [57,154]]
```
how can I efficiently get the number of lists having only 4 items?
In this case, that would be `arrayNumbers_len = 2`. I can do this using a loop, but that is not efficient at al... |
2018/02/28 | 772 | 2,685 | <issue_start>username_0: I am writing a parameterised query where there is a requirement for the `LIKE` clause to include `NULL` values when `field LIKE '%'`.
I have multiple solutions; I ran these queries side-by-side and they return the similar execution plans with the same summary and the query times are similar. I... |
2018/02/28 | 1,117 | 3,609 | <issue_start>username_0: I'd like to create a url link that launches terminal (from webpage or browser such as chrome or safari) and ssh's to a box and launches remote commands (for example `ls`), in terminal it would look like:
`ssh user@1.2.3.4 'ls'`
I've tried:
`[SSH with ls](ssh://user@1.2.3.4 "ls")`
but this do... |
2018/02/28 | 722 | 2,278 | <issue_start>username_0: **Stack**
* FontAwesome v5
* D3js v4
* Angular 4
**Scenario**
I have a hierarchy tree with nodes that have option bubbles appended to it (think of it as Mickey Mouse balloon where the face is the node and the appended nodes are the ears). I would like those options to show an icon like FontA... |
2018/02/28 | 503 | 1,321 | <issue_start>username_0: I have problem with font size in materialize. if my client device become smaller text sizes is not responsive and they are so small. one solution is to use @media query for every client devies. this is not my solution because materialize itself has media queries and I don't want rewrite them ag... |
2018/02/28 | 700 | 2,385 | <issue_start>username_0: I'm new to JS and developing in general and I'm kind of stuck here.
I want to use a google Sheet as a backend and query it with js/jquery. I queried the sheet correctly and parsed every row of it (achieved with a forEach).
The results from column D and B are combined to a string in the end.
I ... |
2018/02/28 | 955 | 2,503 | <issue_start>username_0: I have 100 files with name file.1.netcc, file.2.netcc ... file.100.netcc. Each file contains the following contents:
```
# 4 # Number of network ROIs
# 2 # Number of netcc matrices
# WITH_ROI_LABELS
LFovea_LO LLO LMT RV3A
1 2 3 4
# CC
1.0000 0.2271 -0.1172 -0.2258
0.2271 1.0000 0.3... |
2018/02/28 | 2,055 | 5,504 | <issue_start>username_0: A sample data table within the database.
It's missing some days from each ID1/ID2 combo group
```
DECLARE @Week_DataTable TABLE
(
[ID1] INT
, [ID2] INT
, [Day_Enum] INT
, [IsActive] BIT DEFAULT ( 0 )
) ;
INSERT INTO @Week_DataTable
(
[... |
2018/02/28 | 1,217 | 3,782 | <issue_start>username_0: I am trying to do the proper DRY approach in merging data from two models... I used a queryset, using a class variable as a foreign key, I can then only access one instance. I do get a count of the number of instances:
```
nb_postal_codes = LocalModel.objects.filter(postalcode__icontains="J3L"... |
2018/02/28 | 1,858 | 6,020 | <issue_start>username_0: I am trying to build a small web app that pulls of a JSON file. I am able to get the information displayed but I want to limit what is displayed based off a value selected.
Here is my html
```
Choose a superhero...
Superman
Batman
Spiderman
Show People
First Name | Last Name | Email ... |
2018/02/28 | 712 | 2,809 | <issue_start>username_0: Suppose I have a requirement whereby I don't want to search the products on the `Hybris` frontend having a specific attribute value. Even if the following products are present in the Hybris `SOLR index`.
How to go about this?<issue_comment>username_1: Which products should be indexed are defi... |
2018/02/28 | 728 | 2,366 | <issue_start>username_0: I am unable to open a file I just created using `fopen()`, I tried this code on both Linux and Windows. I also tried this code using complete path.
```
#include
int main() {
char c;
FILE \*myFile = fopen("name.txt", "w"); //file name.txt created
fprintf(myFile, "My name is %s", "Adam"); //... |
2018/02/28 | 3,890 | 14,787 | <issue_start>username_0: I have followed this tutorial: <https://gamedevelopment.tutsplus.com/tutorials/how-to-create-a-custom-2d-physics-engine-the-basics-and-impulse-resolution--gamedev-6331> to create a 2d physics engine in c# (he works in almost all the time wrong and inconsistent pseudo c++) I've got Circle vs Cir... |
2018/02/28 | 914 | 3,337 | <issue_start>username_0: I have a vue.js item in my page that tracks changes made to a form. It looks like this:
```
var changes_applied = [];
var changes_applied_block = new Vue({
name: "ChangesApplied",
el: '#changes-applied',
data: {
items: changes_applied
},
methods: {
remove: ... |
2018/02/28 | 2,050 | 6,842 | <issue_start>username_0: I reviewed many examples on-line about running another process (either PERL or shell command or a program), but do not find any useful for my needs way.
(As by already received answers I see that my 'request' is not understood, I will try to say it in short, leaving all earlier printed as an ... |
2018/02/28 | 668 | 2,223 | <issue_start>username_0: I tried this but did not work.
```
import re
s = "Ex\am\ple String"
replaced = re.sub("\", "/", s)
print replaced
```
Any suggestions?<issue_comment>username_1: Just use this code:
```
s = s.replace("\\", "/")
```
It replaces all the backslashes with the forward slash. The reason for ... |
2018/02/28 | 612 | 2,023 | <issue_start>username_0: In a Google Sheets spreadsheet, I have the cell A1 with value `"people 12-14 ABC"`. I want to extract the exact match "ABC" into another cell. The contents of cell A1 can change, e.g. to `"woman 60+ ABCD"`. For this input, I would want to extract "ABCD". If A1 was instead `"woman 12-20 CAE"`, I... |
2018/02/28 | 765 | 2,118 | <issue_start>username_0: There are two directories that contains these files:
First one /usr/local/nagios/etc/hosts
```
[root@localhost hosts]$ ll
total 12
-rw-rw-r-- 1 apache nagios 1236 Feb 7 10:10 10.80.12.53.cfg
-rw-rw-r-- 1 apache nagios 1064 Feb 27 22:47 10.80.12.62.cfg
-rw-rw-r-- 1 apache nagios 1063 Feb 22 ... |
2018/02/28 | 807 | 2,419 | <issue_start>username_0: Not sure if I am just having a brain fart because this problem seems VERY simple:
```
+----------+----------+---------------------+
| user_id | country | country_probability |
+----------+----------+---------------------+
| 10000022 | France | 0.126396313 |
| 10000022 | Italy | ... |
2018/02/28 | 834 | 2,460 | <issue_start>username_0: I have a data frame (hit) that contains a single column. This is populated with unique search results.
A second data frame (data) contains the results of the various search queries. The column names identify the search term used and the rows are populated with the search results.
I want to bu... |
2018/02/28 | 793 | 2,673 | <issue_start>username_0: Im reading a book in c++ and I was doing some tests as I didnt understand something and when I tried printing these 3 lines I was expecting something different for all 3. The first one, the location in memory of the pointer, the second one, the address stored by the pointer, and the third one, ... |
2018/02/28 | 1,136 | 3,432 | <issue_start>username_0: I'm using the ssl library with python 3.6. I'm using self-signed ECDSA certificate that I generated with openssl.
**Server/client code:**
```
# Create a context in TLSv1.2, requiring a certificate (2-way auth)
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
context.options |= ssl.OP_NO_TLSv1
... |
2018/02/28 | 294 | 1,010 | <issue_start>username_0: I am having trouble converting this code snippet into reading only the first line of the file, rather than opening it random.
Can somebody help?
```html
lines = open('myfile.txt').read().splitlines()
account =random.choice(lines)
```<issue_comment>username_1: If you only want the first line... |
2018/02/28 | 410 | 1,296 | <issue_start>username_0: Let's say I have a data frame with a vector:
```
column3
1
3
5
5
4
5
10
5
```
Now I want to create an entirely new vector that goes something like:
If value in column3 < 3, then value in new vector is "Small". If value in column3 >3 and <5, then value in new vector is "Medium".
I tried nes... |
2018/02/28 | 366 | 1,123 | <issue_start>username_0: I have below kind of data which is space separated, I want to parse it by space but I am getting issue when particular element has “Space” in it.
```
2018-02-13 17:21:52.809 “EWQRR.OOM” “ERW WERT11”
```
have used below code:
```
import shlex
rdd= line.map(lambda x: shlex.split(x))
```
but... |
2018/02/28 | 337 | 1,258 | <issue_start>username_0: My app contains a collapsing toolbar with a tabview. The tabs have an own background color, my `@color/colorPrimary` and the collapsing toolbar has a set background image. Now I would like to 'merge' them: the tablayout should be transparent, so the background image reaches from the toolbar dow... |
2018/02/28 | 874 | 2,756 | <issue_start>username_0: Let's say we have a list list\_a = [a,b,C,.,/,!,d,E,f,]
i want to append to a new list only the letters of the alphabet.
So the new list will be list\_b = [a,b,C,d,E,f].
So far i have tried doing it like that way:
```
list_b = []
for elements in list_a:
try:
if elements == str(el... |
2018/02/28 | 1,692 | 6,196 | <issue_start>username_0: **In a nutshell**: I want to have an overall timeout for a call to `runTasks()` in a Gearman client.
I feel like I can't be the first person to want this, but I can't find an example of how to put it together.
Here's what I want to achieve:
1. In a PHP script, use the Gearman client to sta... |
2018/02/28 | 1,405 | 4,792 | <issue_start>username_0: There is a template to fill `vector` from the file:
```
template
void fill\_vector\_from\_file(const std::string &filePath, std::vector & target)
{
std::ifstream is(filePath, std::ifstream::in);
is.seekg(0, std::ifstream::end);
std::size\_t size = is.tellg();
is.seekg(0, std::ifstream::b... |
2018/02/28 | 1,402 | 5,801 | <issue_start>username_0: I'm making a program in school where users are quizzed on certain topics and their results are saved into a csv file. I've managed to print off the row with the highest score, but this doesn't look very neat.
```
with open ('reportForFergusTwo.csv', 'r') as highScore:
highScoreFind... |
2018/02/28 | 914 | 3,749 | <issue_start>username_0: Fist, I have a component called `FieldView` defined in this way:
```
xml version="1.0" encoding="utf-8" ?
```<issue_comment>username_1: If you are using that same `Style` in multiple views throughout your entire app I would probably just move your style into your `App.xaml` and use it from th... |
2018/02/28 | 714 | 2,694 | <issue_start>username_0: I'm using Entity Framework Core with Code First approach but receive following error when trying to start application:
>
> System.Data.SqlClient.SqlException: 'Introducing FOREIGN KEY
> constraint 'FK\_Grades\_Students\_StudentId' on table 'Grades' may cause
> cycles or multiple cascade pa... |
2018/02/28 | 1,745 | 5,833 | <issue_start>username_0: I have a php file that works up to a certain point but I need a bit of help on the loop for doing a MySQl Insert.
The following preforms a SELECT and then stores the Order ID for all records that have a order\_status of 'S'. This works perfectly, printing each appropriate order ID.
I then pus... |
2018/02/28 | 523 | 2,011 | <issue_start>username_0: I'm trying to add a very simple method to the String object:
```
String.prototype.double = function double() {
let newStr = ""
for (let char of this) {
console.log(char)
newStr += char;
newStr += char;
}
}
```
As you can see, it j... |
2018/02/28 | 1,588 | 4,993 | <issue_start>username_0: I'm making a clone of my project that is in Github in the Eclipse IDE.
After entering all the access data, the following error occurs:
>
> <https://github.com/>"COMPANY NAME"/"PROJECTNAME".git: cannot open git-upload-pack
>
>
>
I already added the **http.sslVerify = false** - did not work... |
2018/02/28 | 1,333 | 5,421 | <issue_start>username_0: I'm making a frame who needs to show labels in a Scroll Panel, but after I add the labels the scroll don't work.
[](https://i.stack.imgur.com/pjzUt.png)
```
JScrollPane scrollPane = new JScrollPane();
scrollPane.setVerticalScrollBarPolicy... |
2018/02/28 | 479 | 1,726 | <issue_start>username_0: Does anyone know what these icons mean in TFS 2017 Source Control Explorer? The files are .cpp and .h... The icons for the two newly added files show up correctly (as seen below), but the existing files all turn into the multi-yellow-document... why is it replacing the icon for file type?
[![e... |
2018/02/28 | 1,158 | 5,045 | <issue_start>username_0: I am in process in adding CloudKit to my app to enable iCloud sync. But I ran into problem with my method, that executes query with perform method on private database.
My method worked fine, I then changed a few related methods (just with check if iCloud is available) and suddenly my perform m... |
2018/02/28 | 1,054 | 3,440 | <issue_start>username_0: I have a list of dicts.
```
dictList = [
{'name': 'some name'},
{'name': 'some other name'},
{'age': 'some age'},
{'last_name': 'some last name'}
]
```
In that list of dicts each dict has one key and one value for that key, as shown above.
I need to create a dict that has the keys... |
2018/02/28 | 3,232 | 10,997 | <issue_start>username_0: **The problem**
Suppose that I have written a lengthy script
in some language "lang",
and now want to convert this single-file script
into a directory tree with a project consisting of many files. I want to insert some kind of separators and file-paths into this file, and process it in some wa... |
2018/02/28 | 751 | 2,684 | <issue_start>username_0: I wrote a script that keeps customer's device information shown below. Is it possible to convert this code to a GUI with Python Tkinter. How can I do it?
```
print("FAILURE LOGGING PROGRAM")
filename = input ("Please enter the file name: ")+(".txt");
with open (filename, "w") as f:
f.... |
2018/02/28 | 2,166 | 8,219 | <issue_start>username_0: I am using "Visual Studio 2017 Professional". I can not get a project to recognize that MySQL is an available DB option. MySQL does not show up in the list of possible connections when I create a new model. I know that there are tons of SO questions and other web pages on this topic because I h... |
2018/02/28 | 1,102 | 3,823 | <issue_start>username_0: I have different respos in bitbucket, but I want to commit every repo with seprate account and facing problem to login more than account using gitbash<issue_comment>username_1: I have been fighting this fight for two weeks. I *FINALLY* found a combo of versions that works for me. The following ... |
2018/02/28 | 2,523 | 6,654 | <issue_start>username_0: The function `torch.nn.functional.softmax` takes two parameters: `input` and `dim`. According to its documentation, the softmax operation is applied to all slices of `input` along the specified `dim`, and will rescale them so that the elements lie in the range `(0, 1)` and sum to 1.
Let input... |
2018/02/28 | 794 | 3,386 | <issue_start>username_0: I am looking for a way to rerender one react component based on input to another. I am using react without Flux / Redux and have committed enough to the project that I do not think that is a direction I can take at this point.
What I want to do looks sort of like this:
```
class Component1 ex... |
2018/02/28 | 648 | 1,851 | <issue_start>username_0: ```
def count_vowels(string)
count_vowels = 0
my_vowels = ["a" "e" "i" "o" "u"]
idx = 0
while idx < string.length
gdx = 0
while gdx < my_vowels.length
if string[idx] == my_vowels[gdx]
count_vowels = count_vowels + 1
else
gdx = gdx + 1
end
en... |
2018/02/28 | 1,495 | 5,417 | <issue_start>username_0: I am using flask with bootstrap, and I need to create a field without the label, since I will be putting it as a placeholder, that way save space in the UI, since this field appears several times.
```
{{ wtf.form_field(field) }}
```
I don't want Label Field, just the actual field that the us... |
2018/02/28 | 965 | 3,216 | <issue_start>username_0: I've just installed CouchDB on my Windows Machine and worked well.
Now, I'd like to access from another machine in the same network.
I've changed on `local.ini` the `bind_address` from `127.0.0.1` to `0.0.0.0`:
```
[chttpd]
bind_address = 0.0.0.0
port = 5984
```
I restarted the `Apache Cou... |
2018/02/28 | 1,063 | 2,598 | <issue_start>username_0: I am trying to create a plot with a facet for each region. I added the region column at the end because I thought I could use that as the parameter for facet\_wrap().
Also, what do I set y equal to if I want it to be equal to the values listed in the tibble below?
```
mydata <-
read_csv('h... |
2018/02/28 | 398 | 1,751 | <issue_start>username_0: We're trying to get realtime updates of the devices location, by using Traccar API with Retrofit2, until now, we've only been able to get the location when the application starts (Android application).<issue_comment>username_1: To get live updates you should be using WebSocket connection to Tra... |
2018/02/28 | 979 | 3,647 | <issue_start>username_0: I am trying to wring a pl/sql script that will check every value for every column and every row for trailing whitespace.
My plan is to get the column and table name for my app from dba\_tab\_cols, then loop through each row of that table on that column and check for trailing whitespace and tri... |
2018/02/28 | 365 | 1,299 | <issue_start>username_0: I have a Windows Forms app .cs file in which at the top is:
```
using System.Collections.Generic;
using System;
using System.Linq;
using System.Drawing;
using System.Diagnostics;
using System.Threading.Tasks;
using System.Data;
using System.Xml.Linq;
using Microsoft.Visua... |
2018/02/28 | 1,189 | 3,645 | <issue_start>username_0: I couldn't find an answer. hopefully someone will be able to help.
I need to be able to search for numbers like "12" and only get 1 true on a comma delimited string like:
```
var str = "1, 13, 112, 12, 1212, 555"
```
Basically, if I have product codes, and I find a 12, I'd like to return a ... |
2018/02/28 | 1,267 | 3,966 | <issue_start>username_0: ```
user = "1401";
document.write("User|"+CallSINIMethod("GetValue", ["UserField", "UserProfileFirstName", user])+"|
");
docs = CallSINIMethod("GetListValue", ["UserListProperty", "OrderedDocuments", user]);
i = 0;
while (i < docs.length) {
document.write(CallSINIMethod("GetValue", [... |
2018/02/28 | 1,022 | 2,919 | <issue_start>username_0: What's the best way to write a series of floating point range comparisons? To use the example from the GitHub comment below,
```
let color = match foo {
0.0...0.1 => Color::Red,
0.1...0.4 => Color::Yellow,
0.4...0.8 => Color::Blue,
_ => Color::Grey,
};
```
The naive s... |
2018/02/28 | 1,039 | 3,015 | <issue_start>username_0: I'll try to wrap my head around this regex which works on server side.
```
new RegExp(/(?
```
it walkes through a string which look like this:
```
{Product{id{$lt:10,$gt:20},title,other,categories{id,name}}}
```
It matches all keys which have no subkeys or values. But this do not work in J... |
2018/02/28 | 748 | 2,630 | <issue_start>username_0: I am doing a form using `react-jsonschema-form`, but i really want to customize my application (including the form) with the `Material-UI`.
I am having trouble to use both together because `react-jsonchema-form` uses a `uiSchema` for styling and the `Material-UI` is set on a `prop` like this : ... |
2018/02/28 | 407 | 1,187 | <issue_start>username_0: I am trying to print unique values of the column `ADO_name` in my data set. Following is the example data set and code I tried (which gives error):
```
import numpy as np
import pandas as pd
from pandas import Series, DataFrame
data = {'ADO_name':['car1','car1','car1','car2','car2','car2'],
... |
2018/02/28 | 467 | 1,540 | <issue_start>username_0: Code below, it should be O(n). **There are two loops, I know this.** But that doesn't necessarily mean it's O(n^2). The function loops won't run more than n + 1 times (at least as far as I can tell!). That should be O(n). Am I wrong? Can someone help me out? Thanks!
EDIT: The program puts odd ... |
2018/02/28 | 556 | 2,405 | <issue_start>username_0: How can i create a full web application with Java and React without having to create a rest API, not even a private API with username:password authentication.
I want it to be as it is created with JSP.
Is it possible call Java methods with react locally ?
Or even creating a restfull API that ... |
2018/02/28 | 1,002 | 3,769 | <issue_start>username_0: While trying to following the instructions of installing Keras and TensorFlow on Rstudio link <https://keras.rstudio.com/index.html> I get the following error. It is a work computer that is running Windows 7. I am not familiar with python, but I believe I have python 3.6 installed correctly (I ... |
2018/02/28 | 1,180 | 4,504 | <issue_start>username_0: I am trying to embed a sample Power BI dashboard in a WPF application following the sample project and sort of tutorial from [here](https://blogs.msdn.microsoft.com/premier_developer/2018/01/27/integrate-power-bi-dashboards-reports-and-tiles-into-a-wpf-application/). When I launch the app, I ha... |
2018/02/28 | 650 | 2,033 | <issue_start>username_0: I've written the following PCRE regex to strip scripts from HTML pages: `[\s\S]\*?< \*?\/ \*?script \*?>`
It works on many online PCRE regex testers:
<https://regex101.com/r/lsxyI6/1>
<https://www.regextester.com/?fam=102647>
It does **NOT** work when I run the following perl substitution c... |
2018/02/28 | 819 | 2,721 | <issue_start>username_0: --EDIT-- Added my Employee class
Do methods only process information (attributes) from the class? Can method be used to process information from outside?
How can I "promote" Sarah? So I have to create sarah employee instance but how do I make a manager to promote her?
```
class Employee:
... |
2018/02/28 | 632 | 2,236 | <issue_start>username_0: So i have been trying to tackle this problem for the past few hours and it has really stumped me, as far as i can see everything is correct. The create function is meant to create a specific amount of divs that are defined by the user within an input box. The divs will have a specific height, w... |
2018/02/28 | 870 | 2,901 | <issue_start>username_0: ANSWER: I found out that `data` is not passed down to the nunjucks template. I replaced `{{data.title}}` and `{{data.sub}}` with `{{title}}` and `{{sub}}` in index.njk and now my template renders the object variables. Thanks antonmyrberg & petarr.
I am trying to pass an object to my nunjucks t... |
2018/02/28 | 676 | 1,365 | <issue_start>username_0: I am having a problem with date & time format in R.
my R code is having the format: "%m/%d/%y %H:%M". Example: "02/05/18 00:29"
But,I have datasets with different type of formats like "%Y-%m-%d %H:%M:%S", etc
I am trying to write a R code where all type of format will be converted into the f... |
2018/02/28 | 579 | 1,888 | <issue_start>username_0: I am simply trying to research/obtain logic for how to dynamically (I.e. GETDATE() function) call tables which are created with date stamps.
For example, I have tables in the database listed as such:
* [dbo].[CLAIM\_01.01.2018]
* [dbo].[CLAIM\_01.15.2018]
* [dbo].[CLAIM\_01.31.2018]
The logi... |
2018/02/28 | 3,402 | 10,271 | <issue_start>username_0: I'm looking for some kind of "Domino sort" algorithm that sorts a list of two-sided items based on the similarity of "tangent" sides of subsequent items.
Suppose the following list where items are represented by 2-tuples:
```
>>> items
[(0.72, 0.12),
(0.11, 0.67),
(0.74, 0.65),
(0.32, 0.52... |
2018/02/28 | 394 | 1,411 | <issue_start>username_0: I'm now working on implementing the function to swipe to the next page for people to browse. Yeah, it's just like the swipe function of Tinder. I have searched the Internet but only found swipe to delete. Can anyone give me a hint?<issue_comment>username_1: What you want is [`PageView`](https:/... |
2018/02/28 | 736 | 2,804 | <issue_start>username_0: I can't find any annotation which replace/working the same like TestWatcher.
My goal:
Have 2 functions which do something depend on test result.
* Success? Do something
* Fail? Do something else<issue_comment>username_1: The [TestWatcher](https://junit.org/junit5/docs/5.5.1/api/org/junit/jupi... |
2018/02/28 | 522 | 1,730 | <issue_start>username_0: I have a dataset where I calculate weightings based on total mpg and apply this weighting to a constant to calculate column "distribution". What I want to do is, to allocate another constant of 100 to only those cars where the maker is Mercedes. So I first calculate where each individual car st... |
2018/02/28 | 681 | 2,160 | <issue_start>username_0: In Colaboratory, we are forced to use pip install. Some third packages such as gym, PLE, etc, their installation should be
```
git clone https://github.com/ntasfi/PyGame-Learning-Environment.git
cd PyGame-Learning-Environment/
pip install -e .
```
When I tried, here are some problems:
1) `... |
2018/02/28 | 556 | 2,246 | <issue_start>username_0: I'm having a hard time binding a ContentView to a property in a C# Xamarin app.
Here is how I'm composing it:
```
protected override View MyView
{
get
{
if (_myView == null)
{
_myView = new ContentView
{
HorizontalOptions = Layou... |
2018/02/28 | 1,355 | 5,814 | <issue_start>username_0: I want to delete items from a recyclerview when pressing a view which is in the items.
**The situation:** Having a list made using a RecyclerView with a dataset and a ViewHolder which has a onClick on a view for deleting the item from the list, I need to know which item has been clicked on the... |
2018/02/28 | 1,037 | 3,983 | <issue_start>username_0: i am stuck while showing an overlay text that should be like:
[](https://i.stack.imgur.com/GccZy.jpg)
what i have done is:
```

Short description of Aqua Aerobics comes here. Lorem ipsum ... |
2018/02/28 | 372 | 1,316 | <issue_start>username_0: I am trying to read from a file and add my numbers to an array. The file can contain white spaces and strings but I only need the digits.
```
0
4
xxx
52
23
```
Here is my code so far:
```
Scanner scanner = new Scanner(new File("file.txt"));
int i=0;
while(scanner.hasNextInt() && count < 1... |
2018/02/28 | 1,240 | 3,954 | <issue_start>username_0: Good Morning,
I am working on a problem I hope has a very simple solution but I can't seem to get it formatted in the most useful format.
In my analysis work, we are looking at adding a full time shift to a remote location and to see if this would be productive or keep with Per Diem work, we ... |
2018/02/28 | 395 | 1,360 | <issue_start>username_0: I have a jQuery function who is executed by 'change' event from a value picked in a tag.
But now I don't need the because I'll force that value inside of my jQuery function.
My page uses JSF and PrimeFaces).
My jQuery function:
```
var table = '#myTable'
$('#maxRows').on('change', function... |
2018/02/28 | 1,504 | 4,966 | <issue_start>username_0: Time and again, I'm faced with the problem of sampling a specific number of lines (let's say `N`) from two files (i.e. from a *parallel corpus*; the sentences are aligned according to line numbers) **consistently**.
This is a common and frequent task for anyone doing research in (Neural) Machi... |