date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/09
377
1,280
<issue_start>username_0: As you may assume - I'm stuck ;) My problem is that I have an object with some other objects within: ``` let players = { buggy: { name: 'John', surname: 'Cocroach', rank: 872 }, valentino: { name: 'Antonio', surname: 'Valencia', rank: 788 }, tommy: { name:...
2018/03/09
738
1,702
<issue_start>username_0: I know pandas can automatically join rows and get the sum of the rows using `groupby()` function. But how to combine two or more rows which don't have common values. Consider the following example data set. ``` Col1 Col2 Col3 Col4 0 11 13 5.5 0.9 1 14 6 3.1 0.7 2 18 7 5.5 ...
2018/03/09
507
1,312
<issue_start>username_0: I have a dataframe as follows: ``` V Out[58]: P1 P2 P3 V1 a b c V2 f g h V3 k l m ``` I want to store them all in a list L such that: ``` L=[a,b,c,f,g,h,k,l,m] ``` iterating from 1 row to another. Any idea how to go about it? Thanks<issue_comment>username_1: Acces...
2018/03/09
701
2,788
<issue_start>username_0: I'm in an ASP.NET 4.6 Web Forms application. I am trying to use claims to check if a user is authorized to payroll page like this: ``` protected void Page_Load(object sender, EventArgs e) { if (!ContainsClaim(User.Identity.Name, "role", "admin")) { //execut...
2018/03/09
1,288
4,778
<issue_start>username_0: I'm using typescript with aurelia and I think I can't find a way to put a variable into the right scope. ``` // detail.ts import {autoinject} from 'aurelia-framework'; import {HttpClient} from 'aurelia-fetch-client'; import {pApi} from './resources/services/APIService'; let http = new HttpCli...
2018/03/09
570
1,882
<issue_start>username_0: How to add something like that: ``` border-collapse: collapse; ``` in Material Design Table? When I add border code to **.mat-cell**: ``` .mat-cell { border: 1px solid; } ``` in some places the border looks like 2px. I would like to add a border because I would like to change the co...
2018/03/09
2,115
8,308
<issue_start>username_0: I have created a new Symfony 3.4 project using: ``` composer create-project symfony/skeleton my-project ``` After that I added the following components: ``` composer require twig composer require annotations composer require maker ``` And created a Controller: ``` php bin/console make:...
2018/03/09
787
2,654
<issue_start>username_0: I am trying to make an array of character Arrays. The program will read in sentences and store the sentences in a character array, and then that character array will be stored in another array. After reading numerous websites and Stack Over Flow pages I think it can be done like this. The progr...
2018/03/09
1,037
3,005
<issue_start>username_0: I'm trying to get the nested station names using jQuery and display the names in a 'div'. I'm able to display the contents of 'jObject' however, I'm unable to get to the specific station name. This is what i have tried so far. ``` $.ajax({ url: "https://transportapi.com/v3/uk/tube/station...
2018/03/09
610
1,975
<issue_start>username_0: My database looks like this: [![enter image description here](https://i.stack.imgur.com/85Ehv.png)](https://i.stack.imgur.com/85Ehv.png) I have a variable that looks like this: ``` $following = "<NAME>"; ``` I would like to get the rows where the column 'username' is in the variable `$foll...
2018/03/09
909
2,637
<issue_start>username_0: I have a pandas data frame that uses multi-index for both column and rows. Here is a simplified example: ``` import pandas as pd import datetime col1 = [datetime.date(2018, 1, 1)+i*datetime.timedelta(days=1) for i in range(4) for j in range(2)] col2 = [ 'lunch', 'dinner', 'lunch'...
2018/03/09
258
1,138
<issue_start>username_0: I found native advance ads example on github. I found in code there is two layout file one for install\_ads layout file and another for website content layout file. So my question is that can we modify these layout file according to application UI. Thanks in advance<issue_comment>username_1: If...
2018/03/09
1,317
4,439
<issue_start>username_0: I have been trying to get acclimated to set based processing with SQL Server. Below is a simplified version of cursor processing for this task. It involves creating an order from items in a shopping cart. The order is created, line items are added to the order details table, the total is accumu...
2018/03/09
200
551
<issue_start>username_0: I have a dictionary lets call dict. The keys are numbers, and the values are either 'A' or 'B' and I'm trying to find the number of times 'B' is a value in the dictionary.<issue_comment>username_1: `list.count` provides one way: ``` d = {1: 'A', 2: 'B', 3: 'B', 4: 'C', 5: 'A', 6: 'B'} list(d....
2018/03/09
527
1,448
<issue_start>username_0: I have two matrices, A of shape 512\*3 and B of shape 1024\*3 I want to calculate pairwise subtraction between their rows, so the result would be of shape 512\*1024\*3 (they are actually arrays of 3D point coordinates : x , y , z and I eventually want to find k nearest points from B to every p...
2018/03/09
1,210
4,362
<issue_start>username_0: I have a problem in understanding of the notion of static variables in Python classes. According to [Static class variables in Python](https://stackoverflow.com/questions/68645/static-class-variables-in-python), whenever we define a variable outside a method and inside a python class, this vari...
2018/03/09
486
2,121
<issue_start>username_0: I'm coding a script for a spreadsheet. This script creates a menu. Then by choosing an option in this menu a function (which uses API) will run in order to filter some columns and hide others. The problem is: This sheet is protected (because shared with coworkers) but I want to allow people...
2018/03/09
264
1,135
<issue_start>username_0: Im working on a school project that requires me to create a basic database based on Olympic Games. Here is my current Relational Model View: [relational model view](https://i.stack.imgur.com/megEG.png) My question is, can I have my 'olympics' table sitting in my database with no relationship...
2018/03/09
356
1,315
<issue_start>username_0: I have a scenario like this. ``` private val feeder = Array(200, 404).map(e => Map("code" -> e)).random.circular private val search = scenario("search") .feed(feeder) .exec(http("search") .get("/search/") ...
2018/03/09
725
2,466
<issue_start>username_0: I've been searching around and it comes out that if we don't assign a value of a variable, the output will be undefined. Is that correct and if so, why upon typing on the console: `Hello!` - there are no tabs or blanks but the output is?: `Blanks: 0` `Tabs: 1` `New Lines: 1` Why `Blanks` is...
2018/03/09
1,389
3,603
<issue_start>username_0: I am starting to learn android but havent been able to get anywhere. I downloaded android studio as per instructions and im trying to set up an AVD. I am using a Mac Air(macOS High Sierra) with java 1.8.0\_51. The moment i launch an AVD there is a warning in the event log: "Emulator: Warning...
2018/03/09
787
3,018
<issue_start>username_0: I am trying to call a `UIAlertController` from within my `UITtableViewCell` when my function is called. It gives me an error saying present is not available. I understand it's not within a `ViewController`. I am looking for an approach to access it. ``` override func awakeFromNib() { supe...
2018/03/09
675
2,698
<issue_start>username_0: I have a Honeywell Scanner that outputs text when scanning bar codes. I can use it as a "keyboard" for text inputs, which comes in very handy because I don't have to interface anything. But it has the downside of having to focus an input and thus displaying the virtual keyboard of the mobile de...
2018/03/09
903
3,277
<issue_start>username_0: I started making a project that is showing which bands I like, then ask what artist/band's albums they want to see rated by me. I've got it to show what albums I like but then whenever I try to get Python to show how I rated each song in a specific album for the band/artist, it doesn't do anyth...
2018/03/09
372
1,208
<issue_start>username_0: I've got a data set that's several hundred elements long. I need to loop through the arrays and objects and determine if the data in them is less than a certain number (in my case, 0). If it is, I need to remove all those data points which are less than zero from the data set. I've tried .pop ...
2018/03/09
738
2,646
<issue_start>username_0: I try to load the user profile like below ``` @IBAction func Btn_LoadDataFromDataBase(_ sender: UIButton) { let myurl = "site.com/profile.php" LoadURL(url: myurl) } func LoadURL(url: String) { do{ let appURL = URL(string: url)! // convert string to ...
2018/03/09
590
2,187
<issue_start>username_0: I'm trying to slowly introduce Styled-Components into my existing codebase which relies heavily on global SASS variables (partials imported into a `main.scss`). How do I reference the SCSS variables? The following doesn't work: ``` import React from 'react'; import styled from 'styled-compone...
2018/03/09
1,735
6,192
<issue_start>username_0: If two people are working on the same repository on github and the same branch master. Then say person A pushes their change to master and I as person B, how do I check the files changed in after calling `git fetch`? If I do: ``` git fetch git merge master origin/master ``` I get this lin...
2018/03/09
582
2,126
<issue_start>username_0: Let's say I have a class `Product` and a class `AuctionedProduct` which derives from `Product`. I then have a virtual function `foo` that does 'x' if I'm working with a `Product` base class and 'y' if it's actually an `AuctionedProduct`. Given an object, how can I determine which class is actua...
2018/03/09
810
2,775
<issue_start>username_0: I am looking to write an Excel macro where I have an example data set like shown below. This data is located in `Sheet1` of Excel. ``` BG. test1 743, DF. test2 34, GH. test3 20, DF. test4 29, and WS. test5 3 ``` I am looking to copy only the specific cells that contain data w...
2018/03/09
674
2,357
<issue_start>username_0: trying to get second highest part cost. what I have: ``` SELECT TOP 1 WITH TIES PartNbr, Description FROM PART WHERE EXISTS (SELECT TOP 2 WITH TIES PartNbr FROM PART ORDER BY Cost DESC) ORDER BY Cost ASC; GO ``` the data: ``` [PART]( [PartNbr] [numeric](18, 0) NU...
2018/03/09
620
1,849
<issue_start>username_0: I have a VPC with CIDR 172.16.58.3/26. I created only single subnet with that VPC CIDR (172.16.58.3/26). Now I'm trying to attach new subnet to exiting VPC and also with new IP block to it with CIDR 172.16.17.32/27 it's not working. Why? I read this document as well [<https://docs.aws.amazon...
2018/03/09
392
1,551
<issue_start>username_0: I'm quite new to Python/Anaconda, and I'm facing an issue that I couldn't solve on my own or googling. When I'm running Python on cmd I can import and use numpy. Working fine. When I'm running scripts on Spyder, or just trying to import numpy on Anaconda Prompt this error message appears: > ...
2018/03/09
1,036
3,487
<issue_start>username_0: I've looked at the examples and I think I should be using a JOIN but I can't get the syntax right and it's nothing but errors. I need to return a table showing Counts based on criteria. My procedure looks like this ``` SELECT SalesMan, Count(SalesMan) AS SalesCount FROM Customers WHERE Sal...
2018/03/09
496
1,627
<issue_start>username_0: I have two dataframes: ``` import pandas as pd from quantlib.time.date import Date cols = ['ColStr','ColDate'] dataset1 = [['A',Date(2017,1,1)],['B',Date(2017,2,2)]] x = pd.DataFrame(dataset1,columns=cols) dataset2 = [['A','2017-01-01'],['B','2017-02-04']] y = pd.DataFrame(dataset2,columns=col...
2018/03/09
602
1,768
<issue_start>username_0: I have a big Pandas Object with three date columns, which I would like to merge and save in another pandas object. The data looks like that: ``` name | review | sys_date | rev_date | m_date user1 | hello | 1.1.2018 | 31.12.2017 | 1.1.2018 user2 | hi | 1.1.2018 | 28.12.2017 | 31.1.2017...
2018/03/09
270
972
<issue_start>username_0: I'm looking at a Spring `Qualifier` annotation as follows: ``` @Autowired @Qualifier("&fooStreamBuilder") private FooFactoryBean fooFactoryBean; ``` I haven't seen the "&" in an annotation like this before. What is it and what does it do?<issue_comment>username_1: Figured it out. In the late...
2018/03/09
1,029
4,081
<issue_start>username_0: When submitting the form in register.blade.php, you are redirected back to the index rather than being brought back to the original page with errors displayed. I am not sure why this is. The create method in the controller is called, but execution stops after the validation (as expected). Ther...
2018/03/09
1,400
4,354
<issue_start>username_0: I have a List of String and I want to filter out the String that doesn't match a regex pattern Input List = `Orthopedic,Orthopedic/Ortho,Length(in.)` My code ``` for(String s : keyList){ Pattern p = Pattern.compile("[a-zA-Z0-9-_]"); Matcher m = p.matcher(s); if (!m.fi...
2018/03/09
1,306
4,034
<issue_start>username_0: ``` an infinite endeavor ``` The CSS is a separate file, and I've been searching for hours for a solution. <https://i.stack.imgur.com/3GdHj.png><issue_comment>username_1: You shouldn't construct a `Pattern` in a loop, you currently only match a single character, and you can use `!String.mat...
2018/03/09
622
2,147
<issue_start>username_0: C# warns for unused variables that are compile-time constants: ``` static void Main(string[] args) { var unused = "hey"; //CS0219 The variable 'unused' is assigned but its value is never used Console.WriteLine("Hello World!"); } ``` But the F# compiler does not, even though the edito...
2018/03/09
1,028
3,791
<issue_start>username_0: I tried my own "placeholder in a `UITextView`" implementation. My approach was this: I create a `UILabel` in a `UITextView` subclass, and I set the constraints of the `UILabel` to match the size of its superview (`UITextView`). This is the code where I create the `UILabel` and assign it to a...
2018/03/09
732
2,048
<issue_start>username_0: I am trying to plot the fft of a wav file, I have successfully completed it using the regular fft but I wanted to experiment with `rfft` as my application was to perform this in music. When I try to plot `xf` and `yf` (figure 2) I run into an issue where `xf` is half the length of `yf` and I ca...
2018/03/09
547
1,642
<issue_start>username_0: Using Access VBA, In a form, I want to save every time a field changes. I'm guessing because I'm using some very complex queries, they don't always save immediately when they're dirty. `DoCmd.RunCommand acCmdSaveRecord` does the trick. So my workaround is that every field has ``` Private Su...
2018/03/09
2,047
5,729
<issue_start>username_0: I have a question about the extent of the functionality of LAG. In the specific example I am dealing with I have a table similar to the following, although this is very simplified: ``` ID Name ItemID VisitDate ----------- ---------------- ----------- ---------- 316 ...
2018/03/09
844
2,462
<issue_start>username_0: I have thousands of images which are labeled `IMG_####_0` where the first image is `IMG_0001_0.png` the 22nd is `IMG_0022_0.png`, the 100th is `IMG_0100_0.png` etc. I want to perform some tasks by iterating over them. I used this `fnames = ['IMG_{}_0.png'.format(i) for i in range(150)]` to ite...
2018/03/09
893
2,983
<issue_start>username_0: Because we've done some rearranging of our documentation setup, I have two separate read the docs projects which I need to build from the same GitHub repo. One of them is brand new, and the other used to be pointed to the old repo. I have set up a webhook on each project, and added both these ...
2018/03/09
550
1,883
<issue_start>username_0: Ok, so what I want to do is to retrieve some info from an `input` element, which is of `type` `date`. I then store this in a .json file, and I parse it later on to retrieve the data upon program start. After that, I want to use the `date.getDay()` function to figure out what day that date falls...
2018/03/09
574
1,872
<issue_start>username_0: I have this code: ``` keys = ['well done','come on','going to','<KEY>'] values = ['well','going','come','D'] category = [] for index, i in enumerate(keys): for j in values: if j in i: category.append(j) break if index == len(category): ca...
2018/03/09
608
2,011
<issue_start>username_0: Here is my Perl code I want know exactly what happens in the expression `join '', @{ $imap->top($i) }` ``` use Email::Simple; use Net::IMAP::Simple::Gmail; my $server = 'imap.gmail.com'; my $imap = Net::IMAP::Simple::Gmail->new($server); $imap->login( '<EMAIL>' => 'user@742' ); my $nm = $i...
2018/03/09
226
864
<issue_start>username_0: I'm having issues with link-time and compile-time ssl backend errors when trying to import pycurl into a python script. This script ran fine on OSX, however not on my current setup. I am running Ubuntu 16.04LTS on VirtualBox, Host OS Win10, Python 2.7.12, using pycurl-7.43.0.1. The error I rece...
2018/03/09
251
793
<issue_start>username_0: i am on an old ubuntu environment (Ubuntu 12.04.5 LTS) and bash\_completion is not working even i included it in my .bashrc: ``` if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi ``` i tried including /etc/bash\_bashrc, but still not working: ``` if [ -f /etc/bash_bashrc ]; the...
2018/03/09
779
2,966
<issue_start>username_0: i have `.htaccess` file and this is a script within it: ``` Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST\_FILENAME} !-f RewriteCond %{REQUEST\_FILENAME} !-d RewriteRule ^register/$ index.php?c=Page&a=register [L] ``` in my layout file, i load css and js with absolute path...
2018/03/09
399
1,416
<issue_start>username_0: in my program i use a search view with recyclerview , in xml ,search view is above the recycler view now my problem is when i click on search view position, of recyclerview goes up and placed upon the search view. i use ConstraintLayout and if i change the items layout connections , the button...
2018/03/09
695
2,565
<issue_start>username_0: I'm using `cat` to create a new file via a shell script. It looks something like: `./script.sh > output.txt` How can I access `output.txt` as a variable in my script. I've tried `$1` but that doesn't work. The script looks something like: ``` #!/bin/sh cat << EOF echo "stuff" EOF ``` -...
2018/03/09
696
2,603
<issue_start>username_0: I've got a simple example with reduce and it returns a length of two and not three. Why? I would have expected it will iterate through all three. ```js const sessions = [{ "id": 101, "sessionId": 6182, "attendvalue": 2 }, { "id": 102, ...
2018/03/09
937
2,066
<issue_start>username_0: I have a file of sequences. ``` >seqA lakjdsflakjsdlkjals;dkjfal;kdjsfl;aksdjf;lakjsdfl;kjalsdkjf alsdkjfalskdjf;alsdfj;alkdjsf;lakjsdf;lkajsd >seqB fjal;kdjsfla;kdjsflkajdslkjfaghal;sdkjg >seqC a;lksdjl;akjsdg;lkjsdfl;kajdsl;kgj;alkdjsg;lkajsdgl lsdkfja;lksdjf;lakdjsf;lkajsdfl;kjal;sdkfjal;s...
2018/03/09
190
646
<issue_start>username_0: How are these menus called in iOS and how to implement them in Objective-C ? [![enter image description here](https://i.stack.imgur.com/AfzDG.jpg)](https://i.stack.imgur.com/AfzDG.jpg)<issue_comment>username_1: You can accomplish that with `UIAlertController` with image for every `UIAlertActio...
2018/03/09
2,298
7,546
<issue_start>username_0: After Xamarin installation in VS 2017 and after creating a cross-platform project in app.xaml.cs I have ten errors and nine warnings from the begginning (without doing anything). I did already a search and I find a solution to update xamarin forms to latest version but xamarin form has the late...
2018/03/09
407
1,580
<issue_start>username_0: I am running into an error were Yoast keeps pulling blog posts that are for members only and causing login screen to pop up. When I disable Yoast across the whole website it works. But i need to be able to keep keep the plugin without running into errors like this.<issue_comment>username_1: 1. ...
2018/03/09
473
2,045
<issue_start>username_0: This is the interview question I faced, if we have 1 TB data in HDFS. **Which type of method** in hive gives us faster performance i.e `partitioning` or `bucketing` ? I told them depending upon data we choose either `partitioning` or `bucketing` .But the interviewer didn't satisfied with my an...
2018/03/09
316
1,145
<issue_start>username_0: Having some slight issues with laravel validation rules. I.e. I have setup a form with a field name of 'url'. This url needs to be a URL but is not required. So I have: ``` 'url' => 'url', ``` In the validation rules, but it still comes back on submit that the URL is an invalid format. But ...
2018/03/09
452
1,597
<issue_start>username_0: Check if every digit of a given int is less than "base" in a recursive manner. In "pseudo-code" ``` boolean is_base ( int base, int num) { if num = 0 return true; else if num mod 10 < base is_base (base, num/10) else return false } ``` Ocaml code ``` let rec ...
2018/03/09
702
2,818
<issue_start>username_0: All, I have recently run into an issue where my bounce rate on my website [www.x3tradesmen.com](https://www.x3tradesmen.com) dropped significantly (less than 10% and sometime even 0%). I have read multiple threads trying to solve the issue and have downloaded a chrome extension "Google Tag Ass...
2018/03/09
773
3,023
<issue_start>username_0: I have a solution with one project and 3 solution configurations: 1. Debug 2. Release 3. Staging When I for example choose "Release" in the quick menu toolbar to change the active solution configuration and Hit F5 I expect the solution to be compiled in Release mode, but whoooo it's still deb...
2018/03/09
577
1,705
<issue_start>username_0: Usually when creating certain sequences of numbers, python and numpy offer some syntactic sugar to do so in a simple way, without generating them yourself with for-loops, e.g. `range(start, stop, step)`. I'm having a rather simple problem that I'm struggling to solve in an elegant way: Generat...
2018/03/09
1,207
2,974
<issue_start>username_0: I have a table which contains the datas about the arrival and leaving time of the employees. The time range is given as time intervals of 30 min: ``` arrival <- c("04:01 - 4:30","00:31 - 1:00","05:01 - 5:30","06:31 - 7:00","08:01 - 8:30") leaving <- c("08:31 - 9:00","04:01 - 4:30","06:31 - 7:...
2018/03/09
1,509
6,030
<issue_start>username_0: I have made a nested cloudformation stack that in this case references a Lambda child stack. Because I have multiple LambdaFunctions, I designed the LambdaFunction resource in the Lambda child template such that it can repeat the same actions across all the Lambda Functions specified in the Par...
2018/03/09
635
2,162
<issue_start>username_0: I have this array: ``` Array ( [0] => Array ( [Banana] => Array ( [BIL_RateNonTaxed] => 126 ) [Cherry] => Array ( [BIL_RateNonTaxed] => 60 ) ) ...
2018/03/09
230
784
<issue_start>username_0: In the code, I'm reviewing, for a given class ``` class A { void foo(); void goo(); int member; }; ``` Own members and methods of this class are always accessed like this: ``` void A::foo() { this->goo(); this->member = 5; } ``` Is there any reason to use it instead of: ``` voi...
2018/03/09
634
1,858
<issue_start>username_0: I'm trying to implement cosine similarity for two vectors, but I ran into a special case where the two vectors only have one component, like this: ``` v1 = [3] v2 = [4] ``` Here is my implementation for the cosine similarity: ``` def dotProduct(v1, v2): if len(v1) != len(v2): r...
2018/03/09
516
1,536
<issue_start>username_0: i am using default `auth_user` table with field `date_joined` as type as `timestamp with time zone`. All i want to check use the `lte` and `gte` comparison on only its date not with the time and zone. ``` def get_fm_objects(self, filters): fm = FacilityManager.objects.all().order_by('-id'...
2018/03/09
347
1,118
<issue_start>username_0: I'm currently designing a page and using jquery.smoothstate.js. According to: <https://github.com/miguel-perez/smoothState.js?files=1> There's a way to remove the default values, but I can't find it. Because of this js. I can't run And keeps sending me: **Cross-Origin Request Blocked: The...
2018/03/09
439
1,280
<issue_start>username_0: ``` #include using namespace std; struct node{ long long int d; long long int e; }; int main() { long long int n,q,i,f; scanf("%lld%lld",&n,&q); struct node \*a=(struct node \*)malloc(n\*sizeof(struct node)); struct node \*c=(struct node \*)malloc(sizeof(struct node)); for(i=0;i ``` I...
2018/03/09
2,112
6,700
<issue_start>username_0: I'm a computer science teacher currently building an introductory course on deep learning. Python and the Keras framework are my tools of choice. I'd like to show my students what is overfitting by training a model of increasing complexity on some predefined 2D data, just like at the end of [t...
2018/03/09
478
1,809
<issue_start>username_0: using MVVM or MVP should i name packages like model, viewmodel, view and put proper classes and interfaces there or is it just a logical structure that should not be visible in classes structure?<issue_comment>username_1: If you want to go by the book, the current "correct" way to implement MVV...
2018/03/09
2,323
14,037
<issue_start>username_0: I'm writing a genetic program in order to test the fitness of randomly generated expressions. Shown here is the function to generate the expression as well a the main function. DIV and GT are defined elsewhere in the code: ``` function create_single_full_tree(depth, fs, ts) ...
2018/03/09
1,093
3,187
<issue_start>username_0: I'm trying to build the simple form below. [![enter image description here](https://i.stack.imgur.com/VnaKD.png)](https://i.stack.imgur.com/VnaKD.png) I'm using flexbox and having trouble aligning the textarea properly. `align-items: center` aligns the whole div. I've tried taking the textar...
2018/03/09
670
2,365
<issue_start>username_0: If I create a "Hello World" .NET Core C# Console application in Visual Studio 2017 and run ``` dotnet publish -c Release -r win10-x64 --self-contained ``` The resulting `publish` folder has 215 files in it, totals 62MB and includes the whole of .NET, which the application doesn't use. For e...
2018/03/09
4,615
10,266
<issue_start>username_0: I am trying to maximize the number of data points in a cross sectional panel data. The structure of the matrix that I have is the following with years on the y axis and countries on the x axis: ``` A B C D 2000 NA 50 NA 85 2001 110 75 76 86 2002 120 ...
2018/03/09
1,044
3,571
<issue_start>username_0: ``` ```html Some text Some more text More text Seperate div (function () { let displayedId = []; let len = document.getElementsByClassName('div1'); for(var i=0;i<length;i++){ displayedId.push((len[i].getAttribute('data-custom-id'))); } })(); ``` ``` This is the html c...
2018/03/09
997
3,321
<issue_start>username_0: i want to delete duplicate string and original duplicate! for example: ``` my string = one two three one two and i want = three ``` my code: ``` php if(!empty($_POST['keywords'])) { $posted = $_POST['keywords']; $posted = array_unique(explode(' ', str_replace("\r\n", ' ', $posted))); ec...
2018/03/09
1,091
3,615
<issue_start>username_0: I would like my script to receive these mutually exclusive **input** options: * an input file containing a JSON (`script.py -i input.json`); * a string containing a JSON (`script.py '{"a":1}'`); * a JSON from stdin (`echo '{"a":1}' | script.py` or `cat input.json | script.py`). and these mutu...
2018/03/09
425
1,537
<issue_start>username_0: I forked [this theme](https://github.com/iwiedenm/jekyll-theme-massively-src) and created a simple pages, modified some css files - setting fonts for specific tags or disable italic on subheadings. It works like a charm in local. But when I commit the files and push the repo, It shows contents...
2018/03/09
653
3,050
<issue_start>username_0: I'm calling a `BufferedReader` to get a HTTP response body (if it exists) and stick it in one long string variable. Sometimes when I attempt to do this I get the error `java.io.IOException: stream is closed` sometimes when the `while` loop below starts to execute. I don't understand why. I'd li...
2018/03/09
389
1,372
<issue_start>username_0: I have tried to install the Symfony 4 on my Macbook Air by using Composer. I have used the below commands for installing and running Symfony application ``` composer create-project symfony/website-skeleton symfony4 cd symfony4 composer require server --dev php bin/console server:run ``` A...
2018/03/09
1,097
3,359
<issue_start>username_0: I have a dataset of tweets downloaded with rtweet. And i'd like to see how many times three different strings occur in the variable `x$mentions_screen_name`. The key thing I'm trying to do is do a count of how many times 'A' occurs, then 'B', then 'C'. So my attempt at reproducing this is as ...
2018/03/09
1,215
4,888
<issue_start>username_0: Brand new machine, new install of Visual Studio 2017 Enterprise 15.6.0. I cannot seem to debug tests. I get the following error: ``` Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Failed to launch testhost with error: System.AggregateException: One or more errors occurr...
2018/03/09
923
3,597
<issue_start>username_0: Yes, I did attempt googling and searching through StackOverflow, however, I was unable to come up with an answer, as I am still new to Java. Currently I am attempting to write data to a file, all I have as of now is: ``` private static void setup() throws IOException { String username = ...
2018/03/09
987
3,439
<issue_start>username_0: I am having a really difficult time trying to Write a function compositions that takes two natural numbers k and n as inputs and returns the set of all tuples of size k that sum to n. I am concerned with finding the different permutations for the same set of numbers. I have found this document...
2018/03/09
671
2,335
<issue_start>username_0: So I am brand new to python. I am following tutorials on it but it appears the tutorial i am using is python 2. I figured I would try to change the code to python 3. I am getting errors on the import praw. When I ran this in python 2 no problems but now after the changes and trying to run in py...
2018/03/09
2,319
7,388
<issue_start>username_0: My goal was to stack two forms over each other so the outside borders aligned perfectly. I got it to work and look exactly how I want it to on the desktop site but viewing it on my mobile phone I noticed the "red box" isn't exactly on top of the other one and is slightly higher. (Like no more t...
2018/03/09
789
2,768
<issue_start>username_0: I have the following json file and I want it sorted by the keys/names. But so far I have been unable to figure out how to actually sort the json object by it's key/name. Origional Settings.json ``` { "files.trimTrailingWhitespace": true, "workbench.startupEditor": "newUntitledFile", "ed...
2018/03/09
677
2,411
<issue_start>username_0: I have a query like this: ``` SELECT [degree_id], [institution_id] FROM [dbo].[instlist] where [degree_id]=1 group by institution_id, degree_id ``` I need to count total rows, so I then use a for loop to get count and then return it. How to convert the query above in Linq? Thanks. ``` [Http...
2018/03/09
1,010
2,106
<issue_start>username_0: ``` var data = [ { "Id": 4, "Created_at": "2017-11-04T15:47:17Z" }, { "Id": 5, "Created_at": "2017-11-05T15:53:24Z" }, { "Id": 6, "Created_at": "2017-11-05T18:59:32Z" }, { "Id": 7, "Created_at": "2017-11-05T20:05:39Z" } ] ``` I want above jsonaaray look like be...
2018/03/09
387
1,490
<issue_start>username_0: I want to use `Session` values from static properties of a static class which is declared in another referenced project. Some of the properties are per application and some are per user: ``` public class MyClass { public static string var1 { get; set; } //Always static public static st...
2018/03/09
792
2,791
<issue_start>username_0: ``` var out = document.getElementsByClassName('myclass')[0]; out.focus(); out.select(); out.selectionStart =1; ``` I'm trying to do this in my typescript file, but for some reason it gives me these errors > > ERROR in src/app/main/utilities/keyboard/keyboard.component.ts(29,9): > error TS2...
2018/03/09
430
1,397
<issue_start>username_0: I have a Javascript string. ``` var str = "an eye"; ``` I want to split the string to get all the alphabets in an array **using split() and regex**. Meaning I want, ``` ['a','n','e','y','e'] ``` I used the following regex in **match()** to get the array: ``` var reg = /[a-z]/gi; ``` ...
2018/03/09
770
2,864
<issue_start>username_0: In python3: ``` >>> abs(-5) == 5 ``` and ``` >>> abs(5) == 5 ``` but ``` >> abs(5+0j) == 5.0 ```<issue_comment>username_1: The absolute value of a complex number a+bj, is defined as the distance between the origin (0,0) and the point (a,b) in the complex plane. In other words, it's sqr...
2018/03/09
603
2,529
<issue_start>username_0: I'm running the latest version of the jQuery DataTables and using the server side option. I'm running into a problem when trying to complete a simple compare of two columns of data. This `DOCS_VER` value in column 5 below will contain a 0 or a 1: ``` { "data": "DOCS_VER" }, ``` And the `D...