date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/01 | 1,268 | 4,842 | <issue_start>username_0: I am able to register a custom vue.js component with
```
// register
Vue.component('my-component', {
template: 'A custom component!'
})
```
Also see <https://v2.vuejs.org/v2/guide/components.html>
How can I include css classes for my component?
I would expect something like
```
Vue.... |
2018/03/01 | 1,170 | 3,888 | <issue_start>username_0: I have the following code which uses map to insert Nodes into *mp* according to a *key*. The class has two functions *set* and *get* to insert and access the map respectively.
```
struct Node {
int value;
int key;
Node(int k, int val):key(k),value(val) {};
};
class Cache {
private:
... |
2018/03/01 | 2,659 | 11,543 | <issue_start>username_0: So I am in a bit of a predicament where I cannot make my if statements work correctly, they display nothing on screen, funnily enough only the top if statement works when the computer and user draw in a rock paper scissors game.
Here is my the code in the method which does not work properly:
... |
2018/03/01 | 504 | 1,928 | <issue_start>username_0: I'd like to periodically ping a server using service workers.
At this current moment, Chrome supports "background syncing", but it cannot be used at situations like this, because it could be abused to mine crypto, for example.
I have read there were plans in 2015 to add periodic background sy... |
2018/03/01 | 453 | 1,636 | <issue_start>username_0: When interacting with TFS from the command line, the `tf status` command has an [undocumented](https://learn.microsoft.com/en-us/vsts/tfvc/status-command#parameters) flag named `/nodetect`. What is it for? What does it do?
My best guess is that it prevents it from trying to be smart about dete... |
2018/03/01 | 1,719 | 5,923 | <issue_start>username_0: I was not able to solve my problem with existing information
```
Operand type clash: datetime2 is incompatible with tinyint
```
This problem occurs only when using mssql, Hope someone already knows the solution to this problem
When switching to mssql there were a lot of problems, it's still... |
2018/03/01 | 1,845 | 5,119 | <issue_start>username_0: I'm having trouble on how to achieve making the X stay at the middle during transform. It looks like the issue only occur in Firefox browser between Chrome and FF.
I'm using FF Quantum 58.0.2 and the X moves to the top, in Chrome I have no issues.
I tried to add `top: 50%;` in the pseudo elem... |
2018/03/01 | 1,843 | 5,108 | <issue_start>username_0: I've been using a piece of Ruby code that I found [here](https://stackoverflow.com/questions/403865/algorithm-to-sum-up-a-list-of-numbers-for-all-combinations).
Here's the code:
```
a = [1, 4, 7, 13]
def add(ary, idx, sum)
(idx...ary.length).each do |i|
add(ary, i+1, sum + ary[i]... |
2018/03/01 | 372 | 1,332 | <issue_start>username_0: It says there's an unexpected token in my params.
`"ActionDispatch::Http::Parameters::ParseError: 765: unexpected token at 'conversation_identifier[participant_list][]=2&conversation_identifier[participant_list][]=1"`
A version of the test with magic numbers for clarity:
```
let(:headers) do... |
2018/03/01 | 569 | 2,225 | <issue_start>username_0: So i have been using the \*args \*\*kwargs functionality in python for a while and I came across a problem that I can't seem to find a solution to in the documentation/here on stackoverflow.
I have a multithreaded job which sends requests to the server in parallel, and then does some analysis... |
2018/03/01 | 751 | 2,881 | <issue_start>username_0: I'm trying to work out a quick and efficent way to to work this out, but i'm stuggling a little.
I have an object 'Tile' which contains coordinates (x, y). I then get a list of those objects which form a shape. a simple example would be a rectangle. but it could be a more complex shape. These ... |
2018/03/01 | 643 | 2,466 | <issue_start>username_0: I have the following classes/interfaces:
```
interface A
interface Factory {
interface Spec
fun create(spec: SpecType): A
}
class DefaultFactory : Factory {
data class Spec(
val message: String
) : Factory.Spec
override fun create(spec: Spec): A {
// Do stuff here to create an instan... |
2018/03/01 | 542 | 1,437 | <issue_start>username_0: Regex pattern that matches all words containing at least one asterisk at any position in that word.
```
str = "t*e *pp locall* so my q**st*on is **stinct *ro* t*eir's. *ev***heles* lol ****"
```
should match
`t*e` `*pp` `locall*` so my `q**st*on` is `**stinct` `*ro*` `t*eir's`. `*ev***heles... |
2018/03/01 | 1,250 | 4,087 | <issue_start>username_0: i created mqtt broker at cloudMQTT and here is the info about ports & server that i got

now i wrote that code to run web page that connect to that broker and send hello world.
```
JavaScript MQTT WebSocket Example
var m... |
2018/03/01 | 782 | 2,648 | <issue_start>username_0: I am very new to the whole CS scene but quickly getting into it, I chose Java as the first language I wanted to learn.
I'm using an online resource that asks me to make a simple program which asks the user to enter a number, and then it spits back out the sum of the powers.
So if you input ... |
2018/03/01 | 677 | 2,615 | <issue_start>username_0: I am creating two selects, prodSelect and calcSelect. What I want to do is if prodSelect is not empty it should prevent calcSelect from being able to changed. Am I putting preventDefault in the wrong spot? I have tried some different solutions but I think I may be the closest with this one.
He... |
2018/03/01 | 604 | 2,279 | <issue_start>username_0: I have a Google Apps Script web app, that previously worked, but when I tried to add some code to the "server-side", it broke the app. I wish to go back in and do some unit testing and possibly a bit of regression testing (even though my manual regression testing just failed), on the different ... |
2018/03/01 | 1,286 | 3,871 | <issue_start>username_0: I want to test an acumulated value (`var goal`) from some input fields with the closest **highest** value`['size']` in an array.
So let's say my goal is to find the highest closest value to `size 95`.
```
var variants = [
{ value: "128428226", size: "50 ", price: 3.72, priceIncl: ... |
2018/03/01 | 2,031 | 6,657 | <issue_start>username_0: I have an application where logged in users can create new users and add them to one of their groups. You can see the middleware flow for this in the route:
```
router.post('/account/add-users',
userController.validateRegister,
userController.registerUser,
userController.getNewUser,
gr... |
2018/03/01 | 1,274 | 4,046 | <issue_start>username_0: I have a Neo4j Database which follows this form of model:
One central node for the subject. All Current Medical Data joined to it with a Current Relationship as separate nodes. If a specific node contains a medical test score and the subject has had that test before it will be joined to the sc... |
2018/03/01 | 1,370 | 3,999 | <issue_start>username_0: In my ionic angularJS app, I'm trying to add a loading page with a moving text inside. I found a CSS template with in it a JS code.
My problem is the use of `"$"` (which is the node I guess, isn't it ?), I tried to add `"$"` as dependency in my controller but I'm getting an `unknown provider`... |
2018/03/01 | 1,211 | 3,764 | <issue_start>username_0: I inherited a large workbook that I am making changes to.
(this is why I have to name things like eye instead of i because it has already been used)
I have a workbook, the first sheet is a summary sheet, each sheet after it has test data and a name, Im wanting to put a sparkline of data from... |
2018/03/01 | 1,177 | 3,562 | <issue_start>username_0: I have a an expression in SSRS that returns the time difference between 2 date time values (h:m:s). It works, however it is displaying the time with single digits (ie: 1:2:3 instead of 01:02:03. I've tried formatting each section, but SSRS rejects the code. Here is my original code that works p... |
2018/03/01 | 289 | 986 | <issue_start>username_0: I am trying to connect my custom topology to the ODL controller using the command:
```
sudo mn --custom topology.py --topo mytopo --controller=remote,ip=127.0.0.1,port=6633
```
However on running this command, I get a line as :
```
Unable to contact the remote controller at 127.0.0.1:6633
... |
2018/03/01 | 774 | 2,212 | <issue_start>username_0: I have these two identical tables but they behave differently when the browser width changes.
Seems like one overflows while the other shrinks to fit the width of the browser. But why does this happen?
```
| One Tow Three | Two Four One | Three to The One Two | Fiour Something Hljfal lkdsjfa... |
2018/03/01 | 319 | 1,181 | <issue_start>username_0: I have a private repo and I want to download a branch files from it. My environment doesn't have the git command installed. It would be great if I can do this with Python/PyGithub<issue_comment>username_1: Do you just want to download files from the repository ?
if yes you can copy the files to... |
2018/03/01 | 451 | 1,475 | <issue_start>username_0: I'm trying to mock a factory. In this example, this factory has a method `create` which takes two args and return a C object with has a constructor which takes same two args. I'd like to setup my factory to when I order my factory to create a new C, it returns a real new C with given args to `c... |
2018/03/01 | 1,552 | 5,282 | <issue_start>username_0: How do I configure Jetty options via [Spark framework](http://sparkjava.com/) ?
Im getting the problem below when i submit a large form. The solution for Jetty is documented at [Form too Large Exception](https://stackoverflow.com/questions/3861455/form-too-large-exception)
But Jetty is hidde... |
2018/03/01 | 1,326 | 5,154 | <issue_start>username_0: >
> case class Person(firstName: String, lastName: String)
>
>
>
vs
>
> type Person = (String, String) //firstName, lastName
>
>
>
case classes are obviously more readable. However, I have seen people use the latter. When would it make sense to use a tuple instead?
**As a follow up... |
2018/03/01 | 1,522 | 5,885 | <issue_start>username_0: I am currently implementing a PHP class that fetches image files and caches them locally. These images may come from other local sources, via HTTP or via HTTP using the Guzzle client. With PHP stream wrappers I should be able to handle all sources the same way.
What I am now trying to do ist t... |
2018/03/01 | 1,312 | 5,081 | <issue_start>username_0: So I'm trying to set environment keys with the Firebase Cloud Functions, but it doesn't seem to work. All I get is this:
```
$ firebase functions:config:set service.secret="secret"
i runtimeconfig: waiting for APIs to activate...
i runtimeconfig: waiting for APIs to activate...
i runtimeco... |
2018/03/01 | 1,045 | 4,039 | <issue_start>username_0: When creating a new version of an ML Engine Model with the command
```
gcloud ml-engine versions create 'v1' --model=model_name --origin=gs://path_to_model/1/ --runtime-version=1.4
```
I recieve the following error:
```
ERROR: (gcloud.ml-engine.versions.create) FAILED_PRECONDITION: Field: v... |
2018/03/01 | 613 | 1,762 | <issue_start>username_0: ```
if (q1 == "1-25") {
score = 0;
}
else if (q1 == "26-40"){
score = 5;
}
else if (q1 == "41-60"){
score = 8;
}
else (q1 == "60+")
score = 10;
```
this is a segment of my code from a multi-choice test but no matter what option I pick, the score variable always chooses 10
A p... |
2018/03/01 | 1,124 | 3,070 | <issue_start>username_0: I have such a code in the C#:
```cs
public static decimal StringDateToDecimal(this string stringDate)
{
var cultureInfo = new CultureInfo("ru-Ru");
var date = DateTime.Parse(stringDate, cultureInfo);
var number = date.ToBinary();
var unix = new DateTime(1970, 1, 1);
var di... |
2018/03/01 | 875 | 2,978 | <issue_start>username_0: I have a file in my google drive that is an xlsx. It is too big so it is not automatically converted to a googlesheet (that's why using googlesheets package did not work). The file is big and I can't even preview it through clicking on it on my googledrive. The only way to see it is to download... |
2018/03/01 | 1,061 | 3,435 | <issue_start>username_0: I'm following the tutorial in the *MongoDB: The Definitive Guide*, 2nd edition, for a databases course, and it appears not to work in version 3.6.2.
Basically I have two `mongo` shells opened using `mongo --nodb`.
Then, in the first, I run `cluster = new ShardingTest({"shards": 3, "chunksize"... |
2018/03/01 | 597 | 2,069 | <issue_start>username_0: I am trying to work out `countOfBytesReceived / countOfBytesExpectedToReceive` but it either returns `0.000000` or `1.000000`.
I did an `NSLog` on both `countOfBytesReceived` and `countOfBytesExpectedToReceive` I can see the `countOfBytesExpectedToReceive` remains the same as expected and `cou... |
2018/03/01 | 478 | 1,883 | <issue_start>username_0: How do I solve the error `cannot read property of 'addEventListener' of null` ? when I add this code,`document.getElementById("myForm").addEventListener("submit", SaveBookmark)` in my JS file
```
|
Submit
```<issue_comment>username_1: I'm by no means an expert but to avoid that error yo... |
2018/03/01 | 657 | 1,826 | <issue_start>username_0: I have a dataframe like this:
```
user groupIDs report
user2 [31501, 31502, 31503] blogpost
jim [31501, 31502, 31503] book
jane [31600] article
jim [31501, 31502, 31503] book
peter [31501, 31502, 31503] blogpost
user1 [31501, 31502] ... |
2018/03/01 | 8,530 | 29,130 | <issue_start>username_0: There's a continuous background tile in the parent, like so:
```
#parent{
background: url('tile-bg-under-menu.png') repeat-x center 32px;
height: 151px;
width: 100%;
background-attachment: fixed;
}
```
Then, I have the child, that is above the parent with another image, like... |
2018/03/01 | 862 | 3,239 | <issue_start>username_0: I have an issue where I want to retreive data from a child component, but the parent needs to use that data, *before* the child is mounted.
My parent looks like this
```
data : {
childComp : null,
importantData : null
},
methods : {
addComponent : function() {
this.prepareToAdd(this.i... |
2018/03/01 | 1,052 | 4,113 | <issue_start>username_0: sing **Entity Framework 6** (code first from db) I have some entities that I am getting from a sql view. The view contains a couple of calculated fields that I need to be able to display,
But I cannot save back to the view because of it doing a couple of joins and other things that will not let... |
2018/03/01 | 2,499 | 10,941 | <issue_start>username_0: I like the idea of `resolver`s.
You can say that:
* for a given route you expect some data to be loaded first
* you can just have a really simple component with no observable (as retrieving data from `this.route.snapshot.data`)
So resolvers make a lot of sense.
**BUT:**
* You're not changi... |
2018/03/01 | 2,545 | 11,137 | <issue_start>username_0: I am trying to work with some oddly created 'dumps' of some tables in postgres. Due to the tables containing specific data I will have to refrain from posting the exact information but I can give an example.
To give a bit more information, someone though that this exact command was a good way ... |
2018/03/01 | 1,262 | 4,896 | <issue_start>username_0: I have a pretty massive iOS Framework to bind.
This framework depends on two others.
I created the binding project, successfully generated the ApiDefinitions.cs file and StructsAndEnums.cs. So far so good.
Now, when I try to build it in Debug mode, I get about 30+ errors regarding syntax issu... |
2018/03/01 | 541 | 2,361 | <issue_start>username_0: How to implement this rule in ANTLR4:
>
> multiline-comment-text-item -> Any Unicode scalar value except /\* or \*/
>
>
>
?<issue_comment>username_1: I believe the issue is here:
`void PresentCheckoutForSubmittingTransactionCompletionHandler(Action completionHandler, [NullAllowed] Action... |
2018/03/01 | 1,629 | 4,369 | <issue_start>username_0: I have a dataframe where each row has a unique identifier, but some rows are actually duplicates.
```r
fdf <- data.frame(name = c("fred", "ferd", "frad", 'eric', "eirc", "george"),
id = 1:6)
fdf
#> name id
#> 1 fred 1
#> 2 ferd 2
#> 3 frad 3
#> 4 eric 4
#> 5 ... |
2018/03/01 | 442 | 1,608 | <issue_start>username_0: On a form I add a field like this
```
$builder->add('cse',
ChoiceType::class,
array(
'label' => '',
'required' => true,
'translation_domain' => 'messages',
'choices' => array(
'I agree' => true
),
'expanded' => true,
'multiple' => true,
'data' => null,
... |
2018/03/01 | 456 | 1,585 | <issue_start>username_0: I have this simple code which I can't make work.
```
import sqlite3
conn = sqlite3.connect('db\\books')
c = conn.cursor()
col = []
title = input('title')
text = input('text')
tags = input('tags')
col.append(title)
col.append(text)
col.append(tags)
c.executescript("INSERT INTO books (title... |
2018/03/01 | 409 | 1,575 | <issue_start>username_0: Why does service worker fail after a hard reload (Ctrl-Shift-R)?
---- case 1 CHROME --- success
1. Uninstall service worker
2. Load page
3. Page installs service worker
4. Worker.postMessage() succeeds
5. reload page
6. Worker.postMessage() succeeds
---- case 2 CHROME --- failure
1. Uninst... |
2018/03/01 | 1,000 | 2,875 | <issue_start>username_0: The following is sample data from my table:
```
Rev Date Client
1890 2015-11-20 xyz
1536.28 2017-10-27 AAA
934.84 2017-10-27 AAA
919.592 2017-03-22 AAA
760.985 2014-11-25 xyz
```
I need to select the day with the highest revenue for each client.
... |
2018/03/01 | 2,507 | 7,816 | <issue_start>username_0: I have the following code snippet, where I want original array (filters) to be filtered and get unique filters array.
I think I tried all the methods possible and it (uniqueFilters array) is still same 11 member original array.
Whats wrong?
How can I ensure that this array is actually filte... |
2018/03/01 | 710 | 2,807 | <issue_start>username_0: I'm using **Microsoft.Azure.ServiceBus 2.0.0** to subscribe for queue messages, and get unexpected characters when I use `Encoding.UTF8.GetString(serviceBusMessage.Body)`.
[](https://i.stack.imgur.com/VL2Tm.png)
It looks like... |
2018/03/01 | 387 | 1,479 | <issue_start>username_0: I have been trying to find a Flutter OpenCV library. I'm looking to handle facial recognition through eye positioning. I need this to be for both android and iOS. I found one for C++ which I think Flutter compiles to as well as Swift/Objective C libraries. I am wondering which route would be th... |
2018/03/01 | 676 | 2,641 | <issue_start>username_0: I'm building a higher order component for my various React components. In this HOC, I need to access the child's methods and call them. How can I do it?
example HOC:
```
export default function withHOC(Component) {
return class extends React.Component {
constructor(props) {
super... |
2018/03/01 | 1,001 | 3,310 | <issue_start>username_0: I am getting MISRA 5.2 rule violation in my project. The code for which i am getting violation is a structure that is declared as extern in one header file. The code example is as under
1.h
```
extern struct con tmp_ev;
```
2.c
```
struct con tmp_ev;
cioF_get(&tmp_ev);
```
3.c
```
struc... |
2018/03/01 | 1,766 | 6,053 | <issue_start>username_0: I have a Docusign template with role names "Applicant". and "Co-applicant". On the signature page there's a tab for each of them to sign.
I'm trying to use the Java API to send a document to both recipients, one after the other, so they can each sign in their respective tab, but I'm running in... |
2018/03/01 | 2,708 | 11,216 | <issue_start>username_0: So I'm using a custom user model
```
from django.db import models
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager
class UserManager(BaseUserManager):
def create_user(self, email, full_name, address, number, password=None):
"""
Creates and saves... |
2018/03/01 | 2,462 | 9,724 | <issue_start>username_0: I want to define `nrow` to be able to call:
```
%put %nrow(sashelp.cars);
```
Maybe there's an existing function or some straightforward solution but I haven't been able to find it.
From [online solutions](https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-count-of-total-records... |
2018/03/01 | 408 | 1,473 | <issue_start>username_0: I have a database with a table with these schema:
```
CREATE TABLE register (
register_id INTEGER NOT NULL,
mould_id VARCHAR,
timestamp INTEGER NOT NULL,
PRIMARY KEY (register_id),
FOREIGN KEY(mould_id) REFERENCES mould (mould_id)
)
```
Timestamp is incremental intege... |
2018/03/01 | 1,161 | 4,518 | <issue_start>username_0: How to get rid of unnecessary root layouts for fullscreen activities?
=====================================================================
I have a simple fullscreen activity. The layout inspector shows a large hierarchy of root layouts provided by Android, that I don't need in fullscreen.
... |
2018/03/01 | 1,276 | 5,359 | <issue_start>username_0: On my application I have a custom plugin with a form of about 80 translatable fields. The form will be available in the backend (for admins) and in the frontend (for end users) with the same labels.
I would like to use the Rainlab Translate plugin to translate all the field's labels so the adm... |
2018/03/01 | 967 | 3,399 | <issue_start>username_0: I have an extremely simple RESTful service that receives some form data via POST, it's purpose of which is to simply retain the body of text (with a unique id) in cloud storage (Amazon S3, Azure Blob Storage, etc.) as a file...
So, question is.. if everything is good, and i return a 200 respon... |
2018/03/01 | 234 | 985 | <issue_start>username_0: I want to play the game when the mobile user has minimized the game, because I have a built-in timer.
I used the code
```
Application.runInBackground = true;
```
but it does not work on Android<issue_comment>username_1: You can't run apps in the background in Android, it doesn't matter if y... |
2018/03/01 | 266 | 1,147 | <issue_start>username_0: I am starting a server and handling it like this using akka stream
```
connection.handleWith(handleRequest())
```
where `handleRequest():Flow[HttpRequest,HttpRespnse,_]`
I need to create a delay in sending of response back to client based on the query parameter. I can extract the query param... |
2018/03/01 | 566 | 1,803 | <issue_start>username_0: How to join only specific fields? When using $lookup, mongo returns the whole document.
Let's say that's my data:
users
```
[
{ id: 0, name: "Bob", adj: 1 },
{ id: 1, name: "Will", adj: 2 },
]
```
adjectives
```
[
{ id: 1, name: "awesome" },
{ id: 2, name: "cool" },
]
```... |
2018/03/01 | 869 | 2,580 | <issue_start>username_0: Im new to django, i started a project inside a virtualenv and whenever i try to runserver i get this message:
```
Performing system checks...
System check identified no issues (0 silenced).
March 01, 2018 - 13:22:34
Django version 2.0.2, using settings 'PollApp.settings'
Starting development ... |
2018/03/01 | 1,240 | 3,940 | <issue_start>username_0: I'm trying to understand how multi-threading works.
I have this code:
```
#include
#include
#include
void function1() {
std::cout << "Hi I'm the function 1" << std::endl;
std::this\_thread::sleep\_for(std::chrono::seconds(1));
std::cout << "Hi I'm the function 1 after sleeping" << std... |
2018/03/01 | 567 | 1,838 | <issue_start>username_0: Using the python `open` built-in function in this way:
```
with open('myfile.csv', mode='r') as rows:
for r in rows:
print(r.__repr__())
```
I obtain this ouput
```
'col1,col2,col3\n'
'fst,snd,trd\n'
'1,2,3\n'
```
I don't want the `\n` character. Do you know some efficient way... |
2018/03/01 | 873 | 3,087 | <issue_start>username_0: I have Googled and poked around Stack Overflow and can't seem to find a solution for this. I have:
```
let fileURL = URL( string: "file:///Users/me/file.txt" )
var rawDataString: String
var errorString: String?
do {
rawDataString = try String( contentsOf: fileURL!, encoding: String.E... |
2018/03/01 | 419 | 1,418 | <issue_start>username_0: I am trying to use find an element in a list but I'm getting the error:
>
> org.openqa.selenium.support.ui.UnexpectedTagNameException: Element should have been "select" but was "li"
>
>
>
The element I am looking for is in the list:
```
[SELECT2]
```
And the element is located at:
``... |
2018/03/01 | 603 | 1,809 | <issue_start>username_0: I was doing an exercise on testing if a variable is an integer. `x ^ 0 === x` was one of the proposed solutions, however when I try that in Chrome's console, on codepen.io or here, it returns `x`. Why is this?
```js
function isInteger(x) {
console.log(x ^ 0 === x);
}
isInteger(5);
isInt... |
2018/03/01 | 763 | 2,503 | <issue_start>username_0: I'm trying to do `indexOf` on the array `powerfulAgainst`, inside the object `card`.
When I do `console.log(key)`, aaa is returned.
`console.log(card)` returns
```
[ { key: 'aaa',
counteredBy: [],
powerfulAgainst: [ 'bbb' ] } ]
```
Lastly, `console.log(card.powerfulAgainst... |
2018/03/01 | 332 | 1,242 | <issue_start>username_0: Going crazy with this one here,(just to be clear: I looked at all the questions here on stackoverflow regarding "scrollview not working" and none of them helped). The following is a short version of what I'm trying to do
```
.....
.............
```
Textview is repeated multiple more times... |
2018/03/01 | 534 | 1,700 | <issue_start>username_0: I need to split my dataset into training and testing.
I need the last 20% of the values for testing and the first 80% for training.
I have currently used the 'train\_test\_split()' but it picks the data randomly instead of the last 20%. How can I get the last 20% for testing and the first 80%... |
2018/03/01 | 521 | 1,906 | <issue_start>username_0: I want to get `$data['student']` if request get (like: student-guardian?reg\_no=0001 in URL).
if no any parameter on url `$data['student']` don't needed.
My `StudentGuardian` function Like:
```
public function studentGuardian(Request $request)
{
$data = [];
if(!empty($request)){
... |
2018/03/01 | 464 | 1,574 | <issue_start>username_0: When I import my model to Algolia I change the ObjectId to the value of another field. But it seems when I call delete() on my object it doesn't remove it from Algolia. To be more clear here is an example:
User{
id,
email
name
}
Algolia User {objectId :email,name}
is there a way to solve thi... |
2018/03/01 | 563 | 1,889 | <issue_start>username_0: I am using mongoose pagination v5.0.3, node 9.3.0. I have this code for my blogs pagination:
```
router.get('/pages/:page', function(req, res){
var page = req.params.page > 0? req.params.page : 0;
Blog.paginate({}, { page: page, limit: 2 })
.then(function(data){
r... |
2018/03/01 | 726 | 2,584 | <issue_start>username_0: I am looking for a way to connect two lists and two conditions... My way doesn't work and I have no idea how to get it right.
What I want:
Find terms of triggerlist in file.
If the have been found, find citylist terms.
Only if this combination is found, print success
All my following appro... |
2018/03/01 | 2,684 | 6,095 | <issue_start>username_0: If I have a string like this
```
str =<
```
If a number in the first value shows up again, I want to add their second values together. So the final string would look like this
```
7312357006,1246.221
3214058234,3499.2
1324958723,232.1
3214173443,234.1
6134513494,23.2
```
If the final out... |
2018/03/01 | 898 | 2,941 | <issue_start>username_0: I have the following JSON object:
```
"StudentData": {
"Name": "Mike",
"Age": 25,
"DateOfBirth": 9/25/1993,
"IsMarried": false
}
```
I'm working on a Javascript function that will present a dialog box to a user with the above information inside of it, however I'd like the inf... |
2018/03/01 | 768 | 2,568 | <issue_start>username_0: When my web app subscribes to a Redis channel (mostly on Application\_Start), it should automatically load the current channel content, but not wait for the next publish within this channel.
I couldn't find any way to achieve this - but as this "problem" appears to be so common and trivial I ... |
2018/03/01 | 630 | 1,718 | <issue_start>username_0: I can access API data using "curl" on terminal but get error when i use R. Looking for some advice
Curl command:
>
> curl -H "token:<KEY>" "<https://www.ncdc.noaa.gov/cdo-web/api/v2/datasets>"
>
>
>
R command:
>
> books\_key <- <KEY>"
>
>
> url <- "<https://www.ncdc.noaa.gov/cdo-web... |
2018/03/01 | 511 | 1,751 | <issue_start>username_0: I'm trying to use the NPM `copyfiles` package, which I used many times. But I'm trying to copy the content of a `dist` folder in a destination folder without creating a `dist` but I can't find the correct way of doing it. I basically just want the content of the `dist` (not the folder in itself... |
2018/03/01 | 945 | 1,814 | <issue_start>username_0: I have a data frame like this:
```
a=c("A","A","A","A","B","B","C","C","C","D","D")
b=c(1,2,3,4,1,2,1,2,3,1,2)
c=c(1345,645,75,8,95,678,598,95,75,4,53)
mydf <- data.frame(a,b,c) # edit note: do _not_ use cbind inside data.frame
```
My aim is to get add an extra column on the new data frame w... |
2018/03/01 | 671 | 2,010 | <issue_start>username_0: By default, matplotlib subplots are filled by row, not by column. To clarify, the commands
```
plt.subplot(nrows=3, ncols=2, idx=2)
plt.subplot(nrows=3, ncols=2, idx=3)
```
first plot into the upper right plot of the 3x2 plot grid (idx=2), and then into the middle left plot (idx=3).
Someti... |
2018/03/01 | 1,076 | 2,821 | <issue_start>username_0: I have a string as follows:
`theatre = 'Regal Crown Center Stadium 14'`
I would like to break this into an acronym based on the first letter in each word but also include both numbers:
desired output = `'RCCS14'`
My code attempts below:
`acronym = "".join(word[0] for word in theat... |
2018/03/01 | 490 | 2,012 | <issue_start>username_0: we are currently testing sinch sdk for android (v3.12.3) and experiencing following issue: the local view is always placed above other views even if it comes first in view hierarchy and should be beneath views that come later - we want to show local video fullscreen and remotevideo as picture-i... |
2018/03/01 | 453 | 1,480 | <issue_start>username_0: Say I have an object:
```
var obj = { a:{}, b:1, c: new Set() };
```
Objects are not iterable without work and Object.keys/values/entries are not quite what I want. Object.entries() is close, but I would prefer it returns an array of objects instead of a 2D array, ideally with references int... |
2018/03/01 | 258 | 1,071 | <issue_start>username_0: After getting Flutter on Windows, when I run flutter doctor the following error is coming
Got TLS error trying to find package archive at <https://pub.dartlang.org>.
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...<issue_comment>username_1: Try deleting the "cache" fold... |
2018/03/01 | 963 | 2,888 | <issue_start>username_0: Here is the code that currently toggles a button. I would like to remove the javascript component of it by maybe using a checkbox. The only requirement I have is that I have to use a single html element to accomplish this.
Here is the code sample:
```js
document.querySelector('.toggler').addE... |
2018/03/01 | 1,495 | 3,371 | <issue_start>username_0: My dataframe `df` currently looks like this:
```
cat 1 2 3 4
1 a 0 1 0 1
2 b 0 0 1 0
3 b 1 0 1 1
4 a 1 0 1 1
5 b 1 1 1 1
6 a 0 1 1 0
cat <- c("a", "b", "b", "a", "b", "a")
df = cbind(cat, data.frame(matrix(c(0, 1, 0, 1, 0,
0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1,
... |
2018/03/01 | 623 | 1,888 | <issue_start>username_0: In my understanding, `dpctl dump-flows` command only helps to view current state of flow table. Flow table gets flushed often. I want to record the flow table entries.
Which class do I need to look into to record flow table? I am using POX controller and mininet on Ubuntu installed in Virtual... |
2018/03/01 | 645 | 2,593 | <issue_start>username_0: currently working on a project and I have a player class where I have an ID that auto-increments every time an object is created and then all my objects are in an array list (PlayerList).I am trying to set the text of a label to the player name but it just skips the first player and then it won... |
2018/03/01 | 1,203 | 3,106 | <issue_start>username_0: I have a data frame like this
```
id key value
1 x a 1
2 x b 2
3 y a 3
4 y b 4
read.table(text = "id key value
x a 1
x b 2
y a 3
y b 4", header = TRUE, sep = "\t")
```
And I would like to get a list for each `id` with sub lists for each `key`... |
2018/03/01 | 911 | 3,052 | <issue_start>username_0: Based on advice here ([Why is "using namespace std" considered bad practice?](https://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice)), I'm avoiding `using namespace std;`. However, based on what it says in Section 3.1 of C++ Primer, I have been making de... |
2018/03/01 | 2,847 | 10,430 | <issue_start>username_0: I need to sleep the code until some condition is met or a 3 second timeout is passed. then return a simple string. Is there anyway I can do this?
```
// this function needs to return a simple string
function something() {
var conditionOk = false;
var jobWillBeDoneInNMiliseconds =... |
2018/03/01 | 5,852 | 15,678 | <issue_start>username_0: I'm going to optimize three variable `x`, `alpha` and `R`.
`X` is a one dimensional vector, `alpha` is a two dimensional vector and `R` is a scalar value. How can I maximize this function?
I write below code:
```
#from scipy.optimize import least_squares
from scipy.optimize import minimize
imp... |
2018/03/01 | 2,650 | 7,737 | <issue_start>username_0: I'm decrypting legacy data created by a Ruby on Rails application using the symmetric-encryption gem in Rust. See my earlier question [How do I decrypt data encrypted by Ruby's `symmetric-encryption` gem in another language?](https://stackoverflow.com/questions/47661306/).
I've already impleme... |
2018/03/01 | 276 | 1,118 | <issue_start>username_0: I am talking about this notification:

Somehow SoundCloud (the website) makes this notification appear and it has working controls. I do not have the app installed, that notification originates from `com.android.chrome`. I don't really *need* to know th... |