date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/01 | 1,886 | 6,863 | <issue_start>username_0: The following string was generated by this code:
myString = 12:44:44.6111472
```
myString = Date.Now.TimeOfDay.ToString
```
I want to add 16.1234567 seconds and the value of myString and assign the resulting value to a new string called myNewString.
Every function I have tried looses the ... |
2018/03/01 | 2,028 | 7,896 | <issue_start>username_0: I have an application with six functions. Each of them begins with logging in to the website. I create another class named login (below the code).
The structure of the project is 6 classes and main class.
How do you use this function in these six classes?
This my code for login in every single ... |
2018/03/01 | 2,090 | 8,017 | <issue_start>username_0: I have written a batch file to uninstall a faulty WiFi driver (Intel ProSet Wireless) and set up the appropriate wireless profile on a laptop. This script is intended to be run remotely through Symantec Management Agent.
The code starts by running a group policy update to pull down appropriate... |
2018/03/01 | 1,946 | 7,576 | <issue_start>username_0: I am trying to get access-token from the Facebook using restfb api everything works and i can print the access-token but when i try to return it i get an empty value..
Following is the code
```
public String showLogin() {
DefaultFacebookClient facebookClient = new DefaultFacebookClient(Version... |
2018/03/01 | 534 | 1,629 | <issue_start>username_0: I have a numpy.ndarray having dimensions of 23411 x 3.
I would like to add headers to the top of the matrix called: "summary", "age", and "label". In that order.
In:
```
matrix.shape
```
Out:
```
(23411L, 3L)
```
In:
```
type(matrix)
```
Out:
```
numpy.ndarray
```
I tried using th... |
2018/03/01 | 768 | 2,615 | <issue_start>username_0: I'm very new to Java and I'm running into difficulty with something simple. I create a vector like the below, where the third element is an array of Strings, not a String itself.
```
this.myvec = new Vector();
myvec.add("a");
myvec.add("b");
myvec.add(new String[]{
"c",
... |
2018/03/01 | 2,006 | 6,153 | <issue_start>username_0: So i'm using the mnist example on keras and I am trying to predict a digit of my own. I'm really struggling with how I can match the dimension sizes as I cant seem to find a way to resize my image to have the rows and columns after the image no. I've tried resizing with via numpy however I just... |
2018/03/01 | 416 | 1,712 | <issue_start>username_0: I'm trying to build a simple tableview with a tableView showing a list of images people posted and comments their friends added.
[](https://i.stack.imgur.com/S1LsU.png)
This is a subclass of TableViewCell, and I used stack vi... |
2018/03/01 | 289 | 1,083 | <issue_start>username_0: "Write a JavaScript function to find longest substring in a given a string without repeating characters."
Here's what I tried, but it doesn't print anything
```
function sort(names) {
let string = "";
let namestring = names.split("");
for(let i = 0; i < namestring.length; i++) {
fo... |
2018/03/01 | 372 | 1,080 | <issue_start>username_0: I want to create a new column on a pandas dataframe using values on the index and a dictionary that translates these values into something more meaningful. My initial idea was to use map. I arrived to a solution but it is very convoluted and there must be a more elegant way to do it. Suggestion... |
2018/03/01 | 417 | 1,530 | <issue_start>username_0: How may I trigger the button callback function of the test function when the user presses "Enter" on the phone's keyboard?
```
import UIKit
class ViewController: UIViewController, UITextFieldDelegate {
@IBOutlet weak var label: UILabel!
@IBOutlet weak var textfield: UITextField!
o... |
2018/03/01 | 666 | 2,103 | <issue_start>username_0: I have created a query with two joined tables and I want to return median from one column as a result.
Query looks like this:
`select table1.column1, count(distinct(table2.column2))
from table1 left join
table2 on table1.column1 = table2.column4
where column3 = 1
group by table1.colum... |
2018/03/01 | 673 | 2,199 | <issue_start>username_0: When declare a Model inside Ionic 2, I saw that there are two of doing it. Through Interface or Class
Interface code:
```
export interface BlogPost {
postId: number,
title: string
}
```
Class code:
```
export class BlogPost{
public object: {};
constructor(
public postId: numbe... |
2018/03/01 | 630 | 2,422 | <issue_start>username_0: I have been reading about libadalang [1](https://blog.adacore.com/introducing-libadalang) [2](https://blog.adacore.com/highlighting-ada-with-libadalang) and I am very impressed by it. However, I was wondering if this technique has already been used and another language supports a library for sy... |
2018/03/01 | 405 | 1,470 | <issue_start>username_0: I'm trying to create a logger configuration which logs only "**ERROR**" level information to console and "**DEBUG**" level information to file appenders.
Can anyone help on how to create a logger with above config?
Thanks in advance. Help is very much appreciated<issue_comment>username_1: For ... |
2018/03/01 | 428 | 1,692 | <issue_start>username_0: When writing the AWS CloudFormation template to create a Lambda function, 'Code' field is required.
I found the documentation here: <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html>
The document says you can specify the source of your La... |
2018/03/01 | 684 | 2,638 | <issue_start>username_0: I'm experimenting with state machines and the one that I'm trying to implement uses function pointers to represent states
```
typedef void (*State)(Signal const&)
class StateMachine
{
public:
void exampleState(Signal const&);
private:
State m_currentState;
}
```
Basically, I want to... |
2018/03/01 | 844 | 3,800 | <issue_start>username_0: I have created a function to populate a list of objects but they are not being written.
```
if (stats.isDirectory()) {
objlist=[];
//do something here.. the path was correct
fs.readdir(path, (err, files) => {
objlist=[];
for(file in files){
... |
2018/03/01 | 831 | 3,346 | <issue_start>username_0: I have a table that I'm trying to sort and am having some difficulties.
It's a sequence column that is meant to represent hierarchical data, which automatically sorts as shown below:
```
SEQUENCE
1
1.1
1.10
1.2
1.3
...
2
2.1
```
And instead I need to to sort like:
```
SEQUENCE
1
1.... |
2018/03/01 | 572 | 1,630 | <issue_start>username_0: I have the following list
`[12_223,13_4356,15_5676]`
I was able to spilt on underscore and convert this into one Hashmap using the below code
```
list.stream()
.map(s -> s.split("_"))
.collect(Collectors.toMap(
a -> a[0],
a -> a[1]));
```
it gives the below map
`{"12... |
2018/03/01 | 1,080 | 3,575 | <issue_start>username_0: I have a table that has many InsuranceNo's for unique MemberIDs. If there are more than one InsuranceNo, I want the InsuranceNo's to shift to a column, so in the end there is one line per MemberID, with all the iterations of that ID's InsuranceNo's as a Column.
```
MemberID InsuranceNo
... |
2018/03/01 | 1,759 | 4,727 | <issue_start>username_0: The goal is to sample (without replacement) a different number of rows in a dataframe for every group. The number of rows to sample for a specific group is in another dataframe.
Example: idDF is the dataframe to sample from. The groups are denoted by the ID column. The dataframe, planDF specif... |
2018/03/01 | 616 | 2,284 | <issue_start>username_0: When I read a source about the processes and threads in the operating system, I faced this sentence and it sounded weird to me:
`When a program is executed and handled by the processor, it converts into a process. A process needs to use the data and code segment in the memory.`
I think the f... |
2018/03/01 | 752 | 2,379 | <issue_start>username_0: I have a [Micro:Bit](http://microbit.org/guide/features/). It has an accelerometer, so I'm able to measure acceleration on x,y,z axis.
The idea is to wear it on the arm and send over bluetooth when it detects some movement on the arm.
So, I would like to check the acceleration and generate a... |
2018/03/01 | 1,623 | 5,657 | <issue_start>username_0: I have some problem with promise functions, my app has this structure:
- routes
- service
- db
db is a class initialized when the application start and where I created some wrapper function for insert/find/ecc..., service is a layer between the route and db, here I do most of the work. My prob... |
2018/03/01 | 989 | 3,162 | <issue_start>username_0: I am new to PHP (took some classes in college but its been a long time) and I keep getting this error when I submit my form Im not sure where the error is coming from and its driving me crazy! The error says: Error: all fields are required. This pops up when all the form fields have been filled... |
2018/03/01 | 1,199 | 3,850 | <issue_start>username_0: For example's sake, this returns an ORDER NUMBER of 55 and Calc\_ORDER\_NUMBER\_LAG of 55, the Calc\_Qty\_Changed column doesn't give me a 2, even though they are equal...
```
USE MfgMetrics
SELECT
[ORDER NUMBER],
[Calc_ORDER_NUMBER_LAG] = LAG([ORDER NUMBER],1,0)
... |
2018/03/01 | 1,198 | 3,740 | <issue_start>username_0: I want to calculate the number of distinct port numbers that exist between the current row and the 5 previous rows (sliding window) **and this when the same address appears.**
For instance,
If the input is (csv file):
```
ID PORT ADDRESS
1 21 ad3
2 22 ad1 ... |
2018/03/01 | 1,229 | 3,664 | <issue_start>username_0: We were supposed to extract strings from a provided file, the output matches the expect, but it reports segmentation fault in the end and I don't know why.
```
#include
#include
int main(int argc, char \*argv[]){
char str[100];
char f;
int len = 0;
FILE \*file;
file = fopen(argv[1]... |
2018/03/01 | 1,845 | 4,973 | <issue_start>username_0: I am trying to go through each value in a data frame and based on that value extract information from another data frame. I have code that works for doing nested for loops but I am working with large datasets that run far too long for that to be feasible.
To simplify, I will provide sample da... |
2018/03/01 | 559 | 2,495 | <issue_start>username_0: I would like a bit better understanding of the #Temptable scope across stored procedures within one session. My understanding is that #TempTable has local scope to the current session where it has been created. What I am after is to create a temp table in a store procedure 1, then fill it in an... |
2018/03/01 | 2,610 | 6,100 | <issue_start>username_0: ```
+---------+-----------+----------+---------+
| FileID | EventDate | UserName | EventID |
+---------+-----------+----------+---------+
| 1000001 | DateTime | User1 | 1 |
| 1000001 | DateTime | User1 | 3 |
| 1000001 | DateTime | User1 | 3 |
| 1000001 | DateTime ... |
2018/03/01 | 567 | 1,760 | <issue_start>username_0: I want submit/post two values with this jQuery code:
```
$('input#code1').on('input', function(){
var name = $('input#code1').val();
if ($.trim(name) != ''){
$.post('ajax/rate1.php', {code1: name}, function(data){
$('div#total1').text(data);
});
}
});
```
How can I also i... |
2018/03/01 | 615 | 1,963 | <issue_start>username_0: Is there any way to navigate with Prism (using RegionManager.RequestNavigate) whithout Pushing the view in Navigation History.
I want Navigate from `ViewA` to `ViewB` and From `ViewB` To `ViewC` without adding `ViewB` into `navigation history` such that when I call the `GoBack()` method from ... |
2018/03/01 | 347 | 1,188 | <issue_start>username_0: I'm trying to connect to an API. By doing this with a static string, it works fine, but when I'm doing it by using a variable, it seems not to work.
This is how my code looks:
```
var movie = 'taken';
OurRequest.open('GET', 'http://www.omdbapi.com/?s=${movie}&apikey=222222');
OurRequest.onlo... |
2018/03/01 | 2,191 | 8,056 | <issue_start>username_0: In my angular application I have Kafka consumer who emit all the messages to UI and its make UI very heavy to filter these message.
So when I connect through angular app I pass the filter in the parameter with socket IO connect. I receive that parameter on consumer side as well but problem is ... |
2018/03/01 | 574 | 1,914 | <issue_start>username_0: I want to change the text of a span with a checkbox inside like this:
```js
function checkChange(){
document.getElementById("span1").textContent="red";}
```
```html
blue
```
the result is this:
< span style='color:darkolivegreen;font-weight:bold'>red< /span>"
And the checkbox dis... |
2018/03/01 | 875 | 3,113 | <issue_start>username_0: I'm struggling a little and looking for help. I have a table called products and the two important columns are productPrice and productRewards.
I can manually insert the data, through the form, in my admin console and all my products display, just fine.
Essentially, I would like to take the v... |
2018/03/01 | 411 | 1,416 | <issue_start>username_0: ```
render() {
return (
{!loading && \_.forOwn(accessLogs, function(groupedLogs, date) {
console.log(date);
console.log(groupedLogs);
console.log("=====");
return ;
})}
);
}
```
This code is generating this clientside error for me:
```
warning.js:33 Warning: Failed prop type:... |
2018/03/01 | 451 | 1,603 | <issue_start>username_0: I want Screen Recording in UWP. Or Screen capture so that I can move ahead with per moment collection and convert those total captures to a video.<issue_comment>username_1: For Screen recording in UWP, you can see this similar thread:
<https://social.msdn.microsoft.com/Forums/en-US/dfa72a44-68... |
2018/03/01 | 750 | 2,968 | <issue_start>username_0: In class below i use this package to implement countdown timer:
<https://www.npmjs.com/package/react-countdown-now#renderer>. My class have method "this.props.clearCookies()", and i need to invoke it when timer ends up. provides property "rerenderer" to get access to variable "completed" and ex... |
2018/03/01 | 1,346 | 5,512 | <issue_start>username_0: I'm experimenting with Netflix OSS for implementing a microservice architecture. I wanted to log `server.port` from *bootstrap.yml* file at **runtime** to see which instance is serving the request.
I'm using Java8.
Important libraries versions are:
\* spring-boot-starter-web-1.5.8
\* s... |
2018/03/01 | 868 | 3,776 | <issue_start>username_0: I am writing to the RealTime Database using a db file. The field generates a unique id key and I need to pass that key back to the parent file.
My db function:
```
export const doCreateCompany = name =>
db
.ref(`company`)
.push()
.set({ name });
```
My calling function is... |
2018/03/01 | 983 | 3,118 | <issue_start>username_0: I created an admin user with a password, that contains a special character. Installation of Gitea was successful, but I can't login. I can't get new password, because it says:
>
> Sorry, Register Mail Confirmation has been disabled.
>
>
>
I tried command `gitea admin change-password`, but... |
2018/03/01 | 1,282 | 3,965 | <issue_start>username_0: I'm a newbie to python so please bear with me. I have a data frame where I want to replace values for specific strings. Below is my starting df (df\_train):
```
A B C D
0 .5 Ex Ex Po
1 35 Gd TA Gd
2 52 TA Fa Ex
3 47 Bd Po Gd
``... |
2018/03/01 | 494 | 2,188 | <issue_start>username_0: I'm curious if joining tables on string fields should be done with the string fields being trimmed?
Let's say you have two identical strings in two different tables. You want to join the two tables on those two strings. So you will do something like this:
```
SELECT *
FROM table_primary
... |
2018/03/01 | 784 | 3,230 | <issue_start>username_0: I have been trying to setup a simple Serverless App on AWS but am failing to understand how to put the pieces together **with a custom domain**.
The web app routes should looks something like this:
* `/` -> Serves static HTML / CSS / JS from S3 Bucket
* `/api/people/` -> Lambda Function call
... |
2018/03/01 | 717 | 2,955 | <issue_start>username_0: I have in tutorial:
```
public function execute(BaseRequest $request)
{
$operation = function() use($request) {
return $this->service->execute($request);
};
return $this->session->executeAtomically(
$operation->bindTo($this)
);
}
```
What does the anonymous f... |
2018/03/01 | 245 | 880 | <issue_start>username_0: I updated gcc to v6 few weeks ago. Today i noticed that python2 and python3 both the interpreters were using gcc v5. Why does python interpreter show gcc v5 but I have gcc v6 installed? I am using xubuntu 16.
Here is my terminal:
[](ht... |
2018/03/01 | 336 | 1,285 | <issue_start>username_0: I getting this warning:
*Warning: BackButton: type specification of context `router` is invalid; the type checker function must return `null` or an `Error` but returned a boolean. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneO... |
2018/03/01 | 950 | 3,319 | <issue_start>username_0: I am working with react native and I only want to link my fonts and nothing else.
I am using react-native-maps and it specifically says in the docs "Do not use `react-native link`"
Everywhere I look I see that people say to do `react-native link` in order to link fonts but I am wonder in if t... |
2018/03/01 | 946 | 3,433 | <issue_start>username_0: I am using the L5 repository and it has the validator package (<https://github.com/andersao/laravel-validator>) but I am have problems to do the validation of the unique fields on update it, anyone to help me???
\*\*\*\*\*\*the example bellow I tried in this way on RULE\_UPDATE but no success.... |
2018/03/01 | 366 | 1,265 | <issue_start>username_0: ```
echo "this is a test:foo,bar,baz']" | grep -o -E "test:.*" | awk -F: '{ print $2 }'
foo,bar,baz']
```
I get `']` printed at the end, how to print only the word characters and common, nothing else, in this case I need to extract only `foo,bar,baz`<issue_comment>username_1: >
> While upda... |
2018/03/01 | 869 | 3,623 | <issue_start>username_0: I have a function with several loopings and database query, I want to call it asynchronously by passing a progress bar to show the user the progress.
When I call the thread the program hangs I can not even close
when I call synchContext.Post (state => etlBusiness.LoadData (progressBar), null)... |
2018/03/01 | 691 | 2,765 | <issue_start>username_0: I'm new to setting up TFS build. We have a fresh 2018 SP1 install on prem with an agent on the same machine. I'm doing some test builds and the drop location is set to "Server". So once the build is complete, where exactly do I get my output? Previously we were on 2012 and outputting to a share... |
2018/03/01 | 890 | 2,873 | <issue_start>username_0: I want to remove all the `arguments` from the `array` passed in function `destroyer` which was passed as `arguments`.
```
function destroyer(arr) {
var args = Array.prototype.slice.call(arguments); //turns arguments into arrays
function checkArgs() {
for (var i = 0; i < arr.l... |
2018/03/01 | 515 | 2,323 | <issue_start>username_0: I am new to Kubernetes and Minikube. Both look amazing tools, but I wonder if is there any way to have a single .yml file to deploy my services/deployments in all the environments, including local dev env...
The first limitation I see is related to service discovery since I would like to have ... |
2018/03/01 | 1,091 | 2,454 | <issue_start>username_0: How can I use cut while maintaining the POSIXct class of my date.time vector?
```
library(data.table)
library(lubridate)
```
Some data:
```
air.temp <- c(-1.7202,-1.6524,-1.5689,-1.6785,-1.6060,-1.8843)
soil.temp <- c(3.6972,3.6839,3.6716,3.6586,3.6460,3.6701)
date.time <- c('2007-01... |
2018/03/01 | 1,477 | 5,665 | <issue_start>username_0: We have multiple release environments configured in VSTS which use different databases. Each database in these environments contain specific metadata which control how the application works. This metadata is regularly configured by a administration tool to the user.
We want to backup this meta... |
2018/03/01 | 1,155 | 2,772 | <issue_start>username_0: My text is
```
my_text = '"posted_data":"2e54eba66f8f2881c8e78be8342428xd","isropa":false,"rx":"NO","readal":"false"'
```
I am trying to extract value of `posted_data` which is `2e54eba66f8f2881c8e78be8342428xd`
My code :
```
extract_posted_data = re.search(r'(\"posted_data\": \")(\w*)',... |
2018/03/01 | 583 | 2,100 | <issue_start>username_0: How can I test against an invalid .mp4 format file in order to hide the corresponding container?
```
" type="video/mp4">
```
Here is my attempt:
```
document.\_video = document.getElementById("video");
document.\_video.addEventListener('error',function(){
video.style.display = "none... |
2018/03/01 | 640 | 2,315 | <issue_start>username_0: Needing to query stale AD computer accounts, however we have VDI "Golden Images" that I do not want to disable. I thought that I could just use "Where-Object" to filter out the name but it fails. Can someone help point out where I'm going wrong?
```
Get-ADComputer -Property Name,lastLogonDate ... |
2018/03/01 | 1,446 | 4,715 | <issue_start>username_0: I am working on a program where I need to find out the index position of an array which holds the maximum value in that array after doing left rotation of that array.
For example:
If array is {5,7,1,8,2}. This array maximum value as 8. If I rotate the array 2 times then result is 1,8,2,5,7. T... |
2018/03/01 | 326 | 1,027 | <issue_start>username_0: I want to extract the text within list element inside a comment without the list tags.But I can't do it with the code below.
```
from bs4 import BeautifulSoup, Comment
html = """
"""
soup = BeautifulSoup(html, 'html.parser')
for numbers in soup.findAll(text=lambda text:isinstance(text, Comm... |
2018/03/01 | 1,190 | 4,297 | <issue_start>username_0: I've seen many threads about this, and have tried all options except for completely wiping Python off of my machine and re-downloading everything...
I'm using a Windows 10, 64-bit machine, and had already downloaded Python2.7. Commands like 'C:\>pip install seaborn' were not an issue.
I recen... |
2018/03/01 | 244 | 888 | <issue_start>username_0: I just downloaded the latest plugin for Go support in IntelliJ. I'm not able to use intellisense for Go programming because IntelliJ is not able to import packages like fmt and float64.
However, if I run the program from within IntelliJ, it works just fine!
**GOROOT** is `usr/local/go`
Proje... |
2018/03/01 | 818 | 3,075 | <issue_start>username_0: ```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace IndividualAssignmentLoan {
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
... |
2018/03/01 | 896 | 3,440 | <issue_start>username_0: I have an abstract class ChildNode
```
public abstract class ChildNode {
public abstract boolean activate()
public abstract void execute();
}
```
and an abstract class ParrentNode
```
public abstract class ParentNode extends ChildNode {
public ArrayList nodes;
public void execu... |
2018/03/01 | 643 | 2,543 | <issue_start>username_0: I am using Angular 5 in a project and i get a typescript error:
```
ERROR TypeError: Cannot read property 'indexOf' of undefined
```
What my code is supposed to do is to update the template on input change like this:
The template:
```
* {{ candidate.name }}
```
And the component.ts:
... |
2018/03/01 | 851 | 2,914 | <issue_start>username_0: I am learning about functions and classes, and wrote my own code. I used the constructor to just initialize the variables. I have a function that is supposed to get the info I initialized with the constructor and allow me to display it. However, it doesn't want to work. I am not really sure wha... |
2018/03/01 | 1,737 | 3,926 | <issue_start>username_0: I'm trying to decode a cookie and the interpreter is escaping backslashes that I need to remain intact.
This works
```
encrypted = %Q{"<KEY>"}
=> "\"<KEY>\""
```
But when I hit the server with that as a cookie
```
http localhost:9393 Cookie:cookie="\"<KEY>\""
```
and try to retrieve th... |
2018/03/01 | 1,035 | 3,405 | <issue_start>username_0: Hi I am trying to catch error in a promise chain like:
```
it("Exception is thrown for Invalid Candidate",function(){
return Election.deployed().then(function(instance){
electionInstance = instance;
candidateId = 99;
return electionInstance.vote(candidate... |
2018/03/01 | 616 | 2,370 | <issue_start>username_0: while I was looking for ux sites I found some interesting ui for chat bubbles. Which is,
[Chat Bubble UI ref](https://i.stack.imgur.com/NpcAD.png)
After brainstorming several days, I couldn't figure out how to develop that. But I have found some approaches to that problem which I want your ... |
2018/03/01 | 383 | 1,559 | <issue_start>username_0: I built an iOS app and I want to have some kind of login screen so only those who know the password would be able to use it.
It doesn't actually have to have both username and password. Only a special code would be enough (a password). This password will be typed once right after the app is i... |
2018/03/01 | 626 | 1,795 | <issue_start>username_0: Trying to separate my header and navtab with a simple horizontal line. Nothing fancy.
Yet, it appears above the header for some reason. I know it has something to do with floating of twitter button and company logo. Before I did this the line appeared as it should. I'm stuck here.
```css
.mai... |
2018/03/01 | 587 | 2,111 | <issue_start>username_0: I have a variable with this kind of string: 4.5"x8.5"x0.5"
I found many answers about how to escape the quotes, so I write this function:
```
function replaceQuotesChars (str)
{
var s = str.trim();
// s.replace('"','"');
// s.replace('"','\\"');
// s.replace(/\"/g,'\\"');
... |
2018/03/01 | 792 | 2,682 | <issue_start>username_0: I am new to Go and doing a few exercises. One of them is to sort the numbers in an array by frequency, from most to least frequent.
```
Example:
Input: [2, 2, 5, 7, 4, 4, 4, 7, 2]
Output: [2, 4, 7, 5]
```
Note that `[4, 2, 7, 5]` would also be correct, since 4 and 2 have the same frequency... |
2018/03/01 | 2,457 | 9,153 | <issue_start>username_0: I have a spider which exports data to different CSV files (per the names of the class definitions as defined in the spider class). However, I also wanted to keep the order of the fields in a specific order as they were being processed and exported into their different CSV files.
For example, t... |
2018/03/01 | 420 | 1,580 | <issue_start>username_0: So what are your experiences with sending remote notifications to RN app from FCM?
I did some research today, tried bunch of tutorials, but most of them didn't work.
So I wanna hear your opinion, which library are you using for this and what guide did you follow?
* react-native-push-notifica... |
2018/03/01 | 1,767 | 7,254 | <issue_start>username_0: I made a tic tac toe app and I'm suppose to be able to allow the app to rotate without it restarting the app. I learned how to do screen rotation in class, and I have written an OnSaveInstanceState method, however my app keeps crashing. It runs without this method, so I know something is wrong ... |
2018/03/01 | 418 | 2,118 | <issue_start>username_0: I am new to informatica and using passive java transformation to implement a small logic, and I am using passthru fields in java transformation to maintain the order of the fields in the file. I wanted to ask if a passive java transformation can be used to pass through the fields?
Do I need to ... |
2018/03/01 | 923 | 3,873 | <issue_start>username_0: I recently passed a null pointer to a `std::string` constructor and got undefined behavior. I'm certain this is something that thousands or tens of thousands of programmers have done before me, and this same bug has no doubt crashed untold numbers of programs. It comes up a lot when converting ... |
2018/03/01 | 799 | 3,395 | <issue_start>username_0: It is very easy to create tickets on JIRA with almost no restrictions - which is why I am wondering if it is possible to force some kind of template or other limitation so that people create tickets with required fields.
I am unaware if this is possible and Google doesn't bring up much<issue_c... |
2018/03/01 | 591 | 2,033 | <issue_start>username_0: I'm training a CNN on a large dataset of images with two classes, and I've done one hot encoding to my validation classes (y\_test):
```
y_test = to_categorical(y_test, num_classes=2)
```
I want to compare these with the predictions my classifier makes, which I've also one hot encoded like:
... |
2018/03/01 | 812 | 2,529 | <issue_start>username_0: I have a numpy boolean array:
```
myarr = np.array([[False, True], [True, False]])
```
If I try to initialise a Cython MemoryView with it, like this:
```
cdef bint[:,:] mymem = myarr
```
I get this error:
```
ValueError: Does not understand character buffer dtype format string ('?')
```... |
2018/03/01 | 271 | 885 | <issue_start>username_0: "[WARN] No seqid to unset"
What are the reasons for this warning? (NodeJS)<issue_comment>username_1: The reason was a version mismatch. 0.9.3 & latest
Upvotes: 2 [selected_answer]<issue_comment>username_2: for version 0.11.0, it's a bug
```
TBinaryProtocol.prototype.writeMessageEnd = function(... |
2018/03/01 | 547 | 1,691 | <issue_start>username_0: How do I get the following to put the index of the parameter pack element in the tuple?
```
template< typename... Ts >
class ClassA {
public:
ClassA( Ts... ts ) : tup( make_tuple( ts, 0 )... ) {}
// I would like it to expand to this.
// ClassA( T0 ts0, T1 ts1 ) : tup( make_tuple( t... |
2018/03/01 | 204 | 766 | <issue_start>username_0: How should I create my symfony 4 project if I just want to build an API?
```
composer create-project symfony/website-skeleton my-project
```
Is this line the correct line to use or do I have to include something like
```
composer create-project symfony/api-skeleton my-project
```
??<iss... |
2018/03/01 | 1,728 | 5,618 | <issue_start>username_0: Is it possible to run multiple extractors in one match statement?
```
object CoolStuff {
def unapply(thing: Thing): Option[SomeInfo] = ...
}
object NeatStuff {
def unapply(thing: Thing): Option[OtherInfo] = ...
}
// is there some syntax similar to this?
thing match {
case t @ CoolStuff(... |
2018/03/01 | 924 | 2,677 | <issue_start>username_0: Im trying to create a Powershell script that can show me a list of all the Registry Keys from "Test" (Screenshot1).
[](https://i.stack.imgur.com/HcJQL.png)
Every Key has a StringValue "Version". I need to know the value from ea... |
2018/03/01 | 1,419 | 4,084 | <issue_start>username_0: I have interesting issue with the latest version of on-premise TFS (2018 Version 16.122.27102.1). I have a release process that includes a step for "Deploy TestAgent on localhost". Looks like this:
[](https://i.stack.imgur.com... |
2018/03/01 | 2,520 | 7,742 | <issue_start>username_0: I am trying to get started with PHPunit. I created a new composer.json file with the `composer init` command. It looks like this:
```
{
"name": "connor11528/stitch-labs-woo-shipment-sync",
"authors": [
{
"name": "<NAME>",
"email": "<EMAIL>"
}
... |
2018/03/01 | 760 | 2,733 | <issue_start>username_0: I am trying to use the `.gravityAndHeading` on my `ARWorldTrackingConfiguration.worldAlignment` configuration. However, I keep getting this error:
>
> Device orientation error: Error Domain=CMErrorDomain Code=102 "(null)"
> 2018-03-01 20:08:25.218445+0000 App[759:84092] [Session] Session (0x... |
2018/03/01 | 546 | 1,763 | <issue_start>username_0: Have an equation where I cannot get the variable I want to solve for onto only one side. I want to solve for that variable for given values of all the other variables in the equation.
For a simple example as clarification, suppose you couldn't get x onto only one side of the following equation... |
2018/03/01 | 461 | 1,446 | <issue_start>username_0: Using Python, is there a way using psutil or something else to return the output of "ipconfig /displaydns" or something similar?
Spawning a cmd process and running the command is not an option.<issue_comment>username_1: General procedure: Move everything to the left side of the `=` so you get ... |
2018/03/01 | 1,476 | 5,153 | <issue_start>username_0: So I'm using Sequelize for my PostgreSQL database on my JavaScript app. I have 4 models (Users, Posts, Likes, and FollowingsFollowers). My Users model works fine, it doesn't have any foreign keys so I'm able to create and find data with no problems whatsoever. However, my Posts model has 2 fore... |
2018/03/01 | 569 | 1,985 | <issue_start>username_0: I have made a struct in which I'm passing my data. The data is in an array. I'm running a `for` loop to get the value out from it but I'm not getting full values. Suppose there is `5.0` value in an array when the loop runs. It first shows me `5`, then `.`, and then `0`. I want it to give `5.0` ... |
2018/03/01 | 1,012 | 3,838 | <issue_start>username_0: I am hitting a bit of a roadblock and don't know what to do. I am attempting to write a program that creates an account with username and password and stores it to a text file. However, while using the program and inputting the username and password data, the program crashes as it moves to the ... |
2018/03/01 | 2,493 | 13,437 | <issue_start>username_0: I'm writing complex ad-hoc queries to extract data from a client's SQL Server. Some of the queries take a half-hour or more to run and I need them to execute in 5 minutes or less. Unfortunately, I don't have permissions to view a showplan or on any of the `sys.dm_` views to help me optimize the... |
2018/03/01 | 744 | 3,089 | <issue_start>username_0: I'm getting this error whilst reading my JSON file in a test class to see if it works, and I don't understand why. It's validated so there is nothing wrong with the JSON file.
Any help would be appreciated thanks.
My test class:
```
public class ObjectToJsonFile {
public static void ma... |