date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/02
1,915
5,370
<issue_start>username_0: is it possible a protected worksheet allow sorting? Allow User to edit range is tried, but the cell inside the range is also editable which is not expected. Thanks<issue_comment>username_1: Try this example with `reduce` and `forEach` functions: ```js let a = [ [0.6, 4.0, -0.5], [...
2018/03/02
1,030
3,180
<issue_start>username_0: I got an error,TypeError: src is not a numpy array, neither a scalar. ``` Traceback says Traceback (most recent call last): File "img.py", line 19, in gray = cv2.cvtColor(images,cv2.COLOR\_BGR2GRAY) TypeError: src is not a numpy array, neither a scalar ``` . I wrote in img.py ``` impo...
2018/03/02
502
1,784
<issue_start>username_0: So I use php for my website and use include/require to add my header and footer to each page but im trying to build an app using phonegap which only allows html css and javascript how do i build a template header and footer without using php so i have 5 pages that need the same header and foo...
2018/03/02
695
2,440
<issue_start>username_0: I'm trying to increase the count of an integer given that an if statement returns true. However, when this program is ran it always prints 0.I want n to increase to 1 the first time the program is ran. To 2 the second time and so on. I know functions, classes and modules you can use the global...
2018/03/02
1,034
3,870
<issue_start>username_0: I get the following exception thrown: > > Invoke or BeginInvoke cannot be called on a control until the window > handle has been created. > > > I am using betterlistviewer and dotnetbar just modifying this code [Registry cleaner](https://github.com/saefbadwan/IMSS-Registry-Cleaner) but i...
2018/03/02
1,009
3,973
<issue_start>username_0: I have a custom validation attribute in my ASP.NET Web API application that checks if the date is in the future or not (dates in the future are not allowed). Here's the code: ``` protected override ValidationResult IsValid(object value, ValidationContext validationContext) { if (value != n...
2018/03/02
1,342
6,412
<issue_start>username_0: With Spring-boot 1.5.10.RELEASE, I am getting response.body as null. Here is how I am using RestTemplate ``` RestTemplate restTemplate = new RestTemplate(); List interceptors = new ArrayList<>(); interceptors.add(new LoggingRequestInterceptor()); restTemplate.setInterceptors(intercepto...
2018/03/02
1,192
3,521
<issue_start>username_0: I have dataframe where I am attempting to extract content of a column and then append it to the dataframe as a new column. For example my dataframe looks like: ``` > head(df) id event_params 1 {"type":"L","maximumangle":-87.618,"duration":25} 2 {"type":"L","maximumangle":1.62,"duration...
2018/03/02
1,106
3,343
<issue_start>username_0: I don't use js/jquery that often and have got this terribly written piece of code to get my desired output. This is required to display checkboxes properly from bulma as they don't display unless checkbox id is the same as label for and has to be unique id due to cloning. The label field also...
2018/03/02
319
843
<issue_start>username_0: I'm having 11684 matrices each of size 28x28. So the variable a has size 28x28x11684. Now i would like to do sorting them using a for loop on each matrix of 28x28 and store it in a variable z. Here is my code ``` for i=1:11684 z=sort(a(:,:,i)); end ``` When i run the code, it is giving m...
2018/03/02
1,483
4,466
<issue_start>username_0: I'm working on a problem where I need to return the fifth power of a digit 0-9 and I had thought I could speed up the program by switching ``` int pow(int a){return a*a*a*a*a;} ``` out for ``` int pow(int a){ switch(a){ case 0: return 0; break; case 1: return 1; break; case 2: return 32;...
2018/03/02
909
3,296
<issue_start>username_0: I want to add custom routes to a [bottender](https://github.com/Yoctol/bottender) that uses [express](https://github.com/expressjs/express) as a server. But when I do, the route used by bottender(supposed to be `/messenger`) returns 404. here's how it looks like **index.js** ``` require('dote...
2018/03/02
883
3,500
<issue_start>username_0: I have 3 components, that is 2 child components and one parent component. I wanted to pass the child component value to parent (only the values not the components enitirely,it should not visible in parent) and this values from parent to another child component. Any suggestions or logic of how ...
2018/03/02
1,032
2,733
<issue_start>username_0: Was watching this video By <NAME> : <https://www.youtube.com/watch?v=oKndim5-G94&index=4&list=PLKQ5LYb497AZIZe9dBWy8GwLluVaMQVj0> wherein he talks about solving recursion by using an iterative function and a dispatcher function. I tried to find the nth fibonnaci number by using the same approac...
2018/03/02
686
2,085
<issue_start>username_0: Tried with only multiple to and multiple cc individually, which works fine but when i try both i get an error: File > > "path\Continuum\anaconda2\envs\mypython\lib\smtplib.py", > line 870, in sendmail senderrs[each] = (code, resp) TypeError: > unhashable type: 'list'" > > > Code: ```...
2018/03/02
909
1,992
<issue_start>username_0: I am trying to load a file from the following path: ``` path = 'C:/Users/Aman/Alzheimer/test-network/ADNI1_Complete_1Yr_1.5T/ADNI/002_S_0685/MPR__GradWarp__B1_Correction__N3__Scaled/2006-07-06_10_36_49.0/ADNI_002_S_0685_MR_MPR__GradWarp__B1_Correction__N3__Scaled_Br_20070216235850690_S16309_I4...
2018/03/02
681
2,201
<issue_start>username_0: I have the following script hosted on Github: <https://rawgit.com/oresoftware/quicklock/master/install.sh> the contents of that file are: ``` #!/usr/bin/env bash set -e; cd "$HOME" mkdir -p "$HOME/.quicklock/locks" curl https://rawgit.com/oresoftware/quicklock/master/install.sh > "$HOME/.qui...
2018/03/02
358
1,259
<issue_start>username_0: **I want to insert foreign key when I will migration than add a foreign key value in 1** ``` `public function up() { Schema::table('users', function (Blueprint $table) { $table->integer('role_id')->unsigned()->after('email')->nullable(); $table->foreign('role_id')->re...
2018/03/02
645
2,074
<issue_start>username_0: I have two functions inside controller: ``` $scope.historyMemberInit = function(fkhouseid) { $scope.fkhouseid = fkhouseid; $http({ method: 'post', url: 'House/member_list.php', data: {fkhouseid:$scope.fkhouseid} }).then(function successCallback(response) { $scope.memberLi...
2018/03/02
786
2,057
<issue_start>username_0: I've declared a pointer to hold a dynamic 2D array, and allocated memory to it using 'new' in class constructor but it is always equal to nullptr when checked using if statement. The code goes like this: ``` class A { private: int* a; int d1, d2; public: A() { a = new int [...
2018/03/02
1,112
3,321
<issue_start>username_0: For my program, I have to start with an empty linked list, and be able to perform various operations on it (i.e. add to beginning, add to end etc.) My list structure is as follows ``` struct node { int num; struct node *next; }; ``` This is the beginning of the function where I have alloca...
2018/03/02
1,682
4,585
<issue_start>username_0: I have been trying to create Pdf file using ITextSharp. I am able to pass html content via ajax but pdf contains some images which are saved as base64 encoded data in database. How would i be able to get those data and convert them as an image and insert in my table rows. I would like to ach...
2018/03/02
494
1,240
<issue_start>username_0: I have to display below date like 27-Apr-2015 in mysql Monday 27 April 2015 12:12:36 How to do it. Thanks in advance. Regards, Abu<issue_comment>username_1: Try this variant ``` SELECT DATE_FORMAT(NOW(), "%d-%M-%Y"); ``` This will output ``` 02-March-2018 ``` Or if you want shorter m...
2018/03/02
1,312
4,411
<issue_start>username_0: I have a dataframe with 5 columns: filename, #line\_changed-hist, #line\_changed-myers, #line\_changed-min, and #line\_changed-pat with thousands of data. What I want to do is dropping rows if the last four columns (all line\_changed) have same values. Suppose my dataframe called "datamerge3: ...
2018/03/02
3,682
8,122
<issue_start>username_0: I have two dates (`date1` and `date2`) and an `id` variable in a data.frame: ``` dat <- data.frame(c('2014-02-11', '2014-05-04', '2014-05-22'), c('2014-04-12', '2014-09-22', '2014-07-04'), c('a', 'a', 'b')) names(dat) <- c('date1', 'date2', 'id') dat$date1 <- as.character.Date(dat$date1, forma...
2018/03/02
377
1,255
<issue_start>username_0: Currently, I have an `onchange` on a `datepicker` and it calls the following function ``` $('#dtpFrDate').change(function() { var date2 = $('#dtpFrDate').datepicker('getDate'); date2.setDate(date2.getDate() -1); document.getElementById('dtpToDate').innerHTML = date2.toLocaleDa...
2018/03/02
429
1,693
<issue_start>username_0: This seems an old question but i didn't find any correct solution to my problem.I will explain the problem i am facing. In my code part i have checked the table before inserting, whether the table has already has the value for the particular column. ``` select vid from mytable where vid=$vid;...
2018/03/02
918
3,398
<issue_start>username_0: I have a dropdown where I am able to select element by index for first time. when i try to select element for second time it is throwing stale element reference error. I tried with try catch block, explicit wait but nothing worked. ``` WebElement drop = driver.findElement(By.cssSelector("#ctl0...
2018/03/02
1,037
3,615
<issue_start>username_0: I am getting the following error an UPDATE to an existing post on the Blog app (Rails): I changed `author_posts_path` to `author_post_path` when I was getting an error > > No route matches [PATCH] "/posts/my-second-post" > > > Now, I'm getting a new error as follows: > > ActionControll...
2018/03/02
994
3,628
<issue_start>username_0: I have here a bit of code that is utilizing a javascript onclick event which calls the '*inArray*' function and passes a User-input value. I am trying to iterate through the array and match the '*value*' entered to one of the values in the array. I'm not trying to return a 'true/false' but if c...
2018/03/02
1,807
6,246
<issue_start>username_0: I have installed pyspark with python 3.6 and I am using jupyter notebook to initialize a spark session. ``` from pyspark.sql import SparkSession spark = SparkSession.builder.appName("test").enableHieSupport.getOrCreate() ``` which runs without any errors But I write, ``` df = spark.range(1...
2018/03/02
967
3,165
<issue_start>username_0: I am following [this](https://dtflaneur.wordpress.com/2015/10/02/installing-hadoop-on-mac-osx-el-capitan/) tutorial to install hadoop in my computer. As far as I know, I have followed the instructions perfectly until `source ~/.profile`, but when I try to format HDFS by entering `hdfs namenode ...
2018/03/02
662
2,067
<issue_start>username_0: Below is my postgres query to do inner join on the same table itself.. But the below query shows error before the inner join. ``` select org.id, org.name, org.lft, org.rgt, tmp.id, tmp.name, tmp.lft, tmp.rgt from organization_organization as org WHERE (org.id IN (62)) INNER JOIN organization_...
2018/03/02
678
2,111
<issue_start>username_0: I have an li element with 2 data attributes, basically I want to sort out first the data-arrange attribute, this is the element ``` * John * Paul * Bryan * Mark * Victor * Tess ``` so from the given element it should return like this data-arrange attribute value arrangement ``` 1 ...
2018/03/02
780
2,419
<issue_start>username_0: I'm currently working on a Prolog program that will generate a CYK parse table after being given a set of productions. However, I am having troubles checking two rows to see if they are equivalent. Here's what I have so far: ``` answer(X,X). %Checks to see if it is equivalent equal(X,Y) :- s...
2018/03/02
515
1,674
<issue_start>username_0: The below code only shows the present uploaded image.How can i fetch all the images using the path stored in the database ``` php if(isset($_POST['submit'])) { if($link) { $filetemp=$_FILES['file']['tmp_name']; $filename=$_FILES['file']['name']; $filepath="uploaded/"; $location=$path.$fi...
2018/03/02
1,570
4,587
<issue_start>username_0: I had a php object..that I converted to json text using **json\_encode()** function. Then I passed it on **$.parseJSON()** function on javascript. Note:The description field in json object contains text encoded in html entities.. On execution **$.parseJSON()** function says... > > SyntaxEr...
2018/03/02
543
1,758
<issue_start>username_0: I need to have a popup window in PowerShell that has the information mark icon with yes & no buttons. My current code is as follows: ``` $wshell = New-Object -ComObject Wscript.Shell $answer = $wshell.Popup("Do you want to continue?",0,"Alert",0x4) if($answer -eq 7){exit} ``` With only t...
2018/03/02
509
1,689
<issue_start>username_0: I have built an angular5 client app and a nodejs (using express) server app working on ports 4200 and 3000 respectively. Now I want to merge them both in a single app as a deliverable. Will just copying the angular folder into nodejs work? Not sure how to go about it.<issue_comment>username_1...
2018/03/02
563
1,874
<issue_start>username_0: ``` I'm trying to call onRowSelect(event) while clicking the action button of p-table without rewrite the same code. ``` Html code is ``` | | ``` p-table onRowselect function ``` onRowSelect(event) { //code } ``` button click function ``` clickEvent(value:any) ...
2018/03/02
675
2,312
<issue_start>username_0: I am trying to understand this programming problem whereby I am supposed to guess the data structures. I am having a slight issue with my program. PROBLEM: I have no clue as to why my program always gets killed with signal 11 (segmentation fault) but it works and compiles fine. About the pro...
2018/03/02
679
2,633
<issue_start>username_0: I'm currently writing some software where I have to load a lot of columnnames from an external file. Usually I would do this with some JSON but for reasons of userfriendlyness I can't do it right now. I need to use a textfile which is readable to the users and includes a lot of comments. So I ...
2018/03/02
641
2,299
<issue_start>username_0: I have an ionic app that is design specific to Mobile phones only but can run on Tablets too. I want to restrict it to max-width & max-height so that when app is opened on Tabs or larger screens, the view should remain like a mobile phone view. [![enter image description here](https://i.stack....
2018/03/02
172
604
<issue_start>username_0: I don't know what's causing this. I love having auto-format on save. But there is a rule that keeps making objects jump into multiple lines. When I type something like this: `const { promisify } = require("util");` VSCode formats it to: ``` const { promisify } = require("util"); ``` It...
2018/03/02
411
1,201
<issue_start>username_0: I'm trying to get 4 circle images to display on the same line, with the final circle containing a single digit number. I have the following code which gets close, but the final circle gets bumped down a bit by having text. I do not understand why the circle gets bumped down. Thanks for any hel...
2018/03/02
692
2,533
<issue_start>username_0: I' using Cognito user pool for securing my API gateway . Now I would like to make requests to my API using postman but I need to pass in Authorization token as the API is secured. Is there any AWS CLI command or REST API to generate auth tokens(by passing username/password)? I have searched doc...
2018/03/02
193
643
<issue_start>username_0: My docker container conflicts with my centos mysql. How do you fix that? Error is below: Error starting userland proxy: listen tcp 0.0.0.0:3306: bind: address already in use ERROR: Encountered errors while bringing up the project.<issue_comment>username_1: May be you can see this issue: [Error...
2018/03/02
862
3,555
<issue_start>username_0: I am using geofence in my app and based on geofence events (Enter or Exit) I want to perform some action. Geofence [documentation](https://developer.android.com/training/location/geofencing.html) says that once you set geofence it will trigger events automatically and you can catch this events ...
2018/03/02
525
1,725
<issue_start>username_0: I have been trying to click on a button for the following html by using python (selenium webdriver) ``` View Custody List ``` I am trying to click on the second button in the above html. I am using **find\_element\_by\_tag** because i think for html tag it should work .I am using followi...
2018/03/02
1,100
3,992
<issue_start>username_0: Working slightly with `javascript`, I realized it is ways faster to develop compared with `C++` which slows down writing for reasons which often do not apply. It is not comfortable to always pass `.begin()` and `.end()` which happens through all my application. I am thinking about extending `s...
2018/03/02
867
2,649
<issue_start>username_0: I am trying to install Tensorflow version 1.2.0 or above so I can have access to 'feature\_column'. I've tried many things to try and update it but haven't been successful with any. I'm using: > > Mac OS X El Capitan V10.11.5 > > > Anaconda version 1.7.0 > > > python version 3.6.4 > > ...
2018/03/02
677
1,744
<issue_start>username_0: If I have something like this: ``` a = tf.random_uniform((1,), dtype=tf.float32) b = 1 + a c = 2 + a ``` Will `a` be the same or different when calculating `b` and `c`?<issue_comment>username_1: Every time a `sess.run()` is executed, different results are generated, as can be seen in the off...
2018/03/02
1,540
6,000
<issue_start>username_0: We use the Flyway Gradle plugin to do our migrations offline (i.e. we migrate while the system is down). We recently upgraded to Flyway 5.0.7 and we see this warning now for migrations: *Could not find schema history table `XXXXXXX`.`flyway_schema_history`, but found `XXXXXXX`.`schema_version`...
2018/03/02
3,707
13,710
<issue_start>username_0: I am changed all gradle version to 27.0.2 still its showing issues and that app.compact gradle also showing in redline.I cant able to run the application [![enter image description here](https://i.stack.imgur.com/LAmnf.png)](https://i.stack.imgur.com/LAmnf.png) gradle.file ``` apply plugin: ...
2018/03/02
840
2,898
<issue_start>username_0: I found a coding from tutorials point to run a a simple socket.io chat server in localhost, I installed necessary environments like nodejs, express, init package.json and I started the server from terminal using command-"node app.js", then I accessed the index page in my localhost it showed the...
2018/03/02
261
1,011
<issue_start>username_0: ![enter image description here](https://i.stack.imgur.com/JlCOm.png) I found some answers on same query need update webdriver server with cmd webdriver-manager update , Even-though i am getting same error when i start webdriver server with cmd webdriver-manager start.<issue_comment>username_...
2018/03/02
524
1,757
<issue_start>username_0: If I want to use an object and its methods in another file, how would I set up my module.exports? Object: ``` var Object = function () { ... } Object.prototype.foo = function (param) { ... } ``` Module.export: ``` module.exports = { Object : Object } ``` or ``` module.exports = { ...
2018/03/02
594
2,105
<issue_start>username_0: Sharing solution I'm using now: make a ajax request to controller and append view file using renderAjax. Agree with you to use Yii way to initialize the datepicker@<NAME> I'm trying to fix this issue but still no luck. If anybody will suggest then it will be great help. I'm appending text fie...
2018/03/02
668
2,153
<issue_start>username_0: I am developing a Windows Form Application. One of my text box suppose to receive a numerical value for further processing. The input can be a round number or a number with a decimal point. If the user enters an invalid character other than a `number, backspace key or a dot(".")`, A label with ...
2018/03/02
485
1,807
<issue_start>username_0: So, I created the variable *counter* with initial value -1. [![enter image description here](https://i.stack.imgur.com/t9jZI.png)](https://i.stack.imgur.com/t9jZI.png) Then in a *Release*, I tried to change its value to 1 using Powershell script: [![enter image description here](https://i.s...
2018/03/02
946
2,732
<issue_start>username_0: I am trying to implement a convolution algorithm in C using pointers. I know my deconvolution.c code is correct. However, I struggle to call the function in Main to get desired results. Any help is much appreciated. ``` // deconvolution.c #include "deconvolution.h" #include "math.h" voi...
2018/03/02
1,071
4,100
<issue_start>username_0: I'm using the DocuSign REST API to automate document signing. I use the [sender view](https://docs.docusign.com/esign/restapi/Envelopes/EnvelopeViews/createSender/) to allow my clients to place signing tabs on their documents and ultimately send them. However, I'm running into a problem where ...
2018/03/02
1,041
2,758
<issue_start>username_0: I have a file name with directory path returned from `list.files(..., full.names = T)`. I want to split the file name up by `/` to find the directory structure. I am having trouble only identifying single occurrences of `/`, e.g. ``` strsplit("C://dir1/dir2/txt.R", "/") # [[1]] # [1] "C:" "...
2018/03/02
821
3,049
<issue_start>username_0: I learnt implementing inorder traversal of a binary search tree: ``` def inorder(root): # root has val, left and right fields if root==None: return inorder(root.left) print(root.val) inorder(root.right) ``` Now, the problem is I do not want console output. I want to ...
2018/03/02
1,063
3,426
<issue_start>username_0: I would like to copy binary file source to file target. Nothing more! The code is inspired from many examples found on the Internet. ``` #include int main(int argc, char \*\*argv) { FILE \*fp1, \*fp2; char ch; fp1 = fopen("source.pdf", "r"); fp2 = fopen("target.pdf", "w"); while((ch ...
2018/03/02
1,961
4,827
<issue_start>username_0: I'm trying to implement some kind of a generic redux reducer in my application that should handle error [flux standard actions](https://github.com/redux-utilities/flux-standard-action) with flow types. Suppose I have the Flowtype definition for FSA: ``` type Action = { type: string, payload...
2018/03/02
5,770
22,280
<issue_start>username_0: I'm using this method to ping google server so I can check for active `internet` connection but I discovered that it doesn't work on all devices. I've tried using other methods like `HttpURLConnection` and `URLConnection` but they all return false even when i'm connected. Any ideas or solutio...
2018/03/02
1,210
4,030
<issue_start>username_0: We are designing an Big data solution for one of our dashboard applications and seriously considering Glue for our initial ETL. Currently Glue supports JDBC and S3 as the target but our downstream services and components will work better with dynamodb. We are wondering what is the best approach...
2018/03/02
1,020
3,254
<issue_start>username_0: I am looking for a solution actually I am using date field in appointment form but for "time field" I am using two dropdown as per the clients requirement "24hr clock", one dropdown is for "Hours ex: 10,11,12,13..so on till 19," and another for "minutes : ex: 15,30,45,60". So beacuse of dropdow...
2018/03/02
594
1,659
<issue_start>username_0: Im trying to put link on that images on this slider: <https://www.codeply.com/go/3EQkUOhhZz> I tried but the images goes smaller and got some bugs. So i need to add a href on that images on slider HTML ``` ![](http://placehold.it/350x180?text=1) ![](http://placehold.it/350x180?text=2) ...
2018/03/02
586
2,440
<issue_start>username_0: I have some UIButtons that I disable by setting button.isEnabled = false. I found that I need to still be able to access the buttons presses when they are disabled. So, I need to leave the buttons enabled but make them look disabled. This should be possible by changing the color of the image/te...
2018/03/02
378
1,480
<issue_start>username_0: I have included this already in my index.html. ``` ``` Still no images are displayed.I have for example tech.png in my src folder which contains Sample.js and index.js files. Here is my Sample.js file: ``` import React from 'react'; import { Image} from 'semantic-ui-react'; import {Link} ...
2018/03/02
4,090
13,698
<issue_start>username_0: In Woocommerce on each product page there is a Text Box, which allows users to enter their own custom text. This text is then applied to the product, with the customer being charged on a per letter basis. I have managed to get everything working, apart from the Maths Logic. When a visitor ente...
2018/03/02
2,072
6,946
<issue_start>username_0: Suppose I have a function like that: ```js var f1=function(){ return this; }; console.log(f1.bind('abc')()==='abc'); ``` as I know, f1.bind('abc') should create a new function that returns 'abc', so I guess it should have output same as ``` console.log('abc'==='abc') ``` which is tr...
2018/03/02
627
2,187
<issue_start>username_0: I have a file which has few consecutive words are repeated without space like below input.And my expected output should be like below. ``` String input = "These are appleapple and guavaguava"; and expected output is: These are apple and guava. ``` --- Thanks in advance.<issue_comment>usern...
2018/03/02
965
3,583
<issue_start>username_0: I am trying to disable swipe to delete action for some particular cells in tableview. but i could not be find a good solution in swift. I don't want that left side minus sign on cell when overriding "tableView.isEditing = true" method.Here is my code. below code is not disabling swipe to the ce...
2018/03/02
1,701
6,748
<issue_start>username_0: I am using autobahn package with twisted which shows debug message for me every connect to websocket. I tried to switch logging level to info but had no success: ``` import logging logging.basicConfig(level=logging.INFO) ``` Is there an easy way to switch log level? **Updated.** Here is t...
2018/03/02
478
1,973
<issue_start>username_0: i tried to run selenium tests created on windows machine. I change driver to linux version. Added it to PATH. But every time i got ``` org.selenium.NoSUchSessionException ``` i use latest browser with latest driver I define driver it like that : ``` public class AuthTestSteps { private st...
2018/03/02
544
1,872
<issue_start>username_0: I would like to remove an actionButton once it has been clicked. I had previously used `shinyjs::hide("init")` successfully, but now I would like to remove the button altogether. I have tried the following code The issue stems from modularization. It updates a vector `GlobClass$Init` based on ...
2018/03/02
1,123
3,641
<issue_start>username_0: I need to change Ball Direction after collision with another ball or with a edge of the window. I managed to do something like that: ``` y += yMove; x += xMove; //if the ball moves to the right edge of the window, turn around. if(x > width - size) { x = width - size; xMove *= -1; ...
2018/03/02
558
2,260
<issue_start>username_0: When trying to import pyplot from matplotlib, I get this error (python 3.6). It works fine on my other computer, which has python 3.5, but I don't think it changed much. I've tried both: ``` from matplotlib import pyplot as plt ``` and ``` import matplotlib.pyplot as plt ``` It's real...
2018/03/02
1,302
4,270
<issue_start>username_0: My system located in Singapore (timezone - "Asia/Singapore") receives a String datetime (yyyy-MM-dd HH:mm:ss) from a external system in Indonesia (timezone - "Asia/Jarkata"). How do I convert the received String datetime to UTC in java 1.7? This is my code: ``` public void convertToUtc() { ...
2018/03/02
1,000
3,369
<issue_start>username_0: I want to know the absolute path (may include IP address also) of a file in `hdfs`. What is command for that ? I tried something using `readlink -f` previously (which worked), but i forgot what i did.<issue_comment>username_1: I check your code there was a spelling mistake in time zone so I cor...
2018/03/02
360
951
<issue_start>username_0: I have a column of positive and negative number. How to convert this column to a new column to realize convert positive number to 1 and negative number to -1?<issue_comment>username_1: You need [`numpy.sign`](https://docs.scipy.org/doc/numpy/reference/generated/numpy.sign.html) ``` df['new'] =...
2018/03/02
689
2,162
<issue_start>username_0: I generated a model which got the function `attributeLabels()`: ``` public function attributeLabels() { return [ 'column1' => 'name of column1', 'column2' => 'name of column2', ]; } ``` I also wrote a function in my model, which creates a SQL statement: ``` public f...
2018/03/02
543
2,002
<issue_start>username_0: If the user is entering commands in a terminal, I want to echo an error statement, but I do not want the terminal to close, so I have this: ``` if [[ "$fle" =~ [^a-zA-Z0-9] ]]; then echo "quicklock: lockname has invalid chars - must be alpha-numeric chars only." if [[ -t 1 ]]; then ...
2018/03/02
742
2,931
<issue_start>username_0: I have a tagged union type that contains some record data, like ``` type Comment = New Content | Edited Content | Flagged Content type alias Content = {id: Int, text: String} ``` where the `Comment` type declares the state. When using pattern matching for example to filter by id, I have to...
2018/03/02
1,452
3,109
<issue_start>username_0: I have been trying to `stringify` a `list` and `list of list` and then convert it back to it's original form. Following are my 2 sample `lists`: ``` option_list = ['1309', '1P09', 'Bdg 1', '1226', 'Bdg 1'] option_listoflist = [['1309', 'Blg 1', 500], ['1P09', 'Bdg 1', 4501], ['1226', 'Bdg 1', ...
2018/03/02
859
3,071
<issue_start>username_0: Here is my class definitions of interface Icontestant: ``` interface IContestant { } class TennisPlayer implements IContestant { String name; int ranking; TennisPlayer (String name, Integer ranking){ this.name = name; this.ranking = ranking; } } class NotYetKnown imple...
2018/03/02
905
2,692
<issue_start>username_0: I want to read xml data in the xml file. I have a table column consist with the xml data. [![enter image description here](https://i.stack.imgur.com/I0qul.jpg)](https://i.stack.imgur.com/I0qul.jpg) if i click on the xml file it will open in the Sql server Management studio. xml file format ...
2018/03/02
756
2,817
<issue_start>username_0: it's my first question here so please excuse me for any technical mistakes. We are creating a WP website for a cinema. We have set up a calendar carousel and I'm struggling to get the days and months tranlated from Fri, Sat, Sun etc. to Polish language. Here is the code: ``` php ...
2018/03/02
397
1,283
<issue_start>username_0: This is my code ``` import java.util.*; public class String3 { public static void main(String[] args)throws IndexOutOfBoundsException { Scanner sc=new Scanner(System.in); String s=sc.nextLine(); int l=sc.nextInt(); for(int i=0;i<=s.length();i++) { ...
2018/03/02
2,091
7,532
<issue_start>username_0: Hi I am looking for file upload API or is there any custom code is available or some logic which i can apply to Upload large file. i know we can use chunk files. but i don't aware it how we can chunk in client side and merge it in server side for office 365. Please provide some help. i go throu...
2018/03/02
642
1,743
<issue_start>username_0: I have the following situation: ``` tableA +-------+-------+ | id | Value | +-------+-------+ | 1 | 1000 | | 2 | 20 | | 3 | 62 | | 4 | 0 | +-------+-------+ tableB +-------+--------+ | Value | Lookup | +-------+--------+ | 10 | a | | 20 | b | | ...
2018/03/02
1,007
4,149
<issue_start>username_0: here is code, why my map function not return item in div. I have use array of object in state function. Here is my simple code. I have XML data in **componentwiillrecieveprops**. is there any issue by **componentwillmount**. I do not understand why map function in map my array of state. ```js ...
2018/03/02
604
2,283
<issue_start>username_0: ``` this.state = { count: 0 }; _incrementCount = () => { this.setState(prevState => ({ count: prevState.count + 1 })); } ```<issue_comment>username_1: You are not returning element from `map` callback. Also i see that `tasks` is an array of object, and you are directly rendering objec...
2018/03/02
745
2,696
<issue_start>username_0: I used dropdown and display data using \*ngFor. I want to use searchbar in the dropdown. [![enter image description here](https://i.stack.imgur.com/NR38T.png)](https://i.stack.imgur.com/NR38T.png) .html code ``` {{list.USR}} ``` .ts code ``` ngOnInit() { this.COMPANY = localStorage.get...
2018/03/02
678
2,949
<issue_start>username_0: I have set up below VPC configuration but the SSH to the instance is not happening at the moment: * Created a new VPC * Created a public and private subnet * Launched an ec2 instance to the public subnet updated route tables for internet gateway * Launched ec2 instance to private subnet. * Ass...
2018/03/02
2,040
6,713
<issue_start>username_0: I am new to python and I have a project that is asking for building a shopping cart. it has a specific requirement that I should go with. I am stuck with the idea of make add method and remove. How can I use a class as a parameter to a method and why? Here is how my ItemToPurchase looks like...
2018/03/02
461
1,472
<issue_start>username_0: When i migrate my database i get this error. In ubuntu i dont get this error. But if i migrate/import to the server or MAC i get this bellow error. This is my users model. Fillable stuf ``` protected $fillable = [ 'name', 'email', 'password', 'user_type_id', 'verified', ]; ``` I...