date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/12 | 483 | 1,400 | <issue_start>username_0: ```
void mystery2 (int n)
{
int i;
for (i = 1; i <= n; i++) {
double x = i;
double delta = 1 / (double)i;
while ( x > 0 )
x -= delta;
}
return 0;
}
```
Why is the BIG O, The time complexity of this function is O(n^3) and not O(n^2)?
What I done is when i=1 ==> 1 iterations... |
2018/03/12 | 2,118 | 6,709 | <issue_start>username_0: This is more of a syntactical question than anything. Can't seem to figure out the syntax to write out this proof of concept. I currently have a *RoR / psql* database that users can sign up for and log in to. A few forms are restricted for admins (user accounts are not admins by default).
The... |
2018/03/12 | 1,213 | 4,327 | <issue_start>username_0: I'm implementing my own iterator. tqdm does not show a progressbar, as it does not know the total amount of elements in the list. I don't want to use "total=" as it looks ugly. Rather I would prefer to add something to my iterator that tqdm can use to figure out the total.
```
class Batches:
... |
2018/03/12 | 676 | 2,314 | <issue_start>username_0: I cannot seem to figure out how to do this.. I'm stuck. I can solve it in my head but i can't figure out how to write the code. I know this code probably isn't even close to right, but I'm not sure if the easiest way to go about this is to convert the chars string into a character array or if I... |
2018/03/12 | 1,801 | 6,597 | <issue_start>username_0: In *OData V3*, I can select just fields from parent/ancestor entities like this:
<http://services.odata.org/V3/Northwind/Northwind.svc/Order_Details(OrderID=10248,ProductID=11)?&>$select=Product/Category/CategoryName&$expand=Product/Category
That query returns only *CategoryName*, it does not ... |
2018/03/12 | 659 | 2,308 | <issue_start>username_0: I am trying to execute a Python program as a background process inside a container with `kubectl` as below (`kubectl` issued on local machine):
`kubectl exec -it -- bash -c "cd some-dir && (python xxx.py --arg1 abc &)"`
When I log in to the container and check `ps -ef` I do not see this proc... |
2018/03/12 | 608 | 2,149 | <issue_start>username_0: I justed messed up my GIT Remote Repository and Local repository by updating the current code with older commit using `git checkout .`
Assume that I am at commit state A-B-C-D and I want to revert the complete project state to B, which means I want same package structure and files as it was pu... |
2018/03/12 | 352 | 1,403 | <issue_start>username_0: I have trouble when Reading one column with multible rows from a MySql table.
My code follows below:
```
public ObservableCollection ReadFromColumn(string table, string column)
{
query = string.Format("SELECT DISTINCT {0} FROM {1};", column, table);
if (this.OpenConnection() == true)... |
2018/03/12 | 347 | 1,283 | <issue_start>username_0: Hope you could help me here:
I'm currently building an app which I created through CRNA and then ejected. I get the ios version right on but I'm currently struggling a lot with the android version.
When running `react-native run-android` all I can get is the following error:
```
Error type 3
... |
2018/03/12 | 1,154 | 5,972 | <issue_start>username_0: I have a binary classification problem with categories background (bg) = 0, signal (sig) = 1, for which I am training NNs. For monitoring purposes, I am trying to implement a custom metric in Keras with TensorFlow backend that does the following:
1) Calculate the threshold on my NN output whic... |
2018/03/12 | 912 | 5,132 | <issue_start>username_0: I know there is already a post with the same name as this but it provides a partial solution for the problem. The post is: [VSTO Word post save event](https://stackoverflow.com/questions/36656564/vsto-word-post-save-event)
I'm using this class and it helped me a lot. However, when I make chang... |
2018/03/12 | 1,787 | 5,491 | <issue_start>username_0: My English isn't that good.
I try to make a TextLogger, for example:
if I have two different arrays:
```
string[] array1 = {"a", "b", "c", "d"}
string[] array2 = {"y", "c", "h", "f"}
```
and I have the char "c" in both of the arrays, then both of the char "c" should be removed.
Output:
a, ... |
2018/03/12 | 702 | 1,955 | <issue_start>username_0: Hi I'm trying to generate an array of every hour of the day. However, I want it to start with the current hour.
For example,
**if the current time is 2:00 pm, the array should start:**
['1400', '1500', '1600', 1700', '1800', '1900', '2000', '2100', '2200', '2300']
**instead of**
['0000'... |
2018/03/12 | 838 | 2,463 | <issue_start>username_0: I'm having trouble communicating with my schema-registry and kafka-rest services from the other containers in the overlay network within my swarm.
After provisioning my nodes and joining them to the swarm, I created an overlay network using this command:
```
docker network create -d overlay -... |
2018/03/12 | 2,042 | 7,505 | <issue_start>username_0: I am trying to write a code that will take a list of titles/names, and create a tab for each one of them, with each worksheet having a name from the list.
For example, given a table on the ActiveSheet (might not necessarily be sheet1)
```
Metric | Comments | Title
1 | testing1 | This is M... |
2018/03/12 | 1,730 | 6,330 | <issue_start>username_0: I'm making a list of calls and I need to count how many attendance absences and justification each student has, but I can not. Someone could give a light.
I'm lost in this part.
```
{{totalPresente}} |
00 |
```
->>>>>>>> [stackblitz](https://stackblitz.com/edit/angular-bzbaez) <<<<<<<<... |
2018/03/12 | 1,243 | 3,758 | <issue_start>username_0: Both on linux and windows when I run the yarn build command after making the following edits on package.json:
```
{
"name": "chatastrophe",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"build": "node_modules/.bin/webpack",
' },
"dependencies": {
"... |
2018/03/12 | 925 | 2,945 | <issue_start>username_0: I am consuming SOAP web services in my application. I am generating jaxb classes using maven by providing wsdl at build time. Now these wsdls are getting changed for each higher environement i.e. Dev, Integration, Stage and Prod.
That means I will have to build my project everytime I move up t... |
2018/03/12 | 2,662 | 10,683 | <issue_start>username_0: I've been running the following code in order to download a `csv` file from the website `http://niftyindices.com/resources/holiday-calendar`:
```
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({headless: true});
const page = await browser.newPage... |
2018/03/12 | 1,713 | 5,280 | <issue_start>username_0: I was given this question by a prospective client to solve and I wasn't able to on time, only the `makeSFns` function can be altered and as I was altering to give specific square values to match the `square` function (based on position in `arr`) I kept getting the error of `funcs[i] is not a fu... |
2018/03/12 | 2,011 | 6,009 | <issue_start>username_0: I have panel data and need to apply spml but I keep getting the same mistake and despite trying I cannot manage to overcome it.
Basically, I have a balanced panel of 36 units and 261 days of observations.
I created a *data.frame* (named **aaa**) with *6* columns
>
> Bank, Date, CDS, X1, X2... |
2018/03/12 | 1,511 | 4,632 | <issue_start>username_0: I am trying to pass data from javascript to my python API
```
$.ajax({
type: 'POST',
url: "http://localhost:5000/handle_data",//url of receiver file on server
data: my_Data, //your data
success: function (response) {
console.... |
2018/03/12 | 1,686 | 4,740 | <issue_start>username_0: example:
```
L = [12,14,22,41,21,23]
```
and I want the result to be:
```
R == [12,14,22,23]
```
The digits of the number must be in an increasing order, following are my solutions and they both work, but they both are too slow.
What's the fastest way of sorting it?
solution one:
```... |
2018/03/12 | 836 | 1,756 | <issue_start>username_0: Similar to [Finding groups of contiguous numbers in a list](https://stackoverflow.com/questions/16324897/finding-groups-of-contiguous-numbers-in-a-list) and [Find consecutive values in vector in R](https://stackoverflow.com/questions/24837401/find-consecutive-values-in-vector-in-r), the differe... |
2018/03/12 | 1,108 | 5,035 | <issue_start>username_0: I'm quite experienced with Unity and other (non-Unreal C++) game engines. I've managed multiple projects in C++-based engines, but with Unity in the past, I've used one shippable project per project folder. At the moment I have 3 barely-related, multi-platform projects that share the same third... |
2018/03/12 | 1,394 | 4,804 | <issue_start>username_0: i want to get the string before a series of certain characters or substrings.
For instance, i have
```
unsigned char KeyStr[BUFFER_SIZE] = "-#NOT#"
unsigned char SomeStr[BUFFER_SIZE] = "this is the string i want to extract-#NOT#"
```
From above char array, i want to get `this is the string... |
2018/03/12 | 439 | 1,393 | <issue_start>username_0: I am attempting to run a Perl script, which produces the following error:
>
> Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^(.*)\$ENV{ <-- HERE (.*)}(.\*)$/ at /root/cesm1\_2\_0/scripts/ccsm\_utils/Case.template/ConfigCase.pm line 1180.
> Compilation failed... |
2018/03/12 | 580 | 2,439 | <issue_start>username_0: We need a durable cache for storing blobs which are as follows
1. The blob could be from 1 MB to 1 GB.
2. We do not have to index the blog document.
3. The cache entry should be durable in case of node failure. So we need replication and partitioning.
4. There should be a write-behi... |
2018/03/12 | 1,367 | 5,579 | <issue_start>username_0: So my problem is simple but Ihave not managed to find a solution. I have an ArrayList that stores the uid (user id) of users that have clicked a button. This data is then sent to firebase's Cloud Firestore. When user clicks the button, the users uid gets saved in the ArrayList. But when I sign ... |
2018/03/12 | 313 | 899 | <issue_start>username_0: ```
import sympy
```
I am trying to find a matrix after taking each of its values (mod n).
I know numpy arrays work fine with this but i have to use sympy unfortunately.
Does anyone know of an inbuilt sympy function that does this or any other way round it? Thank you!
```
B = sympy.Matrix([[... |
2018/03/12 | 470 | 1,494 | <issue_start>username_0: in the following JSFiddle how can make The text"production "color blue and its value down there,green,for example!
html
```
```
css
```
.Btns {
width:200px;
height:75px;
background-color:lightblue;
color:black;
font-weight:bold;
}
... |
2018/03/12 | 695 | 2,415 | <issue_start>username_0: I have nodes with multiple labels:
```
create(p:SmartPhone:Phone:Product {name:'iPhoneX'})-[r:productOf]->(c:Company {name:"Apple"})
create(p:SmartTV:Product {name:string})
```
In creating my query, I have to parse my query from user's question. For example, "Do you have Apple's smart phone... |
2018/03/12 | 653 | 2,046 | <issue_start>username_0: When running a script on remote server, I need prevent the nohup output from the remote server to be displayed on the ssh server.
I am running below command line to run a script on remote server.
```
ssh user@server.com "cd /cpmapps/soa/operations/bin/; ./restart_soa.sh stop"
```
But when i... |
2018/03/12 | 551 | 1,795 | <issue_start>username_0: I have successfully centred the woocommerce products on my page using css. However, the star-ratings div refuses to center whatever I do to it. I can change its colour and background, so I know that I am referring to the right element. Any help would be appreciated.
CSS:
```css
#top_rated_wra... |
2018/03/12 | 1,496 | 4,797 | <issue_start>username_0: I have a table which contains a column having JSON text. I want to parse that column and extract the different attributes to multiple columns.
```
c:([] date:2?.z.d ; client:( "{ \"firstName\": \"John\", \"lastName\": \"Smith\", \"age\": 27 }" ; "{ \"firstName\": \"Scott\", \"lastName\": ... |
2018/03/12 | 1,096 | 3,046 | <issue_start>username_0: What is the fastest way to write a vector to a file? I have a character vector that is ~2 million rows and that has rather large values (200 characters). I am currently doing
```
write(myVector, "myFile.txt")
```
But this is extremely slow. I have searched around for solutions but the fast w... |
2018/03/12 | 1,191 | 4,328 | <issue_start>username_0: I'm trying to do collision for a 2D character and a collider object. I have defined the OnTriggerEnter function to display a message in the debugger when a trigger is entered. The character is the "CharacterRobotBoy" asset from the Unity standard assets package (contains a BoxCollider2D) and I ... |
2018/03/12 | 999 | 3,318 | <issue_start>username_0: I'm trying to setup frontend for my two web applications by using ingress controller in local kubernetes cluster. I followed all steps outlined in [1] and detailed instructions in [2]. But so far out of luck. The error I got is the following:
```
Warning CreatingLoadBalancerFailed Error creati... |
2018/03/12 | 2,387 | 9,107 | <issue_start>username_0: I am using material tabs: <https://material.angular.io/components/tabs/overview>
I have a page with a tab view that I want to use to populate one custom component per tab with a click of the button. Assume I have two components with the selectors "customcomponent1" and "customcomponent2". I wa... |
2018/03/12 | 536 | 1,651 | <issue_start>username_0: I'm getting the following error while trying to execute my script
```
]""".format(id="123", name="test")
KeyError: '\n "id"'
```
Here's my script. I just need to format a multiline string. I tried using a dictionary in the format section but that didn't work either.
```
import requests
... |
2018/03/12 | 1,138 | 3,407 | <issue_start>username_0: I'm using the bash shell in Windows 10 which makes everything feel like a unix system and I'm trying to run the following python2.7 code:
```
from selenium import webdriver
driver = webdriver.Chrome()
```
However, I get the following error code:
```
Traceback (most recent call las... |
2018/03/12 | 275 | 1,041 | <issue_start>username_0: I have a package consists of function and procedures
```
CREATE OR REPLACE PACKAGE BODY schema.pkg_product as
function xxxxx()
procedure product_get(p_product_id IN Number,
P_direct_balance Out Number,
P_indirect_balance Out Number) IS
v_request CLOB :=
v request\_end va... |
2018/03/12 | 298 | 1,079 | <issue_start>username_0: I am following this guide for channels tutorial (<https://media.readthedocs.org/pdf/channels/latest/channels.pdf>) and after adding channels to top of `INSTALLED APPS`, adding `ASGI_APPLICATION = 'mysite.routing.application'` to my setting file and creating following `routing.py`:
```
# .../ro... |
2018/03/12 | 373 | 1,206 | <issue_start>username_0: I am trying to make it so that if the `$status` is set to admin, then when the user status is echoed out: `### Status: php echo $status; ?` the color of the text $status should be set to red. I'm not really sure on how to go about it.
```
php
$admin = 1;
if($admin == 1){
$stat... |
2018/03/12 | 479 | 1,771 | <issue_start>username_0: This is not question, just answer:
1. Create run/debug configuration, type Node.js
2. Select your node interpreter
3. As node parameter insert your ava bin and parameter `--verbose`
For me it's: `./node_modules/.bin/ava --verbose`
4. Select your working directory
5. Done, now you can debug
T... |
2018/03/12 | 297 | 966 | <issue_start>username_0: I am working on an ionic app that is using AngularFire2. But when I push up the code to ionic i get a build error:
```
ionic-app-scripts build
[22:28:07] typescript: src/providers/sermon/sermon.ts, line: 4
Cannot find module 'rxjs/observable'.
L3: import { AngularFire... |
2018/03/12 | 625 | 2,066 | <issue_start>username_0: Hi In my Angular Component, i have this code in one of my methods
```
this.http.get("http://localhost:8080/poeples")
.map(
resp => { resp = resp.json(); }
).subscribe(
(data) => { this.poeples = data; },
err => console.log(err)
);
```
In network tab in chrome dev inspector i saw... |
2018/03/12 | 2,022 | 5,762 | <issue_start>username_0: I got an array that with different values and I'd like to calculate a percentage value that symbolizes the similarity of all it's elements **using maybe a threshold property**.
An array could look like this:
```
var array = [42.98, 42.89, 42.91, 42.98, 42.88] // should return nearly 100%
var... |
2018/03/12 | 463 | 1,237 | <issue_start>username_0: I have a bunch of strings, like
```
x <- "hello"
y <- "world"
z <- "!'
```
And I want the output to be
```
"hello"
"world"
"!"
```
I thought what I was supposed to do was use `sep = "\n"` in `paste()`, i.e. `paste(x, y, z, sep = "\n")`. But this doesn't seem to be quite working, as it jus... |
2018/03/12 | 1,529 | 5,041 | <issue_start>username_0: I'm trying to calculate the average of a subset of a subset of data.
For example, imagine my data is
```
**Family Name / Gender / Grade**
Smith / Male / 90
Smith / Male / 85
Smith / Female / 65
Smith / Female / 100
Johns / Male / 95
Johns / Male / 45
Johns / Femal... |
2018/03/12 | 1,121 | 3,440 | <issue_start>username_0: I'd like to extract values from below key:value pairs being sent in as a single string:
```
"var1:value1,var2:value2,var3:value3"
```
I have to use JavaScript and unfortunately I am unable to use an array and loop through the var1,var2,var3 keys due to the regex unable to handle variables...... |
2018/03/12 | 781 | 2,440 | <issue_start>username_0: I am passing arrays to $\_Post and on the following page, I would like to assign the values of each \_Post array index so I could then insert in a table in my database.
here is what I have when I print $\_Post
```
Array
(
[id_client] => Array
(
[0] => 1
[1] => 1
... |
2018/03/12 | 1,590 | 5,248 | <issue_start>username_0: In Flask, I am trying to display a dynamic list of items across multiple pages. The size of the list can possibly reach over 1000.
In `app.py` I have a route such as:
```
@app.route('/displayitems')
def displayitems():
item_list = ['item1', 'item2', 'item3'] # Up to 1000 items
return re... |
2018/03/12 | 342 | 1,002 | <issue_start>username_0: I am trying to do the following:
```
select * from main_genre
join (select 'SDBUY' UNION 'HDBUY') x
```
The results I'm trying to get are:
```
'Action', 'SDBUY'
'Action', 'HDBUY'
'Comedy', 'SDBUY',
'Comedy', 'HDBUY'
```
What would be the proper query from this in mysql?<issue_comment>user... |
2018/03/12 | 365 | 1,116 | <issue_start>username_0: I have the table below, and I want to select all the users that have a row with type\_id equals to 3 and a row with type\_id equals to 5.
I know I am wrong, but how shall I edit my query?
The table
```
user --- type--- type_id
abc ---- form --- 3
abc ---- form --- 5
abc ---- form --- 6
```
... |
2018/03/12 | 2,002 | 6,589 | <issue_start>username_0: The `.uniprop` returns a single property:
```
put join ', ', 'A'.uniprop;
```
I get back one property (the general category):
```
Lu
```
Looking around I didn't see a way to get all the other properties (including derived ones such as `ID_Start` and so on). What am I missing? I know I can... |
2018/03/12 | 1,715 | 5,506 | <issue_start>username_0: I am beginning to code a shell in UNIX to practice with API calls such as fork() dup2(), read(), and wait(). Currently, my shell opens and runs fine. When I type a command to run, such as ls -a, it parses this command properly, and executes it. The problem is, the main loop terminates early, ex... |
2018/03/12 | 961 | 3,241 | <issue_start>username_0: I currently have a data set that lists frequencies for each unique ID. I would like to convert the data so that each row is its own observation. This requires combining columns and creating factors as well as expanding the rows. Below is and example of how the data currently looks.
```
Develo... |
2018/03/12 | 668 | 2,347 | <issue_start>username_0: I have a component with a reactive form in it like so...
**form component.html**
```
Day
Month
Year
Please enter a valid date
```
and in my **form.component.ts**
```
form = this.fb.group({
dot: this.fb.group({
day: ['',
[
Validators.required,
Validators.min(1),
... |
2018/03/12 | 592 | 1,925 | <issue_start>username_0: if anyone could give a beginner some help on gcc version issue?
I met the issue on `"version GLIBCXX_3.4.20' not found"`. After I followed the link: [How to Install gcc 5.3 with yum on CentOS 7.2?](https://stackoverflow.com/questions/36327805/how-to-install-gcc-5-3-with-yum-on-centos-7-2)
I me... |
2018/03/12 | 338 | 1,007 | <issue_start>username_0: 
Basically, I want to to enter a number like 7 and get 7 cells in one column that are 1,2,3,4,5,6,7 (my imgur picture shows what I want to do)<issue_comment>username_1: In **A2** enter:
```
=IF(ROWS($1:1)>$D$2,"",ROWS($1:1))
```
and copy downward. If ... |
2018/03/12 | 606 | 2,023 | <issue_start>username_0: **How can i remove that horrible looking double arrow in select ?**
Any other answears about this article that i found doesn't work.
```html
Date
```
Image:

I tried those solutions:
* [How to remove the arrow in dropdown in Bootstrap 4?](... |
2018/03/12 | 834 | 3,143 | <issue_start>username_0: I'm kinda new to django, I need to set a dynamic initial value to my modelform field. I have a database field in my model name 'author' it has a foreignkey that connects it to the django user model. I need to automatically set this to the current user anytime a user fills in information into th... |
2018/03/12 | 942 | 3,254 | <issue_start>username_0: I'm trying to display a list of values based on an order-function that may require comparing more than 1 field, so the standard one-parameter function is not sufficient for me.
I want items with a description to be on the top of the list (no matter what the description is) and among the top h... |
2018/03/12 | 1,135 | 3,661 | <issue_start>username_0: I am trying to animate a card flipping face up and then fading out. I do this by adding a class 'flipped' on click and a second 'vanish' after a timeout of 2 seconds. However, as soon as the 'vanish' class is added, the card flips back face down. I don't understand why, as the 'flipped' class i... |
2018/03/12 | 893 | 3,016 | <issue_start>username_0: I have a routine whose purpose is to encode a floating point number as an integer (it then gets put into a byte stream). In the process, information is lost. The routine chops the output into increments of 3.33.
So, the gap between 0 and 3.33 is sort of an odd case, because it's not zero, and ... |
2018/03/12 | 761 | 2,600 | <issue_start>username_0: How do I get the date of the first day of the week and the date of the last day of the week with Moment.js?
I need to get the date from the first day of the week to the date of the last day of the current week that I'm basing on the current day.
I read the documentation <https://momentjs.com/... |
2018/03/12 | 467 | 1,360 | <issue_start>username_0: I want to add an object to an array at specific index: this is my existing structure:
```
let a = {
"tt" : ["test"],
"tt4": [
"the test44",
"the test55"
]
}
```
and this is what I want to achieve:
```
let a = {
"tt" : ["test"],
"tt4": [ {key: "the test44", gp... |
2018/03/12 | 1,581 | 3,850 | <issue_start>username_0: The entries on the diagonal of a spatial distance matrix should be zero, bc they represent the distance between each location and itself. But the `rdist.earth()` function from the `fields` `R package` sometimes give me non-zeros on the diagonal:
```
> # Set number of decimals of output display... |
2018/03/12 | 1,077 | 2,462 | <issue_start>username_0: I am new to R studio. I wonder how to save the regression result. For example, I am using the support vector regression to do analysis, it always took couple hours for one model, I don't want to just save "R code", but also every variable, dataset, regression result.
Thank you!<issue_comment>u... |
2018/03/12 | 1,281 | 3,347 | <issue_start>username_0: This question relates to large retail POS systems, such as those used by Walmart and other large chains.
Is there a language which is commonly used by such systems to define price rules for items? I am trying to understand how a POS can apply so many rules when calculating prices of items. Fo... |
2018/03/12 | 1,413 | 3,341 | <issue_start>username_0: I hope it is OK to ask questions of this type.
I have a `get_lags` function that takes a data frame, and for each column, shifts the column by each n in the list `n_lags`. So, if `n_lags = [1, 2]`, the function shifts each column once by 1 and once by 2 positions, creating new lagged columns ... |
2018/03/12 | 590 | 2,407 | <issue_start>username_0: How are captures different than passing parameters into a lambda expression? When would I use a capture as opposed to just passing some variables?
for reference: <http://en.cppreference.com/w/cpp/language/lambda#Lambda_capture>
The reference only defines it as a "list of comma separated value... |
2018/03/12 | 631 | 2,205 | <issue_start>username_0: If I intercept an `access_token` from an example on this page:
<https://developers.google.com/picker/docs/>
...it looks like this:
`<KEY>`
If I paste that into here:
<https://jwt.io/>
...I'm told it's malformed. However, if I paste a Firebase auth token into there, it's well-formed and yo... |
2018/03/12 | 505 | 1,925 | <issue_start>username_0: right now in my footer I have 2 .js files ( jquery.min.js - myjs.js ).
So, by considering that myjs.js is a very small file 5kb can I copy this code into the jquery.min.js file to reduce 1 request?
What is better bewtween: Leave 2 files, inline myjs.js or merge this 2 files?
Thank you<issue_... |
2018/03/12 | 189 | 729 | <issue_start>username_0: How do you include multiple dynamic classes in amp-bind?
For example:
```
```<issue_comment>username_1: You can return a single string containing multiple classes inside your amp-bind expression:
```
...
```
Upvotes: 4 [selected_answer]<issue_comment>username_2: If you are referring to CS... |
2018/03/12 | 895 | 3,229 | <issue_start>username_0: Python newbie here. I am trying to write a small Python script to automate some work I do regularly. I have an Excel spreadsheet with a worksheet called "new\_it\_users" with a list of usernames in column A, and I have a SQL database with an "ituserlist" table has a column called "username".
B... |
2018/03/12 | 416 | 1,586 | <issue_start>username_0: How can I revert/delete all my changes that I did manually on local.
Example I have 2 branches
```
1) master branch
2) branch2
```
I checked out branch 2 and started to do some changes locally. I accidentally replaced a word for all the files. So now all my files are unsynced.
I want to st... |
2018/03/12 | 1,146 | 3,673 | <issue_start>username_0: I have a table that has some data on active users. It displays what version the user was on and the date they were active. Let's call this table `active_users`:
```
Version Time
-------------------------
1 '2018-03-12'
1 '2018-03-01'
1 '2018-03-06'
1 ... |
2018/03/12 | 2,829 | 10,524 | <issue_start>username_0: I am trying to use the curl function in php to login to a specific page. Please check the code below. I connect with my email and password at <PASSWORD> and then i would like to redirect to another private page but it does not work as expected. I get no errors. I am redirected to this page inst... |
2018/03/12 | 410 | 1,251 | <issue_start>username_0: Since the free Twitter API only allows you to search the last 7 days worth of data I am trying to automatically set the dates for those 7 days. When I leave the date fields blank I get random historical tweets.
```
#### Pepsi
#Dates for API
s <- as.Date(Sys.Date()-7, format = "%Y/%m/%d")
... |
2018/03/12 | 868 | 2,846 | <issue_start>username_0: I have a submit function via ajax that get values from a form via jQuery. There are multiple dropzones, which I need to grab from upon pressing the submit button for the entire form.
I can access the dropzones file objects like this:
```
$('#foobar')[0].dropzone.getAcceptedFiles()[0]
```
wh... |
2018/03/12 | 1,016 | 3,802 | <issue_start>username_0: I want to implement a `futures::Stream` for reading and parsing the standard output of a child subprocess.
What I'm doing at the moment:
* spawn subprocess and obtain its stdout via `std::process` methods: `let child = Command::new(...).stdout(Stdio.pipe()).spawn().expect(...)`
* add `AsyncRe... |
2018/03/12 | 826 | 3,062 | <issue_start>username_0: i'm trying to create 2 child processes through parent in c, each child process runs a different program?
how can i change this code to let each process run `execution1()` and `execution2()` ?
```
void execution1(char *argve[]);
void execution2(char *argve[]);
int main(int argc, char *argv[... |
2018/03/12 | 939 | 3,027 | <issue_start>username_0: I have the following DataFrame in Spark:
```
nodeFrom nodeTo value date
1 2 11 2016-10-12T12:10:00.000Z
1 2 12 2016-10-12T12:11:00.000Z
1 2 11 2016-10-12T12:09:00.000Z
4 2 34 2016-10-12T14:... |
2018/03/12 | 1,016 | 4,033 | <issue_start>username_0: In a file called Extensions, I'm trying to add one extension to 2 View Controllers so I don't have to write the whole code twice.
```
import UIKit
extension TempConvertViewController {
// code
}
```
I need to use the exact same code for `LocationViewController`.
Any help would be appreciate... |
2018/03/12 | 1,678 | 5,210 | <issue_start>username_0: I have json like below
```
[
{name:'aa',age:'1Y',address:'Alaska'},
{name:'cc',age:'4Years',address:'California'},
{name:'mm',address:'Texas'}
]
```
Whenever I sort with name and address it work but it will throw runtime error if I try to sort with age as it is missing on last entry.
This i... |
2018/03/12 | 649 | 1,778 | <issue_start>username_0: I need to compare if two numpy arrays are equal to a desired precision ignoring nan values.
For example:
```
a = [1,nan,3,nan]
b = [1,0.2,3,4.1]
```
Should pass the test.
I have tried using numpy.all function but i understand that it expects two array identical and i need to have ... |
2018/03/12 | 642 | 2,373 | <issue_start>username_0: I'm trying to change the value of a button between login/logout depending on if a session is in progress. The logic works perfectly. The issue I have is sending the actual "login" or "logout" label from the controller (Navigation) to the view (navigation). How do I do this? I have tried sending... |
2018/03/12 | 383 | 1,041 | <issue_start>username_0: I have a bunch of files like these
```
/foo/bar/specs/d.js
/foo/bar/spec/d.js
/foo/bar/specs/v.js
/foo/bar/specs/v.js
/node_modules/bar/specs/v.js
```
I need a regex that will exclude everything under node\_modules
Something like this:
```
(?!node_modules)\/.*\/specs\/.*\.js
```
Unfortu... |
2018/03/12 | 1,373 | 4,476 | <issue_start>username_0: In there are good pattern for serializing/deserializing (pickling) numba classes?
The following gets me a
```
other = pkl.loads(pkl.dumps(jc))
File "/usr/lib/python2.7/copy_reg.py", line 71, in _reduce_ex
state = base(self)
TypeError: function takes at most 0 arguments (1 given)
``... |
2018/03/12 | 769 | 2,572 | <issue_start>username_0: I'm having quite a bit of trouble optimizing `uWSGI` to serve my `Flask` application, which receives around 1500 requests per second.
I currently am running Nginx on my front-facing server with four servers (each an AWS m5-xlarge, so there's plenty of computing power) in an upstream block. The... |
2018/03/12 | 1,110 | 4,057 | <issue_start>username_0: I am simply attempting to play a sound using the MediaPlayer. The code below which works well in a regular Android project, plays no sound through the audio jack or the speakers of an HDMI monitor.
```
final MediaPlayer mp = MediaPlayer.create(getActivity(), R.raw.score);
mp.setOnErrorListener... |
2018/03/12 | 1,407 | 5,066 | <issue_start>username_0: I have JSON objects called `Info` which have only strings & look like this :
```
{
"prop1": "value1",
"prop2": "value1",
"timestamp": "2018-02-28T05:30:10.100Z",
"prop4": "value4",
"prop_N": "I have a total of 10 properties."
}
```
I want to compare them with an... |
2018/03/12 | 1,730 | 6,946 | <issue_start>username_0: I am developing an app using Xcode in Swift. Briefly I have a tableViewController that houses many cells. There is a button in every cell (A stepper to be exact). My question is, how can I get the index of the cell which houses the stepper every time I click on it (the stepper)?
\*Bonus point ... |
2018/03/12 | 994 | 3,311 | <issue_start>username_0: I cannot get the following assert statement to work:
```
assert(data[5] == {
'tone': ['line', 'five', 'Test', 'one', '.'],
'ttwo': ['line', 'five', 'Test', 'two', '.'],
'tline': [3]
})
```
My understanding is that it is testing for that the data indexed at position 5 in each of ... |
2018/03/12 | 1,691 | 5,726 | <issue_start>username_0: phpMyAdmin errors after php7.2 upgrade
--------------------------------------
After upgrading to php7.2 on Ubuntu 16.04 LTS, phpMyAdmin shows annoying popup warnings when I view tables:
>
> "Some errors have been detected on the server! Please look at the bottom of this window. Ignore All. I... |
2018/03/12 | 606 | 2,295 | <issue_start>username_0: I have a very simple reusable component that is intended to display some HTML passed via props.
```
export class HtmlPreview extends React.Component {
componentDidMount() {
this.rendered.contentDocument.body.innerHTML = this.props.body;
}
render() {
return(
this.rendered}>
... |
2018/03/12 | 733 | 2,616 | <issue_start>username_0: First, I downloaded the Windows Command Line tools for Kotlin on Windows 10. (<https://github.com/JetBrains/kotlin/releases/tag/v1.2.30>)
Then, I start the interactive shell thinking that it works like the Python interactive shell, and I can use it to type in code examples:
```
C:\MyFolder> C... |
2018/03/12 | 991 | 3,122 | <issue_start>username_0: I'm looking to sort by two key columns whilst doing a each\_with\_index loop. The first sorting option `:selection_id` works fine, but the order of the collection loop seems to ignore the `assessments.date` order.
My date is in milliseconds. Could this be the issue?
**Loop**
```
<% unless da... |