date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/10
311
1,174
<issue_start>username_0: Using the new tag helper in asp.net-core-mvc ``` ![youtube_logo](~/images/youtube.gif) ``` Is there a setting in the new tag helper that allows the link to open in a new tab? Because you cannot add target="\_blank" using this method. Additionally, when using the tag helper and changing page...
2018/03/10
2,503
9,921
<issue_start>username_0: I'm trying to create an app that, when the user doesn't know, says a text that changes every levels. The goal is to say a sentence displayed (yes, it is made for kids): ``` @IBAction func dontknow(_ sender: Any) { let utterance = AVSpeechUtterance(string: textLabel.text) utterance.voic...
2018/03/10
2,227
8,237
<issue_start>username_0: I wrote the following Greasemonkey script to prevent myself from accessing a few web apps (web sites), usually these I feel a bit addicted to. This is the closest I got to prevent my Browsers to display these sites: ``` // ==UserScript== // @name blocko // @include * // ==/UserScrip...
2018/03/10
419
1,693
<issue_start>username_0: I am building a React project without Redux. I would love to have two, or in this case 3 different Switches 1st Switch will be able to Switch between Home page (normal website) and UserPage (Dashboard) when user is logged in... Then each of this will be Switchers as well, so Home will Switch ...
2018/03/10
780
2,402
<issue_start>username_0: Let's say I have an object array call **movies** like below. ``` movies = [{ id : 1,title : 'Black Panther'},{ id : 2,title : 'Avengers'},{ id : 1,title : 'Justice League'},{ id : 4,title : 'Infinity War'},{ id : 5,title : 'Spider man'}] ``` Is there anyway I can extract the value of particu...
2018/03/10
2,393
8,342
<issue_start>username_0: I have been trying to pass data to the controller from the form but it gives me null values. I have my model/controller and view as below. I even tried to use Form Collection but why is this not binding the data properly? > > Role.cs > > > ``` public partial class Role { publ...
2018/03/10
353
1,232
<issue_start>username_0: I created my own HTML Element with web components. It adds a button to its shadow root. But the title of the button is not drawn when hovering over it, although the title attribute is set on the html element. I am using Windows 10 and Firefox version 58.0.2. Any ideas? ```js class Test extends...
2018/03/10
396
1,162
<issue_start>username_0: The query below returns what I look for. ``` SELECT * from meetings where meetings.date = '2018-03-12'; ``` However, the one below is giving me > > Unknown column '‘2018' in 'where clause' > > > ``` SELECT roomNumber FROM rooms WHERE NOT EXISTS ( SELECT * FROM meetings WHERE rooms....
2018/03/10
287
907
<issue_start>username_0: I am using TFS 2017 On Windows Server 2016 and I am trying to create new build definition but it is not able read the agent capabilities like msbuild visual studio No agent found in pool Default which satisfies the specified demands: msbuild visualstudio vstest Agent.Version -gtVersion 1.98.1<i...
2018/03/10
404
1,653
<issue_start>username_0: I am facing problem in Oppo mobile - Lollipop version. I need write contact permission in my app. but in oppo lollipop it ask oppo's own security permission. If I deny that permission than application crashed on open that screen. So I want to know how to check this permission in Oppo Lollipop v...
2018/03/10
1,295
2,859
<issue_start>username_0: I have following dataframe: ``` Code Eqpmnt 123 501R 234 602 456 503 546 504 667 SK01 789 507 678 EK09 ``` I want to keep rows where `Eqpmnt` starts with `5 0r 6` also Equipment name like `501R` which has `R` in t...
2018/03/10
1,129
2,429
<issue_start>username_0: In index.html.erb, I have: ``` Activate ``` further down the page, I have:<issue_comment>username_1: This actually only works for numeric. I misread your question. ``` library(dplyr) filter(your_dataframe, between(Epmnt, 500, 599)) ``` For character: ``` toy <- data.frame(x = paste(c(100...
2018/03/10
750
2,591
<issue_start>username_0: I had `python` (which was python2) and `python3` both installed on my Mac OS High Sierra. I was doing some installations in which I ran: ``` brew install automake brew install doxygen brew install ant ``` and during these processes, my brew must have been updated as well. And now, I realised...
2018/03/10
1,029
3,464
<issue_start>username_0: Using C# So I have a namevaluecollection that can contain a variable number of entries generally 40-50. What I want to do is take 3 entries at a time and process them, in order. For e.g. if entire collection = 9, then like take 1-3, then 4-6, then 7-9. The problem is i am unable to get them...
2018/03/10
1,165
3,574
<issue_start>username_0: *UserX* has following grants: ``` CREATE ROLE "UserX" LOGIN PASSWORD '<PASSWORD>'; CREATE DATABASE "DBX" WITH OWNER="UserX" ENCODING='UTF8' TABLESPACE=pg_default CONNECTION LIMIT=-1; GRANT CONNECT ON DATABASE "DBX" TO "UserX"; GRANT USAGE ON SCHEMA public TO "UserX"; GRANT SELECT,INSERT,UPDATE...
2018/03/10
945
3,656
<issue_start>username_0: For example I have 3 calls of one method (always 3 calls) and I need to pass 1 to method for the first call 2 for the second and 3 for the third. I can solve that Problem in 2 ways. Either make 3 calls with 1, 2, 3 or use a for loop. ``` call(1); call(2); call(3); for (int i = 1; i <= 3; i++)...
2018/03/10
726
1,435
<issue_start>username_0: I have a matix `B` with 100 rows and 3 columns, and a matrix `C` with 100 rows and 1 column. I want to create a matrix `A` with 100 rows and 3 columns like this ``` A <- B - C ``` First row in the new matrix `A`: ``` A[1,1] <- B[1,1]-C[1,1] ``` and ``` A[1,2] <- B[1,2]-C[1,1] ``` an...
2018/03/10
1,417
6,349
<issue_start>username_0: Admiteddly,Dagger is tough and I am trying to inject Retrofit. I injected Context And SharedPreferences and it works fine.But Retrofit broke it all. It recognizes the DaggerRetrofitComponent class but doesnt find DaggerAppComponent. Retrofit Module: ``` @Module public class RetrofitModule { ...
2018/03/10
357
1,106
<issue_start>username_0: I have install new version of Laravel. After opening it is OK. But If after some time I try to refresh or try to visit another page, it is showing an error. If I restart the server, then for few minutes it is again OK. Older version was OK, this problem I am facing for the first time. Please he...
2018/03/10
342
920
<issue_start>username_0: > > Generate a 10 x 3 array of random numbers in [0,1]. > > > For each row, pick the number closest to 0.5. > > > Use `abs` and `argmin` to find the column j closest for each row > > > I don't understand the solution, could you please help me out? ### Solution ``` x1 = np.random.rand...
2018/03/10
2,723
9,899
<issue_start>username_0: I have an excel sheet with some rows. Alongside, I have a db table that has the same definition as the excel sheet in terms of column structure. What I want to do is check if a record exists in the excel sheet but not in the db table then insert it into a new table (an existing empty table) cal...
2018/03/10
449
1,706
<issue_start>username_0: How to set value in hidden textbox using selenium java. It throws the following error, "Element must not be hidden, disabled or read-only...". I tried many methods like using sendkeys, using js excute but nothing works out. Please refer the following code in my script, Method:1 ``` driver.fin...
2018/03/10
468
1,666
<issue_start>username_0: I have a select2 multiple item selector: ``` var location = document.createElement('div'); location.id = 'location' $.each(attributes.locations, function (i, obj) { $('#location').append($('', { value: obj.id, text: obj.name }));; }) $('#location').select2({ multiple: true }); ``` ...
2018/03/10
593
2,351
<issue_start>username_0: So, I developed a small React application using create-react-app. (I have always made applications from scratch.) Then, after I was kind of happy with it, I decided to run `npm run build` to make an optimized production build. Can someone please tell me how I can run the production build ins...
2018/03/10
1,244
4,595
<issue_start>username_0: **Problem** I subscribe to an httpClient.get observable twice. However, this means that my call gets executed twice. Why is this? **Proof** For every subscribe() I do, I get another line in the login page. **Code (onSubmit() from login page button)** ``` var httpHeaders = new HttpHeade...
2018/03/10
802
2,849
<issue_start>username_0: I have multiple json files which just want to merge particular object from them and then save it into new json file: for example: ``` one.json two.json ... ``` **and each json file is like this:** **one.json** ``` { "passed": 1, "fixtures": [ { "name": "Getting Started one",...
2018/03/10
1,142
3,804
<issue_start>username_0: Trying to download a keras model file saved as ~100MB HDF5 file. ``` from google.colab import files files.download('models/mlp_mnist_l.h5') ``` But I keep getting the following ConnectionResetError ``` ---------------------------------------- Exception happened during processing of request ...
2018/03/10
1,364
5,071
<issue_start>username_0: i am using **Firebase** storage to store my *PDF* book after i use the download link from Firebase storage to load it in my *PDFView* using byte[] array it's works fine but i want to load it only first time after that user will browse it offline please help me where to add Firebase offline i ...
2018/03/10
293
1,158
<issue_start>username_0: What is the redux\_epics streams and redux\_thunk ansyc difference?<issue_comment>username_1: From the doc of `redux-observable`: > > redux-observable truly shines the most for complex async/side effects. If you're not already comfortable with RxJS you might consider using redux-thunk for sim...
2018/03/10
413
1,609
<issue_start>username_0: I have 4 microservices and all of them are built on the same technology stack (Java Dropwizard, MySQL), and I'm trying to create a CI/CD pipeline for them, but the question here is: Is it a good idea to have a separate Jenkins job for each microservice? Or it it better to have only one job tha...
2018/03/10
1,223
5,118
<issue_start>username_0: I have a ViewPagerAdapter like this ``` public class ViewPagerAdapter extends FragmentStatePagerAdapter { List movieCategoryList; public ViewPagerAdapter(FragmentManager fm, List movieCategoryList) { super(fm); this.movieCategoryList = movieCategoryList; } @Override public Fragment...
2018/03/10
1,880
6,642
<issue_start>username_0: I have model mock class where i verify a call from another DAO mock object. But this call is not happening to model class and only verify happens on DAO class. ``` public class ApplicationTests { @Mock private Card card; @Mock private JourneyDAO journeyDAO; @InjectMocks private JourneyServ...
2018/03/10
663
2,263
<issue_start>username_0: I want to export my primefaces piechart as an image, and I followed [Primefaces Showcase](https://www.primefaces.org/showcase/ui/chart/export.xhtml) for doing so. The problem is when I click the export button, the window freezes and the chart is not exported as an image, hence I cannot right cl...
2018/03/10
549
1,770
<issue_start>username_0: In iOS 11 I use > > safeAreaInsets > > > to specify the offset from safe area to my custom view like this: ``` var frame: CGRect if #available(iOS 11.0, *) { frame = CGRect(x:0, y: self.view.safeAreaInsets.top + 16, width: 100, ...
2018/03/10
1,268
4,286
<issue_start>username_0: Not a powershell expert but doing something to check for IPv6 connectivity as part of a small project for Windows 10. This (code below) is what I'm using, i'd like to stay with it if possible because its fast and does not involve a web site somewhere to return the public view IPv6 address. The ...
2018/03/10
790
3,048
<issue_start>username_0: i try to develop application with yii2 framework,i use beforeSave event to handle createdAt and updatedAt with time() function, this method is : ``` public function beforeSave($insert) { if ($insert) { $this->createdAt = time(); } $this->updatedAt = time(); return pa...
2018/03/10
863
2,326
<issue_start>username_0: I am trying to create a pivot table with columns as `year` out of a simple table ``` q)growth:([] stock:asc 9#`goog`apple`nokia; year: 9#2015 2016 2017; returns:9?20 ) q)growth stock year returns ------------------ apple 2015 9 apple 2016 18 apple 2017 17 goog 2015 8 goog 2016 13 goog 2017...
2018/03/10
692
2,160
<issue_start>username_0: Here I decided to train on Xamarin. I am currently a tutorial. My problem is that when I try to add a ContentPage I only have the class file that is included in the project. If I display all the files of the project I see my view but can not include it in the project. I put you a screenshot bel...
2018/03/10
625
1,850
<issue_start>username_0: How I can validate get request with only numbers [20, 50, 100]? My Code: ``` $v = Validator::make($request->all(), [ 'limit' => 'sometimes|integer|min:20|max:100', ]); ``` How I can do this with my rules?<issue_comment>username_1: You need to convert the years to symbols ...
2018/03/10
5,726
19,042
<issue_start>username_0: > > Warning:The `android.dexOptions.incremental` property is deprecated > and it has no effect on the build process. > /home/midhilaj/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/be3106efb0df111fe5a3f7b356dd070b/res/values/values.xml > Error:(246, 5) error: resource android...
2018/03/10
1,045
3,799
<issue_start>username_0: **What I'm trying to do.** Create a simple carousel with **RecyclerView**. **Problem** 1. Initially the view is not snap to center and the view is not getting the style I intended to.(i.e, the item which is fully visible should be bigger than other, when scroll by finger it works fine) 2. Wh...
2018/03/10
215
743
<issue_start>username_0: how to clear textbox value from another component. app.component.html ``` ```<issue_comment>username_1: Finally I have solved the problem by using this libraries/examples 1. [DiscreteScrollView](https://github.com/yarolegovich/DiscreteScrollView) 2. [android-viewpager-transformers](https://...
2018/03/10
10,383
17,234
<issue_start>username_0: I'm building a CRUD app in laravel. In my create form I have users select an option from a dropdown and that values posts to the database. I'm attempting to edit that form now, but I can't get the value dynamically using a for each loop. But I can manually. This is what works but it's not dyn...
2018/03/10
462
1,633
<issue_start>username_0: I'm trying to upload a single image to mongo using multer but I keep getting this error while trying to access the image path like: ``` TypeError: Cannot read property 'path' of undefined at router.post (D:\Workspace\AdminBootstrap\routes\admin_index.js:74:29) ``` Here's my code to upload th...
2018/03/10
949
3,229
<issue_start>username_0: I have a Makefile that looks like this: ``` CC=cc CFLAGS=-g -std=c99 -Wfatal-errors OBJS=$(wildcard *.o) all: main.o cmdargs.o io.o $(CC) -o app $(OBJS) main.o: main.c $(CC) -c main.c $(CFLAGS) cmdargs.o: cmdargs.c $(CC) -c cmdargs.c $(CFLAGS) io.o: io.c $(CC) -c io.c $(CFLAG...
2018/03/10
623
2,031
<issue_start>username_0: During exploitation of *SQL injection*, I experienced weird behaviour of similar payloads: * `test' AND SLEEP(5))#` - not worked * `1test' AND SLEEP(5))#` - worked I investigated problem and it seems that casting in (My)SQL might be unexpected: * following expressions result in 0: + 1 AND ...
2018/03/10
701
2,909
<issue_start>username_0: In my Android app I use this code while drawing some waypoints on a map ``` Iterator iterator = waypoints.iterator(); while (iterator.hasNext()) { Waypoint w = iterator.next(); } ``` But I am getting this error > > Fatal Exception: java.util.ConcurrentModificationException > java.util.Ar...
2018/03/10
579
2,461
<issue_start>username_0: My first thought was just take a hash # but text with hash in typoscript constants is not really ignored by TYPO3. This for example is not a ignored comment: ``` # cat=category/subcategory/a; type=string; label=example ```<issue_comment>username_1: If you want to maintain a `List` you use in...
2018/03/10
538
1,538
<issue_start>username_0: I'm creating two arrays, the first has the entries, and the second is empty. I am assigning one cell, the first `array[0]` to the second array. And I am applying method `pop()` for second array. Why cell, the first array too change its value? ```js var t = [[1,1,1], [1,1,1,1,1], [1,1,1,1]]; v...
2018/03/10
2,461
4,688
<issue_start>username_0: what I am trying to do is to get pandas dataframe from CSV file.This is how my file looks like. ``` Date;Open;High;Low;Last Close;Chg.%;Total Value;Total Volume; "02/10/2017";"29.345";"29.375";"29.005";"29.105";"-0.33%";"32,283,437";"1,106,900"; "02/13/2017";"29.100";"30.050";"29.100";"29.870"...
2018/03/10
1,371
3,398
<issue_start>username_0: this query ``` SELECT T.TestTypeId, F.FlockCode, AMT, CV, S.SampleDate FROM [dbo].[Tests] AS T JOIN [Samples] AS S ON T.SampleId = S.Id JOIN [TestTypes] AS TT ON T.TestTypeId = TT.Id JOIN [Flocks] AS F ON T.FlockId = F.Id WHERE T.TestTypeId = 7 AND T.IsDeleted = 0 AND S.SampleDate BETWE...
2018/03/10
939
2,544
<issue_start>username_0: I am using ServiceStack and need to render XML in specific format. Here is my POCO class ``` [DataContract] public class LookupModelBase { [XmlAttribute, DataMember] public int Id { get; set; } [XmlText, DataMember] public string Label { get; set; } } ``` And expected outpu...
2018/03/10
2,810
8,995
<issue_start>username_0: I am using an ordered list like the one below, I want to wrap the `-` number 2 text around the image, which should be placed to the right. At this point the image gets pushed behind the ordered list when adding `float: right:` to it. How can I wrap the text around the image inside a `-` item ...
2018/03/10
604
2,143
<issue_start>username_0: I am developing an open source [JS library](https://github.com/taataa/tapspace) that deals with tree structures and scene graphs. As it is targeted for general use, the names of the API methods should follow conventions. However, I cannot find the term for a tree operation where a node is remov...
2018/03/10
1,885
7,089
<issue_start>username_0: I have a sql query i want to convert it into query builder or Laravel ORM. It works fine. But i want it into query builder form or ORM. Is it possible to write in query builder or ORM ?. I have four tables answers, questions, users and upvote\_answers. Query has three 'joins' and one 'left joi...
2018/03/10
493
1,829
<issue_start>username_0: I am having trouble grabbing multiple input's using the inputs name and adding multiplications to them like below. Is there another way I can do this without using **getElementById** ? ``` Try it Click the button to change the text in this paragraph. x = document.getElementsByName("test1")....
2018/03/10
349
1,353
<issue_start>username_0: An abstract class can have both abstract and non abstract method. Class have only abstract methods can called absolutely abstract class.<issue_comment>username_1: ``` Try it Click the button to change the text in this paragraph. function GetTheResults() { x = document.getElementsByName("te...
2018/03/10
1,572
5,621
<issue_start>username_0: There are a number of similar-sounding questions to this, but none of them quite address this specific question. * <https://social.technet.microsoft.com/Forums/systemcenter/en-US/dfc465bc-7bbd-483e-b98b-2ba56fa98313/the-applicationspecific-permission-settings-do-not-grant-local-launch-permissi...
2018/03/10
418
1,496
<issue_start>username_0: If I've the below data class ``` data class User(val name: String = "", val age: Int = 0) ``` How can I define a collection of it, like: ``` var user = User [] // this is not working ``` I need to be able to call the users by: ``` user[0].name // something like this! ```<issue_comment>u...
2018/03/10
875
3,044
<issue_start>username_0: I am trying to install a small program that does webscraping on my Raspberry Pi 3. The program works fine in my laptop with Ubuntu 16.04. I understand that the reason why it doesn’t work on my Raspberry Pi 3 is related to a compatibility issue between Geckodriver and Firefox-ESR. I am using th...
2018/03/10
260
950
<issue_start>username_0: I am designing a delivery app, where the delivery boy has to handle more than 1 process(Going for delivery destinations), so I need to find the best route for him from the source and round trip is not required . Thanks in Advance<issue_comment>username_1: Following my question above, I start...
2018/03/10
886
2,973
<issue_start>username_0: I'm trying to solve [the 99 problems in Haskell](https://wiki.haskell.org/99_questions/1_to_10), and for the 4th question, I have first tried such a solution ``` myLength :: [a] -> Int myLength [] = 0 myLength ys = go 1 ys where go :: Int -> [a] -> Int go n xs | ( (take n xs) == (take ...
2018/03/10
803
2,918
<issue_start>username_0: Say we have an ElasticSearch instance and one index. I now want to search the whole index for documents that contain a specific value. It's relevant to the search for this query over multiple fields, so I don't want to specify every field to search in. My attempt so far (using NEST) is the fol...
2018/03/10
751
2,579
<issue_start>username_0: I Hope someone could help me. My Query. ``` SELECT * FROM `tbl_device` INNER JOIN `tbl_temperature` ON tbl_device.ID = tbl_temperature.DevID ``` Result. [![Query Results](https://i.stack.imgur.com/QCrnH.jpg)](https://i.stack.imgur.com/QCrnH.jpg) How can get something like this as shown i...
2018/03/10
2,694
9,141
<issue_start>username_0: I am a bit new to Java and Eclipse. I usually use python and Nltk for NLP task.. I am trying to follow the tutorial provided [here](https://stanfordnlp.github.io/CoreNLP/api.html) ``` package edu.stanford.nlp.examples; import edu.stanford.nlp.coref.data.CorefChain; import edu.stanford.nlp.lin...
2018/03/10
586
1,976
<issue_start>username_0: I'm playing around with the limits of array and arrow functions and I'm trying to convert this reduce function into an arrow function: ``` var monthsById = months.reduce(function(result, month) { result[month.Id] = month; return result; ...
2018/03/10
1,505
4,842
<issue_start>username_0: Here I use a pseudocode to present my algorithm,it's a variation of **DFS** The coding style is imitating the **Introduction to Algorithm** ,Everytime we come across a vertex,its color is painted **BLACK** .Suppose the starting vertex is **START**,and the target vertex is **TARGET**,and the ...
2018/03/10
520
1,491
<issue_start>username_0: i have a div with a text with a link inside. after that text div, i have a div with an img. now, i want that when i :hover the link the img spawns behind the text. when the img div is in the text div container it works, but then it spawns over the text. html ``` text with a hover me link ![...
2018/03/10
478
1,469
<issue_start>username_0: I wanted to extract Product name from a chunk. I am using BeautifulSoup, the problem is when i try to fetch product name from `select()` it returns the expected data where when i am trying `find()` it returns none. Why `find()` is not working here. ``` from bs4 import BeautifulSoup data = ''' ...
2018/03/10
513
1,730
<issue_start>username_0: Say I had a list of algorithms, each containing an async call somewhere in the body of that algorithm. The order in which I execute the algorithms is the order in which I want to receive the results. That is, I want the AlgorithmResult List to look like {Algorithm1Result, Algorithm2Result, Algo...
2018/03/10
586
1,813
<issue_start>username_0: I have an **.xlsm** file with lots of macros and sheets, which provides some graphs when filled in. I want to open the **.xlsm** file in python and fill some values to the macros in order to get the graphs . I have tried the following code but it seems that when I open the new file a message th...
2018/03/10
720
2,353
<issue_start>username_0: I am trying to use fetch method on API endpoint but I am getting some unexpected error. I am not able to view JSON data in my brower's console. app.js: ``` import React, { Component } from 'react'; import './App.css'; class App extends Component { componentDidMount() { fetch('ww...
2018/03/10
308
1,019
<issue_start>username_0: I want to get `HashMap?` from `firebaseDatabase`: ``` override fun onDataChange(dataSnapshot: DataSnapshot) { val users: HashMap? = dataSnapshot.value as HashMap? // todo !!! if (users != null) { if (!users.containsKey(userUid)) { users[userUid] = userName } } } ``` This code works ...
2018/03/10
1,388
4,153
<issue_start>username_0: I have a huge set of data. Something like 100k lines and I am trying to drop a row from a dataframe if the row, which contains a list, contains a value from another dataframe. Here's a small time example. ``` has = [['@a'], ['@b'], ['#c, #d, #e, #f'], ['@g']] use = [1,2,3,5] z = ['#d','@a'] df...
2018/03/10
317
1,274
<issue_start>username_0: I am working on caffe SqueezeNet prototxt [link](https://github.com/DeepScale/SqueezeNet/blob/master/SqueezeNet_v1.1/train_val.prototxt). I am just wondering where is the FC layer? (I only see type: data, conv, relu, pooling, concat, SoftmaxWithLoss and accuracy)<issue_comment>username_1: The ...
2018/03/10
1,076
3,465
<issue_start>username_0: It seems like items are appearing in the wrong row when i add on the second column. Any reason why? ``` for (int i = 1; i < 10; i++) { ListViewItem item = new ListViewItem(i.ToString()); listView1.Items.Add(item); } for (int i = 1; i...
2018/03/10
1,328
4,937
<issue_start>username_0: I have an SQLite database that is populated when the user create a profile and fill a form with his contact informations in `SetUpProfile` activity and then retrieve that data and show it back on `UserProfile` activity. **Question:** How to display the profile data (name, phone, address...) in...
2018/03/10
461
1,880
<issue_start>username_0: If any one want to remove container (block) like product.info.main from Product Detail Page based on certain conditions or product has attribute with value assigned. Then what is the best approach for achieving This? Thanks<issue_comment>username_1: We can use Event Observer approach... In **...
2018/03/10
633
2,502
<issue_start>username_0: I'm making my first simple CRUD application using Rails 5.1.5. I used scaffold to easily generate my first table. Then, I found gem called [sweet-alert2-rails](https://github.com/nicolasblanco/sweet-alert2-rails) to have some fun with the layout. I followed the instruction in the readme file ...
2018/03/10
1,127
3,448
<issue_start>username_0: I have two lists in Java: ``` List ENODE = Arrays.asList( "ENB1", "ENB2", "ENB3", "ENB4", "ENB5"); List CLOUD = Arrays.asList( "C1", "C2", "C3", "C4"); ``` And I want to iterate the elements in both of the lists to produce a hash map that pairs all element in list 1 with all element in lis...
2018/03/10
1,643
5,718
<issue_start>username_0: I'm creating a program to determine who wins a game of poker. For context, the input data was in the format: ``` 8C TS KC 9H 4S 7D 2S 5D 3S AC ``` Where the first character indicates the strength of the card (A = Ace, T = 10, J = Jack etc) and the second indicates the suit. The first 5 card...
2018/03/10
247
875
<issue_start>username_0: Like this: `Math inequality: 3 < 2x` How do I escape such characters so that JSX doesn't think it's a part of the component syntax?<issue_comment>username_1: After some testing, I found out that @stackdave's answer does not work. I don't know if it works on other versions of RN, but on react...
2018/03/10
457
1,690
<issue_start>username_0: I'm taking a course on Closures and leading up to that is an understanding of nested functions. I find the following example confusing. You assign the nested function to a variable: ``` let person = personInTheHouse() ``` The variable is called as follows: ``` print(person(“playing cricket”...
2018/03/10
429
1,639
<issue_start>username_0: I do not understand what the problem is but I keep getting a syntax error for the **"from exc"** line even though I did not alter the code. I have checked for un-closed parentheses and quotes and indentation look right to my beginner's eye. The issue is that this is the out-of-the-box code for ...
2018/03/10
301
1,062
<issue_start>username_0: I'm just starting with JQuery and generally web development, so this question might be really easy but I would appreciate your help. Javascript code: ``` $(document).ready(function(){ $("#convbut").click(function() { alert( "Handler for .click() called." ); }); }); ``` H...
2018/03/10
534
1,585
<issue_start>username_0: I'm trying to split the following string using regex in a way that every word, parenthesis, commas and spaces would be separated into string. I tried many times but can't find the right pattern. ``` var string = "WHEAT flour (49%) (with calcium, iron, niacin, thiamin), butter (MILK), pasteuris...
2018/03/10
717
3,091
<issue_start>username_0: Since this the new Android 8 update came out there are many [limitations](https://developer.android.com/about/versions/oreo/background.html#services) imposed on how background services work. So my app needs to fetch **in background** the user's location regularly and for that, I considered u...
2018/03/10
482
1,704
<issue_start>username_0: I want to search the index of a given integer within an array. The code does its job if the numbers in the given array don't repeat themselves, for example, if we are searching for the index of the integer 2 in `int [] array = new int [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]`, but if the given array...
2018/03/10
673
2,634
<issue_start>username_0: There's [this extension](https://marketplace.visualstudio.com/items?itemName=stevejpurves.cucumber). I'm the new maintainer of it and I want to update the extension's name, description, logo and publisher meta data (located in `package.json`). If I do that, will I lose the marketplace's downlo...
2018/03/10
994
3,472
<issue_start>username_0: I have just started to learn to program in C# and I have created a very simple program that is suppose to summarize all positive numbers that's inside a int array. The program looks something like this: ``` static void Main(string[] args) { int[] intArr = new int[5] { 1, 2, 3, -1, 0 }; ...
2018/03/10
536
1,489
<issue_start>username_0: I need a regular expression to parse 3 sections out of the following strings: ``` "Hello World 12 7" -> I want ["Hello World", "12", "7"] "Goodbye -4 72" -> I want ["Goodbye", "-4", "72"] ``` The text part can have any number of words and both numbers can be negative. Many thanks in advance...
2018/03/10
708
1,904
<issue_start>username_0: I have example picture: <https://i.stack.imgur.com/8KXRg.jpg> Where the most used color is: **#f6f6f6** by far (98%) **Using PIL:** ``` from PIL import Image img = Image.open(000777.sk.jpg) width, height = img.size convert_rgb = img.convert('RGB') colors = img.getcolors(width * height) ``` ...
2018/03/10
139
459
<issue_start>username_0: I'm trying to check if a Decimal number is negative. Tried: ``` if value._isNegative { ... } ``` But it gives the error `'UInt32' is not convertible to 'Bool'`<issue_comment>username_1: Try using value < 0. This will check if the value is less than 0. Upvotes: 4 <issue_comment>username_2: Sw...
2018/03/10
1,003
3,535
<issue_start>username_0: I came across this JavaScript function: ``` function myTrim(x) { return x.replace(/^\s+|\s+$/gm,''); } ``` I know that this function(`mytrim()`) replaces some characters in the string(x), but what does `/^\s+|\s+$/gm` do in the replace method? Where can I learn more about these things? N...
2018/03/10
1,851
6,638
<issue_start>username_0: I have trouble understanding why this simple program raises an [`EOFError`](https://docs.python.org/3/library/exceptions.html#EOFError) at the end. I am using a [`Queue()`](https://docs.python.org/3/library/multiprocessing.html#multiprocessing.Queue) to communicate with a [`Thread()`](https://...
2018/03/10
1,155
4,326
<issue_start>username_0: Currently I am trying to get rid of all background noises from my images. I'm pretty sure I have to use some kind of **Dilation** or **Erosion** algorithm but I also like to achieve coding the **filter routine** in Swift. This is my unfiltered noisy image: ![unfiltered Image](https://i.stac...
2018/03/10
826
2,960
<issue_start>username_0: Sorry for the title ... it's best to describe the problem with an example ... I have a list of events and two dates for each event and I need to "break" or "distribute" those dates within their respective months. Example 1: **Event**: Event A **Start Date**: 12/15/2017 - MM/DD/YYYY **End D...
2018/03/10
386
1,496
<issue_start>username_0: I am using to set database dynamically and running migration to update database to create all table. with below command ``` Artisan::call("migrate",['--database'=>'new_database','--path'=>'database/migrations/company']); ``` But I am always getting this error > > 1/1 InvalidArgumentExcept...
2018/03/10
960
2,069
<issue_start>username_0: I have a condition ``` if (driver?.VistrackId == 555) ``` it equivalent (in IL code, not C# code): ``` if (driver != null && driver.VistrackId == 555) ``` right?<issue_comment>username_1: That's correct. The "?" checks for null, and if it's not null, the "." continues the interrogation of...
2018/03/10
1,632
5,653
<issue_start>username_0: In my project I've to copy a lot of numerical data in an std::valarray (or std::vector) from a CUDA (GPU) device (from the memory of the video-card to std::valarray). So I need to resize these data-structures as faster as possible but when I call the member method vector::resize it initialize ...