date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/16 | 1,185 | 4,279 | <issue_start>username_0: I have a HTML and im creating it with [php](/questions/tagged/php "show questions tagged 'php'"). It contains three fields.
The second field should be filled automatically, when the first one is filled. A HTTP request is triggered over an API. The request works fine and puts out the article... |
2018/03/16 | 1,184 | 4,128 | <issue_start>username_0: I have a query-
```
DELETE FROM invoice
WHERE inv_date < 2018-03-31 - INTERVAL(72) MONTH TO MONTH)
```
when I execute I get an error stating-
**1260: It is not possible to convert between the specified types.**
What's wrong with "2018-03-31"? how should I write so that I can execute and g... |
2018/03/16 | 1,194 | 4,167 | <issue_start>username_0: ```html
| | |
| --- | --- |
| 1.I have here some long title | Here i have some text |
|
|
```
The problem is that i want to have an vertical text and i used **transform: rotate(270deg)** but it makes the width of **`|`** not functionable. I wan to have an small one. Like:
[Look here i ha... |
2018/03/16 | 667 | 2,531 | <issue_start>username_0: Ive been searching for the solution of this error since yesterday. I tried everything. I deleted my .idea and .gradle file. I even invalidate cache and restart my android studio. I also re-install my android studio but to no avail. I am still getting this error. I didn't touch my project for ab... |
2018/03/16 | 487 | 1,672 | <issue_start>username_0: I installed `minikube` with the below command:
```
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
```
Then, I start `minikube` cluster using
```
minikube start --vm-driver=none
```
W... |
2018/03/16 | 449 | 1,450 | <issue_start>username_0: I am trying to make an angular HttpClient get request but am having trouble with doing anything with the data.
I am using an api which is returning data in the form
```
(10)[{...}, {...}, {...}, ...]
[
0:{
row: Array(4)
0: "someid"
1: "somename"
2: "someaddress"
3: "som... |
2018/03/16 | 456 | 1,647 | <issue_start>username_0: I want to install Nginx, but the port 80 has been taken up by Apache2. I stop it by:
```
$ sudo kill -9 my-apache-pid
$ sudo service apache2 stop
$ sudo /etc/init.d/apache2 stop
[ ok ] Stopping apache2 (via systemctl): apache2.service.
```
and I can install Nginx. I use`sudo systemctl stat... |
2018/03/16 | 339 | 1,370 | <issue_start>username_0: I want to store url of user's referral website after sucessfull registration. In this case I can't use `request.referer` because user can visit few pages on my website before registration. But I need previous website url, for example `http://google.com` or `http://facebook.com/somepage_id` or w... |
2018/03/16 | 350 | 1,248 | <issue_start>username_0: My code is below :
```
int main(){
string s = "abcd";
int length_of_string = s.size();
cout<
```
As far as I know, every string is terminated with a NULL character. In my code I declare a string with length of 4. Then I print the length\_of\_string which gives a value of 4. Then I... |
2018/03/16 | 268 | 993 | <issue_start>username_0: We are using Magento 1.9 for our application. Here is my sample code
```
$customer_collection= Mage::getModel("customer/customer")->load($data['customer_id']);
foreach ($data['data'] as $key => $customer) {
$customer_collection->setData($customer['attribute_name'] , $customer['attribute_... |
2018/03/16 | 455 | 1,371 | <issue_start>username_0: **My Modal :**
```
{
"name":{type:String,required:true},
"category":{type:mongoose.Schema.Types.ObjectId,ref:"Category"}
}
```
I have a document created using this modal and the document looks like:
```
{
"_id":ObjectId("5dsfkjh2r74dsjdhf3r4f"),
"name":"demo 1",
"category":ObjectI... |
2018/03/16 | 485 | 1,328 | <issue_start>username_0: ```
replicatee :: [a] -> Int -> [a]
replicatee [] _ = []
replicatee xs 0 = []
replicatee (x:xs) n = x:replicatee (x:xs) (n-1): replicatee xs n
```
So this is my code for replicating a an element in a list n times, the compler keeps showing an error :
```
Couldnt match type 'a'with [a], I'm s... |
2018/03/16 | 1,169 | 3,375 | <issue_start>username_0: I am trying to develop toggle buttons using plain `CSS`. My toggle button should look like the below image.
[](https://i.stack.imgur.com/J4gt1.png)
Here is the snippet of the code that I created.
```css
.btn {
display: in... |
2018/03/16 | 204 | 773 | <issue_start>username_0: SQL Server: I am looking for a way to force at database level a date column to be last day of the month (note: **not** the last day of **current** month). Is there a way to alter the table to implement this constraint?
Thank you<issue_comment>username_1: You could implement the check constrain... |
2018/03/16 | 1,750 | 4,132 | <issue_start>username_0: I'm stuck on a simple issue:
I get through `urllib` a JSON app list which looks like this :
```
"completedapps" : [ {
"starttime" : 1520863179923,
"id" : "app-20180312145939-0183",
"name" : "IE_Traitement_3",
"cores" : 1,
"user" : "root",
"memoryperslave" : 1024,
... |
2018/03/16 | 1,303 | 3,226 | <issue_start>username_0: Now I'm doing:
```
sess := mongodb.DB("mybase").C("mycollection")
var users []struct {
Username string `bson:"username"`
}
err = sess.Find(nil).Select(bson.M{"username": 1, "_id": 0}).All(&users)
if err != nil {
fmt.Println(err)
}
var myUsers []string
for _, user := range users{
... |
2018/03/16 | 556 | 2,159 | <issue_start>username_0: ```
function mapStateToProps(state) {
let returnObject = {};
if (state && state.form) {
if (
state.form.someFormName &&
state.form.someFormName.values &&
state.form.someFormName.values.fieldNameX &&
state.form.someFormName.values.f... |
2018/03/16 | 538 | 2,120 | <issue_start>username_0: I am developing a one page website and I would like to load in each section when the window scrolls to that specific section. Now I know you can lazyload images but I want to lazy load the entire section. The only way I think it would be possible is if I put my html code into jQuery then load i... |
2018/03/16 | 473 | 1,286 | <issue_start>username_0: Perl : how to sum values in a line.
my Data looks like below.
```
"A",1.2,-1.5,4.2,1.4,
"B",2.6,-.50,-1.6,0.3,-1.3
```
Expected Output:
```
5.3
-0.5
```<issue_comment>username_1: This should be enough to get you started:
```
#!/usr/bin/perl
use strict;
use warnings;
use feature 'say';
u... |
2018/03/16 | 560 | 1,920 | <issue_start>username_0: I am trying to make a cell that will have two UILabels at the same line.
Like this:
```
User Name: blablabla
```
Where `User Name` is the first UILabel and `blablabla` is the second UILabel.
I want the first UILabel to be wrap content and the second one to have its content extended until th... |
2018/03/16 | 1,148 | 3,200 | <issue_start>username_0: Using the following code, I am trying to filter data on the date of the event (=.evSpeeldatum) and the discount type (=.tiPrijstype).
```
SELECT
*
FROM
tickets
JOIN
evenementen ON tickets.fk_tiEvenementID = evenementen.idEvenement
WHERE
evenementen.evSpeeldatum >= '2018-01-24'
AND tic... |
2018/03/16 | 291 | 1,069 | <issue_start>username_0: In my project I have to change the endian-ness of the data types like int, float, short etc. I thought that the best way to do is to access the elements of the struct then change the endian-ness of them (if they are bigger than 1 byte). The struct is very long, it is necessary to do this in an ... |
2018/03/16 | 1,173 | 3,318 | <issue_start>username_0: I have this error when opening my netcdf file.
The code was working before.
**How do I fix this ?**
>
> Traceback (most recent call last):
>
>
> File "", line 1, in
> ...
>
>
> File "file.py", line 71, in gather\_vgt
> return xr.open\_dataset(filename)
>
>
> File "/.../lib/python3.6/... |
2018/03/16 | 619 | 2,071 | <issue_start>username_0: I need to have div border responsive. However, as you can see `.buttonsDiv` needs to be at the bottom and wrapper border needs to be stretched underneath `.buttonsDiv`. But when I use this code buttons are at the bottom but border stays at the top. I can't use margin because content div contain... |
2018/03/16 | 703 | 2,305 | <issue_start>username_0: I am using the following code in a long script many times:
```
this.click("");
```
But there is one page that doesn't work, and I don't understand why.
The HTML is:
```
Choose
```
So I am using:
```
casper.waitUntilVisible('#products_screen',
function success() {
casper.te... |
2018/03/16 | 2,854 | 8,631 | <issue_start>username_0: My `data` frame contains 10,000,000 rows! After group by, ~ 9,000,000 sub-frames remain to loop through.
The code is:
```
data = read.csv('big.csv')
for id, new_df in data.groupby(level=0): # look at mini df and do some analysis
# some code for each of the small data frames
```
This is ... |
2018/03/16 | 1,052 | 3,476 | <issue_start>username_0: I've an object which contains 100 keys, value pairs.
```
$scope.obj = {
key1: value1,
key1: value1,
.
.
.
key100: value100
}
```
I have 100 inputs
```
.
.
.
<button ng-click="submit>
```
When I sumbit the data will send to server. Some time I'll change values and someti... |
2018/03/16 | 661 | 2,236 | <issue_start>username_0: I often have some kind of master-detail situation where i try to use a single model for both master and detail view.
The detail page is bound directly to an element in the list with `.bindElement(path)` when you select an item in the list. The path is available from the binding context. Every... |
2018/03/16 | 990 | 4,375 | <issue_start>username_0: I'm currently refactoring my code to include ViewModel with LiveData provided by android.arch library. I have a simple activity that sends request for a password change to server and acts according to HTTP response code.
For that purpose I have created class that extends ViewModel for data an... |
2018/03/16 | 701 | 2,219 | <issue_start>username_0: I have a list of dates as strings in the format 'dd/mm/yyyy hh:mm:ss tt' I'm trying to order them by closest to farthest like so:
```
09/12/2018 12:00:00 PM
10/12/2018 12:00:00 PM
11/12/2018 12:00:00 PM
```
My code seems to be ordering them from the 11th to the 09th which I don't want but ca... |
2018/03/16 | 760 | 2,314 | <issue_start>username_0: ```
#!/usr/bin/perl
print "content-type:text/html\n\n";
print "";
use CGI;
use DBI;
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
$db="New";
$user="root";
$password="<PASSWORD>";
$host="localhost";
$dbh=DBI->connect("DBI:mysql:database=$db:$host",$user,$password) ||
die "couldnt op... |
2018/03/16 | 585 | 1,912 | <issue_start>username_0: I stored "hello,world" in a mysql database as an array and then tried to retrieve using below query
```
@php
$post_id = $post->id;
$result= DB::table('posts')
->select('tags')
->where('id', '=', $post_id)
->get();
echo($result);
@endphp
```
The echoed result is:... |
2018/03/16 | 398 | 1,676 | <issue_start>username_0: [](https://i.stack.imgur.com/hnLcV.png)
I have a one to many relationship User -> Weight as shown on the screenshot. I am able to extract sectioned data from an entity using NSFetchRequest and NSFetchedResultsController and th... |
2018/03/16 | 598 | 2,251 | <issue_start>username_0: I have a docker-compose setup something like:
```
/
- sources/
- docker-compose.yml
- Dockerfile
- .dockerignore
- many more files
```
The Dockerfile contains instructions including a COPY command of the sources.
Because of all the different tools, including multiple docker setups, I'd like... |
2018/03/16 | 464 | 1,600 | <issue_start>username_0: So I'm trying to make a basic website and I need to display an image when I click on a button. The problem is that it displays me the image but when I click on another button to diplay me an another image the precedent image stays.
here is my code. I'm using Angular 4 and typescript.
component... |
2018/03/16 | 1,473 | 6,043 | <issue_start>username_0: ```
public static class ApplicationUtils
{
public static bool IsCurrentUserAManager()
{
var username = WindowsIdentity.GetCurrent().Name;
bool inAdmin;
if (username == "AdminUser") {
inAdmin = true;
} else {
... |
2018/03/16 | 1,451 | 5,543 | <issue_start>username_0: I am reading a csv file in R and it has date column.I am using
```
as.Date(dat$date, format ="%d-%m-%Y")
```
But i am getting dates in
```
0012-02-14
```
with the year 2012 described as 0012. How to deal with this error.
I also tried lubridate package but no results
```
col1 col2 ... |
2018/03/16 | 602 | 1,861 | <issue_start>username_0: I'm writing some code in R and have around 600 lines of functions right now and want to know if there is an easy way to check, if any of my functions is using global variables (which I DON'T want).
For example it could give me an error if sourcing this code:
```
example_fun<-function(x){
y=... |
2018/03/16 | 418 | 1,384 | <issue_start>username_0: In Effective Java 3rd edition, on page 50, author has talked about total time an object lasted from its creation to the time it was garbage collected.
>
> On my machine, the time to create a simple AutoCloseable object, to close
> it using try-with-resources, and to have the garbage collect... |
2018/03/16 | 877 | 2,777 | <issue_start>username_0: I have a php function to get dates for a morris pie chart and it was working fine.
But now that I have more data (date for the last year and the first 3 months of this year). It's now displaying duplicate months. In this case february of last year and this years data is now showing on the same... |
2018/03/16 | 632 | 2,369 | <issue_start>username_0: I submitted a PWA to the Microsoft Store and got the following notes on my submission:
>
> 10.8.5
> Your app or app metadata includes links that promote installation or
> purchase of software outside the Store.
> Your app may promote or distribute software only through the Microsoft Store.... |
2018/03/16 | 651 | 2,236 | <issue_start>username_0: I have a dataframe which is of the following structure:
```
A B
Location1 1
Location2 2
1 3
2 4
```
In the above example column A is the index. I am attempting to produce a scatter plot using the index and column B. This data frame is made by resampling and avera... |
2018/03/16 | 480 | 2,060 | <issue_start>username_0: If I have some project in my virtualbox's ubuntu, what is right way to upload to github?
Of course I need frequent source revision, so after edit, I should compile(qmake, make) or not?
Just source revise and then upload it is enough?
Then revision at github directly is enough?
Those guide... |
2018/03/16 | 260 | 996 | <issue_start>username_0: I can build and run the app in the emulator but when I try and generate signed apk the following happens.
```
Error:Execution failed for task ':app:lintVitalRelease'.
> Invalid main APK outputs : BuildOutput{apkInfo={type=MAIN, versionCode=0, filters=[]}, path=C:\Users\datan\StudioProjects\ga... |
2018/03/16 | 427 | 1,360 | <issue_start>username_0: Here i want to take the count like same values in table,let say example in my table `Accomodation` is two time are there so,Accomodation count should come 2 and remaining count is 1
>
> getting\_fecilities
>
>
>
```
fid eventId fecilityName
1 5 Ac... |
2018/03/16 | 1,002 | 3,314 | <issue_start>username_0: I’ve worked with SAS and SQL previously I’m trying to get into R via a course. I’ve been set the following task by my tutor:
“Using the Iris dataset, write an R function that takes as its arguments an Iris species and attribute name and returns the minimum and maximum values of the attribute f... |
2018/03/16 | 1,064 | 4,038 | <issue_start>username_0: I have a sync controller method
```
public IActionResult Action(int num)
{
//operations-1
Task.Run(() => DoWork(num));
//operations-2
int a = num + 123;
return Ok(a);
}
```
and DoWork method
```
private bool DoWork(int num)
{
... |
2018/03/16 | 1,197 | 4,604 | <issue_start>username_0: [](https://i.stack.imgur.com/tCv6i.png)
I am trying to make a view controller that has a scroll view and text view. I want my scrolling is enabled only when the text content of the text view is a lot. because it seems ugly if ... |
2018/03/16 | 876 | 3,819 | <issue_start>username_0: Recently I took over an android project which is built on top of MVP. While simple screens are quite straight forward and easy to read and maintain, the more complex parts of the app are not. Multiple inheritance levels have caused me days of switching between classes, trying to find out how th... |
2018/03/16 | 686 | 2,429 | <issue_start>username_0: So I'm getting this error
```
~/projects/personal-projects/react/myapp ⌚ 18:12:24
$ react-native run-android --variant=release
Scanning folders for symlinks in /Users/user/projects/personal-projects/react/myapp/node_modules (22ms)
JS server already running.
Building and installing the app on... |
2018/03/16 | 600 | 1,999 | <issue_start>username_0: I have a "users" table as below
```
User_Id User_Name Case_Id Create_Date Close_date
--------------------------------------------------------
1 abc 65473 2018-03-14 2018-03-15
2 xyz 43526 2018-03-14 NULL
3 gst 49088 2018... |
2018/03/16 | 739 | 3,257 | <issue_start>username_0: Im Using the gcp python API.
GOOGLE\_APPLICATION\_CREDENTIALS environment variable wants the path to a gcp accounts json key.
Is there another variable that can accept the contents of that file instead of the path? This would be convenient.<issue_comment>username_1: I recommend you to not rel... |
2018/03/16 | 626 | 2,189 | <issue_start>username_0: I need fetch the data from an API and display in an list.There is no error while i run the code. But the data are also not been displayed.
```
import React, { Component } from 'react';
import {Container, List,Text, StyleProvider} from 'native-base';
import getTheme from './native-base-theme/co... |
2018/03/16 | 956 | 3,681 | <issue_start>username_0: In package com.example.project.packageA I have a class which extends the JobIntentService defines as follows:
```
public class MyService extends JobIntentService {
static final int JOB_ID = 1000;
static final String TAG =MyService.class.getSimpleName();
public static void enqueue... |
2018/03/16 | 883 | 2,816 | <issue_start>username_0: I am wondering if it's possible to initialize a `std::array` of objects with an implicitly deleted default constructor, without knowing a priori the size of the array because it's a template argument and so having lost the possibility of using an initializer list. Code follows, it breaks with a... |
2018/03/16 | 772 | 2,505 | <issue_start>username_0: I was thinking if this is possible:
I got a PS-Form with several buttons and whether or not you can bind the buttons to other PS files?
Example:
The main form has 3 buttons and one of the buttons is called "Create Ad User".
When I click on the button goes to Ad-Form.Ps, gets the content an... |
2018/03/16 | 496 | 1,986 | <issue_start>username_0: There are around 5 projects under Hyperledger. I don't find any material which talks about distinctive features of every framework, how each framework is different from each other, when to use each? It would be of great help if someone provide that information<issue_comment>username_1: Hyperled... |
2018/03/16 | 1,031 | 3,293 | <issue_start>username_0: A small dataframe with a two level multiindex and one column. The second column(level 1) of the index will sort in alphabetical order putting 'Four' before 'Three'.
```
import pandas as pd
df = pd.DataFrame({'A':[1,1,2,2],
'B':['One','Two','Three', 'Four'],
'X':[1,2,3,4]},
index=range(4... |
2018/03/16 | 1,867 | 6,276 | <issue_start>username_0: On excel I consult a table from the MySQL server and then modify the format of how the data is shown. I'm currently changing the SQL so the data comes already the way I want and one part is like this:
There's 25 columns named operator1-5lot1-5 (1-5 as in 1 to 5) like this:
`operator1lot1`, `o... |
2018/03/16 | 1,458 | 6,149 | <issue_start>username_0: I'm currently using **git** to deploy my applications in my different hosts. My codebase being mounted into running **Docker images**:
**docker-compose.yml**
```yaml
services:
app:
image: my.registry.net:5000/my/app
volumes:
- .:/app
# [...]
```
So my deploym... |
2018/03/16 | 1,278 | 5,503 | <issue_start>username_0: I am going to make restful server with codeigniter.
I did download Rest\_Controller.php and Format.php from github and placed in libraries folder them.
By the way, all request are not working properly put, post,delete etc.
I used postman tool.The output is always
```
{"":false}
```
Help me.... |
2018/03/16 | 1,026 | 4,606 | <issue_start>username_0: I want to validate user phone number exists in Firebase before phone authentication. And if user exists then only OTP verification will start otherwise show error. Kindly help me out please<issue_comment>username_1: docker-compose is one orchestration tool for docker, but there others like kube... |
2018/03/16 | 1,643 | 6,007 | <issue_start>username_0: Introduction to the program
---------------------------
I'm working on a program which stores data like the following:
**- Facts:** A combination of a list of properties (or just one) and a true/false value(called the "truth" value). For example:
>
> parent('John' , '<NAME>') , true
>
>
>... |
2018/03/16 | 526 | 2,136 | <issue_start>username_0: I want to open master details menu from another content page button click event?
so how to do this in xamarin forms?<issue_comment>username_1: You can open menu page by setting `MasterDetailPage.IsPresented` to true.
Simple way to do this is `MessagingCenter`. To `MasterDetailPage` add `Messag... |
2018/03/16 | 559 | 1,873 | <issue_start>username_0: I have a file which contains a list of names stored in a simple text file. Each row contains one name. Now I need to pro grammatically append a new name to this file based on a users input.
For the input itself I use DataBricks widgets - this is working just fine and I have the new name stored ... |
2018/03/16 | 1,265 | 3,970 | <issue_start>username_0: I have 3 tables:
* `NETWORK_OPERATOR`s;
* `NETWORK_CELL`s: each of them belongs to one `NETWORK_OPERATOR`;
* `IRI`s: each of them can have **either**:
1. a *Network Operator* **or**
2. a *Network Cell*
but one of 1) and 2) is mandatory.
In case of 1) the `netOpId` must exists in `NETWORK_... |
2018/03/16 | 733 | 2,324 | <issue_start>username_0: ```
String test1 = "test";
String test2 = "test";
System.out.println(test1 == test2); // true
```
test1 and test2 points to the same object, so the outcome is true.
```
String test1 = new String("test");
String test2 = new String("test");
System.out.println(test1 ==... |
2018/03/16 | 382 | 1,181 | <issue_start>username_0: Here is JSON:
```
{
"first":0,
"rows":100,
"data":[
{
"id":326,
"tag":"QATA9",
"workNo":"qat12345"
}
],
"totalRecords":1
}
```
And my code is :
```
JsonPath jsonPathEvaluator = response.jsonPath();
wID = jsonPathEvaluator.get("data.id");
System.out.println("id is "+ wID);
String responseB... |
2018/03/16 | 797 | 2,622 | <issue_start>username_0: First request for the JSON in response body which looks like this:
```
{"data":{"userId":"USR-0000000000000001","accessToken":"<KEY>","refreshToken":"<KEY>","expiresIn":"2018-03-16 20:14:00","tokenType":"bearer"}
```
I extract the value of the "accessToken" attribute using the
"Regular Expr... |
2018/03/16 | 798 | 2,652 | <issue_start>username_0: I have a simple HTML file, from which I want to load .js file.
I have these files (files are in the same folder):
start.js
```
var http = require('http');
var fs = require('fs');
http.createServer(function (req, response) {
fs.readFile('index.html', 'utf-8', function (err, data) {
... |
2018/03/16 | 2,682 | 8,114 | <issue_start>username_0: I have prepared an [SQL Fiddle](http://sqlfiddle.com/#!17/8f294/1) for my question -
In a 2-player word game I store players and their games in the 2 tables:
```
CREATE TABLE players (
uid SERIAL PRIMARY KEY,
name text NOT NULL
);
CREATE TABLE games (
gid SERIAL PRIMARY KEY,
... |
2018/03/16 | 797 | 2,631 | <issue_start>username_0: I have written my code to show some list of elements on my page. Also, I have written javascript code to slice the elements. So my page has 5 elements displaying initially and every time a user clicks show more link then an additional 5 elements get displayed. My question is when I click showmo... |
2018/03/16 | 339 | 1,338 | <issue_start>username_0: i want to send the json array from one view controller to another view controller and the array should be populated in pickerview . but i am unable to send the array . i am getting the array but not able to send it
```
let mydata = json["data"] as! NSArray
... |
2018/03/16 | 1,038 | 3,229 | <issue_start>username_0: ```
public static List removeOddNumbers(ArrayList list) {
if (list.isEmpty()) { throw new Error(); }
List toRemove = new ArrayList<>();
for (int i : list) {
if (i % 2 != 0) { toRemove.add(i); }
}
list.removeAll(toRemove);
return list;
}
```
I'm trying to remove all odd elements from a... |
2018/03/16 | 1,790 | 5,646 | <issue_start>username_0: In Google Chrome, `element.scrollIntoView()` with `behavior: 'smooth'` doesn't work on multiple containers at the same time. As soon as smooth scrolling is triggered on one container, the second container stops scrolling. In Firefox, this problem doesn’t exist; both containers can scroll simult... |
2018/03/16 | 527 | 1,770 | <issue_start>username_0: I have a string as such:
```
teststring = 'Index: WriteVTKOutput.FOR\\r\\n======================================\\r\\n'
```
I'd like to split it based on the `'\\r'` and `'\\n'` characters, such that I get the following result:
```
testlist = ['Index: WriteVTKOutput.FOR', '=================... |
2018/03/16 | 1,489 | 5,621 | <issue_start>username_0: In my website using HTML, Bootstrap, Php I have created a contact us form. The form is working fine and am able to get the message. But the issue is that, after clicking the submit button a new page opens up for "Thank you message". Can you please guide me on how I can show the thank you messag... |
2018/03/16 | 1,611 | 4,779 | <issue_start>username_0: I have plans for a certain program I want to build and for that I need a way to generate random assembly code and modify it.
I know how to use the `system()` function (C language) and I wanted to know if there is a way to create a file that contains only a raw hex code and then use `system()` ... |
2018/03/16 | 1,889 | 5,537 | <issue_start>username_0: I'm trying to make a pomodoro clock on codepen, and I know my code isn't perfect yet, but I'm seeing a very strange behavior with my Start button, when I click once on it, it start the timer. But when I smash it multiple times, it just go crazy, and the timer go faster and faster, can someone t... |
2018/03/16 | 486 | 1,704 | <issue_start>username_0: I am creating a website with ruby on rails and want to add a post section.
I've looked StackOverflow up for solutions, but I couldn't get one for my needs.
show.html.erb
```
<%= @post.title %>
==================
by
[Start Bootstrap](#)
```
---
posts\_controller.rb
```
class PostContr... |
2018/03/16 | 1,046 | 5,055 | <issue_start>username_0: I try to display a showcase view that pointing to a menu item, but this sharedpreference just save before my app closed, after i close my app and open again showcase view will appear again. how i can show the showcase view only for the very first time?
```
@Override
public boolean onCreateOpt... |
2018/03/16 | 1,064 | 3,622 | <issue_start>username_0: For my project i'm trying to binarize an image with openCV in python. I used the adaptive gaussian thresholding from openCV to convert the image with the following result:
[](https://i.stack.imgur.com/uEoWG.png)
I want to use ... |
2018/03/16 | 613 | 2,170 | <issue_start>username_0: When the JSON format is response, the original sorting of the data is lost. When response in XML, the sort is saved. How can I preserve the original sorting with JSON?
My controller:
```
use yii\rest\ActiveController;
class DomainController extends ActiveController
{
...
public func... |
2018/03/16 | 574 | 1,849 | <issue_start>username_0: I have a table that records daily sales data. However, there are days when no sale is made and hence there is no record on the database for those dates. Is it possible to extract data out from the table that returns null for these dates when no sale was made
 commits between them.
Recently, I've noticed that git correctly appli... |
2018/03/16 | 1,165 | 3,802 | <issue_start>username_0: I have an SQL Query which returns the following table with 3 columns:
[](https://i.stack.imgur.com/wAEsU.png)
I am searching a data structure, in which I can store the table, that delivers me back the phasename when the dot is... |
2018/03/16 | 1,225 | 4,128 | <issue_start>username_0: I am working at my university degree and I got stuck at a random function.
I am using a microcontroller, which has no configured clock. So, I decided to use the ADC (analog to digital conversion) as seeds for my random function.
So I have 15 two bytes variables with stores some 'random' values... |
2018/03/16 | 590 | 1,263 | <issue_start>username_0: Assuming I would have a raster in R like :
```
r <- raster(ncols=10, nrows=10)
r[] <- sample(50, 100, replace=T)
```
How could I set the values between [10,30] for example to NA?
I tried `values = r[r<= c(10,30)] = NA` but this does not remove the values between 10 and 30.
Thanks in advan... |
2018/03/16 | 1,095 | 3,403 | <issue_start>username_0: A few notes that make this tricky are that I'm using `c9.io` (developing in the cloud) so I use the gem `webdrivers` to be able to run **Chrome** with **Watir**, instead of creating an executable path to the Chrome installed on my device.
My code was working until I logged in today and got th... |
2018/03/16 | 1,250 | 4,919 | <issue_start>username_0: in android i am trying to change the layout base on who the message is from.
if the message is from me then display the layout mymessage.xml to the right else display message.xml to the left.
i used if condition, but i don't know how to display one layout to the right and the second to the left... |
2018/03/16 | 406 | 1,291 | <issue_start>username_0: How can I create a regex that look for text `for` followed by some text and then the text `{` followed with some text and then the text `DAO.` followed with some text and then the text `}`, for example:
```
for(Entity e : list){
e.setX(someDAO.findX(e.getId()));
}
```
Or :
```
for(Entit... |
2018/03/16 | 2,566 | 6,635 | <issue_start>username_0: Inside a docker container I am trying to convert an XLSX file to PDF using LibreOffice. The relevant command works on the command line but fails with "Application Error" when called from R. I use this `Dockerfile` which adds some (in my experience arbitrary) XLSX file:
```
FROM rocker/r-ver:3.... |
2018/03/16 | 641 | 2,225 | <issue_start>username_0: I have the classes `SmallClass` and `BigClass`. `BigClass` as a private attribute that is an object of `SmallClass`. I've read about initializer lists, but the problem is that I cannot predict the value I need to pass to the constructor of `SmallClass`. The code looks something like this:
```
... |
2018/03/16 | 896 | 3,464 | <issue_start>username_0: I am working on windows application for email sending.
For text formatting i used tinymce editor for email body.
Used tinymce insert image functionality for adding image in email body but when email is sent to user. Images does not appear in user email body.
Then i tried to add base64 image m... |
2018/03/16 | 636 | 2,497 | <issue_start>username_0: In a android studio project i need to get user input in edittext. here is my code
**Xml file**
```
```
**in .java file**
```
button.setOnClickListener(new View.OnClickListener() {
EditText amount = (EditText) findViewById(R.id.amount);
String amount_text =amount.getText().toString()... |
2018/03/16 | 406 | 1,094 | <issue_start>username_0: I have file with only bare data like:
foo.py
```
TL = {
'aa': {'L1104205608': {'ada': {'bb': 'APC', 'ip_addr': '10.44.184.12', 'port': 2}},
'L1104205616': {'ada': {'bb': 'APC', 'ip_addr': '10.44.184.13', 'port': 3}}}}
aaa = 'bbb'
```
I need to import files like this, then unpack value... |
2018/03/16 | 325 | 989 | <issue_start>username_0: How to swap negative sign from last position to first in a string or integer to first position in hive and/ spark?
example: 22-
required: -22
My code is:
```
val Validation1 = spark.sql("Select case when substr(YTTLSVAL-,-1,1)='-' then cast(concat('-',substr(YTTLSVAL-,1,length(YTTLSVAL-)-1)... |
2018/03/16 | 1,322 | 4,382 | <issue_start>username_0: I'm having trouble with a piece of code where a typedef array is created of a struct. That typedef is then used in another struct.
When receiving the typedef in a function and initialising the struct with the typedef in it, I only get data of the first element in the array.
Below I have a ... |
2018/03/16 | 875 | 3,258 | <issue_start>username_0: I am having a lot of confusion using the `sys.getsizeof` function in python. All I want to find out is that for say a floating point value, is the system using 4 or 8 bytes (i.e. single or double precision in C terms).
I do the following:
```
import sys
x = 0.0
sys.getsizeof(x) # Returns 24... |
2018/03/16 | 1,301 | 4,708 | <issue_start>username_0: I researched and found out oci\_connect() is the way to go. I found out that i could either use the Connect Name from the tnsnames.ora file or use an easy connect syntax. Since my database isn't locally stored and I had no idea where the said, tnsnames.ora file was located in apex.oracle.com, I... |