date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/21
692
2,435
<issue_start>username_0: I have the following method: ``` increaseCount() { console.log(this); this.setState(prevState => ({ // X count: prevState.count + 1 })); this.setState(function(prevState) { // Y return { count: prevState.count + 1 }; }); this.setState({ count: this.state.count...
2018/03/21
1,459
4,927
<issue_start>username_0: I've build a vue.js web app for an insurance brokerage where every agent has their own website that is generated from their profiles. This is what the link looks like in my vue-router index file" ``` { path: '/agents/:id', name: 'AgentSite', component: AgentSite }, ``` Everything work...
2018/03/21
1,288
4,239
<issue_start>username_0: I was recomended to use a has though relationship to access all of a users books in all their lists. So if a user has 3 lists and 3 books in each. I can accessall 9 books at once. This works fine thanks to this answer so SO -> <https://stackoverflow.com/a/49386095/9277589> How would I go abou...
2018/03/21
968
2,441
<issue_start>username_0: Maybe a silly question, I am trying to print numbers in a loop in such a way that they are multiples of 10. This is very easy as long as the timestep in the loop is multiple of 10. This is how I do it: ``` time = 0. timestep = 2. while time <= 100.: if int(round(time)) % 10 == 0: p...
2018/03/21
647
2,584
<issue_start>username_0: I have several classes that exhibit a inheritance structure: ``` public class BaseClass { Guid ID {get;set;} } public class LeafType : BaseClass{ /* omitted */} public class OtherLeafType : BaseClass{ /* omitted */} public class Node : BaseClass { public List FirstLeaves {get;set;...
2018/03/21
315
1,011
<issue_start>username_0: I have defined a simple class but recieve the error `AttributeError: 'NoneType' object has no attribute 'bar'` when trying to use it. What am I doing wrong? ``` def Foo(): a = 0 def bar(self): return self.a f = Foo() f.bar() # error ```<issue_comment>username_1: This is the s...
2018/03/21
448
1,570
<issue_start>username_0: I am looking to stop the audio once a STOP button is clicked. the way i have it now only stops the audio for a moment then continues to play again. Here is my code ``` let x = 500; $("#buttonStart").click(()=>{ setInterval(function() {$('audio')[0].play();}, x); }) $("#buttonStop").cli...
2018/03/21
526
1,759
<issue_start>username_0: I'm trying to filter a list with two commands - Filter by Attribute then filter by "not disconnected" and "logged in in the last 90 days." Trying something like this, but it's not working. > > get-mailbox -filter 'ExtensionCustomAttribute1 -eq $null'| > Get-MailboxStatistics -filter {Discon...
2018/03/21
1,270
5,295
<issue_start>username_0: Is it possible to compile and instantiate Kotlin class at runtime? I'm talking about something like that but using Kotlin API: [How do I programmatically compile and instantiate a Java class?](https://stackoverflow.com/questions/2946338/how-do-i-programmatically-compile-and-instantiate-a-java-c...
2018/03/21
832
3,131
<issue_start>username_0: using `urwid`, I'm trying to separate the highlight/walk and cursor functionality of a `Pile` widget. How can I use `up/down` to change which widget is highlighted, while keeping the cursor in a different widget?<issue_comment>username_1: If you really need this, it probably makes sense to writ...
2018/03/21
382
1,257
<issue_start>username_0: I have this code ``` select column from Table start with supervisor_id='555555' connect by prior employee_id=supervisor_id ``` So this query gives me the result for all the employees that have `55555` as their `supervisor_id` and any other employees that have those `employee_id` as their ...
2018/03/21
1,009
3,342
<issue_start>username_0: This code is for printing a table and it's working fine but the problem is that when I click on **print table button** it prints the table but when I clicked it again it again prints the same table below I want it to not work again until the new input values are given. once it should print tabl...
2018/03/21
809
2,542
<issue_start>username_0: I am wanting my image to start essentially look as if it is fading out once the image has been scrolled down to the halfway point. [This is a great example.](https://www.aktivwebsolutions.com/solutions) I am using waypoints to come up with the trigger point, which is working fine. I can't f...
2018/03/21
1,242
4,472
<issue_start>username_0: Hello I´m trying to write program which is counting all characters in given string using HashMap and then it prints result on console like: {a=2, s=2, k=1, m=1, o=1} So far I have something like this: ``` public void result(String sentence) { int value; HashMap mp = new HashMap(); f...
2018/03/21
1,908
8,294
<issue_start>username_0: I stumbled on this problem that I am not able to solve properly. Here is some explanation. **Code** I have these Product classes: ``` public abstract class Product { public int BaseParam {get;set;} } public class SpecificProductA : Product { public int ParamA {get;set;} } public cl...
2018/03/21
1,311
5,048
<issue_start>username_0: I'm currently trying to learn constraints and styling programmatically in `Swift`. I'm also trying to maintain clean and modularized code by splitting up code that relates to "styling". I simply have my `LoginViewController`: ``` import UIKit class LoginViewController: UIViewController { ...
2018/03/21
976
2,233
<issue_start>username_0: I have a list of strings that look liked this ``` "Heartbeats::hype-wss://vps-gb2.nsa.drw:7026" "Heartbeats::hype-wss://vps-de7.nsa.drw:7026" "Heartbeats::hype-wss://vps-gb3.nsa.drw:7006" "Heartbeats::hype-wss://vps-de2.nsa.drw:7043" "Heartbeats::hype-wss://vps-jp2.nsa.drw:7060" "Heartbeats::...
2018/03/21
892
2,418
<issue_start>username_0: I am trying to aggregate strings, but limited to only the preceding rows, not the whole partition. Does anyone know how to do this in Redshift? What I am trying to achieve is the `appended_event_namespace` column below. [![enter image description here](https://i.stack.imgur.com/ZvI6V.png)](ht...
2018/03/21
465
1,364
<issue_start>username_0: I have this script using the npm module [`node-shedule`](https://www.npmjs.com/package/node-schedule). I think I set it to run every 6 hours but it runs for an hour when the hour is 0,6,12,18. it only may run once. I could dirty fix it with a bool, but that ain't my style. a cronjob in Linux i...
2018/03/21
994
3,426
<issue_start>username_0: I'm adapting [this tutorial here](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/02_Convolutional_Neural_Network.ipynb) so I can train a ConvNet in my own set of images. So I made this function to try and get batches, though it does not create batches (yet): ``` def training_b...
2018/03/21
1,826
5,071
<issue_start>username_0: I am working on a set of biological sequences which involves the use of ncbi-blast. I need some help with processing the output file using python regex. The text result containing multiple outputs (sequence analysis results) looks something like this, > > **Query= lcl|TRINITY\_DN2888\_c0\_g2...
2018/03/21
1,261
3,964
<issue_start>username_0: I need to convert the following finite state diagram into Verilog code. [![enter image description here](https://i.stack.imgur.com/temVp.png)](https://i.stack.imgur.com/temVp.png) I've included the code I've written so far below. It looks to me like I've implemented all of the logic correctly ...
2018/03/21
848
2,757
<issue_start>username_0: I have a configuration setup such as this: ``` #[derive(Debug, Deserialize, Serialize)] struct Config { defaults: Option, } #[derive(Debug, Deserialize, Serialize)] struct Default { duration: Option, } #[derive(Serialize, Deserialize, Debug)] struct Millis(u64); ``` Having a value of ...
2018/03/21
547
1,956
<issue_start>username_0: I had a CLI program which will ask user to type ENTER to continue and OTHER keys to abort. ``` for { show() // list one page fmt.Printf("Press ENTER to show next page, press any other key then Enter to quit") var input string fmt.Scanln(&input) if strings.Trim(input, " ")...
2018/03/21
325
1,143
<issue_start>username_0: ) I am getting this error: [![enter image description here](https://i.stack.imgur.com/7m7kM.png)](https://i.stack.imgur.com/7m7kM.png) I installed versions webpack@3.10.0 but then I reinstalled 2.3.0, (I thought it would help....) Thank you in advance for your answer ;)<issue_comment>usernam...
2018/03/21
1,022
3,430
<issue_start>username_0: So i have a following structure in my html ``` - - -closing column col-9 - closing row - closing container ``` As you can see i have one row nested inside another row, and then in that inside row i have two more columns (trying to divide that col-9 into more cols) Problem is,for so...
2018/03/21
389
1,309
<issue_start>username_0: In VS MSBuild we move group of files from one folder to another: ``` ``` It works fine, except one file: `App.exe.config`, because it has double extension and it renamed to `NewApp.config` instead `NewApp.exe.config` (how it should be). How to fix it?<issue_comment>username_1: > > Move and...
2018/03/21
563
1,916
<issue_start>username_0: I'm having issues with my Cordova installation : I installed cordova, Android Studio, Android SDK, Java and defined `JAVA_HOME="/usr/lib/jdk1.8.0_161/bin/java" ANDROID_HOME="/home/myusername/Android/Sdk/platforms/android-24"` In `/etc/environment`. When I go to a Cordova project and type `c...
2018/03/21
955
3,353
<issue_start>username_0: I have a search component that captures the value onClick of a button. I use Redux for state management and when I pass in data, I get an error. ``` import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Typeahead } from 'r...
2018/03/21
1,025
3,586
<issue_start>username_0: Let me start off by saying this is for a database view that I do not manage so the data is what it is. It has a column for job title which also includes the job level (e.g. Software Engineer 2, Designer C, Air Traffic Controller E-1, etc...) I need to get the distinct job titles. All the Softwa...
2018/03/21
258
816
<issue_start>username_0: ``` string raw_str = R"(R"(foo)")"; ``` If I have `R"()"` inside a raw string, and that causes the parser to confuse. (ie., it thought the left most `)"` was the end of the raw string. How do I escape this?<issue_comment>username_1: The raw string will terminate after the first `)"` it see...
2018/03/21
1,064
4,408
<issue_start>username_0: I implement a service which is using database. There are few tables in the database. Inside these tables store results of some calculations. Another services creates a new table for each calculation and now list of table looks like this: * calculation\_1\_0 * calculation\_2\_0 * calculation\_2...
2018/03/21
427
1,769
<issue_start>username_0: Currently, my Spring Boot project is consist of few REST services; resource service, authentication service, and so on. The name of each service is self-descriptive but here are the roles, * Resource service: responsible to manage all resources like User, Transaction, Supplier, and so on. * A...
2018/03/21
428
1,423
<issue_start>username_0: Im new to Python and am having issues with lists, elements,etc. I have this code: ``` order_payment = Api.which_api('order_payments', 'None', '26', 'None') # now that we have info from order_payment, obtain the rest of the vars we need order_id = order_payment['order_id'] order_payment ...
2018/03/21
414
1,463
<issue_start>username_0: I need to find the offset of a specific timezone. How can I do that by using moment? Lets say my client timezone is MST and I want to found the EST timezone offset. I need to get the standard offset without considering daylight saving. With `moment.tz("America/Edmonton").format('Z')` I get `-...
2018/03/21
560
1,970
<issue_start>username_0: I have a class ``` class MyClass(object): ClassTag = '!' + 'MyClass' ``` Instead of explicitly assigning `'MyClass'` I would like to use some construct to get the class name. If I were inside a class function, I would do something like ``` @classfunction def Foo(cls): tag = '!' + cl...
2018/03/21
680
2,241
<issue_start>username_0: I am trying to build Tensorflow 1.6 with MPI support. I am getting the following error: > > ERROR: /gpfshome01/u/amalik/Tensorflow/tensorflow/tensorflow/contrib/gdr/BUILD:52:1: C++ compilation of rule '//tensorflow/contrib/gdr:gdr\_memory\_manager' failed (Exit 1) > tensorflow/contrib/gdr/gd...
2018/03/21
744
2,729
<issue_start>username_0: If I have a query like this, will the OUTER APPLY only be applied on the TOP 5 rows of tblA? Or will it be applied on all rows returned from tblA, and only then will the TOP 5 be applicable? I have a lot of rows in tblA, and I dont want the OUTER APPLY to run on all the rows. ``` SELECT TOP 5...
2018/03/21
903
3,404
<issue_start>username_0: I am trying to allow my app to save UIColors in settings, and when I tried to save the settings for the background color it worked. But when I add a second block of code that should allow me to save a second UIColor, it gives me the error - Fatal error: Unexpectedly found nil while unwrapping a...
2018/03/21
631
2,325
<issue_start>username_0: i have a gridview that i have created without datasource control and that has data from a database table and the gridview also has a link selection in one column. The select link is pointed to ActivityID (maybe it will be a problem?) ``` ``` [![enter image description here](https://i.stack....
2018/03/21
773
2,892
<issue_start>username_0: Trying to fetch the pokeapi and map through the array of data returned from the api. I set my state to an empty array and then I proceed to try and fetch the api and receive data from the response, and add it to my pokemon state ``` class App extends Component { constructor() { ...
2018/03/21
774
2,663
<issue_start>username_0: Let's say I have a JavaFX application and want to change between scenes. Each scene contains Buttons, which, when pressed, lead to the following scenes. In order to give my buttons commands what to do if pressed, I try to do the following: ``` for (Button button : buttonsArray) //for each But...
2018/03/21
688
2,478
<issue_start>username_0: I am attempting to use the AWS SDK for JavaScript. This process requires creating a credential file as [explained here](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-shared.html): However I am unable to create this file as descibed for Windows. On ...
2018/03/21
352
1,175
<issue_start>username_0: We were told to use this to get a question answered. The following is a breakdown of our Menu; we apologize for the shape of the CSS/HTML/JS but were unaware as to how present it otherwise. We're attempting to have all column/rows on the same height. We're aware of row-eq-height but are appar...
2018/03/21
1,055
3,404
<issue_start>username_0: I have the following `matplotlib` snippet: ``` fig, ax = plt.subplots(figsize=(6,6)) values = np.random.normal(loc=0, scale=1, size=10) ax.plot(range(10), values, 'r^', markersize=15, alpha=0.4); ``` which produces [![enter image description here](https://i.stack.imgur.com/Vlk01.png)](http...
2018/03/21
1,358
3,484
<issue_start>username_0: Working on a chat bubble: ```css .bubble { display: inline-block; position: relative; width: 35px; height: 20px; padding: 0px; background: rgb(219, 218, 218); -webkit-border-radius: 16px; -moz-border-radius: 16px; border-radius: 16px; border:rg...
2018/03/21
798
3,135
<issue_start>username_0: I have a function that I want to automatically take a screenshot and then upload it to the users preferred email app. ``` Date now = new Date(); android.text.format.DateFormat.format("yyyy-MM-dd_hh:mm:ss", now); try { // image naming and path to include sd card appending...
2018/03/21
789
3,046
<issue_start>username_0: I'm new to Selenium & new to Java as well. So maybe I'm missing something obvious, but I’m spinning on this for a while now, can't move forward & totally desperate. Please help! Here is my set-up: My custom Driver class implements WebDriver & sets property: ``` public class Driver implemen...
2018/03/21
680
2,378
<issue_start>username_0: XCode 7, Swift 2. (don't even start on me about that, it's not my favorite set of constraints either) So I'm sending data using [node-apn](https://github.com/node-apn/node-apn) (BIG thanks to those folks!). I'm using the (pushkit option) `*.voip` topic and I got all that working. I can see the...
2018/03/21
607
1,974
<issue_start>username_0: I have a string enum and need to get all the values. For instance, for the below enum, I'd like to return `["Red", "Yellow"]`: ``` export enum FruitColors { Apple = "Red", Banana = "Yellow", } ```<issue_comment>username_1: According to [this GitHub comment](https://github.com/Microsof...
2018/03/21
1,034
3,132
<issue_start>username_0: I need to execute a curl command like this: ``` #!/bin/bash shopid=9932781 itemid=231873991 curl -sSb /tmp/cookies 'https://website.com' -H 'cookie: csrftoken=<PASSWORD>' -H 'x-csrftoken: <PASSWORD>' -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary' -H 'referer: https://...
2018/03/21
513
1,944
<issue_start>username_0: I have 2 table. Table A Payment Table B Phone I want combine result of below 2 query of difference schema into 1 table. ``` select Payment_DT from DW.Payment SELECT PHONE_NUMBER FROM STG_ANALYSIS.PHONE ``` This is the output I am looking for. ``` Payment_Dt Phone_Number 3/31/2018 12...
2018/03/21
857
3,068
<issue_start>username_0: I'm trying to parallelize time series forecasting in python using dask. The format of the data is that each time series is a column and they have a common index of monthly dates. I have a custom forecasting function that returns a time series object with the fitted and forecasted values. I want...
2018/03/21
959
2,324
<issue_start>username_0: the struct: ``` struct info{ int id; int time; int x; int y; }; ``` The array of structs will always follow this conditions: * The time variable will always be given in a sorted away to it's corresponding id * It's considered duplicated if the variables: `time`, `x`, `y` ar...
2018/03/21
704
2,205
<issue_start>username_0: I use an Add-in to export all vba code to a repository whenever a workbook is opened. It works great for versioning, but I must remember to deactivate it before I leave the office every evening. If I don't, the automated Excel processes that run overnight generate the prompt and can't proceed u...
2018/03/21
390
1,423
<issue_start>username_0: is there any possibility to detect a click on an ImageView with a Handler (eg looking at it for 100 ms)? I mean is there a method of ImageView/View, which give me a boolean when someone has the finger on the ImageView? Thank you! EDIT: For all people in interest for an deep understanding: <ht...
2018/03/21
493
1,614
<issue_start>username_0: In Postgres, a query like this: `SELECT a.id, b.id FROM table1 a INNER JOIN table2 b on a.id=b.id;` Will return 'deconflicted' column names like: > > a.id, b.id > > > However, in Oracle, the `id` columns just keep their original names: > > id, id > > > My problem here is that my f...
2018/03/21
442
1,694
<issue_start>username_0: Is it possible to share config variables / env variables across subfolders of a monorepo that is set up using yarn workspaces? We've got a monorepo for a project, and several of the subfolders are projects that are built using create-react-app. In those individual folders, we can have .env file...
2018/03/21
704
3,095
<issue_start>username_0: One of the *Units of Functionality* that POSIX states an OS needs to provide to be POSIX compliant is POSIX\_C\_LANG\_SUPPORT. Basically this is the whole C Standard Library with some more things. My question is simple: developers of POSIX compliant OSes usually just download an open source ve...
2018/03/21
1,299
4,593
<issue_start>username_0: I'm certain there's probably a bunch of things going on here that I don't understand well enough, so forgive me if this is a stupid question or if there's obvious details missing. I have a Visual Studio 2015 solution that I've upgraded from .NET 4.5.1 to .NET 4.7.1. The solution consists of a ...
2018/03/21
1,440
4,908
<issue_start>username_0: I'm trying to determine the format of a text file by looping through the first 10 lines, perform some regex matching and then compare the results at the end. I can easily loop through the entire file, but I only want the first N lines (in this case 10) I'm familiar with other languages, but th...
2018/03/21
1,262
3,931
<issue_start>username_0: I am working on a client for a RESTful service, using .NET Core 2.0. The remote service returns challenges like this: ``` WwwAuthenticate: Bearer realm="https://somesite/auth",service="some site",scope="some scope" ``` Which need to get turned into token requests like: ``` GET https://somes...
2018/03/21
1,833
6,041
<issue_start>username_0: I am new to React and RN. I have looked into every single solution here but I did not find a solution for my case. I am trying to pull google calendar events from calendar v3 api. I have tried two ways, so far. I don't know which one is correct but I did not get a correct result for any of them...
2018/03/21
404
1,691
<issue_start>username_0: In a lot of the compiled Javascript modules, somewhere in the preamble there is an invocation to `Function('return this')()` to get the global object. I'm working in an interpreter environment where the use of `Function` constructor (along with `eval`) is forbidden for security reasons. I repla...
2018/03/21
196
644
<issue_start>username_0: I have below html code. How to move span element with image right to the div tag? Below is the code ``` " + rank + " ![](test.jpg) " + o.Title + " ![](images/Information.png) ``` [expected ouput](https://i.stack.imgur.com/2beAz.png)<issue_comment>username_1: ```html " + rank + " !...
2018/03/21
177
683
<issue_start>username_0: I am looking for the event that gets fired when the tableview loads the rows to fit the screen. I know tableview loads only the number of rows that fit the screen. I want to execute a set of code when the rows that fit the screen are loaded. Any pointers on how to determine this?<issue_comment...
2018/03/21
426
1,351
<issue_start>username_0: I have a number of divs with the same `season-list` class and each has a `data-episode-count` data attribute. I need to be able to grab the attribute on click and use that value to hide `js-show-more-trigger` if the value of the attribute is greater than 6. I'm currently looping through all `se...
2018/03/21
1,107
4,003
<issue_start>username_0: I have two classes: ``` class Bar extends Foo { // Foo isn't relevant constructor(value) { if (!(value instanceof Foo)) throw "InvalidArgumentException: (...)"; super(); this.value = value; } } class Baz extends Bar { constructor(value) { super(value); } } ``` The `B...
2018/03/21
433
1,545
<issue_start>username_0: Is it possible to use drawable resources bundled in your app instead of hosted images for adding stickers to Gboard? Google provides the following code snippet [here](https://android-developers.googleblog.com/2017/09/create-stickers-for-gboard-on-google.html) to show how to add a sticker to G...
2018/03/21
271
1,080
<issue_start>username_0: I'm writing a Worpress plugin that defines a shortcode. What happens at shortcode registration if there's another shortcode already registered with that same name ? What is the practice ? Is there a possibility to find the conflicting plugin so as to warn the user that he should deactivate it t...
2018/03/21
367
1,343
<issue_start>username_0: I have two tables, a NextOfKin table and a Course table, the NextOfKin table has the following attributes: ``` StudentID ContactTelNo ``` And the course has this one (only showing relevant attributes): ``` CourseNo ``` I am trying to get an output where I show the studentID and contactT...
2018/03/21
415
1,570
<issue_start>username_0: I am having an issue with my web host changing the permission of one of my configuration files for my website. No matter how many times I change the permissions, they always revert back to writable after a day or so. The web host has been unable to resolve the issue, so I thought I'd try to use...
2018/03/21
632
2,017
<issue_start>username_0: I am passing a string variable (std::string) and iterating through the string character by character. Whenever I run into a decimal, I want to combine the previous position on the string (i.e 2) and the next position in the string (i.e 5) into a double. So how would I go about making the char 2...
2018/03/21
518
1,507
<issue_start>username_0: ``` def max(list): max_element = list[0] for i in range(1, len(list)): if list[i] > max_element: max_element = list[i] print(max_element) print(max([1, 2, 8, 4])) #NameError: name 'max_element' is not defined ``` how to fix it?<issue_comment>username_1: Note th...
2018/03/21
387
1,419
<issue_start>username_0: I've noticed through programming in PHP that string interpolation (`"blah blah ${foo}"`) only works in double-quoted strings (`"..."`). For instance, this line will work: ``` $bar = "foo"; echo "I like ${bar}"; >> I like foo ``` But this one won't: ``` $bar = "foo"; echo 'I like ${bar}'; ...
2018/03/21
439
1,648
<issue_start>username_0: Suppose I have a module `foo` like this: ``` export const f = x => x + 1; export const g = x => x * 2; ``` I can use this module like this: ``` import { f, g } from 'foo'; console.log(f(g(2))); ``` Or like this: ``` import * as foo from 'foo'; console.log(foo.f(foo.g(2))); ``` I pr...
2018/03/21
269
1,041
<issue_start>username_0: I'm trying to make a system that uses the Payment Request Api and for the most part its successful, but TypeScript doesn't seem to have a definition for `canMakePayment` under the `PaymentRequest` object. Am I missing something or do I need to cast it to `any` so my Typescript builds? Thanks<...
2018/03/21
674
2,606
<issue_start>username_0: This is a newbie Git question, but I haven't found an answer on Stack Overflow that could make it clear to me. Basically, I was working on a branch on my computer: ``` $ git checkout -b my_branch ``` Then, I made a few changes in my files. Afterwards, inside `my_branch`, I added, committed,...
2018/03/21
563
2,260
<issue_start>username_0: we have an school asignment to make a specific function of string split the header and arguments of function is given cannot change them . this function should split original by delimiter into array of string that store each part of string delimiter not included and in additon for each delimit...
2018/03/21
1,227
3,496
<issue_start>username_0: ``` helpful '[2, 4]' '[0, 0]' '[0, 1]' '[7, 13]' '[4, 6]' ``` Column name helpful has a list inside the string. I want to split 2 and 4 into separate columns. ``` [int(each) for each in df['helpful'][0].strip('[]').split(',')] ``` This works the first row but if I do ``` [int(each) for e...
2018/03/21
1,247
3,097
<issue_start>username_0: Suppose I pass a 1D array: ``` >>> np.arange(0,20) array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]) >>> np.arange(0,20).shape (20,) ``` into argwhere: ``` >>> np.argwhere(np.arange(0,20)<10) array([[0], [1], [2], [3], ...
2018/03/21
1,472
5,075
<issue_start>username_0: In CSS, `position: sticky` enables an element to display with a `position: static` behaviour (ie. it adopts its default position within the document flow) until it reaches a certain scroll position, after which it adopts `position: fixed` behaviour. So... does that mean we cannot use `position...
2018/03/21
1,067
2,135
<issue_start>username_0: I would like to make a loop which calculates mean values by row moving by three values and ignoring missing (NA) values. Here is my example, where mean of a, b and c values and mean of x, y and z should be calculated: ``` df <- data.frame(label=paste0("lab", 1:15), a=1:5, b=6:2, c=25:11, ...
2018/03/21
1,533
5,209
<issue_start>username_0: Trying to get this program to translate letters into numbers so a telephone number with words can be input and will output the number version. (1800GOTJUNK = 18004685865) Not sure where Im going wrong but every output just gives whatever the last letter is and repeats its number for all numbers...
2018/03/21
1,280
4,394
<issue_start>username_0: I am trying to write a SQL query that would "calculate" status column of the row based on `JOIN` with statuses table. My record is basically: `id | name | statusId`, which is foreign key to statuses table. That table has: `id | statusName` I collect `count()` for each `DISTINCT` statusId. Now...
2018/03/21
1,486
5,061
<issue_start>username_0: I am trying to call a method from JavaScript from an HTML file. Specifically, call the method "speak" from Dog and Cat (shown below the HTML). I think I should be using `window.onload = function()` or something similar, with `onload`, but I do not know how to call the methods. This is the HTML...
2018/03/21
1,789
6,472
<issue_start>username_0: I have a python program which sends height data from my client to my server program. My server program will not be always running so if I don't recieve a response I would like it to try again. So far what I have is that if a response (from the server) is not given in 20 Seconds it causes an ex...
2018/03/21
451
1,493
<issue_start>username_0: I am using [AGM](https://angular-maps.com) There is [MarkerManager](https://angular-maps.com/api-docs/agm-core/injectables/MarkerManager.html) which I want to use in my @Component ``` import { Component } from '@angular/core'; import { MarkerManager } from '@agm/core'; @Component({ selecto...
2018/03/21
723
2,369
<issue_start>username_0: I am trying to build libgit2 in release mode on Windows 10 x64. In my libgit2 directory, I run the following: ``` mkdir build cd build cmake .. -DCMAKE_BUILD_TYPE=Release cmake --build . ``` It still builds in debug mode, as far as I can tell. At least when I link it into a Visual Studio pr...
2018/03/21
512
1,886
<issue_start>username_0: I have a simple form ``` class MyForm(forms.ModelForm): class Meta: model = Track fields = ['website', 'keyword'] labels = {'website': 'Website URL', 'keyword': 'Keyword'} ``` and a view ``` def track(request): if request.method != 'POST': form = MyForm() else: form = M...
2018/03/21
876
3,180
<issue_start>username_0: Hoping you could help... I'm a little stumped... Basically, I have a google map, with autocomplete working. You search an origin and destination and my correct, set filtered results/markers appear on the map. However, when I view my map on mobile, via chrome/safari, the map does not move and y...
2018/03/21
826
2,977
<issue_start>username_0: I only just started learning how to work with Angular 2 and Ionic 3.20.0 but now facing a challenge. I'm trying to display product images in my home page but the app is throwing this error > > ERROR Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[HomePage -> ProductProvide...
2018/03/21
492
1,758
<issue_start>username_0: I have a hidden div that I want to show on a button press however because the ACF repeater is repeating the id it's opening all the hidden divs at once. ``` //This is inside a repeater field causing the #buy to repeat ![](images/right-arrow.png) php the\_sub\_field('eventbrite\_widget'); ...
2018/03/21
1,199
4,533
<issue_start>username_0: I have this simple example. I need to pass an argument to a callback function. In this code, when I do not pass any arguments, the timer works fine and it executes the callback function after the specified time interval elapsed. But if I passed `x`, the function gets executed without waiting fo...
2018/03/21
718
2,560
<issue_start>username_0: I'm trying to write a reusable linq expression that I'm passing multiple parameters into: ``` private System.Linq.Expressions.Expression> IsPrevFeeDetail { get { return (feeLevelDetail, currentFeeLevelDetail) => feeLevelDetail.ToDt < currentFeeLevelDetail.FromDt); } } ``` But every ex...
2018/03/21
612
1,855
<issue_start>username_0: Created the program to randomize the movement of the turtle but cannot get it to bounce off the window/canvas limits. Tried a few solutions posted with similar questions but still no luck. ``` from turtle import Turtle, Screen import random def createTurtle(color, width): tempName = Turtl...
2018/03/21
469
1,487
<issue_start>username_0: How do I unit test my script for incorrect command line arguments? For example, > > my\_script.py -t > > > should give an error since -t flag is not present, as shown in the code below: ``` parser = OptionParser() parser.add_option("-d", action="callback", ...
2018/03/21
456
1,862
<issue_start>username_0: I'm using MS Bot Framework, C#, with LUIS.ai. I've found that LUIS.ai adds a space both before and after dashes or underscores in the entities it finds in an utterance. For example if the user types: "search for transition-document files in my project" and "transition-document files" is dete...
2018/03/21
484
1,707
<issue_start>username_0: When I use `EarlyStopping` callback does Keras save best model in terms of `val_loss` or it save model on save\_epoch = [best epoch in terms of `val_loss`] + YEARLY\_STOPPING\_PATIENCE\_EPOCHS ? If it's second option, how to just save best model? Here is code snippet: ``` early_stopping = Ea...
2018/03/21
2,492
7,620
<issue_start>username_0: Given n sorted lists A1, A2, ..., An of integers in decreasing order, is there an algorithm to efficiently generate all elements of their cartesian product in decreasing tuple sum order ? For example, n=3 `A1 = [9, 8, 0]` `A2 = [4, 2]` `A3 = [5, 1]` The expected output would be the car...