date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/14
1,865
6,397
<issue_start>username_0: I have a solution with several .NET projects in it. I use GitLab, not self-hosted, for version control and would like to start using their CI tools as well. I have added the following `.gitlab-ci.yml` file to my root: ``` stages: - build - test build_job: stage: build script: - 'ech...
2018/03/14
732
3,465
<issue_start>username_0: I'm writing an app with 8 different Activities that are all interconnected(accessible from one another). I'm wondering how I can have the app always reopen from a full close (not just home button click but from closing the background activity) with the same screen it was exited from. For exam...
2018/03/14
334
1,024
<issue_start>username_0: I have a text file consisting of one line with numbers such as 0 100 90 80 0 70 60 I'm trying to determine how many times the number 0 appears alone (in this case, twice). I tried using this method which accounts for whitespace, ``` grep -o " 0 " file | wc -l ``` but it doesn't account fo...
2018/03/14
733
2,705
<issue_start>username_0: hi~ i am using camel http component. and i can't extract body message. here is my code ``` .log(LoggingLevel.INFO, "ToUri ===> ${body}") .toD("${body}") .log(LoggingLevel.INFO, "Result ===> ${body}") .process(new Processor() { public void process(Exchange exchange) throws Exception { ...
2018/03/14
1,089
2,739
<issue_start>username_0: Hello I was trying to understand how to work with binaries in Elixir and I was trying to parse a string ``` "2018-04-07 13:00:00.000000" ``` I wanted to get they year part and I did the following ``` date = "2018-04-07 13:00:00.000000" << d::size(80), rest::binary >> = date ``` now when I...
2018/03/14
1,082
2,817
<issue_start>username_0: I'm working on a small project where I have a folder that contains about 20 photos. I made a for loop using os.listdir and it prints all the photo names out into the console correctly. The main issue is that I want it to randomly pick one of the photos in the folder and print its name out. Wha...
2018/03/14
546
1,973
<issue_start>username_0: I have a string variable that that is: **“black, white, yellow”**. The problem is i’m using a Where IN clause in sql and i need to put the string variable into the sql statement. For eg. Select \* FROM Products WHERE Products.color IN (?) If i pass the string variable into the sql statement it...
2018/03/14
620
2,436
<issue_start>username_0: I have studied the cache and how to utilise it effectively for a few years now. I know all about the hierarchy of caches, how a block of cache is fetched according to cache line, how the prefetcher detects memory access patterns and fetches memory in advance according to it and even how caching...
2018/03/14
1,359
5,228
<issue_start>username_0: is it possible to run react native app on [Visual Studio Emulator for Android (standalone)](https://www.visualstudio.com/vs/msft-android-emulator/) and if yes what are the steps to set it up? I can successfully start emulator, that part works but cant figure out how to config react-native to us...
2018/03/14
607
2,082
<issue_start>username_0: I am working on a data structures problem. The assignment and what I have so far is listed below. ``` import java.util.Scanner; import java.util.Random; /** * Recursive methods for fun & profit * * @author (your name) * @version (a version number or a date) */ public class DSLab2 { /** * P...
2018/03/14
646
2,276
<issue_start>username_0: I am trying to bind the following json to a list, note that each string can contain more than one element, so the list would look like this: red,black blue orange,blue,red,black,pink ``` [ { "shoes": [ "red", "black" ] }, { "shoes": [ "blue" ] }, {...
2018/03/14
1,000
3,406
<issue_start>username_0: I am trying to create an amplitude vs frequency spectrogram of an audio file in Python. what is the procedure to do so? Some sample code would be of great help.<issue_comment>username_1: ``` from scipy import signal import matplotlib.pyplot as plt fs = 10e3 N = 1e5 amp = 2 * np.sqrt(2) noise_po...
2018/03/14
1,302
4,261
<issue_start>username_0: ``` 100vh Show more stuff var vh=document.getElementById('vh') function show() { alert('window.innerHeight='+window.innerHeight +', window.outerHeight='+window.outerHeight +', screen.height='+screen.height +', document.documentElement.clientHeight='+document.documentElement.client...
2018/03/14
900
3,217
<issue_start>username_0: loginTest() gives me resolve(value) so it goes to .then , my problem is since promise is async code, console.log(token) gets printed with promise-pending before promise fulfills.I want to display the value only after promise is fulfilled.Can any one help ? ``` const token = loginTest().then(r...
2018/03/14
1,074
3,843
<issue_start>username_0: I have a trouble with `AlertDialog`. If i will call `dialog.show()` after `dialog.hide()` it will not be shown, but if I call `dialog.show()` again, all ok. If i call `dialog.show()` twice in a row, dialog showing always. And If replace `hide() -> dismiss()` it is ok allways. But in my case i ...
2018/03/14
712
2,830
<issue_start>username_0: I've been working on an assignment for class, beginners C#. I've hit a point where I do not know what to do next. This is the question and it involves argument/parameters... Define the output of the "area" property calculation such that a user can initialize an instance of the "Circle" class b...
2018/03/14
611
2,238
<issue_start>username_0: The `Balance` column shows current Stock on Hand + Open PO minus QTY Entered. I have an existing query with ALIASes in the `SELECT` statement: ``` SELECT dbo.Items.ItemNo, dbo.Items.Name, dbo.Vendors.Name AS VendorName, ISNULL(ItemsStock.StockOnHand, 0) AS [Stock on Ha...
2018/03/14
983
3,329
<issue_start>username_0: When I call a method that was overrided from my constructor, I am getting an error and it says that it is missing an argument (due to the subclass requiring a second argument). However, I called the method in the super(), so why doesn't it call the super class version of that method? This is b...
2018/03/14
903
3,250
<issue_start>username_0: I'm using django.rest\_framework. I have a get\_or\_create method for a particular view, ``` class LocationView(views.APIView): def get_or_create(self, request): try: location = Location.objects.get(country=request.data.get("country"), city=request.data.get("city")) ...
2018/03/14
604
1,758
<issue_start>username_0: I have used a bootstrap 4 template then edited it to fit my design. It is almost completely fully responsive except for one aspect. I have a background image as a main header image. It is responsive except when on mobile. I was wondering how I can make it fill the mobil screen while also shrink...
2018/03/14
846
2,654
<issue_start>username_0: Below is a minimal test case in which I create a variable `v` which I want to initialize to a value of 777 (for the simplified test case). Note: I can't initialize `v` with a normal initializer because it depends on a normalization constant computed across all variables (some of which aren't ...
2018/03/14
957
2,967
<issue_start>username_0: Please look at the below Python code that I've entered into a Python 3.6 interpreter: ``` >>> 0.00225 * 100.0 0.22499999999999998 >>> '{:.2f}'.format(0.00225 * 100.0) '0.22' >>> '{:.2f}'.format(0.225) '0.23' >>> '{:.2f}'.format(round(0.00225 * 100.0, 10)) '0.23' ``` Hopefully you can immedi...
2018/03/14
438
1,570
<issue_start>username_0: I have two decoupled components running on the one page and would like to use Postal.js to send a message when one is clicked to the other. When the first component is clicked it publishes a post: ``` postal.publish({ channel: 'carts', topic: 'item.add', data: { quantity: newQuantit...
2018/03/14
225
747
<issue_start>username_0: I learned python and pandas before SQL, so this question is a bit basic. For example, I have a `type` column with values like 1, 2, 3. Then when I do df['type'].value\_counts, I can get the statistics of the `type`, maybe something like ``` 1: 1000 rows 2: 220 rows 3: 100 rows ``` I want t...
2018/03/14
306
974
<issue_start>username_0: I'm new to coding and got an error I don't know how to fix it. It is from codecademy lesson 4. ``` def hotel_cost(nights): return 140 * nights def plane_ride_cost(city): if city == "Charlotte": return 183 elif city == "Tampa": return 220 elif city == "Pittsburgh": return ...
2018/03/14
415
1,346
<issue_start>username_0: I am working with processing/consuming some data from: <https://ashesescalation-api-tachyon.stardock.net/v1/products/2641/leaderboards/ladder/de5bfc9a-9092-4014-b52e-89151de42646?offset=0&count=2> (which can be opened easily in Firefox to view.) I am able to access the data in C# by doing this...
2018/03/14
1,567
5,465
<issue_start>username_0: I have a UWP project that was created using Visual Studio 2017. It builds fine on this machine (machine 1). However, when I copy the project over to a machine (machine 2) where I only have the Visual Studio 2017 Build Tools installed, and attempt to build it using MSBuild, I get the following ...
2018/03/14
1,805
5,187
<issue_start>username_0: For example, I have a `Map[Integer,String]` like ``` val map = Map(1 -> "a", 2 -> "b", 3 -> "c", 5 -> "d", 9 -> "e", 100 -> "z") ``` * If given key is 2, then "b" is expected to return. * If given key is 50, then "e" and "z" are expected to return. * If given key is 0, then "a" is expected ...
2018/03/14
1,746
6,690
<issue_start>username_0: I use VueJS and Django + [django-graphql-jwt](https://github.com/flavors/django-graphql-jwt) (which returns tokens). I want to use email\password fields for registration and for login. On a server I want to check if provided email already exists -> use `django-graphql-jwt`'s mutation `token_aut...
2018/03/14
1,388
5,178
<issue_start>username_0: I am trying to get images from an Instagram user (it's our own account). Below is the code I am using, but it does not seem to work. I do have the correct userID and accessToken being fed into the code. ``` function fetchData($url){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_...
2018/03/14
1,473
5,212
<issue_start>username_0: My python string is with separated by \n newline at the end: ``` mystring = "owner: uid=rocdsc,ou=People,dc=fcd,dc=test,dc=com member: uid=absylor12,ou=people,dc=fcd,dc=test,dc=com member: uid=amslsmith,ou=people,dc=fcd,dc=test,dc=com member: uid=amis,ou=people,dc=fcd,dc=test,dc=com member: ui...
2018/03/14
1,223
4,621
<issue_start>username_0: Uhm, I had a question and i want to ask you. I build project using jdk 1.6 and my tomcat server using jdk 1.8 so when we running project in tomcat server, what is the jdk are running??<issue_comment>username_1: You can create one function and use it in both mutations: ``` def get_or_create_use...
2018/03/14
1,624
5,191
<issue_start>username_0: Test data ``` DROP TABLE t; CREATE TABLE t(_id serial PRIMARY KEY, data jsonb); INSERT INTO t(data) VALUES ('{"a":1,"b":2, "c":3}') , ('{"a":11,"b":12, "c":13}') , ('{"a":21,"b":22, "c":23}') ``` Problem statement: I want to receive an arbitrary JSONB parameter which acts as a filte...
2018/03/14
482
1,701
<issue_start>username_0: I have a query like this: ``` SELECT * FROM Product.Stock AS PS INNER JOIN Product.Product AS P ON PS.ProductId = P.ProductId INNER JOIN Product.ProductDetail AS PD ON P.ProductId = PD.ProductId INNER JOIN Product.ProductSize AS PSI ON P.ProductId = PSI.ProductId ``` I want to know how ma...
2018/03/14
510
1,649
<issue_start>username_0: I am looking for a way to pass a pointer from *not* main function to another function. A variable x with value 5 sends as pointer to func1, func1 changes variable value to 10, then func1 sends same variable to func2. I want it to look something like that: ``` #include void func1(int \*px); ...
2018/03/14
427
1,853
<issue_start>username_0: Has anyone had any problems writing data to a web client data field? Having spied the field to be written in, the write action correctly writes the value from the data item into the web field. We then "Save" the value in the field by clicking the Save button. This is when the value reverts back...
2018/03/14
471
1,940
<issue_start>username_0: Recently, I started to study owlready, and faced with much problem. I defined a `PropertyChain` as follows. ``` class friend(Person >> Person, SymmetricProperty): pass class potentialFriend(Person >> Person): # potentialFriend := friend o friend equivalent_to = PropertyChain([frie...
2018/03/14
678
2,758
<issue_start>username_0: I'm trying to write a function checking if 2 arrays are equal. ``` public class DynamicArray { private int size; // stores the number of “occupied” elements in the array private int[] array; ... boolean equals(DynamicArray obj) { boolean keepChecking = true; ...
2018/03/14
481
1,948
<issue_start>username_0: how can I delete specific row data in my supplier table cause the error is when I use the order by it deleted all the supplier data in the database but when I use where it doesn't delete anything. what should I do thanks for your help This is my Code for the delete button ``` ``` This is my...
2018/03/14
640
2,386
<issue_start>username_0: I am currently using Index,Match to match records from one sheet to the other. Works great, except when I have multiple records with the same identifier. Let me explain: The sheet named Open Leave Report contains the raw data (lookup values), while the sheet named Open Leave Capture contains t...
2018/03/14
759
2,156
<issue_start>username_0: The problem I met is specific operation for \*pply(like apply or mapply, etc, I'm not sure). The dataframe is `dlt`: ``` dlt.1 dlt.2 dlt.3 dlt.4 dlt.5 1 3.244198 6.482869 9.711874 12.92918 16.13489 6 3.196401 6.391871 9.585553 12.77681 15.96547 19 3.182911 6.3654...
2018/03/14
989
3,646
<issue_start>username_0: I'm trying to compare 2 form components values like password and confirm password but it creates some problems. Also suggest me to go with alert message or any new way to display the message that user will get some interactive message also. When I put alert message in inputData function it a...
2018/03/14
2,230
8,271
<issue_start>username_0: I was surprised to discover that `std::is_default_constructible` appears to ignore friend access. When declaring a default constructor private in a class and then friending a function, I'd expect that `std::is_default_constructible` would return true. Example: I ran the following on Wandbox: <...
2018/03/14
1,093
4,130
<issue_start>username_0: I have this effect that dispatches a dummy action if the final post succeeds. ```js @Effect() post$: Observable = this.actions$ .ofType(PropertyActions.UPLOAD\_FILE\_GETSIGNEDURL) .switchMap((action: PropertyActions.UploadFileGetsignedUrl) => { this.actionData = action.payload; return ...
2018/03/14
731
2,622
<issue_start>username_0: For simplicity purpose, I will make the question short I have the following HTML which I load into my WebView ``` Heading ======= some description and imaages ![](local file source) ``` The above works perfectly and shows image(s) in webview but I want to make my images `clickable` so that...
2018/03/14
276
850
<issue_start>username_0: I have two tables and i want display in my output list only orders who have customer role 0. this is my db : ### table1 Table name : **customers** **id | role | name** 1 | 0 | david 2 | 0 | Opera 3 | 1 | Jacob ### table2 Table name : **orders** **id | customerid | title |...
2018/03/14
1,046
3,524
<issue_start>username_0: I try to download the image from the URL array and append the image to the image array for my collection view. But it does not download and append it to the image array one by one. So I try to use dispatch group, But not working. What is the correct way to add Dispatch group? ``` func download...
2018/03/14
299
860
<issue_start>username_0: I want to use regex to verify the length(6-18)'s string: ``` var reg = new RegExp('^[a-zA-Z_0-9]{6, 18}$') var res = reg.test('aaaaaa') console.log(res) // but there I get false ``` whether my regex is write wrong?<issue_comment>username_1: I think you have a rogue space in the bracketed...
2018/03/14
383
1,210
<issue_start>username_0: I'm newbie in Robot Framework and need your help with my problem. When I try to select an element from Dropdown list, the default class of this list is "select-dropdown" but when click it, the class will change to "select-dropdown active". So I cannot choose the right element even i used click...
2018/03/14
881
2,254
<issue_start>username_0: I have a numpy array, it has `shape=(10000,)`. Here are the first 5 entries: ``` labels = data[:, 0] print(labels.shape) print(labels[0:5]) # prints # (100000,) # [1. 1. 1. 0. 1.] ``` Every entry is either 0 or 1. I would like to map this to a 2d array, by an element wise operation which m...
2018/03/14
1,770
6,001
<issue_start>username_0: ``` #include #include #include int main(){ struct stat \*something; stat("/etc/profile", something); printf("%d\n", something->st\_gid); free(something); return 0; } $ ./a.out Segmentation fault ``` I learned [from this post](https://stackoverflow.com/questions/3138600/correct-use-of...
2018/03/14
459
1,410
<issue_start>username_0: my code: ``` CREATE table arp_table ( time VARCHAR(30), source_mac VARCHAR(30), destination_mac VARCHAR(30), source_ip VARCHAR(30), destination_ip VARCHAR(30), length VARCHAR(30), ); ``` error: > > ERROR 1064 (42000) at line 8: You have an error in your SQL syntax; > check the manual that...
2018/03/14
453
1,452
<issue_start>username_0: i want to show `url` in the `webkitView` like **instagram** app shows. how to achieve this?? thanks. ![](https://i.stack.imgur.com/eWfwj.jpg) ![](https://i.stack.imgur.com/Vg9FJ.png)<issue_comment>username_1: As I can understand by looking at the instagram app, you need to have view wit...
2018/03/14
1,041
3,353
<issue_start>username_0: I'm trying to write an userscript for a forum wherein, I require it to navigate to different URLs randomly. The basic idea is, I want to be online most of the time to increment my online spent time. The forum will not increment to online spent time after some time of inactivity(Let's assume 5 ...
2018/03/14
1,665
4,809
<issue_start>username_0: I'm using matplotlib to display a stock's price movements over time. I want to focus on the last 90 days and then predict the next 14 days. I have the last 90 days of data and my predictions, but I want to graph my predictions in a different color, so it's clear they're different. How would I ...
2018/03/14
605
2,089
<issue_start>username_0: So I encountered this question today, but since we are given the answer I tried rotating it using lambda, I doubt my approach which was using the reverse string using lambda to rotate it but would appreciate feedback on how I can approach this. code below We are given two strings, A and B. A ...
2018/03/14
543
1,793
<issue_start>username_0: I tried to find out preg\_match for Chinese character. I can get Chinese character in some way like this ``` preg_match("/^\p{Han}+/u", $message); //$message = '你好'; ``` But, sometime two digit number with . in front something like this ``` $message = '01. 你好' //or '21. 你好' ``` So, my pre...
2018/03/14
1,229
4,304
<issue_start>username_0: I am bit super annoyed and confused on the side menu not showing up in different situations. My app flow and requirement are: initially, there is a landing page with 3 tabs and no side menu. On the first tab, there are products and you can add them to cart. once u add those to the cart you can...
2018/03/14
911
2,494
<issue_start>username_0: I want to see if my region is already being monitored. For that purpose, I get `monitoredRegions` from my `CLLocationManager` and then use a predicate filter by its identifiers like: ``` NSArray *regionsBeingMonitored = [_sharedLocationManager.monitoredRegions allObjects]; NSPredicate *predic...
2018/03/14
780
3,419
<issue_start>username_0: From Java doc: > > A Future represents the result of an asynchronous computation. Methods are provided to check if the computation is complete, to wait for its completion, and to retrieve the result of the computation. > > > How is then it asynchronous if there are methods to wait for com...
2018/03/14
1,532
6,253
<issue_start>username_0: I’ve built a SaaS website with subscriptions, enabled by an external payments processor (which could be [Stripe](https://stripe.com/), [Braintree](https://www.braintreepayments.com/), [Paddle](https://paddle.com/), etc.). Now this website for my SaaS has been packaged in a small [`WebView`](ht...
2018/03/14
1,111
4,274
<issue_start>username_0: I'm completely new to Android and Android Studio. I was just coding. So I was running the previous version of Android Emulator and it worked perfectly fine. 1. However, when I downloaded the latest Android Emulator 27.1.12, my Emulator couldn't run properly. **Issue:** The code is running f...
2018/03/14
1,054
3,954
<issue_start>username_0: I would like to compare and match exactly one word (characters and length) between two strings. This is what I have: ``` String wordCompare = "eagle:1,3:7;6\nBasils,45673:ewwsk\nlola:flower:1:2:b"; String lolo = scanner.nextLine(); if ( motCompare.toLowerCase().indexOf(lolo.toLowerCase()) !=...
2018/03/14
3,288
11,777
<issue_start>username_0: The [Rust book (2nd Edition)](https://doc.rust-lang.org/book/second-edition/ch10-02-traits.html) suggests that "Traits are similar to a feature often called ‘interfaces’ in other languages, though with some differences." For those not familiar with interfaces, the analogy doesn't illuminate. Ca...
2018/03/14
366
1,454
<issue_start>username_0: I'm fairly new at automated testing and setting up Nightwatch but I can already tell my Custom Commands folder is going to get unwieldy sooner or later. I've seen some example nightwatch.json files that use an array for the Custom Commands Path but I can seem to figure it out. Is it possible? A...
2018/03/14
465
1,563
<issue_start>username_0: I noticed that the results are different of the two lines. One is a sorted list, while the other is a sorted dictionary. Cant figure out why adding `.item` will give this difference: ``` aa={'a':1,'d':2,'c':3,'b':4} bb=sorted(aa,key=lambda x:x[0]) print(bb) #['a', 'b', 'c', 'd'] aa={'a':1,'d...
2018/03/14
667
2,486
<issue_start>username_0: I am new to C++ and I am trying to initialize a vector of struct as code below. ``` struct Node{ int x; Node *p; int rank; Node(int x) { this->p = this; this->x = x; this->rank = 0; } }; int main() { vector disjointSets; for (int i = 0; i < 50; i++) { Node a(i); disjointSet...
2018/03/14
1,879
7,275
<issue_start>username_0: Is there any way to get an open keyboard's height in Flutter? I'm trying to pad a `bottomSheet` widget by the height of the keyboard while it's open.<issue_comment>username_1: Usually [`viewInsets`](https://docs.flutter.io/flutter/widgets/MediaQueryData/viewInsets.html) provides data about any ...
2018/03/14
257
861
<issue_start>username_0: I was trying to resize the input image using OpenCV but I am having problems converting the resized np array into the original format. ``` image = imageio.imread(filename) # image\_re = cv2.resize(image, (256, 256)) # #convert into here ``` Thanks in advance.<issue_comment>username_1: `imag...
2018/03/14
2,931
8,020
<issue_start>username_0: Has anyone experienced a very slow startup time for SpringBoot 2.0 on MacOS Sierra? My pom is nothing more than this (snippet): ``` ... org.springframework.boot spring-boot-starter-parent 2.0.0.RELEASE UTF-8 UTF-8 1.8 org.springframework.boot spring-boot-starter-security org.spri...
2018/03/14
1,057
3,318
<issue_start>username_0: [![The footer as it should look](https://i.stack.imgur.com/twcGk.png)](https://i.stack.imgur.com/twcGk.png) The above picture is what my customer expects. I'm using Bootstrap 3 to build it. For the moment we do not have an "Our Team" or "Portfolio" page. Whenever I try to get the picture to st...
2018/03/14
1,969
4,507
<issue_start>username_0: Following up on [this question](https://stackoverflow.com/questions/49229558/r-grep-regular-expression-using-elements-in-a-vector/49231001?noredirect=1#comment85465469_49231001), I have another example where I cannot use the accepted answer. Again, I want to find each of the exact `group` elem...
2018/03/14
1,389
3,483
<issue_start>username_0: I have problems with img tag in HTML. I try to use relative path and absolute image file path like this: ``` ![](../../images/pages/404-page/bg-construct-image.jpg) ![](D:\Web_HomeOWN\images\pages\404-page\bg-construct-image.jpg) ``` But this image didn't display. When I inspect img element ...
2018/03/14
610
2,487
<issue_start>username_0: How to prevent IIS from overriding custom error pages with IIS default error pages? Is there a Response.TrySkipIisCustomErrors equivalent for asp.net core? In ASP Net MVC I use the code below to send error without a custom page but in asp net core it is not working. ```cs try { // some cod...
2018/03/14
1,753
5,176
<issue_start>username_0: I am using C++ for particle physics and I find myself commondly writing lines like this: ``` bool isItCorrect(int i){ if(i==11 || i == 62 || i==-11 || i == 11002 || i==22002) return True else return false; } ``` What is the easiest way for me to make this shorter in C++. In python I could ...
2018/03/14
1,702
5,189
<issue_start>username_0: I recently started exploring `Spring Boot`. I see that there are 2 ways to define `Beans` in `Spring Boot`. 1. Define `@Bean` in the class annotated with `@SprinBootApplication` 2. Define `@Bean` in a class annotated with `@Configuration` I am also confused about `stereo-type annotation` `@R...
2018/03/14
655
2,171
<issue_start>username_0: I have one `table` that contains both students and parents records. There is a common field (email address) in both parent and student records that match the records (parents and students have the same email address). > > I want my query to find the common email addresses and return each > ...
2018/03/14
462
1,743
<issue_start>username_0: How to correctly define if file exist or not? ``` string FilePath = Path.Combine(dir, "www", "index.html"); if (!File.Exists(FilePath)) { // get here anyway } string dir { get { string codeBase = Assembly.GetExecutingAssembly().CodeBase; UriBuilder uri = ne...
2018/03/14
1,162
4,116
<issue_start>username_0: Hey I am implementing this function. ``` private static HashMap> enrollments = new HashMap>(); private static Set studentset; /\*\* \* Enrolls a student into a unit. \* \* @param unit \* @param student \*/ public static void enroll(String unit, String student) { if(!enrollments.contain...
2018/03/14
1,082
3,713
<issue_start>username_0: > > <https://angular.io/api/forms/FormGroup#controls> > > > Follwing my form: ``` this.form= this.fb.group({ id: ['', [Validators.required]], name: ['', [Validators.maxLength(500)]], child: this.fb.group({ id: [ '', [Validators.required]], name: [''] }) }); ``` I want to...
2018/03/14
771
2,575
<issue_start>username_0: I am working on an aframe project where runtime loading of 3D object is required. I have read A-Frame documentations, and aframe doesn't seem to support runtime assets loading at all. I discovered this aframe-asset-on-demand-component by protyze (<https://github.com/protyze/aframe-asset-on-dem...
2018/03/14
784
2,598
<issue_start>username_0: **Insdead of using `setState` in `componentWillReceiveProps`, I just set the props to component's local property directly:** ``` class Inventory extends React.PureComponent { pieData = {}; doSomeTransition = (pieData) => { }; componentWillReceiveProps(nextProps) { if (this.props...
2018/03/14
1,863
5,911
<issue_start>username_0: I have an array like this ``` students = [{name: 'Abbey', age: 25}, {name: 'Brian', age: 45}, {name: 'Colin', age: 25}, {name: 'Dan', age: 78}] ``` and I want the output to be; ``` uniqueAges = [45, 78] ``` To be clear, if there is an age value that appears more than once in ...
2018/03/14
1,142
3,797
<issue_start>username_0: Trying to get the value after the second bracket, I try to work with this one i created but it's not working properly and getting more complicated while I am having more brackets in each row.. Any idea. I uploaded couple images to understand the input and output. ``` Sub stringtest() Dim ...
2018/03/14
1,005
3,274
<issue_start>username_0: This is my ajax code ``` var formData = new FormData(); $a = array = ['1', '7']; formData.append('kpmConfigDt1', $a); $.ajax({ url: '= base_url() ?hr_pms/kpmConfigDtl_list1', data: formData, cache: false, contentType: false, processData: false, type: 'POST', succes...
2018/03/14
766
3,359
<issue_start>username_0: [![firebase database image here](https://i.stack.imgur.com/SN5X8.png)](https://i.stack.imgur.com/SN5X8.png) [![phone authentication login user image here](https://i.stack.imgur.com/G2i3H.png)](https://i.stack.imgur.com/G2i3H.png) [![firebase database user phone number repeated with same user ...
2018/03/14
306
1,381
<issue_start>username_0: Does anyone know how to handle the connected, disconnected, reconnecting and etc on Laravel Echo? I'm using VueJS btw<issue_comment>username_1: to connect you do this: import Echo from 'laravel-echo' in your function or on load you then do this: ``` window.Echo = new Echo({ ...
2018/03/14
1,329
4,697
<issue_start>username_0: I am newbie to Oracle. I have a requirement in which I need to fetch all the error codes from the comment field and then check it in another table to see the type of code. Depending on the type of code I have to give preference to particular type and then display that error code and type into a...
2018/03/14
381
1,199
<issue_start>username_0: I need to get the 24 hour time of a string, but I can only get the 12 hour for some reason using Mysql. ``` SELECT STR_TO_DATE('3/13/2018 9:28:07 PM', '%m/%d/%Y %T'); +-----------------------------------------------------+ | STR_TO_DATE('3/13/2018 9:28:07 PM', '%m/%d/%Y %T') | +-------------...
2018/03/14
509
1,744
<issue_start>username_0: Trying to get the customer information using phptoolkit Here's my code: ``` function getCustomer(){ $service = new NetSuiteService(); $request = new GetRequest(); $request->baseRef = new RecordRef(); $request->baseRef->account_id = "252206"; $request->baseRef->type = "customer"; $...
2018/03/14
365
1,440
<issue_start>username_0: Sorry if this has been answered but I can't find it. I'm brand new to c#, ASP.net, entity framework and visual studio (coming from JS + rails). I need to do the following: 1. Click on member section title should open member add dialog 2. Right click on each member should open context menu with...
2018/03/14
1,412
4,503
<issue_start>username_0: **Edit:** Fixed. A working sample is at <https://github.com/halmueller/vImage-mac-sample>. I'm trying to read the feed of a MacBook Pro's Facetime camera to process it with the vImage framework. I'm following the example in Apple's [VideoCaptureSample](https://developer.apple.com/documentation...
2018/03/14
690
2,687
<issue_start>username_0: I searched and saw many posts and I don't know why this simple console call using httpclient.getasync and awaiting it causes it not to complete. here is the code: ``` using System; using System.Net.Http; using System.Threading.Tasks; public class Program { public static void Main(string[]...
2018/03/14
2,360
11,541
<issue_start>username_0: First, I apologize, because I am not sure how to correctly present the information. I have been attempting to load an item into an `ArrayList` while inside the "`.onCreate()`" method of an Activity. The first line of the stack trace reads as below: ``` java.lang.RuntimeException: Unable to sta...
2018/03/14
1,226
4,404
<issue_start>username_0: I have a .map() function where I'm iterating over an array and rendering elements, like so: ``` {options.map((option, i) => ( this.isSelected(i)} selected={this.toggleStyles("item")} /> ``` I am toggling the state of a selected element like so: ``` isSelected (i) { this...
2018/03/14
1,082
2,870
<issue_start>username_0: I want to take distinct value of column from DataFrame A and Pass that into DataFrame B's explode function to create repeat rows (DataFrameB) for each distinct value. ``` distinctSet = targetDf.select('utilityId').distinct()) utilisationFrequencyTable = utilisationFrequencyTable.withColumn("u...
2018/03/14
854
2,180
<issue_start>username_0: I am using pymongo to connect to mongod. The following code works ``` def init_db(): client = MongoClient('localhost', 27017) db = client.test_db return db ``` However, when I change 'localhost' above to my machine's hostname, like so ``` def init_db(): client = MongoClient('p-linux', 2701...
2018/03/14
1,126
3,320
<issue_start>username_0: Hi pretty new to coding in c, but would love your help in my following coding problem. I want to add two times (that are in twenty four hour time notation already). Currently they are both integers and the arithmatic addition function is great for whole hour (e.g. 800+1000), however because ...
2018/03/14
501
1,885
<issue_start>username_0: I want to access the latitude and longitude variables from `onLocationChanged` method in my `test()` method. ``` class MainActivity { private IALocationManager mIALocationManager; Double lat; Double lng; private IALocationListener mLocationListener = new IALocationListenerSupport() { @Over...
2018/03/14
543
1,644
<issue_start>username_0: I have list of teams and I wanted to actually put them in a database but I have problem looping with enumerate So this the list ``` teams = [ ('Team1', '91'), ('Team2', '89'), ('Team3', '87') ] ``` I first tried out this and simple for loop and no problem wit...