date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/15
522
1,791
<issue_start>username_0: ``` @IdClass=(value = TripleKey.class) class Triple { String subject; String predicate; String object; @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o...
2018/03/15
1,432
2,635
<issue_start>username_0: I have a time series dataset (`ts`) with sells for each day. ``` ts ## A tibble: 40 x 2 # dates sells # # 1 2014-09-01 32 # 2 2014-09-02 8 # 3 2014-09-03 39 # 4 2014-09-04 38 # 5 2014-09-05 1 # 6 2014-09-06 28 # 7 2014-09-07 33 # 8 2014-09-08 21 # 9 2014-09-09 29 #10 2014-09-10 ...
2018/03/15
919
3,179
<issue_start>username_0: I've implemented a simple network using vis.js. Here's my code: ``` //create an array of nodes var nodes = [ { id: "1", label: "item1" }, { id: "2", label: "item2" }, { id: "3", label: "item3" }, ]; // create an array wit...
2018/03/15
1,035
4,134
<issue_start>username_0: I am a beginner in java and during coding, i faced an issue which is not easy to understand for me. My question is "Write a class with a method to find the area of a rectangle. Create a subclass to find the volume of a rectangular shaped box." The error i am facing is below. I wrote this code f...
2018/03/15
599
2,255
<issue_start>username_0: I am appending element on a node. I am stuck in a situation that on every click event the same element get append to the parent. How can I stop preventing the element to append again and again and add just once on the first click. ```js document.getElementsByClassName("btn")[0].onclick = ...
2018/03/15
931
3,315
<issue_start>username_0: I have generated the python client and server from <https://editor.swagger.io/> - and the server runs correctly with no editing, but I can't seem to get the client to communicate with it - or with anything. I suspect I'm doing something really silly but the examples I've found on the Internet ...
2018/03/15
513
1,827
<issue_start>username_0: i'm new to excel macros and I would like some help with hiding some columns, I have 2 drop down lists in A2 and A3, both have the options of yes or no. How can I make column C hidden if the No option is chosen in the drop down in A2 and column D disappear if the No option is chosen for the drop...
2018/03/15
570
1,897
<issue_start>username_0: I was reading online about function on PostgreSQL and returns results In this links: 1. [SQL function return-type: TABLE vs SETOF records](https://stackoverflow.com/questions/22423958/sql-function-return-type-table-vs-setof-records) 2. [How do I reference named parameters in Postgres sql funct...
2018/03/15
1,971
4,893
<issue_start>username_0: I am trying to follow this tutorial to be abe to use C code in python. <http://dfm.io/posts/python-c-extensions/> here is the gist <https://gist.github.com/GreenJoey/b08528d6abe62da70f28f73c39c0efd0> when I try to compile it using `python setup.py build_ext --inplace` it fails with this error...
2018/03/15
1,998
5,984
<issue_start>username_0: I have this array: ``` $arrayAll = [ '156' => '1', '157' => '1', '158' => '2', '159' => '1', '160' => '2', '161' => '1' ]; ``` where the keys are unique - they don't ever repeat. And the value could be either 1 or 2 - nothing else. And I need to "split" this `$arrayAll` array in...
2018/03/15
1,852
5,850
<issue_start>username_0: I have huge pandas crosstab, I want to filter item that just appear once, to make easier to explain, I will make artificial data, here's my data ``` Customer_id Apple Book Candy 1 0 1 1 2 1 1 0 3 1 ...
2018/03/15
707
2,952
<issue_start>username_0: Say, I'm Fechting thousands or record using some long runing task from DB and caching it using Redis. Next day somebody have changed few records in DB. Next time how redis would know that it has to return cached data or again have to revisit that all thousands of records in DB? How this synch...
2018/03/15
533
1,929
<issue_start>username_0: For some reasons I need to use JDK8 and JDK9. Is a good idea to put both paths (to JDK8 and JDK9) into the same JAVA\_HOME system environment's variable? Details: I need to run both systems at the same time, one with ant (which uses jdk8) and second with maven (which uses jdk9).<issue_comment>...
2018/03/15
290
1,169
<issue_start>username_0: I've tried creating a reference to the constraint and then setting the Layout Priority but this makes the app crash ``` let topTrasactionConstraint = transactionsTableviewContainer.topAnchor.constraint(equalTo: buttonsStackContainerView.bottomAnchor, constant: 6) NSLayoutConstraint.activa...
2018/03/15
182
635
<issue_start>username_0: I tried with below two ways. Both are working fine, I want to know which one is good in terms of performance as i have to use it in procedure multiple times. 1. `var1 := var2;` 2. `SELECT var2 INTO var1 FROM dual;`<issue_comment>username_1: How about `topTrasactionConstraint.priority = 999`? ...
2018/03/15
389
1,442
<issue_start>username_0: I am trying to distinguish currently selected routerLink from others by giving it class which will change some styles. So in html i added some properties and event to links. app.component.html: ``` Dashboard Products List ``` and in typescript I have implemented variable and method. a...
2018/03/15
376
1,336
<issue_start>username_0: How can I safely put elements in `ConcurrentMap > cmap = new ConcurrentMap>();` I operate on my concurrent map as follows: * If a key does not exist: put an entry with some string and a brand new `Set` * If there exists: add a specific `Integer` to this key's `Set` value.<issue_comment>us...
2018/03/15
569
2,069
<issue_start>username_0: I'm automating Azure B2B Invitation process. At this stage I need to know if invited user has accepted invite or not. Is there any way to do it?<issue_comment>username_1: There doesn't seem to be any programmatic way to do this at the moment as far as I can tell. The attribute that tells you ...
2018/03/15
1,175
3,268
<issue_start>username_0: I have below JSON array. I want to give rank based on number of entries of user. Here <EMAIL> will get 1st rank because it has 3 entries. other will get 2nd and 3rd respectively based on number of entries. ```js let data = [{ "email": "<EMAIL>" }, { "email": "<EMAIL>" }, ...
2018/03/15
5,394
8,658
<issue_start>username_0: I wanted the product of last 12 months data from the current row. ``` Date Open 21/06/11 839.9 22/06/11 853.35 23/06/11 846.55 24/06/11 874.15 27/06/11 866.7 28/06/11 878.9 29/06/11 875.7 30/06/11 888.7 01/07/11 907 04/07...
2018/03/15
3,260
9,641
<issue_start>username_0: I am attempting to implement a grid of cells, analogous to that of Conway's game of life. While each individual grid should have fixed size in both dimensions, I would like a Grid struct that allows for any size in both dimensions. This is in analogy to how arrays can be of any size, but an a...
2018/03/15
633
2,233
<issue_start>username_0: I am trying to make work icecast 2 and my letsencrypt SSL with no luck. So far what I did is built icecast 2 with openssl support and I also made it run but it always give the next error in the log file. ``` [2018-03-15 12:48:21] WARN connection/get_ssl_certificate Invalid private key file /u...
2018/03/15
1,718
5,809
<issue_start>username_0: I'm using the following code to create a 2D array of booleans (initially filled with false), and then flipping the value individually. ``` constructor(props) { super(props); this.state = { fullGrid: Array(3).fill(Array(5).fill(false)) }; this.toggleFullGrid = this.toggleFullGrid.b...
2018/03/15
571
2,047
<issue_start>username_0: I know im doing it wrong because i edited this from just a name search can someone help me figure out what im doing wrong? Tried searching but nothing shows up. ``` | Search by date "> Between "> | if($_GET["ftxtKeyword"] != "") { $objConnect = mysql_connect("localhost","root","...
2018/03/15
487
1,765
<issue_start>username_0: Need to convert below string into object ``` "{"taskStatus":"Not Started","taskFields":{"originalTransactionDate":"${datafield:feerefund:originalTranDate}","transactionPostingDate":"${datafield:feerefund:tranPostingDate}","referenceNumber":"${datafield:feerefund:referenceNum}","promotionIdenti...
2018/03/15
383
1,342
<issue_start>username_0: I'm adding content to a predefined layout that I cannot modify but allows any HTML. I wish to align a piece of text like a floating text box but due to the h4 and p classes that I can't change it is proving difficult. What I'd like to see is: [![this alignment](https://i.stack.imgur.com/TlMLD....
2018/03/15
373
1,455
<issue_start>username_0: In parents controller $onInit() I'm waiting for resolving promise to set page title and get opid for list which has own controller. This is from parent controller: ``` public $onInit = () => { this.swSubviewInfo.resolved.then((response: IDashboardResponseData) => { this.setGroupId(...
2018/03/15
571
2,540
<issue_start>username_0: I want to use Angular Universal for two things: SEO and preview of the site on social media. I know it is possible with static site content. But what about dynamic content? What if I want search engines and social media crawlers to find not only the main site with a welcome-screen, but individ...
2018/03/15
875
2,809
<issue_start>username_0: So I have been searching, but couldn't exactly find a solution for the thing I want to do. Basically User input's a char like "asdasdasd" and I need to go thru each symbol to check if it's 'a', and need to stop the loop after it has reached the end of char. I got this far and it works, it outpu...
2018/03/15
883
3,620
<issue_start>username_0: I am coming from PHP ecosystem, and now i want upgrade my skills to *Asp.Net Core 2.0*. There a problem with sessions **since these will be destroyed on each build**, and that's is really annoyng during **development**. Asp.net authentication system isn't destroyed at **builds/restart**, while...
2018/03/15
1,083
3,570
<issue_start>username_0: I would like to have default string as values of an associative array if a user didn't fill in the field. For example "not inserted". If a user fills in the field, a variable should take the value the user put. So I wrote this code: ``` php if (isset($_POST['submit'])){ if (isset($_POST['n...
2018/03/15
811
2,700
<issue_start>username_0: I try insert image on API 21 and that not working, but on API 26 everything working. **Where my mistake or what is missing here?** ``` public class MainActivity extends AppCompatActivity { ImageView img1,img2,img3,img4; @Override protected void onCreate(Bundle savedInstanceState) { super....
2018/03/15
591
2,404
<issue_start>username_0: I have a component (properties.component.html) that renders real estate properties. When a user clicks on a specific property, I set a Behavior Subject equal to this property. ``` private property = new BehaviorSubject(); setProperty(property) { this.property.next(property); } ``` The comp...
2018/03/15
700
1,963
<issue_start>username_0: This code is supposed to increment each value in a vector by 1: ``` fn main() { let mut v = vec![2, 3, 1, 4, 2, 5]; let i = v.iter_mut(); for j in i { *j += 1; println!("{}", j); } println!("{:?}", &mut v); } ``` It doesn't work because of the borrowing ru...
2018/03/15
705
2,098
<issue_start>username_0: I'm getting this error trying to deploy a card to a working blockchain on cloud, any idea? Thanks in advance. I'm using a mac, following the guide (Kubernetes installed/configured well, I think): <https://ibm-blockchain.github.io/interacting/> ``` ./create/create_composer-rest-server.sh --pai...
2018/03/15
1,472
5,424
<issue_start>username_0: `ARKit` 1.5 introduces image recognition. In the code you have to create a Set of the reference images like this: ``` let referenceImages = ARReferenceImage.referenceImages(inGroupNamed: "AR Resources", bundle: nil) ``` and then images contained in the Set can be recognised. I wanted to kno...
2018/03/15
1,506
5,502
<issue_start>username_0: I have a HTML `div` that are assigned with different `id` attribute using `EJS`. It looks like this: **HTML** ``` ``` This `div` is generated several times in the HTML depending on how many posts a particular user has. Each of the `div` has a different `posts._id`. I would like that when ...
2018/03/15
524
2,013
<issue_start>username_0: I'm trying to achieve the following: User will submit a form and be redirected to the thank you page. In the thank you page load, user's "marks-list" (`MarksList.cshtml`) has to be converted to pdf and then emailed (all happening in background). I have tried `Rotativa` following this [articl...
2018/03/15
764
2,450
<issue_start>username_0: I have some trouble achieving my requirement. I have a table called accounts\_invoice and data as mentioned below. DB Table ``` AC_NO VARCHAR2(20 BYTE) INV_NO VARCHAR2(20 BYTE) CC VARCHAR2(20 BYTE) FT VARCHAR2(20 BYTE) AC_NO INV_NO ...
2018/03/15
636
2,198
<issue_start>username_0: I try to dynamic create variables in class to store values and use it in ngModel and other placese. I know, that I can assign value to variables in ngOnInit() like this ``` export class Component implements OnInit{ name: string; ngOnInit(){ this.name = '<NAME>'; } } ``` But ...
2018/03/15
1,370
3,633
<issue_start>username_0: I would like to simulate data for a logistic regression where I can specify its explained variance beforehand. Have a look at the code below. I simulate four independent variables and specify that each logit coefficient should be of size log(2)=0.69. This works nicely, the explained variance (I...
2018/03/15
354
1,289
<issue_start>username_0: I have an input field which I add to html using ajax here: ``` function WritePrices(categories) { var strResult = "from: "; strResult += "from: "; $("#price-range").html(strResult); } ``` And then I want to catch a moment when this input is changed by the user. That's why in the...
2018/03/15
509
1,793
<issue_start>username_0: I've got a page im trying to develop which will take user input and then add it to an array and then take that array and make a select and option list out of it as such. ``` var option\_list = []; // for loop at thats option\_list to select select tag for (var i = 0; i < option\_list.lengt...
2018/03/15
427
1,342
<issue_start>username_0: * Converted large text file to list of strings (each row = one element in list) ['...','...','...'] * sample\_data = ['2017-May-15 13:56:49.578 Event Dispense Sc 06mm Beschichtungsbreite ist: 5.99 mm', '2017-May-15 14:12:11.062 Event Runtime SC 09mm neuer Druck: 27.560PSI'] * Trying to extract ...
2018/03/15
647
2,235
<issue_start>username_0: I am kinda new to react and to the webitself. this is my render function ``` render() { const {repositories} = this.props return ( { repositories.map((repo, index) => { console.log(repo.name) return }) } ) } ``` The repositories is changing the way I want, but for ...
2018/03/15
417
1,594
<issue_start>username_0: I have to launch several times an executable with different argument each time and I need to get back the process ID for each of them. I have the used command line and I need the process ID of the process started with this command. Following some others question here I have found this: ``` G...
2018/03/15
947
3,718
<issue_start>username_0: Yesterday I managed to have my API working on my local computer, however today (same code) on another computer, it's not working, I am getting this error on the console: > > Failed to load <http://localhost:52056/api/task>: The > 'Access-Control-Allow-Origin' header has a value 'null' that i...
2018/03/15
929
3,275
<issue_start>username_0: I have the following table in Mysql ``` Name Age Group ``` --- ``` abel 7 A joe 6 A Rick 7 A Diana 5 B Billy 6 B Pat 5 B ``` I want to randomize the rows, but they should still remain grouped by the Group column. For exmaple i want ...
2018/03/15
776
2,786
<issue_start>username_0: I'm trying to read and write a file from a path (ex: "/Desktop/folder"). If this can't be done, then from Documents (ex: "/Documents/folder"). I saw and tried several examples, but the problem is that the file is located in a location such: > > file:///Users/name/Library/Developer/CoreSimula...
2018/03/15
1,917
6,757
<issue_start>username_0: I'm working with django, during inserting data into tables the error is generates as given below... Error: ``` int() argument must be a string, a bytes-like object or a number, not 'Tbl_rule_category', How can we solve such error? ``` view.py ``` dataToRuleCtgry = Tbl_rule_category(categor...
2018/03/15
399
1,591
<issue_start>username_0: Can anyone explain the following bash snippet? ``` for i in $(seq 1 1 10) do VAR=${2%?}$i break; done ```<issue_comment>username_1: It removes the trailing character from `$2` (second positional parameter) and concatenates that value with `$i` example: ``` $ v1="myvalue1x" $ v2="myval...
2018/03/15
755
2,774
<issue_start>username_0: I am doing an sql query where I retrieve a list over Accounts for a specific year. I thought the below code was fine. ``` SELECT count(DISTINCT ACCOUNT) AS ACCOUNT, CASE when MONTH(Created)=1 then 'January' when MONTH(Created)=2 then 'February' when MONTH(Created)=3...
2018/03/15
450
1,841
<issue_start>username_0: I have a problem with creating files in Android. I have followed [this](https://developer.android.com/training/data-storage/files.html#java) tutorial, and wrote this method: ``` public File getStorageDir(String name) { String path = Environment.getExternalStoragePublicDirectory(Environ...
2018/03/15
590
2,067
<issue_start>username_0: I have an query string in Python as follows: ``` query = "select name from company where id = 13 order by name;" ``` I want to be able to change the `id` dynamically. Thus I want to find `id = 13` and replace it with a new id. I can do it as follows: ``` query.replace("id = 13", "id = {}"....
2018/03/15
244
854
<issue_start>username_0: Hello I'm developing Ionic-3 Hybrid application.I am inspect app on samsung J7 device with chrome remote device inspect and everything was good but unfortunatly i'm stuck When clicking "inspect" next to the url of the page open on the google chrome an empty window shows up and nothing happens. ...
2018/03/15
1,062
2,934
<issue_start>username_0: I'm trying to remove the contents of an array `positions = ['CF','ST','RW','LW','CB','RB','LB','CM','CAM','CDM','RM','LM','RWB','LWB']`from the column Name in my dataframe with football players.Sample of this dataframe below. [Player dataframe](https://i.stack.imgur.com/hKRYM.png) Can anyone h...
2018/03/15
1,138
3,468
<issue_start>username_0: Edit: solved! The server was redirecting from /whales to /whales/, which transformed the request into a GET. My curl command had the trailing slash, but my form and Postman request did not. --- My basic server always has "GET" as r.Method, even for post requests from Postman and html forms. r...
2018/03/15
627
2,286
<issue_start>username_0: **Introduction:** I've been studying machine learning this last couple of months, more specifically neural networks. I found out that categorical data, such as cities, could be transformed to integer data, but shouldn't because there's no linearity. What I mean by this is: there is no reason w...
2018/03/15
1,544
5,711
<issue_start>username_0: I have an input field on my html that I need to limit the value of. I am trying doing like this: HTML: ``` ``` Typescript: ``` onChangeValue(valueString: string, option: OptionViewModel) { var value: number = parseInt(valueString); // Check some conditions. Simplified code just f...
2018/03/15
1,595
5,900
<issue_start>username_0: I have many assumptions about android because I lack of knowledge of android internal. I'm developing apps with Android Studio. I usually search code snippet for java instead of android. For example I search "java read file into byte array" rather than "android read file into byte array" so se...
2018/03/15
760
2,410
<issue_start>username_0: Fiddle here: <https://jsfiddle.net/mv5ut6sw/> I have a list of links at the top of my webpage contained in a . I would like a horizontal `---` line above and below this to visually separate the links from the rest of the page. Simplified example: ``` --- * [Link1](/link1) * [Link2](/link2...
2018/03/15
1,374
4,839
<issue_start>username_0: Lets say I have two classes car and service. Is it possible to create the elements for both vector objects(note: I don't know if is actually refereed to as vector objects), of the car and service classes. Once both elements are created I would only like the car class constructor to be called la...
2018/03/15
1,876
6,747
<issue_start>username_0: I'm **not** asking how to loop through an array in typescript. My question is a bit different so let me explain first. I have a json which looks like this: ``` { "forename": "Maria", "colors": [ { "name": "blue", "price": 10 }, { "name": "yell...
2018/03/15
585
2,321
<issue_start>username_0: Looking at the liquibase documention <http://www.liquibase.org/documentation/changes/create_index.html>, CIC is not possible with create index, as liquibase doesn't have a tag to specify concurrent option. Is there a way to create index concurrently with liquibase?<issue_comment>username_1: Y...
2018/03/15
605
2,056
<issue_start>username_0: Here's my [code](http://rextester.com/ETPT71475): ``` public class Program { public static void Main(string[] args) { Factory factory = new Factory(); } } public class Factory { public Factory() { Animal animal = new Animal(); MVCSender(...
2018/03/15
722
2,803
<issue_start>username_0: I have two methods that are almost identical. The only difference is that I have two separate events for the click event on the button click. Is there a clean way to transform this into one method call? Can I pass in an event name in the method parameter list? If I instantiate two different eve...
2018/03/15
384
1,129
<issue_start>username_0: Here I am using a css file where I am setting height for tootltip ``` .md-tooltip{ width : 120px; height: 200px; background-color:white; } ``` dynamically trying to set the height using ``` $(".md-tooltip").height(100); ``` how to override the height 100px from CSS file. I want...
2018/03/15
676
2,784
<issue_start>username_0: We use Simple Injector in ASP.NET Core application. Recently we've decided to use Serilog for logging purposes. Configuration was done in Program.cs as stated in their [documentation](https://github.com/serilog/serilog-aspnetcore). Then, in order to make Simple Injector able to resolve `ILogg...
2018/03/15
496
1,631
<issue_start>username_0: I am using ReactTable and I need to create some summary in the end. It should be visible every time also when pagination is there. Is it possible to achieve it with react table? I can partly solve it by creating next table. But I did not find the way how to hide header. Another problem is whe...
2018/03/15
369
1,187
<issue_start>username_0: In my dataset I have a variable (numeric) which is year+month, called *year\_month* with values 201702, 201703 etc. Normally my code looks like this: ``` select year_month ,variable2 ,variable3 from dataset ``` I wish to extract the month and the year from the year\_month variable, but I'm...
2018/03/15
423
1,928
<issue_start>username_0: I have 3 activities: A, B and C. I'd like to launch C from A and send back the result to B using `onActivityResult()`: * A launch C using `startActivityForResult()` * C is launched and performs its task * B received the result of C in `onActivityResult()` Is it possible?<issue_comment>usernam...
2018/03/15
435
1,877
<issue_start>username_0: I have a table like this [like this](https://i.stack.imgur.com/OXus5.png) I want to find top 2 most frequently occurring device ids with their counts. ``` device_id count 32145678665 3 3214567866555 4 ```<issue_comment>username_1: Its not directly possible because the result o...
2018/03/15
427
1,885
<issue_start>username_0: How do I code a RADIX SORT in Python for different length of string with space? For example my input is ``` ["THE LORD","HELP", "WHO IS THAT"] ``` I would like to get ``` ["HELP", "THE LORD", "WHO IS THAT"] ``` Thank you<issue_comment>username_1: Its not directly possible because the ...
2018/03/15
483
1,872
<issue_start>username_0: I'm currently trying to learn react native. I created a project using create-react-native-app. After the project is created, I started npm start on the folder which shows the QR code. I've installed the expo app on my android phone and scanned the code but I'm getting a **Uncaught Error: Timed ...
2018/03/15
680
2,587
<issue_start>username_0: I have two problem with my app: 1. I don't know how to retrieve the color of the small icon of notification when a notification arrives? 2. Can I edit app name that displayed at top of the notification by programmatically? I'm using android Nougat . [![enter image description here](h...
2018/03/15
502
1,812
<issue_start>username_0: I keep on getting ES6 jshint warnings, for example: ''import' is only available in ES6 (use 'esversion: 6'). (W119)' source: 'jshint' code: 'W119' I followed suggestions such as 1. Adding a .jshintrc file in the root with { "esversion": 6 } 2. Adding the following to the user and\or workspa...
2018/03/15
508
1,878
<issue_start>username_0: I have an `angular 5 material checkbox` with a surrounding div and some other elements. I want a click on the `div` to be the same as a `click` directly on the `checkbox`. Here is my example code: ``` I'm a not working checkbox :'( I want to be clickable too ``` and a [Stackblitz](http...
2018/03/15
638
2,009
<issue_start>username_0: I have a data in following JSON sort of format in which I am trying to only get the very last URL which in my following example is `https://lastexample.com/images/I/4162nAIaRCL.jpg` . Is there an easy way I can retrieve this via PHP? ``` {"https://example.com/images/I/4162nAIaRCL._SX425_.jpg"...
2018/03/15
657
2,286
<issue_start>username_0: I am new to c++ , I want to remove the maximum value in linked list. But I got the error message. Here is the function that removing the max value and return the value removed. While running the line "delete cur", I got the error message. Somebody help me please! ``` int removeMax(Dnode*& lis...
2018/03/15
704
2,439
<issue_start>username_0: I am trying to get this working from a long time now but cannot seem to get it right- my x.html- ``` [Add Contract](#add) {% include "a_bs3.html" with form_title="Add :" form_btn="Add" form_id="add" ajax="True" %} $(document).ready(function() { var check = location.hash; if (check == "t...
2018/03/15
486
1,437
<issue_start>username_0: I have this given dataframe: ``` days classtype scores 1 1 a 49 2 1 b 47 3 2 a 36 4 2 b 41 ``` It is produce by this given code: ``` days=c(1,1,2,2) classtype=c("a","b","a","b") scores=c(49,47,36,41) myData=data.frame(days,classt...
2018/03/15
723
2,368
<issue_start>username_0: I have a cpu intensive task in JavaScript that is blocking the VM while executing within a `Promise`: An example could be the following (try it out in the browser): ``` function task() { return new Promise((r,s) => { for(var x=0; x < 1000000*1000000; x++) { var Y = Math.sqr...
2018/03/15
527
1,864
<issue_start>username_0: My client want to use **GMail API** for their existing web application using **their own domain**. So they can send automatic e-mail from their mail server. The code they are using is in plain PHP. Is this possible? Can anyone show me the step-by-step tutorial for this? Thank you very much [ED...
2018/03/15
2,496
5,224
<issue_start>username_0: Sample data ``` dat <- data.table(yr = c(2013,2013,2013,2013,2013,2013,2013,2013,2013,2013,2012,2012,2012,2012,2012,2012,2012,2012,2012,2012,2012), location = c("Bh","Bh","Bh","Bh","Bh","Go","Go","Go","Go","Go","Bh","Bh","Bh","Bh","Bh","Bh","Go","Go",...
2018/03/15
294
1,198
<issue_start>username_0: I want to create a function for a push notification but when I try to upload new function then the previous function which is for different purpose is being deleted . I don't know why currently I have 3 functions. [This is the screenshot of my node js](https://i.stack.imgur.com/FiT9C.png)<issue...
2018/03/15
290
1,160
<issue_start>username_0: On crystal report, I've to place logo based on price. If price > 0 ,logo will not display, otherwise logo will appear. How Can I do this? I believe I've to write the formula against image subpress method. any idea? please note image name picture1 .<issue_comment>username_1: Most likely you r...
2018/03/15
424
1,521
<issue_start>username_0: I want to execute this statement only if all these 3 following conditions are true: 1. flavor is "vanilla" or "chocolate" 2. vessel is "cone" or "bowl" 3. toppings is "sprinkles" or "peanuts" **my code** ``` if ((flavor == "vanilla" || "chocolate") && (vessel == "cone" || "bowl") && (toppin...
2018/03/15
387
1,543
<issue_start>username_0: Right now I've got two tables `"Category"` and `"Product"`. I made `'category_id'` in `"Product"` to be equal `'id'` in `Category`, so now in my view it shows all products of that category. But now I need one product to be in several categories. In controller I use the following data provider...
2018/03/15
296
1,032
<issue_start>username_0: The import `org.hamcrest.Matchers.hasProperty` cannot be resolved in JUnit4.12. What is the alternative to use `hasProperty`?<issue_comment>username_1: Hamcrest is not embedded in JUnit 4.12, instead you'll need to include the separate Hamcrest library on your classpath. If you are using Mav...
2018/03/15
2,273
6,881
<issue_start>username_0: I import data from excel using xlrd. After coverting it to JSON and loading, the data format looks like this: ``` [{'receipt_id': '1', 'service': 'A', 'charge': '2000', 'company': 'Company A'}, {'receipt_id': '1', 'service': 'B', 'charge': '3000', 'company': 'Company A'}, {'receipt_id': '2', '...
2018/03/15
691
2,404
<issue_start>username_0: To give some context to the title, let's say I have an array of INTs. So, for example (1,2,3,4,5). Each number in the array represents a char in a string. So if the string is hello then array[3] is going to represent "l". What is the most efficient or simplest way to remove a char from a ...
2018/03/15
452
1,524
<issue_start>username_0: I am trying to access the AWS ETL Glue job id from the script of that job. This is the RunID that you can see in the first column in the AWS Glue Console, something like `jr_5fc6d4ecf0248150067f2`. How do I get it programmatically with pyspark?<issue_comment>username_1: You can use [boto3](http...
2018/03/15
1,222
3,751
<issue_start>username_0: I'm trying to deploy a django project with the following Apache configuration: **Apache virtualhost configuration** ``` DocumentRoot /var/www/project/backend ErrorLog ${APACHE\_LOG\_DIR}/error.log CustomLog ${APACHE\_LOG\_DIR}/access.log combined WSGIDaemonProcess backend python-home=/v...
2018/03/15
311
933
<issue_start>username_0: ``` var array= [ {"Name":"Test", "Status":{"Id":100, "Alias":"A"}}, {"Name":"Test2", "Status":{"Id":101, "Alias":"B"}}, {"Name":"Test3", "Status":{"Id":102, "Alias":"C"}} ]; ``` How to loop throw value of array of Name and Id in JavaScript?<issue_comment>username_1: You can...
2018/03/15
648
2,420
<issue_start>username_0: My property isLoading is a Boolean on state that I check to determine if the body of my render code is ready to be executed or should wait with a spinning loader. When I examine state in the debugger isLoading is a boolean as it should be but when I further examine just isLoading it is undefine...
2018/03/15
984
3,453
<issue_start>username_0: I need to generate a random number between 0 and 1 in C#. It doesn't need to be more accurate than to a single decimal place but it's not a problem if it is. I can either do `Random.Next(0, 10) / 10.0` or `Random.NextDouble()`. I could not find any concrete information on the time complexity ...
2018/03/15
548
1,900
<issue_start>username_0: I'm trying to export my data from a ViewController to another with this code: ``` func prepare(for: UIStoryboardSegue, sender: AnyObject?){ let desty : EndViewController = segue.destinationViewController as! EndViewController desty.totalScore = scoreTotal.text! } ``` But when I ...
2018/03/15
799
2,715
<issue_start>username_0: I have written one c++ class which has read and write methods. These methods read and write row from/to csv file. Currently I have implemented read and write for csv file having five tuples(columns), say - EmpNo, EmpName, Address, Department, Manager. Class contains these 5 tuples as member var...
2018/03/15
949
3,531
<issue_start>username_0: I am using Google visualization pie chart for showing transaction state. I want to export to csv, there is functionality ToolBar to export csv,html,iGoogle but I want to specific to csv only without select options.<issue_comment>username_1: Google will provide you u need to pass your API key in...
2018/03/15
750
2,078
<issue_start>username_0: I have this email template: ``` title img { max-width: 600px; -ms-interpolation-mode: bicubic;} .ReadMsgBody { width: 100%; } .ExternalClass {width:100%;} .backgroundTable {margin:0 auto; padding:0; width:100%;!important;} body { width: 100%; height: 100%; direction: rtl; } .force...