date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/12
461
1,581
<issue_start>username_0: I have a `VerticalViewPager` where each child fragment contain something like ``` ... ... ``` When `MyScrollView` is scrolled to the bottom, I'd like the `VerticalViewPager` to kick in and do its magic. Likewise if I scroll the `MyScrollView` to the very top. I've experimented a bunch ...
2018/03/12
578
1,678
<issue_start>username_0: I would like to get a list with the dates of the second purchase only I have the following list: ``` Order_id User_id Purchase_date 1 1 01/01/2018 2 1 02/01/2018 3 1 02/01/2018 4 2 ...
2018/03/12
1,717
4,018
<issue_start>username_0: I have a dataframe (tibble) with multiple columns, and for each column after the first two I'd like to keep the absolute value, but also insert the value relative to the second column. For example, I start with the following data frame (the column names might vary!): ``` df = tibble(val1 = 5:1...
2018/03/12
702
3,130
<issue_start>username_0: I red many posts here on stackoverflow and searched online but still haven't found a solution that works for me. I have 2 applications - the first is using web forms and the other uses MVC. I know that MVC supports data annotations on model fields so it spares me from maintaining validations a...
2018/03/12
881
3,001
<issue_start>username_0: Hi i am trying to build APK but iam Facing this problem in Android Studio. > > Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zza...
2018/03/12
724
2,172
<issue_start>username_0: I have the following string: ``` a <- "2015,,,,6GR,09,PRIVATE,NP,001" ``` I would like to add "YES" between each comma. So I'd like to have the following output: ``` "2015,YES,YES,YES,6GR,09,PRIVATE,NP,001" ``` I tried the following line: ``` gsub("([,])([,])", "\\1YES\\2", a) ``` But ...
2018/03/12
765
1,930
<issue_start>username_0: Sample data ``` dat <- data.frame(year = as.factor(rep(c(2012:2015),each = 6)),id.2wk = rep(c(18,19,20,21,22,23),times = 4), value = c(1.8,15.6,32.9,27.5,19.6,2.6,1,8,42,35,11,3,2,7,12,47,26,7,2,13,24,46,12,4)) with(dat, plot(id.2wk[year == 2012], cumsum(value[year == 201...
2018/03/12
629
2,254
<issue_start>username_0: I am using jQuery to attach an on click handler for one of my drop down modals. I use the same syntax to open the modal, and it works fine. But when I want to close the modal the on click does not seem to work. ```js // When the user clicks the button, open the modal $("#requestQuoteNavMap")....
2018/03/12
1,410
4,260
<issue_start>username_0: I have an array that consists of many stdClasses after doing a json\_decode on a json string. **It looks like this:** ``` product: array(3) 0: stdClass PropertyAbc: "Product 1|Product 5" 1: stdClass PropertyXyz: "Product 2|Product 9|Product 10" 2: stdClass PropertyEfg: "Product 3|Pro...
2018/03/12
1,360
3,723
<issue_start>username_0: I have several servers. Hybris is installed on each one and I would like to be able to choose the background color of the HAC based on the environment in which I am. Example: * Development environment = BLUE color * Test environment = GREEN color * Production environment = RED color How can...
2018/03/12
806
3,124
<issue_start>username_0: I am trying to inject a service into an HttpInterceptor, here is the simple service ``` import { Injectable } from '@angular/core'; @Injectable() export class LoginLoadingService { constructor() { } public loaded: boolean; isLoaded() { if (this.loaded === undefined) { ...
2018/03/12
2,346
9,037
<issue_start>username_0: I am new in Flutter. I am looking for TextField value to always uppercase but I did not find any resource on that. Another issue is the TextField onChanged event debounce implementation. When I type on TextField it immediately fires **onChanged** event which is not suitable for my goal. The on...
2018/03/12
777
2,165
<issue_start>username_0: I have a data structure as below: ``` { oldPics: { [title: 'dog', url: 'www.dog.com'], [title: 'cat', url: 'www.cat.com'], [title: 'bird', url: 'www.bird.com'], }, newPics: { [title: 'fox', url: 'www.fox.com'], [title: 'lion', url: 'www.lion.com'], }, archivedP...
2018/03/12
972
3,380
<issue_start>username_0: I am trying to configure Gitlab CI for my dockerized Symfony project. In the test phase, I try to start my docker-compose.yml, where one service needs a bind mount. My runner **does see** the folder, but I cannot use it. I get as test output: ``` $ docker-compose -f docker-compose_deploy.yml ...
2018/03/12
464
1,718
<issue_start>username_0: I have a JS code that filters the list with an input field. Currently, the filter is a case sensitive. For example, if you have "item1" you have to type the exact word to filter. ``` $(function(){ $('input.search').keyup(function(){ var searchText = $(this).val(); $('ul...
2018/03/12
712
2,267
<issue_start>username_0: Why does While loop post-increments (or post-decrements) a variable right after examination of the condition and not after the whole loop? As in: ``` int x = 0; while (x++ < 5) Console.WriteLine(x); ``` The output is: 1 2 3 4 5, when I believe it should be 0 1 2 3 4. It seems it checks the...
2018/03/12
399
1,074
<issue_start>username_0: I'm just trying to get the sum of money from a column. ``` SELECT SUM(amount_usd) FROM WIRE_MSTR, TRANS_MSTR INNER JOIN WIRE_MSTR ON WIRE_MSTR.trans_id = TRANS_MSTR.trans_id WHERE WIRE_MSTR.dest_cntry = 'CANADA' AND TRANS_MSTR.trans_yyyymm = '201510'; ``` But on line 4 I get an error "ORA-00...
2018/03/12
793
2,072
<issue_start>username_0: Similar to [this](https://stackoverflow.com/questions/42488048/javascript-sum-of-two-object-with-same-properties) question asked previously, is there an easy way to sum two objects, or an array of objects, by key in Lodash? ``` { a:12, b:8, c:17 } ``` and ``` { a:2, b:3, c:1 } ``` should ...
2018/03/12
1,617
4,787
<issue_start>username_0: I have this kind of hierarchy in the class design: [![enter image description here](https://i.stack.imgur.com/K6RKT.png)](https://i.stack.imgur.com/K6RKT.png) What i wanted to achieve is the most versatile class design that will be flexible enough to cover all the cases. As you can see in t...
2018/03/12
1,130
4,504
<issue_start>username_0: The server is sending video frame. I would like to use them in order to do a streaming. I wonder how I could assemble the frames to create a streaming video. So far, I could display the frames as pictures. Below is my angular code **component angular** ```js getVideo() { interval(250).sw...
2018/03/12
708
2,488
<issue_start>username_0: I want to check if a value is -1 or less than another value. In order to do that, I've done the following: ``` def isValidWord(word, hand, wordList): """ Returns True if word is in the wordList and is entirely composed of letters in the hand. Otherwise, returns False. Does no...
2018/03/12
215
762
<issue_start>username_0: How can I limit the following query to return for only tables in the database and exclude views? ``` USE [Database Name] SELECT * FROM INFORMATION_SCHEMA.COLUMNS ```<issue_comment>username_1: Join it to sys.Tables: ``` SELECT c.* FROM INFORMATION_SCHEMA.COLUMNS c inner join sys.tables t ...
2018/03/12
275
912
<issue_start>username_0: I currently run Mozilla Rhino with this command: ``` java -classpath c:\Users\DNastri\Desktop\rhino1_6R2\js.jar org.mozilla.javascript.tools.shell.Main -opt -1 -f ``` Where can I download the package and how should I change the command to use in Rhino code the following library: ``` importP...
2018/03/12
949
3,108
<issue_start>username_0: I have individual Functions (from user input) for plots (x^2, e^x, x, ...) and I would compute the coordinates in cython. I created with exec a individual function in Python code yet, but thats to slow for me. I tried to generate individual .pyx files and compile them to .pyd files (on Windows...
2018/03/12
596
2,139
<issue_start>username_0: So why am I need my own ip by using get content? I want to use some tv channels which is m3u8 file and using m3u8?wmsAuthSign=code wmsAuthSign code is changing everytime the page refresh it self and they are getting ip adrress inside of that code. So i can't play the tv channel by my servers ...
2018/03/12
804
2,035
<issue_start>username_0: I am looking to do the following in a more elegant manner in R. I believe there is a way but just cant wrap my head around it. Following is the problem. I have a df which contains NAs. However, I want to make the NAs into zeros where if the sum of the NA is not equal to zero and if the sum is ...
2018/03/12
335
922
<issue_start>username_0: Is there a method without using macro or script, to get this result? ``` Bus Line L1 L2 L3 L4 Result Stops 1 X X L2,L4 2 X L4 3 X X L1,L3 ``` I need to concatenate COLUMN'S NAME for each "X" on rows...
2018/03/12
441
1,309
<issue_start>username_0: I have this bit of VBA that I've used on many Excel workbooks without issues. On a particular workbook, I'm getting a Runtime Error '13': Type Mismatch error as soon as it gets to the `Cell = Trim(Cell)` part. What could be causing this? I've looked through the data, but can't find anything out...
2018/03/12
330
1,303
<issue_start>username_0: Using Firebase dynamic link in the iOS App. It's working when app is installed, but if the app is not installed it going to the App Store but showing a another page before going to the App Store. Please check below image.[![enter image description here](https://i.stack.imgur.com/TswCh.jpg)](htt...
2018/03/12
6,019
16,417
<issue_start>username_0: I am in the process of upgrading a Spring Cloud DataFlow Kubernetes Server deployment from 1.2.2.RELEASE to 1.3.1.RELEASE, testing it with minikube. After fixing invalid docker URIs (docker: to docker://) and successfully seeing apps registered in the shell, the deployment to the kubernetes se...
2018/03/12
408
1,361
<issue_start>username_0: I try to use swift code to calculate 10 \* 75% = 7.5 ``` var b : Int = 10 var a : Int = 75 // result x is 0 var x = b * (a / 100) ``` However the result is zero. How to get 7.5 result without changing the type and value of `a` and `b`? UPDATE: I got it right by: ``` var x: Double = (Dou...
2018/03/12
323
1,206
<issue_start>username_0: The followings works, but how can I collect multiple `MapSqlParameterSource` and insert them all in one batch? ``` new SimpleJdbcInsert(ds).withTableName(TABLENAME); MapSqlParameterSource entry = new MapSqlParameterSource() .addValue("id", report.queryId, Types.INTEGER) .addValue("fir...
2018/03/12
1,392
5,016
<issue_start>username_0: I have a `GraphicsBoxItem` that holds a list of `GraphicsImageItem` (some kind of floating buttons around the box). I create them on the fly in `focusInEvent()` and destroy them in `focusOutEvent()`. Some of the `GraphicsImageItem` should move with the parent when clicked, some of them should ...
2018/03/12
1,117
3,634
<issue_start>username_0: I already spent some time trying to figure this out, but I am still somewhat stuck an I can't really find the solution online as I think I am missing the keywords. I want to update an SQL tables in batches, meaning I have a few million entries and want to update index 0-999, 1000-1999 step by ...
2018/03/12
1,163
3,620
<issue_start>username_0: I have: > > gem 'rails', '~> 5.1.1' > > > gem 'mongoid', '~> 6.1.0' > > > I have 3 models, related to this question. ``` class Book include Mongoid::Document field :name, type: String field :author, type: String field :description, type: String field :status, type: String f...
2018/03/12
1,057
3,437
<issue_start>username_0: We have an external SOAP based web-service which provides information regarding customer's gift card balance when presented with an Id. This Id is stored in our database. The requirement is to find out the balance for all such customers who has this Id flagged and then send them an email. This...
2018/03/12
944
3,026
<issue_start>username_0: What should be the `Regex` expression to extract string between `<>` from the following string : ``` "MyName" ``` How do i only extract `<EMAIL>` in c# using regex ? I can extract `MyName` which is in-between `""` using the expression : `"""([^""]*)"""` but i find regex very confusing so ca...
2018/03/12
367
1,360
<issue_start>username_0: I have a Tableau workbook which has 3 measures m1,m2 and m3. Those are aggregated by year and summed, so I end up with a table like this: --- ``` | | 2017 | 2018 | ---------------------------------------- | m1 | 10 | 20 | ------------------------...
2018/03/12
805
2,276
<issue_start>username_0: I am trying to extract phone numbers from a text string that can look like the following: ``` Some address at some street (123) 456-7890 ``` This is the current regex I am using, however it doesn't pull the phone number from the string: ``` /^(\d[\s-]?)?[\(\[\s-]{0,2}?\d{3}[\)\]\s-]{0,2}?\d...
2018/03/12
604
2,139
<issue_start>username_0: This is what I have tried: ``` win = Tk() menubar = Menu(win) dropDown = Menu(menubar) dropDown.add_command(label = "Do something", command = ...) entry = Entry() dropDown.add(entry) menubar.add_cascade(label = "Drop Down", menu = dropDown) win.config(menu = menubar) win.update() ``` I hav...
2018/03/12
645
1,999
<issue_start>username_0: In my project I have a string like this one: > > "2018-03-07 06:46:02.737951" > > > I would like to get two variables: one in date format that contains the data, and the other for the time. I tried: ``` from datetime import datetime datetime_object = datetime.strptime('2018-03-07 06:46:...
2018/03/12
561
1,709
<issue_start>username_0: How do I select between 2 columns based on a conditional in third column using pandas ? In excel I would use something like : NEW\_COLUMN = IF (CONDITION == TRUE , COLUMN 1 , COLUMN 2). I am not able to use lambda function.<issue_comment>username_1: Use [`numpy.where`](https://docs.scipy.org/d...
2018/03/12
548
2,066
<issue_start>username_0: While exploring the flatbuffer library for fast serialization, I noticed that the library had an incredibly fast way to read flatbuffer vectors into numpy arrays with the 'Variable'AsNumpy() command, but I have been unable to find (in source) a corresponding encoding method for serializing nump...
2018/03/12
919
2,800
<issue_start>username_0: Python's `PIL` module has been working fine for me in past projects, but I noticed that for certain images when opening and showing the color is corrupted, while for other images it is fine. However, saving it is fine for both images. Is there a reason why this only works for some images? --- ...
2018/03/12
622
1,543
<issue_start>username_0: I want to print a hex escaped sequence string from a `Buffer`. for instance: ``` buffer = .... // => ``` if I do: ``` console.log(buffer.toString('hex')); ``` I get: ``` d3e952184ce777f7d7 ``` but I want this representation with the `\x` representations (I get get from python and nee...
2018/03/12
628
2,386
<issue_start>username_0: I'm having some issues with SQLAdapter. When run the following code I end up with a datatable of duplicated rows. I can't figure out where the issue is. I've google the heck out of this and almost all the post deal with removing duplicated data as it's read from sql DB. My db table has 4 record...
2018/03/12
352
1,451
<issue_start>username_0: I have an AWS lambda function that watches an S3 bucket. When an image is uploaded to the bucket the lambda function creates a thumbnail of the image. However I made a mistake in the function and saved the transformed file in the same directory that was being watched, creating an infinite loop....
2018/03/12
411
1,584
<issue_start>username_0: I am kinda new to python programming so excuse me if i ask something for which the answer is obvious. I wanted to run a map reduce program so i install the mrjob package as needed. Now, when i try to run the sample program given: ``` from mrjob.job import MRJob class MRWordFrequencyCount(MRJo...
2018/03/12
1,781
5,700
<issue_start>username_0: 1. I got an image like this where I'D like to apply some **special type of filter** on to: [![img0](https://i.stack.imgur.com/Tkq2u.jpg)](https://i.stack.imgur.com/Tkq2u.jpg) 2. I got a RGB color (`49, 76, 14`) for the dark green area (the biggest one). So I'd like to get some kind of thresh...
2018/03/12
1,274
5,434
<issue_start>username_0: I am using Cordova Camera Plugin in Ionic 1 (Angular 1.3) and I need to upload this image to the server. Since the `cordova-plugin-file-transfer` is now deprecated and it is recommended to now upload the file using xhr and `cordova-plugin-file`, I am stuck here on how to proceed. I couldnt find...
2018/03/12
444
1,411
<issue_start>username_0: I'm trying to convert a string to a regex, string looks like so: ``` std::string term = "apples oranges"; ``` and I wanted the `regex` to be `term` with all spaces replaced by any character and any length of characters and I thought that this might work: ``` boost::replace_all(term , " " , ...
2018/03/12
550
1,750
<issue_start>username_0: I am trying to learn how to work with behat test. I am following this tutorial: <https://www.mindyourownwebsite.com.au/installing-behat-3-mink-selenium-windows/> I managed to install everything that is required but when I get to the part where I have to run the behat tests: ``` /mypath/behat/...
2018/03/12
444
1,576
<issue_start>username_0: I am trying to refactor existing legacy code and I noticed that I have many places with below pattern: ``` if (condition) { // lot of code } else { throw new SomeException(); } ``` I was wondering if there is a fast way of flipping if-else construct to easily refactor current form t...
2018/03/12
543
1,832
<issue_start>username_0: The problem is that the label doesn't change its text with the text from Firebase in the "Nick" child. This is how my code looks like: ``` ref = Database.database().reference() refHandle = ref.observe(DataEventType.value, with: { (snapshot) in let dataDict = snapshot.value as! [String: An...
2018/03/12
535
1,987
<issue_start>username_0: I have various PIs running daemon services that start automatically on boot. I'm trying to set up a web page to monitor the status of each daemon service. For this I have come up with following PHP script: ``` php //dashboard.php $command = "ssh -p 97 -i PI12.rsa pi@192.xxx.xx.xx tail -5 /var...
2018/03/12
1,779
5,491
<issue_start>username_0: I am writing a function that, given a list of `numbers` and a `target_sum`, returns zero-based indices of **any** two distinct elements whose sum is equal to the target sum. If there are no such elements, the function should return (-1, -1). That's the solution I came up with: ``` class TwoSu...
2018/03/12
1,260
4,455
<issue_start>username_0: I'm trying to copy and paste data from a selected workbook into my master file. One main problem I'm having is getting back to the master file, the reason being is that the name of the master file changes each month to whatever month it's being run in e.g. "March Master File" for this month "Ap...
2018/03/12
259
984
<issue_start>username_0: I'm trying to write a basic smart contract using solidity over Intellij. I've installed Intellij. I've installed the [intellij-solidity](https://plugins.jetbrains.com/plugin/9475-intellij-solidity) plugin and started Intellij --> Create new Project. I expect to see an option that relates to sol...
2018/03/12
165
695
<issue_start>username_0: Does anybody know how to import CSV of multiple products to Magento 2 without duplicating images? I have been searching for a while and have only found fixes for this issue on Magento 1.<issue_comment>username_1: [Intellij-Solidity](https://plugins.jetbrains.com/plugin/9475-intellij-solidity) p...
2018/03/12
885
2,426
<issue_start>username_0: I would like to compare 2 binary images and want to display the true positive, false positive and false negative visually from the two images `ref.png` and `extracted.png` like in the following example. **reference:** [![reference](https://i.stack.imgur.com/ld3bx.png)](https://i.stack.imgur.co...
2018/03/12
360
1,455
<issue_start>username_0: I have a controller with the action View ``` public function actionView($id) { $request = Yii::$app->request; if($request->isAjax){ Yii::$app->response->format = Response::FORMAT_JSON; return [ 'title'=> "Request #".$id, ...
2018/03/12
1,752
4,983
<issue_start>username_0: I have a 3x3 covariance matrix for 3d-point and I want to know the equivalent 2d covariance (for u,v in image plane) , given the image pose `[Xc,Yc,Zc,q0,q1,q2,q3]` , There's a long (geometric) way that the 3d covariance could be a 3d ellipse , then projecting it into plane give 2d ellipse ,l...
2018/03/12
2,385
6,127
<issue_start>username_0: I am trying to use MDAnalysis (`MDAnalysis.__version__ == 0.17.0`) API functions `principal_axes()` and `moment_of_inertia()` to calculate these matrices for a group of selected atoms as described in the [doc](https://www.mdanalysis.org/MDAnalysisTutorial/atomgroups.html?highlight=principal#i...
2018/03/12
399
1,324
<issue_start>username_0: I am using df.style.applymap to render a pandas dataframe. I chose style instead of to\_html as I needed css applied based on some of the column values. The challenge is that I want to exclude one of those columns from display. So, with the following code: ``` html = df.style.applymap(color_ce...
2018/03/12
338
975
<issue_start>username_0: Currently I have a date time that comes in the format "12:00 PM" or "9 AM" for example. I need to get this time in the format `Hh:mm:ss Z`. I have access to moment.js, but I'm not sure how to make this formatting transition. Thoughts?<issue_comment>username_1: You can use [moment.format()](http...
2018/03/12
688
1,983
<issue_start>username_0: What I'm trying to achieve is to get the element to scroll inside the without overlaying any part on the page. I've been trying to insert a element into a that will act as a container but the is never contained. Here's the Codepen with a live example: [CANVAS within DIV](https://codepen.i...
2018/03/12
638
2,238
<issue_start>username_0: I've found a lot of regex examples for matching content within nested brackets, but what I want to do is match: * a function with a particular name * match ALL content inside the curly braces (including any NESTED curly braces) For example: ``` function someFunc() { const a = 6; if (a =...
2018/03/12
1,009
3,721
<issue_start>username_0: I have a long-running script using spotipy. After an hour (per the Spotify API), my access token expires. I am catching this successfully, but I don't know where to go from there in regards to actually refreshing the token. I am using the authorization code flow, not client credentials. Here's ...
2018/03/12
598
2,259
<issue_start>username_0: I am using Jmeter webdriver sampler with chrome-browser. I need to use chromeoption and desire capability in jmeter. How to I code to use those options. example code which I want to use can be this. ``` ChromeOptions options = new ChromeOptions(); options.addArguments(new String[] {"window-si...
2018/03/12
356
1,256
<issue_start>username_0: Python beginner: I would like to take input from the user, and based on the input, multiple functions will be executed: ``` def func1(): 'This is function 1' def func2(): 'This is function 2' def func3(): 'This is function 3' funcDict = {'A': func1, 'B': func2, 'C':func3} respons...
2018/03/12
1,533
6,149
<issue_start>username_0: I am trying to import 2 different rows as a list from 2 different CSV files. From one CSV file fetching `shareNumberList`and `multiplierList` from another CSV file. Then trying to set the values of `shareNumberList` and `multiplierList` in another list `inputCalculationList` using foreach l...
2018/03/12
660
2,073
<issue_start>username_0: I'm trying to build Python 3.6.4 from LFS 8.2-systemd so I run the configure command: ``` ./configure --prefix=/usr \ --enable-shared \ --with-system-expat \ --with-system-ffi \ --with-ensurepip=yes ``` followed by `make -j`. Howeve...
2018/03/12
11,467
28,125
<issue_start>username_0: I'm currently working on a tutorial [Simple JMS example with Glassfish and a RESTful webservice](http://www.tricoder.net/blog/?p=128) using Glassfish 4 with Jersey 2 Servlet Container (not Jersey 1 from the tutorial) without using Maven. It ends up with an error 404. The application was succes...
2018/03/12
651
2,405
<issue_start>username_0: What is the best way to vectorize text in order to use it as one of many features for time series prediction? The time series is daily and I have 8 to 10 different news headlines per date (~16,000 headlines in total). Each headline consists of max 25 words. The headlines are cleaned (lower ca...
2018/03/12
825
3,168
<issue_start>username_0: I have a model Contract with properties 'id', 'orderer\_user\_id' and 'contractor\_user\_id'. I have a model Signature with properties 'contract\_id', 'user\_id' and 'signed'. I have a hasMany relationship on Contract to retrieve the Signatures belonging to the contract. Each Contract has two ...
2018/03/12
2,594
6,838
<issue_start>username_0: I have the following fiddle: <https://jsfiddle.net/ur9bpgbn/164/> I try to apply a hover effect to the whole arrow with no success. I have the CSS here: ```css .arrow { position: absolute; font-size: 16px; max-width: 350px; background: #FFF; height: 40px; line-height: 40px...
2018/03/12
1,481
4,057
<issue_start>username_0: I'm currently working on a simple page that shows the current time and date. I want to create an input where you can fill in your name, so the page says "Hi there, (your name)" On previous project I worked with this similar function, I had to create a form and on submit I could get the value. ...
2018/03/12
1,615
4,453
<issue_start>username_0: I'm using a grepWin windows tool and I would like to find anything that could contains "start transaction" then a space or any character then "st\_message\_index" then commit; It should match something like this: ``` enter code heredeclare continue handler; start transaction; select n.id as...
2018/03/12
1,341
4,729
<issue_start>username_0: Are there best practices how to avoid SQL injection in case of Mule Applications? I guess the [general guide-lines "how to avoid SQL injection"](https://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet) would work here as well... > > Primary Defenses: > > > > ``` > Option 1: U...
2018/03/12
454
1,606
<issue_start>username_0: I have a Dataframe that looks like this: ``` value attribute1 attribute2 attribute3 attribute4 value1 NaN NaN foo NaN value1 bar NaN NaN NaN value1 NaN baz NaN NaN value1 NaN NaN NaN boo `...
2018/03/12
596
1,937
<issue_start>username_0: album.songs = [1234545, 43524]; ``` const replaced = album.songs.map( e => { e = Object.assign({}, { _id : 123 }) } ); ``` Output: undefined My problem is that I would like to replace my items in 'songs' array with a specific object. It works with strings or numbers but not with objects.<i...
2018/03/12
2,077
6,925
<issue_start>username_0: I don't understand what went wrong exactly somebody plz help. it gives me java.lang.RuntimeException: Unable to start activity ComponentInfo please, be exact to point as I am new to android. thank you in advance. Here is my LogCat ``` FATAL EXCEPTION: main Process: com.exa...
2018/03/12
1,466
4,800
<issue_start>username_0: I am running OpenAI baselines, specifically the Hindsight Experience Replay code. (However, I think this question is independent of the code and is an MPI-related one, hence why I'm posting on StackOverflow.) [You can see the README there](https://github.com/openai/baselines/tree/master/baseli...
2018/03/12
857
3,516
<issue_start>username_0: I have a WebAPI (A) hosted on Azure protected by Azure B2C (B) which is being called by a mobile app (C) - this is all working correctly. I now want to allow third parties to access my API via API Management on the same platform but I am getting extremely confused with authentication and "audi...
2018/03/12
834
3,110
<issue_start>username_0: I have repository classes. In these classes I make simple `collection("..").get()` like this. ``` override fun getTestCollectionItems(): Observable { return Observable.create { subscriber -> firebaseFirestore.collection(TEST\_COLLECTION) .get() .addOnCompleteListener { task -> if (task...
2018/03/12
250
992
<issue_start>username_0: I am programmatically creating a web view with this code ``` var webView: WKWebView! override func loadView() { let webConfiguration = WKWebViewConfiguration() webView = WKWebView(frame: .zero, configuration: webConfiguration) webView.uiDelegate = self view = webView } ``` O...
2018/03/12
133
520
<issue_start>username_0: My team and I are making a web application that needs to have reporting part in it. Can we display QuickSight dashboards in our application and how? Thank you in advance! :)<issue_comment>username_1: I didn't actually fix the problem but have added: ``` override var prefersStatusBarHidden: Bo...
2018/03/12
709
2,811
<issue_start>username_0: I am trying to build a character level lstm model using keras and for that I need to create one hot encoding for characters to feed in the model. And I have around 1000 characters in each line with around 160,000 lines. I tried to create a numpy array of zeros and make the corresponding entrie...
2018/03/12
924
3,384
<issue_start>username_0: My computer science teacher assigned a lab where we need to create a loop that will create 50 lists and add 1 to the value of each list for each time the number is inputted. We are not allowed to have one list and just use the count function to accomplish this task (for some strange reason). B...
2018/03/12
476
1,910
<issue_start>username_0: Following the documentation to configure external master replication: <https://cloud.google.com/sql/docs/mysql/replication/configure-external-master> I have created a First Generation read replica that is replicating from an external master. But I cannot connect to the Cloud SQL read replica. ...
2018/03/12
473
1,482
<issue_start>username_0: I am using react-stripe-elements, but the readme doesn't explain how to add a custom font. I have a container: ``` ``` And then inside my Checkout, I have a wrapper credit card input: ``` ``` And then my wrapper credit card input is: ``` Card info {this.state.error.message} ``` Th...
2018/03/12
222
781
<issue_start>username_0: I have a form with multiple inputs and I need to validate them on a button click. The problem I'm having is if there is more than one required field it seems call to `valid()` validates only the first. Other fields are omitted. ```js $(function() { //simple example 1 //click event for...
2018/03/12
1,698
5,534
<issue_start>username_0: when I import `HttpClient` to call my own written node.js API, there are some issues with the settings of the URL. for example: ``` import { HttpClient, HttpHeaders } from '@angular/common/http'; export class myComponent implements OnInit { constructor( private http: HttpClient, ...
2018/03/12
655
2,322
<issue_start>username_0: I have an input filed where users will enter their first and last name. For example: (<NAME>) How can I check if the first character of first name (J) and first character of last name (S) is upper case? I want to return true if it matches and false if it doesn't match. I have been finding solu...
2018/03/12
2,820
9,449
<issue_start>username_0: When I try to run a React app using `npm start` it fails with a load of errors from the types: `no-undef` and `no-restricted-globals` while it actually does compile and runs without any problem on my colleagues' machines! I changed my `npm` and `node` versions to match those on the other mach...
2018/03/12
243
978
<issue_start>username_0: Is there a way to add and X to this element via CSS? ``` ``` Im not sure where its located in the site, so Id rather just go this route<issue_comment>username_1: `is not defined no-undef` means is not declared or imported. for example PropTypes need import like `import PropTypes from 'pro...
2018/03/12
2,513
7,720
<issue_start>username_0: This is my first time to ask a question here. I'm working on migration a dojo project from version 1.6.2 to version 1.13. The application is implement on PHP with Dojo. I have a problem of using the current application profile. There is a login page which is using a few of dijit widgets as Text...
2018/03/12
537
1,980
<issue_start>username_0: In working with [the Angular docs / tutorial on the in-memory web api](https://angular.io/guide/http#making-a-post-request), I want to return some JSON values that indicate the success or failure of a request. i.e.: `{success:true, error:""}` or `{success:false, error:"Database error"}` But...
2018/03/12
312
1,042
<issue_start>username_0: I'm using Slick Slider with content in each slide (text and images): ``` $(document).ready(function() { $("#misresenas").slick({ arrows:false, autoplay:true }); }); ``` The problem is when I load page, at the beginning Slick Slider looks like this with one slide above the other until ...
2018/03/12
433
1,362
<issue_start>username_0: I have a pandas data frame. Below is a sample table. ``` Event Text A something/AWAIT hello B la de la C AWAITING SHIP D yes NO AWAIT ``` I want to only keep rows that contain some form of the word AWAIT in the Text column. Below is my desired table: `...