date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/09 | 441 | 1,715 | <issue_start>username_0: I can define a function
```
func myGenericFunc(\_ a: A) -> A { ... }
```
Now I want to type a variable to hold exactly this kind of function, but I find I can't spell the type:
```
let f: (SomeProtocol) -> SomeProtocol // doesn't express the genericity
let f: (A) -> A // non-existent syntax... |
2018/03/09 | 1,690 | 5,756 | <issue_start>username_0: I have list of `Entry` objects. `Entry` is a:
```
class Entry {
private final Date date;
private final String value;
// constructor
// getters
}
```
I need to group these entries *by day*. For example,
```
2011-03-21 09:00 VALUE1
2011-03-21 09:00 VALUE2
2011-03-22 14:00 VALUE3
... |
2018/03/09 | 1,844 | 5,225 | <issue_start>username_0: I've been reading about the following solutions here, but it only works for one IP Address only. I'm not able to print the rest of the IPs (multiple network/wireless cards).
**References**
1. <http://net-informations.com/python/net/ipadress.htm>
2. [Finding local IP addresses using Python's s... |
2018/03/09 | 953 | 3,487 | <issue_start>username_0: I have a problem where a Console app window is not showing during debugging when there is also a .NET Core web app inside the same solution. The console app code runs fine, just no black console window.
Visual Studio: Version 15.5.6
Microsoft .NET Framework: Version 4.7.02556
Console App: Tar... |
2018/03/09 | 1,685 | 6,534 | <issue_start>username_0: I am trying to get a [Spring Cloud Netflix Feign](https://cloud.spring.io/spring-cloud-netflix/multi/multi_spring-cloud-feign.html) client to fetch a bit of JSON over HTTP and convert it to an object. I keep getting this error instead:
>
> org.springframework.web.client.RestClientException: C... |
2018/03/09 | 2,052 | 6,974 | <issue_start>username_0: So what I try to do is change the alignment of the text based on a select input.
Here is the text which I would like to change with it
```js
/** Change font-alignment */
function changeFontAlignment(fontAlignment) {
var columns = document.querySelectorAll('.column');
if (fontAlignment... |
2018/03/09 | 864 | 3,198 | <issue_start>username_0: I have designed a model in Neo4j in order to get paths from one station to another including platforms/legs involved. The model is depicted down here. Basically, I need a query to take me from NBW to RD. also shows the platforms and legs involved. I am struggling with the query. I get no result... |
2018/03/09 | 380 | 1,207 | <issue_start>username_0: so i am using lodash `.get` to copy some array from my database to create a excel documents by using this
```
object[key.key] = _.get(item, key.key, '-');
```
where `key` is set of array and `key.key` is set of array column name or field name. it works fine replacing undefined value from dat... |
2018/03/09 | 644 | 1,954 | <issue_start>username_0: I have a csv file that is very big, containing a load of different people. Some of these people come up twice. Something like this:
```
Name,Colour,Date
John,Red,2017
Dave,Blue,2017
Tom,Blue,2017
Amy,Green,2017
John,Red,2016
Dave,Green,2016
Tom,Blue,2016
John,Green,2015
Dave,Green,2015
Tom,Blu... |
2018/03/09 | 635 | 1,731 | <issue_start>username_0: I have a Dataframe with a Column of Array Type
For example :
```
val df = List(("a", Array(1d,2d,3d)), ("b", Array(4d,5d,6d))).toDF("ID", "DATA")
df: org.apache.spark.sql.DataFrame = [ID: string, DATA: array]
scala> df.show
+---+---------------+
| ID| DATA|
+---+---------------+
| a|[1.0, 2.0... |
2018/03/09 | 427 | 1,479 | <issue_start>username_0: Why this does not compile? I get the following error in the `Success` and `Failure` lines:
>
> constructor cannot be instantiated to expected type; found :
> scala.util.Success[T] required: Int
>
>
>
And the code:
```
val future = Future { 1 }
future.map {
case Success(s... |
2018/03/09 | 2,221 | 7,880 | <issue_start>username_0: I'm trying to implement the algorithm in the [title](https://en.wikipedia.org/wiki/Peterson%27s_algorithm), but at the moment is not working correctly:
```
package me.fponzi.mutex;
import java.util.concurrent.atomic.AtomicInteger;
public class PetersonLockUnlock implements MutexInterface {
... |
2018/03/09 | 402 | 1,296 | <issue_start>username_0: Created a new clean Scala project using Gradle.
This is the only dependency:
```
compile "org.scala-lang:scala-library:2.12.4"
```
When building on the command line `./gradlew build` works perfectly fine. However, when using IntelliJ it gives me this warning:
```
Error:scalac: 'jvm-1.9' is... |
2018/03/09 | 420 | 1,444 | <issue_start>username_0: [](https://i.stack.imgur.com/p0bSi.png)
[](https://i.stack.imgur.com/ZUNO9.png)
I use all the methods available on google but nothing worked. Same issue is s... |
2018/03/09 | 839 | 3,537 | <issue_start>username_0: I have a retail WebSite built with MVC. Calls are made to a REST WebAPI service to provide basic CRUD operations. I want to create a shared DLL that I can reference between the website and the API. That DLL would contain the models (that match my DB table structure) and the code to perform the ... |
2018/03/09 | 1,373 | 4,354 | <issue_start>username_0: I have the following XUnit test in a project created with `dotnet new xunit`:
```
type Scenarios(output : ITestOutputHelper) =
[]
member \_\_.``Output shows up`` () =
output.WriteLine("I'm here")
```
This approach [seems to have worked before](https://stackoverflow.com/questions/3196797... |
2018/03/09 | 788 | 2,451 | <issue_start>username_0: When I go to my page login in localhost :
mylocal.com/app\_dev.php/login, I have this error :
[](https://i.stack.imgur.com/rMMTa.png)
>
> An exception has been thrown during the rendering of a template
> ("Warning: gettex... |
2018/03/09 | 706 | 1,981 | <issue_start>username_0: I have searched for similar questions, and even though I found several answers, none seams to work. I have a list of strings
```
Z189
I142
M395
L210
V467
M203
Q277
Q461
Y440
S250
M162
Q96
22Q
W148
Q72
T22T
22TWE22
12E34
```
and I need a regex to find only strings holding only 2 digits (not m... |
2018/03/09 | 966 | 3,801 | <issue_start>username_0: There is a need where I want load data from local or remote. If local data fetched, remote data won't be fetched.
**As local data can be empty (i.e. null)**, I have to handle `null` situation in RxJava2, so I do it with help of `Optional` util in java-8. Here is code.
```
String data;
Obser... |
2018/03/09 | 204 | 739 | <issue_start>username_0: To Developer,
I have windows exe's that can be put in Docker containers.
Can AWS Batch run Windows Docker containers?
The AWS docs don't seem to identify this as an option.
Thanks,
Marc<issue_comment>username_1: From AWS documentation: no it can not and is not an option.
Upvotes: -1 <issue_co... |
2018/03/09 | 475 | 1,516 | <issue_start>username_0: In my XSD, I'm trying to use `alternative` tag. For some reasons, I got this error in my IDE (PHPStorm) :
>
> Invalid content was starting with with element 'xs:alternative' ...
>
>
>
**XSD**
```
```
I saw [I should not add something more to use the 1.1 xsd version](https://stackoverfl... |
2018/03/09 | 560 | 2,102 | <issue_start>username_0: so I'm new to React and wanted to start on a simple practice project. I'm following a tutorial that uses Webpack. I've installed Webpack in my working directory and globally using npm over Windows command. I set up a webpack.config.js file, included webpack as a devDependency in my package.json... |
2018/03/09 | 714 | 2,694 | <issue_start>username_0: I looked up this here on stackoverflow as well as other sites including MS documents, and tried all possible answers I came across but to no avail. Not sure, what I am doing wrong. Simple class, trying to get all properties including the private one.
The solution is a console app in vs2017 15.... |
2018/03/09 | 2,935 | 10,378 | <issue_start>username_0: I am currently testing out some JavaFX code to get more into this language and I wanted to have a Window with a button called "Iconify" which does minimize the window when clicked.
[Here you can see how it looks like](https://i.stack.imgur.com/oGSlF.png)
I am working with FXML (Scene Builder) ... |
2018/03/09 | 896 | 2,705 | <issue_start>username_0: I have a data frame that I'm trying to add a new column to which is calculated from some simple decisions I've attempted to place in a function.
```
calculateNewValue <- function(a, b)
{
if(a == b)
result <- 4
if(a >= b * 2)
result <- 2;
if(a > b)
result <- ... |
2018/03/09 | 870 | 3,288 | <issue_start>username_0: When I install and run cypress, it scaffolds a `cypress/` folder in the root of my project.
The problem is that all other test related data is stored in the `test/` folder. Is there an easy way to move it to `test/cypress` and configure cypress to look there?<issue_comment>username_1: Cypress ... |
2018/03/09 | 1,017 | 3,344 | <issue_start>username_0: Not detected my
Also <https://v2.vuejs.org/v2/examples/commits.html> have and when click Vue icon at Chorme say "Vue.js not detected"
PS: using extension described [here](https://alligator.io/vuejs/vue-devtools/) and supposing the [github.com/vuejs/vue-devtools](https://github.com/vuejs/vue... |
2018/03/09 | 1,362 | 3,883 | <issue_start>username_0: I have the following data:
```
+--------+--------+--------+--------+----------+
| IDTRX | IDCUST | ITEM | IDORDER| ORDERSEQ |
+--------+--------+--------+--------+----------+
|1 | A | SHOES | C18001 | |
|2 | A | BAG | C18001 | |
|3 | A ... |
2018/03/09 | 828 | 2,794 | <issue_start>username_0: I have a simple task to accomplish, but the current save functions I am finding are not helping me at all. What I have to do is simply convert a gray-scale image to another one which has intensities belonging to a smaller interval (specifically between 120 and 180).
I implemented the conversi... |
2018/03/09 | 1,455 | 5,397 | <issue_start>username_0: I have a Maven project which provides low level API and basic functionality for a communication interface. I have a few other Maven projects which all depend on this one project, and implement specific communications based on the low level API. As these are Maven projects, when I build the high... |
2018/03/09 | 320 | 1,270 | <issue_start>username_0: I am currently trying to locally run a website using Sitecore but seem to get some weird error when trying to enter the page. The error message is blank?
And the error code is `500.19`.
I read somewhere else that this could be due to the authentication is given by IIS didn't allow me to ente... |
2018/03/09 | 261 | 994 | <issue_start>username_0: SQL Worksheet text cursor do not show in Oracle Sql Devoloper
Oracle Sql Devoloper Version 17.4.0.355<issue_comment>username_1: **Tools** > **Preferences** : +**Caret Behavior** : change **Caret Color** , for example red.
Upvotes: 4 [selected_answer]<issue_comment>username_2: I was facing the s... |
2018/03/09 | 490 | 1,860 | <issue_start>username_0: After updating Visual Studio to 15.6 version, I received this message:
>
> We've detected your solution is currently using Xamarin Components,
> which is no longer supported. Please remove the used Components
> manually and reopen solution.
>
>
>
But I don't understand what and how.
[!... |
2018/03/09 | 311 | 1,115 | <issue_start>username_0: Is there any point to use `ctype_digit()` with a `comparison operator` in `if statement` like this
```
if ($_GET['x'] > 0 && ctype_digit($_GET['x'])) {
echo 'It is a Number';
}
```<issue_comment>username_1: Not really. From [the manual](http://php.net/manual/en/language.operators.comparis... |
2018/03/09 | 530 | 1,806 | <issue_start>username_0: I have an array of strings and an array of words. I want to get the element having the most number of words (words from the array of words) from the array of strings.
For eg
```
var words = ["mango", "apple"];
var strings = ["apple is gud", "mango and apple are both gud"]
someWeirdFunction(st... |
2018/03/09 | 1,177 | 3,928 | <issue_start>username_0: I'm building a memory game in Angular. I've attached the component's logic, css and html below.
I'm trying to get the cards to flip but methods online don't work. Any suggestions on how to pull this off?
Note that in the data structure for a card there's a isFlipped property set to false. Woul... |
2018/03/09 | 182 | 684 | <issue_start>username_0: Is passing URL parameter to src path security issue? For example:
```
var type = getUrlParameter('type');
element.scr = "js/" + type + "/main.js"
```
Thank you<issue_comment>username_1: If element doesn't get required *url parameter* as `src` due to page-loading issues, script not loading or... |
2018/03/09 | 511 | 2,072 | <issue_start>username_0: I'm making a mobile app in XCode using Swift. In my application I'm selecting an image from my phone's camera roll and running that image through Googles Vision API. Currently, if I select an image, it passes in the whole image to the analyzer. What I'd like to have is that the user selects an ... |
2018/03/09 | 964 | 3,041 | <issue_start>username_0: I'm working on a function in python that uses GPS coordinates to calculate distance using Vincenty's formulae. The first step is to iterate a set of equations until convergence using a while loop. "lam" is the variable I'm outputting and feeding back into the while loop. The while loop runs the... |
2018/03/09 | 670 | 2,145 | <issue_start>username_0: I'm using Postman to test my APIs and I get the following response:
```
{
"Message": "Drinks loaded successfully.",
"Status": true,
"InnerData": [
{
"id": 1,
"place_id": "25",
"drink_type": "1",
"drink_amount": "2",
"device_id": "1",
... |
2018/03/09 | 355 | 1,598 | <issue_start>username_0: I'm trying to add form control to the 's in my project, but I keep on getting this error `ng: No provider for ngControl`
This occurs when I add the `[formControl]="formControlName"` property to my mat-select. It doesn't seem to recognize the property. I'm following the example from the materi... |
2018/03/09 | 646 | 2,134 | <issue_start>username_0: I have a web view in my app that I use for account creation (I didi not write and cannot change the associated web pages).
Normally, it is easy to click on any button/link but here the string of my "Create Account" button has an font awesome in its title with makes the recorder crash and the ... |
2018/03/09 | 625 | 2,047 | <issue_start>username_0: I would like to use an integer created inside a loop, but when I use it outside a loop, it gives a different value than inside. I need to extract every second digit from an integer: `17121` then multiply it by `2`.
In this case I extracted by the loop below the digits `7` and `2`, and were mul... |
2018/03/09 | 597 | 1,937 | <issue_start>username_0: I want to see Title name and Category name in same line (\*\*)
What am i missing?
```
if ( $stmt->rowCount()>0 ) {
while($recResult = $stmt->fetch(PDO::FETCH_ASSOC)) {
$json_row["id"] = $recResult['Url'];
$json_row["value"] = $recResult['Title'];
(**) $json_row["label"]... |
2018/03/09 | 553 | 1,849 | <issue_start>username_0: I'm hoping this is an easy semantic question. I've been asked to calculate p values for a "reduced major axis" regression.
A [search reveals](https://stackoverflow.com/questions/46673012/obtaining-regression-coefficients-from-reduced-major-axis-regression-models-usin)
which states "I'm using ... |
2018/03/09 | 1,807 | 7,076 | <issue_start>username_0: I've been trying to find a way to set the context path for a webflux application. I know I can configure it using
```
server.servlet.context-path
```
if I deploy a servlet, but I would like to achieve it with webflux, without having to explicitly add the path to every route or use MVC.<issu... |
2018/03/09 | 2,173 | 8,514 | <issue_start>username_0: Down here is one request I want to create with JAVA.
But in the first part I want to put XML, not fields or text but XML and in the second - my file which I want to upload. Also every part of my request should have different content type and content disposition.
So How to set different HTTP h... |
2018/03/09 | 1,271 | 4,267 | <issue_start>username_0: I'm playing with scala generics and type bounds to understand its possible use cases. I'm puzzled with a scenario.
Let's say I have a trait Combinable
```
trait Combinable[T] {
def combine(other: T): T
}
```
and I want to implement an implicit def for Vector[A]:
```
implicit def vector... |
2018/03/09 | 1,496 | 5,779 | <issue_start>username_0: I try to write an Excel VBA script which fetches some information (version and revision date) out of a binary FrameMaker file (\*.fm).
Following sub opens the \*.fm file and writes the first 25 lines (the informationen needed is into this first 25 lines) into a variable.
```
Sub fetchDate()
... |
2018/03/09 | 924 | 3,429 | <issue_start>username_0: I have a react redux firebase app with a content management side (all those pages start with `/admin/...`). I need to restrict firebase database and firebase storage write access to a small subset of those users, as well as handle a redirect when an unauthenticated (or authenticated without adm... |
2018/03/09 | 537 | 1,922 | <issue_start>username_0: I have this procedure, it asking me 2 input parameters, don't know why as I'm declaring the 2nd parameter (`@monto`) as an output:
```
ALTER PROCEDURE [dbo].[SP_MONTO_APROBADO]
@ID INT,
@MONTO INT OUTPUT
AS
BEGIN
SELECT @MONTO = MONTO_APROBADO
FROM LICITACION
WHERE... |
2018/03/09 | 1,340 | 2,464 | <issue_start>username_0: This is similar to but not exactly the same as: [calculate ratios for every 2 columns in a data frame](https://stackoverflow.com/questions/19385825/calculate-ratios-for-every-2-columns-in-a-data-frame/19386015#19386015)
I have a data frame where I want to make a ratio of every column versus ev... |
2018/03/09 | 612 | 2,072 | <issue_start>username_0: I have created a large graph in Neo4j and have an empty node that is connected via 11 million relationships in graph that I need to remove. I know that if I just delete the node I will leave behind all the hanging relationships but I have been unsuccessful in my attempts to remove them. I have ... |
2018/03/09 | 809 | 2,301 | <issue_start>username_0: I have the following 2 MySQL tables:
players:
```
| id | name |
|----|---------|
| 1 | Player1 |
| 2 | Player2 |
| 3 | Player3 |
```
scores:
```
| key | id | round | score |
|-----|----|-------|-------|
| 1 | 1 | Rd1 | 20 |
| 2 | 1 | Rd2 | 22 |
| 3 | 1 | Rd3 | 1... |
2018/03/09 | 549 | 1,761 | <issue_start>username_0: I am wanting to compare a string called `itemToReplace` to one in an array but ignoring the case (if it's a capital letter or lower case).
Here is the code:
```
itemToReplace = input("Choose an item to replace: ")
if itemToReplace in self._inventory:
# do something...
```
And when I do ... |
2018/03/09 | 440 | 1,490 | <issue_start>username_0: I have a script. I have exported to console.log the elevations by including in for loop.
Now I need to export this console.log to a file (could be text/csv/excel).
```
for (var i = 0; i < elevations.length; i++) {
data.addRow(['', elevations[i].elevation]);
console.log(elevations[i].elevation)... |
2018/03/09 | 885 | 3,299 | <issue_start>username_0: I'm currently trying to use an auto-defined variable before knowing its type. Why? Because the type depends on the program input. If a user picks a certain distribution, the program will output values based on that distribution. Here's the code:
```
std::default_random_engine random_engine;
au... |
2018/03/09 | 621 | 2,245 | <issue_start>username_0: I have re-trained a VGG model on google colab.
However when I try to save the model using the below code it throws the following error:
Code:
```
from google.colab import files
files.download('vgg_retrained_colab_24epochs_loss_0_47_accuracy_76_88.h5')
```
Error report:
[error report link]... |
2018/03/09 | 752 | 2,282 | <issue_start>username_0: I have the following XML file:
```
xml version="1.0" encoding="UTF-8"?
1
Jane
Smith
2
John
Doe
```
And I have the following CSV file:
```
id;phone
1;12345678
2;78903456
```
I work with PHP. I need to do with XML something like this:
Add a phone number element to the person where i... |
2018/03/09 | 1,167 | 4,651 | <issue_start>username_0: After a long time I played around with plain JS again. And I'm struggling in fixing a closure problem.
**Task:** I'm using a function factory to set params for a returned function which I then want to call.
**Problem:** As far as I understand the params are passed by reference and when the e... |
2018/03/09 | 760 | 2,629 | <issue_start>username_0: when I set the `HttpClient`(this.http) to get data in `ngOnInit()`:
```
ngOnInit(): void {
this.http.get('http://127.0.0.1:3000/getData').subscribe((data) => {
const type = this.route.snapshot.paramMap.get('type');
this.theme = data;
this.side = this.theme.find((item, in... |
2018/03/09 | 1,069 | 4,004 | <issue_start>username_0: I'm a beginner development in TypeScript. I thought typescript could solve all my problems with this scope in JavaScript, but it doesn't seem so.
See the example code below:
```js
class Car{
private name : string;
private velocity: number;
constructor ( name:string){
th... |
2018/03/09 | 336 | 1,269 | <issue_start>username_0: I'm trying to understand unit testing in python. If I have a class with a large `__init__` function, and I am writing unit-tests for member functions of this class, which need to refer `self` object, what's the best way to go about it?
As a follow up several of these functions could be `@stati... |
2018/03/09 | 623 | 2,610 | <issue_start>username_0: ```python
import keras
Using TensorFlow backend.
from keras.preprocessing.image import ImageDataGenerator
train_datagen = ImageDataGenerator(
rescale=1./255,
shear_range=0.2,
zoom_range=0.2,
horizontal_flip=True)
test_datagen = ImageDataGenerator(rescale=1./255)
training_set =... |
2018/03/09 | 390 | 1,506 | <issue_start>username_0: Have a
```
List> allPoints = new LinkedList<>();
```
Each map contains a `"name"` key with a String value;
Need to create a
```
List> expectedPoints
```
There are duplicate names in the list; for these, want to keep the last one only.
E.g. if the list has three items, and first and th... |
2018/03/09 | 412 | 1,331 | <issue_start>username_0: I'm trying to implement amp-list to allow a different currency depending on where the user is from. I've implemented the amp-list element and created a JSON file (which is a CORS url), containing the data using the correct syntax.
The amp-list however is not printing the data, and instead prin... |
2018/03/09 | 594 | 2,377 | <issue_start>username_0: I am making changes to a data acquisition program with a buffer where the type depends on user input from the form. At the moment the same code is written 3 times except the buf variable used in the following code is declared differently. The next lines of code are the same. The code snippet be... |
2018/03/09 | 2,115 | 7,542 | <issue_start>username_0: Our team is developing a large project and we want to build a big app with multiple forms and dashboards and features. One monolithic SPA would get complicated. So we discuss the approach of „micro frontend“ architecture. The goal is to generate a parent SPA which contains several child SPAs. A... |
2018/03/09 | 934 | 2,366 | <issue_start>username_0: I'm stuck at this problem for a long time without finding any solution.
I have the following Java Options in my `Tomcat7_1w.exe`:
(I don't have a setenv.bat or catalina.bat)
```
-Dcatalina.home=G:\Server\Tomcat_1
-Dcatalina.base=G:\Server\Tomcat_1
-Djava.endorsed.dirs=G:\Server\Tomcat_1\end... |
2018/03/09 | 1,020 | 3,513 | <issue_start>username_0: I want to display multiple google maps with my latitude and longitude from MySQL and I use looping. Here is my code:
```
.my\_map {
height: 400px;
width: 100%;
}
php
foreach($clinics AS $clinic) {
?
var map;
function initMap() {
map = new google.maps.Map(document.getElementById('... |
2018/03/09 | 212 | 928 | <issue_start>username_0: I am updating my CentOS role to patch systems after Frozen repos have been configured and non-Frozen repos are removed. I am finding that, if use the logic below, it restores the CentOS repos after ansible already removed them:
`- name: Patch the System
yum:
name: '*'
update_cache: yes
sta... |
2018/03/09 | 614 | 1,616 | <issue_start>username_0: When I want to sort a `Map` I use :
```
map.toSortedMap()
```
But how can I sort a map in the reverse order?
For example my `Map` is sorted with `.toSortedMap()`, so I have :
```
{0.01=10, 0.05=7, 0.1=8, 0.25=6, 0.5=15, 1.0=3, 2.0=9, 5.0=8, 10.0=14, 20.0=6, 50.0=10}
```
I would like some... |
2018/03/09 | 1,533 | 4,903 | <issue_start>username_0: I have a folder containing more than 1000 files with the extension (they are no *real* xml files though).
I want to extract certain contents from these files automatically, so that a matrix or table is the end result (which I can use further in R for analysis, or export to 1 csv file, etc).
I... |
2018/03/09 | 234 | 825 | <issue_start>username_0: I have a very basic FireFox Extension that I need to change a SPAN ID when the page loads.
```
On
```
I just need that to be Off, rather than On.
Thank you in advance!<issue_comment>username_1: Using JavaScript:
```
window.addEventListener('load', function () {
document.getElementById(... |
2018/03/09 | 381 | 1,474 | <issue_start>username_0: I am working on a cryptography Android application for a course project.
My goal is to be able to send an encrypted message (composed of a key and ciphertext) from my application via a text message.
I have been trying to send the key and ciphertext as a Bundle, but am running into issues - whe... |
2018/03/09 | 1,172 | 4,016 | <issue_start>username_0: I have a function that looks like this:
```
read_data <- function(filename, header) {
path <- paste("./output/", filename, sep = "")
if (file.exists(path)) {
data <- read.csv(file = path, header = header, sep = ",")
}
# Partially removed for brevity.
}
```
What I want to achiev... |
2018/03/09 | 1,192 | 4,298 | <issue_start>username_0: i have a issue with notifications on laravel, if i send a notification directly without a queue this work as well
this notifiction needs send a email and save in database
i use this to call notify as exemple
```
$user = \App\User::find(1);
$candidato = \App\CandidatoVaga::where('id_user'... |
2018/03/09 | 511 | 1,704 | <issue_start>username_0: I am fairly new to SQL, so please bare that in mind.
I have have a table with data that is divided into two centers "Toronto & Montreal" for a total of 78 rows (39 per center), with multiple columns. I want to get the national total (sum) of X column for each respective center for a specific d... |
2018/03/09 | 868 | 3,226 | <issue_start>username_0: I am pretty new to React. I am not understanding why is this issue not working.
I have `Numbers Component`.
```
const Numbers = (props) => {
return(
{Numbers.list.map((num,i) =>
props.selectNumbers(num)}>
{num}
)}
);
}
Numbers.list = [1,2,3,4,5,6,7,8,9];
```
Now in the parent `... |
2018/03/09 | 576 | 1,863 | <issue_start>username_0: I know that the `auto` keyword can be used to get a lambda function to accept any type. For example, one can do:
```
auto my_lambda = [](auto & anything)
{
std :: cout << anything << std :: endl;
}
```
And then call `my_lambda(my_int)` just as well as `my_lambda(my_string)`. However, as f... |
2018/03/09 | 832 | 2,809 | <issue_start>username_0: I am able to add a carto layer to my map on the first click as per below. However, I am unsure as to how to remove the layer on the second click, or in a toggle like way?
```
$("#toggle").button();
$("#toggle").on('click', firstClick)
function firstClick() {
$("#toggle")... |
2018/03/09 | 1,104 | 3,238 | <issue_start>username_0: ```
var markers = [
{
coords:{lat: 14.5858544, lng: 120.9763816},
}
];
```
Hi everyone, how do I output the lat and lng?
I can't seem to access them. I have tried
```
document.getElementById("demo").innerHTML = markers[0].coords
document.getElementById("d... |
2018/03/09 | 540 | 2,285 | <issue_start>username_0: I'm building a REST API using Java and Spring and I need to handle a POST request in my controller, but I need to extract the body from that request which is a JSON and also the "origin" of that request,
```
@RequestMapping(value = "/create", method = RequestMethod.POST)
public XXX createMyObj... |
2018/03/09 | 628 | 2,608 | <issue_start>username_0: I'm attempting to setup our CDN without weakening our security. So we're using the premium CDN from Azure using Token authentication, which seems to work, we're able to generate an encrypted token which the CDN is able to decrypt.
However, after authentication we want the CDN to rewrite the UR... |
2018/03/09 | 622 | 2,536 | <issue_start>username_0: By "normal variable declarations", I assume the declarations like the below.
```
int a = 3;
```
If you define a parameter of a function, you will write like this:
```
void func(int a) {
}
```
Let's assume a more complicated case. When you normally declare an array of pointer to functions... |
2018/03/09 | 239 | 604 | <issue_start>username_0: I can get a simple IF formula working like: `=IF(A3>100,"good","bad")`
but what i would like is something that works for in between theses values too.
Example:
A score of `<80 = Bad`, `80-100 = OK`, `>100 = Good`
Thanks.<issue_comment>username_1: You embed if statements:
```
=IF(A3>100,"goo... |
2018/03/09 | 634 | 1,967 | <issue_start>username_0: I want to take input as a single line with spaces then enter that data into the two dimensional array.
```
String[][] examples = new String[100][100];
for (int i = 0; i < 2; i++) {
System.out.println("enter line " + i);
String line = sc.next();
String[] linearr = line.split("\\s+")... |
2018/03/09 | 3,154 | 12,089 | <issue_start>username_0: There is React+TypeScript application, and all component classes should be upper-cased and have `Component` suffix, e.g:
```
export class FooBarComponent extends React.Component {...}
```
The application is ejected `create-react-application` application, i.e. is build with Webpack.
How can ... |
2018/03/09 | 841 | 3,068 | <issue_start>username_0: This little program opens a windows form and draws 70 red rectangles, where the user clicks on the form.
Every time the user clicks, the rectangles disappear, and new ones are drawn on the new click-Point.
I want to make the rectangles to stay when the user clicks and draws a new set of recta... |
2018/03/09 | 531 | 1,737 | <issue_start>username_0: First, I am getting a same error as this post [Request Failed on production apk](https://stackoverflow.com/questions/47587984/request-failed-on-production-apk)
Then, I did some searches. I guess I need to sign my app with release keys. [Tutorial for Test and Deploy](https://developers.google.... |
2018/03/09 | 701 | 2,707 | <issue_start>username_0: I have the following services that return Bookshelf model data. The server is built on express. My core question is: I want to write tests for the services. Secondarily, I'm not sure if the services tests should include interaction with db; as you can see below, the services are currently inter... |
2018/03/09 | 1,030 | 3,512 | <issue_start>username_0: What I need help with
=====================
I want to receive variables from a external .json file in the local directory
using python27
(import doesn't work)
I want to store the variables in the .json like below
```
value1 = "this_is_value1"
value2 = "this_is_value2"
value3 = "this_is_valu... |
2018/03/09 | 549 | 1,912 | <issue_start>username_0: I have been trying to find a similar case. I found a lot, but I still can't figure it out to adopt to my query.
I have a testDB in SQL Server that has 3 tables, as shown in picture below:

I created query as below:
```
SELECT P.FirstNa... |
2018/03/09 | 284 | 903 | <issue_start>username_0: ```
def show_hidden_word(secret_word, old_letters_guessed):
i = 0
new_string = ""
while i < len(secret_word):
j = 0
print(1)
for j in old_letters_guessed:
if secret_word[i] == old_letters_guessed[j]:
new_string += secret_word[i]
print(old_letters_guessed[... |
2018/03/09 | 1,533 | 4,075 | <issue_start>username_0: What is an efficient way to find the key associated with the list of minimum length, in a map of lists in Elixir. Let's say I have:
```
z = %{a: [1, 2, 3], b: [4, 5], c: [6, 7, 8, 9]}
```
I know I can do:
```
Enum.map z, fn {k, v} -> length(v) end
```
which will give me:
```
[3, 2, 4]
`... |
2018/03/09 | 939 | 2,373 | <issue_start>username_0: I am implementing an encryption in a project that I has in another java project.
The code in java project is this:
```
public static String cifraDES(String chave, String dado) throws Exception {
DESKeySpec keySpec = new DESKeySpec(hexStringToByteArray(chave));
SecretKeyFactor... |
2018/03/09 | 994 | 3,077 | <issue_start>username_0: I am working on to create a sql query. I tried multiple links within stackoverflow and googled it but cant fond a solution. I have the below:
```
column_name
1,2,3,string1
3,1,string2
4,5,string3
2,4,string1
```
So i want the below output for this:
```
1,2,3,4,5,string1,string2,string3,stri... |
2018/03/09 | 649 | 2,304 | <issue_start>username_0: I have a File Provisioner configured on my packer template json:
```
"provisioners": [{
"type": "file",
"source": "packer/api-clients/database.yml",
"destination": "/tmp/api-clients-database.yml"
},
```
The code below doesn't work when I'm trying to build an AMI o... |
2018/03/09 | 643 | 2,370 | <issue_start>username_0: I have developed an angular2 app. I run through procedure of firebase hosting. But it is showing a default page not my app.
Please help
[](https://i.stack.imgur.com/59aq7.png)<issue_comment>username_1: After building your app... |
2018/03/09 | 501 | 2,045 | <issue_start>username_0: The code could look something like this:
```cs
void Update () {
if(Vector3.Distance(transform.position, specificPositionOfHugeGameobject) < dist)
{
transform.position = Vector3.MoveTowards(transform.position,
specificPositionOfHugeGameobject, Time.deltaTime * speed);
}
}
... |