date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/16 | 417 | 1,703 | <issue_start>username_0: I have Implemented google map and Display the my current location on Map.
Now I have implemented Place Autocomplete and this getting Result getting successfully
```
override fun onPlaceSelected(place: Place) {
Log.i("TAG", "Place Selected: " + place.name)
if (!TextUtils.isEmpty(pla... |
2018/03/16 | 549 | 2,252 | <issue_start>username_0: I am developing a react-native quiz application. Where i will fetch 5 questions from the backend and display them one by one to user. User can skip the current question or can answer current question to go to next question.
There is a timer on the top that will start countdown from 300 seconds... |
2018/03/16 | 450 | 1,303 | <issue_start>username_0: I am working with a dataframe which has a column 'Col' of type Float. The values of the columns have too many decimals (example: 1.00000000000111). How can I limit the column to save values with only 1 decimal (example: 1.0)?<issue_comment>username_1: Check this out:
```
import pandas as pd
d... |
2018/03/16 | 901 | 2,091 | <issue_start>username_0: I have the following DataFrame:
```
+----------+-------------------+
| timestamp| created|
+----------+-------------------+
|1519858893|2018-03-01 00:01:33|
|1519858950|2018-03-01 00:02:30|
|1519859900|2018-03-01 00:18:20|
|1519859900|2018-03-01 00:18:20|
```
How to create a times... |
2018/03/16 | 1,004 | 3,636 | <issue_start>username_0: I am trying to set a default value at a select option with Angular 5.
I have read about the [compareWith] but it does not seem to help.
Here is the code:
**My enumeration:**
```
export enum EncryptionProtocol {
NONE,
SSL,
TLS }
```
**My Config Model**
```
export class Config im... |
2018/03/16 | 438 | 1,315 | <issue_start>username_0: Working on the case statement below and keep getting a missing parenthesis error. any suggestions?
```
( CASE
WHEN XBAND = 4 AND TBAND = 0 AND YBAND >= 2
THEN 'A'
END
ELSE
CASE
WHEN XBAND = 4 AND TBAND = 0 AND YBAND >= 3
THEN 'B'
END
END ) XYT_BAND
```<issue_comment>user... |
2018/03/16 | 1,799 | 5,907 | <issue_start>username_0: I am learning this feature from ES6(Function generators) and I am having difficulties to understand the following code :
```
function* HelloGen2() {
var a = yield 100;
var b = yield a + 100;
console.log(b);
}
var gen2 = HelloGen2();
console.log(gen2.next()); // {value: 100, done: ... |
2018/03/16 | 2,766 | 9,128 | <issue_start>username_0: I am new in Angular and doing key value pair for the first time. I am trying to get the key value pair based on a particular value inside a nested key value map. I have a nested JSON data format:
```
trips = {
"20180201": [{
"journeyId": 1001,
"Number": "001",
"DriverNa... |
2018/03/16 | 249 | 804 | <issue_start>username_0: I have a request where I need to check if all records of a column `cost_code` contain a string composed of column `invoices` records
and one character of type number.
How can I achieve this task?
I tried it with this query:
```
SELECT * FROM Deal WHERE cost_code LIKE ('invoice%');
```<is... |
2018/03/16 | 701 | 2,256 | <issue_start>username_0: I am trying to add a SSL certificate to a wordpress container but the default compose configuration only redirects port 80.
How can I add a new port in the running container? I tried to modify the docker-compose.yml file and restart the container but this doesn't solve the problem.
Thank you.... |
2018/03/16 | 915 | 3,060 | <issue_start>username_0: I'm currently planning a new application. The values used in this application can either be entered by the user or calculated by the application itself.
What I need to do is to mark the values in a way that I can clearly identify the source (user or app).
EDIT (additional information): The id... |
2018/03/16 | 508 | 1,576 | <issue_start>username_0: Hi, I am trying to add bootstrap with angular project and the styling is not reflecting in the browser.
```
The details are as below.
Versions:
Angular CLI: 1.7.3
Node: 9.7.1
OS: win32 x64
Angular: 5.2.8
```
installed bootstrap and jquery using angular cli
```
"bootstrap": "^4.0.0"
"jquer... |
2018/03/16 | 560 | 1,944 | <issue_start>username_0: I know typescript is strongly typed, but why the following code prints `12` instead of `3`?
```
function add_numbers(a: number, b: number){
return a + b;
}
var a = '1';
var b = 2;
var result = add_numbers(a, b);
console.log(result);
```<issue_comment>username_1: The ***any*** type hold... |
2018/03/16 | 910 | 3,440 | <issue_start>username_0: am doing this challenge of reversing a given sentence at <https://www.codewars.com/kata/reversed-words/train/java> ,,,I have already managed to reverse the sentence to the expected but am getting a slight error in their JUnit testing..
this is my code to reverse any sentence to the expected res... |
2018/03/16 | 771 | 2,907 | <issue_start>username_0: I'm new to using Heroku so I'm a bit confused because I initially had my website hosted on GoDaddy, but when I added node to my web app I switched to Heroku.
So what is happening is when I visit my website using www. it goes to the correct, updated site, however, when I try the naked route it... |
2018/03/16 | 963 | 3,360 | <issue_start>username_0: I'm trying to display average ratings for jobs on my index page, it works perfectly fine on my [show page](https://i.stack.imgur.com/vQuM9.png)
but on my index page the stars are there but are [blank](https://i.stack.imgur.com/JWTiJ.png), how do i get them to display on my index page?
My Show... |
2018/03/16 | 926 | 2,656 | <issue_start>username_0: i'm attempting to create a RESTful API using PHP. I'm unable to format it in a way I'm used to seeing. Would appreciate some guidance. Thank.
This is the current JSON output:
```
[
{
"boardID": "12345",
"MQ9": "673627",
"MQ131": "87565",
"MQ135": "67887",
... |
2018/03/16 | 639 | 2,419 | <issue_start>username_0: ```
```
I want to reduce the space between Tab Layout text and its indicator.
I am using tab layout with collapsing toolbar that when it slides up, Tab layout will pin on the top.
I have 4 tabs with its corrosponding indicator.
I am sharing my xml & have attached image also.
[![enter ima... |
2018/03/16 | 267 | 873 | <issue_start>username_0: I cant set kendo dropdownlist selected item the way i want.
so far this is what i tried , but it does not seems to work
```
```
i did try to set it like this but i am getting an error
```
$("#YolTipleri").data("kendoDropDownList").value(2);
```
and it give me error
```
Uncaught TypeError... |
2018/03/16 | 352 | 1,060 | <issue_start>username_0: I have been trying to separate each attribute(mmddhhmmyyyy.ss)
Was able to separate the seconds as they are it's preceded with a "."
```
set type [ split $timestamp "."]
lassign $type time seconds
```
Still can't figure out a way to get separate each value of month,day,minute etc<issue_comme... |
2018/03/16 | 643 | 2,311 | <issue_start>username_0: I'm struggling to get bootstrap tag inputs working, but I can't see what I could be doing wrong. As far as I can tell I've even followed the steps in this post [How to use Bootstrap Tags Input plugin](https://stackoverflow.com/questions/38488382/how-to-use-bootstrap-tags-input-plugin)
```html
... |
2018/03/16 | 879 | 3,421 | <issue_start>username_0: I have an array of some objects with the method process() that I want to run parallelized. And I wanted to try lambdas to achieve the parallelization. So I tried this:
```
Arrays.asList(myArrayOfItems).forEach(item->{
System.out.println("processing " + item.getId());
item.process();
})... |
2018/03/16 | 935 | 3,659 | <issue_start>username_0: Something's probably wrong with the implementation of `update()` method but I'm not sure what is:
```
@Override
public int update(@NonNull Uri uri, @Nullable ContentValues contentValues, @Nullable String s, @Nullable String[] strings) {
int count = 0;
switch (uriMatcher.match... |
2018/03/16 | 4,700 | 18,292 | <issue_start>username_0: If I have a repository that contains submodules, and I want to make a bundle for sneakernet, how do I make the bundle include the objects needed to update the submodules?
For example, let's say I have a repository called `parent` and it contains a submodule called `submod`. I want to create a... |
2018/03/16 | 4,654 | 17,784 | <issue_start>username_0: I did some coding to get the nginx config file working.
My objective is to allow all `.well-known` folder and subfolders leaving the rest with basic auth, limit\_req and laravel compatible.
The problem now with let's Encrypt is that it is not renewing the cert because the route `.well-known/a... |
2018/03/16 | 1,820 | 7,024 | <issue_start>username_0: I am trying to bootstrap my angular 5 app based on conditions. Basically I have two modules `MobileModule` and `WebModule` which contains UI components of web and mobile separately.
I am trying to bootstrap `MobileModule` if user has opened the app in mobile browser otherwise `WebModule`.
Her... |
2018/03/16 | 1,015 | 3,167 | <issue_start>username_0: I'm am trying to learn Ruby on rails and I keep getting this error.
My controller is
```
class Clasa9Controller < ApplicationController
def multimi
end
def progresii
end
def functii
end
def vectori
end
def trigonometrie
end
def geometrie
end
end
```
clasa9.html.... |
2018/03/16 | 436 | 1,595 | <issue_start>username_0: I have a c++ code that at one part it stored some values of a measurement in a vector and this vector is a part of set of data schema which is serialized and then sent to a streamer.
There is new requirement that for a specific case I need just one value of the measurement which is always re... |
2018/03/16 | 1,826 | 7,014 | <issue_start>username_0: I have a button on my new and edit views that sends a post request to my Letter controller through an Ajax call. If the Ajax call works perfectly in the new view, it throws a 404 error for my edit view.
Route:
```
post 'letters/ajax_send_test_botletter', to: 'letters#send_test_botletter', a... |
2018/03/16 | 347 | 1,360 | <issue_start>username_0: I have an Android app which uses the immersive sticky mode and it works well on previous versions of Android as well as on Android P, but when turning on the option of simulating a display cutout (notch), the content starts right below the status bar, leaving a blank space.
My code is standard... |
2018/03/16 | 937 | 2,914 | <issue_start>username_0: I keep getting the
>
> "Subscript Out of Range"
>
>
>
error on the .find line.
The idea is the user selects a cell based on the input box. The value of Cell(D) in the row of the selected cell would then be copied and used to find the value in Sheet2 in a given range.
```
Sub AddNewLin... |
2018/03/16 | 958 | 3,160 | <issue_start>username_0: ```
[root@localhost etc]# systemctl status blu_av
● blu_av.service - avscan
Loaded: loaded (/etc/systemd/system/blu_av.service; disabled; vendor preset: disabled)
Active: active (running) since Fri 2018-03-16 16:31:14 IST; 3s ago
Main PID: 31934 (av)
CGroup: /system.slice/blu_av.servi... |
2018/03/16 | 761 | 2,204 | <issue_start>username_0: I come across this in Rails source code:
```
class Object
def duplicable?
true
end
end
class NilClass
begin
nil.dup
rescue TypeError
def duplicable?
false
end
end
end
```
With this code, even after `dup` is removed from an object, that object responds to ... |
2018/03/16 | 927 | 2,016 | <issue_start>username_0: I have string like this:
```
constant = 0.015
history = 90
[thresholds]
up = 100
down = -100
persistence = 0
[thresholds]
up = 100
down = -100
persistence = 0
```
I must convert it to format like this:
```
config.n8_v2_BB_RSI_SL = {
constant: 0.015,
history: 90,
thresholds: {
up: 100,
down:... |
2018/03/16 | 811 | 2,814 | <issue_start>username_0: I've seen two ways of people executing queries using Golang builtin `database/sql` queries. One of them is using `fmt.Sprintf`:
```
func (db *DB) CreateUserTable() (sql.Result, error) {
statement := "CREATE TABLE %s (%s, %s, %s, %s, %s)"
v := []interface{}{"User", "ID int PRIMARY KEY N... |
2018/03/16 | 1,205 | 4,944 | <issue_start>username_0: **Spring boot 1.5.3 project with test user-registry on H2 in memory DB**
This is the **Error Stacktrace**
```
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityConfiguration': Unsatisfied dependency expressed through field 'myAppUserDetai... |
2018/03/16 | 1,002 | 3,495 | <issue_start>username_0: I am processing a text file with an irregular structure that consists of a header and of data in different sections. What I aim to do is walk through a list and jump to the next section once a certain character is encountered. I made a simple example below. What is the elegant way of dealing wi... |
2018/03/16 | 768 | 2,915 | <issue_start>username_0: I have a route like this:
```
[Route("api/elasticsearch/resync/products")]
[HttpGet]
public async Task ResyncProducts()
{
}
```
How can I make it accessible only from the localhost?<issue_comment>username_1: Look into using CORS. Once installed correctly, you should be able to apply an attri... |
2018/03/16 | 1,086 | 3,754 | <issue_start>username_0: I have installed OpenMPI and it works with a simple parallelized hello world program but it doesn't work when `MPI_SEND()` or `MPI_RECV()` is called. I am using gfortran 5.1 and OpenMPI 3.0.1rc4.
The error is
>
> Error: There is no specific subroutine for the generic ‘mpi\_recv’ at
> (1)
> ... |
2018/03/16 | 1,041 | 4,554 | <issue_start>username_0: I am getting data from a WebAPI call in my componentDidMount on my parent react component. I put the values into state.
When I render my form, I am just making custom labels with data (A component), and passing the label text, and the data to this component. (One for each field I am displaying... |
2018/03/16 | 701 | 2,766 | <issue_start>username_0: I have this method in TypeScript/Angular, that generate my file
```
imprimir() {
this.service.emitirAdvertencia({ parametros: [{ name: 'CODIGO', value: 880 }] })
.subscribe((response) => {
console.log(response);
var fileURL... |
2018/03/16 | 935 | 3,489 | <issue_start>username_0: In my Android Aplication I just need to open SMS intent with pre populated ***message\_body*** and the ***PhoneNumber***.
Following is the code I am trying
```
Uri uri = Uri.parse(String.format("smsto:%s", strPhoneNumber));
Intent smsIntent = new Intent(Intent.ACTION_SENDTO, uri);
smsIntent... |
2018/03/16 | 1,210 | 3,377 | <issue_start>username_0: I found a weird thing when I used the operator e.g. `*=` or `+=`
The code:
```
aa = Variable(torch.FloatTensor([[1,2],[3,4]]))
bb = aa
bb = bb*2
print(bb)
print(aa)
cc = Variable(torch.FloatTensor([[1,2],[3,4]]))
dd = cc
dd *= 2
print(cc)
print(dd)
```
The results showed as below:
```
Var... |
2018/03/16 | 880 | 2,729 | <issue_start>username_0: I have users and permissions tables. Relation between them is:
One user `HAS MANY` permissions.
I need to get all users who does not have permission `hide`.
For example, users table has:
```
id ¦ name ¦ email ¦ password
---+ -------+-----------------+----------
1 ¦ Test ... |
2018/03/16 | 920 | 3,864 | <issue_start>username_0: can i intercept notifications when my app is closed?
I need for set badge with this library [ShortcutBadger](https://github.com/leolin310148/ShortcutBadger)
Thanks.<issue_comment>username_1: do you mean it?
```
public class AppFcmMessagingsService extends FirebaseMessagingService {
privat... |
2018/03/16 | 1,017 | 4,258 | <issue_start>username_0: I know, I know, I should have typed
```
docker run -it ubuntu bash
```
But the fact remains, a container has been created, it is there, and it is stopped. It stops as soon as it is started, so there's no way to attach or exec in it.
Is it really the case that there's is absolutely no way to... |
2018/03/16 | 807 | 3,020 | <issue_start>username_0: Assume we have got an array `arr` with all initial values `0`. Now we are given `n` operations - an operation consists of two numbers `a b`. It means that we are adding `+1` to the value of `arr[a]` and adding `-1` to the value of `arr[b]`.
Moreover, we can swap numbers in some operations, wha... |
2018/03/16 | 2,478 | 9,643 | <issue_start>username_0: I have a problem with fragment and recyclerView and retrofit.
my first fragment that shows a list of persons , do not show the content when i start activity of fragments and when i move to third fragment and get back to first , content appear... and also when i use edit text of search and pr... |
2018/03/16 | 910 | 3,163 | <issue_start>username_0: I am trying to automate my hybrid app, where I need to enter details in an input field but using `send_keys("Text value")` is not working in my case. I am getting the exception
`selenium.common.exceptions.WebDriverException: Message: unknown error: call function result missing 'value'`
```
... |
2018/03/16 | 541 | 2,082 | <issue_start>username_0: I would like to know the relation between the size of TensorFlow's checkpoint file and the number of parameters of a model.
I have a model with `1.8` million parameters, which should require about `7` MB of memory (given that `(4 * 1.8 * 10^6) / 1024^2`). However, the saved checkpoint is appar... |
2018/03/16 | 282 | 1,164 | <issue_start>username_0: I am trying to call the REST API exposed from IBM TM1 Cognos. Using the HttpWebRequest object. Getting the 401 when i tried to pass Authorization header with base64(user:password:namespaceId).<issue_comment>username_1: ```
using (var client = new HttpClient())
{
var plainTextBytes = System.... |
2018/03/16 | 490 | 1,985 | <issue_start>username_0: this question is identical to the following: [WKWebView catch HTTP error codes](https://stackoverflow.com/questions/32936168/wkwebview-catch-http-error-codes); unfortunately the methods in Obj-C are not applicable to Swift 4, thus the cited `WKNavigationResponse.response` is no longer of type `... |
2018/03/16 | 310 | 1,207 | <issue_start>username_0: I'm using Team Foundation Server 2017 express edition. My question is related with dashboards. Is there any possibility to change default dashboard or copy dashboard from another project. It's very time-consuming to configure dashboard for every new project.
I'll be very grateful for any help.... |
2018/03/16 | 514 | 1,804 | <issue_start>username_0: I wrote a method that calculates PI (π) by using infinite series:
```
public static decimal NilakanthaGetPI(ulong n)//Nilakantha Series
{
decimal sum = 0;
decimal temp = 0;
decimal a = 2, b = 3, c = 4;
for (ulong i = 0; i < n; i++)
{
temp = 4 / (a * b * c);
... |
2018/03/16 | 1,914 | 5,878 | <issue_start>username_0: I am using the `webpack-dev-server` in development mode (watch). Some json and js files are crowding my build directory every time the server reloads like so :
`'hash'.hot-update.json`:
```json
{"h":"05e9f5d70580e65ef69b","c":{"main":true}}
```
`'hash'.hot-update.js`:
```js
webpackHotUpdat... |
2018/03/16 | 790 | 2,378 | <issue_start>username_0: I have a schema with three tables:
>
> **Project** (*project\_id*,proj\_name,chief\_arch)
>
> **Employee** (*emp\_id*,emp\_name)
>
> **Assigned-to** (*project\_id,emp\_id*)
>
>
>
I have created all tables with data on <http://sqlfiddle.com/#!9/3f21e>
You can view the all data (... |
2018/03/16 | 744 | 2,370 | <issue_start>username_0: Currently, I have some VBA code to auto fill the formulas in columns AE:AH whenever more data is posted into the sheet. I am attempting to future proof it and make the range more dynamic in case we were to add more formulas. Here is the current code.
```
Sheets(twtsumsheet).Select
usedRows1 = ... |
2018/03/16 | 647 | 2,014 | <issue_start>username_0: I've just launched my website's mobile version for browsers, which looks as expected in all the devices I tried, including many different sizes through the Device Emulator of Chrome DevTools.
However, a user just reported that he is seeing both images and text far too big with his OnePlus 3T s... |
2018/03/16 | 314 | 1,112 | <issue_start>username_0: Is it possible to make a SAS Stored Process available via a clean, nicer looking URL, but still be hosted on the server?
The native URL is something like <http://[yourMachineName]:8080/SASStoredProcess/do?_PROGRAM=/WebApps/MyWebApp/Foo>.
I'd prefer a nicer looking URL like <http://[yourMachi... |
2018/03/16 | 446 | 1,308 | <issue_start>username_0: I have allocated a 1D array of structs by 2 methods, which I believe to give me contiguous memory allocation. But when I output the memory locations I see Type 1 allocates with a difference of 4bytes but Type 2 takes 32bytes. Could you please explain why this happens.
Thanks!!
```
#include
... |
2018/03/16 | 838 | 2,973 | <issue_start>username_0: I'm trying to implement an autosave feature in CKEditor 5, where a save only occurs if changes were made and after the editor has lost focus.
How could I do this? The documentation has been very confusing to me.
This is the closest I've gotten:
```
function onChange(el,editor) {
editor.... |
2018/03/16 | 1,536 | 4,975 | <issue_start>username_0: I have a map, filled with values:
```
std::map, double> Cache;
```
When the size of map is greater than 100, I want to delete/erase only the map elements whose values in the key tuple are all more than 10. Here is how it can be done with `while` and `if`:
```
if (Cache.size() > 100) {
a... |
2018/03/16 | 1,221 | 3,957 | <issue_start>username_0: I have an Application Load balancer and 1 EC2 instance currently behind it. Before, I was using another CA for receiving SSL certificates for my domain which was running on the EC2 with nginx. Now, I use SSL from Amazon's Certificate Manager for the load balancer's listener.
Should the domain'... |
2018/03/16 | 702 | 2,673 | <issue_start>username_0: Is there way to call the onclick event from a raycast?
I have world scale canvas attached to an object that has images with buttons.
When I select the button with the mouse my event function is called.
But now I am trying to adjust the code so I can avoid using mouse all together.
```cs
[Seri... |
2018/03/16 | 1,235 | 5,454 | <issue_start>username_0: I have a code for Thread Pool example as follows
```
public class RunThreads{
static final int MAX_TASK = 3;
public static void main(String[] args)
{
Runnable r1 = new Task("task 1");
Runnable r2 = new Task("task 2");
Runnable r3 = new Task("task 3");
Runnable r4 = new Task("... |
2018/03/16 | 1,070 | 4,202 | <issue_start>username_0: ```
[
{
"userId": 1,
"id": 1,
"title": "xxxxx",
"body": "yyyyy"
},
{
```
My json data is like that and I'm using alamofire for loading data and objectmapper for mapping.
I create a swift file for mapping like that:
```
import Foundation
import ObjectMapper
cla... |
2018/03/16 | 350 | 1,192 | <issue_start>username_0: How can I downsize a virtual machine after its provisioning, from `terraform` script? Is there a way to update a resource without modifying the initial `.tf` file?<issue_comment>username_1: I have a solution, maybe you could try.
1.Copy your tf file, for example `cp vm.tf vm_back.tf` and move ... |
2018/03/16 | 1,141 | 4,189 | <issue_start>username_0: The process gets stuck if I am trying to run the app (even when I start from a fresh new project) both on an emulator (Android 5.0 or 6.0) or on my phone (Android 7.1). Following some results I found online, I tried to run gradle offline but it did not work. I did also try the solutions suggest... |
2018/03/16 | 798 | 1,986 | <issue_start>username_0: I have a list of data tables that are of unequal lengths. Some of the data tables have 35 columns and others have 36.
I have this line of code, but it generates an error
```
> lst <- unlist(full_data.lst, recursive = FALSE)
> model_dat <- do.call("rbind", lst)
Error in rbindlist(l, use.names... |
2018/03/16 | 986 | 2,646 | <issue_start>username_0: I'm working on a dataset with a with grouping-system with six digits. The first two digits denote grouping on the top-level, the next two denote different sub-groups, and the last two digits denote specific type within the sub-group. I want to group the data to the top level in the hierarchy (t... |
2018/03/16 | 1,562 | 4,262 | <issue_start>username_0: I'm using `bibtexparser` to parse a bibtex file.
```
import bibtexparser
with open('MetaGJK12842.bib','r') as bibfile:
bibdata = bibtexparser.load(bibfile)
```
While parsing I get the error message:
>
> Could not parse properly, starting at
>
>
>
> ```
> @article{Frenn:EvidenceBase... |
2018/03/16 | 396 | 1,499 | <issue_start>username_0: I need to get result after array loop is completed and do something with this result in Node Js project `count` and I need to check this variable after loop is completed
```
var count = 0;
myArray.forEach(element => {
if(element == 'something'){
count++;
}
});
if(count == 2... |
2018/03/16 | 996 | 3,161 | <issue_start>username_0: I'm developing a WinForm desktop application for users to input employees retirement data, using SQL Server 2008 as DB.
One of the tables that gets part of the user data has a reference to another table whose records were defined at design time, adding a Foreign Key constraint for consistency... |
2018/03/16 | 1,220 | 3,008 | <issue_start>username_0: Similar questions to this have been asked, but I have not been able to apply the suggested solutions successfully.
I have created a plot like so;
```
> elective_ga <- c(68, 51, 29, 10, 5)
> elective_epidural <- c(29, 42, 19, 3, 1)
> elective_cse <- c(0, 0, 0, 20, 7)
> elective_spinal <- c(3, ... |
2018/03/16 | 899 | 2,395 | <issue_start>username_0: My data is a time series.
```
y <- ts(datafile[,"y"], start=1960, frequency=4, end=2010)
```
I want to include quarterly dummies in my forecasting ARIMA model. Is that possible? If so, what's the command for it? I can't seem to find one which allows me to merge the ARIMA model with the quar... |
2018/03/16 | 750 | 2,073 | <issue_start>username_0: Is there a built-in function to join two 1D arrays into a 2D array?
Consider an example:
```
X=np.array([1,2])
y=np.array([3,4])
result=np.array([[1,3],[2,4]])
```
I can think of 2 simple solutions.
The first one is pretty straightforward.
```
np.transpose([X,y])
```
The other one employs... |
2018/03/16 | 1,447 | 5,473 | <issue_start>username_0: Good day everyone,
I'm creating a chatbot for my company and I started with the samples on github and the framework docs.
We decided to host it on Azure and added LUIS and Table Storage to it. The Bot runs fine locally in Botframework Emulator, but on Azure (WebChat, Telegram) it will only ru... |
2018/03/16 | 322 | 1,069 | <issue_start>username_0: With the help of answer of this [question](https://stackoverflow.com/questions/39436406/f-shortest-way-to-convert-a-string-option-to-a-string) I need help with the specific syntax on how to retrieve values from option types in the following case.
```
type Query = {
q : string
pageSize ... |
2018/03/16 | 500 | 1,494 | <issue_start>username_0: I have a set
```
Set entityIds;
```
I want to divide it into packs of 10 pieces. To end up with a sheet of sets and in each set of 10 elements, like this:
```
List> batches
```
How can I do it?
My Solution:
```
private List> splitSet(Set input) {
List> batches = new ArrayList<>();
fo... |
2018/03/16 | 615 | 1,952 | <issue_start>username_0: From c# I am trying to check, if SQL is valid using `SET PARSEONLY ON`, as you see in the following example
```
BEGIN TRY
SET PARSEONLY ON UPDATE SchedulerAction S ET
SELECT 1
END TRY
BEGIN CATCH
SELECT -1
END CATCH
```
In SQL this gives the error
```
Msg 102, Level 15, State 1, Li... |
2018/03/16 | 473 | 1,753 | <issue_start>username_0: How do I store my trained model on Google Colab and retrieve further on my local disk?
Will checkpoints work? How do I store them and retrieve them after some time? Can you please mention code for that. It would be great.<issue_comment>username_1: Google Colab instances are created when you ope... |
2018/03/16 | 552 | 1,969 | <issue_start>username_0: I am creating a react component having html progress bar and i am trying to apply inline style to it but it's not applying the linear-gradient to progress bar.
Here's a sample code
```
const customColor = '#d3d4d5'
const element =
ReactDOM.render(element, document.getElementById('root'));
... |
2018/03/16 | 582 | 1,780 | <issue_start>username_0: I have a container with elements of some arbitrary structure/class.
Is there an elegant way to extract a single property (e.g. member or member.function) into a own array (e.g. to pass it to another algorithm)?
```
#include
#include
#include
int main()
{
struct A{
int n;
int B()const;
... |
2018/03/16 | 979 | 3,783 | <issue_start>username_0: I create Project In MVC.
I made functionality in my project for giving review to user, but i getting one problem.
so i need help.
[Before Adding review - we are showing multiple line(using enter) in text box](https://i.stack.imgur.com/ZLdL0.png)
[After Adding review - it'll display in single... |
2018/03/16 | 335 | 1,283 | <issue_start>username_0: ```
export class myclass implements OnInit {
private outagesList;
private outageArray;
constructor(private outages: OutagesService){}
ngOnInit(){
this.outages.getOutagesList().subscribe((data) => {
this.outagesList = data;
this.outagesList.forEa... |
2018/03/16 | 531 | 2,124 | <issue_start>username_0: In javascript, I am doing something like this
```
first_function: function() {
var timeout = setTimeout(function() {
// doing something
}, 300000);
},
```
In another function, after doing something important I have to access the `timeout`... |
2018/03/16 | 425 | 1,502 | <issue_start>username_0: I'm working on an Angular 5 project and noticed some CSS properties are not inherited correctly from custom elements. For example, consider a custom component `foo`:
```js
@Component({
selector: 'foo',
template: `
inside form
inside form
outside
`,
})
export class FooComponen... |
2018/03/16 | 220 | 865 | <issue_start>username_0: I don't use contact permission in manifest file. But i am getting contact permission in app info screen.
```
```<issue_comment>username_1: Android uses groups of permissions instead of single permission when asking the user to grand them.
You use
```
```
which is in **Contacts** group. ... |
2018/03/16 | 551 | 1,972 | <issue_start>username_0: I have a Cloud Service project that I use to deploy my WebRole through VSTS, on a Hosted Agent.
The build definition is created with the Azure Cloud Services template, and has, amongst others, these steps:
* Build solution \*\*\\*.sln (step #1)
* Build solution \*\*\\*.ccproj (step #2)
I've ... |
2018/03/16 | 489 | 1,646 | <issue_start>username_0: I have a tuple as {'Europe-Fiat-Italy-Warehouse'}.
Car = {'Europe-Fiat-Italy-Warehouse'}.
I want to search the string "Fiat" in the above tuple without converting them to string tokens in a list.
i.e.,
```
(madmax@erlang)46>string:tokens(atom_to_list(element(1, Car)), "-").
["Europe","Fiat","... |
2018/03/16 | 3,877 | 10,475 | <issue_start>username_0: For a very simple classification problem where I have a target vector [0,0,0,....0] and a prediction vector [0,0.1,0.2,....1] would cross-entropy loss converge better/faster or would MSE loss?
When I plot them it seems to me that MSE loss has a lower error margin. Why would that be?
[![enter im... |
2018/03/16 | 1,057 | 3,708 | <issue_start>username_0: I have a select statement and in that select statement I have a few columns on which I perform basic calculations (e.g. [Col1] \* 3.14). However, occasionally I run into non-numeric values and when that happens, the whole stored procedure fails because of one row.
I've thought about using a `... |
2018/03/16 | 621 | 2,410 | <issue_start>username_0: I'm trying to write an sql script that returns an item from a list, if that item can be found in the list, if not, it returns the most recent item added to the list. I came up with a solution using count and an if-else statement. However my table has very frequent I/O operations and I think thi... |
2018/03/16 | 1,008 | 4,216 | <issue_start>username_0: I have a form in a view that is marked with @html.beginForm. This form consists of dropdowns, text boxes and a button. The drop downs are populated dynamically through ajax call. ie. selection of one value from the drop down triggers an ajax call and dynamically populates all the drop down boxe... |
2018/03/16 | 3,301 | 10,696 | <issue_start>username_0: I'm intrigued by the construction described [here](https://stackoverflow.com/a/24844388/2684007) for determining a monad transformer from adjoint functors. Here's some code that summarizes the basic idea:
```
{-# LANGUAGE MultiParamTypeClasses #-}
import Control.Monad
newtype Three... |
2018/03/16 | 875 | 3,157 | <issue_start>username_0: Very basic: I need to pass information from one view to another. They are in the same `ViewController`. What is the most elegant way to approach this?
`NotificationCenter` is not an option
**It would be ideal, if I could access certain properties of a view from another view directly**<issue_c... |
2018/03/16 | 1,183 | 3,982 | <issue_start>username_0: Good day Stack, i'm working on an Android project that uses Android's Room 1.0.0 Alpha 5, the main issue that i'm facing is that every time i need to call one of the DAO from room i need to do something like this:
Activity.java:
```
...
AppDatabase db = Room.databaseBuilder(context, AppDataba... |
2018/03/16 | 706 | 2,152 | <issue_start>username_0: I don't know how to continue in this recurrence cause I don't see any pattern, any help??
```
T(n) = 2n + T(n/2)
= 3n + T(n/4)
= 7n/2 + T(n/8)
= 15n/4 + T(n/16)
and so on...
```<issue_comment>username_1: You can use inheritance and create a `BaseDao` which will be implemen... |
2018/03/16 | 1,294 | 4,438 | <issue_start>username_0: ```
"styles": [
"../node_modules/bootstrap/dist/css/bootstrap.min.css",
"../node_modules/datatables.net-dt/css/jquery.dataTables.css",
"../node_modules/datatables.net-buttons-dt/css/buttons.dataTables.css",
"styles.css"
],
"scripts": [
"../node_modules/jquery/dist/jquery... |
2018/03/16 | 1,164 | 4,155 | <issue_start>username_0: I have this code, where if click on `.comments` depending on if having prior comments...it loads the comments + a comment form, or just a form (no comments) in `.LastComments`
**HTML**
```
[Click to comment]
```
**JQUERY**
```
$('.comment').on('click', function() {
var user = $(this).... |