date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/02/25 | 1,136 | 3,442 | <issue_start>username_0: How would you code a map so that the initial character of each word maps to the full word?
Considering a wordlist that contains:
* albert
* ben
* alice
* cecilia
The output should be `{a=[albert,alice], b=[ben], c=[cecilia]}`
This is what I have right now but I don't understand how to map... |
2018/02/25 | 562 | 2,330 | <issue_start>username_0: I have a huge issue. For some reason, I am unable to import almost any plug-in into my Unity project. Whenever the import finishes, I get the Resolving Android Dependencies screen, which never actually resolves the issue. I recently got this issue when I imported the Unity Mediation Plug-in and... |
2018/02/25 | 510 | 2,217 | <issue_start>username_0: I am using the AWS command line to upload files to an S3 bucket located in the us-east-1 region. I configured the command line to use the us-west-1 region since I am closer to that region. I am able to upload and download files without specifying the same region. The transfer speed is faster fo... |
2018/02/25 | 690 | 2,592 | <issue_start>username_0: I'm having difficulty figuring out what's wrong with my BMI calculator. When I enter in a BMI that is less than 10 they show up as obese. If I enter anything above 10, it shows up as underweight. Any help would be appreciated.
This picture is an example of my problem:
[
And I have a spring boot project with the following dependencies:
```
org.springframework.boot
spring-boot-starter-data-jpa
org.springframework.b... |
2018/02/25 | 1,112 | 3,473 | <issue_start>username_0: Looking a c++ code somewhere in the net, I noticed a piece of code like this
```
opts.addOptions()(cOSS.str(), m_list, XYentry());
```
I really impressed of how this code is implemented and of course I wondered how it works.
So I tried to replicate this type of calling :
```
#include "st... |
2018/02/25 | 540 | 1,795 | <issue_start>username_0: I need to delete path DCIM internal in the Android.
I have this code
```
File dir = new File("root path");
FileUtils.deleteDirectory(dir);
```
But FileUtils does not work.
Can anybody help me to write the correct code?<issue_comment>username_1: Your statement
```
t1.addOption... |
2018/02/25 | 514 | 1,714 | <issue_start>username_0: why it is necessary to ignore node\_modules from git repo?
The other users who will use my code from repo ,don't they will need my node\_modules folder ?<issue_comment>username_1: Your statement
```
t1.addOptions()(5,5);
```
basically works like this:
```
{
mypair temp_variable = t1.a... |
2018/02/25 | 1,163 | 4,247 | <issue_start>username_0: I have implemented simple neural networks with R but it is my first time doing so with Keras so would appreciate some advice.
I developed a neural network function in Keras to predict car sales (the dataset is available [here](https://github.com/allmydatasets/datasets/blob/master/cars.csv)). *... |
2018/02/25 | 765 | 2,128 | <issue_start>username_0: I have a pandas data frame that defines my bag of word indices and counts like this.
```
id word_count word_idx
15213 1 1192
15213 1 1215
15213 1 1674
15213 1 80
15213 1 179
307 2 103
307 1 80
307 ... |
2018/02/25 | 1,442 | 4,137 | <issue_start>username_0: From the [docs for Ruby v2.5](http://ruby-doc.org/core-2.5.0/Enumerator.html#method-i-feed)
```
e = [1,2,3].map
p e.next #=> 1
e.feed "a"
p e.next #=> 2
e.feed "b"
p e.next #=> 3
e.feed "c"
begin
e.next
rescue StopIteration
p $!.result #=> ["a", "b", "c"]... |
2018/02/25 | 865 | 3,283 | <issue_start>username_0: I'm getting error with processing URL with scrapy 1.5.0, python 2.7.14.
```
class GoodWillOutSpider(Spider):
name = "GoodWillOutSpider"
allowded_domains = ["thegoodwillout.com"]
start_urls = [GoodWillOutURL]
def __init__(self):
logging.critical("GoodWillOut STARTED.")
def parse(self, re... |
2018/02/25 | 681 | 2,603 | <issue_start>username_0: I'm booting up on Kotlin and looking to configure an `Array` of `Label`s in the pattern of a builder syntax. I came up with the Kotlin standard library function (`apply`) combined with a helper function on collections (`forEach`). Is it correct to refer to this as builder pattern? What that mea... |
2018/02/25 | 679 | 2,353 | <issue_start>username_0: Let's say I have the following simple `data.frame`:
```
ID value
1 1 3
2 2 4
3 1 5
4 3 3
```
My desired output is below, where we add a `value` to `cumsum` or we update it according to the latest `value` of an already used `ID`.
```
ID value cumsum
1 1... |
2018/02/25 | 535 | 1,885 | <issue_start>username_0: I'm writing kivy app and resently I faced with a problem of unlimited inputing text in TextInput widget. Is there any solution to this problem?<issue_comment>username_1: A possible solution is to create a new property and overwrite the insert\_text method:
```
from kivy.app import App
from kiv... |
2018/02/25 | 1,206 | 4,382 | <issue_start>username_0: I am using importlib to import modules at runtime. These modules are plugins for my application and must implement 1 or more module-level functions. I have started adding type annotations to my applications and I get an error from mypy stating
>
> Module has no attribute "generate\_configurat... |
2018/02/25 | 306 | 1,217 | <issue_start>username_0: I am new to typescript and this might be something very trivial. Please help.
I am trying to extract minutes and seconds from typescript Date variable.
I have a variable timestamp declared as Date. But when I try to use functions on it like toDateString() or getMinutes() or getTime(), I get th... |
2018/02/25 | 602 | 1,981 | <issue_start>username_0: In [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes) polyfill function for `Array.prototype.includes()`, I found the following code.
```
function sameValueZero(x, y) {
return x === y || (typeof x === 'number' && typeof y === 'number' && ... |
2018/02/25 | 518 | 1,956 | <issue_start>username_0: I am new to AWS.
I created a Linux free tier instance and its up and running as i am able to access it via ssh putty as i am a windows user.
Now, I wanted to RDP the Linux Instance to see the interface but i am unable to do so. I am unable to find any option for that.
As per my understanding ... |
2018/02/25 | 500 | 1,686 | <issue_start>username_0: So, the standard factorial function in python is defined as:
```
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x-1)
```
Since n! := n \* (n-1) \* ... \* 1, we can write n! as (n+1)! / (n+1). Thus 0! = 1 and we wouldn't need that if x == 0. I tried to write that... |
2018/02/25 | 528 | 1,844 | <issue_start>username_0: I have been searching for an hour with no success so hope one of you will have pity. I am using Xcode 9 and Swift 4.
```
textIt.text = name
```
Works perfectly and I have used it in my app but
```
name = textIt.text
```
brings up the error code:
>
> Value of optional type 'String?' not ... |
2018/02/25 | 908 | 3,568 | <issue_start>username_0: I have a Xamarin form application that creates a Sqlite database.
`Microsoft.EntityFrameworkCore.Sqlite` is used to create the database. I want to add a password to the file. I searched the internet, but unfortunately I can't find any obvious way. On StackOverflow, there are some questions th... |
2018/02/25 | 4,036 | 6,818 | <issue_start>username_0: ```
import re
response_text = '{"captchaData":"/<KEY>","captchaMime":"image/jpeg","captchaToken":"<KEY>","status":"CAPTCHA"}'
love = '"captchaData":"mydata"'
session_token_temp = re.search(r'(\"captchaData\":\")(\w*)',
response_text).group()
session_token = str(session_token_temp)
```
i want... |
2018/02/25 | 987 | 2,726 | <issue_start>username_0: How would you store a multi-line input into an list?
For example:
```
3
2 1
1 1 0
2 1 1
4 3 0 1 2
2
1 2
1 3
```
How would I take that input and store it as a list like so:
```
examList = [
[3],
[2,1],
[1,1,0],
[2,1,1],
[4,3,0,1,2],
[2],
[1,2... |
2018/02/25 | 1,184 | 3,622 | <issue_start>username_0: I have 'location search' functionality on my website, where I can search locations. For example if I search for 'new york' I get the result, but if I search for the location by the first word 'l' or using the word 'new' or missing any character from the word 'new york' , I get nothing.
the JS:... |
2018/02/25 | 1,032 | 2,866 | <issue_start>username_0: Given an array, int[] arr, I want to find int[] dist such that dist[k] is the largest distance between 2 consecutive numbers less than k. Hopefully, this should perform in faster than O(n log n).
For instance, if my array is `[3, 8, 5, 6, 9]`, dist[6] should be 2 because 3 is at position 0 an... |
2018/02/25 | 809 | 2,221 | <issue_start>username_0: How can I check to see if a list contains a string that itself does not contain any digits? The list in question will have a string with letters or digits and an integer.<issue_comment>username_1: We can look up in `O(log n)` time for arbitrary `k` (or `O(1)` time for pre-listed `k`) with `O(n ... |
2018/02/25 | 2,772 | 10,827 | <issue_start>username_0: I have a setup.exe file generated using installshield suite project (.issuite) file. For an admin or a general user with sufficient privileges, one of our IT admin is able to do a silent installation using -
```
setup.exe /silent
```
However, when tried to push the installs using SCCM (Sys... |
2018/02/25 | 851 | 2,896 | <issue_start>username_0: I am running my web app at `abc.com` with apache as the web server.
I have some static pages hosted on SquareSpace... eg. `abc.squarespace.com/landing`
I want to configure apache to serve content from `abc.squarespace.com` when it get's a request for `abc.com/landing`
I've done this in nginx... |
2018/02/25 | 851 | 2,917 | <issue_start>username_0: Its been bugging me for a day now and I don't know how to do this because I'm still new to java and android. I have this code that has a if and else if statement in a for loop. Now the problem is that if the 1st condition is true it will also execute the other condition below the 1st which is n... |
2018/02/25 | 1,262 | 4,457 | <issue_start>username_0: I am new to swift and Xcode and I have been progressing along with an app that has tableview (of employees with first name space last name) created using a plist dictionary used as NSarray. I am trying to add a search feature.
Here is my code:
var employeeSearch = Array>()
```
let searchCont... |
2018/02/25 | 1,012 | 3,527 | <issue_start>username_0: *NB I'm new to programming and this is my first post so please excuse any misleading code or confused terminology etc.*
I'm playing around with bootstrap cards on a blog template and I'm trying to separate two rows so that the height of an element in the first row doesn't affect the position o... |
2018/02/25 | 502 | 2,037 | <issue_start>username_0: I am building a retail website. In my product list page, I'm listing each product as a block (3 blocks per row). Inside each block, I want to show details like name, price, sale price, etc. I also want an "Add to Cart" button inside each block where if the user clicks on it, I will use a JS fun... |
2018/02/25 | 1,035 | 3,387 | <issue_start>username_0: first of all, thank you for reading my question!
I am looking to add a background color, a gradient more specifically, to a Vue page. Not all pages, but just one. But when I write this in components/Frontpage.Vue
```
html {
background: linear-gradient(45deg, #17ead9, #6078ea);
height: 100... |
2018/02/25 | 478 | 1,249 | <issue_start>username_0: I have to calculate mean of each matrix of an n dimension of array. As I am new in R can anyone help me.
For example
```
M = 4
m = array(1:10, dim= c(10, 1, M))
m
z = matrix(NA, M,1)
for (i in 1:z){
for (j in 1:z){
z[i, j] = mean(m[ , , i])
}
}
z
```
I tried above way but its incorrect<issue... |
2018/02/25 | 635 | 1,902 | <issue_start>username_0: ```js
var s = "Hello! I'm billy! what's up?";
var result = s.split(" ").join();
console.log(result);
```
Got this result
```
Hello!,I'm,,billy!,what's,,,,up?
```
How can i get rid of this annoying extra spaces between string? So it might look like this.
```
Hello!,I'm,billy!,what's,u... |
2018/02/25 | 675 | 2,376 | <issue_start>username_0: This is a HW assignment, so please no exact answers if you can help it; I want to learn, not have it done for me.
(The create table statments are at the end of this post)
My task is to find all of the actors who have been in a movie with <NAME>, ordered by movie title, using 2 queries.
So fa... |
2018/02/25 | 594 | 1,833 | <issue_start>username_0: community - this is my first post, so please forgive me if I failed to properly display this message. I am trying to add commas as depicted below in the test cases. It appears there are more efficient ways than what I have coded below; however, I would like to solve the problem using my code be... |
2018/02/25 | 518 | 1,787 | <issue_start>username_0: I'm trying to create a Dounught chart with ChartJS:
```
$(function() {
//...
drawChart();
});
function drawChart() {
var ctx = document.getElementById("currenciesTag").getContext("2d");
new Chart(ctx, {
type: 'doughnut',
data: {
labels: ['Label1',... |
2018/02/25 | 689 | 2,150 | <issue_start>username_0: I use intrinsics so I need to use memory alignment.
By this reason I always code like:
```
float* data = (float*) _mm_malloc(sizeof(float)*3, 64);
```
But in some cases I have arrays with mixed content. So some parts are aligned and some not.
I tried to use simple test `data%64 == 0` but co... |
2018/02/25 | 1,169 | 4,005 | <issue_start>username_0: I have code like this:
```
class First
{
public int a { get; set; }
public int b { get; set; }
public int c = 2;
public _second;
public First()
{
_second = new Second(c);
this.a = _second.a;
this.b = _second.b;
}
}
class Second
{
public... |
2018/02/25 | 199 | 680 | <issue_start>username_0: How do I target a specific input by its class name and value?
```
```
Target className something + value 2:
```
$('target classname = something, value = 2').prop('checked', true);
```<issue_comment>username_1: ```
$('input[class=something][value=2]').prop('checked', true);
```
```js
$('i... |
2018/02/25 | 604 | 2,018 | <issue_start>username_0: I built a personal website using [Hugo](https://gohugo.io/) and I like the way it turned out with one exception: all of the elements are just a bit too large. Zooming in the browser is able to smoothly reduce the scale of all components globally, and the website at 75% zoom looks much better to... |
2018/02/25 | 630 | 2,198 | <issue_start>username_0: In my Ionic app I need to destroy/unsubscribe the Observable. In view I am using **Async Pipe**. I know unsubscribe is not a function of Observable but I need a way to do that. I just want when user logout or page leaves then Observable destroyed or unsubscribe.
Below is my code.
```
cartRef: ... |
2018/02/25 | 1,291 | 4,424 | <issue_start>username_0: Using Electron and Node.js to write a simple user interface to a process that generates data, and then allows the user to call gnuplot to show the data. Here is the code in main.js that calls gnuplot (gnuplot5-qt).
```
var menu = Menu.buildFromTemplate([
{
label: 'Run Graph',
cli... |
2018/02/25 | 1,012 | 3,595 | <issue_start>username_0: I am trying to work on quiz with multiple answers but I don't want to display the same questions twice, as there are 4 possible answers.
How can I delete an item from an array after using math random?
```
var answers = ['apple', 'banana', 'orange', 'kiwi'];
document.getElementById("first... |
2018/02/25 | 994 | 3,178 | <issue_start>username_0: <https://gyazo.com/07bafa5de65bfbfc8d523d1e5eaa0fbf>

I have some data A1:G5 and i want to find latest fee from specific transactions (in WHERE -> FROM, Currency )
I have timestamp:
```
=QUERY(A1:G5, "SELECT MAX(A) WHERE F = 'Aaaa' AND C = 'PLN' ... |
2018/02/25 | 826 | 2,487 | <issue_start>username_0: When inspecting the table I get
```
```
so I tried the following in Python:
```
r = requests.get("https://en.wikipedia.org/wiki/Comparison_of_Intel_processors")
x = bs.BeautifulSoup(r.content)
x.find_all("table",{"class":"wikitable sortable jquery-tablesorter"})
```
However, I get an empt... |
2018/02/25 | 366 | 1,366 | <issue_start>username_0: So I'm using Delayed::Job for part of my Rails project and what's extremely frustrating and confusing is that the job isn't running at the specified time. I have a feeling because it's scheduling the jobs to run at UTC time instead of CST.
In my `config/application.rb` file I have the followin... |
2018/02/25 | 824 | 2,538 | <issue_start>username_0: I have this HTML:
```
TITLE ONE
TITLE TWO
TITLE THREE
```
Now, I want to modify `TITLE TWO` and `TITLE THREE` `spans` only and leave the first as it is, but I cannot get it to work. This is what I have tried:
```
.holder {
&:not(:first-child) {
&__title {
display:none... |
2018/02/25 | 1,478 | 3,828 | <issue_start>username_0: I have following set of data.
```
set = [('john', 'm', 23), ('maria', 'f', 17), ('john', 'm', 45),
('stacy', 'f', 19), ('stacy', 'f', 21), ('mary', 'f', 32)]
```
I want my output to look like:
```
John: m(23) m(45)
Maria: f(17)
Stacy: f(19) f(21)
```
Right now my output looks li... |
2018/02/25 | 460 | 1,551 | <issue_start>username_0: I have a logo created from Inkscape,the font which is used in the logo was installed in the local system.
In other system, the font may not exist. I want to embed the font and use that font in svg. I have tried this but no luck,what is that I am doing wrong?
```
<![CDATA[
@font-face {
font-... |
2018/02/25 | 1,944 | 6,620 | <issue_start>username_0: ive written the following as a program in order to convert a pointer with a sequence of integers as its adress into an integer number:
```
#include
#include
char \*recepcao() { char \*receber;
scanf("%s", receber);
return receber;
}
int conversao(char \*string) { int i, j;
for(i=0; stri... |
2018/02/25 | 2,580 | 9,168 | <issue_start>username_0: I am very much pulling my hair out after searching around on Google and this website for a very long time, and cannot seem to do this basic task (Java was very simple) but with PHP I'm having such a hard time.
Can somebody please tell me what I am doing wrong. All I want is the Job class to be ... |
2018/02/25 | 2,719 | 9,595 | <issue_start>username_0: I have three tables
```
CREATE TABLE "ingredient" (
"id" INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1, INCREMENT BY 1) PRIMARY KEY,
"ingredient" VARCHAR(50) NOT NULL
);
CREATE TABLE "pizza" (
"id" INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1, INCREMENT BY 1) PRIMARY KE... |
2018/02/25 | 793 | 2,329 | <issue_start>username_0: I am adding edges to a simple weighted directed graph (from *SimpleWeightedDiGraph()* that is part of *LightGraphs* package) in *Julia*. Some of the arcs are "free" (null weight). However, when specifying the weight of 0 it is not added as a new edge and a shortest path problem does not include... |
2018/02/25 | 900 | 2,698 | <issue_start>username_0: There are some assignments in <NAME>'s Java book, where it asks you to write some code to reverse the order of a word that is entered. I came up with the following and am wondering if I could be able to optimize it as it seems a little heavy:
```
public static void main(String[] args) {
Strin... |
2018/02/25 | 1,174 | 4,778 | <issue_start>username_0: This is my first question to Stackoverflow, although I have been a consumer for many years. Please forgive me if I break rules. That is certainly not my intent. I have strenuously reviewed the rules and believe I am within the bounds of acceptability. However, I would ask that you kindly point ... |
2018/02/25 | 1,278 | 4,880 | <issue_start>username_0: I was beginning to think that I was getting good at VB.net, but not this one has me stumped.
Code looks something like this
```
Public Class MyServer
.....
Public myMQTTclient = New MqttClient("www.myserv.com")
.....
Private Sub Ruptela_Server(sender As Object, e As EventArgs) Handle... |
2018/02/25 | 601 | 2,290 | <issue_start>username_0: I recently decided to try to install tesseract onto my computer and ran `pip3 install tesseract-ocr`.
It then started to download `cython` which alerted me to the fact that `tesseract-ocr` was not what I wanted, so I hit CTRL-C to cancel the command.
However, it appears that there is still a ... |
2018/02/25 | 1,191 | 3,684 | <issue_start>username_0: I am trying to run my react app with docker, when I run the container, everything seems fine but I can't access it on localhost (or 127.0.0.1). Here is my configuration:
Dockerfile:
```
FROM node:carbon
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json /usr/src/app
RUN npm ... |
2018/02/25 | 440 | 1,421 | <issue_start>username_0: I happened to encounter the following sql statement
```
DECLARE @SDate DATETIME
DECLARE @TDate DATETIME
SET @SDate = '2011-9-01 00:00:00.000'
SET @TDate = '2011-10-01 00:00:00.000'
;WITH CTE AS
(
SELECT @SDate Date
UNION ALL
SELECT Date + 1 FROM CTE WHERE Date + 1 <= @TDate
)
SELEC... |
2018/02/25 | 431 | 1,513 | <issue_start>username_0: I’m trying to dynamically update a workbook name in a formula in excel to bring through data from a continually changing source file.
So far I have been getting by with using an indirect formula, but now I have a huge workbook with around 216,000 cells to populate and I don’t think indirect is... |
2018/02/25 | 1,085 | 2,831 | <issue_start>username_0: I have a strings like :
```
myString = "2 word1 & 4 word2"
myString = "4 word2"
myString = "2 word1"
```
I would like to get the number before the word1 and the number before word2
```
number1 = 2
number2 = 4
```
How can i do with a regular expression in R
I tried something like this but... |
2018/02/25 | 1,181 | 3,362 | <issue_start>username_0: Below are the `buildTypes` and `flavors` parts of my build.gradle:
```
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
applicationIdSuffix '.debug'
versionNameSuff... |
2018/02/25 | 1,383 | 4,543 | <issue_start>username_0: Here's the function:
```
comboGraph :: [a] -> Int -> [b]
comboGraph _ 0 = []
comboGraph [] _ = []
comboGraph (x:xs) n =
(buildEdges x xs) : comboGraph xs n
where buildEdges h t = (h, comboGraph t (n-1))
```
Ths function takes in a list of type `a`, a number, and returns a list of t... |
2018/02/25 | 1,212 | 4,229 | <issue_start>username_0: I've made an empty view controller wrapped in a navigation controller, and added a search bar using the `navigationItem.searchController`. A weird thing though, when tapping the search bar the animation works well but the navigation bar dims down as the entire screen.
This is NOT how it works... |
2018/02/25 | 1,144 | 3,772 | <issue_start>username_0: Okay,
Say i have 2 points with x,y coordinates,
```
a<-c(1,1)
b<-c(10,10)
```
Now i want to find which point above is closest to my new point,
```
ce<-(2,2)
```
There has to be a function out there, but knn is too complex for this.<issue_comment>username_1: To make the issue a bit more e... |
2018/02/25 | 1,089 | 3,685 | <issue_start>username_0: Is there a similar function to Turbo Pascal's `assign(out f:file, const Name)` function which assigns a name to a file in c++ without opening the file?<issue_comment>username_1: To make the issue a bit more evident, let's substitute the definition of `buildEdges` in the final case of your defin... |
2018/02/25 | 301 | 1,233 | <issue_start>username_0: Is it possible to configure security for actuator endpoints of a Spring application with Spring Security in a generic way?
According to <https://github.com/spring-projects/spring-boot/issues/8646> I need to do this in my custom Spring Security configuration.
But suppose I have both a custom r... |
2018/02/25 | 684 | 2,185 | <issue_start>username_0: I was trying to implement a simple binary tree in C++, however pointers are giving me troubles. Despite me never allocating a struct for a pointer, it does not evaluate as NULL, and as such, never is actually allocated and everything breaks.
The code:
```
#include
#include
#include
using ... |
2018/02/25 | 2,259 | 6,081 | <issue_start>username_0: How would you define a pointer to a XMM register in asm()?
Like accessing array elements in a loop how can you access registers in asm using a counter?
I tried to do it in the following code:
```
float *f=(float*)_aligned_malloc(64,16);
for(int i=0;i<4;i++)
asm volatile
(
"... |
2018/02/25 | 971 | 3,386 | <issue_start>username_0: I am successful using Postman doing a post for authentication. However, I can't seem to get it to work from C# and am getting a 401 error. The password and username are verified the same as in Postman. How can I do it?
Here is my code:
```cs
var url = AppConstants.ApiLoginUrl;
var uriRequest ... |
2018/02/25 | 669 | 2,177 | <issue_start>username_0: In Windows 7, running php.exe from `C:\wamp64\bin\php\php5.6.25\php.exe`,
I find that the following *prints the PHP usage instructions*.
`echo 4;|php -r` <-- prints php usage instructions
```
C:\wamp64\bin\php\php5.6.25>echo 4;|php -r
Usage: php [options] [-f] [--] [args...]
php [options] ... |
2018/02/25 | 638 | 2,294 | <issue_start>username_0: I'm trying to get change detected in `textarea` element, but my JavaScript doesn't work, though it should be working. There are numerous examples done just like this in StackOverflow and I can't figure the problem out.
popup.js:
```
document.getElementById('pasteBox').addEventListener('change... |
2018/02/25 | 487 | 1,600 | <issue_start>username_0: I can't understand some thing, namely as we know we can pass to `docker run` argument `-e SOME_VAR=13`.
Then each process launched (for example using `docker exec ping localhost -c $SOME_VAR=13`) can see this variable.
How does it work ? After all, enviroment are about bash, we don't launc... |
2018/02/25 | 462 | 1,698 | <issue_start>username_0: I want to find the first member of a dictionary which satisfies certain condition and then get some properties from the found item. My concern is what if no item is found. Consider this code:
```
Dictionary dict;
....
....
var foundPair = dict.Select(i => new { i }).FirstOrDefault(somePredicat... |
2018/02/25 | 808 | 2,826 | <issue_start>username_0: I'm learning Python and I'm trying to write a simple bookstore program using functions and user input. It takes parameters (book, price) and prints *"order: ' your book choice' costs 'x dollar' "* but I can't get it to work. Could you check out my code and help me out?
```
def book_store(book... |
2018/02/25 | 290 | 1,024 | <issue_start>username_0: I am trying to create a simple FPS character. I add a camera to character's head and faced with a problem: when I change animation to aim with rifle, character's camera becames not parallel to horizon. How can I reduce that angle?
[) build was working perfectly up until I wanted to test on my iPhone, so I stopped my server, did a `ionic serve --address localhost`, and I noticed that my stylesheet wasn't loading anymore... so I killed the server again wen... |
2018/02/25 | 1,149 | 4,196 | <issue_start>username_0: I've a horizontal stackview with 3-subviews (a image view, a button and another button with an image) as shown below,
```
view
stackview
imageview
button
button
or
image|button|button
```
I would like to add a transparent button to this stackview covering all three views so ... |
2018/02/25 | 447 | 1,762 | <issue_start>username_0: I am new to angular and material 2, I am using material date picker in my form to display and select the date. I am able to select the date and bind to ngModel. But when I try to bind my response to ngModel showing nothing. I have converted my string date to date and then binding to ngModel. Be... |
2018/02/25 | 1,736 | 5,800 | <issue_start>username_0: Am getting a JSON in
```
{
"segment": {
"134": "34",
"154": "342"
}
}
```
all I am trying to do is map the keys as value i.e convert it into format like
```
{
"segment ": [{
"segmentationStrategyId ": 134,
"segmentID ": 34
}, {
"... |
2018/02/25 | 701 | 2,636 | <issue_start>username_0: So I'm supposed to draw a mountain using a for-loop, using if statements to decide what character to use. This what I did initially.
```
for (int y = intMaxHeight; y >= 0; y--){
for (int x = 0; x < arr.length; x++){
double height = arr[x];
if (y == 0){
... |
2018/02/25 | 398 | 1,897 | <issue_start>username_0: does same functionality can be achieved by writing chaincode with javascript in hyperledger composer as writing chaincode with go in Hyperledger fabric?
and What are the limitations and benefits of writing chaincode in JS as compared to writing in go ?<issue_comment>username_1: The short answe... |
2018/02/25 | 414 | 1,562 | <issue_start>username_0: Hi This firebase function use to work, but know its now longer working and I'm getting this error message
>
> Function returned undefined, expected Promise or value
>
>
>
```
exports = module.exports = functions.analytics.event('first_open').onLog((event) => {
const payload = {
not... |
2018/02/25 | 690 | 2,855 | <issue_start>username_0: I have written a scala stream application. My objective is that if during the stream processing an item encounters an error during processing, then the stream ignores it and continues processing the remaining items.
Towards this goal, I wrote this code
```
object StreamRestart extends App {
... |
2018/02/25 | 1,049 | 3,626 | <issue_start>username_0: ```
import System.IO.Unsafe
main :: IO ()
main = do
_ <- return $ unsafePerformIO $ do
print "test2"
print "test"
```
The above only outputs `test` (when run via `runghc`), I'm assuming due the lazy nature of Haskell that the first IO action does not actually get evaluated. How can I... |
2018/02/25 | 569 | 2,394 | <issue_start>username_0: I'm currently working on an selfmade Editor. The "Open" and "Save as" JMenu's are already set and appear when I start the program. The problem is they don't react on my clicking. I think there's a problem in the ActionListeners I'm missing.
```
savebtn.addActionListener(new ActionListener() {
... |
2018/02/25 | 517 | 1,820 | <issue_start>username_0: Given two N length arrays, find the N length combinations of those arrays giving precedence to the elements of the B array.
For example, given the input of arrays `A: [1,2,3]` and `B: [4,5,6]`
`Fun(A,B)` could yield:
`[4, 5, 6] -> contains 3 from the B array
[4, 5, 3] -> contains 2 from the B... |
2018/02/25 | 1,423 | 4,402 | <issue_start>username_0: I've been struggling for a few days to come up with code that follows the pseudo-code below to count the number of inversions of an unsorted list of permutation numbers. I need the algorithm to run in O(nlogn) time but I can only think of a solution in O(n^2logn) time.
More specifically I woul... |
2018/02/25 | 807 | 3,005 | <issue_start>username_0: I wanted to know if there is anything like "`BeforeLastIndexOf`". I'm new to c# and don't really know how "`LastIndexOf`" and "`IndexOf`" works. What I'm trying to achive is that for example the user types in a directory and it deletes from the string the last folder of this directory but usual... |
2018/02/25 | 1,097 | 4,663 | <issue_start>username_0: I have an `onClick()` method with a `Thread` inside that. The simplified structure is the following.
```
imageA = (ImageView) findViewById(R.id.imageA);
imageA.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {myThread.start();}
});
Thread myThrea... |
2018/02/25 | 1,011 | 3,303 | <issue_start>username_0: I am trying to use cx\_oracle executemany to bulk insert rows into an Oracle database table.
My problem is executemany is 'skipping' certain fields without throwing an error and I'm tearing my hair out trying to understand why.
The values I want to insert are stored in a list:
```
print (... |
2018/02/25 | 1,612 | 6,060 | <issue_start>username_0: I have a long string of farmAnimals that looks like this: it has \n\n\n and a \t in front of the Farm Animals
```
Farm Animals
F
M
Total
Cow
11
10
... |
2018/02/25 | 623 | 2,067 | <issue_start>username_0: I got a task from my professor. The deadline is already over, but I am curious what the solution could be.
I had to make a function which creates a geometric progression.
It has three arguments, **x0** - the initial value -, **q** - the common ratio -, and **N** - number of elements.
The funtio... |
2018/02/25 | 731 | 2,685 | <issue_start>username_0: I want to put a file into a QR code.
I saw that there is an android app which does that [Zapya](https://play.google.com/store/apps/details?id=com.dewmobile.kuaiya.play&hl=ro)
My question is **how do they do it? Or how can I do it?**
From my searches I found that QR codes are for text but a fil... |
2018/02/25 | 725 | 2,611 | <issue_start>username_0: I am working on a Rails application whose HAML templates frequently make use of a routine called `sanitize`. I have deduced from context that this routine sanitizes user-controlled HTML. Example:
```
# views/feed_items/_about.html.haml
%h3 Summary:
.description
= sanitize @feed_item.descript... |
2018/02/25 | 729 | 2,733 | <issue_start>username_0: Is it possible to set a series of global properties (such as social media usernames) that are available to all page views in OctoberCMS rather than having them associated to one CMS page or Static Page at a time?
For example, being able to use `{{ twitter_username }}` in any template, but it w... |