date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/06 | 1,013 | 3,370 | <issue_start>username_0: In my rails integration test, I'm trying to test for the presence of a checkbox with a given value (which is the ID of an object, an integer).
This line: `assert_select "input[type=checkbox][value=#{c.id.to_s}]"` generates the following error:
>
> Nokogiri::CSS::SyntaxError: unexpected '2835... |
2018/03/06 | 1,270 | 3,859 | <issue_start>username_0: ### Question
I have an aside div and a main div which have some content.
[](https://i.stack.imgur.com/CbYVc.png)
Is it possible to specify that the orange box (aside content) + the blue box (the main content) are overall cen... |
2018/03/06 | 1,329 | 5,431 | <issue_start>username_0: I'm working on a simple Android project which can insert and retrieve data from Firebase. The inserting function works well, which means the project has successfully connected to the Firebase database. However, the retrieving part doesn't work. I did many tests and think the problem is in the F... |
2018/03/06 | 427 | 1,924 | <issue_start>username_0: I am a new user to conda environment and was setting up to use TensorFlow , on Windows.
I came across a command -
source activate IntroToTensorFlow.
I understood IntroToTensorFlow is an environment we are creating, but does it mean we need to create this environment every time?. I am using jup... |
2018/03/06 | 706 | 2,352 | <issue_start>username_0: I have very basic question about replacing the values in the groups most frequent value.
Here is what I mean
```
df <- data.frame(x=c(12,12,5,13,13,5),y=c(10,22,22,22,10,22),gr=gl(2,3))
> df
x y gr
1 12 10 1
2 12 22 1
3 5 22 1
4 13 22 2
5 13 10 2
6 5 22 2
```
As we can see for ... |
2018/03/06 | 973 | 3,290 | <issue_start>username_0: Currently whatever the user enters in the text box and clicks the button, is being displayed inside anchor tags dynamically (all in new lines).
Textbox and the button (HTML file)-
```
|
```
JS function-
```
ctrl.addtext = function () {
var div = document.getElementById('outputDiv');
... |
2018/03/06 | 1,169 | 3,932 | <issue_start>username_0: Is it possible to query multiple fields in a firestore document for the same value?
Imagine I have numerous documents where each described a sport:
```
sportsRef.collection("sports").documents [
["bowling" : [
"equipment": "bowling ball, bowling alley, bowling shoes",
"description": "bowl the... |
2018/03/06 | 328 | 1,066 | <issue_start>username_0: I'm using Visual Studio 2017, trying to do a search and replace using regular expressions to do the following. I would like to surround each line in my text file with `- line`
For example:
```
This is line 1 to be surrounded with list item tags
This is line 2 to be surrounded with list item t... |
2018/03/06 | 309 | 927 | <issue_start>username_0: I have a list of maps
```
val names = List(Map("rawname"->"a", "stdname" -> "A"), Map("rawname"->"b", "stdname" -> "B"), Map("rawname"->"c", "stdname" -> "C"))
```
which I want to unpack into
```
val rawToStd = Map("a" -> "A", "b" -> "B", "c" -> "C")
```
I have tried
```
val rawToStd = ... |
2018/03/06 | 393 | 1,366 | <issue_start>username_0: I'm using CefSharp Winforms x86 build. I want to play a video from this link :
```
http://developers.canal-plus.com/rx-player/
```
In google chrome it's working but my CefSharp WinForm Browser can't play any of these. I checked javascript is enabled. Am i missing something ? This page doesn'... |
2018/03/06 | 1,329 | 4,704 | <issue_start>username_0: I'm trying to create a filter with javascript with 4 input fields so I'm guessin 16 combinations of possible searches. I can search all 4 at once or 1 input at a time but for some reason when I add other statements I get wierd results. Is there a better way to implement a filter?
```
var unfil... |
2018/03/06 | 824 | 2,866 | <issue_start>username_0: I would like to take advantage of `PIXI.Spritesheet` to get some kind of collection of textures or sprites to use in a pixi application.
```
let spritesheetTexture = PIXI.utils.TextureCache["my-spritesheet-image.png"];
let data = ??????
let spritesheet = new PIXI.Spritesheet(spritesheetTextur... |
2018/03/06 | 357 | 1,186 | <issue_start>username_0: I thought what I'm trying to do would be pretty easy to do but I just can't make it work.
I tried to do pull-left on bootstrap cards and panels and it's not working the way I want it to...
Here is a picture of what I'd like to acheive
[Example](https://i.stack.imgur.com/H8Hk2.png)
Heres cod... |
2018/03/06 | 3,010 | 11,301 | <issue_start>username_0: I'm writing a class overloading the list type.
I just wrote this and I'm wondering if there exists any other way less redundant to do it :
```
class Vector:
def __mul__(self, other):
#Vector([1, 2, 3]) * 5 => Vector([5, 10, 15])
if isinstance(other, int) or isinstance(othe... |
2018/03/06 | 383 | 1,428 | <issue_start>username_0: So, I'm creating an ecto migration for adding a new column to my model in the database, and I want to change the order of the columns because this new column gets put at the end of the columns, so I tried it like this:
```
def change do
alter table(:users) do
add :password_hash, :string,... |
2018/03/06 | 677 | 2,120 | <issue_start>username_0: Hi,I have a column as below
```
+--------+--------+
| day | amount|
+--------+---------
| 2 | 2 |
| 1 | 3 |
| 1 | 4 |
| 2 | 2 |
| 3 | 3 |
| 4 | 3 |
+--------+--------+
```
now I want something like this sum day 1- day2 as ro... |
2018/03/06 | 925 | 2,766 | <issue_start>username_0: I have one table with one primary key and three foreign keys.
Here my table with data
```
Id RegistrationId GroupId ItemId Value
2345 68038 677 672 679
3562 68038 357 783 423
8236 NULL ... |
2018/03/06 | 1,926 | 6,485 | <issue_start>username_0: Super stumped by this. I have some server code that for some reason throws a UTF-8 error in my tests but works fine when running the server normally:
code:
```
export default ({ projectId = PROJECT_ID, esHost = ES_HOST } = {}) => {
let app = express();
app.use(cors());
app.use(bodyParse... |
2018/03/06 | 705 | 2,517 | <issue_start>username_0: I am fairly new to jQuery, trying to create a Jekyll theme, which displays first five post elements (paragraphs, titles, images, bullet points) one by one. Now, I’ve got a piece of code that fades in all post elements, which -unfortunately- means that for very long posts, it takes ages to do.
... |
2018/03/06 | 926 | 2,552 | <issue_start>username_0: I am trying to get the code to print " 1000 100 10 1" but keep getting "100 10 1 0." Any ideas as to why this is occurring? Any help would be appreciated. Thank you.
```
#include
using namespace std;
int main()
{
int arr[4] = { 0, 1, 2, 3 };
int \*ptr;
ptr = arr;
\*ptr = arr[0] + 1; // ... |
2018/03/06 | 3,025 | 8,510 | <issue_start>username_0: Pandas has a widely-used [groupby](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.groupby.html) facility to split up a DataFrame based on a corresponding mapping, from which you can apply a calculation on each subgroup and recombine the results.
Can this be done flexib... |
2018/03/06 | 1,631 | 5,952 | <issue_start>username_0: I have a class ValueRepository class and want to use a logger in it. The following code always throws a NullPointerException.
```
public enum ValueRepository {
INSTANCE;
private static final Logger LOGGER = LoggerFactory.getLogger(ValueRepository.class.getName());
private Map> key2value;
pr... |
2018/03/07 | 1,099 | 4,551 | <issue_start>username_0: I have a QT widget that is functioning as a GUI for an external Process I am running. I am manually setting the path for this executable in the code. I would like to allow for the user to specify the path to the executable, from the GUI. My idea was to have some line edit box where the user ent... |
2018/03/07 | 1,651 | 5,345 | <issue_start>username_0: I'm sorry if this has already been asked somewhere, but I haven't been able to find an answer to what I'm looking for.
I have a vector of std::string pointers, that I want to sort in alphabetical order, and I haven't been able to figure out how to do this. I am using std::sort.
I wrote up a [... |
2018/03/07 | 1,368 | 4,579 | <issue_start>username_0: Unable to select the destination after logging into the airasia.com.
Below is the code I have used for clicking on destination. Please let me know if the way to select the destination using the search button of location.
```
WebDriver d=new ChromeDriver();
d.get("https://www.airasia.com/en/... |
2018/03/07 | 1,446 | 4,992 | <issue_start>username_0: I have two tables, `Employee` and `EmployeeBenefit`.
`Employee` table has `Id` field
`EmployeeBenefit` table has `EmployeeId`, `CashValue` and `Percentage` fields.
---
The rules are:
`CashValue` and `Percentage` fields of `EmployeeBenefit` table are
mutually exclusive; for any row in `Emp... |
2018/03/07 | 1,002 | 3,736 | <issue_start>username_0: I'm relatively new to Laravel. I'm confused on what is the proper way to deploy a Laravel 5.5 app to a Godaddy cPanel shared hosting. I've read multiple posts on the subject and they give conflicting advice.
Part of what I'm not clear on is do I copy all my files to the server and then run the... |
2018/03/07 | 1,223 | 4,293 | <issue_start>username_0: In safari mobile, touches can be classified as Apple Pencil vs other (finger/ mouse) using:
```
event.touches[0].touchType === 'stylus' //pencil
event.touches[0].touchType !== 'stylus' //other
```
However all events received in a react native webview (both for Apple Pencil and using a finger... |
2018/03/07 | 600 | 2,477 | <issue_start>username_0: Looked at similar SO questions which didn't help me resolve the issue.
I am using AWS Cognito User Pools in our iOS App. We are able to successfully create and login the user. However **after about an Hr the access token is not available**, I understand from AWS Cognito documentation that the ... |
2018/03/07 | 1,799 | 5,115 | <issue_start>username_0: when you find the "hard" stuff easy and the easy stuff hard!
Not sure why I'm asking for help with what looks like a very simple html and/or css problem but here I am.
Please see screenshot for a visual on the problem. My electronics seem to be all over the place even though i've checked by d... |
2018/03/07 | 650 | 2,579 | <issue_start>username_0: I ran into `Exception in thread "Driver" java.lang.NullPointerException` while running my Spark application, and it was because my code was inside a `class` rather than an `object`, as suggested [here](https://www.hackingnote.com/en/spark/trouble-shooting/Driver-NullPointerException/). However,... |
2018/03/07 | 757 | 2,910 | <issue_start>username_0: I am having trouble getting constraints to work on my `UITableViewCell`. The cell currently has 2 text fields and a button with an image.
**iPhone X Storyboard**

Currently without constraints the cell content doesn't change position no matter ... |
2018/03/07 | 547 | 1,880 | <issue_start>username_0: Im having problems with my UI when selecting radio buttons via click on a div:
**I have a loop that shows various radio buttons:**
```
{% for product in collections.regalos.products %}
- {{
product.title }}
{% endfor %}
```
**I want to apply a class when a radio is checked by toggling it... |
2018/03/07 | 970 | 3,168 | <issue_start>username_0: Using the **vi** screen editor I would do this
```
%s/^drop table .*/exec rename_table('&')/g
```
which allows me to reformat the found string. I need to do same in Perl.
I have written a module to which I pass the pattern `$regexp` and replacement `$newtxt` strings.
This module does
```
... |
2018/03/07 | 334 | 1,351 | <issue_start>username_0: I'd like to be able to use Ctrl-C & Ctrl-V for copy and paste into the Git Bash Shell. However, the shell has Ctrl-Insert & Shift-Insert as those actions.
I don't see an obvious way to change these shortcut keys. Am I missing something obvious?
I am using Windows 10.<issue_comment>username_1:... |
2018/03/07 | 859 | 3,413 | <issue_start>username_0: I am simply trying to access an element within my Angular 4 template to place a Google Map but I keep getting a "cannot read property native element of undefined" error. I've seen other people asking similar questions but anything I've tried up to this point has not worked.
I get the same erro... |
2018/03/07 | 757 | 3,048 | <issue_start>username_0: I am starting to learn how to handle multiple tabs in a browser using Selenium with Java. looks like my code below is not working.
```
import java.util.ArrayList;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
im... |
2018/03/07 | 689 | 2,649 | <issue_start>username_0: I'm not a programmer, but I need to find out if there's a way to force a java script to fit completely within an element in my page, without showing a horizontal scroll bar. Sorry if I use the wrong terminology.
Below is a given code that I get from a third party, which I place on my page, to ... |
2018/03/07 | 868 | 3,156 | <issue_start>username_0: My system administrator will not allow global installation of python packages.
I'm writing a script that people will invoke to perform certain actions for them. The script I'm writing needs certain libraries like `sqlalchemy` and `coloredlogs`. I am however allowed to install python libs any lo... |
2018/03/07 | 851 | 3,172 | <issue_start>username_0: As an example, let's say I have the following query:
```
select
u.id,
u.name,
(select s.status from user_status s where s.user_id = u.id order by s.created_at desc limit 1) as status
from
user u
where
u.active = true;
```
The above query works great. It returns the most recent user... |
2018/03/07 | 1,019 | 3,797 | <issue_start>username_0: Hi guy I have following code to get the length of each row:
```
SELECT member_id,
(sum(length(first_name) + length(last_name)
+ length(email) + length(mobile_phone))) as size
FROM my_table
GROUP BY member_id
ORDER BY size desc;
```
Since I have many records with same **email*... |
2018/03/07 | 1,937 | 5,703 | <issue_start>username_0: Let's say I have this **input** file `49142202.txt`:
```
A 5
B 6
C 3
A 4
B 2
C 1
```
Is it possible to sort the groups in column 1 by the value in column 2? The desired **output** is as follows:
```
B 6 <-- B group at the top, because 6 is larger than 5 and 3
B 2 <-- 2 less ... |
2018/03/07 | 1,807 | 5,778 | <issue_start>username_0: My input shape is (20, 10, 1)
my non working model looks like this:
```
num_classes = 2
model.add(Conv2D(32, (5, 5),
padding='same',
data_format='channels_last',
input_shape=input_shape))
model.add(BatchNormalization())
model.add(Activation('relu'))
model.add(C... |
2018/03/07 | 785 | 3,170 | <issue_start>username_0: I am displaying an array of strings separated by `\n` or linebreaks in a textview. Thanks to the `\n`, if there is room in the textview, each string gets its own line. However, if the width of the textview is less than the string, then the textview automatically wraps the line to the next line ... |
2018/03/07 | 648 | 2,123 | <issue_start>username_0: I have a DataFrame like the one below, only with about 25 columns and 3000 rows. I need a second DF that displays the percentage of times that all the rows in each column from df\_A are >= the target in df\_B.
For example, in df\_A, column d02 is >= .04 three times out of five (the len of the... |
2018/03/07 | 410 | 1,682 | <issue_start>username_0: I want to count number of sentences and Words in each sentence. This code is counting the sentences but I want to split the text by each sentence to put into an array. Kindly suggest me some better mechanism.
```html
jQuery Count Number of Words in a String
$(document).ready(function(){
... |
2018/03/07 | 1,975 | 7,484 | <issue_start>username_0: After reading this post:
[Nesting await in Parallel.ForEach](https://stackoverflow.com/questions/11564506/nesting-await-in-parallel-foreach/49141498#49141498)
I tried to do the following:
```
private static async void Solution3UsingLinq()
{
var ids = new List() { "1", "2", "3", "4", "5", ... |
2018/03/07 | 884 | 3,745 | <issue_start>username_0: I am currently developing a personal project on `master`. Every time I push to `origin master` a build is triggered on CodePipeline. As I am the only developer working on this project and don't want to bother with branches at this stage it would be nice to skip unnecessary builds. I wouldn't mi... |
2018/03/07 | 978 | 3,633 | <issue_start>username_0: Whats the best way to get the helm subchart service names to reference into my ingress controller that will sit in the parent chart
```
values.yaml
---
ingress:
paths:
- serviceName: app-1
path: /app-1/*
port: 8080
- serviceName: app-2
path: /app-2/*
port: 808... |
2018/03/07 | 424 | 1,628 | <issue_start>username_0: I have a Cmake.txt file like this
```
project(seat_analysis)
cmake_minimum_required(VERSION 2.8)
find_package( OpenCV REQUIRED )
add_executable( main main.cpp )
add_executable(canny canny.cpp )
add_executable (threshold thresholding.cpp )
target_link_libraries( main ${OpenCV_LIBS} )
target_li... |
2018/03/07 | 959 | 3,086 | <issue_start>username_0: ```
from math import pi
class Circle(object):
'Circle(x,y,r)'
def __init__(self, x=0, y=0, r=1):
self._r = r
self._x = x
self._y = y
def __repr__(self):
return 'Circle({},{},{})'.\
format(self.getx(), self.gety(),\
... |
2018/03/07 | 1,880 | 6,480 | <issue_start>username_0: I'll try to get right to the point. So I'm trying to segment out a large exported file (400MB's) by a specific word. We'll say the unique word in this example is `PYTHONEXP`.
Example:
```
XXXXX PYTHONEXP xxxxxx
xxxxxxxxxxxxxxxxxxxxxx
xxxx 12.34.34.34 xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxx... |
2018/03/07 | 1,086 | 3,034 | <issue_start>username_0: I have the following scenario -
Item sales:
```
╔═════╦════════╦════════════╗
║ SKU ║ ItemId ║ SaleAmount ║
╠═════╬════════╬════════════╣
║ 123 ║ 1 ║ $45.99 ║
║ 456 ║ 2 ║ $54.99 ║
╚═════╩════════╩════════════╝
```
Sale coupons:
```
╔═════╦═════... |
2018/03/07 | 5,051 | 19,229 | <issue_start>username_0: I wonder if there is a way in Git itself, or in a text editor, to have Git history displayed as regular files directly in the file tree.
Like if I have a file `landing.html` with a couple of previous commits, I want to have the full `landind.html.old.v0`, `landind.html.old.v1`, `landind.html.o... |
2018/03/07 | 797 | 3,289 | <issue_start>username_0: I want to know If I can do this in react, I want to call a function or method of a react component from a JS file, so I could change the state of that component.
I have these three files for example
First App.js
```
import React,{Component} from 'react';
import Login from './Login';
class A... |
2018/03/07 | 582 | 2,136 | <issue_start>username_0: I used to be able to scroll in `Visual Studio 2015` using some keyboard shortcuts in Windows doing something like `ctrl``shift``down`. It would effectively behave like a line by line viewport bump that did not modify where my cursor was inserted at. This is much like how scrolling with a mouse ... |
2018/03/07 | 894 | 2,472 | <issue_start>username_0: I want to install openssl version 1.0.2g in docker image so I wrote `Dockerfile`:
```
RUN apt-get update
RUN apt-get install -y build-essential cmake zlib1g-dev libcppunit-dev git subversion && rm -rf /var/lib/apt/lists/*
RUN wget https://www.openssl.org/source/openssl-1.0.2g.tar.gz -O - | ta... |
2018/03/07 | 1,384 | 4,586 | <issue_start>username_0: I am in a beginner C++ course and I am trying to create a program that outputs the 12 days of Christmas song using the two given function calls show\_ordinal(int) and show\_verse(int) as an assignment. It is supposed to call the verse and show the day with it's ordinal suffix and then loop the ... |
2018/03/07 | 1,128 | 3,740 | <issue_start>username_0: I have a dataframe that looks like below:
```
|userid|rank2017|rank2018|
|212 |'H' |'H' |
|322 |'L' |'H |
|311 |'H' |'L' |
```
I want to create a new column called progress in the the dataframe above that will output 1 if rank2017 is equal to rank2018, 2 if... |
2018/03/07 | 600 | 1,935 | <issue_start>username_0: I'm trying to make some code Python 3 compatible. To my understanding, in Python 3, importing a module from the same package must be relative. So if this is the directory structure:
```
/package
/modA
/modB
```
there's a lot of existing code that looks like this (in modA):
```
impo... |
2018/03/07 | 630 | 2,452 | <issue_start>username_0: I have a large network diagram created by vis.js which is 100% wide in the browser and very tall, thus requires scrolling down the page to see it all - I want my page to operate like most other web pages in the world - but vis.js zooms when I scroll, instead of scrolling the page. How do I turn... |
2018/03/07 | 1,088 | 4,049 | <issue_start>username_0: Based on [Is file append atomic in UNIX?](https://stackoverflow.com/questions/1154446/is-file-append-atomic-in-unix) and other sources, it looks like on modern Linux, I can open a file in append mode and write small chunks (< `PIPE_BUF`) to it from multiple processes without worrying about tear... |
2018/03/07 | 1,270 | 4,760 | <issue_start>username_0: I've been reading about metaclasses and I got lost when it came to `type` and `object` classes.
I understand that they are at the top of the hierarchy and they are implemented in C code.
I also understand that `type` inherits from `object` and that `object` is an instance of `type`.
In one o... |
2018/03/07 | 1,057 | 3,769 | <issue_start>username_0: Is there a shorter way to check my random number from 1 - 100 (catNum) against this table of animals? This one doesn't look so bad but I have several more larger tables to work through, I would like to use less lines than I would have to using the statement below:
```
if (catNum < 36) { catego... |
2018/03/07 | 578 | 1,519 | <issue_start>username_0: I have an excel file which has a time input.
```
Mar 01, 2018 | Thursday | 8:00 AM | 5:00 PM
Mar 02, 2018 | Friday | 8:00 AM | 5:00 PM
```
But when my code tries to read those cells, the output becomes a float (for example `8:00 AM` becomes `0.33333333333333`). This is my code
``... |
2018/03/07 | 566 | 1,663 | <issue_start>username_0: I am trying to bin my data based on Age in Tableau. There is a skewed distribution in my age column and I would like to group my data based on percentages. Here is the code that I have:
```
IF [Age]<={FIXED :PERCENTILE([Age],.2)} THEN "<20th"
ELSEIF [Age]<={FIXED :PERCENTILE([Age],.4)} THEN ... |
2018/03/07 | 665 | 2,629 | <issue_start>username_0: im a new python programmer and I recently started learning about @property and the @setter decorators in python. However I am confused about their use in the simplest scripts for example:
```
class Aaron:
def __init__(self,name):
self.name = name
@property
def name(self):
... |
2018/03/07 | 712 | 2,797 | <issue_start>username_0: How to extract the table and it's values using BeautifulSoup? Tried following the bs4 documentation and was having issues finding either the `class` or the `th` values. How can I explicitly get just the `{underReplicatedBlocks}` value from the entire HTML page.
```
Decommissioning
============... |
2018/03/07 | 466 | 1,631 | <issue_start>username_0: I've searched the internet for this answer, but could not find it. Say I had the conditional statement: `totalRooms += bathrooms > 0 ? bathrooms : totalRooms;` but I wanted to have two or three conditions to check if they were true, or if I wanted to have something like an 'or' operator for the... |
2018/03/07 | 823 | 2,448 | <issue_start>username_0: I've got string interview question regarding run-length-encoding and my solution is O(n). Is there any way to improve it:
* input is AABBBCAAEE
* output suppose to be A2B3C1A2E2
```js
const firstString=(str)=>{
const arr = str.split('');
let counter = 1;
let result ='';
for (let i=0; ... |
2018/03/07 | 331 | 1,182 | <issue_start>username_0: How should you specify host and port in the python client library auto-generated by `swagger-codegen`?
The only documentation that I found is [here](https://github.com/swagger-api/swagger-codegen/tree/master/samples/client/petstore/python).<issue_comment>username_1: The target host gets hard-c... |
2018/03/07 | 1,182 | 4,050 | <issue_start>username_0: I'm writing unit test. For testing the method below,
```
public async Task CreateWebJobStatus(string blobId, Guid loggedInUserId, string loggedInUserEmail) {
Guid webJobStatusId = Guid.NewGuid();
WebJobStatus newWebJobStatus = new WebJobStatus
{
WorkJobStatusId = webJobStatusId,
Transa... |
2018/03/07 | 748 | 2,629 | <issue_start>username_0: I have one issue that currently face.
For example as below:
**Activity A**
to
**Activity B**
to
**Activity B**
then in third page, i click back, is go to first page, not go to second page.
i use like below code for go next page in Activity B.
```
Intent intent = new Intent(act, Activity_B.... |
2018/03/07 | 821 | 2,560 | <issue_start>username_0: I want to write a pure Numpy function to change the contrast of an RGB image (that is represented as a Numpy uint8 array), however, the function I wrote doesn't work and I don't understand why.
Here is an example image:
[](ht... |
2018/03/07 | 908 | 3,355 | <issue_start>username_0: **conda** command was working fine from **Anaconda** prompt. I created a new environment for `tensorflow` after which it says - `'conda' is not recognized as an internal or external command,operable program or batch file.`
I have checked all my **PATH** variables, and root, scripts and lib fol... |
2018/03/07 | 1,162 | 3,712 | <issue_start>username_0: Problem: I have a column where each cell has varying lengths and varying sentence structure. If any cell exceeds 1000 characters in length, find the first occurrence of either a [period], [comma], [semi-colon], [colon] to the **right** of the 998th character in the string and replace that chara... |
2018/03/07 | 695 | 2,449 | <issue_start>username_0: I originally had the following code where `it` is a `void**`:
```
while (it != end)
{
*it = *(it + 1);
it++;
}
```
I decided to change `it + 1; it++;` to `++it;` because I was calculating the same value twice.
```
while (it != end)
{
*it = *(++it);
}
```
However, after doing s... |
2018/03/07 | 672 | 2,365 | <issue_start>username_0: The code below redirects none-www to www and subsequently forwards to https://
how can I merge these in one so that I won't have a double redirect.
```
# Redirect non www to www
RewriteCond %{HTTP_HOST} ^mysite.nl$ [NC]
RewriteRule (.*) http://www.mysite.nl/$1 [R=301,L]
# Redirect non https... |
2018/03/07 | 633 | 2,064 | <issue_start>username_0: i have two text files 'simple' and 'simple1' with following data in them
```
simple.txt--
hello
hi hi hello
this
is it
simple1.txt--
hello hi
how are you
[]$ tr ' ' '\n' < simple.txt | grep -i -c '\bh\w*'
4
[]$ tr ' ' '\n' < simple1.txt | grep -i -c '\bh\w*... |
2018/03/07 | 502 | 1,802 | <issue_start>username_0: I am trying to read a file of size around 1GB, from an S3 bucket. My objective is to read the data from the file and send it over to another server.
At the moment when I try to read a large file(1GB) my system hangs up/server crashes. I am able to console out the data of a 240MB file with the ... |
2018/03/07 | 723 | 2,607 | <issue_start>username_0: Laravel has readable log and stacktrace when exception caught, for example:
```none
production.ERROR: Command "test" is not defined.
Did you mean this?
make:test {"exception":"[object] (Symfony\\Component\\Console\\Exception\\CommandNotFoundException(code: 0): Command \"test\" is not defi... |
2018/03/07 | 920 | 3,076 | <issue_start>username_0: Can you help me understand why this code randomly results in memory access violation? Goal is to generate a binary search tree from sorted list.
Stepping through code I noticed a behavior where `node` pointer randomly changes when a recursive calls to `fromSortedArray()` function is returned.... |
2018/03/07 | 164 | 578 | <issue_start>username_0: Trying to drop the primary database "foo", I get the error
>
> ERROR: cannot drop the currently open database
>
>
>
Whats the right way to drop the primary psql database?<issue_comment>username_1: Create a new database to log into while you drop the original one - I guess?
```
create dat... |
2018/03/07 | 272 | 916 | <issue_start>username_0: So you I want grid like this:
```
+-----------------------+
| A |
-------|--------|-------+
| B | C | D |
| | | |
+------+--------+-------+
```
I can do something like this (scss syntax):
```
grid-template-areas: "a-block a-block a-block" "... |
2018/03/07 | 337 | 1,249 | <issue_start>username_0: I have the following html:
```
These are RED words
===================
These are GREEN words
---------------------
### These are more RED words
```
I want:
```
These are RED words
===================
These are GREEN words
---------------------
### These are more RED words
```
In other... |
2018/03/07 | 497 | 1,788 | <issue_start>username_0: I have created the Page, Data Object and Model Admin given below.
**Page**
```
class MyPage extends Page {
private static $db = [];
private static $singular_name = "My Page";
private static $plural_name = "My Pages";
private static $description = 'A page created for testing';
}
```
... |
2018/03/07 | 744 | 2,892 | <issue_start>username_0: My question is this: How do you hold the lock on a parent for the duration that a nested child is active?
I am writing a multithreaded Java application using the Codename One development framework where I have a parent class and a nested child class. The purpose of the child class is to act as... |
2018/03/07 | 608 | 1,788 | <issue_start>username_0: I have this url
`/application-form?targetDate=2018-03-21`
I want to get the string after the equal sign
How to do that?<issue_comment>username_1: You can use [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) for this. It's a parser for query strings.
Here'... |
2018/03/07 | 641 | 1,950 | <issue_start>username_0: So again I am still pretty new to css/html/javascript and I want to add something like this to the bottom of my site that I saw somewhere and it looked intriguing.
[image](https://i.stack.imgur.com/kg5LC.png)
If someone can let me know how to even go about doing something like this or even if... |
2018/03/07 | 1,734 | 6,122 | <issue_start>username_0: I'm making a program in python in which specific instances of an object must be decorated with new functions built at runtime.
I've seen very simple examples of adding functions to objects through MethodType:
```
import types
def foo():
print("foo")
class A:
bar = "bar"
a = A()
a.fo... |
2018/03/07 | 689 | 2,114 | <issue_start>username_0: I have a massive CSV (1.4gb, over 1MM rows) of stock market data that I will process using R.
The table looks roughly like this. For each ticker, there are thousands of rows of data.
```
+--------+------+-------+------+------+
| Ticker | Open | Close | High | Low |
+--------+------+-------+... |
2018/03/07 | 408 | 1,447 | <issue_start>username_0: I have the following tables with the columns:
```
posts: title, user, date, state, city, blog
user: username, name, password, email, city, state, private
```
What I am trying to do is get the total number of records from posts where posts.state = user.state and user.private = 'public'. I tri... |
2018/03/07 | 915 | 3,461 | <issue_start>username_0: I'm looking at the following code on my project and I cant seem to figure out how data is stored in the typedef's below. I am new to C++ so have a limited understanding of typedef's and templates. My searching for a good description of such scenarios has yielded few results.
My thinking is any... |
2018/03/07 | 634 | 2,591 | <issue_start>username_0: I'm trying to implement JSF backing beans using CDI beans as suggested by the depreciation of @ManagedBean and it's scope annotations, but I'm struggling with the right use examples, I'm trying to implement view backing bean with @Model (javax.enterprise.inject.Model) which is @Named @RequestSc... |
2018/03/07 | 838 | 2,444 | <issue_start>username_0: I work on one project with PHP and Mysql and I need to calculate the ages but I need delete the hours, minutes and seconds part. Here is an example:
The date of birth 2018-03-06 17:35:00 but
I need 2018-03-06 00:00:00
Here is my code:
```
function FetchAgeCaduce($MaxDias=3){
$fechaInici... |
2018/03/07 | 614 | 2,242 | <issue_start>username_0: I was reading about the `final` keyword in Java on Wikipedia here (<https://en.wikipedia.org/wiki/Final_(Java)#Final_variables>) and was a little confused by the first sentence. It says:
>
> A final variable can only be initialized once, either via an initializer or an assignment statement.
>... |
2018/03/07 | 813 | 3,638 | <issue_start>username_0: I have a scenario where there is an aggregate endpoint to call multiple downstream systems which are RESTful and gives back the consolidated response from all these systems.
I am currently using a rest template that is configured as a singleton bean and injects it to the corresponding service... |
2018/03/07 | 1,065 | 3,230 | <issue_start>username_0: I'm using [MomentJS](https://momentjs.com/) in my app to determine whether or not a business is currently open.
I store my the hours in the following format:
```
{ open_time: "Thu Jan 01 1970 08:00:00 GMT-0500 (Eastern Standard Time)" },
{ close_time: "Thu Jan 01 1970 23:00:00 GMT-0500 (Easte... |
2018/03/07 | 3,302 | 11,453 | <issue_start>username_0: this is my first post, so sorry if I lack any etiquette. I'm trying to pass a Rectangle object by reference to a function, then double the dimensions using class mutators. I have no syntax errors, it seems I'm just calling the r.setWidth() and r.setHeight() mutators wrong.
I was thinking this ... |
2018/03/07 | 3,279 | 12,061 | <issue_start>username_0: I'm using ViewPager and TabLayout with 5 fragment. My code showed if I click a button which in first or third fragment, data in second fragment. But ViewPager already makes previous and next page, so second fragment doesn't update directly. Second fragment has ListView and shows data in regular... |