date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/22
2,284
7,903
<issue_start>username_0: I've attached an example of what I am tasked with creating. For now I am just focusing on the lower triangular part of the matrix. For some reason the output is completely blank when I run the program. Any help here is much appreciated.[![enter image description here](https://i.stack.imgur.com/...
2018/03/22
2,149
7,546
<issue_start>username_0: I am having a problem with using `JQuery` to read a text file and get the value out of the JQuery get function. As the code below, the first `console.log` will display causes correctly, however when it comes out the function the second console log will not have anything. I am wondering how ...
2018/03/22
997
3,423
<issue_start>username_0: This code below is responsive and resizes etc. But I'm looking for some real simple CSS to resize when on desktop and mobile. I get that I can muck with the CSS from the header link w3.css, but there has to be a better way to just easily display some things on desktop vs mobile. And mobile de...
2018/03/22
1,356
4,561
<issue_start>username_0: I have everything working except I cant figure out why my code wont find the least common letter I have a for loop that is supposed to find the least common letter but it isn't giving me anything. it gives me the most common but not the least. ``` FileReader file = new FileReader("\\src\\a...
2018/03/22
1,104
3,613
<issue_start>username_0: I'm kind of new to R, and I need to convert several datasets into one big mysql table. What I need is to iterate each row of the dataset and get each row adding the label of the column and value of the row as well as its id into a new row. Example: Lets say the dataset below: ``` ID ...
2018/03/22
1,570
5,338
<issue_start>username_0: Tables: ``` CREATE TABLE Participation( ParticipationId INT UNSIGNED AUTO_INCREMENT, SwimmerId INT UNSIGNED NOT NULL, EventId INT UNSIGNED NOT NULL, Committed BOOLEAN, CommitTime DATETIME, Participated BOOLEAN, Result VARCHAR(100), Comment VARCHAR...
2018/03/22
1,023
3,743
<issue_start>username_0: Let's say I'm testing the below React component with `jest --coverage`: ``` class MyComponent extends React.Component { constructor(props) { super(props) if (props.invalid) { throw new Error('invalid') } } } ``` the coverage report will say that the line `throw new Erro...
2018/03/22
3,194
9,905
<issue_start>username_0: I'm trying to teach myself how to use lambda expressions in Java instead of regular external iteration type solutions. I've made a short program where I use a stream of integers and assign them grade letters. Instead of using the typical "switch" statement, I've used these lambda expressions. I...
2018/03/22
305
1,006
<issue_start>username_0: I want to search if names have a particular character length. Create a query that searches for names for e.g. between 5 characters and 10 characters. I am guessing its probably something to do with regex, but really got lost. I want something like this ``` $qry = "SELECT * FROM members WHERE ...
2018/03/22
683
2,642
<issue_start>username_0: I have heard that "“Private” instance variables that cannot be accessed except from inside an object don’t exist in Python : [as seen here](https://docs.python.org/3/tutorial/classes.html#private-variables) However, we can create private variables using getter and setter methods in python as s...
2018/03/22
520
1,751
<issue_start>username_0: I have been having some problems with this JS code. The code is supposed to generate an array of random voltages (in the volts array), and then create a new array (the sortedVolts array) where the volts are sorted by lowest to highest. The problem is that my code is sorting not only the sort...
2018/03/22
534
1,648
<issue_start>username_0: ``` df = pd.DataFrame(["c", "b", "a p", NaN, "ap"]) df[0].str.get_dummies(' ') ``` The above code prints something like this. ``` a p b c ap 0 0 0 0 1 0 1 0 0 1 0 0 2 1 1 0 0 0 3 0 0 0 0 0 4 0 0 0 0 1 ...
2018/03/22
402
1,423
<issue_start>username_0: I know how to make a marker icon in Android/Java ? ``` BitmapDescriptor icon = BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE); ``` However,I want to change the color to change from black -> blue (or something) based on the location properties. How do I change an ic...
2018/03/22
504
1,651
<issue_start>username_0: I have a code like this ``` class Test1 { func demo(\_ obj0: Test1?) { guard var obj1 = obj0 else { return } // obj1 = nil // ERROR // WORK AROUND var obj2 = obj0 obj2 = nil // WORKS FINE } } ``` As mentioned if assign nil to obj1, It shows error ``` // ERROR : Nil cannot be assi...
2018/03/22
254
763
<issue_start>username_0: I want the help to produce the result of below calculation as 1.12 but the result is coming up 1.0 `double k=(112)/100; System.out.println(k);`<issue_comment>username_1: You are doing `Integer division` causing it to lose the precision: Replace `double k=(112)/100;` with `double k=(112.0)/...
2018/03/22
478
1,681
<issue_start>username_0: I have multiple promises like this: ``` module.exports = function (a, b, c) { return someAsync(() => { someFunc(a); }) .then(() => myPromises(a, b, c)) .then(result => { console.log('log the result: ', JSON.stringify(result)); // empty ...
2018/03/22
381
1,547
<issue_start>username_0: I checked many answers for how I can check an API's response time using `startTime` and `endTime`. But is there any other way to find, using Xcode, where I can see the timing without writing code in API calling section?<issue_comment>username_1: Yep, Xcode comes with Instruments, which has a Ti...
2018/03/22
337
1,289
<issue_start>username_0: Whenever I do `SHOW PROCEDURE STATUS` or `SHOW FUNCTION STATUS`, the engine shows me the procedures and functions in ALL my databases and not the one I'm currently connected to. Is there a way to list and/or retrieve information about procedures and functions from ONE specific database only? F...
2018/03/22
904
3,551
<issue_start>username_0: Actually I load the picture on the server. But once we do this, the page refreshes. ***My goal is to do this without refreshing the page.*** How can I do that? Is there anyone who can help? In the code below I write `onsubmit = "return false"` in the form. But the picture is not uploaded to the...
2018/03/22
645
2,523
<issue_start>username_0: Right now it's giving error that .png and .less files aren't valid, everything is invalid. I want eslint to only look at .js and .jsx files. I don't see any way to do that. I did find eslintignore which is not the best way to do things. I don't want to maintain a list of files to ignore. W...
2018/03/22
741
2,555
<issue_start>username_0: I have the following document in my DB : ``` { .... "key": "val1", .... "array" :[ { "k":"v1", "rejected":"0" }, { "k":"v2", "rejected":"0" } ] ..... } ``` ***Now basically I want to set "rejected":"1" for ("key":"val1" && array[i]."k":"v1" ).*** The API call that I have written is : ``...
2018/03/22
7,061
20,114
<issue_start>username_0: I have created a spring boot application. When I deploy the jar file in embedded tomcat and called the test API it gives 404 error. May I know why it is giving the error? **Main class** ``` package com.telematics.fleet; import org.springframework.boot.SpringApplication; import org.springfra...
2018/03/22
361
1,178
<issue_start>username_0: Here is my code: ``` df.head(20) df = df.fillna(df.mean()).head(20) ``` Below is the result: ![enter image description here](https://i.stack.imgur.com/Kb3gP.png) There are many `NaN`. I want to replace `NaN` by average number, I used `df.fillna(df.mean())`, but useless. What's the proble...
2018/03/22
1,185
3,746
<issue_start>username_0: **Could this be a bug? When I used describe() or std() for a groupby object, I get different answers** ``` import pandas as pd import numpy as np import random as rnd df = pd.DataFrame({'A' : ['foo', 'bar', 'foo', 'bar', ...: 'foo', 'bar', 'foo', 'foo'], .....
2018/03/22
523
1,845
<issue_start>username_0: I would like to add a background color to my page but leave the table background (the table appears on submit) and the inside of the box to the left of it (which has a class of .inputs) white. I tried adding the following to my CSS, but it doesn't do anything: ``` body:not(.inputs) { backg...
2018/03/22
1,610
5,367
<issue_start>username_0: I just get started with Retrofit 2 so I got some problem... I need get String[] of "**syn**" in "**noun**". I tried but it returned nothing! ``` String[] s = response.body().getNoun().getSyn(); ``` Thank you!! > > My JSON: > > > ``` { "adjective": { "ant": [ "bad", ...
2018/03/22
362
1,046
<issue_start>username_0: I need to match Regex for an input text. It should allow only numbers and only one dot. Below is my pattren. ``` (?!\s)[0-9\.\1]{0,} ``` This is allowing only numbers and allowing multiple dots. How to write so that it should allow only one dot? Bascially when i enter decimal, i need to ro...
2018/03/22
607
1,811
<issue_start>username_0: This is surely easy but for the life of me I can't find the right syntax. I want to keep all "ID\_" columns, regardless of the number of columns and the numbers attached, and keep other columns by constant name. Something like the below command that doesn't work (on the recreated data, ever...
2018/03/22
303
1,065
<issue_start>username_0: We have enabled BigQuery feature for our Firebase project , since last week firebase team announced that Crashlytics is moved from Beta to Prod release , so I was thinking this data should be available in BigQuery in some form. But I was not able to see any Crash event in my BigQuery table even...
2018/03/22
360
1,048
<issue_start>username_0: I have strings which contain query and timestamp separated with "---". Multiple strings have the same query but with different timestamp. I need to get the query with the maximum timestamp. The input string is like below: ``` 3-13-2018 00:08:07.890---select * from tablename; 3-13-2018 00:08:3...
2018/03/22
2,336
8,693
<issue_start>username_0: I am new to `webDevelopment`. I have string which has some text.Now I want to highlight some words from that text file . So, Here I am using this logic ``` $scope.highlightHTML = function (content,startoffset,endoffset,color) { var className = 'mark'; console.log(content.su...
2018/03/22
2,319
5,774
<issue_start>username_0: So I have a div, that contains an img, the div fills the entire screen. I need the img (E on the attachment) to take as much width **or** height keeping aspect ratio. I need to place a background-color surrounding my img but **not** behind the img (since it has transparency and I need to see wh...
2018/03/22
522
1,425
<issue_start>username_0: In SAS I have something like this... ``` ID survey Q1 q1_2 Q2 q2_2 Q3 q3_2 1 1 1 0 1 1 2 0 1 1 2 2 1 1 0 ``` I’m not sure if transposing is the right way to go but I’d like to get something like this. ...
2018/03/22
459
1,931
<issue_start>username_0: I have a Kubernetes cluster with 2 services deployed and the services are exposed to internet thru ingress. I am able to access the services outside the cluster using the ingress host. How to access the service within the cluster? Do i need to use the same ingress host approach for the service ...
2018/03/22
483
1,327
<issue_start>username_0: i have 2 arrays $data1 and $data2 when request $data2 **is\_null** or **empty**, always show error ``` Undefined offset: 0 ``` on line ``` {{$data2[$key]->month}} ``` **My blade** ``` @foreach($data1 as $key => $value) | {{$data1[$key]->id}} | {{$data1[$key]->Parameters->name}} | {{$...
2018/03/22
573
1,889
<issue_start>username_0: I have a class. ``` class IncorrectOfferDetailsOfferException(Exception): def __init__(self, offer): self.offerName = offer[0] self.offerType = offer[1] self.message = "Offer \"" + self.offerName + "\" could not be completed. It appears to be of type \"" + self.offe...
2018/03/22
504
2,082
<issue_start>username_0: In jenkins I'm seeing the following error message in the jenkins console while building any of our projects that are integrated with Gitlab. **Failed to update Gitlab commit status for project '120': HTTP 403 Forbidden** Would any of you guys happen to know what can be done to resolve this pr...
2018/03/22
1,223
4,580
<issue_start>username_0: I have a program that reads in a text file and will tokenize the words using a comma as a delimiter. It's working fine, but now I need to switch from using a 2-dimensional array where I know how many elements will be in it to using a 2-d ArrayList since I will not know how many elements will be...
2018/03/22
988
3,395
<issue_start>username_0: Let's say I have an array in the form: ``` const array = [{id: 1, title: "this"}, {id: 2, title: "that"}]; ``` I would like to change the value of one element in a given object. So that, for example, my output is like so: > > [{id: 1, title: "this"}, {id: 2, title: "foo foo foo"}]; > > >...
2018/03/22
881
3,081
<issue_start>username_0: I try to install app on the iPhone(iOS 11.2.6) and iPad using Xcode 9.2. It seems Xcode can't connect to the iPhone. After build success, it stuck on tips as below [error tips](https://i.stack.imgur.com/VFEtS.jpg) when goes to window -> devices and simulators [error info](https://i.stack.i...
2018/03/22
1,372
4,582
<issue_start>username_0: I'm more used to a single map and not to nested map. So I have serious difficulty understanding how to deal with this. **Remark: Please don't request me to use multimap or boost,I'm restricted to use this structure** In C++ STL map, i have a definition like this ``` map> exploration; // cou...
2018/03/22
1,472
5,382
<issue_start>username_0: Gradle build is not successful because it cannot find ic\_launcher\_foreground.xml in drawable. [![Here are the error messages](https://i.stack.imgur.com/2VWAe.png)](https://i.stack.imgur.com/2VWAe.png) [![Actual error occured in this file](https://i.stack.imgur.com/z1B6p.png)](https://i.stac...
2018/03/22
1,007
3,473
<issue_start>username_0: How do I save `response.status` from `$.get()` into a React variable `this.posts`? When I try to access `this.posts` from within `$.get()` it returns `undefined`. ``` import React, { Component } from 'react'; import $ from 'jquery'; class MediumPosts extends Component { constructor(props...
2018/03/22
1,009
3,414
<issue_start>username_0: I've got this issue. As you can see, I've already export (with redux) the Component. What did I do wrong? [Error](https://i.stack.imgur.com/1nvDX.png) ``` ... const Principal = (props) => { return ( WhatsApp Clone! props.modificaEmail(value) } style={{fontSize: 20, height: 45}} plac...
2018/03/22
268
954
<issue_start>username_0: I'm having trouble selecting a link from this dropdown menu. The html is this: ``` - [Automation Practice Form](http://toolsqa.com/automation-practice-form/) ``` I've tried Command: Select Target: class="menu-item menu-item-type-post\_type menu-item-object-page menu-item-22594" But it's fa...
2018/03/22
1,713
5,046
<issue_start>username_0: Here is the code ``` class A { x = 0; y = 0; visible = false; render() { return 1; } } type RemoveProperties = { readonly [P in keyof T]: T[P] extends Function ? T[P] : never//; }; type JustMethodKeys = ({ [P in keyof T]: T[P] extends Function ? P : never })[keyo...
2018/03/22
2,714
9,329
<issue_start>username_0: I have script in `pyspark` like below. I want to unit test a `function` in this script. ``` def rename_chars(column_name): chars = ((' ', '_&'), ('.', '_$')) new_cols = reduce(lambda a, kv: a.replace(*kv), chars, column_name) return new_cols def column_names(df): changed_col_n...
2018/03/22
1,034
3,729
<issue_start>username_0: Hi everyone I am a bit stuck on a problem with apollo-angular and apollo-link-error. I've tried a few different ways and I can't seem to catch any errors client-side in my angular web app. I posted my attempts below. Any suggestions or an extra set of eyes would be much appreciated. Basically ...
2018/03/22
437
1,349
<issue_start>username_0: I've typed some code in Python 3 idle and don't understand the output. Can someone explain, why this happens: > > 1 > 0 == True > > > ``` False ``` > > 1 > (0 == True) > > > ``` True ``` > > (1 > 0) == True > > > ``` True ``` Also you can replace digits to bools and output...
2018/03/22
656
2,057
<issue_start>username_0: I am currently working on replicating YOLOv2 (not tiny) on iOS (Swift4) using MPS. A problem is that it is hard for me to implement space\_to\_depth function (<https://www.tensorflow.org/api_docs/python/tf/space_to_depth>) and concatenation of two results from convolutions (13x13x256 + 13x13x1...
2018/03/22
1,310
4,267
<issue_start>username_0: [![enter image description here](https://i.stack.imgur.com/8nGTs.png)](https://i.stack.imgur.com/8nGTs.png) Hi, as the title implies, how do I ignore SQL syntax highlighting on my .php files? As you could see on the image above, Visual Studio Code seems to think that the `'DELETE /api/crm/co...
2018/03/22
1,042
2,855
<issue_start>username_0: I have a date format of `12March2018` I am trying to get a regular expression to identify the pattern using a regex expression. 1st letter must be numeric.Followed by the first 3 letters of the month. If the word which follows the numeric matches with any first 3 letter of any month it should...
2018/03/22
529
1,842
<issue_start>username_0: **UPDATE:** I am passing a string variable and am iterating through the string character by character. Whenever I run into a decimal, I want to combine the previous position on the string (i.e. 2) and the next position in the string (i.e. 5) into a double. So how would I go about making the cha...
2018/03/22
495
1,723
<issue_start>username_0: Let say I have a `UICollectionViewCell` and below is my layout of the `cell` ``` LabelOne || LabelTwo || Button ``` In my `CollectionViewController`, I set cellForRowAtIndexPath = 30. Now, I want to show a label named labelThree under label two and increase my cell height = 60 after button p...
2018/03/22
548
1,774
<issue_start>username_0: The issue: [![enter image description here](https://i.stack.imgur.com/rck2W.png)](https://i.stack.imgur.com/rck2W.png) Basically when it sees type of letter that regex don't allow it messes up with the link. My function in php to convert the names that are read from database into links: ``` ...
2018/03/22
691
2,845
<issue_start>username_0: I need to send messages from few thousands of devices to central hub and be able to get live stream of messages for specific device from that hub. So far, Azure Event Hubs seems to the cheapest option in terms of messages count. Event Hub namespace allows to create distinct event hubs in it. ...
2018/03/22
308
1,034
<issue_start>username_0: 1. If ‘ion-slide’ is an Angular component, then verify that it is part of this module. 2. If ‘ion-slide’ is a Web Component then add ‘CUSTOM\_ELEMENTS\_SCHEMA’ to the I’m using ion-slide as part of a component template but getting this error when trying to use that component by importing the C...
2018/03/22
1,033
3,194
<issue_start>username_0: I have three variables a, b and c. I have to insert these into an array called `arr`. On calling function click, these variables should get pushed into `arr` array. eg. if i call click with arg 1,2 & 3 then array should be [1,2,3], now when I will pass the args 6,7 then the array should be [1,2...
2018/03/22
539
1,583
<issue_start>username_0: My MenuItem: [![menu_setting.xml](https://i.stack.imgur.com/0pGTR.png)](https://i.stack.imgur.com/0pGTR.png) How to right align text of MenuItem in Toolbar, Icon in first next text, like this: [![enter image description here](https://i.stack.imgur.com/3YpeW.png)](https://i.stack.imgur.com/3Y...
2018/03/22
661
2,209
<issue_start>username_0: I am in the process of learning Javascript and came across the `apply` function. I thought I could assign my `apply` value to a variable and then print out the contents of the variable. However, I seem to get undefined and I'm not sure why this is happening... ``` var thisObj = { fullName:...
2018/03/22
2,217
7,592
<issue_start>username_0: I was reading [airbnb javascript guide](https://github.com/airbnb/javascript). There is a particular statement, that says: > > Don’t use iterators. Prefer JavaScript’s higher-order functions instead of loops like for-in or for-of. > > > The reason they give for the above statement is: > ...
2018/03/22
1,186
5,063
<issue_start>username_0: Working on a requirement to upload images to AWS instance. UI and service is separated and connects via REST. Service is in nodejs. from UI we are making a ajax call to backend service to upload the images to AWS. The problem: When I upload the images via POSTMAN request, I can see that respo...
2018/03/22
202
671
<issue_start>username_0: how to compare joining date with current date and if it is less than or equal to 45 days then select those details and display in oracle sql, what to do if joining date and current date in different format like (joining date `12/03/2015` and current date `01-MAR-17`)?<issue_comment>username_1: ...
2018/03/22
1,008
3,273
<issue_start>username_0: I have a table that is not currently clickable. On row click, I would like to go to a detail page from this table, passing the id value in the process. I understand I need to make an href on the table row and somehow pass the id value on click, but am not clear on how to do this. Relevant tabl...
2018/03/22
643
2,087
<issue_start>username_0: I have very little knowledge about C and I can't get this simple task to work: ``` #include #include void load\_hex\_fw() { char \*warea = getenv("WORKAREA"); char hex[] = "/path/to/fw.hex"; char hexfile; // several trials done here (\*hexfile, hexfile[500], etc.) strcat(hexfile, \*ware...
2018/03/22
543
2,148
<issue_start>username_0: I am experimenting with Go on AWS lambda, and i found that each function requires a binary to be uploaded for execution. My question is that, is it possible to have a single binary that can have two different `Handler` functions, which can be loaded by two different lambda functions. for exam...
2018/03/22
1,404
4,217
<issue_start>username_0: I have two Datatables in my C# Windows Forms application; ``` DataTable dtProduct; DataTable dtDetails; ``` `dtProduct` is being populated from `MS Access` and `dtDetails` is from `MySql`, those have following like records **dtProduct** ``` code | pNameOrignal ---------------------- 101 ...
2018/03/22
398
1,265
<issue_start>username_0: I've read somewhere that `cljs.reader/read-string` attaches metadata to the forms that it creates, like the position in the string read. Is it true? Is it documented somewhere? Thanks.<issue_comment>username_1: `read-string` doesn't add metadata to the returned form: ``` => (meta (cljs.read...
2018/03/22
689
2,269
<issue_start>username_0: How to count radio buttons with "green" values in my code snippet below? ```html | **President Staff** | | | | Corporate Planning & Program Office | | | | Acquisitiom & Aircraft Management | | | | Corporate Quality, Safety & Environmentak Management | | | | Corporate Secretary | ...
2018/03/22
1,958
6,558
<issue_start>username_0: I'm porting a program from `XAML/C#` to `HTML/CSS/JavaScript`. I have tabbed sections which rearrange the focused tab's row to the bottom when clicked. This is automatically performed by the `TabControl` in XAML. --- **XAML/C#** General Focused [![tabs 1](https://i.stack.imgur.com/pGMEn.pn...
2018/03/22
1,608
5,809
<issue_start>username_0: I have one requirement for change password. There is a question dropdown and a textbox for answers. This will be generated dynamically in loop. I am able to generate it with below code: ```html {{myQuest.SecurityQuestion}} ``` I am using two way binding. The problem is that i cannot ide...
2018/03/22
1,171
5,286
<issue_start>username_0: I am leading a large team of azure functions developers. So, most of the examples quoted by Microsoft using the azure web interface don't work for me. I am developing Azure functions locally using emulators to save some costs. I publish all my functions through visual studio into my integration...
2018/03/22
324
1,108
<issue_start>username_0: The `:link` pseudo selector styles elements before they are visited and `:visited` styles them after. Is there any difference between doing: ``` a { border-color: red; } ``` and ``` a:link {border-color: red} ``` ?<issue_comment>username_1: a:link { color:red;}this make the link color r...
2018/03/22
3,201
7,678
<issue_start>username_0: When I visit <http://example.com> or example.com it is redirected to www.example.com at present And I would like to redirect to <https://www.example.com> by using the above Condition flow using .htaccess And below is my current .htaccess ``` RewriteOptions inherit #set link auto on Options...
2018/03/22
497
1,454
<issue_start>username_0: I want to clean out the text of the retailers which have dashes in them. I'm new to R and programming itself, so please help me out here. I know a bit of REGEX in general. ``` mydata = read.csv("test4+.csv", header = TRUE) mydata[,c("Store.Name")] filenames <- c( "test4+.csv", "test4+.csv" )...
2018/03/22
303
964
<issue_start>username_0: I have a piece of php code which will display the current username who has logged in, i want to add this php code to jquery code so that the username can get auto filled. I dont know jquery code to make it possible as i am new to jquery. This is my php code where i can get username: ``` php ...
2018/03/22
464
2,075
<issue_start>username_0: Google says to put the analytics code at the top of your head section. When the page loads this script file can be found from inspecting the page. Just curious, does this matter that people could see this code? Is it secure enough so that if someone wanted to try and hack it, they wouldn't be a...
2018/03/22
1,570
3,908
<issue_start>username_0: I have a sql query and want to replicate in Excel VBA. I am having trouble using multiple case statements example columns ``` column(a) - segment_nbr column(b) - ltv segment_nbr ltv 1 2.1526521 4 3.01348283 1 1.49385324 1 1.84731871 1 1.29541322 1 0.55659018 2 ...
2018/03/22
1,701
5,085
<issue_start>username_0: Image padding inside slick carousel not working. Here is the fiddle: <https://jsfiddle.net/wzf6kaxr/3/> ``` Holatest hola amiogos Holatest hola amiogos Holatest hola amiogos Holatest hola amiogos Holatest hola amiogos Holatest hola amiogos Holatest hola amiogos Holatest hola am...
2018/03/22
2,408
7,324
<issue_start>username_0: Here I want to make an associative array. My code: ``` while($row = mysql_fetch_assoc($mysql)){ $data[] = $row; print_r($row); } ``` print\_r($row); ``` Array ( [employeeTraveld] => 1 [total_Trip] => 23 ) Array ( [employeeTraveld] => 2 [total_Trip] => 9 ) Array ( ...
2018/03/22
1,167
3,331
<issue_start>username_0: I have two array of objects with these properties: ``` const a = [{name: 'Anna',email: '<EMAIL>',flag: false}, {name: 'Kelly',email: '<EMAIL>',flag: true}]; const b = [{name: 'Rana',email: '<EMAIL>',flag: true}, {name: 'Anna',email: '<EMAIL>',flag: true}, {name: 'Hank',email: '<EMAIL>',f...
2018/03/22
889
2,627
<issue_start>username_0: I need some help trying to figure out a quick algorithm that I am struggling to write. Basically I have a list that looks like: ``` season = [[['P1', '3', 'P2', '4'], ['P3', '2', 'P4', '1'], ['P1', '2', 'P3', '5'], ['P4', '2', 'P1', '3']]] ``` Each nested list represents a score ...
2018/03/22
572
2,362
<issue_start>username_0: I'm currently learning about page tables in my operating systems class, and have come across the read-only bit. I understand the use of having the status of the page table being read-only or being read-write, but in lecture, they also mentioned that you could also have a write-only state. It do...
2018/03/22
491
1,832
<issue_start>username_0: I have a JS variable, that defines a DOM element that I want to show somewhere else on the DOM, defined as `var salesRep = $("ul.map").attr("id","1");` And I want to pass it to a function called `show();` So I made ``` function getSalesRep(salesRep){ return salesRep } ``` Then inside ...
2018/03/22
580
2,291
<issue_start>username_0: **issue:** API calls again while scrolling table. Code which I have done : ``` - (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath { ITableViewCell* cell = ( ITableViewCell* )[self.tblNotes dequeueReusableCellWithIdentifier:@"NoteTableCel...
2018/03/22
588
1,672
<issue_start>username_0: Have a Sample Python List as Follows: ``` data = [ ('Jane','dffd','sdas','sdas'), ('Jane','dffd','sdas','sdas'), ('Jane','dffd','sdas','sdas') ] ``` Tried inserting this list onto a My Sql database with tablename 'test' as Follows: ``` import MySQLdb as my db = my.connect() cursor = db.cu...
2018/03/22
1,111
3,159
<issue_start>username_0: I have a csv file(including header) in my local system,on which im trying to perform groupBy function i.e group by purpose and sum of amount per purpose.the commands i've typed on pyspark console are as follows ``` from pyspark import SparkContext, SparkConf from pyspark.sql.types import * fro...
2018/03/22
391
1,225
<issue_start>username_0: I am newly using vuetify. I want to change font-size of button and its label. Directly applying css not working. So i searched for some answer, but those answer are very short. Which i'm unable to apply them. Can anyone help me to explain how do i change font-size in vuetify? TIA Updated: ``...
2018/03/22
754
3,190
<issue_start>username_0: My scenario: Website hosted on the cloud, where each instance creates a subscription to a Service Bus Topic for itself to listen for messages. My question: **How do I programmatically create subscriptions?**<issue_comment>username_1: Original plan for the new Azure Service Bus client was not t...
2018/03/22
798
3,289
<issue_start>username_0: I have used this code to reverse a number but it is not working. ``` var buffer = new Buffer("", "ucs2"); Array.prototype.reverse.call(new Unit16Array(buffer)); return buffer.toString("ucs2"); ``` Where was I wrong? Is this approach right? Any other way of reversing a number/string without u...
2018/03/22
858
3,477
<issue_start>username_0: How to get key value pair from object where any object has some value, I need to check if that key has some value itself like we do in javascript: ``` angular.forEach($scope.openedModel.Roaster, function (value, key) { if (value != null) for (var i = 0; i < value; i++) { ...
2018/03/22
599
2,287
<issue_start>username_0: Here is error when i convert pdf, it's not working since i run my laravel project by "`php artisan serve --port=1000`". But if i run my laravel project with xampp. it's alright. I don't know why?. Give me explaination and repairs . Thank you ``` Symfony \ Component \ Debug \ Exception \ Fatal...
2018/03/22
614
1,749
<issue_start>username_0: If I have a list of lists like so: ``` a = [[1,2,3], [4,5], [1,2], [6,7]] ``` How do I remove list elements such that the nested lists with even a few elements are duplicated are removed? The resulting list should just be: ``` a = [[4,5],[6,7]] ```<issue_comment>username_1: ``` from collec...
2018/03/22
617
1,853
<issue_start>username_0: I want to convert the HTML to PDF for which I am using this package (<https://www.npmjs.com/package/html-pdf>). But in this HTML I am also getting tables and that tables can come in any position in HTML. So I want to copy the table thead to another page if the table in the HTML exceeds more th...
2018/03/22
239
1,045
<issue_start>username_0: I would like to know how do we access an element (for ex -by classname) in JavaScript that is used with run script option in Automation anywhere for a specific website. The normal JavaScript operation with variables work in AA **but if i try using DOM elements it gives error as Document is unde...
2018/03/22
522
2,025
<issue_start>username_0: Is there a mechanism for soft delete at database level in `MySQL` and `Oracle`, Such that:- 1) All delete queries soft delete the data 2) All fetch queries do not fetch the soft delete data without any explicit where condition of filtering out the soft deleted data. 3) All update queries fir...
2018/03/22
886
3,178
<issue_start>username_0: I want to display **Resubmission** and **First Submission** (Both are Claim types) sepeartely based on the value of the related table. So i have used the below query to get both the record seperately. ``` SELECT ROUND(coalesce(SUM(c.ClaimNet), 0), 2) as net, MAX(c.ClaimID), count(c.Cl...
2018/03/22
1,387
4,274
<issue_start>username_0: I'm working on a system and I'm trying to minimize the errors that timezones could introduce and so I'm using timestamp fields on the (postgresql) DB but I use seconds from UNIX epoch when I create the records and when I read the record (use `EXTRACT(EPOCH)` to read, use `TO_TIMESTAMP()` when i...
2018/03/22
483
1,916
<issue_start>username_0: I am making api request with Alamofire.When my api failes it gives html response so alamofire return a error message as below > > Reponse ->FAILURE: > responseSerializationFailed(Alamofire.AFError.ResponseSerializationFailureReason.jsonSerializationFailed(Error Domain=NSCocoaErrorDomain Co...
2018/03/22
298
1,041
<issue_start>username_0: Multiple selectors not working in jquery click event. I've used .merge(). It works for first two selectors. ``` var navLink = $("#carbonNavbar ul li a[href^='#']"); var sideIco = $("#sideIcons a[href^='#']"); var infoTag = $("a.scrl[href^='#']"); $.merge(infoTag, navLink, sideIco).on('click',...