date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/02/27 | 2,349 | 9,679 | <issue_start>username_0: I have an application which needs configuration and I’ve created a configuration struct and I’m entering the configuration as a parameter to the function. The problem is that the configuration struct becomes bigger (like monolith) and bigger and I move the config to different functions in my ap... |
2018/02/27 | 1,659 | 4,266 | <issue_start>username_0: I have a large `data.frame` and I need some conversion based by row. My purpose is convert all values in rows to `NA` after if there is specific character in column.
For example I provide little sample from my real data set:
```
sample_df <- data.frame( a = c("V","I","V","V"), b = c("I","V","... |
2018/02/27 | 1,497 | 4,550 | <issue_start>username_0: I have 2 csv files (suppose CSV-1.csv and CSV-2.csv) with more than ten thousand data in each. These 2 files have 2 same columns, namely 'filename' and 'number\_of\_changes'. My purpose is to compare these 2 files based on the filename. If the filename in CSV-1 is also in the CSV-2, then check ... |
2018/02/27 | 932 | 2,549 | <issue_start>username_0: I am trying to remove the first and the last row of CSV files in a folder and after that merge them to make one csv file.
I am trying to remove the first and last row with the batch script below but its not working:
```
@echo on
setlocal enabledelayedexpansion
for %%a in (*.csv) do (
find ... |
2018/02/27 | 687 | 2,305 | <issue_start>username_0: How can I override a numpy function as in the example below (setting a different default to the parameter dtype; and how can I find the parent class which belongs for example to numpy.array)?
```
import numpy as np
a = [[1.0, 2, 3], [1, 2, 3]]
np1 = np.array(a)
print(np1.dtype) # gives float... |
2018/02/27 | 565 | 1,967 | <issue_start>username_0: I have set the two Sub domain for front end and back end code. I want to redirect the new domain name if user hit the old domain. But I am getting error- "414 Request-URI Too Large". I am using Nginx server for back end code.
```
server {
root /var/www/html/frontendCode/dist;
index in... |
2018/02/27 | 902 | 3,569 | <issue_start>username_0: I am updating a document according to the code
```
var express = require('express');
var router = express.Router();
var user = require('./user');
router.put('/:username/email',
function(req, res, next) {
console.log("control check");
next();
},
email.acquire,
f... |
2018/02/27 | 653 | 2,567 | <issue_start>username_0: i have programmed a procedure to find all values of a list and store them in a collection. There are identical values but each value only should be stored once.
Here is my vba code:
```
For intRow = intStart To ActiveSheet.Cells(Rows.count, 1).End(xlUp).Row
k = 1
Do
... |
2018/02/27 | 2,021 | 8,472 | <issue_start>username_0: Here is the full code. The app is working perfectly but the only thing where I am facing problem is that --->
1. When the user registers for the first time, the app registers properly but when I close the app and open the app it still shows the registration window where as it show show the Welc... |
2018/02/27 | 928 | 3,234 | <issue_start>username_0: I am trying to send data from parent view controller to child view controller, whenever I override the performSegue method, the data loads to the popup view as shown below:
[](https://i.stack.imgur.com/bTA7s.png)
But what I ... |
2018/02/27 | 479 | 1,713 | <issue_start>username_0: for my app, I need `ScrollView` component to be scrolled both vertically and horizontally. I searched quite a lot but, could not come out to solution. Tried `directionLockEnabled`, did not work. `contentContainerStyle` is not way, because my row and columns numbers are dynamic, it may expand in... |
2018/02/27 | 373 | 1,417 | <issue_start>username_0: I am a relative newbie to regular expressions. I have a very simple use case in Python but I'm not able to figure the easiest way to do it. I have a paragraph which I want to split into sentences. Its a technical paragraph explaining certain steps, so I am using a very simple thing for now, whi... |
2018/02/27 | 275 | 1,030 | <issue_start>username_0: I'm trying to add simple form element which must not be controlled by Angular.
The goal is to POST file download request, passing authentication token with use of hidden input.
Form code:
```
```
At server side (aspnet core) I'm returning FileResult with CSV data to download.
This approach... |
2018/02/27 | 2,098 | 6,550 | <issue_start>username_0: Below is the trigger that am using to generate the value of `EMP_ID` by concatinating `EMP_KEY` with some text ,let say the `EMP_KEY =2000` and `TYPE_ID=1` then depending on the condition ,the value of EMP\_ID should be CON2000 and so on.
But when a record is inserted,the value of `EMP_ID` is g... |
2018/02/27 | 543 | 2,328 | <issue_start>username_0: I am working with Oracle PL-SQL packages. There was a flow which seems to have an issue when executing and I was trying to figure it out. I did some data correction and still the issue was there. So I added traces and executed the flow again and there it worked perfectly!!!
It seems that the i... |
2018/02/27 | 873 | 2,457 | <issue_start>username_0: I have an array `["a","b","c","d","e"]`.
I want to move element index 1,2 to move one step up/down in the order so that new array would be `["b","c","d","e","a"]`.
If it is single element only, I can do that, but I could not figure out, how to do that in JavaScript.
The number of index eleme... |
2018/02/27 | 859 | 2,720 | <issue_start>username_0: I would like to list directory tree, but I have to write script for it and as parameter script should take path to base directory. Listing should start from this base directory.
The output should look like this:
```
Directory: ./a
File: ./a/A
Directory: ./a/aa
File: ./a/aa/AA
Directory: ./a/a... |
2018/02/27 | 715 | 2,710 | <issue_start>username_0: I have built a command which triggers file downloads from over the internet, however since these files need to be processed by another component, we need to make sure that every file that has been downloaded and has not been modified in the last 10 seconds, is a proper video and not corrupted/p... |
2018/02/27 | 987 | 4,099 | <issue_start>username_0: I am new to iOS programming...Can someone guide me, how to use Home Kit Accessory Simulator and from where can I get it.
I tried to setup my simulator like this but cant figure out, how to use it..

Thanks,
Soumyashree<issue_comment>user... |
2018/02/27 | 1,954 | 7,001 | <issue_start>username_0: i am making a project in Nodejs and express i have a logic in response to a ajax call which query `MongoDb` database via its aggregate framework and then process the result so obtained.
Result obtained from `MongoDB` Query
```
[ { _id: 'ALR', count: 7 },
{ _id: 'WTK', count: 3 },
{ _id:... |
2018/02/27 | 548 | 1,890 | <issue_start>username_0: Let's say that I have a button with fuction add a class named `open` to a `div#foo` element, and when it's all done I need to change other element style `div#bar`
fyi the default style of the `div#bar` is `position:fixed`
So here is my code
```
function checkForChanges()
{
if ($('#foo')... |
2018/02/27 | 496 | 1,526 | <issue_start>username_0: How do I sum fields N1 to N5 in model Trans?
```
public class Trans
{
public int id { get; set; }
public int N1 { get; set; }
public int N2 { get; set; }
public int N3 { get; set; }
public int N4 { get; set; }
public int N5 { get; set; }
}
```
...
```
trans: Trans = ... |
2018/02/27 | 909 | 3,004 | <issue_start>username_0: I have a sql query with `where` condition as `ROWNUM=10`. And the query result i store it in one `GTT` table. But it is possible that the sql query is fetching more records than the mentioned WHERE condition i.e. `ROWNUM=10`.
So i wanted to know, is the query fetching `>10` records are not.
T... |
2018/02/27 | 807 | 2,688 | <issue_start>username_0: I'm new to continous integration on iOS,
I try to run build with `gitlab-runner` and use `shell` as executor but I got issue that `pod cannot run as root` I am sure that I am not installing cocoapods with sudo and I try run `whoami` at `before_script` and that's right my runner run as root
[ Java 8 lambda instrumenting, but this support was [removed](https://docs.appdynamics.com/display/PRO43/Monitor+Java+Interface+Static+and+Default+Methods) in 4.3.
I cannot f... |
2018/02/27 | 722 | 2,596 | <issue_start>username_0: I am trying to create a game, and I have a circle now I want to detect if a user has touched the edges of the circle.
It does need to be code even an explanation on how to do it would be great, but if there would be code it would be appreciated :D
This is the example:
[
[Picture 2](https://i.stack.imgur.com/OaNU6.png)<issue_comment>username_1: `calcbouns` is a... |
2018/02/27 | 1,145 | 3,521 | <issue_start>username_0: I am trying to lookup for a connectionFactory in a code which is deployed as part of osgi bundle in servicemix (karaf)
```
final Hashtable jndiContext = new Hashtable();
jndiContext.put(Context.INITIAL\_CONTEXT\_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
jndiContext.put(Context.SECURITY\_AUT... |
2018/02/27 | 1,158 | 4,673 | <issue_start>username_0: I know such a question is asked before. I made sure that they have the same data type and also checked my syntax, but I am still getting the error:
```
ALTER TABLE meetings ADD FOREIGN KEY (ownerName) REFERENCES employees(name);
```
>
> ERROR 1215 (HY000): Cannot add foreign key constraint... |
2018/02/27 | 1,131 | 3,834 | <issue_start>username_0: I have run the command "npm install --save ng2-social-share".
and then add into app.module.ts :-
```
import { CeiboShare } from 'ng2-social-share';
@NgModule({
imports: [
CeiboShare
]
});
```
and then i add into my home.component.ts :-
```
import { CeiboShare } from 'ng2-social-sh... |
2018/02/27 | 725 | 2,798 | <issue_start>username_0: I'm using symfony 3.3 and php 7.0 with the FOSUserBundle version 2.1.1 and I just realize that in the User Entity if you just add in the setters parameters the type hint like for example this... the validation will fail.
```
php
namespace AppBundle\Entity;
use ...;
/**
* @ORM\Entity
* @ORM... |
2018/02/27 | 1,504 | 5,612 | <issue_start>username_0: I'm trying to use ajax to populate a friends list. Here is what I have:
```
var username = $\_GET['profile\_username'];
$(document).ready(function(){
function ajaxfriendsdefault(){
$.ajax({
url:'includes/handlers/ajax\_load\_profile\_friends.php',
type:'POST',
data:username,
succ... |
2018/02/27 | 1,792 | 3,747 | <issue_start>username_0: Im a looking to make four pic side by side yet unsuccessul. Two on top two on the bottom. I want to make sure that they stay the same with all browser size except mobile.
Here is my attempt so far
```css
#imageone{
position: absolute;
top:0px;
width: 50%;
padding:0px;
}
#imaget... |
2018/02/27 | 911 | 2,807 | <issue_start>username_0: I am studying Javascript and currently learning the .sort() function for arrays. I understood that it can take either no argument or one between a-b and b-a.
What I don't understand however is the use of `return 0`, `return -1` and `return 1`. Here is an example (source: <http://www.codewars.c... |
2018/02/27 | 616 | 2,021 | <issue_start>username_0: i want to scroll automatically to the bottom in a Edittext.
i found nothing in the web about it. Its only about the ListView.
Is there any solution to do it with the Edittext?
Thank you<issue_comment>username_1: >
> Where can I find resources with details about that return element?
>
>
> ... |
2018/02/27 | 758 | 2,766 | <issue_start>username_0: I'm using the Off-screen rendering component `TChromiumOSR` in the dcef3 package - the Delphi wrapper for `Chromium-embedded` library.
Situation
=========
`FormA` contains a `TChromiumOSR` and paints the output.
Modal `FormB` modifies the web page by executing some `js` code against `FormA.TC... |
2018/02/27 | 625 | 2,334 | <issue_start>username_0: I've read [following article](http://www.baeldung.com/junit-5-repeated-test) and I understand that I can ask junit to execute test several times by adding following annotation:
```
@RepeatedTest(value = 3, name = RepeatedTest.LONG_DISPLAY_NAME)
```
But I want to start these 3 time in paralle... |
2018/02/27 | 390 | 1,044 | <issue_start>username_0: in Angularjs I got a response like this format in date **`created_at : "2018-02-21 00:00:00"`**
i want to change in to in this format **`21-Feb-2018`**
How to achive this ?<issue_comment>username_1: Use the date filter in angular. Below is a demo of the same. More details for angular [Date Fi... |
2018/02/27 | 1,095 | 2,173 | <issue_start>username_0: **I am storing json object into cookies in browser window, but when I read cookie for the same json object I stored it returns me follwing json object:**
>
> "j%3A%7B%22request%22%3A%22login%22%2C%22provider%22%3A%22facebook%22%2C%22idd%22%3A1%2C%22auth\_token%22%3A%2<KEY>%22%2C%22auth\_name%... |
2018/02/27 | 475 | 1,471 | <issue_start>username_0: For example I have this code:
```
```
How do I get all these attributes that are in the div tag? I want to get the class and ng-keydown using jquery for example and how can I add something to this using jquery, for example, if I wanted to add ng-mouseclick to this.<issue_comment>username_1: ... |
2018/02/27 | 1,195 | 3,495 | <issue_start>username_0: I'm trying to build my vue project and push it into github pages.
I'm trying to run `npm run build` but all I'm getting is this :
```
> my-domain@1.0.0 build /Users/macbookair/Workspace/fun/mine/web
> cross-env NODE_ENV=production webpack --progress --hide-modules
Hash: 2399923ef57865258a1f ... |
2018/02/27 | 575 | 1,792 | <issue_start>username_0: Can someone explain why I get an error Code 1222 (The used SELECT statements have a different number of columns) after I run this query?
```
INSERT IGNORE INTO table1(id1)
SELECT id2 FROM table2;
```
It's pretty obvious that number of columns are the same, so real issue must be somewhere els... |
2018/02/27 | 565 | 2,464 | <issue_start>username_0: The Android Application crashes after I use ImageButtons, previously I used drawable shapes and it was working fine.
**activity\_app\_list.xml**
```
```
**AppListActivity.java**
```
package com.smartcarassistant;
import android.content.Intent;
import android.support.v7.app.AppCompatActivi... |
2018/02/27 | 867 | 2,894 | <issue_start>username_0: I want to define an Array type that must contain a chain of nested property names of a given type.
Let's say I have a type:
```
type Foo = {
outer: {
inner: any;
}
}
```
Now I want to define an Array type with 2 elements:
```
type PropertyList = [K1, K2]... |
2018/02/27 | 959 | 3,291 | <issue_start>username_0: So i want to make a maze game in Visual Basic and if the cursor reaches a certain panel, it will show a message box ONCE and then the Form closes.
The question is How?
I've tried
```
Private Sub Panel1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handle... |
2018/02/27 | 997 | 3,595 | <issue_start>username_0: I wanna to check if a thread job has been finished to call it again and send another parameter to that. The code is sth like this:
```
void SendMassage(double Speed)
{
Sleep(200);
cout << "Speed:" << Speed << endl;
}
int main() {
int Speed_1 = 0;
thread f(SendMassage, Speed_... |
2018/02/27 | 927 | 2,654 | <issue_start>username_0: I have a pretty simple question. My goal for this short program is for it to display the set of numbers(which is hard coded), then have the user specify which index a number of the array should be deleted from. It then outputs the new array. This program works but has one major error. When I ru... |
2018/02/27 | 726 | 2,924 | <issue_start>username_0: I have two javascript files that look like:
```
// module1.js
var globalFunction = function(val1, val2, callback){
var localVariable1 = val1;
var localVariable2 = val2;
someAsyncFunction(function(){
callback(localVariable1, localVariable2 );
});
}
module.exports = func... |
2018/02/27 | 534 | 2,306 | <issue_start>username_0: I am writing a relatively small bash script that is supposed to update DNS records for a server behind a NAT which might change its external IP address. Essentially a free DynDNS using my DNS provider's API.
I am retrieving the server's IP address using a simple query to an external service. B... |
2018/02/27 | 715 | 2,341 | <issue_start>username_0: I tried using the code below but it display the entire row in the new sheet. Is there a way that i can move only specific columns to the new sheet by modifying the vba macro code below?
Thanks in advance!
```
Sub CopyExpired()
Dim bottomB As Integer
bottomB = Sheets("sheet1").Range("... |
2018/02/27 | 627 | 2,088 | <issue_start>username_0: I use `vscode` open my .py file. And then I see too many errors alert by `flake8` almost cross the whole file. And most of them is about whitespaces.
[](https://i.stack.imgur.com/f65B3.png)
[, but it is not useful for my case, because
1) I am trying to maintain previous border but as of now its recalculate border while scaling.
I ha... |
2018/02/27 | 2,860 | 9,741 | <issue_start>username_0: I am developing a rest API that gets requests composed of multiple objects and saves them to the database. Then, another array of objects is returned as the response. All objects are of only one model.
```
class Ratings(models.Model):
id = models.AutoField(primary_key = True)
userId = ... |
2018/02/27 | 819 | 2,594 | <issue_start>username_0: I want to change the parent's prop's value from a child component. This works great in vuejs 1 but not in vue 2 (I want to use it in vue.js 2).
Here is a small example :
HTML
====
```
<
```
JavaScript
==========
```
var parent = {
template: '',
props: ['content'],
};
var child = {
... |
2018/02/27 | 583 | 1,811 | <issue_start>username_0: I'm trying to set up Django REST Framework with Django 2.0 project which means `url(r'^something/' ...` has been replaced with `path(something/ ...`.
I'm trying to work out how to set up my `rest_framework` patterns.
This is what I have:
```
router = routers.DefaultRouter()
router.register(r... |
2018/02/27 | 540 | 1,791 | <issue_start>username_0: ```
HttpMethod.CallHttpPOSTMethod('POST',null, path).success(function (response) {
console.log(response);
$scope.htmlString = $sce.trustAsHtml(response.data[0]);
$timeout(function () {
var temp = document.getElementById('form');
if (temp != null) {
temp.s... |
2018/02/27 | 369 | 1,507 | <issue_start>username_0: I have 2 tabs in my project- outer Tab and inner Tab. In my inner Tab I have maps and lists which shows markers and details.
Now I want to reload (fetch data) when i change the tab from either maps to lists or vice versa. I could only call them once ie first visit as i have been calling the AP... |
2018/02/27 | 636 | 1,687 | <issue_start>username_0: >
> I want to get weekly date wise data ,corresponding to values in **sql server**.
>
>
> data like date.
>
> `date tariff` .
>
> `27/03/2017 1`.
>
> `28/03/2017 1`.
>
> `29/03/2017 2`.
>
> `30/03/2017 2`.
>
> `31/03/2017 6`.
>
> `1/03/2017 6`.
>
> `2/03/2017 6`.
> ... |
2018/02/27 | 657 | 2,462 | <issue_start>username_0: I am a newbie to C#, and finding difficult to call a C++ API from C# project
I have created file "socket.dll" which has C++ API's. Below is the snippet
source.cpp+source.h->socket.dll
```
#include "Source.h"
void PiblRequestCallback(PibMsgConf &msg, void *param)
{
cout << "In PibRequest... |
2018/02/27 | 1,318 | 4,795 | <issue_start>username_0: I am having an awful lot of trouble connecting to an RDS via Java for the first time. The full workflow is: Api-gateway method is invoked, calls the appropiate Lambda function (lambda in the aws sense), the lambda function connects to a Relational Database already running on AWS, and performs a... |
2018/02/27 | 657 | 2,813 | <issue_start>username_0: After google the question, it makes me confused. Does every app in iOS has the same `DeviceToken`?
Here is the `Apple Document` about the issue.
>
> A device token is an opaque NSData instance that contains a unique identifier assigned by Apple to a specific app on a specific device. Only AP... |
2018/02/27 | 643 | 2,406 | <issue_start>username_0: Suppose we have a model like this :
```
class BankAccount extends Model
{
protected $fillable = ['title', 'rate', 'bank_id', 'account_number', 'active'];
{
```
As you can see there is a `$fillable` property.
When storing a new model I used these codes :
```
public function store(Bank... |
2018/02/27 | 492 | 2,246 | <issue_start>username_0: None of AMP page would be pass by W3C validation, why so? As we know that W3C is standard community to validate any page on internet as its developed by taking care HTML code. But when we checked any AMP page and try to pass it from W3C validation then we always get failed response.<issue_comme... |
2018/02/27 | 749 | 2,541 | <issue_start>username_0: ```
let cell = tableview.dequeueReusableCell(withIdentifier: "cell1") as! viewTableViewCell
let head = titlelist[indexPath.row] as! String
cell.lbl.text = head.uppercased()
if(UIScreen.main.bounds.size.height == 1366)
{
cell.img.heightAnchor.constraint(equalToConstant: 216).isActive = t... |
2018/02/27 | 804 | 2,631 | <issue_start>username_0: I want to create a random select query where `records` compare each other within the same table based on `bid` column. The difference between should 50 number of comparison between `bid` column?
**For Example**
```
select query should be select only 400,350,375 these `bids` in the range of
... |
2018/02/27 | 662 | 2,217 | <issue_start>username_0: [screenshot](https://i.stack.imgur.com/aVDbc.jpg)
I have added the adsense code in the widget area. And it's not showing any ad in the front-end. It's showing full code
[screenshot-2](https://i.stack.imgur.com/Zxp3g.jpg)<issue_comment>username_1: You can try
```
cell.img.translatesAutoresizi... |
2018/02/27 | 392 | 1,556 | <issue_start>username_0: I search to know how to display back button in a class which inherit from FragmentActivity,
```
public class GoogleMapsActivity extends FragmentActivity
```
I know there is the method onBackPressed() which can be override but i don't know how to display back button
```
@Override
public void... |
2018/02/27 | 1,202 | 3,111 | <issue_start>username_0: I write a pattern and it works in Python, but when I run in Go 1.9.2, it panics:
```
panic: runtime error: invalid memory address or nil pointer dereference
```
The code as follows:
```
package main
import (
"regexp"
"fmt"
)
func ReHaveSlash(s string) bool {
reSlash, _ := rege... |
2018/02/27 | 941 | 2,722 | <issue_start>username_0: I need to make a table with answers to a question. I am putting questions in th and I need multiple answers related to that question.
[](https://i.stack.imgur.com/Rhm2t.jpg)
The main problem is that I can not achieve that ans... |
2018/02/27 | 957 | 2,723 | <issue_start>username_0: Trying to use appveyor CI for a C++ project (Makefile) with binding in C# so I would like to be able to run csc.exe from the script line.
According to the doc <https://www.appveyor.com/docs/build-environment/#net-framework>, I would say csc.exe must be installed somehow in the image.
i.e. n... |
2018/02/27 | 1,565 | 5,140 | <issue_start>username_0: I am creating an app using Node, Express and Handlebars and multer for uploading images. Every time I submit the form, req.file is undefined. I've spent the entire day troubleshooting but can't figure out what I'm doing wrong.
**Router File:**
```
const express = require('express');
const r... |
2018/02/27 | 759 | 1,993 | <issue_start>username_0: I would like to find the intersection of two dataframes based on the date column.
Previously, I have been using this command to find the intersect of a yearly date column (where the date only contained the year)
```
common_rows <-as.Date(intersect(df1$Date, df2$Date), origin = "1970-01-01")
... |
2018/02/27 | 243 | 748 | <issue_start>username_0: I got a json array in AJAX success response. Now I want to get that value in HTML file in PHP variable.<issue_comment>username_1: You Can Try This Way.
```
success:function(data)
{
$('#html_id').val(data.id);
$('.html_class').val(data.class);
$('.html_class').h... |
2018/02/27 | 305 | 973 | <issue_start>username_0: I want to open chrome using bat file, but when chrome specific process closes the cmd should close as well. I've tried it but doesn't seem to work.
```
"C:\Users\andreas\AppData\Local\Chrome\Application\chrome.exe"
```
Shouldn't the bat file be attached to the app and when the app closes the... |
2018/02/27 | 1,690 | 8,498 | <issue_start>username_0: Can anybody see where i am going wrong? The tableView controller should display either 1 or 4 sections (depending on input from the previous View Controller) along with a dynamic number of rows coming from the **array(s)**.
The program is supposed to populate each section with a different arra... |
2018/02/27 | 753 | 2,503 | <issue_start>username_0: Given following problem:
[](https://i.stack.imgur.com/XGSje.png)
I have 2 solutions:
First is to calculate difference in absolute angles, then renormalize angle. bad idea, 2 x atan2() is slow, renormalisation is inefficient.... |
2018/02/27 | 661 | 2,430 | <issue_start>username_0: I was wondering if there is reasonable simple method of showing a modal after some time when a page isnt being showed to the user. So i have a page, i dont close it but i go to another one, as soon as that happen a time starts, if i dont come back to the page in lets say less than 5 min, a moda... |
2018/02/27 | 1,450 | 4,244 | <issue_start>username_0: Here is my code that takes a 4 character string of 1's and 0's and converts to decimal using `bitset` function. It is returning correct values for all combinations except those involving 11's and 10's like `{1110,1010,1011,1111}`. For these numbers its returning the result ignoring MSB. That is... |
2018/02/27 | 402 | 1,422 | <issue_start>username_0: I've found the following code:
```
def set_interval(func, sec):
def func_wrapper():
set_interval(func, sec)
func()
t = threading.Timer(sec, func_wrapper)
t.start()
return t
```
I want to schedule one function and refresh it automatically.
To do this I've p... |
2018/02/27 | 940 | 3,562 | <issue_start>username_0: I'm in a bit of a dilemma. I am using ES6 classes for building a simple class hierarchy. One base class with a method, 3 subclasses that override that method. At some some point, i am traversing a list of instances where i call this method. Technically i don't need the class hierarchy if i can ... |
2018/02/27 | 819 | 3,146 | <issue_start>username_0: so I wrote a predicate that counts how many times an element occurs in a list of lists.
```
count([], _, 0). #base case
count([[Elem|Rest]|OtherLists], Elem, Count) :- #Elem is the head of sublist
!,
count([Rest|OtherLists], Elem, NewCount),
succ... |
2018/02/27 | 469 | 1,404 | <issue_start>username_0: I want to know is it possible to place a function inside a read -p command.
```
flashRed="\033[5;31;40m"
red="\033[31;40m"
none="\033[0m"
question(){
echo -e $none"Do you wan to remove" $flashRed"$1?" $none
}
read -p $question response
```<issue_comment>username_1: I think a better formu... |
2018/02/27 | 762 | 3,441 | <issue_start>username_0: I faced with following problem in `spring-session`:
```
@RestController
public class TestService {
@Autowired
private SessionRepository sessionRepository;
@GetMapping("/test")
public void test() {
Session session = sessionRepository.createSession();
TestDomain... |
2018/02/27 | 784 | 2,554 | <issue_start>username_0: I am having trouble with java. I want to get input from the user that has words and numbers and the output would be to seperate each word or number with a slash and display the word count and the sum of all the numbers listed
```
import java.util.Scanner;
import java.util.regex.Pattern;
publ... |
2018/02/27 | 877 | 2,898 | <issue_start>username_0: I am using this to find list duplicates:
```
(defun have-dups (x)
(let ((dups (copy-tree x)))
(if (eq (length (delete-dups dups)) (length x))
nil
t)))
(have-dups (list 1 2 3 3)) ;=> t
(have-dups (list 1 2 3)) ;=> nil
```
Considering the overhead of `copy-tree` and `delete... |
2018/02/27 | 1,014 | 3,643 | <issue_start>username_0: I'm learning Laravel 5.6, and I want to be able to use my existing `user` table which is present in another database. It's still called users, but it has lots and lots of data in it.
In order to achieve this I really need to do two things:
* Have Laravel use the `users` database in a differe... |
2018/02/27 | 736 | 2,086 | <issue_start>username_0: I would like to display Monday as the first day of the week and Sunday the last day of the week.
I am using for this report the Report server.
my query:
```
Select
Datum,
Sum(Prod) as Prod
FROM (
Select
intervaldate as Datum,
Sum(case when TabName = 'Produzierte Dosen' then DisplayUnit... |
2018/02/27 | 1,469 | 5,185 | <issue_start>username_0: In [this spring boot project](https://github.com/MaxHoefl/springboot-jpademo) I get an error when `POST`ing (using Postman) a new `Item` resource
```
Resolving exception from handler
[public com.example.demo.resource.Item com.example.demo.controller.ItemController.addItem(com.example.de... |
2018/02/27 | 651 | 2,776 | <issue_start>username_0: I have following code:
```
@RunWith(ParallelSuite.class)
@Suite.SuiteClasses({Test1.class,
Test2.class,
Test3.class,
Test4.class,
Test5.class,
Test6.class,
Test7.class})
public class ParallelRunner {
}
```
I ran it and figured out that only 3 t... |
2018/02/27 | 454 | 1,708 | <issue_start>username_0: "An error occurred. Detailed message: An error occurred while sending the request."
This is the error I get when trying to sync commits with server from VS.
Although, pushing to Git from command line works fine.
Tried restarting Visual Studio and reinstalled Git. Didn't help.
How can I fix this... |
2018/02/27 | 856 | 2,548 | <issue_start>username_0: I wanted to join 2 arrays of the same length. However I want to join each element of with it's counterpart and produce a new array with the combined values.
```
// will always be string
var array = [a, b, c, d]
// Will always be number
var array2 = [1, 2, 0, 4,]
var output = [a1, b2, c0, d... |
2018/02/27 | 1,155 | 4,415 | <issue_start>username_0: I stumbled upon a problem while trying to parse a JSON in my android app. In the screenshot below I provided the structure of the JSON. I can't get further than getting the "geometry" JSONObject. Eventually I need an array containing LatLng's for each "feature".
If anyone can point me in the ... |
2018/02/27 | 1,545 | 4,957 | <issue_start>username_0: My first Angular 5 app...
I'm setting up a Jasmine test according to: <https://angular.io/guide/testing> and as soon as it starts, I get the following error:
```
ERROR in src/app/pizzaplace.service.spec.ts(3,10): error TS2305: Module '"/home/thomas/git/pizza-cloud-site/pizza-cloud-admin/src/a... |
2018/02/27 | 861 | 3,343 | <issue_start>username_0: i want to change Local time to UTC and vice-versa, by taking users date value.(User will choose the dateand Time and according to dates it will change to UTC and vice versa )
Can someone help on this<issue_comment>username_1: Coordinate is a json array and each element in it, also contains a j... |
2018/02/27 | 674 | 2,812 | <issue_start>username_0: Here is my function for calling product attribute collection I have already get product attributes for the product's which are enabled but I am having issue in filtering them according to their own visibility i.e I want only those product attributes collection whose status is set visible from a... |
2018/02/27 | 542 | 2,070 | <issue_start>username_0: ```
button2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String emailList[]= {"<EMAIL>"};
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("message/rfc822");
intent.putExtra(Intent.EXTRA_EMAIL,emai... |