date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/14 | 977 | 2,342 | <issue_start>username_0: Yep, much discussed and similar questions down voted multiple times.. I still can't figure this one out..
Say I have a dataframe like this:
```
df = pd.DataFrame(np.random.randint(0,100,size=(100, 4)), columns=list('ABCD'))
```
I want to end up with four separate list (a, b, c and d) with t... |
2018/03/14 | 762 | 2,090 | <issue_start>username_0: Doing this with the [date-functions.js](https://gist.github.com/xaprb/8492729) library (used e.g. in datetimepicker jQuery plugin):
```
Date.parseDate('2018-03-10 12:12', 'Y-m-d H:i')
```
gives:
```
Sat Mar 10 2018 12:12:00 GMT+0100 (Paris, Madrid)
```
**How to get the result as Unix time... |
2018/03/14 | 986 | 2,930 | <issue_start>username_0: I am trying to get values from a form into my database as boolean type.
Basically, each question has many checkboxes, and if a user checks the box, i want it to put in 1 for true and whichever ones are not checked to insert 0.
I have attempted to get them in, however no luck.
Please see addi... |
2018/03/14 | 1,145 | 5,517 | <issue_start>username_0: I have gone through a lot of docs but it seems my problem is strange.
I have configured Oauth but I am not able to get the bearer token back. whenever I hit api to get the token, I get 200 but nothing back in response(I am expecting bearer token). Below is the config:
```
public partial class... |
2018/03/14 | 723 | 3,334 | <issue_start>username_0: i have a class called Feature and it contains the following methods setUser(boolean),execute(), doExecute()
And according to the below stated parameters, when i call execute() method, doExecute() method should be called only once.
I tried to test that doExecute() method is called only once in ... |
2018/03/14 | 865 | 3,444 | <issue_start>username_0: Consider below code. How can I test this without using third party libraries? The Assert line is never executed, because it is a different thread and the vm stops running. Many thanks!
```
public class FileParserTask extends AsyncTask> {
private FileParserResult mResult;
public interface F... |
2018/03/14 | 877 | 2,941 | <issue_start>username_0: I'm trying to convert an `SKSpriteNode` item name to an `Int`...
That's the code:
```
let item = SKSpriteNode(imageNamed: "enemy")
item.name = "1"
```
Then, in `touchesEnded`:
```
guard let touch = touches.first else { return }
let location = touch.location(in: self)
let touchedSKSpriteNod... |
2018/03/14 | 581 | 2,081 | <issue_start>username_0: I am developing a web service where I need to call an Oracle procedure in PHP. The Oracle procedure will take time to process and after completion it will write in a table.
How do I return an error in the web service response if the procedure call is taking too much time?
Note: I am stuck wi... |
2018/03/14 | 1,045 | 4,279 | <issue_start>username_0: My goal is to build a simple app which:
* Has `UITableViewCell`s by fetching items from `Firebase`.
* Each cell performs a segue to another `ViewController` when tapped.
* Shows further details of the fetched items in the presented `ViewController`.
With the work I've done so far:
* I can su... |
2018/03/14 | 516 | 2,053 | <issue_start>username_0: I have a CouchDb instance running a peruser database configuration.
Each user database generated (when a user is added to the `_users` database) needs to have the same design documents with view/list logic etc.
What is the defacto way to add the design documents to the database upon databas... |
2018/03/14 | 749 | 2,352 | <issue_start>username_0: I have an input data set, which may look something like this:
```
DF=data.frame(
Variable = c("Test1", "Test2", "Test3"),
Distribution = c("Normal", "Exponential","Poisson"),
Variable = c(2, 3, 4),
SD = c(2, NA, NA))
```
I want to use the random probability functions (e.g. ... |
2018/03/14 | 1,255 | 4,653 | <issue_start>username_0: I am trying to make a static webpage using RMarkdown. I want to define a UI which has a first layer of tabs and then tabs underneath the first layer. I've already looked into a similar question at [RMarkdown: Tabbed and Untabbed headings](https://stackoverflow.com/questions/38062706/rmarkdown-t... |
2018/03/14 | 931 | 3,291 | <issue_start>username_0: I just want to know if possible to change the email subject if the order have the specific category like (Preorder). I want to put PO at beginning (PO New customer order #0000) then all other order the customer receive the default email subject (New Customer Order #0000).
```
add_filter('wooco... |
2018/03/14 | 922 | 3,486 | <issue_start>username_0: I am facing an issue with Elasticsearch.
I would like use the geo distance feature to fetch all the item located N km maximum from a given localization.
Here is my DB schema:
```
{
"user_id": "abcde",
"pin" : {
"location" : {
"lat" : 40.12,
"lon" : -71.3... |
2018/03/14 | 1,100 | 4,382 | <issue_start>username_0: I am an angular 2 beginner and I was following a tutorial... but got stuck at this point. I am not able to move forward cause I am not able to inject HTTP service inside the custom service(message.service.ts).
I Tried to find figure it out,I found this is happening due to "CIRCULAR DEPENDENCY... |
2018/03/14 | 782 | 3,150 | <issue_start>username_0: Recently we upgraded our .NET solution from .NET Framework 4.5 to 4.6.2. The project is in Git repository and we are having multiple branches of this repository. We re-targeted the Nuget packages to 4.6.2 and with that I could see Nuget packages getting restored automatically while rebuilding t... |
2018/03/14 | 1,207 | 4,307 | <issue_start>username_0: Below are two list Some1 and Some which actually has same object data but different in order of elements in object and order of objects in array. My concern is below has to return true. Please favour
```
List lome1=new ArrayList();
Some some1 = new Some();
some1.setTime(1000);
some1.setStar... |
2018/03/14 | 733 | 2,084 | <issue_start>username_0: I have 3 columns [A, B, C] in my SQL table. I want to find table entries, where values in A is same, in B is same, but C is different.
```
A B C
1 2 3
4 5 6
*3 4 5*
*3 4 6*
*7 8 9*
6 1 2
*7 8 3*
```
I want to preferably get something like:
```
A B C
3 4 5
3 4 6
7 8 ... |
2018/03/14 | 353 | 1,334 | <issue_start>username_0: I'm trying to list folders containing a certain file on jenkins and use later this array.
I read about [`findFiles`](https://jenkins.io/doc/pipeline/steps/pipeline-utility-steps/) but I can't find a way to use it in this situation.
The finality is that I need to cd to those folders in a loop ... |
2018/03/14 | 1,486 | 5,283 | <issue_start>username_0: What I'm trying to do
---------------------
On avito.ru (Russian real estate site), person's phone is hidden until you click on it. I want to collect the phone using Scrapy+Splash.
Example URL: <https://www.avito.ru/moskva/kvartiry/2-k_kvartira_84_m_412_et._992361048>
[![screenshot: Phone is... |
2018/03/14 | 1,215 | 4,255 | <issue_start>username_0: I use `multer` to parse multiple files sent as `multipart/data-form` with `axios`
```
...
const storage = multer.diskStorage({
destination: './gallery',
filename(req, file, cb) {
(1) ....
},
});
const upload = multer({ storage });
router.post('/products', upload.array('ima... |
2018/03/14 | 251 | 1,058 | <issue_start>username_0: I have a simple question. Assume that the following sql returns over milion records:
```
Select * from Table
```
If I only need to work with 100 records, will limiting rows increase significantly the performance and why ?
Example oracle sql :
```
Select * from Table where rownum<=100
```<... |
2018/03/14 | 485 | 2,062 | <issue_start>username_0: I try to create a BaseController and this should contain a DbContest instance.
```
public abstract class BaseODataController : ODataController where T : class
{
protected readonly ApplicationDbContext \_db;
public BaseODataController(ApplicationDbContext db)
{
\_db = db;
}
}
```
So whe... |
2018/03/14 | 301 | 934 | <issue_start>username_0: I have an existing table that uses an auto-incremented `id` as its primary key.
There are entries in the table with the id starting at 1:
```
id field1
== ======
1 foo1
2 foo2
3 foo3
```
Is there a way to update the `id` for *all existing entries* so the auto\_increment st... |
2018/03/14 | 245 | 783 | <issue_start>username_0: I have `datetime.now()` objects, and I want to know how many hours will pass before a specific hour the next day
I've tried this:
```
now = datetime.now()
then = datetime.now() + timedelta(days=1)
then.hour = 12 # doesn't work
hours = then - now
```
But I don't know how can I specify the e... |
2018/03/14 | 539 | 1,923 | <issue_start>username_0: ```
#include
#include
using namespace std;
int main() {
char b[] = {'a','b',' ','c'};
cout << sizeof(b) << endl;
cout << strlen(b) << endl;
return 0;
}
```
Why the above output is 4,6 isnt that 4,4 is the correct answer?<issue_comment>username_1: The behaviour of your code is undefined:... |
2018/03/14 | 690 | 2,731 | <issue_start>username_0: I am trying to configure sessions for an asp.net core 2.0 website, but the session cookie is never set.
I call ..
```
app.UseSession();
```
...in Startup.Configure and ...
```
services.AddDistributedMemoryCache();
services.AddSession(options =>
{
option... |
2018/03/14 | 1,738 | 6,149 | <issue_start>username_0: I'm running the `Test-AdfsServerHealth` ([Ref.](https://blogs.technet.microsoft.com/aadceeteam/2015/02/13/under-the-hood-tour-of-azure-ad-connect-health-ad-fs-diagnostics-module/))
The problem is, one of the output values (value name `Output`) is an array that shows up as `System.Collection.Ha... |
2018/03/14 | 942 | 3,405 | <issue_start>username_0: I'd like to show some loading animation in the app root while a component prepares to be rendered by vue router.
Already found [this question](https://stackoverflow.com/q/44868403/176140), proposing the use of navigation guards, and [another question](https://stackoverflow.com/q/44886812/17614... |
2018/03/14 | 806 | 3,067 | <issue_start>username_0: I am trying to change the state of a component every 5 seconds as below inside componentDidMount() hook
```
import React, { Component } from 'react';
export default class ToTest extends Component {
constructor(props) {
super(props);
this.state = {
test: false
};
}
co... |
2018/03/14 | 302 | 1,104 | <issue_start>username_0: My problem is about changes in xcode for a new version of a IOS app.
Step 1 :
In terminal : cordova build ios.
Step 2 :
I open it on xcode (.xcode file)
Step 3 :
I do a archive build (for dev test)
Step 4 :
I do a change on my controller.js for example in xcode. (simple alert('test'))
S... |
2018/03/14 | 809 | 2,730 | <issue_start>username_0: I'm completely new to DynamoDB, and I can't find out how query works.
So, in my case, I have a table(collection/etc) `Users` with this fields and AWS types in brackets:
`id [type String], name [type String], email[type String], ref_code[type Map], register_date[type String]`
And my table Ind... |
2018/03/14 | 1,090 | 4,140 | <issue_start>username_0: Error: Invariant Violation: A VirtualizedList contains a cell which itself contains more than one VirtualizedList of the same orientation as the parent list. You must pass a unique listKey prop to each sibling list.
So I am trying to make A FlatList which will have Multiple Nested FlatLists Li... |
2018/03/14 | 366 | 1,319 | <issue_start>username_0: i tried the following mapping:
```
{call pop.dbo.getRequestDetail ( #{uid, mode=IN, jdbcType=VARCHAR},
#{requestId, mode=IN, jdbcType=INTEGER},
#{resultStatus, mode=OUT, jdbcType=INTEGER},
#{resultMsg, mode=OUT, jdbcType=VARCHAR} )}
```
But I have error:
>
> org.apache.ibatis.exceptio... |
2018/03/14 | 713 | 2,381 | <issue_start>username_0: I'm updating an existing project from a different developer in our company and am trying to set the colour of the icons to match the text (as you can see from the screenshot below). I've succeeded for the current selected item but not for the items that aren't selected. I cannot figure out why ... |
2018/03/14 | 321 | 1,171 | <issue_start>username_0: I have an Ubuntu server on google compute engine that i have allowed ufw on but forgot to allow port 22 for `ssh` connections and now I cannot access it
* Any idea how can I reverse that?
I also tried to connect using google serial console but i can't remember my instance username and passwor... |
2018/03/14 | 765 | 2,843 | <issue_start>username_0: I am using a component to display canvas image in it. For the first time it works fine. After displaying I hide it but after I display the component again it shows me the previous image but I already change the image source.
So I want to ask is there any way I can destroy this instance of comp... |
2018/03/14 | 645 | 2,294 | <issue_start>username_0: I was using `window.open('')` with `'_blank'` as second parameter to open my link in new tab For eg. `window.open('http://google.com', '_blank')`
But, recently I added the third parameter `'noopener'` so that `window.opener` becomes null in the new tab and the new tab does not have access to t... |
2018/03/14 | 1,172 | 4,240 | <issue_start>username_0: I have Windows 10 pro x64,
Excel 2016 32 bit
and Sql server 2017.
I want to import excel file to sql server, I need to use 32-bit wizard because Microsoft Excel is not shown in 64-bit version, but I face this error:
The 'Microsoft.ACE.OLEDB.16.0' provider is not registered on the local machine.... |
2018/03/14 | 514 | 1,882 | <issue_start>username_0: I'm creating a cluster with `kubeadm init --with-stuff` (Kubernetes 1.8.4, for reasons). I can setup nodes, `weave`, etc. But I have a problem setting the cluster name. When I open the `admin.conf` or a different config file I see:
```
name: kubernetes
```
When I run `kubectl config get-clus... |
2018/03/14 | 2,050 | 4,599 | <issue_start>username_0: I have the following dataset where I have the column **Date** and **Values** for each row. It has both **+ve** and **-ve** values. I have to get a count of all positive values for the last 150 rows. IN each row. SO the 1st 150 rows will have null values. Then, the following rows will have have ... |
2018/03/14 | 914 | 2,865 | <issue_start>username_0: I have a lot of C++ classes that use the same list of template parameters
```
template
class A {
...
};
template
class B {
...
};
template
class C {
...
};
```
You get the idea. Then I instantiate them like
```
A a;
B b;
C c;
```
Is there a way to somehow create an alias for this b... |
2018/03/14 | 681 | 2,209 | <issue_start>username_0: I have array with data. Array length equals 25 elements. I would like create matrix (5X5). How I can do this in C#? Please help.<issue_comment>username_1: You can use [Buffer.BlockCopy](https://msdn.microsoft.com/en-us/library/system.buffer.blockcopy.aspx)
```
using System;
class Test
{
s... |
2018/03/14 | 829 | 2,792 | <issue_start>username_0: So my code just adds them together if i put like 4+4 it gives me 44 but i wanted to be like 4+4=8
```html
Laskeminen
first = prompt("Enter your first number.");
last = prompt("Enter your second number.");
var y = first
var z = last
var x = y + z;
document.getElementById("first,last").... |
2018/03/14 | 494 | 1,707 | <issue_start>username_0: there is my method that return a student from the database with his name,
i want to modify my method to return a list of students if i have many students with the same name, how can i do, thanks
```
// GET: api/Students/name
[ResponseType(typeof(Student))]
public IHttpActionResult ... |
2018/03/14 | 700 | 1,932 | <issue_start>username_0: Arr= ["abcd","1223"," 10829380","pqrs"]
I want to print array like this-
```
Arr=["abcd","1223","10829380","pqrs"]
```<issue_comment>username_1: You could use [Array#map!](http://ruby-doc.org/core-2.5.0/Array.html#method-i-map-21) or [Array.map](http://ruby-doc.org/core-2.5.0/Array.html#meth... |
2018/03/14 | 453 | 1,137 | <issue_start>username_0: I have this array:
`array = ['S2B_MSIL1C_20180310T041559_N0206_R090_T46QEK_20180310T075716.SAFE'];`
and this regex:
`regex = new RegExp('S2B_MSIL1C_20180310T041559_N0206_R090_T46QEK_20180310T075716' + '.SAFE','g');`
When I use `array.includes(regex);` , `false` is returned. Have I missed ... |
2018/03/14 | 493 | 1,714 | <issue_start>username_0: To allow multiple payment gateways in my system I have a table of defined payment gateways (id, name, code) where `code` is the table name (for example 'paypal') containing a specific payment gateway transaction responses.
In my sql server query I want to join the transaction table for each ga... |
2018/03/14 | 906 | 2,270 | <issue_start>username_0: i'm currently trying to write a shiny app. I want to create a barchart with reactive coloring to radiobuttons.
Before i try to get the code for the reactive coloring, i try to test it, so that i get an idea of how to compose the code.
Right now i'm struggling to get a barchart with alternatin... |
2018/03/14 | 1,375 | 3,087 | <issue_start>username_0: I have the following dataframe:
```
df = pd.DataFrame({('psl', 't1'): {'fiat': 36.389809173765507,
'mazda': 18.139242981049016,
'opel': 0.97626485600703961,
'toyota': 74.464422292108878},
('psl', 't2'): {'fiat': 35.423004380643462,
'mazda': 24.269803148695079,
'opel': 1.017054047499... |
2018/03/14 | 689 | 1,601 | <issue_start>username_0: I want to add a new line (CR) in front of each word, where world is anything between spaces **that contains** letters
For example for input string:
```
+48 123 456 789 fax: +48 987 654 321
```
I would like the end result to be:
```
+48 123 456 789
fax: +48 987 654 321
```
Any ideas? Than... |
2018/03/14 | 738 | 2,056 | <issue_start>username_0: hi i have a project in laravel 5.4 for some function i have calling the laravel model methods inside the view for my convenient so it is showing me error save() method does not exist so anyone help me is that possible to call the laravel model method inside the view or how to achieve this below... |
2018/03/14 | 647 | 2,507 | <issue_start>username_0: When trying to assign a long JSON response to a Dictionary, I get either
>
> nil
>
>
>
or
>
> Thread 1:EXC\_BAD\_INSTRUCTION (code=EXC\_I386\_INVOP, subcode=0x0)
>
>
>
Assigning a short response works fine. Here is my code
```
func getUserInfo() {
let access_token : Strin... |
2018/03/14 | 885 | 2,196 | <issue_start>username_0: I want to import Sudoku boards and convert them to a [9][9] array.
[Example of a couple of printed boards:](https://i.stack.imgur.com/W7Lrb.png)
Here is the first board:
370000001000700005408061090000010000050090460086002030000000000694005203800149500
The first 9 numbers fill the first row, ... |
2018/03/14 | 1,074 | 4,230 | <issue_start>username_0: I've noticed that when using Kotlin's synthetic binding, the view returned is non null (Kotlin will return `View!`). But this doesn't make much sense to me, since `findCachedViewById` can actually return null results, meaning that views can actually be null.
```
public View _$_findCachedViewBy... |
2018/03/14 | 1,369 | 5,800 | <issue_start>username_0: I am new to kafka. We want to monitor and manage kafka topics. We tried different open source monitoring tools like
1. [kafka-monitor](https://github.com/linkedin/kafka-monitor)
2. [kafka-manager](https://github.com/yahoo/kafka-manager)
Both tools are good. But we are unable to make a decisi... |
2018/03/14 | 2,255 | 8,210 | <issue_start>username_0: I'm trying to make a Java service using Spring Boot that connects to a Rabbit exchange, discover new queues (that matches with a given prefix) and connect to them. I'm using `RabbitManagementTemplate` to discover and `SimpleMessageListenerContainer` to create a bind. It works fine.
The problem... |
2018/03/14 | 374 | 1,618 | <issue_start>username_0: I have a database table called `interviews` and the interviewer and the interviewee will both have to review how the interview went. The review will have similar fields (rating on a scale) but different questions.
Option 1 is to have them both in the same table and have it be `1..N` back to th... |
2018/03/14 | 460 | 1,877 | <issue_start>username_0: We're using Flink to monitor each event. The detail scenario is when a event arrives, flink find out all event with same userid in last 2 hours and sum the count field. For example:
```
event1 -> real time result = n1
event2 -> real time result = n2
event3 -> real time result = n1+n3
ev... |
2018/03/14 | 313 | 1,027 | <issue_start>username_0: How do I change the color of `unusedField` or an unused variable in IntelliJ? In `Color scheme` when I click on `unusedField` nothing happens. I was expecting IDEA to show me the default color settings (or show where it is derived from) but nothing happens. The screenshot illustrates the situat... |
2018/03/14 | 496 | 1,791 | <issue_start>username_0: I'm developing a web app, and I use client-side routing (basically, we're loading the page using what's after the `#` in the URL).
But, I've noticed that **sometimes** when I go one page and I go on another one, the old one is loading instead of the new one. Let me explain when I click on the ... |
2018/03/14 | 399 | 1,395 | <issue_start>username_0: I am using vue-router in my vue application. I have the following routes in my application.
```
const routes = [
{name: "home", path: "/", component: Home},
{name: "user", path: "/user", component: User},
{name: "edit-user", path: "/user/edit", component: EditUser}
];
const router... |
2018/03/14 | 375 | 1,187 | <issue_start>username_0: I have this table:
```
CREATE TABLE `count_traffic` (
`tool_id` int(11) NOT NULL,
`leads` int(11) NOT NULL DEFAULT '0',
`date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
```
And following SELECT:
```
$query="
SELECT sum(`leads`) as leads
,... |
2018/03/14 | 1,038 | 3,580 | <issue_start>username_0: I am trying to use Grafana to chart the output of a query similar to:
```
SELECT count(*)
FROM myschema.table1
WHERE status_id = 2
```
Essentially I just want Grafana to run this query every X minutes and then chart the output over time, but from what I can see Grafana requires a specific co... |
2018/03/14 | 1,040 | 3,618 | <issue_start>username_0: I am a little uncertain when the copy constructor is needed. For example, given this function:
```
template
T max(const T\* array, int size) {
T result = array[0];
for (int i = 1; i < size; ++i) {
if (result < array[i]) {
result = array[i];
}
}
return result;
}
```
What is the reason ... |
2018/03/14 | 632 | 2,371 | <issue_start>username_0: the method iβm try To call is the encrypt method it's from this class
but when i try to call it in call class it shows error in the method name it shows that the method is not there or not found :( please help me
```
package test;
public class MARS {
public static byte[] encrypt(byte[] in,byt... |
2018/03/14 | 1,985 | 5,341 | <issue_start>username_0: I want to create 7 dummy variables -one for each day, using dplyr
So far, I have managed to do it using the `sjmisc` package and the `to_dummy` function, but I do it in 2 steps -1.Create a df of dummies, 2) append to the original df
```
#Sample dataframe
mydfdata.frame(x=rep(letters[1:9]),
... |
2018/03/14 | 1,706 | 4,587 | <issue_start>username_0: I am working on Magento 2.2.2. I have deployed the website on a subdomain in my VPS within a account.
The strange thing is that, the "generated" folder gets automatically generated after deletion.
To investigate, I deleted everything inside the subdomain root folder where I had put the Magent... |
2018/03/14 | 1,803 | 4,940 | <issue_start>username_0: So I am building a ReactJS website/app and getting to grips with things. I am trying to have multiple re-usable components of code (to save me time) and to get used to it I have made this placeholder component
```
import React from 'react';
import { Image } from 'semantic-ui-react';
import '.... |
2018/03/14 | 805 | 2,655 | <issue_start>username_0: I have an object in which I have to verify different values using multiple if-else statements, like below is sample javascript snippet:
```
if(properties.values.a > 0 ){
}else if(properties.values.b > 0){
}else if(properties.values.c > 0){
}else if(properties.values.d > 0){
}else if(proper... |
2018/03/14 | 614 | 2,062 | <issue_start>username_0: Iβm trying to use the `replace` function, the doc specifies
>
> replace(string::AbstractString, pat, r[, n::Integer=0])
>
>
> Search for the given pattern pat, and replace each occurrence with r. If n is provided, replace at most n occurrences.
> As with search, the second argument may be ... |
2018/03/14 | 2,723 | 4,260 | <issue_start>username_0: I'm trying to **map dates to the `viridis` colour scale** in ggplot2. The default `ggplot` colour scale works fine for dates. But I'm having trouble mapping them to the `viridis` scale, getting an error regarding 'origin' not being supplied to `as.Date.numeric()` (similar error when trying to u... |
2018/03/14 | 1,915 | 5,523 | <issue_start>username_0: ```
import emoji
def emoji_lis(string):
_entities = []
for pos,c in enumerate(string):
if c in emoji.UNICODE_EMOJI:
print("Matched!!", c ,c.encode('ascii',"backslashreplace"))
_entities.append({
"location":pos,
"emoji": c
})
return _entit... |
2018/03/14 | 3,643 | 12,253 | <issue_start>username_0: Situation:
----------
There are a number of blocking synchronous calls (this is a given which cannot be changed) which can potentially take a long time for which the results need to be aggregated.
Goal:
-----
Make the calls non-blocking, then wait for a max time (ms) and collect all the call... |
2018/03/14 | 2,219 | 7,326 | <issue_start>username_0: I want the highest **even number** in the array.
```
public static void main(String[] args) {
int[] a = new int[]{10, 46, 78, 32, 3, 80, 92, 11, 39, 57};
System.out.println(Arrays.toString(a));
int largest = Integer.MAX_VALUE;
for(int number : a) {
if(number > largest)... |
2018/03/14 | 2,683 | 9,231 | <issue_start>username_0: I have followed official docs to integrate firebase crashlytis.
<https://firebase.google.com/docs/crashlytics/get-started>
it is working fine for debug build & i am getting crashes in console also, but I am getting below error while generating signed APK.
```
Warning:com.twitter.sdk.android... |
2018/03/14 | 306 | 1,123 | <issue_start>username_0: I have a csv file with characters like `CitΓ©`, but after make the insert into the DB, I see this `CitΒΏ`
I open the file as a `BufferedReader`, but I don't know how to do it in `UTF-8`
```
BufferedReader br = new BufferedReader(new FileReader(csvFile));
```<issue_comment>username_1: You can u... |
2018/03/14 | 229 | 877 | <issue_start>username_0: When I visit mycompany.com in any browser except chrome, it successfully redirects to <https://www.mycompany.com>. However in Chrome I just get a 404, ditto all chrome users.
In web.config I have this redirect rule
```
```
Which I think is what makes it work in other browsers.
I've tried ... |
2018/03/14 | 250 | 937 | <issue_start>username_0: How does yum work internally?
Does yum shell out to use the rpm executable when actually manipulating rpm files, or does it implement its own rpm handling code?
(Or does it use a static or shared rpm library for dealing with rpm files)<issue_comment>username_1: It seems yum is a python impleme... |
2018/03/14 | 5,528 | 17,628 | <issue_start>username_0: I have following code snippet:
```
public class ConditionTest {
public static final ReentrantLock reentrantLock = new ReentrantLock();
public static final Condition CONDITION_PRODUCED = reentrantLock.newCondition();
public static final Condition CONDITION_RECEIVED = reentrantLock.... |
2018/03/14 | 1,332 | 6,028 | <issue_start>username_0: Techies,
I have requirement where I have to add two class name in ngClass, one with condition and another one as normal.
Existing code
```
|
```
O/P html should be-
```
|
```
In the above code, I have to add "col-md-1" inside ngClass. How can I do this
Thanks,
Arun<issue_comment>us... |
2018/03/14 | 1,013 | 2,609 | <issue_start>username_0: ```
data = """
abcd1 1
abcd2 2
abcd3 3
abcd4 4
abcd5 5
abcd6 6
abcd7 7
abcd8 8
abcd9 9
.
.
.
abcd256 1
abcd257 2
abcd258 3
abcd259 4
abcd260 5
abcd261 6
abcd262 7
abcd263 8
abcd264 9
"""
i... |
2018/03/14 | 1,060 | 3,525 | <issue_start>username_0: I would like to set the default date to be 3 days from todays date when the date picker opens up on the browser. How can I acheive that?
```
```<issue_comment>username_1: You need set the defaultValue attribute of the date input as `yyyy-mm-dd` like so:
```
const today = new Date();
const nu... |
2018/03/14 | 1,651 | 5,455 | <issue_start>username_0: I have a class as following :
```
public class OrganizationRoleDTO {
private Long organizationId;
private String organizationTitle;
private String roleId;
private String roleTitle;
}
```
In my DAO I have a function that will return a list of `OrganizationRoleDTO`, as followin... |
2018/03/14 | 745 | 2,574 | <issue_start>username_0: I have a login form that checks the password and username entered and if correct it will give a message and makes login session true. But the session doesn't work. When it redirects you to dashboard you won't be able to visit it the value of session login is unknown. So when you enter userpass ... |
2018/03/14 | 851 | 2,715 | <issue_start>username_0: Take the following #definition from the pet store example. Given a #definition section a JSON structure can be generated
e.g.
[](https://i.stack.imgur.com/6KRwn.png)
Is there something that can do the reverse given a large... |
2018/03/14 | 796 | 3,071 | <issue_start>username_0: Consider abstract class `Element` here is a super class for many subclasses like `ArrayElement` each have their own helper methods but with common `param` property
I need to call helper method `printValue` with `that` object. `check` method receive `ArrayElement` object in run time. Hence at r... |
2018/03/14 | 544 | 1,832 | <issue_start>username_0: I can't understand why my below code raise an error.
I'm trying to build a priority list based on heapq module of Python.
The only difference with a basic example of the module is that want to use it with custom objects in it it, instead of simple (int,int) or (int,str) tuples.
```
import hea... |
2018/03/14 | 337 | 1,067 | <issue_start>username_0: I want to convert second in datetime format.
Example : 1521028270 -> 2018-03-14 11:52:02.393
Can someone help me?<issue_comment>username_1: A heap has the property that the smallest object is always on top. In order for Python to preserve that invariant, it must have some way of determining wh... |
2018/03/14 | 585 | 2,095 | <issue_start>username_0: I've searched over the net, not sure how to set X-FRAME-OPTIONS in my react app, the web.config.js looks like this, it's using inline option
when I load index.html it gives response X-FRAME-OPTIONS:DENY I need it to change it to X-FRAME-OPTIONS:SAMEORIGIN, as I need to open an iframe within my... |
2018/03/14 | 582 | 1,813 | <issue_start>username_0: ```
#include
template
class X {
public:
using I = int;
void f(I i) {
std::cout << "i: " << i << std::endl;
}
};
template
void fppm(void (X::\*p)(typename X::I)) {
p(0);
}
int main() {
fppm(&X<33>::f);
return 0;
}
```
I just don't understand the compile error message of the cod... |
2018/03/14 | 660 | 2,236 | <issue_start>username_0: I am creating a code in which data can pass from USB to serial port. Problem is that I am unable to write data to serial port on windows system in php. Device has been connect and opened successfully and baud rate, parity, length, stop bits, flow control are set accordingly with no error.
Whe... |
2018/03/14 | 1,190 | 4,212 | <issue_start>username_0: i need to clone a box div element with children as a trigger, in each box should work the same with the first one, my code not working properly since it's only working for the first element and failed for the second div element (even in the same box), it only working once. here is my code below... |
2018/03/14 | 1,663 | 5,854 | <issue_start>username_0: I am using Knex and Postgres, NodeJS, Express & React.
I have a USERS table, a USERLIKS and a FILTERS table.
Where I am stuck is the gender query.
Users can define in their filter that they are looking for male, female or both.
If I use '.orWhereExists' other filters such as the 2nd which sto... |
2018/03/14 | 2,218 | 8,345 | <issue_start>username_0: I have a question about Room in Android and its POST and GET mechanic. I have made an app with a recycle view with the help of this site: <https://codelabs.developers.google.com/codelabs/android-room-with-a-view/#0> as a tutorial but the difference between this guy's code and my code is that he... |
2018/03/14 | 847 | 3,189 | <issue_start>username_0: Im trying to upgrade to angular 4, but when running the code I get an error:
`ERROR Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[AuthenticatedGuard -> AuthService]:
StaticInjectorError(Platform: core)[AuthenticatedGuard -> AuthService]:
NullInjectorError: No provider... |
2018/03/14 | 532 | 1,712 | <issue_start>username_0: I want to plot but I face some errors
```
import numpy as np
import matplotlib as plt
x = np.arange(0, 3 * np.pi, 0.1)
y = np.sin(x)
plt.plot(x, y)
plt.show()
```
what is its problem?
>
> cannot find reference 'arange' in \_\_ init\_\_.py
> I'm using pycharm on windows 10
>
>
>
is the... |
2018/03/14 | 1,768 | 6,042 | <issue_start>username_0: For a project, I have a large dataset of 1.5m entries, I am looking to aggregate some car loan data by some constraint variables such as:
Country, Currency, ID, Fixed or floating , performing , Initial Loan Value , Car Type , Car Make
I am wondering if it is possible to aggregate data by summ... |
2018/03/14 | 2,265 | 8,198 | <issue_start>username_0: I've now gone through my code with a fine tooth comb and I just cannot seem to see where the "recipe" property is not defined. I'm hoping some more experienced eyes would help me out and spot where I've made the mistake. Any help will be appreciated. Thank you.
Ps. Please find my code below..... |
2018/03/14 | 3,226 | 9,366 | <issue_start>username_0: Hi I'm having an issue continuously recording data to a .csv file using the following script
```
int ddm(void)
{
// 96 Temp MSB, 97 Temp LSB, 98 Vcc MSB, 99 Vcc LSB
// 100 TX_BIA MSB, 101 TX_BIA LSB,
// 102 TX MSB, 103 TX LSB, 104 RX MSB, 105 RX LSB
FILE *f... |