date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/20
693
2,048
<issue_start>username_0: I'm trying to convert my audio data which is 32 bit signed int, into 24 bit signed. The goal is to write a Wave file. I already managed to write correct Wave files with 8, 16 and 32 bit depths, but for some reason I struggle with 24 bit. The sound output sounds like 8 bits (lots of noise), whic...
2018/03/20
525
1,714
<issue_start>username_0: I'v an async function that returns a string asynchronously and I'm calling that function within test method and is throwing computation expressions, what would be the possible fix? Code ``` let requestDataAsync (param: string) : Async = async { Console.WriteLine param return "my result" ...
2018/03/20
721
2,130
<issue_start>username_0: I have a question on how to add onto to this code to not copy duplicate rows. My columns A, C, and D combined together would make an unique identifier, but I'd rather not have to add that "helper" column to my spreadsheet if possible. ``` Option Explicit Public Sub CopyRows() Dim ws1 As W...
2018/03/20
909
2,715
<issue_start>username_0: That is the premise of an exercise I'm doing, but i don't get what is the kth element of an array. For example, the exercise asks me the following input/output: input: [7, 2, 1, 6, 1] and k = 3 output: 6 I just don't get what's the relation between K and the array.<issue_comment>username_1: K...
2018/03/20
817
2,675
<issue_start>username_0: I am trying to replace a selected text with a single word from that selected text using regex. I tried re.sub() but it seems that it takes the second argument "The word that I want to replace it with the text" as a string, not as regex. Here is my string: ``` I go to Bridgebrook i go out s...
2018/03/20
660
2,242
<issue_start>username_0: I'm having an issue trying to querying my database, my script with cassandra-driver was this: ``` const query = 'CREATE TABLE IF NOT EXISTS test.RestaurantMenuItems ' + '(id UUID, restaurantId varchar, menuName text, menuCategoryNames text, menuItemName text, menuItemDescription text, menuIt...
2018/03/20
626
2,009
<issue_start>username_0: Yes I know there are heaps of posts about converting objects to json but my question is more specific.. Say Im calling some data from an api and the response is an object that looks like this ``` { date: ..., value: ..., useless-info: ..., useless-info: ... } ``` now I know...
2018/03/20
522
2,050
<issue_start>username_0: In App Purchases work in Sandbox environment but don't work during Apple review which results in the app rejection: [![enter image description here](https://i.stack.imgur.com/wGLT6.jpg)](https://i.stack.imgur.com/wGLT6.jpg) I can't find the problem as In App purchases work well on the test d...
2018/03/20
641
2,540
<issue_start>username_0: Trying to pass the defined variable to element selector, I tried few options, but it didn't work. Can anyone help me ? ``` def test_04(self): driver = self.driver spreadsheet = pd.read_excel('SCC_ProdEdit_Page_Top80_Usage_ControlIds.xlsx', sheetname='Prod_...
2018/03/20
453
1,081
<issue_start>username_0: I have a dictionary with lists as values: ``` my_dict = {1: [2,3], 2: [4, 5], 3: [6, 7]} ``` and I want to get to update the dictionary to update the values to be the sum of the old list values: ``` my_dict = {1: 5, 2: 9, 3: 13} ``` What is the most efficient/pythonic way of doing so? Wha...
2018/03/20
1,016
3,671
<issue_start>username_0: While static member variables can be templated in C++14 this wont work: ``` class SomeClass { public: template T var = {}; }; int main() { SomeClass instance; instance.var = 50; instance.var = 0.1; } ``` What are the reasons, that templates for variable members are not supported by...
2018/03/20
1,138
3,754
<issue_start>username_0: I have an array: Option[Seq[People]] ``` case class People ( name: Option[String], tall: Option[Boolean], fat: Boolean ) ``` What I want looks like: ``` String name = "Jack|Tom|Sam" String tall = "True|True|True" String fat = "True|False|True" ``` So, I tried: ``` name = array.f...
2018/03/20
1,306
4,272
<issue_start>username_0: I googled this question but didn't find appropriate solution in few links so thought to put it here. Question : if we have multiple For Loop (having simple method) then how can we refactor this scenario. In my selenium script it looks really weird to have back to back such methods. I need t...
2018/03/20
424
1,445
<issue_start>username_0: Can somebody explain me, why in this program if I call the `printf` in that way the flag will be win? but without will not? Why this `printf` allow such things i can't understand thanks. Why without the `printf` the array can't overwrite the variable flag? ``` #include #include int main() {...
2018/03/20
801
2,633
<issue_start>username_0: I have the following script which runs on .zip files in a directory which have a whole directory structure with many files. These files then have 7zip run on them to extract them and then .eml is added to the extracted file. ``` & "c:\program files\7-zip\7z.exe" x c:\TestZip -r -oC:\TestRestor...
2018/03/20
2,509
8,398
<issue_start>username_0: I am currently using Python 3.5.5 on Anaconda and I am unable to import torch. It is giving me the following error in Spyder: ``` Python 3.5.5 |Anaconda, Inc.| (default, Mar 12 2018, 17:44:09) [MSC v.1900 64 bit (AMD64)] Type "copyright", "credits" or "license" for more information. IPython...
2018/03/20
1,660
5,970
<issue_start>username_0: I would like to know how in the [Julia](https://julialang.org) language, I can determine if a `file.jl` is run as script, such as in the call: ``` bash$ julia file.jl ``` It must only in this case start a function `main`, for example. Thus I could use `include('file.jl')`, without actually e...
2018/03/20
746
2,776
<issue_start>username_0: I have two classes ``` class A { public: virtual void doStuff() = 0; }; class B : public A { int x; public: virtual void doStuff() override { x = x*2;} //just example function }; ``` And another class that modify and use data from the previous ``` class Foo { A a; public...
2018/03/20
2,979
7,686
<issue_start>username_0: I am given a list and I am trying to recursively check if the adjacent elements in the list are a multiple of 12, if they are, then I need to check if the remaining sum of the numbers in the list are odd. For example, [6, 6, 5] returns true, [6, 5, 6, 1] returns false. I am having trouble with ...
2018/03/20
2,823
7,606
<issue_start>username_0: I'm noticing that when a Sidekiq / Active Job fails due to an error being thrown, any database changes that occurred during the job are rolled back. This seems to be an intentional feature to make jobs idempotent. My problem is that the method run by the job can send emails to users and it use...
2018/03/20
5,798
22,075
<issue_start>username_0: I have a TVP+SP insert strategy implemented as i need to insert big amounts of rows (probably concurrently) while being able to get some info in return like `Id` and stuff. Initially I'm using EF code first approach to generate the DB structure. My entities: FacilityGroup ``` public class Fac...
2018/03/20
908
3,553
<issue_start>username_0: Hello i am new to C programming, currently working on a code, a simple guessing game. Maybe not simple for me, Every time i build and run the code. At the first attempt. The command interface asks to press any key to continue and then takes the interface away. I have to start from the beginning...
2018/03/20
756
2,971
<issue_start>username_0: I'm building a translator that saves the translation in a dictionary where the first string is an identifier and the seconds string is the translated string. It seems to me that the dictionary syntax is not very readable so I'm thinking about wrapping my dictionary like ``` class Translation ...
2018/03/20
1,095
3,463
<issue_start>username_0: I have a character vector that I need to clean. Specifically, I want to remove the number that comes before the word "Votes." Note that the number has a comma to separate thousands, so it's easier to treat it as a string. I know that gsub("\*. Votes","", text) will remove everything, but how ...
2018/03/20
349
1,267
<issue_start>username_0: [![enter image description here](https://i.stack.imgur.com/onLtn.png)](https://i.stack.imgur.com/onLtn.png) I try to study the Map object by reading document. However, it confuses me in the beginning. I wonder what does it mean by" Return undefined." here?<issue_comment>username_1: This just m...
2018/03/20
643
2,333
<issue_start>username_0: I'm trying to work with a DynamoDB table, and have successfully connected to it, but am unable to read it. When I try, I get the following error: > > Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '\_datePublished is not a property of ProjectName.Article...
2018/03/20
1,249
3,719
<issue_start>username_0: I'm having trouble getting usort to work and not sure what I'm missing. Below is an example of my array. I want to sort the array based on the value of the sort key. ``` Array ( [0] => Array ( [sort] => 1520546956 [row] => Data lives here ) [1] => Array ( [...
2018/03/20
1,688
3,949
<issue_start>username_0: I am writing a small macro to do a simple task. I have made some progress so far, however I am stuck in trying to do an if statement to check if the contents of a cell equals a string in an array then it performs the next statement. Here is my code so far: ``` Public Sub Saturdays() Dim i As...
2018/03/20
1,385
4,530
<issue_start>username_0: In an AngularJS record display (with filters) I have a multiselect array of territories that a user can select from to find out if a certain item is available in a certain territory. The array returns a list of values such as ``` ['001','010','200'] ``` based on the ID of the territories s...
2018/03/20
197
743
<issue_start>username_0: Partial indexes only include a subset of the rows of a table. I've been able to create partial indexes in Oracle, DB2, PostgreSQL, and SQL Server. For example, in SQL Server I can create the index as: ``` create index ix1_case on client_case (date) where status = 'pending'; ``` This inde...
2018/03/20
393
1,172
<issue_start>username_0: I'd like to know if there's an easy command to read and use data from an Excel file. I'm moving from `MATLAB` to `Python`, so I'd like to know if there's something simple as in `MATLAB`: > > data = xlsread(filename). > > > I need this to load data to train an ANN. Thank you.<issue_com...
2018/03/20
1,642
5,567
<issue_start>username_0: So I have a function that performs just fine on small lists. It's function is to check if removing one element from the sequence will make the sequence a strictly increasing sequence: ``` def almostIncreasingSequence(sequence): length = len(sequence) for i in range(1, length): ...
2018/03/20
1,739
5,511
<issue_start>username_0: I have a string, which contains a specific number that I would like extracted into a single number. ``` string = Result: ResultSet({'(u'examplemeasure', None)': [{u'value': 15, u'time': u'2018-03-20T22:50:33.803894733Z'}]}) ``` I would like the number 15 by itself as a result. ``` 15 (<-- j...
2018/03/20
296
938
<issue_start>username_0: So I have a column with a list of dates in it. I have a list/array with a set of specific dates in it. I want to assign a new column in my dataframe with true/false as to whether or not the specific date was in the list. I have the following, but it doesn't work and I'm not sure why. ``` __DAT...
2018/03/20
452
1,366
<issue_start>username_0: I am learning about dynamic memory allocation and overloading operators in C++. I am trying out a simple program to test out my knowledge but I can't find out what I'm doing wrong. Here's the code: ``` #include #include using namespace std; class myClass{ private: char \*ptr; public: myC...
2018/03/20
1,593
5,375
<issue_start>username_0: I have already pre-cleaned the data, and below shows the format of the top 4 rows: ``` [IN] df.head() [OUT] Year cleaned 0 1909 acquaint hous receiv follow letter clerk crown... 1 1909 ask secretari state war whether issu statement... 2 1909 ...
2018/03/20
1,325
4,808
<issue_start>username_0: I am trying to follow the instructions at <https://docs.docker.com/docker-for-windows/kubernetes/#use-docker-commands> for running a docker-compose.yml file against kubernetes on Docker for Windows. I am using the Edge version of Docker for Windows -- 18.03.0-ce-rc4 -- and I have kubernetes en...
2018/03/20
809
3,001
<issue_start>username_0: I'm quite new to C# so I apologize if this has been asked before but I've done some searches and haven't found what I'm looking for. Specifically, I'm aware I can use the keyword `using` in the following manner to (in some way) mimic the use of `typedef`: ``` using myStringDict = System.Colle...
2018/03/20
1,084
4,584
<issue_start>username_0: I'm new to the Scala world and I'm using PLAY to make an API. It's going well but I am having some trouble understanding some of the notation and there is not a lot of documentation on it. Specifically, I am confused by the following controller method in one of the examples on the PLAY site: `...
2018/03/20
1,053
4,391
<issue_start>username_0: writing automated tests, I need to trigger a download. Clicking the button to download, runs fine and all other assertions pass. The problem is that edge will not allow selenium to close the browser when I call `browser.end()` because there is a dialog saying there is a download pending and is ...
2018/03/20
614
1,395
<issue_start>username_0: I have a dictionary that its value is a list of list. I want to sum up the first item in list 1 with the first item in list 2 with .... to the end, and then do it for all the items. in the end, I will have one list as a value for my dict. all of the lists have the same length. > > `my_dict = ...
2018/03/20
560
1,961
<issue_start>username_0: I'm having a small issue on running a function inside of a function. Hope u guys can guide me. ``` function myFunction() { function play(a, b) { document.getElementById("demo").innerHTML = a \* b; } } myFunction().play(2,3); ```<issue_comment>username_1: So what you've done with `myFunc...
2018/03/20
1,323
4,676
<issue_start>username_0: I have a large excel file, where column A has random numbers in each cell, for all the 1 million+ rows in that excel sheet. I am trying to print number of occurrences of each of those values in column B. Usually, I do this in Excel itself, by sorting the data first and then using COUNTIF formul...
2018/03/20
1,355
4,897
<issue_start>username_0: I need to send a few requests to the DB and update each entry from the response. I am trying to use forEach/for but as far as forEach/for is async I can't find a way how to do a few requests to Firebase DB using cycle. Any ideas? Here is my code. I've tried to do work around with counter ...
2018/03/20
1,262
4,421
<issue_start>username_0: I want import DML script after spring creates tables. I was fighting with **`data.sql`** file but my application **don't see it**. I don't know why. It works when I rename `data.sql` to **`import.sql`**, but **it should also work** with `data.sql`. Anybody know why? My application.properties:...
2018/03/20
1,174
4,625
<issue_start>username_0: I need help figuring out how to make a button that will play the same sound over and over again without having to wait for the sound to finish playing. here is my code so far. ``` final MediaPlayer mp = MediaPlayer.create(this,R.raw.boosto); Button button = (Button) this.findViewById(R.id.bu...
2018/03/20
1,739
5,437
<issue_start>username_0: I'm new to Nim, so this might be an obtuse question, but how does one create a short-hand alias variable for the purpose of simplifying code? For instance: ``` import sdl2 import sdl2.gfx type Vector[T] = object x, y: T Ball = object pos: Vector[float] Game = ref object r...
2018/03/20
1,589
5,379
<issue_start>username_0: I've looked for an answer to this, but all the questions I could find tell me to use delegation which I have done as seen below, but yet it still only fires once when I select an item from a dropdown. My HTML: ``` Keyboard Trays Another option ``` Pretty simple. My javascript code is: ```...
2018/03/21
366
1,099
<issue_start>username_0: I need my elements to show in a single line and be hidden on overflow, but my current code breaks the line if the screen is too short in width. How do I make the elements hidden on overflow when screen width is short? <https://jsfiddle.net/4szyqv20/5/> ``` 1000000 1000001 1000002 1000...
2018/03/21
2,730
8,059
<issue_start>username_0: In Java or Scala, what is the best way to find the number of seconds between 2 `LocalTimes`? If I have `11:20:00.000Z` and `11:21:00.500Z` I would want the result to be `61` seconds, not `60` seconds.<issue_comment>username_1: You can calculate the time difference in `millis` and round the res...
2018/03/21
1,001
2,847
<issue_start>username_0: I have two `List()`s and I want to find `GUID` values that are **not** in the second list. How do I do this using `LINQ`? I think `LINQ` would be a more efficient approach than a `foreach()`.<issue_comment>username_1: For that you can use the LINQ `Except()` extension method: ``` var result =...
2018/03/21
851
2,939
<issue_start>username_0: I use live-server to live reload folder with `HTML`, `javascript` and `CSS` files using `Visual Studio Code`. When I open the console in Google Chrome I see this [![error message](https://i.stack.imgur.com/e0KYG.png)](https://i.stack.imgur.com/e0KYG.png): > > "Failed to load resource: th...
2018/03/21
581
2,068
<issue_start>username_0: I have a retrofit service defined as such: ``` package com.example.android; import java.util.Map; import java.lang.annotation.Retention; import java.lang.annotation.Target; import retrofit.http.RestMethod; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annot...
2018/03/21
775
2,868
<issue_start>username_0: I want to see output from my systemctl commands. For example: ``` systemctl restart systemd-networkd ``` would display the output of ``` systemctl status systemd-networkd. ``` I know that I could write a script that always puts the commands sequentially but I am hoping there is somethi...
2018/03/21
289
873
<issue_start>username_0: I am trying to print out the variables val1-5 in HTML. Doesn't seem to be working, any help would be appreciated. ``` var val1 = 0; var val2 = 0; var val3 = 0; var val4 = 0; var val5 = 0; var fing = prompt("enter code"); window.onload = function(){ var str = fing; var res = str.charAt...
2018/03/21
528
1,843
<issue_start>username_0: I am trying to make a structure of some sort that has key value pairs where the key is an identifier like 'equals' and the values are the unicode equivalent html like '\u003D'. Right now I am using an enum, but I am not sure if this is the best structure. Anyways, I need to use this enum (or ot...
2018/03/21
733
2,506
<issue_start>username_0: I have this simple SQL Select query: ``` SELECT part_number, bin_location FROM list ORDER BY bin_location ``` This will give me a result like this: ``` part_number bin_location Alaska wine A1 German water A2 London whisky A3 German wine A4 London w...
2018/03/21
1,498
5,230
<issue_start>username_0: I'm trying to add a UICollectionView in a swift class programmatically, without any storyboard, with a custom cell (a simple label in every cell) ``` import Foundation import UIKit class BoardView : UIView, UICollectionViewDataSource, UICollectionViewDelegate { var boardTable: UICollecti...
2018/03/21
1,298
4,308
<issue_start>username_0: My excel spreadsheet has the following datasets, but as can you see some are duplicates, while others have similar names. I want to find duplicates that are same and similar. The condition is that if they have three or more than three similar keywords, then they are also duplicate. I have the f...
2018/03/21
413
1,282
<issue_start>username_0: I'm trying to update all my Documents so that they only have the 3 highest scored opinions but i don't know how to do it. Here's my example: ``` { _id:9787878, name: "<NAME>", scores: [ {grade:8, opinion:"Very good"}, {grade:1, opinion:"Bad"}, {grade:10, opinion:"Ve...
2018/03/21
3,249
12,329
<issue_start>username_0: I am building a calendar that allows the user to cycle through the months and years by pressing the buttons created of the previous month and next month. Essentially what I want the main window to do is update with the new month upon clicking PREV or NEXT month with the correct days, which it d...
2018/03/21
642
2,209
<issue_start>username_0: I have a ``` {{tipoUsuario.Tipo}} ``` populated with Vue and axios, but I need to obtain the ID Value to post in another table. In the response.data returns these values: ``` [ { "TipoUsuarioId": 1, "Tipo": "Administrador" }, { "TipoUsuarioId": 2, "Tipo": "Usua...
2018/03/21
406
1,377
<issue_start>username_0: ![enter image description here](https://i.stack.imgur.com/OnUXv.png) I'm very confused and not sure what to do with joistcost, floorcost and projecttotal. joistcost is the cost of an individual component floorcost is the joist cost multiplied by the width projecttotal is the cost of all the...
2018/03/21
1,024
4,451
<issue_start>username_0: We are embarking on integrating Selenium into our web projects (something we’ve been meaning to do for quite some time). I’ve read a few articles that argue whether to use C#, node, python etc with selenium, but even those articles tend to finish by saying go with which ever language you alrea...
2018/03/21
890
2,555
<issue_start>username_0: I have a function to simulate genetic drift and I would like to loop it over multiple values of each parameter The function is below: ``` wright.fisher<-function(p,Ne,nsim,t){ N <-Ne/2 NA1 <- 2*N*p NA2 <- 2*N*(1-p) k <- matrix(0, nrow = max(2, t), ncol = nsim) k[1,] <- rep(NA1, nsim...
2018/03/21
597
1,923
<issue_start>username_0: My problem is: scrape the curse price (8875.53) out of the webpage. ``` 8875.53 ``` But my way failed. Does somebody know what's my mistake? ``` import java.io.IOException; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.select.Elements; ...
2018/03/21
734
2,423
<issue_start>username_0: I've spent now days trying to solve a problem, but I totally failed ... I do have a simple PNG file, with only 2 indexed colors and need to change the first index color dynamically ... so far no problem ... (just for example i change the color hardcoded to some green) and deliver the outcome ....
2018/03/21
845
2,812
<issue_start>username_0: I wrote a code for my school assignment: > > Write a function to change the brightness (pwm) of the led with the press of an input switch. The first press and hold increases the brightness, next press will decrease it. > > > It works when it is between 0 and 100 but when it hits 0 or 100...
2018/03/21
2,320
5,419
<issue_start>username_0: If I wanted to sum over some variables in a data-frame using `dplyr`, I could do: ``` > head(iris) Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 5.1 3.5 1.4 0.2 setosa 2 4.9 3.0 1.4 0.2 setosa 3 4.7 ...
2018/03/21
2,807
7,773
<issue_start>username_0: Given the following code, where `x` is a dangling `const reference` to a vanished object, and is therefore undefined behavior. ``` auto get_vec() { return std::vector{1,2,3,4,5}; } const auto& x = get\_vec().back(); ``` It seems like neither *GCC 7.3*, *Clang 6.0* and *MSVC* is able to emit ...
2018/03/21
2,658
7,086
<issue_start>username_0: I have django 1.11.5 and celery 4. I want to pass user in view to task (because I can't do this in tasks.py, right?) ``` def form_valid(self, form): form.instance.user = self.request.user dict_obj = model_to_dict(self.request.user) # serialized = json.dumps(dict_obj) # print(s...
2018/03/21
2,711
7,325
<issue_start>username_0: I actually have three problems, but I believe they are all related to trying to place the two images within the same background. I only need this to appear on one page only. 1) The image on the left is XXpx away from the edge, but the image on the right is butt up against the edge. 2) The foote...
2018/03/21
621
1,793
<issue_start>username_0: I found the function `pop()`, which will remove a single value from a list. However, I want to remove two values from the list - randomly, but both numbers must be adjacent. For example, in a list of `[1, 2, 3, 4, 5]`, if I randomly picked `2` with `pop()`, I'd also want to remove `1` or `3`. ...
2018/03/21
618
1,699
<issue_start>username_0: Hi friends I want to perform an operation I believe I can solve this with map. The following operation is actually working correctly. But I want to do something a bit different. 18 will be 19 when it increases. But when the next value comes, it will now be collected with 19. in this example,...
2018/03/21
1,325
4,480
<issue_start>username_0: I want to integrate AngularJS in my custom `password_reset_confirm.html` template in Django. But when I fill out a new password and hit "submit," nothing happens. I have this in my custom `password_reset_confirm.html` template: ``` {% block main %} {% trans "Reset password" %} -------------...
2018/03/21
2,780
10,563
<issue_start>username_0: My following understanding of the terminology is this > > **1) An interrupt** > > is "a notification" that is initiated by the hardware to call the OS to run its handlers > > > **2) A trap** > > is "a notification" that is initiated by the software to call the OS to run its handlers...
2018/03/21
1,119
3,855
<issue_start>username_0: I have the API Gateway that calls Lamdba function 1 and that invokes lambda function 2 in Go. I want to see these 2 functions joined in the service map. The only way i have been able to do this so far is to create a custom segment eg called "parent" and the create a subsegment from this contex...
2018/03/21
1,023
2,837
<issue_start>username_0: I want to filter my data frame so that I get all the columns that have a particular value for given row. ``` DF vec1 vec2 vec3 1 a aa d 2 b bb e 3 c cc f 4 1 1 2 ``` For example, all the columns that have `1` in the 4th row. ``` DF[4,1]==1 and DF[4,2]==1 ...
2018/03/21
738
2,246
<issue_start>username_0: I have a blank table for which I've set up a trigger: ``` CREATE OR REPLACE TRIGGER authors_bir BEFORE INSERT ON authors FOR EACH ROW begin if upper(:new.name) = 'TEST' then raise_application_error(-20001, 'Sorry, that value is not allowed.'); end if; end; ``` After executing: ``...
2018/03/21
732
2,318
<issue_start>username_0: I have everything I'd like my code to perform, but it is bugging me that the square is not centered. I've been searching the internet for hours...please help! I have tried using `anchor = "center"` and `.place()` but I just can't seem to get it right. ``` from tkinter import * import random c...
2018/03/21
518
1,670
<issue_start>username_0: How can I add a Xamarin.Forms XAML file to an FSharp project? By default, XAML files have C# code-behind. I tried moving a XAML file with C# code-behind to an F# project. I then changed the file extension to ".fs". However, my attempt crashed VS2017.<issue_comment>username_1: By defining a hei...
2018/03/21
1,119
3,775
<issue_start>username_0: I am writing few sbt tasks in a scala file. These SBT tasks will be imported into many other projects. ``` lazy val root = (project in file(".")). settings( inThisBuild(List( organization := "com.example", scalaVersion := "2.11.8", version := "1.0.0" )), na...
2018/03/21
384
1,376
<issue_start>username_0: I'm still very new to programming so bear with me. This is what I have started with: ``` letter = input ("Please enter a letter of the alphabet to be displayed as a banner: ") while letter == **UPPERCASE**: ...... ``` What I want to do is: if the input is an uppercase letter, to contin...
2018/03/21
344
1,165
<issue_start>username_0: I have this JSON file, ``` { "file_paths": { "PROCESS": "C:\incoming", "FAILED": "C:\failed" } } ``` I get an error when I try to access PROCESS or FAILED. The error is `SyntaxError: Unexpected token i in JSON`. It must be due to backslash. How can I access PROCESS or FAILED with...
2018/03/21
292
1,028
<issue_start>username_0: I am trying to implement some changes into a deployed Flask API. Am I able to edit files in the deployed API and have the changes take effect without having the restart the API build?<issue_comment>username_1: If you take the input as a char, you can test it with a for loop like this: ``` for...
2018/03/21
576
2,057
<issue_start>username_0: I am writing a Java program that can convert an inputted Roman Numeral into a Short, and I want it to be able to recognize and ask for input again when any letter has been inputted besides a Roman Numeral (I, V, X, L, C, D, and M). Is there a method similar to .contains(), but with the opposi...
2018/03/21
802
3,011
<issue_start>username_0: I have 2 textboxes and want to do the validation if the fields are empty then. But, I want to display the message differently based on the conditions. //Inside my Model ``` [Required(ErrorMessage ="Please enter Name")] public string txtName { get; set; } [Required(ErrorMessage = "A...
2018/03/21
931
3,822
<issue_start>username_0: My app has an `Activity` that's declared with: ``` android:windowSoftInputMode="adjustResize|stateAlwaysHidden" ``` `adjustResize` is set and in that activity I have a `RecyclerView` and an `EditText` as in a chat like app. The problem I'm facing is that when the keyboard shows up the layo...
2018/03/21
1,436
4,701
<issue_start>username_0: I'm assuming ImageMagick is the best option for this, but please let me know if you have other recommendations that can be scripted. I am trying to replace all the 32x32 tiles of an image with a single tile. This is an example for the original image: [![Original](https://i.stack.imgur.com/byX...
2018/03/21
1,909
7,063
<issue_start>username_0: There is a table in our SQL Server 2012 to generate and send emails. Its simplified structure is as follows: ``` CREATE TABLE [dbo].[EmailRequest] ( [EmailRequestID] [int] NOT NULL, [EmailAddress] [varchar](1024) NULL, [CCEmailAddress] [varchar](1024) NULL, [EmailReplyToAddress...
2018/03/21
909
1,993
<issue_start>username_0: I have huge list of tuples that looks like: ``` data =[ ('-0.167969896634', '0.475981802514', ''), ('-0.186100643368', '0.47510168705', ''), ('-0.205064369305', '0.476225633961', ''), ...] ``` I need to remove the ' ' and convert them all to floats, but I am not sure how to do ...
2018/03/21
1,549
4,188
<issue_start>username_0: I need to plot the velocities of some objects(cars). Each velocity are being calculated through a routine and written in a file, roughly through this ( I have deleted some lines to simplify): ``` thefile_v= open('vels.txt','w') for car in cars: velocities.append(new_velocity) if ...
2018/03/21
462
1,622
<issue_start>username_0: Okay, so I have the following issue. I have a Mac, so the the default Python 2.7 is installed for the OS's use. However, I also have Python 3.6 installed, and I want to install a package using Pip that is only compatible with python version 3. How can I install a package with Python 3 and not 2...
2018/03/21
740
2,590
<issue_start>username_0: I have a project loaded in Android Studio 3.0. Gradle sync works fine, and the project builds. When I add `implementation 'com.amazonaws.aws-android-sdk-mobile-client:2.6.+'` to my build.gradle (Module:app) file, right next to all the other dependencies that are already part of this fine proje...
2018/03/21
405
1,435
<issue_start>username_0: In the [doc](https://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html) it says > > Read all lines from a file as a `Stream`. > > > Does that necessary mean that it's loading the entire file? For example: ``` try (Stream stream = Files.lines(Paths.get("myfilename.txt"))) { str...
2018/03/21
570
2,232
<issue_start>username_0: Today when I woke up to continue my developing process I got `Firefox` update and then I wasn't able to reach my `localhost` websites and redirecting to `HTTPS` protocol. We all know that Google did the same while before but as many of us using Firefox mostly we (at least me) didn't care and c...
2018/03/21
1,578
5,090
<issue_start>username_0: I've been tasked with locating the bug in the following code, and fixing it: ``` /* $Id: count-words.c 858 2010-02-21 10:26:22Z tolpin $ */ #include #include /\* return string "word" if the count is 1 or "words" otherwise \*/ char \*words(int count) { char \*words = "words"; if(count==1)...
2018/03/21
396
1,259
<issue_start>username_0: In a Zeppelin notebook, running the following query with elasticsearch-py 5x ``` es = Elasticsearch(["es-host:9200"]) es.search(index="some_index", doc_type="some_type", body={"query": {"term": {"day": "2018_02_04"}}} ) ``` Takes 28 minutes to return. From the same not...
2018/03/21
4,918
18,527
<issue_start>username_0: I am trying to configure Kubernetes RBAC in the least-permissive way possible and I want to scope my roles to specific resources and subresouces. I've dug through the docs and can't find a concise list of resources and their subresources. I'm particularly interested in a the subresource that ...
2018/03/21
1,350
4,681
<issue_start>username_0: I have the following code snippet where `Func0` and `Action1` are used. ``` Observable.defer(new Func0>() { @Override public Observable call() { try { return Observable.just(Database.readValue()); } catch(IOException e) { return Observable.error(e); } }) .subscribe(new Action1() {...