date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/13
1,128
3,831
<issue_start>username_0: I have a web page link that will not display via iOS `WKWebView`. How do I get links like this to display via `WKWebView`? It appears that only 3 version of <https://www.google.com> and <http://www.apple.com> will display a Web page using http:// or https://. How do I get the other web pages t...
2018/03/13
288
1,081
<issue_start>username_0: Im trying to pass the textbox value to textarea but I cant come up with the idea how to add new value to the existing in the textarea. ``` $('#firstnametxt').change(function () { $('#rev').val($('#firstnametxt').val()); }); $('#lastnametxt').change(func...
2018/03/13
249
864
<issue_start>username_0: Want to take measures to protect myself against XSS. Right now, I have: ``` sanitizeQuery('searchQuery').escape().trim() ``` Is that adequate protection? Or would you recommend adding something like DOM Purify (running on the node end) as well?<issue_comment>username_1: The `onchange` is o...
2018/03/13
746
2,514
<issue_start>username_0: I am trying to develop an @AzureFunctions using Xamarin Forms. But it is not accepting connections from the cell phone. How to configure host, port of Azure Functions on Visual Studio 2017 to enable connections from \* other than localhost connections? How to accept connections from local ne...
2018/03/13
1,042
4,171
<issue_start>username_0: I thought I have been successfully cache busting with angular-cli's `--output-hashing` option set to `all` to ensure users get the latest chunks/updates. I realized this isn't always working for lazily-loaded modules. If I make changes *only* to a lazily-loaded module + build + deploy to IIS, ...
2018/03/13
285
1,115
<issue_start>username_0: I tried to import a `mysqldump` generated .sql file but Google spanner didn't accept the syntax, which makes sense. With that, we're trying to migrate our data, which is in a MySQL data, into Google cloud spanner. Is this possible?<issue_comment>username_1: Here's a project that I used to upl...
2018/03/13
960
3,080
<issue_start>username_0: I'm working with some CMS system, and I have to paste HTML code (including CSS and JavaScript) in an editor. The problem is it parses the input to validate html code. I have this piece of problematic code ``` keys.sort(function(a,b) { if (a.position > b.position) return 1; if (a.posi...
2018/03/13
1,747
6,239
<issue_start>username_0: I'm trying to get Symfony in my Mac, so I installed symfony and composer in order to start developing, but when I create the project I have some problems: ``` composer create-project symfony/skeleton cost_management Installing symfony/skeleton (v4.0.5) - Installing symfony/skeleton (v4.0.5):...
2018/03/13
436
1,402
<issue_start>username_0: Hi I tired to use RegEx in PHP. The following elements I like to get with it: ``` ``` The Problem is that I get only ``` ``` with the following RegEx: ``` <(a|b)="[0-9]*"> ``` What do I have to change, that I get all three elements? Is there a ANDOR operator?<issue_comment>username_1: ...
2018/03/13
865
3,186
<issue_start>username_0: I am getting started with Jenkins Pipeline. My pipeline has one simple step that is supposed to run on a different agent - like the "Restrict where this project can be run" option. My problem is that it is running on master. They are both Windows machines. Here's my `Jenkinsfile`: ``` pipel...
2018/03/13
1,099
4,116
<issue_start>username_0: I'm trying to used react-navigation but I can not get it to work when I move each screens' components into multiple files. I always get this error: "The component for route 'Home' must be a React component". This error doesn't happen if I move all of the code into one file, so I'm not sure what...
2018/03/13
787
3,136
<issue_start>username_0: I am having issues passing protractor tests. As far as it looks, the project is based on a default angular 5 application but with additional styles/templates/layouts/components. As as result, a default e2e test that comes with the angular does not pass. The protractor configuration looks identi...
2018/03/13
784
2,788
<issue_start>username_0: Seems IE won't allow to open blobs directly. You have to use msSaveOrOpenBlob. But is there any way to convert it somehowe then. I do need to show PDF into a new tab of IE without downloading it or at least user should not interact and don't see it's being downloaded into e.g. system temp folde...
2018/03/13
1,015
3,315
<issue_start>username_0: I tried `cordova-uglify` ([link](https://github.com/rossmartin/cordova-uglify)) to minify a Ionic1 project, after I run ``` ionic cordova build --release ``` I see my js source code in `www` folder of `app-release-unsigned.apk`.. is not minified at all. `ionic info` prints: ``` [WARN] Err...
2018/03/13
525
1,345
<issue_start>username_0: I have a data `table` as follows: ``` id date1 date2 rate 1 01/01/2017 03/01/2017 0.60 1 02/01/2017 03/01/2017 0.40 1 03/01/2017 03/01/2017 0.00 1 04/01/2017 03/01/2017 0.00 1 05/01/2017 03/01/2017 0.00 2 . . . ``...
2018/03/13
953
3,341
<issue_start>username_0: Recently I'm learning the `set -e` of POSIX shell on Ubuntu 14.04. My reference material is the "IEEE Std 1003.1-2008, 2016 Edition", "Shell & Utilities" chapter. From [this section](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#set) I see `-e` doesn't cause the scrip...
2018/03/13
652
2,277
<issue_start>username_0: I am making a RoR app that has to do with comic books and I keep getting this error after I use the rails db:seed command: ``` rails aborted! SyntaxError: /Users/cggarcia171/Desktop/environment/ComicApp/db/seeds.rb:9: syntax error, unexpected tLABEL ch1 = Character.create (alias:'<NAME>', ...
2018/03/13
300
1,074
<issue_start>username_0: I am trying to write a lambda function that capture an image of my PCs webcam feed every time a trigger occurs. I want to programmatically add them to an S3 bucket without overriding them with the same key (like "image.jpg"). What's the best way to do something where the **filename is increment...
2018/03/13
316
1,266
<issue_start>username_0: I'm wondering how to best incorporate PHPSpreadsheet into Joomla! applications, on shared hosting. With PHPExcel, you just uploaded the library. PHPSpreadsheet is using Composer, which is new to me, but looks straightforward enough. However, I see Joomla! includes it to manage dependencies in...
2018/03/13
837
2,421
<issue_start>username_0: in DB#1 I am creating table tC by joining table A with table B where table B includes a list of values inserted by a remote query from a different DB#2 (DB link). ``` create table tC as ( select ta.col3, tb.col4 from tA, tB where ta.col1 = tb.col2 ``` Now I need to wri...
2018/03/13
661
2,048
<issue_start>username_0: This may have been asked before, but couldn't find searching. I'm trying to barplot of a variable called "pet" in my dataset called "habitat" which is categorical with 3 categories - "Y", "N", "Null". The following code works: ``` >barplot(table(habitat$pet),main = "Pet Distribution", xla...
2018/03/13
558
1,729
<issue_start>username_0: I'm trying to create a graph which stack two numbers based on two different dataframes. But with everything I've tried, the outcome is still lacking the proper display. ``` df1.plot.bar(color = 'r') df2.plot.bar(color = 'b', bottom = df1) plt.show() ``` Should I first convert the number to ...
2018/03/13
847
1,955
<issue_start>username_0: On Google Sheet, I currently have a cell that looks like this as a "raw" table: RAW: ``` Week Starting Date Apple type 12/31/2017 1/4/2018 Green 12/31/2017 1/5/2018 Green 1/7/2018 1/8/2018 Bad - Green 1/7/2018 1/8/2018 Bad - Green 1/7/2018 1/8/2018 Yellow 1/7/20...
2018/03/13
997
2,889
<issue_start>username_0: Suppose we have an array with integers -N to N in an array size of 2N + 1. We first shuffle the elements in the array, then try to find the maximum integer by iterating through the array from the first element to the last element: (code example is in Java) ``` int called = 0; int max = Integer...
2018/03/13
220
935
<issue_start>username_0: I want to reset my contact form after successful submission using AJAX/PHP, I am using the bootstrap 4.0 custom styles form validation javascript, where it adds an "form.addEventListener('submit', function(event))" to the form. After successful submission, when I try to reset the form using th...
2018/03/13
741
2,708
<issue_start>username_0: **Edit:** [this](https://stackoverflow.com/a/29777728/2436175) seems to address perfectly my question. --- Regarding [Which type trait would indicate that type is memcpy assignable? (tuple, pair)](https://stackoverflow.com/questions/49120246/which-type-trait-would-indicate-that-type-is-memcpy...
2018/03/13
463
1,799
<issue_start>username_0: So, what I am trying to do, is to find the primes in the array.but the problem is I always get a wrong value,like a array {1, 2, 3, 14, 5, 6, 7, 8, 9, 10};I will get count is 37.Is there anything wrong with my code? ``` int countPrimes(int array[], int size) { int count = 0; for(in...
2018/03/13
470
1,917
<issue_start>username_0: I am trying to write a regular expression to allow all strings which matching a pattern but excluding few string following the same pattern for example: select all string start with site: but not (site:dev or site:corp) what I have is ... site:.\*[^!site:dev$][^!site:corp$] this does not wo...
2018/03/13
1,420
4,036
<issue_start>username_0: I have as input the following Map ```elixir temp = %{ "temperature" => %{ "details" => "Temperature Template", "sensors" => [ %{ "name" => "TMP", "type" => "integer", "value" => 0 }, %{ "name" => "DEEP_SLEEP", "type" => "integ...
2018/03/13
1,032
3,029
<issue_start>username_0: If I have the list = ['a' ,'b', 'c'] and the excel file looks something this like ``` Column 1 Column 2 a 1 b 2 c 3 ``` How can I make a new list that replaces "a" with "1", "b" with "2", etc. To be clear, I want to make a new list that...
2018/03/13
734
2,484
<issue_start>username_0: There is a HTTP request which has bulk API's present in the body. Eg: ``` [{ "externalKey": "1", "customerDetails": { "address": { "address": "111 Bourke St", "country": "AU", "postcode": "3044", "state": "Victoria", "unitOrBuilding": "1" }, ...
2018/03/13
660
2,167
<issue_start>username_0: I have an `item` table as below (SQL Server 2008) ``` Id Name Price ------------------ 1 A 5 2 B 3 3 A NULL 4 B 4 ``` I'm writing a stored procedure to get items for the name and price. My parameters are ``` @Name nvarchar(255) @Price float ``` If t...
2018/03/13
548
2,102
<issue_start>username_0: I am developing a Flask application which gives call to the REST service developed in Flask. The target REST service method is secured using Basic Authentication. I found that for this type of authentication, I have to use base64 encoding. I am trying to pass the credentials to the service in t...
2018/03/13
701
2,472
<issue_start>username_0: I have a number of files in a directory named `edit_file_names.sh`, each containing a `?` in their name. I want to use a Bash script to shorten the file names right before the `?`. For example, these would be my current filenames: ``` test.file.1?twagdsfdsfdg test.file.2? test.file.3?.? ``` ...
2018/03/13
467
1,638
<issue_start>username_0: I'm playing a bit with Flutter and try to perform a http get request. Though I'm always getting an empty body in the response. For example with the following code : ``` import 'package:http/http.dart' as http; [...] http.Client client = new http.Client(); client .get("https://www.google...
2018/03/13
400
1,441
<issue_start>username_0: ``` request('GET', url_ws).done((res) => { if (res.statusCode==200) { parseString(res.getBody(),{explicitArray:false}, function (err, result) { pdfAnnotations=result['root']['element']; console.log(pdfAnnotations);//show value//second }); } }); console.log(pdfAnnota...
2018/03/14
797
2,757
<issue_start>username_0: I am using the latest versions of the `mssql` package and the `@types/mssql` package, and my typeRoots directory seems to be correctly set, but I keep getting these errors when trying to compile the TypeScript code: ``` error TS2339: Property 'connect' does not exist on type 'typeof "c:/Users/...
2018/03/14
1,126
2,881
<issue_start>username_0: I have a data.frame `df` ``` df = data.frame(v = c('E', 'B', 'EB', 'RM')) df$n= 100 / apply(df, 1, nchar) ``` Where `v` represents values `E = 4`, `B = 3`, `R = 2`, and `M = 1` I want to calculate a column like so: ``` v n idx 1 E 100 400 2 B 100 300 3 EB 50 350 4 RM 50 150 ```...
2018/03/14
963
2,878
<issue_start>username_0: I am passing props from one stateless function to another, and I get a reference error saying the prop is undefined. Here is the parent function: ``` const Home = () => { return ( Test ==== ) } ``` And here is the BackgroundImage function: ``` const Image = styled.div` background-i...
2018/03/14
700
2,730
<issue_start>username_0: I tried to put 3-backticks code block(```) in 3-backticks code block. but I could not get a correct result. How can I escape that in 3-backticks code block? Original markdown file: ``` # Markdown example ``` here is an example code. ``` // this area is nested 3-backticks code block. cons...
2018/03/14
2,554
8,645
<issue_start>username_0: I'm a beginner programmer and taking an intro to Java class. We were assigned to write a program that outputs the letter E made of asterisks with 5 down and 3 across as below: ``` *** * *** * *** ``` The only requirement was to use nested-loops and if statements to get to our result. Be...
2018/03/14
801
2,801
<issue_start>username_0: I am trying to parse a date in scala like below ``` scala> import java.text.SimpleDateFormat import java.text.SimpleDateFormat scala> import java.util.Calendar import java.util.Calendar scala> val simpleDateFormat = new SimpleDateFormat("YYYYMMDD") simpleDateFormat: java.text.SimpleDateForma...
2018/03/14
733
3,139
<issue_start>username_0: How do I maintain session state in an **AWS Lambda**? For example, if I need to query **DynamoDb** for subscription information for a logged-in user, how do I do that from the Lambda function if the user is using an **AngularJS** web app? I have the user logging in with **Auth0** and a custom ...
2018/03/14
647
2,688
<issue_start>username_0: I'm trying to make query for firebase realtime database from the swift. But the following code is not working. ``` var keyvalue = "somevalue" Database.database().reference().child("users") .queryOrdered(byChild: "key1").queryEqual(toValue: keyvalue.lowercased()) .observe(.value, with...
2018/03/14
565
2,268
<issue_start>username_0: We currently load most of our data into BigQuery either via csv or directly via the streaming API. However, I was wondering if there were any benchmarks available (or maybe a Google engineer could just tell me in the answer) how loading different formats would compare in efficiency. For exampl...
2018/03/14
603
2,133
<issue_start>username_0: I'm using [this](https://nodejs.org/api/crypto.html#crypto_crypto_randombytes_size_callback) with a length of 20 for uuid. Is it common practice to not check if the uuid generated has not been used already if it's used for a persistent unique value? Or is it best practice to verify it's not al...
2018/03/14
1,162
3,046
<issue_start>username_0: I need to find words with exactly two vowels using regex and matching This is what I have: ``` .*[aAeEiIoOuU].*[aAeEiIoOuU] ``` The problem is it is also giving me words with three or more vowels and I only want two. Thanks.<issue_comment>username_1: I believe you're currently allowing any...
2018/03/14
632
2,500
<issue_start>username_0: I am wondering what the best way is to retrieve a previously cached object. The code below works but the bit where the object is fetched from the dictionary looks like it can be done better. I feel like i might be missing something important. ``` public class ResourceProvider { private re...
2018/03/14
874
3,334
<issue_start>username_0: I really did overflow the stack on my first try, but then I put the return statement (see comment in code) without an argument and it worked. **Task:** Write a higher-order function loop that provides something like a for loop statement. It takes a value, a test function, an update function, ...
2018/03/14
1,791
6,613
<issue_start>username_0: I am new to C++. I've created a program that generates a random number and the user try to guess it. It will inform you if you have put a higher or smaller number until you guess the correct number. After guessing the correct number, it will ask you if you want to play again. If you type `YES`,...
2018/03/14
356
1,272
<issue_start>username_0: I'm pulling a JSON request from the politifact API: ``` request('http://politifact.com/api/v/2/statement/?format=[JSON]ℴ_by=-ruling_date&limit=1') .then(({ data }) => { newArticles = extractListingsFromJSON(data); ``` and parsing it with a functio...
2018/03/14
1,411
5,079
<issue_start>username_0: I've found the documenation for the python argparse module, and it mentions the formatter\_class. I see nothing on that page for things like the width parameter or max\_help\_position. Where are those documented? <https://docs.python.org/3/library/argparse.html><issue_comment>username_1: Argpa...
2018/03/14
482
1,660
<issue_start>username_0: When I install jekyll bundle and entering the command of `gem install jekyll bundler`. The terminal pop up the message of bundler's executable "bundle" conflicts with /usr/local/bin/bundle Overwrite the executable?<issue_comment>username_1: In my case, I have to overwrite both `/usr/local/bin/...
2018/03/14
1,974
5,927
<issue_start>username_0: I'm trying to open a file in Python, but I got an error, and in the beginning of the string I got a `/u202a` character... Does anyone know how to remove it? ``` def carregar_uml(arquivo, variaveis): cadastro_uml = {} id_uml = 0 for i in open(arquivo): linha = i.split(",") ...
2018/03/14
650
2,382
<issue_start>username_0: I have a fairly new macbook pro and I'm simply trying to install homebrew according to the directions on their site: `/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"` However, when I run this I get the following output: `The user \u cannot b...
2018/03/14
757
1,978
<issue_start>username_0: Though I have seen versions of my issue whereby a dictionary was created from two lists (one list with the keys, and the other with the corresponding values), I want to create a dictionary from a list (containing the keys), and 'lists of list' (containing the corresponding values). An example...
2018/03/14
2,600
9,927
<issue_start>username_0: The SliverAppBar has an attribute bottom which has to have preferredSize. Right now I have it returning constant value: ``` ... new SliverAppBar( expandedHeight: _kFlexibleSpaceMaxHeight, flexibleSpace: new FlexibleSpaceBar(.....) ... bottom: new BottomB...
2018/03/14
1,811
6,406
<issue_start>username_0: I am trying to make `navtop` (dark grey box), currently under the `navbar`, be at the top of the page in that section above the `navbar`, see picture below. I am not great at positioning elements. [![](https://i.stack.imgur.com/Rlgwz.png)](https://i.stack.imgur.com/Rlgwz.png) The `navbar` is i...
2018/03/14
1,026
3,275
<issue_start>username_0: I am working with a windows desktop application , which is using PDFtron nuget library. I am using Visual Studio 2017 with .Net Core version as 2.0.5. To compile the project I need to add reference to the specified PDFTron Nuget library. But whenever I try to install this package, I get foll...
2018/03/14
492
1,906
<issue_start>username_0: I am trying to load a PDF within an `iframe` and have to execute few events only when PDF has been loaded. (Note: By PDF getting loaded, I mean PDF contents are visible on screen not the initializing/loading progress bar of Adobe reader). I am using the following code for now: ``` ``` I have...
2018/03/14
1,150
5,055
<issue_start>username_0: I am learning game development in Unity 4.6.9. When I added background music to my game it was stacking every time I clicked ***play again*** button. So, I searched and found that I have to destroy extra music objects creating every time I clicked play again, so I used following code:- ```cs u...
2018/03/14
917
3,623
<issue_start>username_0: I am new to Swift, and I am trying to develop a quiz app. When I try to load the app on my iPhone, i get this error of SIGABRT in the AppDelegate class, and then there is just a white screen on the phone. How can I fix this? I have already tried to clean the code, and I erased and checked caref...
2018/03/14
907
3,941
<issue_start>username_0: I'm trying to implement some middleware in .NET Core that rounds decimals to 2 decimal places. All of the other mapping can work as it currently does via the `ComplexTypeModelBinder`. I've tried calling that binder before mine or inheriting from it, but it ends up with the model just being null...
2018/03/14
521
1,706
<issue_start>username_0: I was trying to capture my screen image using PIL.ImageGrab.grab(). Here is my problem -- When I use the code below, `img` is only the upper left part of my screen. ``` from PIL import ImageGrab img = ImageGrab.grab() ``` Use `win32api.GetSystemMetrics()` to find out my screen size. ``` > G...
2018/03/14
708
2,525
<issue_start>username_0: In a Python expression like `str in [str1, str2, str3]` or `1 in [1, 2, 3]`, does the `in` operator use `==` or `is` to compare the first object with the objects in the list?<issue_comment>username_1: It seems to use `==`. With the following test: ``` Python 2.7.14 (default, Mar 1 2018, 19:24...
2018/03/14
494
1,615
<issue_start>username_0: So the goal is to return "true" if the number 9 appears in the first 4 numbers of a list. I've done this by first creating a new list that contains only the first 4 numbers, and then checking if 9 appears there. ``` def array_front9(nums): lst = [] lst.append(nums[:4]) if 9 in lst: r...
2018/03/14
1,733
5,089
<issue_start>username_0: So, I'm having trouble with the legend of a multiple line/point/bar plot. Just the lines appears and I couldn't change its names neither add the bar element to it, here's the code I´m running: ``` df.rain %>% ggplot(aes(x = date))+ labs(y = "Rain (mm); Temperature (°C)")+ geom_bar(aes(y...
2018/03/14
1,659
4,931
<issue_start>username_0: I need help for looping back on the start of the program [C++]. ``` #include #include using namespace std; int main(int argc, char \*argv[]) { srand(time(NULL)); int rand\_number = rand() % 101; int number; int counter = 1; cout << "NUMBER GUESSING" << endl; cout << "Try to guess nu...
2018/03/14
714
2,546
<issue_start>username_0: i had some issues with Raycaster when i tested my code on mobile device. I realised the same problem appears on the official examples on threejs.org when you activate tactile touch( ex: <https://threejs.org/examples/?q=inter#webgl_interactive_cubes> ). Is there an alternative to Raycaster to i...
2018/03/14
377
1,687
<issue_start>username_0: In Apache Pulsar topic documentation it says can we set a topic time retention policy to -1 for infinite time based retention, What are the downsides of having infinite retention and can we use pulsar as message store where data lives forever in topics and build event sourcing application aroun...
2018/03/14
389
1,196
<issue_start>username_0: How can I get a model name as a "string" from a model instance. I know you can do something like `type(model_instance)` but this is returning the class itself as an object not as a string.<issue_comment>username_1: By defining the **str** or **unicode** method ? Upvotes: -1 <issue_comment>use...
2018/03/14
533
1,549
<issue_start>username_0: I want an efficient way of grouping strings whilst keeping duplicates and order. Something like this ``` 1100110002200 -> 101020 ``` I tried this previously ``` _case.GroupBy(c => c).Select(g => g.Key) ``` but I got 102 But this gives me what I want, I just want to optimize it, so I wo...
2018/03/14
766
3,279
<issue_start>username_0: From my MainActivity (Launcher Activity) I press a button to start my GameActivity. I have it so when I hit the Back button in Game Activity, I don't return to my MainActivity and instead return to my home screen. Now when I resume my app it goes to MainActivity instead of returning to GameActi...
2018/03/14
891
3,413
<issue_start>username_0: In the new Laravel Resource classes, you are able to remove attributes based on anything you like. If you want to return many items, you can use the function ``` Resource::collection() ``` But that does not let you add metadata in one place. Enter a Collection, great, this is many items in...
2018/03/14
669
2,507
<issue_start>username_0: I have a React.JS component that will map the `notes` variable to display. However, I have run into the problem of having no notes and receiving an error. What is a proper way to approach this? Here is the code: ``` import React, {Component} from 'react'; class List extends Component { ...
2018/03/14
646
2,543
<issue_start>username_0: I am making http get requests using gson and volley. My idea was to have a method return an object containing serialised JSON. ``` public responseHolder getRequest(){ //Make call //Parse Json into JsonObject return responseHolder; } ``` My problem is that I want the method work w...
2018/03/14
1,096
4,208
<issue_start>username_0: The following classes are used to store a list of surveys in a Room database. LiveData is used to be able to update Entity class for Database: ``` @Entity public class Survey { @PrimaryKey @NonNull private String surveyID; private String surveyName; private String url; private double lat; ...
2018/03/14
1,986
6,835
<issue_start>username_0: I've been trying to set a flutter path so I don't need to do a temporary path every single time. I'm new to using terminal and Unix (Mac user also) and don't understand how to set my path with the instructions on the site. And it doesn't help that I'm not completely sure where I out my flutter ...
2018/03/14
750
1,991
<issue_start>username_0: I wish to use ggrepel to add labels to the ends of the lines of a ggplot. To do that, I need to make space for the labels. To do that, I use scale\_x\_continuous ot extend the x-axis. Not sure that's correct and am open to other strategies. I can do it when the x\_axis type is friendly numeric...
2018/03/14
956
2,885
<issue_start>username_0: I have written a stack class: ``` template class stack { const size\_t c\_init\_cap = 12; size\_t m\_size; size\_t m\_capacity; std::unique\_ptr m\_head; public: /\*\* \* @brief Default constructor \*/ stack() : m\_size{0}, m\_capacity{c\_init\_cap}, m\_head{std::make\_unique(new ch...
2018/03/14
371
1,356
<issue_start>username_0: I have a method in a service class that relies on an http get using an Id. My method returns an Observable with different properties that the rest of my app depends on. ``` getCat(catNumber: string): Observable { const url = `${this.serviceURL}Cat/${catNumber}`; return this.\_http.get(url)...
2018/03/14
655
2,000
<issue_start>username_0: I'm 'unit testing' greenhorn. What did I wrong here? How can I test such simple components? `test.js` ``` import React from 'react'; import { shallow } from 'enzyme'; import StartButton from './'; describe('StartButton', () => { const wrapper = shallow(); it('renders correctly', () => {...
2018/03/14
482
1,453
<issue_start>username_0: Say I have the following HTML that I'd like to implement using Pug: ``` {{ name1 }} {{ name2 }} {{ name3 }} ``` There are several of these in a row, so I want to inline the tags. If I use this Pug template: ``` .person: i.icon.person {{ name1 }} .person: i.icon.person {{ name2 }} .person: i...
2018/03/14
679
2,702
<issue_start>username_0: **This is the method to test:** It gets an URL and return a json after sending a GET request. It is a plain function which sits in a package rather than a method from a class. Same case for the extension method below. ``` fun getJson (url: String): String { val connection = URL(url).op...
2018/03/14
879
3,132
<issue_start>username_0: I am trying to pre-load font-awesome to improve my page load times: ``` ``` However...Chrome seems to download the font twice and reports > > The resource > <http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/fonts/fontawesome-webfont.woff2?v=4.3.0> > was preloaded using link preload but...
2018/03/14
1,792
5,427
<issue_start>username_0: I am very new to Python programming and I am trying to make a simple application. What I'm trying to do is search for a text on Google and return the links, my program does this fine. The other thing is if Google has the quick answer like in the photo below, I want to grab it, and this is wher...
2018/03/14
1,140
4,146
<issue_start>username_0: Hey everyone so I have a Movie Clip inside my `platforms` movie clip called `mcTaco` so `platforms.mcTaco`. I add the `platforms` and the `player` which I check for hitTest collisions to the stage dynamically using code. When I check for the `player` and `platforms.mcTaco` collison everything w...
2018/03/14
286
848
<issue_start>username_0: Assume that I have an element as below: ``` ``` And in the scss stylesheet, I have the styles as below: ``` .A { &.B { } &.C { } } .B { &.A { } &.C { } } .C { &.A { } &.B { } } ``` What are the CSS styles the element will pick up and how does it work?<issue_comm...
2018/03/14
905
2,441
<issue_start>username_0: ``` import urllib.request import json from pprint import pprint def main(): url="https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20in%20(select%20woeid%20from%20geo.places(1)%20where%20text%3D%22nome%2C%20ak%22)&format=json&env=store%3A%2F%...
2018/03/14
1,093
4,611
<issue_start>username_0: Might seem a silly question, but Microsoft's documentation isn't very beginner friendly, I think. It uses as examples "<http://localhost:31544>" for the sign-on url and "<http://MyFirstAADApp>" for the redirect URI, but although I understand what a local host is I can't figure out what exactly ...
2018/03/14
423
1,190
<issue_start>username_0: Hello guys, When I run this code: ``` from requests_html import HTMLSession url = 'http://www.spell.org.br/documentos/resultadobusca/?eou%5B%5D=&tipo_busca=simples&campo%5B%5D=RESUMO&texto%5B%5D='\ + parsekeyword(keyword) +\ '&eou%5B%5D=E&campo%5B%5D=TITULO&texto%5B%5D=&eou%5B%5D=E&campo...
2018/03/14
359
1,265
<issue_start>username_0: I am making my first website in Django but my tutorial was created long ago. I need to add the variable question\_id into the following path: ``` path('/',views.detail, name = "detail") ``` the function detail looks like this: ``` def detail(request, question_id): return HttpResponse('...
2018/03/14
923
3,053
<issue_start>username_0: The following code: ``` import subprocess collection = filename[:filename.find('.')] working_directory = 'C://Users//Admin//Downloads//' json_file = filename + '.json' mongoimport_cmd = 'mongoimport -h 127.0.0.1:27017 ' + \ '--db ' + db_name + \ ' --colle...
2018/03/14
586
1,792
<issue_start>username_0: I have a Basic Html file that contains text inside tags as follows: ``` {#One#} {#Two#} **{#Three#}** *four* {#five#} | {#six#} {#seven#} *eight* ``` Using Python I wanted to parse this file and and check for a special character (for eg. '{') and if this character is not present then retur...
2018/03/14
434
1,696
<issue_start>username_0: I have a JavaScript function in my Freemarker file as follows: ``` function myFunc(){ var myString = "I like pizza"; return myString; } ``` I am trying to assign the myString return value from myFunc to myVar in Freemarker as follows: ``` <#assign myVar = myFunc()> ``` Unfortunately,...
2018/03/14
1,179
4,061
<issue_start>username_0: I created a fresh Android native project in Visual Studio 2017 15.6.2, and without changing a single project setting or line of source code, hit build. It failed with the following error: ```none 1>------ Build started: Project: AndroidNDKTest.NativeActivity, Configuration: Debug x86 ------ 1>...
2018/03/14
652
1,903
<issue_start>username_0: I'm new at javascript was wondering why I got four return values: ``` for(i=0; i < 10; i++) { i = i * i; console.log(i); } // 0 // 1 // 4 // 25 ```<issue_comment>username_1: Because you are setting the value of i inside your loop. Initially i = 0; Prints 0x0 = 0; i = 0 Next iteratio...
2018/03/14
733
2,205
<issue_start>username_0: I have a batch file that runs and calls .vbs file called "SelectNBType.vbs" The mentioned .vbs file prompt a small UI output for the user to input a string as shown. ``` ///Start of Batch file/// For /F "Tokens=2 Delims=" %%I In ('cscript //nologo SelectNBType.vbs') Do Set _NBType=%%I IF %_N...
2018/03/14
2,786
7,676
<issue_start>username_0: I have a list contains set of the history of a file. I need to separate each element in the list into several columns and save it to CSV file. The columns I need are "commit\_id, filename, committer, date, time, line\_number, code". I tried to split them using space, but it didn't work for the ...
2018/03/14
310
1,029
<issue_start>username_0: Is there a way using "View" to make it loop? I have already tried using: ``` function generateListViewPager (shapeStyle) { return () => { return ( for(let i = 0; i < 40; i++){ Test i } ) } } ``` I need to show my view from 0 to 39, how would I do it using a loo...