date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/03/13 | 685 | 2,178 | <issue_start>username_0: I have an array of labels and an array of letters, I want to print each letter in a label in alphabetical order.
I sorted the letters array but I don't know how to sort the labels array.
[](https://i.stack.imgur.com/4aSJH.png... |
2018/03/13 | 1,315 | 5,113 | <issue_start>username_0: I'm trying to poll a paginated API and provide new items to the user as they appear.
```
fun connect(): Sequence = buildSequence {
while (true) {
// result is a List
val result = dataSource.getFirstPage()
yieldAll(/\* the new data in `result` \*/)
// Block the thread for a little bit
}
... |
2018/03/13 | 1,107 | 4,293 | <issue_start>username_0: I want to remove a element while clicking on one of its child nodes using pure JavaScript or jQuery library.
There are more than one with the same class. I have followed answers on StackOverflow but none satisfied my coding. None is working.
below is my code
```js
function removetask(e) {
... |
2018/03/13 | 17,434 | 43,017 | <issue_start>username_0: Lately I have being using boost xpressive for parsing files. These files are 10 MB each and there will be several hundred of them to parse.
Xpressive is nice to work and clear syntax, but the problems comes with performance. It is incredible how it crawls in debug versions, while in release ve... |
2018/03/13 | 305 | 1,173 | <issue_start>username_0: I am trying to covert the following JSON which contains an object of json objects into a Java object on Android using gson.fromJson(json, packageClass), however, I am having trouble figuring out what the structure of my java package class should be.
```
{
"package": {
"version": "1.0.0",
... |
2018/03/13 | 720 | 2,771 | <issue_start>username_0: I go through the documentation of Map and WeakMap of javascript from [MDN web docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Keyed_collections).
but in this ([Why WeakMap?](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap)) topic I d... |
2018/03/13 | 1,033 | 5,350 | <issue_start>username_0: I created this click listener in a android project, it is taken from a tutorial.
It worked there but does not seem to work when I tried it in my new app.
```
ImageView animals = (ImageView) findViewById(R.id.anim);
animals.setOnClickListener(new OnClickListener() {
@Override
... |
2018/03/13 | 1,877 | 6,948 | <issue_start>username_0: I have currently been following a tutorial and so far the contact form works perfect as it should. The only problem I have is when the user clicks submit it takes them to another page saying thank you and not a bootstrap pop up on the same page saying thank you as it should. The form otherwise ... |
2018/03/13 | 790 | 2,870 | <issue_start>username_0: I am a newbie to react native, I want to make this layout possible I have following code but it puts the logo inside grid
What I am looking for is this
[](https://i.stack.imgur.com/zkJcK.png)
```js
import React, { Component... |
2018/03/13 | 670 | 2,635 | <issue_start>username_0: I can't seem to figure out any reason why a service worker would be deleted with the code that I have that registers or actually is the service worker.
But in this site, it shows up as **deleted** in the Service Workers section of the chrome dev tools (image below).
Yet it is also registering... |
2018/03/13 | 404 | 1,691 | <issue_start>username_0: I have a string that can be anything and I have a text object in my scene which has a set width and a changeable height.
Is there a built-in function that counts how many rows my string would have in that text object so that I can adjust the height of it? I want to do this because I need a ba... |
2018/03/13 | 2,976 | 12,809 | <issue_start>username_0: I am using VS 2017 and .NET Core.
Using Dependency Injection, I would like to register my service at runtime, dynamically. My goal is to write instances of my service that implement the service interface inside of separate assemblies. The servicename/assembly name will then be added to some so... |
2018/03/13 | 2,938 | 12,520 | <issue_start>username_0: 
<https://www.redblobgames.com/grids/hexagons/>
I have this beautiful hexagonal pattern and I need to somehow implement it in java. I already have a Class "Tile" representing one hexagon and a class "Vector" for the coordinates of each Tile. Ea... |
2018/03/13 | 1,575 | 3,007 | <issue_start>username_0: I am pulling financial data from an API and trying to put it into a readable dataframe. The dates, however, are coded in some ISO 8601 format and I can't tell what they are. Been trying a bunch of different things and all over StackOverflow but I can't figure it out. Help would be much apprecia... |
2018/03/13 | 1,252 | 2,549 | <issue_start>username_0: for example:
if have table like below
```
OrderNumber item
--------------------
1 pen
2 pencil
1 box
```
in my where condition if i put **item=pen,box** it should give **two/one** rows since order number is same for pen and box.
if i put **item=pen,pencil*... |
2018/03/13 | 496 | 1,774 | <issue_start>username_0: All,
I am trying to convert a simple getdate() to string. When I write the expression as (DT\_STR,29,1252) GETDATE(), it gives me the error
"The expression (DT\_STR,29,1252) GETDATE() has a result type of DT\_STR, which cannot be converted to a supported type."
What is wrong with this. I j... |
2018/03/13 | 669 | 2,239 | <issue_start>username_0: So my DF has columns: Agency | Base Pay | job\_title | ... etc.
Now for my column: **job\_title**, there are many different job titles registered.
Now, I have a lot of job titles that have the word "teacher" in it and I want to merge them.
For example!! teacher, teacher special ed, teacher p... |
2018/03/13 | 549 | 1,596 | <issue_start>username_0: My ultimate goal is to compute `zoo` (*see function `pc` below*) for any number of fitted objects such as `fit1` and `fit2` shown below.
I'm wondering, though, how to loop over `fit` objects? Specifically, if user provided, say, 2 fitted objects such as `fit1` and `fit2` (*below*), how can `zo... |
2018/03/13 | 2,963 | 12,670 | <issue_start>username_0: So let's say that I've added clothing pieces to a back-end rails api and Im trying to access these items through the React side of things, I know I can use the mapStateToProps(state){} function. However, I want to create interactivity in the UI between different pieces of application state from... |
2018/03/13 | 820 | 2,628 | <issue_start>username_0: In Perl 6 you can specify a type that a type can be coerced to. For example, you need an `Int` but get something else that can convert to an `Int`. This is handy when you don't want separate candidates for `Int` and `Str` where the string represents an integer value.
But, it seems that the con... |
2018/03/13 | 317 | 1,298 | <issue_start>username_0: When I try to save an entity, the Datastore throws the error:
```
java.lang.IllegalArgumentException: entity is too big
at com.google.appengine.api.datastore.DatastoreApiHelper.translateError(DatastoreApiHelper.java:53)
....
```<issue_comment>username_1: There's limitation to [Google Data... |
2018/03/13 | 1,000 | 3,126 | <issue_start>username_0: I'd like to state this should be a really simple thing, I really thought there was something about this problem in the forum, however, didn't find anything.
So, from the title, you can already say what's wrong. My code shouldn't hide `#player-one-turn` element. I know, it's in the parent calle... |
2018/03/13 | 496 | 1,193 | <issue_start>username_0: Not sure what I am doing wrong here
```
getting_data | gunzip | jq -r '.time_field | strptime("%Y-%m-%dT%H:%M:%S.%fZ")'
```
The error comes back as such:
```
jq: error (at :0): date "2018-03-13T14:00:17.1614661Z" does not
match format "%Y-%m-%dT%H:%M:%S.%fZ"
```
The desired output would ... |
2018/03/13 | 679 | 2,326 | <issue_start>username_0: I know, that to shorten class names I can do the following:
```
using Time = std::chrono::time_point;
using Clock = std::chrono::system\_clock;
```
But how to properly reduce length of the next line?
```
/*using Ms = */ std::chrono::duration_cast
```
The target piece of code:
```
Time st... |
2018/03/13 | 687 | 2,693 | <issue_start>username_0: I am using the MongoDB Java Driver for my project to access my database from Java.
I usually use `Document` as it's quite easy to use and all methods in `MongoDBCollection`, such as `find()` work with it and return `Document` instances.
However, in some cases I want to use the equivalent `Bso... |
2018/03/13 | 498 | 1,604 | <issue_start>username_0: I want to convert my data to xml string using a sql query. I tried below code (with RAW, AUTO, PATH) but the output format is different. How to get the required format?
```
DECLARE @ValueVM TABLE
(
Id INT,
Text VARCHAR(MAX),
IsDefault VARCHAR(10)
)
DECLARE @xml XML;
INSERT INTO ... |
2018/03/13 | 978 | 3,568 | <issue_start>username_0: Heroku has the following documentation for configuring trusted proxies when working with Laravel:
<https://devcenter.heroku.com/articles/getting-started-with-laravel#trusting-the-load-balancer>
It says:
>
> It is very important to also prevent Laravel from trusting the
> Forwarded and X-Fo... |
2018/03/13 | 454 | 1,523 | <issue_start>username_0: I have 2 table (A and B). Each row on table A have up to 3 correspondence on table B. Table B have a status field that can be either "x" "y" or "null".
I want to get all row from table A where no matching row from table B have the "X" status (see below picture). So basically I want row with Id... |
2018/03/13 | 615 | 1,882 | <issue_start>username_0: I have this three tables:
student table
```
| _id | name |
| --- | --------- |
| 1 | Student 1 |
| 2 | Student 2 |
| 3 | Student 3 |
| ... | ... |
```
subject table
```
| _id | name |
| --- | --------- |
| 1 | Subject 1 |
| 2 | Subject 2 |
| ... | ... |
```... |
2018/03/13 | 1,175 | 4,238 | <issue_start>username_0: Hello is there a way to perform default submit a form connected to the Form Model?.
```
```
\*\* Update \*\*
I need to achive a behavior extactly like form below. So after submit redirecting user with POST data.
```
```<issue_comment>username_1: Based on your edits, this is the base of wha... |
2018/03/13 | 714 | 2,586 | <issue_start>username_0: I'm getting an auth error with my google api test, the code to set the environmental variable works alone, however when used in conjunction with the google test code the auth fails. I was also able to get the test code to work by running an `EXPORT` command in shell. For convenience, I'd like t... |
2018/03/13 | 533 | 1,809 | <issue_start>username_0: I have this input filed with an onkeypress event:
```
```
Basically this allows only numeric values to be entered into the field...and this works just fine... in Chrome, Firefox and IE.. which is enough for me. BUT the "backspace" key does not work in Firefox. It works fine in Chrome and IE.... |
2018/03/13 | 567 | 1,906 | <issue_start>username_0: I ran this command at the beginning of my script:
```
declare @date dataetime = getdate();
SELECT (YAR(DATEADD(Month,-((DATEPART(Month,@date)+11) %12),@date))) AS FiscalYear
SELECT DateofIngest, ContractYear, FiscalYear from [database].[dbo].[TableNameA]
....(many other commands that are wor... |
2018/03/13 | 243 | 899 | <issue_start>username_0: I have installed Alamofire and successfully built my app after 'import Alamofire' (command + B). However, when I try to call one of the request functions, no 'request' functions associated with Alamofire exists (please see photo below). Please can someone advise?
[](https://i.stack.imgur.com/jOhJW.png)
Image: 4 iterations, with (a) is the original graph. (b), (c), (d), (e) correspond to result after each iteration. Example from "Introduction to Algorithm 3rd"
Hi,
I do not understand ... |
2018/03/13 | 812 | 2,283 | <issue_start>username_0: I have a large dataset that looks like this:
```
Year Month Day Hour Count Value
2017 1 1 1 59 0
.. .. .. .. .. ..
2011 12 29 23 60 12
```
I am trying to use Pandas to generate averages for the Valu... |
2018/03/13 | 1,078 | 3,270 | <issue_start>username_0: ```
trigger ShipToAddress on Opportunity(before insert) {
map accounts = new map();
for(opportunity o:trigger.new) {
accounts.put(o.accountid,null);
}
accounts.remove(null);
accounts.putAll([select id,name,BillingStreet, BillingCity, BillingState, BillingPostalCode from account where id ... |
2018/03/13 | 1,223 | 4,460 | <issue_start>username_0: Sometimes I want to defer the execution of the promise constructor and still be able to define promise chains. I found and slightly adapted the following approach, but since I have little experience with promises I'd like to know
* whether there is a more succinct way to do this?
* what I am l... |
2018/03/13 | 1,578 | 5,134 | <issue_start>username_0: Problem
-------
In `redux-saga`, I am using `yield delay(1000);`.
During my unit test, I do `expect(generator.next().value).toEqual(delay(1000));`.
I expect the test to pass.
This is my `sagas.js`:
```
import { delay } from 'redux-saga';
export function* incrementAsync() {
yield delay(10... |
2018/03/13 | 457 | 1,683 | <issue_start>username_0: Is there any way to modify an `EnumSet` object? It seems that (for example) `EnumSet.add` is inherited from `AbstractSet` and that throws an `UnsupportedOperationException`.
Yet it looks as if `EnumSet` is modifiable; otherwise why bother having a `clone()` method, and why would Guava have `Se... |
2018/03/13 | 467 | 1,816 | <issue_start>username_0: I'd like to use dblink in postgres to copy data from a local database to a remote one. This what I came up with:
`SELECT * FROM dblink('archive', 'INSERT INTO data SELECT * FROM local.data')`
It wont work and I think I understand why. I get the error `relation "local.data" does not exist`, If... |
2018/03/13 | 452 | 1,920 | <issue_start>username_0: 1. What are the major differences in Angular 4 and Angular 5?
2. How much effort will be required for migrating Angular 4 project to Angular 5
3. Is there any official documentation available for migration from Angular 4 to Angular 5<issue_comment>username_1: You can use this [migration guide](... |
2018/03/13 | 1,149 | 4,318 | <issue_start>username_0: In a datamart where 2 or 3 or more dimensions merge to form a new dimension. How can the scd be managed to keep track of all mergers historically and present trending facts as related to those dimensions?
A specific example would be three stores (Business ID 8897, 8965, 9135) merge to create ... |
2018/03/13 | 648 | 1,912 | <issue_start>username_0: I am running VS 15.6.1.
[](https://i.stack.imgur.com/Z82aU.png)
I have downloaded and ran the following two files:
* dotnet-sdk-2.1.4-win-x64.exe
* dotnet-runtime-2.0.5-win-x64.exe
Here's the contents of my C:\Program File... |
2018/03/13 | 429 | 1,484 | <issue_start>username_0: I have a SSIS package where data from multiple CSV files is loaded to SQL Server. The problem is not all files have the same set of columns, with few files not having all the columns w.r.t tables in Database. when i run the package with foreach loop, it throws a error when a cloumn is not prese... |
2018/03/13 | 773 | 2,494 | <issue_start>username_0: [Problem 217: Contains Duplicate](https://leetcode.com/problems/contains-duplicate/description/)
>
> Problem Description:
>
>
> Given an array of integers, find if the array contains any duplicates.
> Your function should return true if any value appears at least twice
> in the array, and... |
2018/03/13 | 1,294 | 3,790 | <issue_start>username_0: I have the problem that a sum of variables representing probabilities in the `[0,1]` interval sum to `0` but should be `>0`. The problem is surely related to [floating point representation](https://stackoverflow.com/questions/21895756/why-are-floating-point-numbers-inaccurate) and precision in ... |
2018/03/13 | 1,161 | 3,422 | <issue_start>username_0: I found a tutorial about emulating lambda in c, but I can not fully get the declaring way.
why callback mentioned twice, and what is the use of curly brackets "scope" and outer parentheses.
tutorial link :
<https://blog.noctua-software.com/c-lambda.html>
This code working on gcc 4.9.2 compil... |
2018/03/13 | 628 | 2,177 | <issue_start>username_0: I am currently working on a PHP file, an admin having the privilege of updating the user account's password which has hash, but it is currently not working and updating inside the database. I tried looking for the problem but failed to do so, a little help would be appreciated. Here is my simpl... |
2018/03/13 | 764 | 2,819 | <issue_start>username_0: I'm building a Java + Spring web client that receives an XML and unmarshalls it into auto-generated classes, based on a schema provided by the service I'm contacting.
The auto-generated code contains a getter that returns an `Element` object. To handle this object I cast it as `ElementNSImpl`.... |
2018/03/13 | 716 | 2,297 | <issue_start>username_0: On running npm install, we get this:
```
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself
```
Our initial belief was that the issue was a need to install the peer dependency mentioned - `ajv` - but that has not fixed... |
2018/03/13 | 801 | 2,488 | <issue_start>username_0: I have I think simple problem but I'm quite confused how to do that.
Like in the snippet `header` should has 130px height and `footer` 20px height. I need to have some `min-width` in my `#landing-page-container` because I need to have my footer at least at the bottom of current view (of cours... |
2018/03/13 | 786 | 2,402 | <issue_start>username_0: I am trying to achieve on this page here - <http://derbyshiregas.co.uk/> on the **HOME PAGE** within the **OUR SERVICES** section.
That when hovering over a services box both the text and the fa-icon/font awesome icon change colour on hover. I have got the text working but cannot get it workin... |
2018/03/13 | 355 | 1,239 | <issue_start>username_0: I am just getting familiar with Highcharts word cloud. I am looking to solve a issue where I can have single color for all words in the word cloud using High charts. For example all words have a color red in the word cloud. I am using the default highcharts [jsfiddle](http://jsfiddle.net/gh/get... |
2018/03/13 | 1,008 | 3,288 | <issue_start>username_0: I've written a method named q1 that takes a `HashMap` and returns the longest String among the HashMap values.
This is the code I've written. I'm not sure why it's not working.
```
public static int q1(HashMapname) {
String longest = "";
for (String key : name.keySet()) {
if( name.size()... |
2018/03/13 | 889 | 2,892 | <issue_start>username_0: I have a code which adds a li with a value from an input field. There is a fadeToggle function on that input. I want to focus it when it appears and don't show it when it hides. With the current code it gets focus before it's being hidden.
```js
$('button').on('click', function (event) {
$... |
2018/03/13 | 1,064 | 3,301 | <issue_start>username_0: I have the following sample dataframe of baseball game attendance:
```
team <- rep("SFG", 6)
attendance <- seq(1000:1005)
year <- c(2000, 2000, 2001, 2001, 2002, 2002)
dates <- as.Date(c("2000-01-01", "2000-01-02", "2001-01-03", "2001-01-04", "2002-02-05", "2002-03-06"))
df <- data.frame(team... |
2018/03/13 | 598 | 2,422 | <issue_start>username_0: How can i modify state from two different function call? Following code gives me error'Maximum update depth exceeded.'
```
class App extends Component {
// fires before component is mounted
constructor(props) {
// makes this refer to this component
super(props);
// set loca... |
2018/03/13 | 530 | 1,150 | <issue_start>username_0: I have 2 arrays as below that I want to be converted to dataframe columns:
```
arr1 = np.array([2, 4, 6, 8])
arr2 = np.array([3, 6, 9, 12])
df_from_arr = pd.DataFrame(data=[arr1, arr2])
print(df_from_arr)
```
Actual Output:
```
0 1 2 3
0 2 4 6 8
1 3 6 9 12
```
Expected o... |
2018/03/13 | 524 | 1,585 | <issue_start>username_0: I want to run a Python script with an argument as a list. The script needs to grab that parameter and convert it into a list. The list elements in the argument can be separated either by `commas` or by `spaces` or by `comma+space` like this:
```
python test.py 1,2,3,4
python test.py 1 2 3 4
py... |
2018/03/13 | 605 | 1,823 | <issue_start>username_0: I am trying to get the max out of column sums for each row and assign the max value to a new column,
```
df['due_date'] = df.apply(
lambda x: max(x['days_1'] + x['baseline_date'],
x['days_2'] + x['baseline_date'],
x['days_3'] + x['baseline_d... |
2018/03/13 | 713 | 2,698 | <issue_start>username_0: I'm fairly new to Java and having problems finding a structure to do the following.
I want a fixed length array. Each item to be a variable length array (or list) holding strings. So I've tried...
```
ArrayList[] wordList = new ArrayList[maxWordLength];
```
I get a slapped wrist from Java ... |
2018/03/13 | 2,222 | 8,604 | <issue_start>username_0: Simplified version of my code:
```html
text
---
text
// Called when DOM changes.
function mutationCallback(mutations) {
// assert(mutations.length === 3);
var insertImg = mutations[0];
console.log(insertImg.previousSibling.parentNode); // Null!
console.log(insertImg.nextSiblin... |
2018/03/13 | 2,154 | 8,182 | <issue_start>username_0: I need to create a vector(lets call it "support vector") that matches position in other vector ("main vector") with desired value. My guess is that the easiest way is to use `for` and `ifelse`. I am familiar with appending new values to a vector using `for` but it does not work with `ifelse`. H... |
2018/03/13 | 1,950 | 5,639 | <issue_start>username_0: so I am trying to install
<https://www.npmjs.com/package/@progress/kendo-react-grid>
the package exists on the website but when I run the command
```
npm i @progress/kendo-react-grid
```
I get a 404 error
Ideas ?
So far I think the user scope is what is messing it up
```
0 info it wo... |
2018/03/13 | 557 | 1,901 | <issue_start>username_0: I am writing a Javascript counter function but something that I am not quite sure.
Assume that 1000ms === 1s.
```js
var ms = 0;
var s = 0;
setInterval(() => {document.querySelector('#ms').innerHTML = ms++}, 1);
setInterval(() => {document.querySelector('#s').innerHTML = s+... |
2018/03/13 | 2,097 | 6,864 | <issue_start>username_0: Here I have a class `List1` and classes `List2`,`ListViewModel` for combining two datasets, and I have two different result sets, each list having four values and I need to combine them as a single resultset with 4 rows and need to do the iteration and summation by using the result values in up... |
2018/03/13 | 495 | 1,497 | <issue_start>username_0: The below query returns any User who existed Where transaction\_date > '3/1/2017' and has sum(AMOUNT) > 3000 from all dates.
I want to return only users who have had sum(AMOUNT) > 3000 AFTER 3/1/2017. In other words, user needs to have sum(Amount) at least $3000 from only transactions after 3... |
2018/03/13 | 1,817 | 6,405 | <issue_start>username_0: I am trying to clone a project from github (<https://github.com/bhilburn/powerlevel9k> to be specific, but all github repos fail in the same way), using Visual Studio 2013's native git integration.
I tried going to File -> Open From Source Control. That opens up the "Team Explorer" window on ... |
2018/03/13 | 1,739 | 6,228 | <issue_start>username_0: I have an EntityA with 2 Required lookup fields on it. First lookup field is the Contact, which auto populates when I add a new EntityA from the Contact.
The Contact is also associated with one to many of Another EntityB. EntityB is the Second lookup field on the EntityA. I would like to auto... |
2018/03/13 | 614 | 2,094 | <issue_start>username_0: Let's say we have the following XML:
```
English
60
Programming
70
80
```
What we're trying to find is the "name" of the "subject" where "Peter" has the largest number in "Grade". The entire XML has a few more people with different names but I dont think that matters. It all follows ... |
2018/03/13 | 2,699 | 8,967 | <issue_start>username_0: I'm using Jest to test my React app.
Recently, I added [DeckGL](https://github.com/uber/deck.gl) to my app. My tests fail with this error:
```
Test suite failed to run
/my_project/node_modules/deck.gl/src/react/index.js:21
export {default as DeckGL} from './deckgl';
^^^^^^
SyntaxError: Une... |
2018/03/13 | 768 | 2,962 | <issue_start>username_0: I want to use the fullcalendar library, using gulp and yarn this is the generated link tag:
But I'm getting this error in the console :
>
> Refused to apply style from
> '<http://localhost/bower_components/fullcalendar/dist/fullcalendar.css>'
> because its MIME type ('application/json') is... |
2018/03/13 | 936 | 3,236 | <issue_start>username_0: I have two entities:
`Team`:
```
class Teams
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer", name="id")
* @ORM\OneToMany(targetEntity="App\Entity\User", mappedBy="team")
*
*/
private $id;
```
`User`:
```
class User implements UserIn... |
2018/03/13 | 422 | 1,405 | <issue_start>username_0: I'm trying to make a drop down that links to the option once the user presses the submit button, but I'm getting weird results. It's worth mentioning that this is in Wordpress so I'm not sure if its affecting the results at all.
```
Select Area
Etobicoke
Toronto
North York
$('#select-id'... |
2018/03/13 | 385 | 1,222 | <issue_start>username_0: I'm trying to skip a set of records from my query if a certain type of record exists in a batch.
I have records like this
```
ORDER STATUS
1234 X
1234 Y
1234 Z
1235 X
1235 Y
1236 X
1237 X
1237 Y
1238 A
1238 ... |
2018/03/13 | 577 | 1,705 | <issue_start>username_0: I have a dataframe which looks like this.
`id YearReleased Artist count
168 2015 Muse 1
169 2015 Rihanna 3
170 2015 <NAME> 2
171 2016 <NAME> 1
172 2016 Rihanna 3
173 2016 Underworld 1
174 2017 Coldplay 1
175 2017 <NAME> 2`
I want to get the maximum count for each year and then get the corresp... |
2018/03/13 | 1,299 | 4,390 | <issue_start>username_0: Say I have a PySpark dataframe `df`:
```python
>>> df.printSchema()
root
|-- a: struct
|-- alpha: integer
|-- beta: string
|-- gamma: boolean
|-- b: string
|-- c: struct
|-- delta: string
|-- epsilon: struct
|-- omega: string
|-- psi: bool... |
2018/03/13 | 873 | 2,607 | <issue_start>username_0: I have an RPM that I am trying to install in my VM. My RPM is named myPackage.rpm and when I try to install it (`yum install myPackage.rpm`), I am getting the following errors:
```
Error: Package: myPackage.x86_64 (/myPackage)
Requires: libicudata.so.32()(64bit)
Error: Package: myPackag... |
2018/03/13 | 794 | 2,673 | <issue_start>username_0: Given two integer arrays A and B, return true iff. for every integer in A there is a greater integer in B. There needs to be a 1 to 1 mapping, each integer in A has to find its own greater integer in B.
Example:
```
int[] A = {1, 1, 5, 3};
int[] B = {7, 5, 2, 3};
boolean result = isGreater(A,... |
2018/03/13 | 740 | 2,526 | <issue_start>username_0: I am new with SQL and I am trying to run the below statement but its obviously not working. I need to truncate the "creat\_DTTM" it has the date and time in it and I need to remove the time, so I can query off of the column. Any help is greatly appreciated.
```
Select *
From icue.cmnct_trans... |
2018/03/13 | 913 | 3,361 | <issue_start>username_0: I'm new comer to C++, so I'm very confused about the code below:
```
const char* headers[]= {"apple","pear","tree"};
```
So is this line supposed to create "an array of pointers to char"? (Maybe i'm wrong). If so, why such array of pointers being assigned to an array of strings?
Also I'm c... |
2018/03/13 | 228 | 812 | <issue_start>username_0: In K2 4.7 Workflow designer, we have an option to copy paste an activity. But in K2 Five we couldn't do as same?
Do we have option to do it? If yes, how?
Thanks!<issue_comment>username_1: It is currently not available as per the post in K2 Ideas page and it is planned to enhance in future.
C... |
2018/03/13 | 501 | 1,709 | <issue_start>username_0: I would like only one event to display at a time. When another event is clicked, it should hide the last event. Right now, all events are staying visible and I can't figure out how to hide previously clicked events.
Does anyone have suggestions for how I can hide all but one event at a time? ... |
2018/03/13 | 527 | 1,754 | <issue_start>username_0: I have the same line Repeating many times with small changes. i like to shorten it by using an array of objects
For example, instead of this code:
```
StartUpdateStr = "Update tblAfterSale SET "
EndUpdateStr = " WHERE IDAfterSale = "
IDAfterSale = Me.lblIDAfterSale.Caption
db.Execute StartU... |
2018/03/13 | 515 | 1,966 | <issue_start>username_0: I would like to have a button where on click it changes a string value from null to any other text (for example 'yes'). I have a button in the view that calls an update method in the controller but I don't know what to put inside that update method.
In the view, this is the button ('item' refe... |
2018/03/13 | 599 | 1,949 | <issue_start>username_0: I open an Excel file in c#, make some changes and I want to save it as pdf file.
I have searched about it and find this:
```
Microsoft.Office.Interop.Excel._Workbook oWB;
oWB.ExportAsFixedFormat(XlFixedFormatType.xlTypePDF, "D:\\xxxxx.pdf");
```
but this code sometimes opens a form and a pri... |
2018/03/13 | 3,789 | 8,898 | <issue_start>username_0: (Editor's note: this question was originally: **How should one access the m128i\_i8 member, or members in general, of the \_\_m128i object?**, trying to use an MSVC-specific method on GCC's definition of `__m128i`. But this was an XY problem and the accepted answer is about the XY problem here.... |
2018/03/13 | 1,768 | 4,880 | <issue_start>username_0: My csv data looks like as follows:
```
$('table').each(function(index) {
$(this).find('tr').each(function() {
$(this).find('td:first-child').each(function(i) {
var a;
var b;
var c;
$(this).find('a:first').each(function(i) {
a = $(this).text... |
2018/03/13 | 991 | 2,702 | <issue_start>username_0: I have a table:
```
Id|Name |orders|units
1 |Tom |6 |4
2 |Lucy |4 |8
3 |Frank |3 |7
4 |Jane |2 |5
5 |Robert|1 |NULL
```
I want the output as:
```
Id|units
1 |4
4 |5
5 |0
8 |0
9 |0
```
Can you help me with the query?<issue_comment>us... |
2018/03/13 | 500 | 1,705 | <issue_start>username_0: I was customizing the [property\_web\_builder](https://github.com/etewiah/property_web_builder) engine for getting nearby results using Geokit or Geocoder gem, but can't use any of it.
getting undefined method 'gecoded\_by' using 'Geocoder' gem and undefined method 'acts\_as\_mappable' for 'geo... |
2018/03/13 | 253 | 870 | <issue_start>username_0: I have the table below, and I want to select all the users that
* have a row with type\_id equals to 3 and type = form
* and all the rows with type\_id equals to 5 and type = action.
I know I am wrong, but how shall I edit my query?
The table
```
user --- type--- type_id
abc ---- form --- ... |
2018/03/13 | 259 | 901 | <issue_start>username_0: Is there a way to get all the elements that don't start with the id `foo` in JavaScript?
I tried the following:
`var elements = document.querySelectorAll('[id!=foo]');`
That doesn't work.
Basically I want the opposite of:
`var elements = document.querySelectorAll('[id^=foo]');`<issue_com... |
2018/03/13 | 747 | 2,558 | <issue_start>username_0: I have a large database that I am loading into an in-memory cache. I have a process that does this iterating through the data day by day.
Recently this process has started throwing the following error:
`OverflowError: date value out of range` for the line
`start_day = start_day - datetime.t... |
2018/03/13 | 989 | 3,481 | <issue_start>username_0: I am trying to query a quote API for a freeCodeCamp project I'm updating to React.js. I am now trying to use `Fetch` or `Axios` to query the API but it's caching the response in the browser. I know in `$ajax` there is a `{ cache: false }` that would force the browser to do a new request.
Is th... |
2018/03/13 | 677 | 2,252 | <issue_start>username_0: everyone, I have a small question.
What is the purpose of the method `tensor.new(..)` in Pytorch, I didn't find anything in the documentation. It looks like it creates a new Tensor (like the name suggests), but why we don't just use `torch.Tensor` constructors instead of using this new method... |
2018/03/13 | 754 | 2,435 | <issue_start>username_0: I have this query
`Select Distinct EMPLOYEE_ID from TABLE`
and this returns bunch of EMPLOYEE ID's with leading zero's if the person's ID starts with 000 then it should be an 'e' and if it's 00 then it should be a 'u'
so for example if I have
0041258 this should show in the result as u41258 a... |
2018/03/13 | 897 | 2,754 | <issue_start>username_0: I'm using Qt 5.10.1 with Qt Creator 4.5.1 and the **style** property is never available in elements.
For example, as shown here [ButtonStyle QML Type](http://doc.qt.io/qt-5/qml-qtquick-controls-styles-buttonstyle.html) , I would like to do:
```
Button {
text: "A button"
style: ButtonS... |
2018/03/13 | 695 | 2,316 | <issue_start>username_0: I noticed today that this query
```
select * from table1 table2 where column_from_table1 = ?;
```
works. It works the same as (same columns return)
```
select * from table1 where column_from_table1 = ?;
```
Shouldn't the former be a syntax error? What is it interpreting `table2` as?<iss... |
2018/03/13 | 1,112 | 3,521 | <issue_start>username_0: I have two time lapse videos with a rate of 1 fps. The camera took 1 Image every minute. Unfortunately it was missed to set the camera to burn/print on every image the time and date. I am trying to burn the time and date afterwards into the video.
I decoded with `ffmpeg` the two *.avi* files i... |