date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/22
414
1,167
<issue_start>username_0: I want ABCD on the left and DATE should be in the center. How to achieve this? ```css .flex-items { display: flex; justify-content: flex-start; padding-left: 17px; } .abcd1 {} .date1 { /*this item should be in the center.*/ } ``` ```html ABCD DATE ```<issue_comment>use...
2018/03/22
495
1,772
<issue_start>username_0: > > I'm not using sqlite3 gem > > I'm using mysql2 gem > > > I'm retrieving data from MySQL database given that it meets the condition of a certain `event type` and `severity`. However, it returns only one row instead of an array of results. It really puzzles me. Shouldnt .map return a...
2018/03/22
1,001
3,554
<issue_start>username_0: I ama noob in to flutter and is now experimenting with flutter. I was trying to implement a splashscreen. My requirements: * The flash screen should appear 3 seconds at the time of app launch. * It should disappear after 3 seconds. * It should show a progress bar at the time of displaying and ...
2018/03/22
1,144
4,194
<issue_start>username_0: I need to return form the text template key value which will be like comment and command like following ``` #Description for npm install npm install #Description for test npm test #Description for test2 run test2 ``` For that I've created a function like the following: ``` // ...
2018/03/22
1,080
4,172
<issue_start>username_0: I have taken the full snapshot from a node. I have copied the snapshot directory and placed in the `/var/lib/cassandra/data/Keyspace/Tables/` directory in the restoration node. I have tried both restarting the service and also tried using `nodetool refresh` command for restoring the data in new...
2018/03/22
1,007
3,865
<issue_start>username_0: I am using mat-auto complete component from material.angular.io. The default behavior is user can input any value as well as it gives options to choose from. Also you can add your input to chosen values. You can check example here. <https://stackblitz.com/angular/ngmvgralayd?file=app%2Fautoco...
2018/03/22
991
3,704
<issue_start>username_0: Is it possible to load UI (Static content) of an embedded jar? Example I have a fat jar `main.jar` which runs(UI as well) on `localhost:8080` . Within `main.jar` I have another jar `b.jar` embedded. `b.jar's` static content is an Angular JS application, which I want to load while launching `mai...
2018/03/22
614
1,939
<issue_start>username_0: For tuples we can use the star unpacking to throw everything we don't need into a `_` or similar, e.g. like so ``` some_tuple = ("obj1", "obj2", "obj3", "obj4") obj1, *_ = some_tuple print(obj1) ``` So now I don't need to worry about the number of elements. I only want the N first. If I mad...
2018/03/22
775
2,337
<issue_start>username_0: Having this input: ``` myArray = [ {name: "name1", id: 1, parameters: ["first", "second"]}, {name: "name2", id: 2, parameters: ["first"]}, {name: "name3", id: 3, parameters: ["first", "second"]}, ]; ``` I want to put it on a table to look similar to this: ...
2018/03/22
541
1,765
<issue_start>username_0: I have metrics sas table like below ``` work.met_table Metrics_Id Metrics_desc 1 Count_Column 2 Sum_Column 3 Eliminate_column ``` I wanna do something like doing while loop in T-sql ``` select count(*) :cnt_tbl from work.met_table %let init_cnt = 1 while...
2018/03/22
421
1,493
<issue_start>username_0: I have an IAM SSL certificate attached to an ELB. It is about to expire in a day or two. I know I can create a new certificate and upload it to use this but this will affect my clients who are already using my application.They would be requiring to install the new certificate which they aren't ...
2018/03/22
597
1,808
<issue_start>username_0: I have a question as i write on title. I'll explain it with examples. There is a txt file which is looks like, > > This offense was closed with reason: Non-Issue. Notes: There is no > suspicious situation. u0t9231 21 Mar 2018 10:38:46 > > > This offense was closed with reason: Non-Issue. ...
2018/03/22
528
1,872
<issue_start>username_0: I cannot understand why **in the arrow functions** we do not need to wrap the literal of arrow function in the `({})` braces, instead of in this example the literal just wrapped in the single `()` braces. Why? I had surfed the internet to find an answer on it, but it failed. And also why we p...
2018/03/22
872
3,242
<issue_start>username_0: How can I generate records for elasticsearch? I would like to generate at least 1 million records to test the memory size. ``` const now = new Date() const startOfDay = new Date(now.getFullYear(), now.getMonth(), Math.random(now.getDate())) const timestamp = startOfDay / 1000 const randomReco...
2018/03/22
492
1,962
<issue_start>username_0: I have a custom php file (myform.php) inside my theme folder that contains custom form with behavior defined in javascript. I've created a new page in wp dashboard, and I've assigned MyForm as page template. There is a lot of custom logic regarding that form. This form calculates something base...
2018/03/22
838
2,424
<issue_start>username_0: here is [demo fiddel](http://jsfiddle.net/jkwvus8u/5/), need line chart start from first column left border to last column right border like image below [![enter image description here](https://i.stack.imgur.com/LmF1O.png)](https://i.stack.imgur.com/LmF1O.png) in demo fiddel it is start fo...
2018/03/22
1,631
6,450
<issue_start>username_0: I am trying to setup replication of encrypted objects to an S3 bucket in a different region. When doing this, I will need to specify one or more KMS keys to be used to decrypt the *source* object. I am using the following Terraform script: ``` replication_configuration { role = "${aws_iam_r...
2018/03/22
831
1,878
<issue_start>username_0: I have four point like ``` P1A (10,9) P1B (10,10) P2A (11,10) P2B (11,9) ``` This shows the `LineA(from P1A ~ P2A)` and `LineB(from P1B ~ P2B)` Now,I would like to get the angle of two lines. In this case, angle must be 90 degree. How can I get the angle by programming?? I am glad If ...
2018/03/22
660
2,233
<issue_start>username_0: I am working on Spark SQL using Scala. I have a requirement where I need first convert the o/p of each query to double and then divide them.This is what I tried. Query1 - ``` scala> var noofentry = sqlContext.sql("select count(*) from bankdata") noofentry: org.apache.spark.sql.DataFrame = [c...
2018/03/22
549
1,812
<issue_start>username_0: I'm new to stored procedure when I query without stored procedure it's working fine, but when I run the stored procedure it shows error. > > **ERROR 1690 (22003): BIGINT UNSIGNED value is out of range** > > > ``` DELIMITER ;; DROP PROCEDURE IF EXISTS sp_price; Create Procedure sp_price(...
2018/03/22
752
2,758
<issue_start>username_0: I've read some qestions about errors in redux but still not quite understand it. For example in my app I have `activeUser` reducer where I store `null` or `object` with logged user. It listens to `actions` and changes its state if needed. Simple. But how `errors` reducers should work and look...
2018/03/22
857
3,563
<issue_start>username_0: I want to import some tables from a postgres database into Elastic search and also hold the tables in sync with the data in elastic search. I have looked at a course on udemy, and also talked with a colleague who has a lot of experience with this issue to see what the best way to do it is. I am...
2018/03/22
1,189
4,218
<issue_start>username_0: I am using async and await for achieving this. Following is my code and it is working as expected. ``` function publish() { return new Promise(function (resolve, reject) { setTimeout(function () { resolve("SUCCESS"); }, 3000); }); } var res; async function sendRequest()...
2018/03/22
863
3,278
<issue_start>username_0: I was wandering, is there a property, to which I can attach a listener, that represents the action of "When the list view starts to show the ScrollBar"? The thing is, that I have an output to the ListView, and at some point the ListView's scrollBar triggers. I want to capture that event and sc...
2018/03/22
752
2,641
<issue_start>username_0: I have a data frame with a column that contains long text, and I would like to split it every 30 words, creating the necessary new rows with exactly the same contents in the other columns. The character solution does not work as I need it to work, and that is why I am posting this different que...
2018/03/22
1,797
5,364
<issue_start>username_0: I want to align three items in a flexbox like this. The context is that these are unknown-length (but wrappable) labels for an unknown-width (unwrappable) slider/row of buttons in a survey. `[L] [R] [variable width]` How do I align the top two items to the width of the lower/*middle* item wit...
2018/03/22
743
1,828
<issue_start>username_0: Sample: ``` df1 = pd.DataFrame({'a':list('ab'), 'b':[[1,2],[4,5]]}) print (df1) a b 0 a [1, 2] 1 b [4, 5] df2 = pd.DataFrame({'c':list('cd'), 'b':[[1,7],[4,5]]}) print (df2) b c 0 [1, 7] c 1 [4, 5] d ``` I try merge by column `b` with `list`s: ``` df = pd.merge(df...
2018/03/22
633
1,891
<issue_start>username_0: I have two objects : channel and tag a with many-to-many relation. A channel can have multiple tags, and a tag can have multiple channels. So I have three tables: -channel table -tag table -junction table On the channel page, there will be the list of the tags linked to it. I also wa...
2018/03/22
1,305
4,371
<issue_start>username_0: Let's say ``` a = {1:2, 3:4, 5:6} ``` Is there a builtin function (maybe something like `a.get2(7,5))` that will return `a[7]`, or `a[5]` if `a[7]` doesn't exist? Such function can be defined easily as `a.get(val, a.get(def_key))` but would prefer a builtin solution if exists.<issue_commen...
2018/03/22
717
2,646
<issue_start>username_0: I have an ASP.net MVC application hosted on pivotal cloud foundry. As a space developer, I have access to Apps Manager tile, and the cf CLI. Is it possible to attach a remote debugger to my application running in the windows container? I have found that it is possible for a linux stack on clou...
2018/03/22
327
1,244
<issue_start>username_0: I'm trying to design an overlay screen in `Nativescript`. I need a half-transparent screen with full transparency that shows what the user needs to do. Is there any default plugin available or layouts?<issue_comment>username_1: ``` ``` Upvotes: 0 <issue_comment>username_2: ``` ``` By defaul...
2018/03/22
562
1,985
<issue_start>username_0: This is a function in python3 that prints 1 through 10. There are a few things I don't understand about this, since I'm a programming noob. This function will subtract 1 from a given number as long as that number is above 1. So if number = 10 it will subtract 1 from 10 to give 9 and then 1 fro...
2018/03/22
327
1,216
<issue_start>username_0: I have the following column in SQLAlchemy: ``` name = Column(String(32), nullable=False) ``` I want that if no value is passed onto an insertion, it should enter a default value of either completely blank or if not possible, then default as NULL. Should I define the column as : ``` name = ...
2018/03/22
1,027
2,624
<issue_start>username_0: I have to tranform url's entered in plain text into html hrefs and I want to find multiple urls. This: `Hi here is a link for you: http://www.google.com. Hope it works.` Will become: `Hi here is a link for you: <http://www.google.com>. Hope it works.` Found this code: ``` public String tr...
2018/03/22
1,030
2,492
<issue_start>username_0: Consider the analysis of the 1st sentence from Wikipedia page of <NAME>: <http://localhost:8983/solr/#/trans/analysis?analysis.fieldvalue=Albert%20Einstein%20(14%20March%201879%20%E2%80%93%2018%20April%201955)%20was%20a%20German-born%20theoretical%20physicist%5B5%5D%20who%20developed%20the%20t...
2018/03/22
1,014
2,885
<issue_start>username_0: I'm testing a function that will make 2 calls to a mongo database, each one with different arguments. The function is called 'saveAchProgress' and will make 2 'updateOne' requests to db. I'm using a mock cause I need to spy the function AND block the db calls at he same time (not connected to ...
2018/03/22
1,364
4,739
<issue_start>username_0: I am trying to write a string in my pdf file creating using apache pdfbox. I have used ISO-8859-1 as encoding with UTF-8. but still, it is printing question mark. Tried a lot and looked for solutions on the internet(StackOverflow). Could someone please help. Thanks in advance ``` public class ...
2018/03/22
1,579
4,787
<issue_start>username_0: I have a PHP array with an unknown amount of values, technically it can go on forever. But I would like to have a sum of values after 7 values. Example: sum of: $array[0], $array [7] and so forth. Starting with 0 and 7th, 14th, etc. This issue has been a headache for me, I am a beginning php ...
2018/03/22
423
1,348
<issue_start>username_0: What is the difference between in php function * A parameter passage by **variable** * A parameter pass by **reference**?<issue_comment>username_1: The best way to understand it is from an example: ``` function foo($a) { $a = 123; echo "Value in function: " . $a; } function bar(&$a) { ...
2018/03/22
405
1,295
<issue_start>username_0: I am getting the following error while creating the angular4 new App. **Error:** ``` Error: Path "/app/app.module.ts" does not exist. Path "/app/app.module.ts" does not exist. ``` I have node version `9.4` and `angular-cli version 1.7.1` and when I type like below. ``` subrajyoti@subrajyo...
2018/03/22
377
1,214
<issue_start>username_0: ``` import boto3 s3 = boto3.resource('s3') for bucket in s3.buckets.all(): print(bucket.name) ``` but this code does not work, how to import my AWS credentials so that this will return correct output? > > **error :** botocore.exceptions.EndpointConnectionError: Could not connect > to t...
2018/03/22
890
3,458
<issue_start>username_0: I use a third party library for which i need to change a constant. I would like to customize the library without overwriting the file. The pas file is a library file, not an inheritable class. Currently i can achieve my goal by editing the file ``` unit libraryconstants; interface uses Sy...
2018/03/22
723
2,608
<issue_start>username_0: I've been using FlatList a lot of times, and never had such experience.I'm having one view with an image on top on of a page and my list is below.When I try to scroll, list bounces to the top. Can not find a good solution for this. Here is my list: ``` index} /> renderDetailsItem({ ite...
2018/03/22
451
1,795
<issue_start>username_0: In my ionic 3 application, i want to add dynamic content in splash screen so that i can show current version of my application in the splash screen, what should i do?<issue_comment>username_1: You need to use the [ScrollView](https://facebook.github.io/react-native/docs/scrollview.html) Upvotes...
2018/03/22
475
1,685
<issue_start>username_0: I know this question has been asked a lot already, but although I've been searching for days now I didn't find a suitable answer. We are running Coldfusion 9 Standard with JDK 1.7. I'm trying to perform a request with cfhttp, following code: ``` ``` I get the following when dumping out the ...
2018/03/22
2,782
6,337
<issue_start>username_0: I produced a dynamic pivot with the following query which work but the column (monthyear) are in alphabetical order but I want them in chronological order The monthyear column is derived using a function in SQL Server 2014 ``` CREATE TABLE ##MyTable (Num VARCHAR(10), StartDate DATE, [Types]...
2018/03/22
331
1,237
<issue_start>username_0: I currently have this: ``` Press Here For Instructions ``` Followed by: ``` function ins() { document.write("(write instructions)") document.getElementById("demo").innerHTML = ins; } ``` My issue is it goes to a new page when the function runs, how do i keep it on the same page?<issue_c...
2018/03/22
1,212
3,606
<issue_start>username_0: I have a "Response" content : [![enter image description here](https://i.stack.imgur.com/PI9FH.png)](https://i.stack.imgur.com/PI9FH.png) But I can't console.log it. Update (15:00 22/03/2018, this is new version) : in actions.component.ts : ``` generatePOR(){ this._api.exportToERP(thi...
2018/03/22
579
2,004
<issue_start>username_0: I've got an Azure Hybrid Application [On-Premise SQL DB & Azure WebApp].I've created an Azure Hybrid connection manager with endpoint w.r.to my On-premise DB in Windows10 machine. The Status of my hybrid connected shows **Not Connected** Any help on this would be of great help[![Hybrid Connect...
2018/03/22
711
2,279
<issue_start>username_0: I am trying to push a host file to my adb device. So, I did: ``` [~/Library/Android/sdk/tools]$ emulator -avd Nexus_5X_API_26_x86 -writable-system emulator: WARNING: System image is writable emulator: ### WARNING: /etc/localtime does not point to /usr . /share/zoneinfo/, can't determine z...
2018/03/22
667
2,167
<issue_start>username_0: I can't figure out why I get a foreign key mismatch with the sqlite below: ``` PRAGMA foreign_keys=ON; CREATE TABLE a ( id INT NOT NULL, PRIMARY KEY (id)); CREATE TABLE b ( a_id INT NOT NULL, id INT NOT NULL, PRIMARY KEY (a_id, id), FOREIGN KEY (a_id) REFERENCES a(id)...
2018/03/22
1,220
3,614
<issue_start>username_0: I am working on drawing dxf files in Java. So far I am able to draw, `LINES`, `POLYLINES`, `TEXT`, `CIRCLE`, `ARC`, `LWPOLYLINES`. But I am having problems on drawing `INSERT` entities. I know this is mapped to block entities but when I draw them nothing get displayed. I understand you have to...
2018/03/22
398
1,468
<issue_start>username_0: I'm trying to add my package in doze whitelist. With `($ adb shell dumpsys deviceidle whitelist +PACKAGE)`, I can add my package in whitelist, and this command makes change in the **`file /data/system/deviceidle.xml.`** Now, I'm curious about who generate `deviceidle.xml.` Is there anyone w...
2018/03/22
505
1,936
<issue_start>username_0: How to do these check via powershell. I have some resources like 1. FunctionApp 2. FunctionAppService 3. EventHub Namespace 4. Storage Account 5. ServiceBus [![enter image description here](https://i.stack.imgur.com/vuE84.png)](https://i.stack.imgur.com/vuE84.png) I am able to verify the Ev...
2018/03/22
688
1,833
<issue_start>username_0: I want to interleave `interElem` after every 2 list elements. ### Data: ``` listi <- c(rbind(letters[1:4], list(c(13,37)))) interElem <- c("inter","leavistan") ``` looks like: ``` > listi [[1]] [1] "a" [[2]] [1] 13 37 [[3]] [1] "b" [[4]] [1] 13 37 [[5]] [1] "c" [[6]] [1] 13 37 [...
2018/03/22
317
1,065
<issue_start>username_0: Using SQL in PostgreSQL I need to select all the rows from my table called "crop" when the first digit of the integer numbers in column "field\_id" is 7. ``` select * from crop where (left (field_id,1) = 7) ```<issue_comment>username_1: First, you know that the column is a number, so I would ...
2018/03/22
1,441
3,872
<issue_start>username_0: I am trying to extract the json content in my javascript by running it but I am not getting the desired output My JSON is of the form ``` var json = [{ "html": "abc.jpg", //testing this failed "col": 1, "row": 1, "size_y": 2, "size_x": 2 }, { ...
2018/03/22
824
2,315
<issue_start>username_0: I'm trying to re-write a python algorithm to Java for some needs. In python algorithm I have the following code : ``` row_ind, col_ind = linear_sum_assignment(cost) ``` `linear_sum_assignment` is a [scipy function](https://docs.scipy.org/doc/scipy-0.18.1/reference/generated/scipy.optimize.l...
2018/03/22
1,362
4,299
<issue_start>username_0: I am trying to setup code coverage on our **ASP.NET Core 2.0** web application. I use **dotcover** (from JetBrains) to provide code coverage on all my other builds (by running dotcover from the command-line during the build process). When I run dotcover from our build server for our .NET Core ...
2018/03/22
1,166
4,216
<issue_start>username_0: I'm using inline formsets in Django, and for each item showing one "extra" form, for adding another object. The forms for existing objects have "Delete" checkboxes, for removing that object, which makes sense. But also the "extra" forms have these "Delete" checkboxes... which makes no sense b...
2018/03/22
1,195
4,151
<issue_start>username_0: ``` #include using namespace std; ``` I want the user to input two char sequences (such as adc and abd) and the program will tell them that the characters are equal as a whole or not.(the output now would be FALSE ) I am not sure what to do with declaring my char variables. ``` char x[100]...
2018/03/22
616
2,294
<issue_start>username_0: I have a customer who likes to do some basic stuff in Domino Designer in a specific database. He only works with Forms, agents etc and never do any Xpages stuff. I have done all the xpages stuff in the Database. This morning when I opened designer I can see that almost all of the xpages design...
2018/03/22
376
1,573
<issue_start>username_0: The code below runs however when I go to run the application in an android emulator the application will open then close immediately .I am an android programming beginner thankyou the code in question is below ``` login.setOnClickListener(new View.OnClickListener() { @Override ...
2018/03/22
291
988
<issue_start>username_0: I was trying to check the length of second field of a TSV file (hundreds of thousands of lines). However, it runs very very slowly. I guess it should be something wrong with "echo", but not sure how to do. Input file: ``` prob name 1.0 Claire 1.0 Mark ... ... 0.9 GFGKHJGJGH...
2018/03/22
1,164
4,874
<issue_start>username_0: I am trying to use PDF.js to view PDF documents. I find the display really low resolutions to the point of being blurry. Is there a fix? [![enter image description here](https://i.stack.imgur.com/3UVjA.jpg)](https://i.stack.imgur.com/3UVjA.jpg) ``` // URL of PDF document var url = "h...
2018/03/22
477
1,762
<issue_start>username_0: I'm trying to show user group name instead of it's id . I have this serilizer class for user class and I used this `User = auth.get_user_model()` for user Model but it show NULL instead of theier name .. when i delete get\_groups function i will see related groups id why ? what is correct ...
2018/03/22
559
1,713
<issue_start>username_0: I am trying to take latitude and longitude values from cllocation. Its coming full location data. Since I need only latitude and longitude data to send my back end. I have to send multiple latitude and longitude data to server. Even I tried with CLLocationCoordinate2D, but, its taking CLLocati...
2018/03/22
496
1,677
<issue_start>username_0: I am trying to execute the below code in pycharm. ``` def auth_login(func): def wrapper(*args, **kwargs): print("Authenticating......") func(*args, **kwargs) return wrapper() @auth_login def login(username, password): print("Successfully logged in:",username) logi...
2018/03/22
1,324
4,823
<issue_start>username_0: Sorry for this such long pot but I need help here. I am new to Android World and follows the book "Android Development" by <NAME> (The Big Nerd Ranch). All goes well but now I got stuck. When I run my application, it crashes with this line of code ``` String text = Integer.toString(question); ...
2018/03/22
1,031
3,771
<issue_start>username_0: It has been already clarified what's the difference between `val` and `const val` [here](https://stackoverflow.com/questions/37595936/what-is-the-difference-between-const-and-val). But my question is, why we should use `const` keyword? There is no difference from the generated Java code perspe...
2018/03/22
1,167
4,133
<issue_start>username_0: I am uploading product programmatically in Magento2 I have same name product with different SKU but when I run script Magento 2 gives an error because of Url Key : `Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'reine-de-naples-jour-nuit-8998.htm...
2018/03/22
701
2,268
<issue_start>username_0: Is there a simple way to escape all occurrences of `\` in a string? I start with the following string: ```cpp #include #include std::string escapeSlashes(std::string str) { // I have no idea what to do here return str; } int main () { std::string str = "a\b\c\d"; std::cout << escapeSl...
2018/03/22
1,557
5,123
<issue_start>username_0: How to call a nested Rails route from Ember app if I don't need nested templates ? I have the following routes in Rails router: ``` # routes.rb resources :shops do resources :shop_languages end ``` So to get a list of shop languages the `shops/:shop_id/shop_languages` should be hit. Here ...
2018/03/22
1,986
7,237
<issue_start>username_0: I have used `ReactDOM.createPortal` inside the render method of a stateful component like so: ``` class MyComponent extends Component { ... render() { return ( {ReactDOM.createPortal(, 'dom-location')} ) } } ``` ... but can it also be used by a stateless (funct...
2018/03/22
2,153
7,771
<issue_start>username_0: ``` // int c = 1; public System.Windows.Forms.Button AddNewButton() { System.Windows.Forms.Button btn = new System.Windows.Forms.Button(); this.Controls.Add(btn); btn.Top = 350; btn.Left = c * 80; btn.Text = "" + this.c.ToString(); ...
2018/03/22
1,809
3,806
<issue_start>username_0: I tried to filter some signal with fft. The signal I am working on is quite complicated and im not really experienced in this topic. That's why I created a simple sin wave 3Hz and tried to cut off the 3 Hz. and so far, so good ``` import numpy as np import matplotlib.pyplot as plt from scipy....
2018/03/22
279
1,053
<issue_start>username_0: Is there an easy, built-in way to monitor threads of an Java app in AWS? Like thread count, running time, etc. Or do I need a profiling tool? Can I see thread metrics in AWS X-RAY or is there a way to export JVM metrics to cloudwatch?<issue_comment>username_1: Cloudwatch monitoring cannot see ...
2018/03/22
483
1,673
<issue_start>username_0: I'm calling a REST WS with a JSON payload to subscribe certains events. The server answer with HTTP-Code 201 and a field named **Location** in the HTTP-Header with the ID of the subscription. As an example, in curl (-v) we get: ``` [...] < HTTP/1.1 201 Created < Connection: Keep-Alive < Conte...
2018/03/22
792
2,398
<issue_start>username_0: Suppose I have a list of elements: ``` my_list = ['CatA', 'CatB', 'CatC', 'CatA', 'CatA', 'CatC'] ``` and I want to convert this list to a list of indexes of unique elements. So `CatA` is assigned to index 0, `CatB` to index 1 and `CatC` to index 2. My desired result would be: ``` result ...
2018/03/22
627
1,955
<issue_start>username_0: We have tried approach mentioned in the [IBM developers works](http://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/application-development/sdk/web/) to add the MobileFirst Web SDK. We have created Angular 5 web application and added Web SDK into it. After that, we are not able t...
2018/03/22
808
2,536
<issue_start>username_0: Say I have streaming text data coming in to my Bash script, with one record per line, and I want to append to each line some function of that line and spit that to `stdout`: ``` record1 record1 fn(record1) record2 -> record2 fn(record2) ... ... ``` This would be relatively ...
2018/03/22
347
1,344
<issue_start>username_0: We host a CakePHP site for someone. They would like to change the password for their account and unfortunately the original developers didn't build this functionality into the site so I was going to update the password in PHPMyAdmin. I have tried entering the password and then hashing it using...
2018/03/22
354
1,297
<issue_start>username_0: I'm facing an issue with a textbox to only allow whole numeric value, not dot/decimal value in razor view. I looked around SO but unfortunately I can't find an answer. JavaScript validation exists for *accept numeric value with dot*, but I want without dot/decimal. cshtml: ``` @Html.TextBox...
2018/03/22
1,011
2,665
<issue_start>username_0: Let's say I have a 4x3 linear array of integers stored in row-major order. The layout (indexes) are shown below. Let's say the value at each index is the same as the index. ``` 00 01 02 03 04 05 06 07 08 09 10 11 ``` I can loop through this array as follows: ``` for(int y = 0; y < 3; ++y) ...
2018/03/22
332
1,216
<issue_start>username_0: I been trying to find a way to loop through each rows of a table using foreach loop. is that something possible? I am not asking for an alternative of foreach loop, I am wondering if I can loop using foreach, I know I can do other ways, so please keep that in mind when trying to answer. I hav...
2018/03/22
617
2,637
<issue_start>username_0: Here i am using bhar chat onloading it is working , my question is onclick the button also i want to call the same function , from this code where they are calling the function i am not able to get, if any one know means update my snippet.which purpose i am asking means clicking button that tim...
2018/03/22
452
1,697
<issue_start>username_0: I am new to Kong. I am using Kong version 0.12.1. I have configured my api with Kong using basic-auth and it works as per the [document](https://getkong.org/docs/0.11.x/admin-api/), I am able to GET the host url with authentication using Kong Proxy in command window curl -i -X GET --url <https...
2018/03/22
350
1,359
<issue_start>username_0: In My Project I have a Two Buttons 1.`click here` button 2.`save` button First i need to display only `click here` button, when user click `click here` button then `save` button will need to display on ionic3<issue_comment>username_1: From your description, it sounds like you ***have*** sec...
2018/03/22
1,014
3,440
<issue_start>username_0: I am currently trying to update a workbook connection which has the format of Messergebnisse-2018-3-22 and I link a file everyday, so id like to update the most recent connection only. This is the code I have been using, but it always comes up with an error: ``` Sub Refresh() Dim LDate ...
2018/03/22
760
2,757
<issue_start>username_0: im trying to filter the articles i have in my program to a search in jquery that is working, the problem is that i only want it to search in a determineted div but instead this is searching tro all my articles, like if i search in the div "processador", this is searching in "grafica" for exampl...
2018/03/22
514
1,945
<issue_start>username_0: Is it possible to check if an ApplicationUser has a Claim? I know it is possible to check if an ApplicationUser is in a role ``` userManager.IsInRoleAsync(applicationUser,"admin"); ``` And i know it could be possible to check if a user has a Claim like this: ``` userManager.GetClaimsAsync(...
2018/03/22
627
2,175
<issue_start>username_0: I have a div that is a css grid container. When the page width drops below a certain size, I would like all elements of the grid to be placed on a line. I think you should be able to change the display type to flex box, I tried doing this and the grid stays the same. Here is the code I am using...
2018/03/22
691
2,186
<issue_start>username_0: I'm getting an error using amazon advertising API. I'm currently trying to request performance report using `https://advertising-api.amazon.com/v1/campaigns/report`. But the server reply `Cannot consume content type` here is my request header and body. End point : `https://advertising-api.ama...
2018/03/22
505
1,551
<issue_start>username_0: My Dataset looks like that: ``` { "A_asdsd" : "1", "A_fghf" : "1", "B_tzzz" : "1", "B_ghh" : "1",.... } ``` How do I have to specify my find() Function, that all fields that start with A\_ are excluded? (There are thousand of them).<issue_comment>username_1: Just copy the body from the docum...
2018/03/22
470
1,567
<issue_start>username_0: I'm trying to make tests with a different variation of data but with the same test case (JUnit, Selenium). I just want to know if there is any way to have the result of each set of data individually as if a set of data failed I want to know which one.<issue_comment>username_1: Just copy the bod...
2018/03/22
786
2,929
<issue_start>username_0: I'm trying to momentjs to format dates in my component controllers where matInput datepicker components are used, but I'm getting the following error in the console when I try to load pages where these are present: > > Error: MatDatepicker: No provider found for DateAdapter. You must import o...
2018/03/22
1,992
5,862
<issue_start>username_0: I am building Apache Zeppelin 0.8.0 from maven and I have to use advanced features provided by Zeppelin e.g. Apache Zeppelin Notebook Authorization allow "Runners" But I am trying while different versions of node and npm but still getting the following error during `mvn clean package -DskipTes...
2018/03/22
525
1,875
<issue_start>username_0: I have one url that passes a parameter through the `as_view` function: ``` url( r'^$', ChangeListView.as_view( columns=('username', 'email') ), name="user-list" ), ``` When i try to access the columns attribute in the view it returns None instead of the tuple that i h...
2018/03/22
735
1,992
<issue_start>username_0: The idea is as follows: Suppose I have a list `P = [(1,0),(4,3)]` or similar. I want to evaluate the polynomial that's defined by this list in the manner: `1X^0 + 4X^3`. To do this, I've written the following: ``` evaluate(P,X,Y) :- evaluate(P,X,Y,0). evaluate([],_,S,S). evaluate([P1,P2|Ps],...
2018/03/22
507
2,058
<issue_start>username_0: how to start third activity if url is same in webview for example i have webview in my webview if url is like this <http://example.com/access.html> then start thirdactivity how can i do this please help me to fix this issue thanks in advance here is my webview code ``` public class Se...