date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/04 | 1,021 | 3,773 | <issue_start>username_0: It seems like a simple question, but I can't find anything about it in google or stackoverflow. Probably I haven't found the right keywords.
In php you can write something like this
example.php
```
php
//a bunch of sloppy logic, or maybe some includes but for this I'll just define the variab... |
2018/03/04 | 1,001 | 2,816 | <issue_start>username_0: I found an answer to the first part of my question (how to read multiple values with scanf) but it doesn't seem to work for me (I think it's because of putting the values into an array and maybe also because I'm checking if the values given are 6 ints for sure):
I am writing a program that sto... |
2018/03/04 | 460 | 1,750 | <issue_start>username_0: I did this [azure ad b2c web api tutorial](https://learn.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-devquickstarts-web-api-dotnet) that get's an authorization token with postman and sends it to the API. But how do I get an authorization token from a react native app? Wh... |
2018/03/04 | 484 | 1,519 | <issue_start>username_0: ```
a = np.array([[0, 1, 2, 3], [4, 5, 6, 7]], dtype=int)
b = np.array([[8], [9]], dtype=int)
```
result wanted:
>
> `alist = [[0, 1, 2, 3, 8], [4, 5, 6, 7, 9]] # as np.array`
>
>
>
I tried:
```
np.concatenate(alist,blist)
np.concatenate((alist,blist))
np.concatenate(alist, blist[0]... |
2018/03/04 | 1,112 | 3,186 | <issue_start>username_0: I have table that is dynamically created from an array. Using PHP, how can I dynamically add rowspan when the data is repeated? I would like 'Youth Classes' to be displayed only once and have a rowspan=2.
```
Array
(
[0] => Array
(
[Type] => Youth Classes
[C... |
2018/03/04 | 695 | 1,524 | <issue_start>username_0: I would like to create a new column that will put together 2 columns together. I looked over the internet but found nothing. How could I do:
Ex:
```
A B
50.631456 5.57871
C
(50.631456, 5.57871)
```<issue_comment>username_1: Checkout [`DataFrame.apply`](https://pandas.pydata.org/pandas-... |
2018/03/04 | 431 | 1,705 | <issue_start>username_0: I can't seem to access data that's part of an object within an object. here I'm trying to access likes in profile which would otherwise be fine using vanilla javascript to print out this.state.data.profile.likes
```
class App extends Component {
constructor(props) {
super(props);
... |
2018/03/04 | 909 | 3,631 | <issue_start>username_0: In a C# Class need to filter out or ignore Boolean changes in an Update method if the interval between changes is too short.
In essence I need what is called a 'Low Pass Filter'
Lets say we have the following in either Update or FixedUpdate
```
if (myBoolean condition){
myVal =0;
}else{
... |
2018/03/04 | 566 | 1,983 | <issue_start>username_0: This answer worked like a charm previously:
<https://stackoverflow.com/a/41041580/3894981>
However, since Webpack v4 it doesn't work anymore. Since then it throws:
>
> Error: webpack.optimize.UglifyJsPlugin has been removed, please use
> config.optimization.minimize instead.
>
>
>
**Wh... |
2018/03/04 | 1,226 | 4,987 | <issue_start>username_0: I'm managing a documentation website that has URLs in this pattern:
```
/product-foo/1.2.3/user-guide/system-requirements.html
```
I want to have **two** URLs to the page:
```
/product-foo/1.2.3/user-guide/system-requirements.html
/product-foo/latest/user-guide/system-requirements.html
`... |
2018/03/04 | 2,146 | 6,444 | <issue_start>username_0: I'm very new to c#.
I've imported an array called txtImport from a text file. In it contains 1000 poker hands for two players, so actually 2000 poker hands.
Each line in the file is structured as follows:
8C TS KC 9H 4S 7D 2S 5D 3S AC
Where the first 5 are player one's cards, and the seco... |
2018/03/04 | 2,139 | 6,872 | <issue_start>username_0: I have first activity from which I start another one.
I created second one with:
* Right click on `app` inside project explorer
* New > Activity > Empty Activity
and with this I got `class` file inside `Java` folder and `activity_newActivity.xml`
I have created some stuffs inside that activ... |
2018/03/04 | 1,107 | 3,267 | <issue_start>username_0: I'm using bootstrap4 fixed-top navbar which works fine in normal browser.
However, when I test on a mobile device (Galaxy S5 using chrome dev options) the content starts behind the nav bar, I've tried some padding in my css but I can't seem to get it to work correctly.
Below is a jsfiddle of ... |
2018/03/04 | 2,290 | 4,903 | <issue_start>username_0: The larger problem at view: I am breaking down a circle in 20 sectors to find where coordinates fall to find their value for a darts board game. There are 20 values 1-20 NOT in order. The dart board values fall along a circle:
[
(1 -1 0 2)
(2 3 4 -3)
```
I want M to become
```
M = (1 0)
(1 0)
(2 4)
```
**How to type** `M <- removeNegativeColumns(M)` **code?**<issu... |
2018/03/04 | 717 | 2,217 | <issue_start>username_0: I want to compile the following program on Linux:
```none
.global _start
.text
_start:
mov $1, %rax
mov $1, %rdi
mov $msg, %rsi
mov $13, %rdx
syscall
mov $60, %rax
xor %rdi, %rdi
syscall
msg:
.ascii "Hello World!\n"
```
However, it gives me t... |
2018/03/04 | 1,016 | 4,522 | <issue_start>username_0: Here's what I'm trying to do:
XAML:
```
```
C#:
```
//All the Normal using statements plus a few more...
using System.Text.RegularExpressions;
//Uncomment these two for WPF or comment out for UWP
//using System.Windows;
//using System.Windows.Controls;
namespace NameSpaceOfYourApp {
publ... |
2018/03/04 | 1,390 | 5,325 | <issue_start>username_0: I am trying to make a program that searches for a text on a web-page, then places the mouse cursor on the highlighted text after it has been found. Is this possible using pyautogui? If so, how. If not, are there any other alternatives to do this?
Example code below:
```
import webbrowser
impo... |
2018/03/04 | 1,051 | 2,018 | <issue_start>username_0: I have a byte list as encrypted\_message, which I have read from a file, like this:
```
[b'\x17Q\xf7\xf8\x1b\xac\xc1\x05\x9cC\xc8)s\xb2x+p\xc5)@\xcc\x998\xd1P\x95
\xd8\xb9\xfaP\xe9\xeb!\x0c\xd9\xea\x04\xa7D\xddN\xc2\xfe\n', b'\x16p\xa6\x9d8
\xf3\xc4\x91^T\xbb\xac\x02t05\xbf\xcc6\x8a\xe5f\x11\x... |
2018/03/04 | 1,794 | 6,671 | <issue_start>username_0: I've got a weird error. I implemented the Form component in my own system. There I created a FormType where I use the EntityType for a field. Everytime i wanna create the form with the formBuilder it throws the following error:
```
Fatal error: Uncaught ArgumentCountError: Too few arguments to... |
2018/03/04 | 1,198 | 4,736 | <issue_start>username_0: Usually when I'm using C# with XAML or Xamarin I tend to create objects and assign properties directly like this:
```
StackLayout mainStackLayout = new StackLayout() { Padding = 15 };
mainStackLayout.Children.Add(new Button() {
Text = "Clicky!",
FontSize = 12
}
```
Then when I reali... |
2018/03/04 | 435 | 1,609 | <issue_start>username_0: I have this layout, where I have text view and an icon next to it.
However, the text is dynamically changing, so sometime it will be too long which push the icon out of the screen.
I tried to add weight to the text but it makes the icon on the right side of the screen which I don't want, I just... |
2018/03/04 | 424 | 1,511 | <issue_start>username_0: So I'm trying to make this coin flip but it keeps flipping forever... when I want it to stop after 10 times. I also need a counter variable that tells me how many times it is flipped.
```
var coin = randomNumber (0,1);
write (coin);
while (coin < 10) {
coin = randomNumber (0,1);
write (c... |
2018/03/04 | 666 | 2,249 | <issue_start>username_0: I'm using curl to create several classifications. I have written the json for the many classifications and they are in one folder. I would like to create all the classifications in one go. But using curl I can only create them one at a time. How could I make them in one request?
```
curl -u ad... |
2018/03/04 | 918 | 3,993 | <issue_start>username_0: I'm trying to find a way to prevent multiple spaces between words in an EditText and also prevent leading space. I tried to do so with a TextWatcher but I can't figure out how to do it.
Any help would be appreciated.<issue_comment>username_1: You can do so using an InputFilter.
Feel free to u... |
2018/03/04 | 2,555 | 7,294 | <issue_start>username_0: I scraped a seller website and now need to find same product variants from title. How can I find same words for variant title?
EXAMPLE IN THE BELOW:
[](https://i.stack.imgur.com/PkEB7.png)<issue_comment>username_1: I would consider... |
2018/03/04 | 4,381 | 13,139 | <issue_start>username_0: I'm trying to implement Unification, but having problems.. already got dozen of examples,but all they do is to muddy the water. I get more confused than enlightened :
<http://www.cs.trincoll.edu/~ram/cpsc352/notes/unification.html>
<https://www.doc.ic.ac.uk/~sgc/teaching/pre2012/v231/lecture8... |
2018/03/04 | 655 | 1,779 | <issue_start>username_0: Hello I'm playing around with regular expressions in [pythex](https://pythex.org/) and i'm having troubles. i'm trying to take the following string
```
"RANDOM 1 ABBBABBBA SDFSBSBS WBWBSBW WBWBWBWB 10 EBEBEBEB EHRHSHSD EBWBBSHSHSB //"
```
and grab all the non-numeral characters between RANDO... |
2018/03/04 | 620 | 2,400 | <issue_start>username_0: What would be the right way to query a field that is an array of maps.
Currently the structure is
```
Collection1
Document1
-papers: <---- This is an array
(0):
-Name:abc
-Id:123
(1):
... |
2018/03/04 | 704 | 2,586 | <issue_start>username_0: ```
public static String decompressString (String text) {
int count = 0;
StringBuilder result = new StringBuilder () ;
for (int i = 0; i < text.length(); i++) {
char c = text.charAt(i);
if (Character.isDigit(c)) {
count = count * 10 + c - '0';
} e... |
2018/03/04 | 707 | 2,500 | <issue_start>username_0: When I do this ...
```python
import numpy as np
```
... i can use it but ...
```python
import pprint as pp
```
... can not, as I need to do this ...
```python
from pprint import pprint as pp
```
and there is also `__import__(str(module))` *and possibly more hidden in the documentation*... |
2018/03/04 | 582 | 1,764 | <issue_start>username_0: In the following code segment, how many unique processes are created?
```
pid t pid;
pid = fork();
if (pid == 0) {
fork();
}
fork();
```
It seems that the answer is 6, based upon the process tree that I drew. Is my reasoning right?
[](... |
2018/03/04 | 546 | 1,727 | <issue_start>username_0: I installed eslint locally and my configuration file contains only this:
```
{
"extends": "airbnb"
}
```
When I try to run the auto fix of all problems I get the title information.
I tried to reopen VSCode and to force eslint.enable = true in my user settings without success.
Any tips?<... |
2018/03/04 | 512 | 1,576 | <issue_start>username_0: I would like to move my Player in "block" of 0.1 unity unit (or 1).
How to modify / configure Character controller to move with "fixed" step?<issue_comment>username_1: Your reasoning is correct. There are 5 processes created from this code for a total of 6 processes including the original.
T... |
2018/03/04 | 1,214 | 3,412 | <issue_start>username_0: I would like to ignore a number that represents a price anywhere in text.
It should match
```
3.5 mm
-2
#1
```
It should ignore
```
$3.50
```
So far I have a Regex for Javascript
```
([^\$¢£]([0-9]+(\.[0-9]+)?))([^a-zA-Z]|$)
```
but this will still match the 3.50 just exluding the dol... |
2018/03/04 | 1,304 | 3,889 | <issue_start>username_0: I have a parent div element and two nested div elements. The second child div is an audio control of arbitrary length. At least I assume it's arbitrary. My question is how can I get the first child div to take on the width of the audio control?
I want the title to appear on only one line and ... |
2018/03/04 | 404 | 1,353 | <issue_start>username_0: I have the following state object.
```
list: [
{
"_id":"1","category":"Cat 1",
"subcategory":[
{"_id":"2","subcat":"Subcat 1"},
]
},
{"_id":"2","category":"Cat 2"},
],
```
I want to modify the values of \_id:1. I make a copy of the ob... |
2018/03/04 | 682 | 2,187 | <issue_start>username_0: My questions is what logic this regex implements so that it not select vowels from the words ?
Here is the Regular Expression :
```
^[AEIOUaeiou]+|[AEIOUaeiou]+$|[^AEIOUaeiou]
```
**Sample Text** :
>
> could not but sigh over it, and wish for impossible things,till her father >awoke, a... |
2018/03/04 | 1,652 | 4,274 | <issue_start>username_0: I have this dataframe:
```
person_code type growth size ...
0 . 231 32 0.54 32
1 . 233 43 0.12 333
2 . 432 32 0.44 21
3 . 431 56 0.32 23
4 . 654 89 0.12 89
5 . 764 32 0.20 ... |
2018/03/04 | 560 | 1,601 | <issue_start>username_0: Given the following dataframe and `left-x` column:
```
| | left-x | left-y | right-x | right-y |
|-------|--------|--------|---------|---------|
| frame | | | | |
| 0 | 149 | 181 | 170 | 175 |
| 1 | 149 | 181 | 170 | 175 |... |
2018/03/04 | 212 | 772 | <issue_start>username_0: I've a script on my server, in which the user must be able to execute but not edit it. Anyone know if it's possible to restrict that based on file permissions?<issue_comment>username_1: Just do:
```
chmod a=x your_script.sh
```
That only allows executions for everyone to your script. Change ... |
2018/03/04 | 1,078 | 4,253 | <issue_start>username_0: The following program was taken from *Windows System Programming* (Fourth Edition) by <NAME>:
```
#include
#include
#define BUF\_SIZE 256
int main(int argc, char \*argv[])
{
FILE \*inFile, \*outFile;
size\_t bytesIn, bytesOut;
char rec[BUF\_SIZE];
if (argc != 3) {
printf("Syntax : scp ... |
2018/03/04 | 1,751 | 6,324 | <issue_start>username_0: I have a MongoDB Atlas cluster within which I am trying to simply copy a database within the same instance. Unfortunately, every time I try to run db.copyDatabase() or copydb admin command, I get the following error:
```
not authorized on admin to execute command
```
Which is very strange, b... |
2018/03/04 | 1,753 | 6,220 | <issue_start>username_0: I am trying to connect to mongodb from Devart unidac components and I supplied server name like this, I right click on the UniConnection1 and choose "connection editor" and I enter connection parameters:
Server:
>
> cluster0-shard-00-00-xxxxx.mongodb.net
>
>
>
also port 27017, user name ... |
2018/03/04 | 802 | 2,271 | <issue_start>username_0: Am stuck on how to modify my array
I have such a sample of array
```
var data = [
{id:1, time_in: [{in:12, out:13},{in:122, out:143}]},
{id:2, time_in: []} //this has time_in beign empty
]
```
SO i would like to modify my array so that at the end if each item in the array has more than... |
2018/03/04 | 635 | 1,792 | <issue_start>username_0: I am trying to grab sports data.
```
allgames= driver.find_element_by_id("games")
box=allgames.find_element_by_link_text("Box Score")
```
This works, but it only grabs the box score form the first game (which is from `tr data-row="0"`)
I am trying to find a way where I can go to `tr data-r... |
2018/03/04 | 965 | 3,790 | <issue_start>username_0: I am creating an Ionic app and have implemented a Firebase login. The login all works well, however I want to check if a user is logged in before loading the initial root page.
If they are not logged in,it should show the tutorial, and if they are, it should show the main tabs view.
Currently... |
2018/03/04 | 532 | 1,820 | <issue_start>username_0: I am trying to remove footers of some CSV files that have different lengths, after importing to R. In all the files, footers start with the cell having: "Footnotes:". As a simple example of the data, if the column names are A, B and C, I want to keep the first row (1,2,3) and remove the other t... |
2018/03/04 | 394 | 1,433 | <issue_start>username_0: I have a Menu Form and it has 7 UserControls every time I execute my program I keep seeing this error.
[](https://i.stack.imgur.com/NNAz2.png)
I have no idea what error is this. I tried searching but there are no error close related to mi... |
2018/03/04 | 299 | 740 | <issue_start>username_0: The data frame x has a column in which the values are periodic. For each unique value in that column, I want to calculate summation of the second column. If x is something like this:
```
x <- data.frame(a=c(1:2,1:2,1:2),b=c(1,4,5,2,3,4))
a b
1 1 1
2 2 4
3 1 5
4 2 2
5 1 3
6 2 4
```
The outp... |
2018/03/04 | 658 | 2,660 | <issue_start>username_0: I'm working on a script that currently contains multiple lists of DNA sequences (each list has a varying number of DNA sequences) and I need to cluster the sequences in each list based on Hamming Distance similarity. My current implementation of this (very crude at the moment) extracts the firs... |
2018/03/04 | 738 | 2,600 | <issue_start>username_0: I am trying to port a React component to [Stencil](https://en.wikipedia.org/wiki/Sass_%28stylesheet_language%29).
The component *.scss* file has an *@import* for another *A.scss* file. That *A.scss* file *@import* the *bootstrap-sass/assets/stylesheet/bootstrap/\_variables* and *@import* anoth... |
2018/03/04 | 1,853 | 4,969 | <issue_start>username_0: What is the best way to save a pandas dataframe in kdb? Are there any libraries that can make it easier?
The below code can apparently be used to loas something from kdb, but how do I save a dataframe into it?
```
from qpython import qconnection
with qconnection.QConnection(host = 'localhost... |
2018/03/04 | 922 | 3,194 | <issue_start>username_0: I want to create TimescaleDB tables in Postgres on the fly as I'm dealing with data sources that change (financial feeds, so could be 100, could be 1000) over time and I want one table per data source.
I can create the tables no problem from Python, but when I call `SELECT create_hypertable(te... |
2018/03/04 | 803 | 2,406 | <issue_start>username_0: I have a dictionary named CarValues in my code which contains following data:
dictionary: CarValues
key ==> string
Value ==> Array
1. key => Honda, Value => white, yellow, red, orange
2. key => Toyota, Value => white, yellow, green, black
3. Key => Volkswagen Value => 123, 456, 343
I want ... |
2018/03/04 | 694 | 2,696 | <issue_start>username_0: I've got a job that has a `run` method that looks like this:
```
def perform(share, document)
@history = document.scheduled_posts.find_by(provider: share[:provider])
job = ProviderJob.new(document, share)
begin
job.run
@history.update_columns(response: 'posted', status: 'complete... |
2018/03/05 | 784 | 2,918 | <issue_start>username_0: I have got a delete function working using type: 'DELETE' this way and I am now trying to make an UPDATE function although I don't know if I'm doing this correctly, the code so far is the following:
ejs:
```
[Edit](#)
```
js:
```
$(document).ready(function(){
$('.editEvent').on('click'... |
2018/03/05 | 1,536 | 4,862 | <issue_start>username_0: thanks for your help. I'm trying to write an R function that will take a list containing numeric vectors and merge all the list elements which share numbers. I'm not sure I'm explaining the problem properly, so I hope you don't mind if I use an analogy. An example list could look like this:
``... |
2018/03/05 | 308 | 1,075 | <issue_start>username_0: I'm building a React App with Material-UI and can't figure out how to center the 3 tabs within the blue AppBar. Currently, they are all left-aligned, as such:
<https://i.imgur.com/MjQIuBl.png> (can't embed images yet, my apologies)
Here is my code:
```
{/\* Tabs \*/}
```
I've experimente... |
2018/03/05 | 510 | 1,557 | <issue_start>username_0: I am trying to figure out how to make Show More to show if there are more than 3 list items in each container. I am not having any success with this probably because I'm not targeting the container list items correctly. Can anyone help me out? Thank you.
HTML
```
[Women](#)
- Sweater
- T-... |
2018/03/05 | 581 | 1,745 | <issue_start>username_0: I was trying to install angular on my macbook
but some errors appeared that I couldn't understand
here is a copy of what I wrote in my terminal
```
S-MacBook-Pro-491:~ s$ node -v
v8.9.4
S-MacBook-Pro-491:~ s$ npm -v
5.6.0
S-MacBook-Pro-491:~ s$ npm install -g @angular/cli
npm WARN checkPermi... |
2018/03/05 | 667 | 2,388 | <issue_start>username_0: I am making a table which can have cells with long strings. To make things fit I am trying to use the `overflow:hidden` and `overflow-text:ellipse` styles to hide the long texts. At first I was thinking I was doing something wrong, but now I am noticing that none of the overflow features work w... |
2018/03/05 | 772 | 2,276 | <issue_start>username_0: [This image](https://www.breathingcolor.com/blog/wp-content/uploads/2015/07/BC-ArtofCropping-Cover.jpg "This link") shows what I'm trying to do. There's a parent div with a background image set, and a low opacity. But the child div within the parent div 'resets' the opacity, giving the effect o... |
2018/03/05 | 531 | 1,908 | <issue_start>username_0: I have some objects in an `unordered_set` that, at some point, need to be updated in a way that doesn't change the behavior of the hashing function or comparison operator. Splitting up the struct into a map or having a mutable field are not options right now. I've come up with a solution:
```c... |
2018/03/05 | 1,045 | 3,224 | <issue_start>username_0: I am learning d3 in javascript and am working on some basic data manipulation stuff. I have a simple JSON object of year / month / births data that looks like this:
```
var birthData = [
{
"year": 1967,
"month": "January",
"births": 31502
},
{
"year": 1967,
"mon... |
2018/03/05 | 785 | 2,651 | <issue_start>username_0: I am looking to create an external library of some methods being used in one of my classes. I moved those methods into their own project and created a jar file of that project. I then added that jar file to the dependencies of my original project so it appears in the external libraries section ... |
2018/03/05 | 687 | 2,209 | <issue_start>username_0: I have WooCommerce installed already and the category url of WooCommerce is like this:
url.com/product-category/category1 works fine for displaying the category.
This is what I am aiming to achieve.
url.com/product-category/category1/pagename
category1 is the name of the category which is se... |
2018/03/05 | 725 | 2,410 | <issue_start>username_0: When I scale a layer down to 10% and then scale it back to its original size, it becomes blurry: it loses most of the information in the scaling down step. Is there a way to avoid this?
I would like to play around the sizes of the layers (sizing down & up) until I got all of them as I want to ... |
2018/03/05 | 364 | 1,378 | <issue_start>username_0: Previously, I had a synchronous controller action method that had a unit test with the line
```
ManageBillsViewModel result = controller.ManageBills(2).ViewData.Model as ManageBillsViewModel;
```
and all was well. When the action method was changed to an asynchronous `Task` method, the above... |
2018/03/05 | 1,984 | 7,000 | <issue_start>username_0: I want to basically simulate the replace all feature in Excel inside VBA and replace the string 03/01/2018 (which exists 10 times in this workbook) with 01/03/2017 I already figured out how to do that for one single occurrence but not to all occurrences inside a range.
Is there something like ... |
2018/03/05 | 992 | 2,621 | <issue_start>username_0: I have the following use case where I have a pandas DataFrame with a column of Series/lists. All of the Series/lists vary in length, but I want to take up to the first 5 elements of this list and set them to their own column.
First, I tried just setting a new column up with a slice of the Seri... |
2018/03/05 | 756 | 2,626 | <issue_start>username_0: Does PySpark support multiple named windows in the same query? I want to calculate moving averages of various sizes in the same query.
```
seconds_per_day = 86400
seconds_per_minute = 60
sql('''
SELECT datetime,
symbol,
price,
AVG (price) OVER past_7_days A... |
2018/03/05 | 4,179 | 16,451 | <issue_start>username_0: I am trying to implement a Thread-Safe PhoneBook object. The phone book should be able to add a person, and look up a person based on their name and phoneNumber. From an implementation perspective this simply involves two hash tables, one associating name -> Person and another associating phone... |
2018/03/05 | 327 | 1,226 | <issue_start>username_0: I'm using a react-native Modal, which contains a View.
The View has some TextInput elements. When the keyboard pops up, the View elements all collapse to fit into the remaining space, but I don't want the View to change at all.
This does **not** happen for IOS. And also, it does **not** happen... |
2018/03/05 | 682 | 2,382 | <issue_start>username_0: I have a spring restful web service and am trying to save to a database named little-data but my app keeps saving to the test database instead.
Below is my application.yml file:
```
spring:
data:
mongodb:
port: 27017
uri: mongodb://127.0.0.1/little-data
repositories:
... |
2018/03/05 | 538 | 1,832 | <issue_start>username_0: I need to have a couple of functions in Python (either variation) to find and print the name of the file they are stored or called from. For example, consider the following functions are stored in at this address: `/my/py/func.py`:
```
def this_file():
# print the address of this file
print('t... |
2018/03/05 | 1,677 | 4,976 | <issue_start>username_0: I'm trying to solve this problem. Unfortunately I don't have a name for this kind of puzzle so I'm not sure what to search for. The closest examples I can find are Nonogram and Tomography puzzles.
Puzzle description:
The player is given an empty game board (varying size) that they must fill wi... |
2018/03/05 | 1,197 | 3,383 | <issue_start>username_0: 2520 is the smallest number that can be divided by each of the
numbers from 1 to 10 without any remainder. Use a loop to find out what is the smallest positive number that is divisible (we mean the remainder should be 0) by all of the numbers from 1 to 20?
So far for this I have the following ... |
2018/03/05 | 1,414 | 5,099 | <issue_start>username_0: I'm trying to send an value with Ajax to Controller file in Codeigniter but without success.I have searched for that problem and i now this question is made many times here,but still can't find a sultion.Hope anyone can help me.
Thanks !
Js file.
```
function submitSend()
{
var message = ... |
2018/03/05 | 653 | 2,106 | <issue_start>username_0: I have a 32-bit timer which I want to overflow after n steps. This means each step should be (2^32)/n. However, if I try to compute this number using 32-bit integers, the compiler complains that (1<<32) is larger than the type I'm using.
I could come quite close to the answer I'm looking for b... |
2018/03/05 | 609 | 1,962 | <issue_start>username_0: I'm building a website for a client who wants to showcase his company's products.His company has like 5 sub companies. For example, his company is called Nazzy industries (named after Nazzy his endeared grandmama). Nazzy Industries has 5 sub-companies. One distributes snacks, one sells safety e... |
2018/03/05 | 207 | 638 | <issue_start>username_0: Based on [the docs here](https://cordova.apache.org/docs/en/latest/config_ref/images.html), I added this line:
```
```
Then ran `cordova prepare ios`
Then built and ran the app.
No icon.
What am I not seeing?
(my icon is 1024x1024)<issue_comment>username_1: After **Cordova 4.4+** for ios... |
2018/03/05 | 291 | 1,096 | <issue_start>username_0: I have a checkbox field. I want to display the values from that field in a column view. The values in the field are names such as <NAME>. When there are multiple values in the checkbox they are displayed in an awkward manner. For instance
<NAME>,<NAME>,<NAME>
I want to remove the commas and r... |
2018/03/05 | 941 | 2,380 | <issue_start>username_0: Hi I have `dataframe` that contains multiple rows for the same ID. One of the columns is a Date (in ascending order). I want to calculate the date difference between the first entry and last.
I am doing this by instantiating a pandas constructor as follows:
```
g = df.groupby('ID')
print(pd.... |
2018/03/05 | 397 | 1,673 | <issue_start>username_0: I am a beginner with hyperledger composer, I am not clear with ACL (access control) in hyperledger composer. Sorry, if my question have problem.
1. Why we need ACL?
2. When we use it?
3. Where we use it?<issue_comment>username_1: 1. To control access to resources on the ledger, or the kinds o... |
2018/03/05 | 1,040 | 3,990 | <issue_start>username_0: I would like to push some notification with a android app. So i did some researchs, but i'm little lost.
It's possible that I'm wrong but i think my only possibility is to use FCM with HTTP Request like that :
```
POST https://fcm.googleapis.com/v1/projects/myproject-b5ae1/messages:send HTT... |
2018/03/05 | 1,007 | 2,821 | <issue_start>username_0: ```
#include "stdafx.h"
#include
#include
#include
#include
#include
using namespace std;
void merge(int A[], int p, int q, int r) {
int i;
int j;
int k;
int n1 = q - p + 1;
int n2 = r - q;
vector L(n1), R(n2);
for (i = 0; i < n1; i++)
L[i] = A[p + i - 1];
for (j = 0; j < n2; j+... |
2018/03/05 | 857 | 2,763 | <issue_start>username_0: I have a problem with react-google-maps map with DirectionRenderer.
I tried to pass directions props in many ways but I always get this error:
*InvalidValueError: setDirections: in property routes: not an Array*
I defined like below:
```
state= {
a: new google.maps.LatLng(41.8507300, ... |
2018/03/05 | 869 | 2,773 | <issue_start>username_0: I am trying to remove spaces.
I have tried everything from previous threads including `re.sub`
Code:
```
wordinput = (input("Input:\n"))
wordinput = wordinput.lower()
cleanword = wordinput.replace(" ","")
cleanword = wordinput.replace(",","")
cleanword = wordinput.replace(".","")
revword = c... |
2018/03/05 | 1,311 | 4,243 | <issue_start>username_0: I am trying to edit a file as follows in python 2.7.10 and running into below error, can anyone provide guidance on what the issue is on how to edit files?
```
import fileinput,re
filename = 'epivers.h'
text_to_search = re.compile("#define EPI_VERSION_STR \"(\d+\.\d+) (TOB) (r(\d+) ASS... |
2018/03/05 | 994 | 3,366 | <issue_start>username_0: Please consider the below *Repair\_Table* of a car-repair workshop.
I'm trying to get the **last "Repair\_Status" value** for **each car** within a given **day**.
"Repair\_Update" column will have a new entry for each change during the car repair process: like the repair status, the repair na... |
2018/03/05 | 876 | 2,029 | <issue_start>username_0: Apologies in advance if this has been answered already. I have the following list of dataframes.
```
my_list <- list(a = data.frame(a1 = c(1,2), b1 = c(3,4), c1 =c(5,6)),
b = data.frame(b1 = c(1,2,3)),
a = data.frame(a1 = c(11,21), b1 = c(31,41), c1 =c(51,61... |
2018/03/05 | 392 | 1,375 | <issue_start>username_0: How do I use a alert to stop a link from going to the page? I've been trying to figure it out but it's sending me to the link anyways
```
Do Not Click
function confirm\_alert(node) {
return confirm("STOP CLICKING THE LINK");
}
[Don't click link](www.yahoo.com)
```<issue_comment>use... |
2018/03/05 | 1,282 | 4,913 | <issue_start>username_0: I'm trying to implement the **Bootstrap Accordion example** in my **Angular 4** app.
```
####
[Collapsible Group Item #1](#collapseOne)
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus t<NAME> ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. ... |
2018/03/05 | 774 | 2,956 | <issue_start>username_0: I am having an issue with this code:
```
words = []
counter = 0
wordcount = 0
intraWord = 1
loop = 0
ConsonantCluster3 = ["sch" "scr", "shr", "sph", "spl", "spr", "squ", "str", "thr"]
while(loop == 0):
sentence = input('Enter a sentence in english: ')
sentence.lower()
words = sente... |
2018/03/05 | 563 | 1,817 | <issue_start>username_0: im trying to write a file that will open 1 of 2 text files.
i want it to pop up with a little question asking do you want file 1 or 2, then when i choose that file it just opens that one. i don't think its happy with my choice of how to decide though.
1=p.txt and 2 = q.txt btw
```
def open_fu... |
2018/03/05 | 1,325 | 4,500 | <issue_start>username_0: I am reviewing the floats property which i learned before,I found a simple issue about floated elements with its own stacking order, the code as:
Example 1:
```css
.box-1{
background: teal;
width:100px; height:100px;
float: left;
}
```
```html
this is the text for the testing pur... |
2018/03/05 | 698 | 2,515 | <issue_start>username_0: I'm still learning js and I need an advice. I get json object from backend, but keys have underscores. What is best practice to rename keys to, for example folder\_name to Folder name? The list of properties is known and finished so I can keep new names in constants. At frontend I already use i... |
2018/03/05 | 670 | 2,157 | <issue_start>username_0: I have this code:
```
let toDayKey = toDayKey.toString(); // 1
const deptId = deptId.toString(); // 3
const jobId = jobId.toString(); // 87
//Assuming copied.toJS() is any value like "copied job"
const calendar_job_add = calendar_job_removed.setIn([toDayKey,deptId,jobId], co... |
2018/03/05 | 761 | 2,528 | <issue_start>username_0: I'm having trouble extracting an ECPublicKey from an X509 certifcate using Java.
The keys and certificate were created as follows
```
ssh-keygen -t ecdsa -f id_ecdsa
openssl pkcs8 -topk8 -in id_ecdsa -out id_ecdsa.p8
openssl req -new x509 -key id_ecdsa.p8 -out id_ecdsa.crt.der -outform der
`... |