date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/08
722
2,624
<issue_start>username_0: I have a while loop, I would like to stopped it when the user presses the letter "s" on the keyboard. I should manage the problem with a "trap" and using relative signal, which by default block has with combination "ctrl + c", but I should have the same effect by pressing "s". (I do not have ...
2018/03/08
968
3,063
<issue_start>username_0: after doing a some research I reached the point that I decided to ask here for advice as I am not sure how to proceeed. **The problem**: I have an array of RR (IBI) data Example: `[679, 686, 650...]` How can I convert this to heart rate? My research: * <http://www.meddean.luc.edu/lume...
2018/03/08
1,229
4,157
<issue_start>username_0: I have a parent component as follow: ``` import React, { Component } from 'react'; import PropTypes from 'prop-types'; import GridItem from './gridItem.js' class Grid extends Component { renderGridItems = () => { const gridItems = this.props.gridItems, itemsHTML = []; fo...
2018/03/08
1,182
4,298
<issue_start>username_0: I am trying to create a new report from a dataset in an embedded view. However, I keep getting "This content isn't available" and the reportEmbed.min.js returning a 403 on render. Within app.powerbi.com I can successfully create and save reports, but as mentioned above the embedded view is not ...
2018/03/08
562
1,951
<issue_start>username_0: Is it possible to send emails using PowerBuilder 12.5 without external applications? These would be from, say, <EMAIL> to <EMAIL> with a subject and MS Word style, so rich text or HTML style. The system is running on Windows, though either 7 or 10... All help very much appreciated.<issue_comm...
2018/03/08
757
2,552
<issue_start>username_0: I am using R to transform a datatable form wide to long format. It works, except that the have to use a Variable for the new column: ``` library(readr) library(tidyr) files <- Sys.glob("sources/*.csv") #data is from http://api.worldbank.org/v2/en/indicator/NY.GDP.MKTP.CD?downloadformat=csv ,...
2018/03/08
571
2,026
<issue_start>username_0: I want to access variables and such from form 1 to form 2, I have one main form and then open another with some indicators, a timer keep rolling in form 2 to check variables and lists in form 1 and light or darken the indicators. But I get "Stack overflow exeption" se picture This is the code:...
2018/03/08
654
2,256
<issue_start>username_0: I have a list code ``` * [Home](https://) * [Profile](https://) * [\_Vision](https://) * [\_Mission](https://) ``` If there is a character in the link name **"\_"** (without the quotes) then the structure of the code list will be a sub-menu, and enter the tag list has previously has-sub cl...
2018/03/08
650
2,100
<issue_start>username_0: I have a Javascript function to permit only numbers in a input. ``` ``` This is my Javascript function: ``` function isNumber(e) { k = (document.all) ? e.keyCode : e.which; if (k==8 || k==0) return true; search = /[0-9]/; n = String.fromCharC...
2018/03/08
385
1,082
<issue_start>username_0: I wanted to print odd numbers as many as input. Example: input=7 Output: 1,3,5,7,9,11,13 This is what i wrote --- ``` a=int(input("input how many odd numbers to print: ")) for i in range(a): if(i%2==1): print(i) ``` --- Yes, the output is obviously 1 3 5 And i tried this too...
2018/03/08
1,014
3,555
<issue_start>username_0: I am not very good with Java, so please forgive me for my ignorance. I am selecting from a table and looping through the result set to make a list that i can use to convert into json which should look like the following example. ``` { "ContactId": "123", "key": { "type": "email...
2018/03/08
451
1,827
<issue_start>username_0: I saw that on jQuery website it says that jQuery is "cross-platform" But isn't that obvious? could a browser be not compatible with jQuery? Given that every browser **is** **essentialy** **an interpreter** for JavaScript, and Given that jQuery **IS** **JavaScript** code. Is it po...
2018/03/08
540
2,097
<issue_start>username_0: I haven’t experimented with cts:similar-query before and it seems that using different numbers in the max-terms option greatly affects the results. I’ve not changed any of the options for DB settings, so I’m using the default DB settings. I notice that the default is 16 for max-terms. I’ve us...
2018/03/08
2,618
6,528
<issue_start>username_0: Configuration: Using Nucleo-L476RG. Using GNU ARM Eclipse. I have generated a minimalist code from STM32CubeMX. I have flashed J-link driver in my on board ST-Link. Have been trying to run debugger for my code but my program counter is not setting at main().Instead it fails to read a certain ...
2018/03/08
308
1,190
<issue_start>username_0: I am getting an error while installing the features. ``` error executing command: error restarting bundles ``` Initially, it worked fine for some of the features but then it suddenly started throwing this error. Any suggestion on this would be appreciated.<issue_comment>username_1: if you ...
2018/03/08
480
1,768
<issue_start>username_0: I would like to execute a method once the link is being clicked and the new page is loaded. I have tried the [tag](https://www.ocpsoft.org/docs/prettyfaces/3.3.3/en-US/html/Configuration.html#config.actions.phases) as but this didn't help either : ``` #{myBean.barMethod} #{myBean.myMethod}...
2018/03/08
1,525
3,068
<issue_start>username_0: I have a data frame looks like this ``` library(dplyr) test.df <- data.frame(id=c(1,1,1,3,3,3,3), date=c("2016-02-13","2016-06-01", "2016-09-01","2015-08-02", "2015-09-21","2016-12-01", ...
2018/03/08
720
1,385
<issue_start>username_0: I want a query that shows a time difference in hours and minutes in Impala. Or in SQL? How can I do this? start 2017-11-29 19:45:00 - end 2017-11-29 21:30:00<issue_comment>username_1: You want to use summarize instead of mutate ``` new.df <- test.df %>% group_by(id) %>% summarize(first...
2018/03/08
608
1,983
<issue_start>username_0: I want to search a special keyword in Instagram. For example, I want to search this word:"fast <PASSWORD>". I can send this key in search box. But, when I use submit method in Selenium by Python3, it doesn't work and give me error. This is my code: ``` from selenium import webdriver from selen...
2018/03/08
340
1,182
<issue_start>username_0: I am learning about `TextView` and making a birthday list app. I am learning on udacity. I adjusted the weight to 1 and height to 0dp and I thought every `TextView` would space out equally. Instead only 5 `TextView`s were able to fit, and when I tried to add more there I got this [error](https...
2018/03/08
655
2,278
<issue_start>username_0: I'm working on a spark streaming job which runs on standalone mode. The executors by default append the logs in `$SPARK_HOME/work/app_idxxxx/stderr` and `stdout` files. Now the problem comes when app runs for a long time say a month or more and it generates a lot of logs inside `stderr` file. I...
2018/03/08
634
2,306
<issue_start>username_0: My endgame is to be able to input words into a text box one by one and have them appear in an updated, alphabetical list, every time I enter a code. I'm fairly new at this so sorry for any mistakes! ``` namespace SortWords2 { public partial class Form1 : Form { public Form1() { ...
2018/03/08
945
3,393
<issue_start>username_0: I have the following code: ``` php DEFINE ('DB_USER', 'test'); DEFINE ('DB_PASSWORD', '<PASSWORD>'); DEFINE ('DB_HOST', 'localhost'); DEFINE ('DB_NAME', 'site'); $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME) OR die('Could not connect to MYSQL ' . mysqli...
2018/03/08
2,469
8,251
<issue_start>username_0: Let's say we have some array of boolean values: ``` A = [0 1 1 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 0 1 1 1 1 0 0 0 ... 0] ``` The array is constructed by performing classification on a stream of data. Each element in the array corresponds to the output of a classification algorithm given a sma...
2018/03/08
1,536
5,434
<issue_start>username_0: How to get scan result from wifi for example every 3 seconds, without `mWifimanager.startScan();` Google says : `startScan() This method was deprecated in API level P. The ability for apps to trigger scan requests will be removed in a future release.` Notice for this API level i'm using `L...
2018/03/08
1,346
4,869
<issue_start>username_0: Is it possible to have an *eloquent query builder* return `StdClass` rather then `Model`? For example `User::where('age', '>', 34)->get()` returns a `Collection` of `User` models. Whereas `DB::table('users')->where('age', '>', 34)->get()` returns a `Collection` of `StdClass` objects. Much fas...
2018/03/08
1,331
4,764
<issue_start>username_0: In the table below, I'm trying to find the max date (most recent) based on the criteria "Major" for each facility. I tried using maxifs to no avail, and my table setup is different than any other post I've seen on here. Example - the date I'm looking for on Facility 200 would be 7/7/2014. [![...
2018/03/08
1,955
6,429
<issue_start>username_0: A Scatter widget is positioned in a TabbedPanelItem content. When the scatter object is moved, it moves over all the tab headers. How do I make sure it moves under the tab headers? I get that widget depth index follows the order of when widgets are added, but don't understand how I could add th...
2018/03/08
1,766
5,903
<issue_start>username_0: I want to search a special keyword in Instagram. For example, I want to search this word:"internet". I can send this key in search box. But, when I use submit method in Selenium by Python3, it doesn't work and give me error. This is my code: ``` from selenium import webdriver from selenium.web...
2018/03/08
1,932
6,039
<issue_start>username_0: ``` def translat_dna(sequence): gencode= { 'ATA':'I', 'ATC':'I', 'ATT':'I', 'ATG':'M', 'ACA':'T', 'ACC':'T', 'ACG':'T', 'ACT':'T', 'AAC':'N', 'AAT':'N', 'AAA':'K', 'AAG':'K', 'AGC':'S', 'AGT':'S', 'AGA':'R', 'AGG':'R', 'CTA':'L', 'CTC...
2018/03/08
1,374
4,901
<issue_start>username_0: I have a couple of tables, tblUser and tblTableUsage that keeps track of who has saved data on what table/class. ``` tblUser: UserID, UserName, Department tblTableUsage: UserID, ClassName, DateUsed DECLARE @ThisDate DATETIME SET @ThisDate = '2018-03-05 00:00:00.000' SELECT DISTINCT(tu.Cla...
2018/03/08
669
2,242
<issue_start>username_0: So I am using Laravel 5.5, PHP 7.0 I have this at the bottom of my views file: ``` $("#myRange").ionRangeSlider({ type: "double", grid: true, min: {{ $minPrice }}, max: {{ $maxPrice}}, @if(isset($returnData['Ranges']) && count($returnData['Ranges']) > 0) from: {{ $...
2018/03/08
724
2,215
<issue_start>username_0: Lets say here is the same document: ``` { "_id" : 1.0, "custname" : "metlife", "address" : { "city" : "Bangalore", "country" : "INDIA" } } ``` And if I want to push an extra field to this document, something like below: ``` db.customers.updateMany( {"address.country":"INDIA"}, ...
2018/03/08
302
1,033
<issue_start>username_0: I am trying to autofocus input element on bootstrap 4 modal open . I have tried below code from <http://getbootstrap.com/docs/4.0/components/modal/> but this is not working. Can someone help me to give working demo ``` $('#myModal').on('shown.bs.modal', function () { $('#myInput').trigger(...
2018/03/08
749
2,887
<issue_start>username_0: I have an existing Web Application hosted in IIS which an ASP.NET MVC application. Say this is hosted as `www.mysite.com`. I am trying to host a .NET Core 2.0 web application as a sub-application to this. But when I try to access this as `www.mysite.com/subaApp`, IIS is looking for all my sta...
2018/03/08
776
3,019
<issue_start>username_0: ``` public abstract class AbstractDAO implements IFindDAO { @Autowired private JdbcTemplate jdbcTemplate; @Override public List findOne(final int eventId) { return jdbcTemplate.query(getOneQuery(), new Object[]{eventId}, new TypeAMapper()); } @Override public List getAll() { return ...
2018/03/08
357
1,338
<issue_start>username_0: I am having troubles getting electron, angular2 and aws-amplify (Auth) to work. Everything works in the browser but when I try to run my app in electron I get: ERROR ReferenceError: Auth is not defined I am using angular-cli and installed aws-amplify with npm Does anyone have a clue how I s...
2018/03/08
1,216
3,386
<issue_start>username_0: ``` myObject { orange: "10.5", banana:"20.5", apple: "5.1", pineapple: "5.1", cherry: "5.1" } ``` I'd like to create this ``` myNewObject { apple: "5.1", cherry: "5.1" } ``` My code is ``` for (var property in myObject) { delete object["orange"]; delete object["banana"]; delete object[...
2018/03/08
1,081
3,081
<issue_start>username_0: I would like to write a health check for z/OS but am unclear on where to begin. Any advice, examples, or direction available? Also, is it possible to write a Health Check in Unix System Services?<issue_comment>username_1: You can just loop over your array and build up your new object as you g...
2018/03/08
465
1,770
<issue_start>username_0: I am trying to write a jolt in Apache Nifi that converts the json form. I managed to convert the jolt but one attribute is missing underscore: Output: ``` { "Source": { //source is missing underscore. It should look like _Source "userName": "Lulu" } } ``` ...
2018/03/08
1,099
4,395
<issue_start>username_0: So i have this code to enter a new scene: ``` using System.Collections; using UnityEngine; // add this line to use the SceneManagment library using UnityEngine.SceneManagement; public class LoadScenes : MonoBehaviour { [SerializeField] private string loadLevel; void onTriggerEnter...
2018/03/08
1,099
4,390
<issue_start>username_0: I am working on project with `Qt Quick Control 2`. When I try to run my software in debug mode FileDialog.qml opens perfectly but when I deploy it as release mode it doesn't work. Here is my code: ``` import QtQuick 2.4 import QtQuick.Window 2.2 import QtQuick.Controls 1.3 import QtQuick...
2018/03/08
570
1,627
<issue_start>username_0: ``` INSERT INTO contact(id, org_name, street_address1, street_address2, city, state, postal_code, country_code, last_name, first_name, person_title, phone_country_code, phone_area-code, phone_number, email, created_time) VALUES(20, 'cognizant', 'chennai', 'ckc', 'tamilnadu', '092345'...
2018/03/08
535
1,692
<issue_start>username_0: I'm trying to check if a string is empty in a form, setting a default value if the answer is true, or passing the actual value if the string isn't empty. Here's my code from the controller: ``` $scope.addElem = function () { $scope.lista2.push({ com: null ? com = 'VUOTO' : com =...
2018/03/08
1,079
4,007
<issue_start>username_0: I'm making a game where questions are asked and the players answers them by selecting one of four buttons. I have two classes, one which is 'QuestionsAndButtons' and the other is 'Main'. I want to get an element from my arraylist of strings in the 'QuestionsAndButtons' class and display it onto...
2018/03/08
1,304
5,410
<issue_start>username_0: I am testing how .NET WebSockets work when the client can't process data from the server side fast enough. For this purpose, I wrote an application that sends data continuously to a WebSocket, but includes an artificial delay in the receive loop. As expected, once the TCP window and other buffe...
2018/03/08
416
1,589
<issue_start>username_0: I have composer installed on windows 8.1. I use it to download drupal distributions and modules. I have also installed acquia dev desktop. As you know that dev desktop comes with different versions of php and it has separate folders for it. I have setup composer to use php 5.6. How can I make i...
2018/03/08
444
1,564
<issue_start>username_0: Scss has the !default feature, to easily allow a client to override a value. However, if I use it in Angular it doesn't work, I think due to Angular's encapsulation. Example: In styles.scss I have: ``` $hello-background: red; @import 'app/variables'; ``` and in app/variables: ``` $hello-b...
2018/03/08
527
1,489
<issue_start>username_0: I have imported CSV file in pandas it contains, 1 column and 25000 rows, I want to transform this file into new data frame sample data: 1 column 4 rows: ``` ABC 122 678 abc ``` I want to create DataFrame with, each element of the list(ABC) as row...
2018/03/08
885
2,509
<issue_start>username_0: I have not been able to add a legend to my histogram, created using matplotlib.pyplot. Would appreciate some help/advice. The below dataset is junk data, but is an accurate example of the situation, two datasets, both in the same dataframe, seperated by a filter on a column. ``` import numpy...
2018/03/08
314
956
<issue_start>username_0: I'm testing something that we do in school. I have a struct `MyStruct` and two pointers, but when I want to work with the pointer I get this error for both pointers: > > uninitialized local variable 'p' used > > > ``` struct MyStruct { int id; double value; }; MyStruct *p, *q; do...
2018/03/08
655
2,167
<issue_start>username_0: I'm trying to make a regex to identify a comment. It has to start with `//` and end with a new line or a `*)` pattern. For now, I manage to get this `(\/\/)([^\n\r]+)`, but I am unsuccessful to add the `*)` pattern. Any tips?<issue_comment>username_1: Try it like this: [`^\/\/[^\n\r]+(?:[\n\r...
2018/03/08
437
1,524
<issue_start>username_0: When I try and control, click and drag the WebKit View from my main.Storyboard it just has the blue line but no connection options. I tried it on my UIViewController.h and it gave me connection options. Is this a bug? If so how can I fix it? [This is the blue line I am talking about.](https://i...
2018/03/08
697
1,873
<issue_start>username_0: I have this code: ``` val_hps_mix <- 0 co_neg_HP <- 1 co_pos_HP <- 2 e <- c(.1, -.2, 0, -.2) if(val_hps_mix == 0 & co_neg_HP > 0 & co_pos_HP > 0) e[e < max(e[e < 0])] <- 0 if(val_hps_mix == 0 & co_neg_HP > 0 & co_pos_HP > 0) e[e < 0] <- e[e < 0]/length(e[e < 0]) e ``` As expected, this retur...
2018/03/08
815
2,523
<issue_start>username_0: I have an HTML file containing the following text: ``` Testtest ``` And I run this `sed` command against it: ``` sed -i -e "s:::g" /tmp/test/index.html ``` I'd expect for that just to replace with and leave the rest alone, but it ends up affecting content after the regex: ``` Testtest...
2018/03/08
719
2,259
<issue_start>username_0: in iOS, Google Map allow to provide an animation when Marker pop on map. I'am looking to do the same on Android. So there is nothing to do it or someone know a workaround?<issue_comment>username_1: The only right way for processing xml/html data is to use xml/html parsers. **`xmlstarlet`** so...
2018/03/08
847
2,622
<issue_start>username_0: I'm trying to achieve a toggle effect on a website. The html looks like this: ``` Test ---- test Test 2 ------ test 2 ``` And the JS: ``` $(".prod-toggle-click").click(function(){ $(this).parent().find('.prod-toggle').toggle(); }); ``` This toggles the `.prod-toggle` of both di...
2018/03/08
1,385
5,429
<issue_start>username_0: If I have a TqlFragment or TsqlScript with a set of statements, how do I comment out a specific statement using DacFX? There is no CommentStatement or anything like that. How do I replace that statement in the syntax tree with a commented version of it? I know this could be accomplished with p...
2018/03/08
768
3,048
<issue_start>username_0: So I'm thoroughly confused as how to make a custom SummerNote button which will allow me to either add classes to an already inserted HTML element (i.e. links) or even wrap selected text in something like: ``` \*\*selected text\*\* ``` From the [Summernote Deep Dive](https://summernote.org...
2018/03/08
1,330
5,013
<issue_start>username_0: I'm learning Common Lisp (Clozure CL) on the Mac and installed quicklisp, with the help of a generous contributor on here. The 'ltk' library works when running (ltk::ltk-eyes) or (ltk:ltktest). Running (ql:quickload "ltk") seems to work as it return the following: > > Load 1 ASDF system: ...
2018/03/08
387
1,252
<issue_start>username_0: I am building Boost from sources. I need the library *libboost\_unit\_test library* for doing unit tests. But this library in not generated... I compile Boost like this : ``` .\bootstrap.bat .\b2 address-model=64 runtime-link=shared link=shared variant=release stage --stagedir=./stag...
2018/03/08
576
1,985
<issue_start>username_0: Created custom `Form` component which supposed to change its `data` when child inputs change. Long story short: [![enter image description here](https://i.stack.imgur.com/iAhu9.png)](https://i.stack.imgur.com/iAhu9.png) In the current context `currentTarget` is the form, `target` is the inpu...
2018/03/08
1,009
3,592
<issue_start>username_0: I have this working TS code, it's a deep inheritance tree, what I want is to combine configurations (simplified sample): ``` abstract class Basechart { config = {}; constructor() { this.addConf({ baseOpt: 'baseOpt' }); } addConf(newConf = {}) { this.config = {...
2018/03/08
915
2,366
<issue_start>username_0: I have following dataframe in R ``` Date ID 01-01-2017 12:39:00 CDF 01-01-2017 01:39:00 WED 01-01-2017 02:39:00 QWE 01-01-2017 05:39:00 TYU 01-01-2017 17:39:00 ERT 02-01-2017 02:30:34 DEF ``` I want to calculate hourly count o...
2018/03/08
611
2,282
<issue_start>username_0: I'm using Angular 5 to develop my application. In assets/js folder, I have a js file `test.js`. I have a variable `data` and a function `Loaddata()` in this js file. I want to be able to access these in my app.component.ts. I was able to make the variable scope public and was able to acces...
2018/03/08
340
1,269
<issue_start>username_0: In Emacs, I can create functions in Lisp language and place them in `.emacs` file. Those function will become commands that can be called from the editor or bound to keys just like any other built-in command. Is there a way to do that in VSCode? Note: The custom commands need to be able to ca...
2018/03/08
349
1,203
<issue_start>username_0: I have a file name `test.CSV` and I want to replace with `.xlsx`. I want the use the `re` module to use the case insensitive feature. I just can't seem to figure this out: ``` test = re.compile('test.CSV', re.IGNORECASE) test.sub('.xlsx', '.csv') '.csv' ``` What am I missing? Seems like such...
2018/03/08
971
2,940
<issue_start>username_0: I have the following snippet of code: ``` techs = ["name1", "name2", "name3", "name4", "name5", "name6", "name7", "name8", "name9"]; for tech in techs: current_tech = get_ticket_count(FHD_start,BHN_end,tech) tech_total = str(current_tech[0]) tech_average = current_tech[1] pri...
2018/03/08
484
1,660
<issue_start>username_0: I have some JS that currently gets the URL of a website, splits the URL to a particular string and stores it in a variable I then have an IF statement that depending on that string will add a class to my links. However, the i can't get the IF statement to work. It seems to do the action even i...
2018/03/08
1,254
4,660
<issue_start>username_0: I implemented an iterator class as following: ``` import numpy as np import time class Data: def __init__(self, filepath): # Computationaly expensive print("Computationally expensive") time.sleep(10) print("Done!") def __iter__(self): return s...
2018/03/08
781
2,511
<issue_start>username_0: I have an SVG image (lets say a simple icon) which has following content: ``` ``` The viewbox is not square (448!=512) I need to make the shorter edge equal to the longer one, in a way that its content does not loose their original ratio (=> don't stretch), and they need to get at the exact ...
2018/03/08
1,589
5,917
<issue_start>username_0: I wonder how to implement the method ReadXml of the IXmlSerializable interface when my XML contains recursive tags like in the following example: ``` xml version='1.0' encoding='utf-8'? ``` The element works like a container for all kind of elements, itself included. I need to translate...
2018/03/08
621
2,329
<issue_start>username_0: I'm using the ColdFusion [CFPayment Library](https://github.com/ghidinelli/cfpayment) for processing Stripe payments. The payments are working fine, but now I want to pass metadata values to along with the transaction. I went into the [stripe.cfc](https://github.com/ghidinelli/cfpayment/blob/m...
2018/03/08
910
3,136
<issue_start>username_0: I would like to join two tables to show one result set. Any help would be appreciated tbl\_Orders: ``` ┌─────────┬────────────────┬────────────────┐ │ OrderID │ PublicationID1 │ PublicationID2 │ ├─────────┼────────────────┼────────────────┤ │ 1 │ 1 │ 2 │ │ ...
2018/03/08
449
1,835
<issue_start>username_0: I am trying to install an MSI and it is failing the detection method. Is there a way I can install this MSI thru SCCM without a detection method? The script is very simple to install the MSI is basic: msiexec /i "\jbocleit\SoftwareInstalls\Worksmart\FrontEnd.msi" /q I tried to just create a ...
2018/03/08
765
2,047
<issue_start>username_0: Here is my dictionary of n items. ``` { "proceed": [[6,46] , [7,67], [12,217], [67,562], [67,89]], "concluded": [[6,46] , [783,123], [121,521], [67,12351], [67,12351]], ... } ``` imagine a dictionary s.t. like that with n keys and items which are two dimensional arrays. I want to interc...
2018/03/08
446
1,607
<issue_start>username_0: Suppose I have a PyTorch Variable in GPU: ``` var = Variable(torch.rand((100,100,100))).cuda() ``` What's the best way to **copy** (not bridge) this variable to a NumPy array? ``` var.clone().data.cpu().numpy() ``` or ``` var.data.cpu().numpy().copy() ``` By running a quick benchmark,...
2018/03/08
529
1,942
<issue_start>username_0: Im working on the project with some video tutorial. <https://www.youtube.com/watch?time_continue=851&v=lpcOSXWPXTk> Author in TopicService class is using inside the method findOne() comend and delete without creating a method for them. When Im doing same thing step-by-step I was unable to do it...
2018/03/08
1,312
3,385
<issue_start>username_0: I'm sort of newbie in numpy so I'm sorry if this question was already asked. I'm looking for a vectorization solution which enable to run multiple cumsum of different size within a one dimension numpy array. ``` my_vector=np.array([1,2,3,4,5]) size_of_groups=np.array([3,2]) ``` I would like ...
2018/03/08
312
1,130
<issue_start>username_0: I have download the git repo containing the [c++ tutorial](https://docs.bazel.build/versions/master/tutorial/cpp.html) for bazel and I am trying to compile the examples. When performing the command `bazel build //main:hello-world`, I get the following error: ``` ccache: error: Failed to create...
2018/03/08
343
1,106
<issue_start>username_0: I have select option : ``` Menu Item 1 Item 2 ``` I have Jquery to change selected value : ``` var xval = '33'; $('select').val(xval); ``` How to make selected to Menu(empty value) if i have different value from select option?<issue_comment>username_1: Check whether the value exists f...
2018/03/08
241
920
<issue_start>username_0: On typing `Docker images` and `Docker ps -a` in terminal, I have a long list of previously built, no-longer-in-use Docker images. What is the disadvantage of keeping them there? What kind of harm can they cause? Is it a better idea to remove the unused images/containers?<issue_comment>userna...
2018/03/08
599
2,363
<issue_start>username_0: I am using ASP.NET Core with VS 2017. I am wondering if the applications when being built create both `IIS Express and Kestrel`? Or just one of them? I am talking just **locally**.<issue_comment>username_1: Your question is not clear at all. Kestrel is *always* used. IIS Express acts as a rever...
2018/03/08
422
1,499
<issue_start>username_0: I am trying to use this function in componentWillMount() of my React.js component. But the browser is saying window.decodeURIComponent(...) is not a function, which I don't understand. Can anyone tell me how to get it work? Thanks ``` export const getUrlQuery = window => { let queryDict = {}...
2018/03/08
322
1,083
<issue_start>username_0: if this is rotating a list to the left: ``` (define (rotate-left l) (if (null? l) '() (append (cdr l) (cons(car l) '())))) ``` How would I rotate a list to the right?<issue_comment>username_1: After I removed this part of the code, things work. ``` (queryDict[key] = queryDict[...
2018/03/08
782
3,131
<issue_start>username_0: I am having trouble trying to import a dictionary object that I have declared and filled with key,value pairs in another Python file. A bit of background -- I am working with accessing the Reddit API and then filling a dictionary with subreddit names and a score I have given them, based off o...
2018/03/08
703
2,512
<issue_start>username_0: If I use `int *p;` then which of the following is more correct to say: * p is of type pointer-to-int, or * p points to an int and is of type pointer What I mean to determine is what is the best way to describe how to look at such code and understand the difference between, say `int *p;` and `...
2018/03/08
592
2,136
<issue_start>username_0: I have this model: ``` from wagtail.wagtailcore import blocks class BlogPage(Page): date = models.DateField("Post date") intro = RichTextField(blank=True) body = StreamField([ ('heading', blocks.CharBlock(classname="full title")), ('paragraph', blocks.RichTextBlock...
2018/03/08
569
2,024
<issue_start>username_0: Using .htaccess, I am catching unfound pages and sending them to 404.php My site used to be ASP.net and is now php. Most of the links are corrected in .htaccess for .aspx pages to .php, but I have some coming in which are case insensitive. For example MyPAGE.aspx need to be MyPage.php. My 404 ...
2018/03/08
640
2,329
<issue_start>username_0: I want to have `game.js` which will only start execution when all the necessary images have been preloaded. The best way I can think of is something like: ```js var numberOfImagesToPreload = 2; var imgsLoadedSoFar = 0; var sources = ['player.png', 'terrain.png']; for(let i = 0; i < sources.l...
2018/03/08
960
3,597
<issue_start>username_0: This Java code works with a DB2 database, and a PostgreSQL database. ``` rs = stmt.executeQuery(qry); rsMetaData = rs.getMetaData(); numCols = rsMetaData.getColumnCount(); say("resultSet MetaData column Count=" + numCols);...
2018/03/08
811
2,926
<issue_start>username_0: I have a table like ``` id name sal 1 Saa 45000 2 aaa 33000 ``` after incremental load ``` id name sal 3 bbb 55000 ``` How to get only recently updated value without time stamp<issue_comment>username_1: Use [`ResultSet.getPrecision()`](https://docs.oracle.com/javase/8/docs/api/jav...
2018/03/08
689
2,183
<issue_start>username_0: I am having trouble removing the white lines between tiles in my heat map. Below is my code and picture. Has anyone encountered this before? ``` t <- ggplot(Drug_heatmap_df_final, aes(x=reorder(Drug,Total_Deaths), y=Start_Date, fill=Total_Deaths)) + geom_tile() + labs(title="Heatma...
2018/03/08
862
2,321
<issue_start>username_0: I've got a dataframe and want to loop through all strings within column c2 and print that string and the year it appears in column c2 and then also print the *first year* when it appears in column c1, if it exists in c1. And then tally the difference between the years in another column. **There...
2018/03/08
626
1,609
<issue_start>username_0: I would like to set the selection of a spinner using a string instad of an index. So if I have spinner of red, green and blue, I could set the current selection to blue by using the string "blue" instad of the index 2. How this can be achieved?<issue_comment>username_1: You can do it in steps ...
2018/03/08
996
2,864
<issue_start>username_0: So what I am trying to do is collect all the Right values from a series of Either results and have all of them available at the end of the chain to do work on them. I also want the chain to fail fast if one of the Either values is a Left. So after reading around I believe the key to getting th...
2018/03/08
502
1,628
<issue_start>username_0: My variable keeps evaluating as true and goes inside the IF block. How is this possible? Even after I assign it as false. ``` this.model.hasQ1 = false console.log('type ', typeof this.model.hasQ1) //don't know why typeof is a string //const test = this.model.hasQ1 === 'true' //this will error ...
2018/03/08
1,226
4,643
<issue_start>username_0: I implemented [this](https://stackoverflow.com/a/46531464/3963430) great example of a Cache Interceptor in Angular 5.2. So far it works very well. However, I would like to modify this cache so that only queries of the last 3 seconds are loaded from the cache, older ones should be re-requested. ...
2018/03/08
596
2,160
<issue_start>username_0: Is there any lib/parser which can generate API blueprint documentation (apiary) from Django + Django Rest Framework code? Eg: ``` class UserView(...): """ ## Users list [GET /users] + Request (application/json) ... + Response (application/json) ... """ clas...
2018/03/08
612
2,256
<issue_start>username_0: I stored email & password like this: ``` public function addNewUser(Request $request)/****Add new User****/ { $user_email = $request->input('email'); $user_hashed_pass = $request->input('password'); $user_pass = Hash::make($user_hashed_pass); $addAdmin = new SaveN...