date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/21 | 395 | 1,366 | <issue_start>username_0: I have a data set being returned from a Firebase database, inside the data set is team information that contains number of games played, points, fouls conceded, etc...
Team - Points
Chelsa 10
Manchester 6
Liverpool 18
Madrid 22
etc...
I need to order these top to bottom by the number of... |
2018/03/21 | 810 | 2,632 | <issue_start>username_0: The Dockerfile:
```
FROM scratch
COPY hello /app/hello
ENTRYPOINT ["/app/hello","-g","OMGITWORKS!"]
```
where `hello` is a copy of `/usr/bin/hello`. The commands:
```
docker build -t hello .
docker run hello
```
Using `FROM scratch` or `FROM alpine` I get:
```
standard_init_linux.go:185:... |
2018/03/21 | 706 | 2,058 | <issue_start>username_0: I need a JS expression to match a combination of /\* characters
I have this now
```
/(\b\/*\b)g
```
but it does not work.
ETA:
any string that has /\* should match
so...
* Hello NO MATCH
* 123 NO MATCH
* /\* HELLo MATCH
* /\*4534534 MATCH<issue_comment>username_1: You might use a posit... |
2018/03/21 | 309 | 1,070 | <issue_start>username_0: I'm using a function that returns an `std::pair`:
```
std::pair myFunction() {
//Do something...
if (success) {
return {true, someValue};
}
else {
return {false, someOtherValue};
}
}
```
On success, the pair's first value will be `true`, otherwise `false`.
Some functions that call `... |
2018/03/21 | 675 | 2,249 | <issue_start>username_0: I have the following linux cmd:
```
grep -o file.txt "\"uri\":\".{1,}\""
```
The text i have is the following:
```
"some characters here","uri":"some_URI*Here.^%$#!", "again a set of irrelevant characters"
```
Of course the output i want to have is:
```
"uri":"some_URI*Here.^%$#!"
```
... |
2018/03/21 | 968 | 3,499 | <issue_start>username_0: I am
Following both the Enzyme examples for [.find()](http://airbnb.io/enzyme/docs/api/ShallowWrapper/find.html) and this GitHub [enzyme-example-jest](https://github.com/vjwilson/enzyme-example-jest) example to get a basic component to test and verify the outer-most element `className` exists,... |
2018/03/21 | 254 | 997 | <issue_start>username_0: I'm having an issue getting bootstrap to load in rails 5. I made the mistake of using a product called rapid rails themes (dresssed ives), which is a total piece of garbage, and made a mess of my application. I've removed this theme and am now having an issue with getting bootstrap to load. Any... |
2018/03/21 | 731 | 2,656 | <issue_start>username_0: i want to write a program to convert English to Piglantin using Java,but unlike the traditional way i want to store the vowels in an array...but apparently that doesn't work,i have my boards tomorrow and it would be quite helpful if you could point out my mistake....here's the program snippet
... |
2018/03/21 | 583 | 1,612 | <issue_start>username_0: I need to add Qty and Dayssupply from RXBatch (Test1) to another Rxbatch (Test2) by prescription, where the patid, facid, and ndc matches. Once the qty and dayssuply is added to from test1 to test2, I need test1 qty and dayssuply to be zero.
[tables](https://i.stack.imgur.com/M4ost.png)
Belo... |
2018/03/21 | 638 | 2,322 | <issue_start>username_0: How to make it deserialize to original type? WebJobs SDK allows to specify the type of a POCO object and add `QueueTriggerAttribute` near it to make it function ([the doc](https://github.com/Azure/azure-webjobs-sdk/wiki/Queues#poco-plain-old-clr-object-queue-messages)). Now it deserializes not ... |
2018/03/21 | 3,039 | 10,312 | <issue_start>username_0: I am trying to use JavaScript to convert a JSON File to a csv that can be opened in excel.
**What I have:**
```
function exportToCsv(filename, rows) {
var processRow = function (row) {
var finalVal = '';
for (var j = 0; j < row.length; j++) {
v... |
2018/03/21 | 620 | 2,128 | <issue_start>username_0: I have SQL tables with "score" columns. Sometimes that table will have hundreds of rows and sometimes it will have less than 10 rows. I need a SQL query that outputs the top 3 scores if there are less than 10 rows, or the top 10 scores if there are more than 10 scores in the table.
I'm not sur... |
2018/03/21 | 809 | 2,663 | <issue_start>username_0: This is related to question :
[String array to C++ function](https://stackoverflow.com/questions/49410992/string-array-to-c-function)
Although everything is working fine now, the only thing I am not able to accomplish is to **tolower** the user input as I am getting an error :
### Function
... |
2018/03/21 | 583 | 2,272 | <issue_start>username_0: Say I have scope `S1` which has the module with the binding:
```
bind(Repository.class).to(RepositoryImpl.class).singletonInScope()
```
Then `S2` scope gets opened with `S1` as a parent (`S1 -> S2`) and `S2` defines the same binding (because it's independent and knows nothing of `S1`):
```
... |
2018/03/21 | 521 | 2,014 | <issue_start>username_0: I created two virtual networks in azure using the routeable private adress configurations
vnet1: 172.16.10.0/24(vsubnet1)
vnet2: 172.16.20.0/24(vsubnet2)
I Created two virtual machines by connecting to the above vsubnets through NIC.
Network security Group has been defined to allow all the t... |
2018/03/21 | 670 | 2,989 | <issue_start>username_0: I know this must be the most simple question ever, but as someone completely new to AOP i cant get my head around it.
1. What is the difference between an Aspect and a Method?
within the documentation its mentioned:
>
> Aspects enable the modularization of concerns such as transaction manag... |
2018/03/21 | 755 | 2,961 | <issue_start>username_0: This is my code:
```
declare @maxsnap table (sita varchar(10), date date, SNAPSHOT_DATE date)
insert into @maxsnap
select
sita, date, max(SNAPSHOT_DATE) snapshot
from
[UKRMC].[dbo].[Roll_forecast]
where
date between '2018-03-21' and '2018-05-31'
group by... |
2018/03/21 | 826 | 3,370 | <issue_start>username_0: I am trying to ensure that my error trapping is working correctly but not sure I understand the proper procedure for handling an error that was found in another module.
If I had in module1
```
Sub test()
. . . . 'macro code Part1
SAtext = SAdata(SApage, "A")
. . . . . 'macro code part2
my5... |
2018/03/21 | 2,273 | 8,669 | <issue_start>username_0: I'm doing some project and I'm stuck ... I'm doing something wrong, probably with AsyncTask and I have no idea what to fix and how .... there is code I have right now.
ReviewData.class
```
public class ReviewData implements Parcelable {
private String mAuthor, mContent;
public ReviewData(St... |
2018/03/21 | 529 | 2,055 | <issue_start>username_0: I'm a pretty decent wordpress coder. Maybe I'm being stupid, but I can't work out how to edit the Divi blog module layout... basically the `archive.php` for the Divi theme - it doesn't seem to have one.
What I want to do is change the HTML of the blog when it added to the Divi page builder as ... |
2018/03/21 | 515 | 1,694 | <issue_start>username_0: Why friend class need not forward declaration but member function need?
friend class:
```
class String0{
friend class String;
private:
int size = 0;
string s;
};
class String {
public:
string combine(const string &s1);
private:
int size = 0;
string s;
};
``... |
2018/03/21 | 1,226 | 3,996 | <issue_start>username_0: All,
To replace one string in one particular column I have done this and it worked fine:
```
dataUS['sec_type'].str.strip().str.replace("LOCAL","CORP")
```
I would like now to replace multiple strings with one string say replace `["LOCAL", "FOREIGN", "HELLO"]` with `"CORP"`
How can make it... |
2018/03/21 | 691 | 2,623 | <issue_start>username_0: I currently use Akamai as a CDN for my app, which is served over multiple subdomains.
I recently realized that Akamai is caching CORS requests the same, regardless of the origin from which they were requested.
This of course causes clients that make requests with a different `Origin` than th... |
2018/03/21 | 738 | 2,542 | <issue_start>username_0: I'm trying to learn machine learning using Octave.
OS: Mac, High Sierra 10.13.3
GNU Octave version: 3.8.0
```
t = [0: 0.01: 0.98];
y1 = sin(2*pi*4*t);
y2 = sin(2*pi*4*t);
plot(t, y1);
hold on;
plot(t, y2, 'r');
figure(1); plot(t,y1);
```
The first time I tried ran the last line I got: "Qt ... |
2018/03/21 | 2,045 | 6,492 | <issue_start>username_0: I've made a dropdown list with checkboxes from scratch since the project on which I am working on has to be supported by older version of IE. And the result is pretty good except for one part. when I click on the drop down list every other element of the page gets lowered down.
The behaviour ... |
2018/03/21 | 456 | 1,515 | <issue_start>username_0: ```
file = open(r'd:\holiday_list.txt', 'w')
date = ''
while(date != '0'):
date = input('\nEnter Date (YYYYMMDD) : ')
date = date[:4] + '-' + date[4:6] + '-' + date[5:]
file.write(date)
print('Job Done!')
file.close()
```
This program is supposed to take dates (eg:20112016) as inp... |
2018/03/21 | 425 | 1,480 | <issue_start>username_0: Is it possible to convert this subquery to join?
```
SELECT `news`.`newsId`,
(SELECT `comments`.`text`
FROM `comments`
WHERE `comments`.`newsId` = `news`.`newsId`
order by `comments`.`date` desc
limit 1)
FROM `news` , `comments`
wher... |
2018/03/21 | 457 | 1,585 | <issue_start>username_0: How can I copy an array so that it copies into each cell going down Column F, instead of going across a certain row, like I have in my code now. In this case it's row "7". How can I do this and start at a certain cell, let's say F3. I am currently using ExcelJS, but would be open to try other t... |
2018/03/21 | 236 | 834 | <issue_start>username_0: Im trying to save form input after submitting the form, I tried this:
```
public $username;
public function loginForm() {
$this->login =
"" .
"" .
if (isset($\_POST["submit"]) && (empty($\_POST["username"]))) {
$this->username = $\_POST["username"];
```
It still says that variab... |
2018/03/21 | 1,153 | 3,942 | <issue_start>username_0: I have table like below:
```
fld_bank_cash_particular_id fld_cr_dr fld_account_id fld_amount
1 Dr 26 1000
2 Dr 26 2000
3 Dr 26 3000
4 ... |
2018/03/21 | 1,541 | 5,555 | <issue_start>username_0: I'm following these instructions. The app is a Xamarin.Forms iOS app.
<https://xamarinhelp.com/ios-universal-links/>
Here's what I'm not sure about.
First, I add a well-known folder to my MVC 5 Web App. I could not add a .well-known folder. Since I could not add the "." in front of the folde... |
2018/03/21 | 352 | 1,133 | <issue_start>username_0: In our java application, users can export data to excel files which are prone to [CSV Injection](https://www.owasp.org/index.php/CSV_Injection). To avoid this vulnerability, I want to restrict the user input such as **=HYPERLINK(E3, F3)** if any parameter start with following chars:
```
Equal... |
2018/03/21 | 3,146 | 10,600 | <issue_start>username_0: I want to declare identifiers for scopes which will be used to automatically populate a field of any logging statements within the innermost scope. They will usually, but not always (e.g. lambdas, blocks introduced with `{}`), match the "name" of the enclosing block.
Usage would look something... |
2018/03/21 | 1,874 | 6,201 | <issue_start>username_0: I am calling a fade in on a `table` which contains several smaller divs in it. The whole schema boils down to this:
```
Resources
=========
|
| |
|
```
CSS boils down to this
```
tr#tierIIResources, div#resources, {
display: none;
}
```
When I call `.fadeIn()` on `$('#resources')... |
2018/03/21 | 1,070 | 3,740 | <issue_start>username_0: I need to show a page loading image until data is saved in the database and the View is redirected to another page when the submit button is clicked. In my View I have a loading image inside a div with id `divLoading`.
I wish to show the loading image until the data is saved and the View redir... |
2018/03/21 | 1,079 | 4,154 | <issue_start>username_0: I try to enable placeholder at my SignUp form with 4 fields: phone, email, password1, password2. For first two fields all correct, but for password field it doesn't work.
**forms.py**
```
from django import forms
from django.contrib.auth.forms import UserCreationForm
from customuser.models im... |
2018/03/21 | 524 | 1,796 | <issue_start>username_0: I have a table, which displays data in ngFor. When I delete an element, I want to hide it.
I figured I have to do a variable in my record component `hide:boolean` which is false by default, but when I click od delete button, it changes to true. I don't know how to "catch" this variable in my ta... |
2018/03/21 | 927 | 3,809 | <issue_start>username_0: I'm writing a web app where people can download PDFs unique to them.
I want to use PayPal to allow buyers to enter payment (as comprehensive as possible) without leaving my page, and then to be sent to my PHP script which will receive an ID variable in order to deliver their unique PDF.
For t... |
2018/03/21 | 1,065 | 4,176 | <issue_start>username_0: I have a large and complicated #create method in my controller. While creating a model instance I am also saving a large file to a server, doing a bunch of processing on it, and some other stuff.
Now in my other tests I want all those 'side effects' to be available. So in Factory Bot it's not... |
2018/03/21 | 727 | 2,735 | <issue_start>username_0: Hi I am trying to do a `ModPow` calculation as fast as possible, the calculation is as such **P^e%n**. Test data is 888999000^202404606%237291793913, **I am aware of the BigInteger.ModPow(P, e, n)** however I am not supposed to use this function so I have written the following function which is... |
2018/03/21 | 745 | 2,676 | <issue_start>username_0: I am making a script which is going to add together a bunch of inputs. I am almost there, but when testing the script i seem to get the alert: Notice: Undefined index: number in C:\xampp\htdocs\Archers.php on line 25. Even though I have declared it earlier and even when using it now. The script... |
2018/03/21 | 850 | 3,199 | <issue_start>username_0: I am building a java application with Gradle and I want to transfer the final jar file in another folder. I want to copy the file on each `build` and delete the file on each `clean`.
Unfortunately, I can do only one of the tasks and not both. When I have the task `copyJar` activated, it succes... |
2018/03/21 | 346 | 1,077 | <issue_start>username_0: The image displays as a white box with a small image icon in the top left corner.
Html code:
```

```
css code:
```
img {
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 100px;
height: 215.83px;
width: 401.83px;
}
```<issue... |
2018/03/21 | 322 | 1,071 | <issue_start>username_0: just read Scala collection implementation and noticed a subtile difference:
* **immutable HashMap** : `class HashMap[A, +B]()`
* **mutable HashMap** : `class HashMap[A, B]()`
Could you please explain me why the immutable's value type is covariant while the mutable's one is not ?
Thanks for y... |
2018/03/21 | 386 | 983 | <issue_start>username_0: I want to convert a number to a decimal. I've been using:
```
sprintf("%02d", $price / 12);
```
Only sometimes `$price` is a whole number, so instead of `6`, I get `06`. How do I ensure that it converts to 2 decimal places, but also doesn't prepend a zero before the whole number ?<issue_comm... |
2018/03/21 | 1,077 | 4,083 | <issue_start>username_0: I have a function that loops through a large dataset. It takes multiple inputs and contains a lot of conditions. For testing, I sometimes like to run the function without certain conditions, but it is a time consuming to uncomment the conditions - which is what I do know.
Is it possible to gi... |
2018/03/21 | 561 | 2,277 | <issue_start>username_0: I am trying to edit a div's class name that is on my homepage based on a toggle switch but the toggle switch is on a different page. This script worked when the div was on the same page but now its not functioning.
```
function changeStatus(obj,temp) {
var toggleid = $(obj).attr('name');
var t... |
2018/03/21 | 532 | 1,785 | <issue_start>username_0: I've got a JQuery function using getJSON to bring some userifo. It's like that:
```
$.getJSON("http://server.com/?apirequested=userinfo", function(data){
...
...
});
```
This works fine, but I'm trying to change it to use same code for several servers using relatives url's.
I'm trying... |
2018/03/21 | 1,813 | 3,691 | <issue_start>username_0: Suppose that we have a data table with missing values (see example below).
```
library(data.table)
mat <- matrix(rnorm(50), ncol = 5)
mat[c(1,3,5,9,10,11,14,37,38)] <- NA
DT <- as.data.table(mat)
```
In total, we have 5 unique missing data patterns in our example (see `unique(!is.na(DT))`).... |
2018/03/21 | 326 | 1,300 | <issue_start>username_0: I am using `ObjectOutputStream` to write the data into a file. Following is the code snippet.
```
try (ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(f)))
{
oos.writeObject(allObjects);
}
```
Questions:
1. Do I need to split the object construction of OOS and FOS ... |
2018/03/21 | 526 | 1,640 | <issue_start>username_0: ```
function square(arr) {
var result=[].concat(arr);
result.forEach(function(i){
i=i*i;
console.log(i);
})
return result;
}
var arr=[1,2,3,4];
console.log(square(arr))
```
The task is to square all elements in an array, now my output is the original array. I wonder w... |
2018/03/21 | 819 | 2,885 | <issue_start>username_0: I have 2 activities. Activity A sends a Number to activity B and activity recieves and uses the Number. The problem is that activity B produces FormatExeption errors.
Activty A code:
```
EditText set_limit = findViewById(R.id.editText2);
Bundle set_limit_basic = new Bundle();
set_limit_basic.... |
2018/03/21 | 6,325 | 12,177 | <issue_start>username_0: When trying to scrape a web page, this table has no `|
| |` tags, and is all tags.
The site inspector that I'm trying to scrape looks as follows:
[inspector screenshot](https://i.stack.imgur.com/u6bhf.png)
I'd like to be able to grab the info from the `table-row` class, but the scrape never... |
2018/03/21 | 848 | 3,111 | <issue_start>username_0: I started learning angular 5 3 days ago so I'm quite new at it. I also use angularJS and React to develop applications and I think I don't understand how angular 5 components fully work. If I create for example a custom button that has a custom text inside (I'm not saying this should be done th... |
2018/03/21 | 1,090 | 3,424 | <issue_start>username_0: I have created a template for send out emails to clients of the new user I have created.
The current code have it to remove the space and add a period. For Example: **<NAME>** will be turned into **<EMAIL>**
```
StringReplace, UserID, UserID, %A_SPACE%, . , All
```
I would like to create ... |
2018/03/21 | 750 | 2,324 | <issue_start>username_0: How can I raise an exception if `loadid` is `null` when I compare `loadid = V_LOAD_ID`?
`E_NULL_ID` is the exception which I then wanted to use.
Here is my procedure:
```
CREATE OR REPLACE PROCEDURE GET_INFO(P_CURDATE DATE)
AS
V_LOAD_ID CARSALES.LOADID%TYPE;
E_NULL_ID EXCEPTION;
BEGI... |
2018/03/21 | 299 | 1,261 | <issue_start>username_0: I have an java api which give me as parameter as type: `modelClass: Class` with this parameter I want to call a kotlin reified method : `intance()`.
It's possible to pass my modelClass as parameter? I have no access to the source code of the reified method.<issue_comment>username_1: This is no... |
2018/03/21 | 768 | 2,111 | <issue_start>username_0: What I want is the first loop iterating from `1` to `4` and the second loop from `5` to `6`.
Here is my code:
```
php
for ($i = 1 ; $i <= 4 ; $i++)
{
echo $i . "<br";
}
?>
---
php
for ($i = 1 ; $i <= 2 ; $i++)
{
echo $i . "<br";
}
?>
```<issue_comment>username_1: Your problem
---... |
2018/03/21 | 1,120 | 3,570 | <issue_start>username_0: When I run my program my 'if' statement is compiled as unreachable code which in turn, causes my contains method to continuously print false even though the number exists within the tree. I can't figure out why could any one help me please? I'm fairly new to programming.
Here is my node class.... |
2018/03/21 | 489 | 1,617 | <issue_start>username_0: I'm trying to implement a vue2 `modal` as described in the vue docs at <https://v2.vuejs.org/v2/examples/modal.html>.
It looks something like this:
```
| | | |
| --- | --- | --- |
| @{{ item.name }} | | Show Modal |
### Hello World
Vue.component('modal', {
template: '#modal-templat... |
2018/03/21 | 1,106 | 4,292 | <issue_start>username_0: i'm trying to run a docker container on Windows 10 which should execute a windows executable (myprogram.exe). Below you find my dockerfile:
```
FROM microsoft/windowsservercore
COPY mydir/myprogram.exe /mydir/
CMD ["/mydir/myprogram.exe","someparameter"]
```
So i build the image with:
`dock... |
2018/03/21 | 1,643 | 4,734 | <issue_start>username_0: I have this array :
```
var res_data = [
{"id": "1", "text": "AAA", "category": "food", "value": "1"},
{"id": "2", "text": "BBB", "category": "food", "value": "2"},
{"id": "3", "text": "CCC", "category": "drinks", "value": "3"}
];
```
I want to get this
```
{
"food": [
{
... |
2018/03/21 | 397 | 1,504 | <issue_start>username_0: I am new to programming Python using Pycharm. I would like to access **openpyxl** (which I installed) but get the following error message:
```
Traceback (most recent call last):
File "", line 1, in
File "D:\PyCharm\PyCharm Community Edition
2017.3.3\helpers\pydev\\_pydev\_bundle\pydev\_im... |
2018/03/21 | 987 | 2,709 | <issue_start>username_0: How can i parse strings with regex to calculate the total seconds?
The strings will be in example:
```
40s
11m1s
1h47m3s
```
I started with the following regex
```
((\d+)h)((\d+)m)((\d+)s)
```
But this regex will only match the last example.
How can i make the parts optional?
Is there a b... |
2018/03/21 | 1,171 | 3,617 | <issue_start>username_0: I just used brew to install Python 3 on OS X. The `python3` command now starts the interpreter using brew Python 3.6, but `python` still opens the interpreter with the default system Python 2.7.
My understanding was that, by default, brew Python should now override system Python. (I.e., see [... |
2018/03/21 | 3,271 | 8,418 | <issue_start>username_0: I have a problem that is *similar* to [this question](https://stackoverflow.com/questions/39451385/how-to-count-the-number-of-occurrences-in-either-of-two-columns), but just different enough that it can't be solved with the same solution...
I've got two dataframes, `df1` and `df2`, like this:
... |
2018/03/21 | 652 | 2,413 | <issue_start>username_0: I'm pretty new to WPF and I'm trying to make a database system. What I currently have is a `Login` Window. When you enter the user and password you are supposed to go to another window `StudentInfoSystem` . The code I used is pretty basic and common.
```
var info = new StudentInfoSystem.MainWi... |
2018/03/21 | 1,220 | 3,904 | <issue_start>username_0: In es6, how can i simplify the following lines using destructuring?:
```
const array0 = someArray[0].data;
const array1 = someArray[1].data;
const array2 = someArray[2].data;
```<issue_comment>username_1: Whether using destructuring would actually be a simplification is debatable but this is ... |
2018/03/21 | 512 | 1,521 | <issue_start>username_0: I need a regular expression for a string with has at least 8 symbols and only one uppercase character. Java
For example, it should match:
* Asddffgf
* asdAsadasd
* asdasdaA
But not:
* adadAasdasAsad
* AsdaAadssadad
* asdasdAsadasdA
I tried this: `^[a-z]*[A-Z][a-z]*$` This works good, but I... |
2018/03/21 | 473 | 1,505 | <issue_start>username_0: Often look at other applications that can make the color different but close to the color. It's like the two colors of the appendix.
How can UIColor be achieved?
[](https://i.stack.imgur.com/eIVPb.png)
[![enter image descrip... |
2018/03/21 | 2,199 | 8,691 | <issue_start>username_0: I' struggling with some basic UIStackView distribution and alignment stuff.
I have an UICollectionViewCell which has a horizontal UIStackView at the contentView subview. This UIStackView has a vertical UIStackView for the three labels itself, and of course the UIImageView.
This is the code s... |
2018/03/21 | 1,071 | 3,785 | <issue_start>username_0: (alternative description could be 'how to rename a sphinx-autodoc package name?')
using sphinx version 1.7 on Python 2.7.13
---
I would like to automatically create documentation using docstrings and `sphinx-apidoc`.
My project structure is as follows:
```
myPythonProject <- my Python... |
2018/03/21 | 764 | 2,126 | <issue_start>username_0: I am looking for a nicer way to clean up this clunky nest for-loop that I have.
```
names = ['name1', 'name2', 'name3', ...]
values = [[1, 2, 3, ...], [10, 20, 30, ...], [100, 200, 300, ...]]
for i in range(len(values[0])):
for name, value in zip(names, values):
print(name, value[... |
2018/03/21 | 513 | 1,511 | <issue_start>username_0: I have a working chunk of regex, but I cannot get it to work in R. (Using <https://regex101.com/> to verify the regex works.)
I have this string:
```
pbb-nae-49/N2-A.N49AV048.SUP-DAMP
```
I need everything after the last period, which can be basically any characters (but I don't think space... |
2018/03/21 | 1,532 | 5,466 | <issue_start>username_0: How do I mock the timeout call, here?
```
$scope.submitRequest = function () {
var formData = getData();
$scope.form = JSON.parse(formData);
$timeout(function () {
$('#submitForm').click();
}, 2000);
};
```
I want to see timeout has been called with th... |
2018/03/21 | 1,640 | 3,639 | <issue_start>username_0: I create all three-element permutations without mirroring, using `itertools.product()`:
```
import itertools
list_1 = [list(i) for i in itertools.product(tuple(range(4)), repeat=3) if tuple(reversed(i)) >= tuple(i)]
```
Output:
```
[[0, 0, 0], [0, 0, 1], [0, 0, 2], [0, 0, 3], [0, 1, 0], [... |
2018/03/21 | 605 | 1,770 | <issue_start>username_0: I want to rename some lines in my `PitchAccent` column in my data frame `total` with the following command:
```
total$PitchAccent <- sub("!H*","H*", total$PitchAccent)
```
So that `!H*` now become `H*`.
However, when I check for the number of `H*` afterward, it stays the same as before and ... |
2018/03/21 | 534 | 1,772 | <issue_start>username_0: I have 2 tables:
* user
* message (which has both *id\_user* AND *id\_user\_from*)
I need a list of basic information about the users, and 3 special columns:
* COUNT of messages received by the user
* COUNT of messages sent by the user
* SUM of all the views (both sent and received) of the u... |
2018/03/21 | 318 | 1,110 | <issue_start>username_0: In Android Studio I would like to have a Edittext that uses the format `00:00` and where you don't have to type the `:` in `00:00` . Is there a way this can be done in the layout or should this be done programmaticly?
Thanks!<issue_comment>username_1: The reason the summary changed is because ... |
2018/03/21 | 449 | 1,653 | <issue_start>username_0: i'm using jquery change function but when i change input value i got an empty string !! this is my code any help plz :
```js
class SearchForm extends React.Component{
constructor(props) {
super(props);
this.state = {input_term_value: "",spaces_list: ""};
}
componentDidMou... |
2018/03/21 | 4,800 | 17,049 | <issue_start>username_0: I'm trying to extend the \*\*SimpleJpaRepository \*\* by BaseRepository interface and the BaseRepositoryImpl.
Tha BaseRepositoryImpl extends \*\*SimpleJpaRepository \*\* and implements BaseRepository.
In addition, I have some other Repositories such as CandidateRepository and EmployeeReposi... |
2018/03/21 | 610 | 2,427 | <issue_start>username_0: As part of my code churn reporting, I am trying to create a code churn report which captures the number of lines changed between local versions of some files and the associated remote files.
Assume I have the following project structure:
```
C:\dev_ws\helloApp\services\ServiceA
C:\dev_ws\hell... |
2018/03/21 | 457 | 1,497 | <issue_start>username_0: I'm implementing an asp.net core API with admin-on-rest.
A custom REST client communicates to the API endpoints, but the mapping is fairly standard.
When I try to implement a into the interface, the deletion of elements works fine. Still, I get an error on every edit or deletion view for an e... |
2018/03/21 | 816 | 2,395 | <issue_start>username_0: Some questions are similar to this topic ([here](https://stackoverflow.com/questions/37377819/countif-equivalent-in-dplyr-summarise) or [here](https://stackoverflow.com/questions/26469975/creating-a-frequency-table-in-r), as an example) and I know one solution that works, but I want a more eleg... |
2018/03/21 | 4,656 | 12,244 | <issue_start>username_0: I have a code that generates some numbers, and now I need to count how frequent they are. For example, the code will generate 100000 numbers, and i need to know how many times does 0 appear, 1, 2... I know that this can be done with strings, but im having a problem turning those values into one... |
2018/03/21 | 1,172 | 3,888 | <issue_start>username_0: I have two Map type columns in a Dataframe. Is there a way I can create a new Map column merging these two columns in spark Sql using .withColumn ?
```
val sampleDF = Seq(
("Jeff", Map("key1" -> "val1"), Map("key2" -> "val2"))
).toDF("name", "mapCol1", "mapCol2")
sampleDF.show()
+----+-----... |
2018/03/21 | 552 | 1,694 | <issue_start>username_0: I am trying to write a SQL like below in DB2.
```
insert into tableA (col1, col2, col3)
select max(col1) + 1, '-2', col3
from tableA
where col2 = -1
```
Here the aim is copy all the record of tableA from -1 to -2 and here col1 is primary key and this should be increment by 1.
... |
2018/03/21 | 1,053 | 3,645 | <issue_start>username_0: I use the following function to chunk iterable python objects.
```
from itertools import islice
def chunked_iterable(iterable, chunk_size):
it = iter(iterable)
while True:
chunk = tuple(islice(it, chunk_size))
if not chunk:
break
yield chunk
```
... |
2018/03/21 | 1,057 | 3,338 | <issue_start>username_0: I asked two questions related to my current problem, but the way I asked and the code that I provided wasn't been enough to solve it, so I present the problem (that was raised from the previous solutions attempts) in a more complete way on this code snippet.
Basically I want this PHP generated... |
2018/03/21 | 1,568 | 3,727 | <issue_start>username_0: I know this is a stupid question, but I'm kinda frustrated with my code because it takes so much time. Jere is one part of my code.
basically I have a matrix called "distance"...
```
a b c
1 2 5 7
2 6 8 4
3 9 2 3
```
and then lets say I have a column in a data frame, contai... |
2018/03/21 | 1,241 | 2,721 | <issue_start>username_0: I have a particular date and time with me in shell. Now I need to subtract 7 hours from that particular date and time.
eg.
2018-03-20 21:00:00 -> 2018-03-20 14:00:00
2018-03-20 06:00:00 -> 2018-03-19 23:00:00
I have both date and time in different strings as well.
How to write this i... |
2018/03/21 | 630 | 1,995 | <issue_start>username_0: I have this query that works fine on mysql, but I can't get it to work in CodeIngniter's Query Builder Class. It's a search box with multiple inputs.
I've tried this, but couldn't make it work.
```
$this->db->like('num_articulo ', $aricle_number, 'after');
$array = array('descripcion1' => $ar... |
2018/03/21 | 638 | 2,121 | <issue_start>username_0: I need the center and size of a box collider in world coordinates. So far I got this:
```
public GameObject Model;
BoxCollider m_Collider;
Vector3 Center;
Vector3 Size;
void Start()
{
m_Collider = Model.GetComponent();
Center = transform.TransformPoint(m\_Collider.center);
Size = tran... |
2018/03/21 | 1,385 | 5,184 | <issue_start>username_0: I am trying to work on the mechanics for a game I want to work on, however I don't have much experience with this area of programming. I have gotten a circle to move smoothly left and right with the A and D keys using requestAnimationFrame(), however I have absolutely no clue what the best appr... |
2018/03/21 | 1,310 | 5,241 | <issue_start>username_0: Background
----------
I have made a PHP script that sends an email to many users by looping through the users' ID via POST. When I try using the script with a lot of users (1000+), the script times out.
To resolve this, I decided to use AJAX on the front end that sends each request individual... |
2018/03/21 | 1,329 | 5,193 | <issue_start>username_0: I have the following action creator:
```
export function selectBook(ISBN, dispatch) {
const url = `${ROOT_ITEMS_URL}/${ISBN}?all=true`;
dispatch({ type: 'SELECT_BOOK_LOADING', isLoading:true });
axios.get(url)
.then(({ data }) => dispatch({ type: 'SELECT_BOOK_SUCCESS', data... |
2018/03/21 | 1,242 | 5,141 | <issue_start>username_0: in my application, I used place picker.and data that place picker gave is sent to 3 different activities using shared preference.and show this data in TextView.problem is when I closed activity and again open that activity my data still visible in TextView.even when I cleared it in `onDestroy()... |
2018/03/21 | 782 | 2,713 | <issue_start>username_0: I would like to have a form that enables a user to choose the vehicles. The user should get the total price of his choice. I wrote this little script, and it works properly. I am just curious is there a better way to do it. For example, there are a lot of IFs in foreach loop. What if I have, fo... |
2018/03/21 | 773 | 2,695 | <issue_start>username_0: Can anybody tell me why the command
```
find . -type d | wc -l
```
shows one directory more than the actual number of directories? The command is supposed to print number of directories and subdirectories, from the directory I am standing. The command
```
ls -lR | grep ^d | wc -l
```
does... |
2018/03/21 | 1,242 | 4,105 | <issue_start>username_0: From [Catch2's example](https://github.com/catchorg/Catch2/blob/master/docs/tutorial.md#writing-tests), I tried to run this example with `cmake` where structure of my project is like this:
```
/factorial
+-- CMakeLists.txt
+-- /bin
+-- /include
| +-- catch.hpp
| +--... |