date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/02/25 | 695 | 1,905 | <issue_start>username_0: If I had a sentence that has an age and a time :
```
import re
text = "I am 21 and work at 3:30"
answer= re.findall(r'\b\d{2}\b', text)
print(answer)
```
The issue is that it gives me not only the 21, but 30 (since it looks for 2 digits). How do I avoid this so it will only count the numbers... |
2018/02/25 | 1,193 | 3,910 | <issue_start>username_0: I am grabbing Pokemon data from a JSON API, that is showing values for any Pokemon. The aim here is to grab data that shows what games a Pokemon can be found in and which areas in the game they are found located.
<https://pokeapi.co/api/v2/pokemon/183/>
This is accessed via its [encounters](... |
2018/02/25 | 556 | 1,766 | <issue_start>username_0: I created two ul's in a fixed sidebar.
I tried to align to blue ul to the bottom of the fixed div, but it doesn't work.
```
* test
* test
* test
* test
* test
* test
MAIN CONTENT
.sidebar {
position: fixed;
top: 0;
left: 0;
z-index: 1;
height: 100%;
overflow-x: hidden;
backg... |
2018/02/25 | 719 | 1,729 | <issue_start>username_0: I have two dates, 1 being `new Date();` and another Date in the same format, I would like to check if another Date is within 1 minute.
For example if I have the Date `Sun Feb 25 2018 21:57:44 GMT+0000 (GMT Standard Time)`, anything between `Sun Feb 25 2018 21:56:44 GMT+0000 (GMT Standard Time)... |
2018/02/25 | 585 | 2,367 | <issue_start>username_0: I use `[weak self]` when I have a completion block that refers to properties of my class object. However, sometimes I have a completion block that doesn't refer to any properties, but the class object could disappear and deinit. Should I be using `[weak self]` or not? It usually gives a warning... |
2018/02/25 | 681 | 2,728 | <issue_start>username_0: I am trying to make a random flash card type of generator for javascript syntax. When i hit the random question button, it will display a random question such as "What is a variable?" but on clicking the panel, it should display the answer out of the answer array. All of the answers are in an o... |
2018/02/25 | 607 | 2,360 | <issue_start>username_0: Just curious if there's a cleaner way to do this. I have a list of words in a file, one word per line.
I want to read them in and pass each word to a function.
I've currently got this:
```
f = open(fileName,"r");
lines = f.readlines();
count = 0
for i in lines:
count += 1
print("--{}--... |
2018/02/25 | 520 | 2,105 | <issue_start>username_0: How can I find out information on how NumPy was built. I can see some information with numpy.show\_config(). But I want to know if, for example it was built with avx options.<issue_comment>username_1: No you don't need to. Swift won't do anything with the reference that isn't used so *NOT* usin... |
2018/02/25 | 942 | 2,367 | <issue_start>username_0: ```
+------+-----+
|userID|entID|
+------+-----+
| 0| 5|
| 0| 15|
| 1| 7|
| 1| 3|
| 2| 3|
| 2| 4|
| 2| 5|
| 2| 9|
| 3| 25|
+------+-----+
```
I want the result as {0->(5,15), 1->(7,3),..}
Any help would be appreciated.<issue_commen... |
2018/02/25 | 1,526 | 5,093 | <issue_start>username_0: I want to remove HTML field according to Yes/No condition. Currently, all code that I am using I have submitted below to make understand better.
I want when I select Yes it will remove No Field/Input/Box & if I select No it will remove Yes Field/Input/Box.
```js
function AutoCheck() {
if (doc... |
2018/02/25 | 1,551 | 5,292 | <issue_start>username_0: Lets suppose there are multiple students and I want to bind a student with multiple courses and bind a course with a grade.
For example student "peter" has the course physics with the grade 3, mathematics with the grade 2 and English with the grade 1. Another student "jones" has the courses Sp... |
2018/02/25 | 577 | 1,647 | <issue_start>username_0: I modify the code from Boost's Timer 2 tutorial [here](http://www.boost.org/doc/libs/1_66_0/doc/html/boost_asio/tutorial/tuttimer2.html)
for a periodic printout:
```
#include
void print(const boost::system::error\_code& /\*e\*/)
{
static int i = 0;
i++;
std::cout << i << std::endl;
}
in... |
2018/02/25 | 1,009 | 3,973 | <issue_start>username_0: Swift 4/Google Maps.
The crash I get is..
>
> Terminating app due to uncaught exception
> 'NSInvalidArgumentException', reason: '-[UIView setDelegate:]:
> unrecognized selector sent to instance 0x7fa1eb50d7e0'
>
>
>
Yes, I know there are a *lot* of threads on this, but looking through ... |
2018/02/25 | 1,339 | 4,804 | <issue_start>username_0: I'm learning Swift and I'd just like to know the best way to go about reading in a text file, breaking it up into lines and then taking each word on each line and turn the words into strings that can be loaded into class initialisers.
For example, if I have this text file:
```
**This is just... |
2018/02/25 | 1,170 | 4,182 | <issue_start>username_0: I am encountering an issue, in Safari. When I have *many* `type="checkbox"` elements on a page, interacting with with a text input becomes very slow and laggy.
This seems much more severe in Safari than Chrome/Firefox (on Mac).
I noticed the performance issue when doing some filtering on the ... |
2018/02/25 | 558 | 1,758 | <issue_start>username_0: I'm new to rust and I've question about the way the for loop.
```
fn main() {
for x in 1 .. 10 {
println!("x == {}", x);
}
}
```
The output of the program is
```
x == 1
x == 2
x == 3
x == 4
x == 5
x == 6
x == 7
x == 8
x == 9
```
I was expecting for loop to execute and disp... |
2018/02/25 | 544 | 1,978 | <issue_start>username_0: I'm trying to import Tensorflow using Spyder, I previously also tried to import Keras and Theano, but there was an error: `module "theano" has no attribute "compile"` and the import of Tensorflow was alright.
To solve that I installed
```
conda install tensor
```
With that I solved the pr... |
2018/02/25 | 404 | 1,393 | <issue_start>username_0: I know there are help forums on the `NoneType` error. But for the love of me I can't save my coding.
```
counter=0
agesList=[]
for line in database:
newlist=database[counter].split(',')
counter=counter+1
age=newlist[-2]
agesList=agesList.append(age)
#print(age)
print(agesLi... |
2018/02/25 | 288 | 956 | <issue_start>username_0: I have a test where I simulate logging in, then afterwards I want to test things as if I was not logged in. Like so.
```
// log in as user with id 2
$id = 2;
Passport::actingAs(User::findOrFail($id));
testSomeStuff()
...
// now I want to test things as if I was not logged in
```
Is there a w... |
2018/02/25 | 325 | 1,072 | <issue_start>username_0: I have a big dictionary:
```
abig = {('WhatsappUnameP', 'DOB', 'FriendMode', 'GroupName'): ['WhatsappUnameP', 'DOB', 'FriendName', 'FriendLoc', 'FriendEventMessage', 'FriendMode', 'GroupName']}
```
Now I am opening a file and writing this dictionary using JSON.
```
with open(str(os.path.j... |
2018/02/25 | 356 | 1,366 | <issue_start>username_0: I have my project hosted at bitbucket. Now I am open sourcing it and want to move it to github. I have already created an empty github repository, but when I locally on my computer change the remote url to the new repo, it shows no changes and won't commit/push anything. I am clearly doing it w... |
2018/02/25 | 1,942 | 5,627 | <issue_start>username_0: I am converting an array into a string to print, but the compiler still says not iterable.
```
Traceback (most recent call last):
File "python", line 157, in
File "python", line 56, in total
TypeError: 'int' object is not iterable
```
The function `total()` is located on line 56, if you... |
2018/02/25 | 416 | 1,598 | <issue_start>username_0: I have a problem where if a user clicks on an anchor tag something happens,
eg. , but now I also want a confirmation box on click of this anchor link, and only if its value is true.
So, in short I need two sequential actions to happen on click of one link, first a confirmation box and if its t... |
2018/02/25 | 320 | 863 | <issue_start>username_0: I have a list of lists of this structure in GNU-Prolog:
```
[[1|5], [1|6], [2|6], [3|6]]
```
What might be the best way to extract the numbers in each sublist separately? I can't unify each term because of the pipe, unless there is something I am missing. Any help would be great; I'm very ne... |
2018/02/25 | 681 | 2,682 | <issue_start>username_0: I cannot seem to figure out how to read values from the appsettings.json in my \_Layout.chtml file.
Is it not just available, something like this?
@Configuration["ApplicationInsights:InstrumentationKey"]
I created a new MVC project using razor pages.
fyi, i'm an mvc newbee - code samples hel... |
2018/02/25 | 2,650 | 8,080 | <issue_start>username_0: Context: `tidyverse` and `dplyr` environment/work-flow.
I'd appreciate insights into how to resolve the following issue, which I have encountered while trying to work with collections of regression results.
This minimal reproducible shows the issue
```
mtcars %>%
gamlss(mpg ~ hp + wt + di... |
2018/02/25 | 1,055 | 3,648 | <issue_start>username_0: I have created the below function to return Total Sales for a particular year, month and Territory entered as inputs. But I need to return 0 if there are no sales for the input parameters. I tried the IFNULL function but it does not seem to work.
```
Create Function GetTotalSales(@Year int,@mo... |
2018/02/25 | 1,065 | 2,826 | <issue_start>username_0: I write JPEG compression in Scilab (equivalent of MATLAB) using function imdct. In this function is used function DCT from openCV and I don't know which equation is used in dct function.
[lenna by imdct](https://i.stack.imgur.com/zAXtI.png)
[lenna by my\_function](https://i.stack.imgur.com/6... |
2018/02/25 | 2,381 | 9,634 | <issue_start>username_0: I'm facing problems when fetching and processing a huge `ResultSet` from a database using JDBC (a few million rows), in this case MySQL's Connector/J. One of those problems is that even though I'm using a `SwingWorker` and taking measures not to perform any long processing on the Event Dispatch... |
2018/02/25 | 1,210 | 3,882 | <issue_start>username_0: I am attempting to deploy a Django web application for the first time using NGINIX, Gunicorn and Supervisor on Digital Ocean Ubuntu 16.04 server. I am following the [this linked tutorial](https://simpleisbetterthancomplex.com/series/2017/10/16/a-complete-beginners-guide-to-django-part-7.html).
... |
2018/02/25 | 2,189 | 6,947 | <issue_start>username_0: The solution consists of two parts, one is a static library that receives instances of struct from the user of the library. Library doesn't know what will be the type of structs, all it knows there will be two function pointers to it with a specific name.
**Library Code**
*pre-compiled libra... |
2018/02/25 | 944 | 3,664 | <issue_start>username_0: I work with python 2.7 and I have a python script that ssh to remote servers and it works fine using python command from cmd but when I convert this script to executable file using py2exe or cx\_freeze or Pyinstaller and try to run it, the window open and close immediately like if the program c... |
2018/02/25 | 2,535 | 9,424 | <issue_start>username_0: I apologize if this is a repeat question. I'm not sure what to look for.
This is for an assignment so I would really like a push in the right direction versus just getting the answer. The code is to repeatedly ask a user to enter a state name which returns the state bird and state flower. Onc... |
2018/02/25 | 1,652 | 6,095 | <issue_start>username_0: In this hypothetical, I have a list of operations to be executed. Some of the operations in that list will be more efficient if they can be batched together (eg, lookup up different rows from the same table in a database).
```
trait Result
trait BatchableOp[T <: BatchableOp[T]] {
def resolv... |
2018/02/25 | 746 | 3,248 | <issue_start>username_0: I'm creating an android application and i want when user press back button show an quick animation and then finish current activity.
I'm using following code for do this:
```
public void onBackPressed() {
Thread t = new Thread(){
@Override
public void run() {
r... |
2018/02/25 | 1,244 | 4,197 | <issue_start>username_0: I trained a Keras Sequential Model and Loaded the same later. Both the model are giving different accuracy.
I have came across a similar question but was not able solve the problem.
Sample Code :
Loading and Traing the model
```
model = gensim.models.FastText.load('abc.simple')
X,y = load_da... |
2018/02/25 | 676 | 2,529 | <issue_start>username_0: ```
for i = 1:30
if condition1
statement1
elseif condition2
continue
else
statement2
end
statement3
end
```
As above, I have 'continue' command in a for loop to skip 'statement3' if condition2 is satisfied. This code works well.
But when I have to r... |
2018/02/25 | 553 | 2,084 | <issue_start>username_0: 1) What is the difference between
```
for (MyObject myObject : sessionBean.firstList()) {
secondList.add(new MyObject(myObject.getSeverity(), myObject.getSummary(), myObject.getDetail()));
}
```
and
```
for (MyObject myObject : sessionBean.firstList()) {
secondList.add(facesMessag... |
2018/02/25 | 1,155 | 3,556 | <issue_start>username_0: Is it possible to create a UDF which would return the set of columns?
I.e. having a data frame as follows:
```
| Feature1 | Feature2 | Feature 3 |
| 1.3 | 3.4 | 4.5 |
```
Now I would like to extract a new feature, which can be described as a vector of let's say two elements ... |
2018/02/25 | 995 | 3,058 | <issue_start>username_0: I have a Python string (`str`), which is `"['Fish & Chips', 'Fast Food', 'Restaurants']"`.
How can I convert this string to a list?<issue_comment>username_1: **Struct method**
You can define the `udf` function as
```
def myFunc: (String => (String, String)) = { s => (s.toLowerCase, s.toUpp... |
2018/02/25 | 1,153 | 3,681 | <issue_start>username_0: I'm trying to use an anonymous method in a reg replace to convert each character to the next letter of the alpahbet. I'm getting the error "cannot convert anonymous method to type int because it's not a delegate type". Below is the code.
```
using System;
using System.Text.RegularExpressions;
... |
2018/02/25 | 1,595 | 5,510 | <issue_start>username_0: I have an `Order - FoodItem` Many-To-Many relationship that is as follows:
```
association_table = db.Table('association', db.Model.metadata,
db.Column('left_id', db.Integer, db.ForeignKey('orders.order_id')),
db.Column('right_id', db.Integer, db.ForeignKey('fooditems.fooditem_id'))
)
... |
2018/02/25 | 1,352 | 4,757 | <issue_start>username_0: I am trying to calculate a rate by using two variables from a subquery and i want my result to have three values after the decimal.
Variables:
calls -- type(integer)
boxes -- type(float)
```
ROUND((calls / boxes) * 100.0, 3) Call_Rate
```
only returns two decimal points
when i us... |
2018/02/25 | 938 | 3,438 | <issue_start>username_0: The title says it all. From the examples of `Stepper` it seems there is only a text that can be shown. Is it possible to display html instead?
If I put html inside the page looks weird:
[](https://i.stack.imgur.com/Or31r.png)... |
2018/02/25 | 1,323 | 4,542 | <issue_start>username_0: I'm working on implementing a Quicksort algorithm which I've got to work fine with array sizes up to 100,000. Once I try to sort with a size of 1,000,000 I get a stack overflow error (which is happening to my best understanding due to the recursive functionality of my algorithm).
I know this qu... |
2018/02/25 | 388 | 1,374 | <issue_start>username_0: public static void main(String[] args) {
```
String title = "Today, and tomorrow,2,1,2,5,0";
String[] titleSep = title.split(",");
System.out.println(Arrays.toString(titleSep));
System.out.println(titleSep[0]);
System.out.println(titleSep[1]);
```
}
output:
[Today, and tomorrow, 2, 1, 2, 5,... |
2018/02/25 | 497 | 1,773 | <issue_start>username_0: I was under the impression that a call to an async function would not be blocking unless the await keyword is used. However for the following code:
EDIT: I am editing the example to better illustrate my question.
```
function sum1Through(n) {
console.log('Starting computation for ' + n);
... |
2018/02/25 | 656 | 2,356 | <issue_start>username_0: I'm using BrowserMob-Proxy with Chrome but when I change it to headless mode the request/responses are just empty. It seems to be a SSL problem, since if I try with a http website it works just fine. Any idea what might be or how I'm able to fix it?
The code i'm using:
```
from selenium.webdr... |
2018/02/25 | 1,192 | 4,377 | <issue_start>username_0: This is currently my bot.js
```
var Discord = require('discord.io');
var logger = require('winston');
var auth = require('./auth.json');
// Configure logger settings
logger.remove(logger.transports.Console);
logger.add(logger.transports.Console, {
colorize: true
});
logger.level = 'debug';... |
2018/02/25 | 1,351 | 4,860 | <issue_start>username_0: I have a video player in my android app, and I have a prev and next buttons. However the prev button gives this error:
>
> 02-26 07:15:11.519 32576-32576/com.example.espina.momshie
> E/AndroidRuntime: FATAL EXCEPTION: main
> Process: com.example.espina.momshie, PID: 32576
> java.util.NoSuc... |
2018/02/25 | 588 | 1,776 | <issue_start>username_0: I've tested these two commands on Win-7 :
```
powercfg.exe -x -monitor-timeout-ac 0
powercfg.exe -change -monitor-timeout-ac 0
```
They've successfully turned off my monitor. I know they are the same but which one is better and compatible with all Windows editions? will this script work fine... |
2018/02/25 | 670 | 2,302 | <issue_start>username_0: I am trying to display images that I have uploaded to S3. I believe the permissions are correct as I can hit the url and get data back. However when I put the URL in an image tag I get a broken link.
When I put the image tag on my site in the network tab I see the call to s3 (with a 200 respo... |
2018/02/25 | 1,233 | 3,486 | <issue_start>username_0: This question is *very* related to these two questions [another](https://stackoverflow.com/questions/17071871/select-rows-from-a-dataframe-based-on-values-in-a-column-in-pandas) and [thisone](https://stackoverflow.com/questions/31756340/selecting-rows-from-a-dataframe-based-on-values-in-multipl... |
2018/02/25 | 463 | 1,508 | <issue_start>username_0: I have the following code where I try to access the command line arguments but I am having trouble doing so.
```
#include
#include
#include
#include
int main(int argc, char \*argv) {
int fd = open("drawing.ppm", O\_RDWR | O\_CREAT | O\_APPEND, 0700);
char colour[] = "0 0 0 ";
if(argv... |
2018/02/25 | 372 | 1,391 | <issue_start>username_0: The Aurora documentation states that data is replicated six ways, across three availability zones. The Canada region (`ca-central-1`) offers Aurora as an option, yet only has two availability zones. How is data replication handled in regions with only two availability zones?<issue_comment>usern... |
2018/02/25 | 1,201 | 3,853 | <issue_start>username_0: I have a dataframe where each row contains various meta-data pertaining to a single Reddit comment (e.g. author, subreddit, comment text).
I want to do the following: for each author, I want to grab a list of all the subreddits they have comments in, and transform this data into a pandas dataf... |
2018/02/25 | 1,327 | 4,050 | <issue_start>username_0: I have a list of data-frames called `WaFramesCosts`. I want to simply subset it to show specific columns so that I can then export them. I have tried:
```
for (i in names(WaFramesCosts)) {
WaFramesCosts[[i]][,c("Cost_Center","Domestic_Anytime_Min_Used","Department",
"Domestic_Anytime... |
2018/02/25 | 2,095 | 6,966 | <issue_start>username_0: Below is my current structure (which doesn't work).
Parent component:
```html
import Field from './input/Field'
export default {
components: {
'field-input': Field
},
data() {
return {
title: {
value: '',
warn: false
}
}
}
}
```
Child component:
```html
Some text
export defa... |
2018/02/25 | 405 | 1,661 | <issue_start>username_0: So basically I have an object created that is stored in the heap (using new to create it) and this object holds a pointer of a variable (Vector3 in this case, but it doesn't matter) that is stored in the stack (created using Vector3(0, 0, 0)).
I am passing the pointer to the Vector3 stored in ... |
2018/02/25 | 605 | 2,515 | <issue_start>username_0: Some code examples have `element:` for symbols and other times the syntax is `:element`. I found a definition of a symbol [here](http://rubylearning.com/satishtalim/ruby_symbols.html), but I'm not sure what `:element` is. My understanding is that a symbol is like a constant. But what does the o... |
2018/02/25 | 841 | 3,347 | <issue_start>username_0: I am building a mobile app in react native with an asp.net core backend, and trying to integrate google sign-on.
In [this official documentation](https://developers.google.com/identity/sign-in/android/backend-auth), google suggests to retrieve an `id_token` on the client side, and then send t... |
2018/02/25 | 1,581 | 4,634 | <issue_start>username_0: **Note: I figured out a solution to this question while writing it. My answer is below.**
Is there an easy way to get sub-pixel antialiased placement of circles using matplotlib? I was able to create the following .gif but the fact that the motion of the circles steps by integer pixels is real... |
2018/02/25 | 922 | 2,931 | <issue_start>username_0: Is this 7.31 or 7.4 SAP PI? Or maybe PO?
While working in my organization I found that it shows SAP Process Integration 7.4 but in Software Build Information tab it shows as 7.31. It has both single stack and dual stack features. But as far as I know from few SAP blogs that both 7.31 and 7.4 a... |
2018/02/25 | 777 | 2,342 | <issue_start>username_0: I have a couple of spans inside of a div, what I want to know is how I can get the spans to take up 100% width of the parent div but the height of these spans should be auto.
CSS:
```
.parent {
position: fixed;
width: 100%;
height: 80px;
top: 0;
left: 0;
display: flex;
... |
2018/02/25 | 637 | 2,044 | <issue_start>username_0: I am a beginner of assembly language, so I hope anyone who give me a answer could explain be more specific.
Question is converting from C to assembly language.
C code is:
```
while(save[i] == k)
i += 1;
```
`i` and `k` are in `$s3` and `$s5` and base of array `save[]` is in `$s6`
The... |
2018/02/25 | 347 | 1,235 | <issue_start>username_0: I have the following code:
```
if in x and in x:
```
I hate the duplication of comparing two values to the same variable in two separate steps. But I can't iterate over the strings because I still end up with two booleans that must then be compared for a final boolean value. Is there a pyt... |
2018/02/26 | 998 | 3,369 | <issue_start>username_0: So I have two `</code>s.</p>
<p>From my understanding, I can place them into an <code>external.js</code> file by just copying and pasting the code.</p>
<p>I am creating a Google API:</p>
<pre><code><script>
function initMap() {
var uluru = {
lat: -25.363,
lng: 131.044
};
var map = new ... |
2018/02/26 | 946 | 3,578 | <issue_start>username_0: In my project, while looping through a datafile with the `.map()` function, I'm passing down a function (`updatestate`) from the Parent Component, `App`, to the Child, `Main`, that allows the Child to call `.setState()` and append to the array in the Parent state.
But, when I call this functio... |
2018/02/26 | 929 | 3,457 | <issue_start>username_0: I have a list of geographic coordinates in my application, stored in a `Vars[Coordinates]`. I'd now like to display these on a map and automatically update the map when new coordinates are added to or removed from the list. I'm using a library that exposes APIs to add and remove markers on a ma... |
2018/02/26 | 515 | 2,066 | <issue_start>username_0: I am attempting to create my own blockchain, in order to understand how they work. I wanted to know how big the `nonce` should be (e.g. 8 digits or something like that). I am using a `PoW` (proof-of-work) algorithm in my blockchain. This blockchain uses the `SHA256` hashing algorithm.
I am usi... |
2018/02/26 | 459 | 1,995 | <issue_start>username_0: (using java for reference)
I'm trying to determine which would be better, writing out more code and possibly saving some computing time or writing out less code but possibly sacrificing some computing time.
Here is what I'm curious about,
Would it be more efficient to do:
```java
switch (avail... |
2018/02/26 | 2,342 | 8,445 | <issue_start>username_0: Using the Jcodec library, I had success producing and storing a video file on the Android file system from an array of Bitmap objects.
However, the **encoding** time takes way too long. I thought about scaling down each of the bitmaps to speed this up but this did not seem to work. Despite re... |
2018/02/26 | 1,375 | 4,593 | <issue_start>username_0: Using floating point, It is known that the quadratic formula does not work well for b^2>>4ac, because it will produce a loss of significance, as it is explained [here](https://en.wikipedia.org/wiki/Loss_of_significance#Instability_of_the_quadratic_equation).
I am asked to find a better way to... |
2018/02/26 | 1,464 | 4,997 | <issue_start>username_0: I am new to Python 3.X and need to write a script to automate the process downloading US Census data from American Fact Finder. I am using selenium webdriver and the code I have so far is:
```
driver = webdriver.Chrome(chromePath)
#make driver navigate to American Fact Finder Download... |
2018/02/26 | 933 | 3,356 | <issue_start>username_0: Is it safe and defined behaviour to read va\_list like an array instead of using the va\_arg function?
EX:
```
void func(int string_count, ...)
{
va_start(valist, string_count);
printf("First argument: %d\n", *((int*)valist));
printf("Second argument: %d\n", *(((int*)valist)+1));
... |
2018/02/26 | 422 | 1,369 | <issue_start>username_0: I am filtering with react over a Json file. How can I do a case insensitive search?
This is my code
```
_handleSearch ({ inputNameValue, inputPriceValue }) {
let list = data.filter(hotel => hotel.name.includes(inputNameValue))
}
```<issue_comment>username_1: How bout case normalizing bot... |
2018/02/26 | 806 | 2,697 | <issue_start>username_0: I'm trying to run an R file from the command line (from Terminal -- on macOS 10.13.3).
Following the directions in [this helpful Q & A](https://stackoverflow.com/questions/18306362/run-r-script-from-command-line), I added `#! [path/to/file.R]` as the first line of the R file.
When I then type... |
2018/02/26 | 1,191 | 4,243 | <issue_start>username_0: I understand that [domain or color wheel plotting](https://en.wikipedia.org/wiki/Domain_coloring) is typical for complex functions.
Incredibly, I can't find a million + returns on a web search to easily allow me to reproduce some piece of art as this one in Wikipedia:
[![enter image descript... |
2018/02/26 | 456 | 1,567 | <issue_start>username_0: How can I assert my properties inside the "description" array using the rest assured .body() method.
Example:
```
.body ("[0] .userType", equalTo (1)); // error
```
Here is my current JSON data which I want to assert with:
```
{
"validSession": true,
"value": "xxx",
"description": [
... |
2018/02/26 | 3,378 | 9,925 | <issue_start>username_0: I'm working on an app that uses the wikipedia api, and i'm struggling to find the best way to interpret the results given to me by the ajax request :
The JSON I get looks like this :
```
{
"batchcomplete": "",
"query": {
"pages": {
"277029": {
"pageid": 277029,
... |
2018/02/26 | 2,619 | 7,763 | <issue_start>username_0: I am using a python gRPC client and make request to a service that
responds a stream. Last checked the document says the iterator.next()
is sync and blocking. Have things changed now ? If not any ideas on overcoming this shortcoming ?
Thanks
Arvind<issue_comment>username_1: Since we are talkin... |
2018/02/26 | 627 | 1,182 | <issue_start>username_0: How to store data in a float type (append) Python?
```
data= #data is a float64
[ 335 -2.2827743]
[ 340 4.5311280]
[ 358 0.4698628]
[ 367 3.8023018]
[ 388 2.9782774]
result=[]
i in range(0,4):
if data[i][0]<360:
result.append(data[i])
```
The re... |
2018/02/26 | 391 | 1,480 | <issue_start>username_0: consider two C++ classes:
```
class cTextbox : public cControl{
public:
...
protected:
void onUpdate(bool* keys);
}
class cControl{
public:
...
protected:
virtual void onUpdate(bool*) = 0;
}
```
This returns me an error C2504: 'cControl': base class undefined when I define i... |
2018/02/26 | 939 | 3,380 | <issue_start>username_0: I'm coming from Stata and need to do some work in R for a specific project. Unfortunately, I haven't had much success with functional programming when trying to reference a vector of names in a dataframe within a function.
I've coded a function that will (1) create a dummy in my dataset for if... |
2018/02/26 | 494 | 1,779 | <issue_start>username_0: Here is an example:
```
import multiprocessing
def function():
for i in range(10):
print(i)
if __name__ == '__main__':
p = multiprocessing.Pool(5)
p.map(function, )
```
yields the error: `TypeError: map() missing 1 required positional argument: 'iterable'`
The function ... |
2018/02/26 | 718 | 2,783 | <issue_start>username_0: I need to get access to `protoc` file in my code. Locally I just put it in the folder but how to get this file from deployed Firebase functions?
```
const grpc = require('grpc');
const PROTO_PATH = __dirname + '\\protos\\prediction_service.proto';
exports.helloWorld = functions.https.onReques... |
2018/02/26 | 865 | 2,901 | <issue_start>username_0: [This section of the Rust book](https://doc.rust-lang.org/1.30.0/book/first-edition/documentation.html#other-documentation) seems to imply that it is possible to keep Rust documentation in separate .md files, but it does not say how these .md files can then be included back. How does this work?... |
2018/02/26 | 582 | 1,974 | <issue_start>username_0: I'm new on python so I'm having some trouble. I'm trying to build a tool that posts data to an external server with proxy. I have it working, but the problem is I don't know how to catch the proxy connection error and print something else. The code I wrote is:
```
import requests
from bs4 imp... |
2018/02/26 | 859 | 2,812 | <issue_start>username_0: I am trying to create a polka dot border around my content. For example:
[](https://i.stack.imgur.com/fwNhM.png)
I have managed to achieve this by repeating an image (of two individual dots).
```
.dots {
background: url(... |
2018/02/26 | 758 | 2,702 | <issue_start>username_0: I have got a list of staff who are contractors and it includes duplicates as some work on multiple contracts at the same time. I need to find the row with the most hours for that person and secondly with the end date furthest away (if the hours is the same). I guess this is the **Current main c... |
2018/02/26 | 1,117 | 3,558 | <issue_start>username_0: I'm trying to write a Python function (without the use of modules) that will iterate through a list of coordinates and find the euclidean distance between two subsequent points (for example, the distance between points a and b, b and c, c and d etc.). After a few hours of searching I came acros... |
2018/02/26 | 876 | 2,703 | <issue_start>username_0: I'm new to ASP.NET and SQL, and I'm trying to build a Web Forms project that will basically display data using grids.
I'm using Entity Framework along with a Data Transfer Object and a Data Access Layer for displaying/editing data.
My issue is that I'm not sure what is the best way of retrie... |
2018/02/26 | 847 | 2,641 | <issue_start>username_0: I am trying to extract the nth row of an SQL statement (not the nth row of a table).
Is there an easy way to run a query and read values from specific rows.
I have tried something similar to this but it does not work since rownum tells me what nth record it is in the table.
```
SELECT * FROM... |
2018/02/26 | 500 | 1,664 | <issue_start>username_0: I'm looking to get all the elements that end with a number.
So for an example we have a with this href.
```
href="artist.php?id=8932
```
Now I can get all of the occurences of the href with:
```
document.querySelectorAll("[href^='artist.php?id=']")
```
However that also gives me results ... |
2018/02/26 | 533 | 1,950 | <issue_start>username_0: Trying to make a really simple layout for a settings page using ConstraintLayout.
Simple text views to the left one below the other and a switch to the right to the center.
The layout I have works fine for newer devices, but as soon I switch to a Nexus 4 or older, the switch goes below/disapp... |
2018/02/26 | 580 | 2,153 | <issue_start>username_0: **Update 2: It was a permissions issue.** I guess I have to duplicate all my scripts for each spreadsheet? Also I'm updating my code now that I've fixed it.
Update: my code is wrong (I need to drop the second for loop I think) but my question is why the script isn't running on my sheets.
I'm ... |
2018/02/26 | 622 | 1,950 | <issue_start>username_0: I want to select record with certain date and id. My datetime format in database is 2018-02-23 08:38:45. I've try this in my model but it always return the records with specific id only. My date format in `$tgl` is 23-01-2018 so I change the format using `$date = date('Y-m-d', strtotime($tgl) )... |
2018/02/26 | 918 | 3,179 | <issue_start>username_0: Is it possible to tokenize emojis like `:)`, `:(`, `;~(` properly using the spaCy Python library? e.g. If I run the following code:
```
import spacy
nlp = spacy.load('en')
doc = nlp("Hello bright world :)")
```
And then visualize the doc with [displaCy](https://spacy.io/usage/visualizers):
... |
2018/02/26 | 962 | 3,505 | <issue_start>username_0: I have a PHP for loop, and inside my php for loop I have a html modal box. My PHP for loop fetch data from db and echo it into div tags(Image Attached)[Div List Image](https://i.stack.imgur.com/JhXAx.png). And each div tag has a modal box, so whenever I click on an div element I got a modal box... |
2018/02/26 | 2,558 | 5,348 | <issue_start>username_0: I've been struggling with this problem for a while and could use some help. I'm trying to append values to a list from a list of lists. I get a `TypeError: float() argument must be a string or a number, not 'list'`. I understand the that I'm trying to pass a list of lists to another list but I ... |