date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/16
904
3,444
<issue_start>username_0: I'm relatively new to Java8 and I have a scenario where I need to retrieve all the keys from the Map which matched with the objects. Wanted to know if there is a way to get all keys without iterating them from the list again. ``` Person.java private String firstName; private String lastName...
2018/03/16
949
3,316
<issue_start>username_0: What is the size (in bytes) for the following structures on a 32­bit machine installed with the Linux Operating System? sizeof(int) = 4 bytes sizeof(short) = 2 bytes sizeof(char) = 1 byte **1** ``` struct foo { int d1; char c1; int d2; } ``` **2** ``` struct foo { int ...
2018/03/16
447
1,671
<issue_start>username_0: I don't know if is it possible: I want to know the number line's where someWord is found in someFile. ``` try { CharsetDecoder dec = StandardCharsets.UTF_8.newDecoder() .onMalformedInput(CodingErrorAction.IGNORE); try (Reader r = Channels.newReader(FileChannel.open("p...
2018/03/16
649
2,199
<issue_start>username_0: I am making a request to predicthq API ```js app.get("/test", (req, res) => { // [0] IS THE LONGITUDE request.get("https://api.predicthq.com/v1/events/?q=Minnesota&limit=10", { headers }, (err, data) => { var results = JSON.parse(data.body).results; var serverRes = [];...
2018/03/16
3,568
14,083
<issue_start>username_0: some `GameObjects` in my scene implement the interace `ISaveable`. In my script, I want to find all these interfaces and store them. Later on I can loop through them and call their implemented method `SaveData()`. My current workaround to find these interfaces: ``` List saveables = new Li...
2018/03/16
1,776
6,999
<issue_start>username_0: I'd like to alert on the lack of a heartbeat (or 0 bytes received) from any one of large number of Google IOT core devices. I can't seem to do this in Stackdriver. It instead appears to let me alert on the entire device registry which does not give me what I'm looking for (How would I know that...
2018/03/16
810
3,168
<issue_start>username_0: In a VB.NET class file, I'm trying to use extension methods such as ToList(), where the generic parameter is populated with what I know to be the subclass, in this context. ``` Dim specificOrders = request.Orders _ .Where(Function(x) x.GetType().Equals(GetType(SpecificOrderType))) _ .ToList(Of...
2018/03/16
937
3,441
<issue_start>username_0: I defined a variable map my\_role in terraform and set its value in abc.tfvar file as follows. if I assign account id as actual value, it works, if I set account id as a variable, it does not work. Does it mean tfvar file only allow actual value, not variable? By the way, I use terraform worksp...
2018/03/16
1,317
4,120
<issue_start>username_0: I have to write a program to create overflow and underflow for int-type variables and output the value of the variable in decimal and hex when overflow or underflow occurs. So here is my code: ``` #include #include int main() { int delta = INT\_MAX; printf("\n delta = %d (%4x)", delta, ...
2018/03/16
760
2,450
<issue_start>username_0: I am building Scigraph database on my local machine and trying to move this entire folder to docker and run it, when I run the shell script on my local machine it runs without error when I add the same folder inside docker and try to run it fails Am I doing this right way, here's my DOckerfile...
2018/03/16
1,475
4,892
<issue_start>username_0: We are in the process of remediation, re-engineering old JS web resources for latest D365 v9 sdk changes w.r.t Client scripting API improvements & deprecation. When rewriting the web api methods using `Xrm.WebApi`, we end up with this blocker. The scenario is setting `null` to lookup, and tri...
2018/03/16
706
2,978
<issue_start>username_0: I was wondering if someone could explain to me how the space complexity of both these algorithms work. I have done readings on it but they seem to be contradictive, if I understand correctly. I'm for example interested in how a linked list would affect the space complexity and this question s...
2018/03/16
638
2,132
<issue_start>username_0: ``` a b c d e ``` Naturally, when I press a, b, c, d, or e, this jumps to the option with that as the first letter. I need to disable this, preferably not through Javascript (not required). Is there really no way to turn off this keypress jump to letter option?<issue_comment>username_1...
2018/03/16
421
1,314
<issue_start>username_0: ``` #include using namespace std; // Function to copy one string in to other // using recursion void myCopy(char str1[], char str2[], int index = 0) { // copying each character from s1 to s2 s2[index] = s1[index]; // if string reach to end then stop if (s1[index] == '\0') return; /...
2018/03/16
1,272
3,952
<issue_start>username_0: I'm trying to create a horizontally scrollable div with flexbox. So far, I have most of it. However, the only problem I am facing is that I'm trying to add space to my items, but for some reason, nothing seems to be working. I've tried adding margin, padding, justifying content, etc. Here's a [...
2018/03/16
1,759
6,460
<issue_start>username_0: I am debugging an Android app that usually crashes when I plug into an Arduino it is supposed to be communicating with. Consequently, I need to get a wireless connection to the device's logcat, which is what brought me to [ADB over TPC](https://developer.android.com/studio/command-line/adb.html...
2018/03/16
802
3,234
<issue_start>username_0: For purposes of our integration checking, I want to count the number of messages on an Azure queue. The method looks like this: ``` internal void VerifyMessagesOnQueue(string queueNameKey, int expectedNumberOfMessages) { var azureStorageConnectionKey = ConfigurationManager.AppSettings["Azu...
2018/03/16
712
2,713
<issue_start>username_0: I feel like this should be easy but I've been running into problems finding a solution. I have an array of file extensions: ``` var items = ["PDF", "XLS"] ``` I also have an array of file objects: ``` files = [{format: "TXT"},{format: "PDF"}] ``` I'd like a function where I can pass th...
2018/03/16
3,380
9,246
<issue_start>username_0: I am trying to get my three CTEs to join and plus one more table . Below is what I am doing but I am missing something . I have looked up same error and I am being told I am missing "," but I did that and still the same error. The error is "Invalid Table Name". Any help is much appreciated as a...
2018/03/16
1,417
5,152
<issue_start>username_0: i'm struggling with declaring and accessing data in nested arrays in Javascript i can easily do it in C using nested structures, declaring first the lowest-level structure and including an array of it when declaring the upper-level structure and so on. I end up with a structure containing an a...
2018/03/16
1,500
4,749
<issue_start>username_0: I wrote code to reverse a sentence that the user inputs, but when I run this code and write a sentence, this code prints meaningless figures instead of reverse version of my sentence. I need helping locating the error ``` #include #include void reverser(char\*); int readmassage(char[], int)...
2018/03/16
1,303
4,703
<issue_start>username_0: I am new to Ionic 3 and mobile development. I am trying to connect a MySQL DB to my Ionic app and a PHP Restful API. I tested the API with Postman and it is working just fine, in order to implement it in Ionic I did the following, I first made a provider named Authservice: ``` import { Injecta...
2018/03/16
1,187
3,573
<issue_start>username_0: This dockerfile installs nodejs version 4.2 and I cant understand why. could someone please help me install node 9.2. i've tried taking out the -- no install-recommends command to no avail. adding more text her because stack would not let me post this even though it is a very simple question ...
2018/03/16
701
2,746
<issue_start>username_0: Setting up authentication with reactjs, firebase (google auth), react-router and redux. The problem is very simple but I can't find any resource online or answers to fix it. Unable to read roperty of uid (user id with firebase) because it's telling me it's undefined? I've set this up that Pri...
2018/03/16
899
3,084
<issue_start>username_0: I have kinda complex question. Let's say that I have 7 tables (20mil+ rows each) (Table1, Table2 ...) with corresponding pk (pk1, pk2, ....) (cardinality among all tables is 1:1) I want to get my final table (using hash join) as: ``` Create table final_table as select t1.column1, t2.colum...
2018/03/16
2,585
7,131
<issue_start>username_0: In simple terms, I'm trying to add columns `latitude` and `longitude` from `df1` to a smaller DataFrame called `df2` by comparing the values from their `air_id` and `hpg_id` columns: [![enter image description here](https://i.stack.imgur.com/svr7p.png)](https://i.stack.imgur.com/svr7p.png) Th...
2018/03/16
286
974
<issue_start>username_0: I'm doing some VBA recently for work and I need to check in a webpage to click a button if is enable and don't click if is disabled. BUT! I don't know how to make VBA check the disabled button. Here is the button code: ```htm ``` I tried some If, but didn't work ``` Set nxt = IE.docum...
2018/03/16
1,196
2,720
<issue_start>username_0: I am trying to add rows to a data frame based on the minimum and maximum data **within** each group. Suppose this is my original data frame: ``` df = data.frame(Date = as.Date(c("2017-12-01", "2018-01-01", "2017-12-01", "2018-01-01", "2018-02-01","2017-12-01", "2018-02-01")), Group...
2018/03/16
2,094
7,787
<issue_start>username_0: I'm new on VueJS ans Webpack. I've created a project with VueJS CLI and trying to work with it. I need to insert an CDN to my code. When working with standard HTML, CSS & JS solutions, I'd include CDNs like this: ```html False Merge ``` As you can see, you can add a CDN script with the ...
2018/03/16
2,037
7,719
<issue_start>username_0: Just started with a company and noticed that their database was set to Simple Recovery. I talked to the owner and suggested to convert it to Full Recovery, explained to him the benefit of using a transaction log and backed up every hour. After he agreed I did a full DB backup prior to conversi...
2018/03/16
1,247
4,948
<issue_start>username_0: When I run the Firestore transaction it gives me the error : > > "Every document read in a transaction must also be written in that transaction." > > > But all the documents that I am trying to read in the transaction are also being written to in the code below ? ``` db.runTransactio...
2018/03/16
600
2,525
<issue_start>username_0: I'm including a video in a page and have had no problems in Chrome or Safari thus far, but on Firefox the viedos are muted and the volume can't be changed. Here is the video code ``` Your browser doesn't support HTML5 video. Here is a ``` Any thoughts on how to fix this?<issue_comment>user...
2018/03/16
1,026
3,901
<issue_start>username_0: I have an Ionic application where I have created a component to show some data of an object. My problem is that when I update the data in the parent that hosts the component the data within the component does not update: my-card.component.ts ``` @Component({ selector: 'my-card', templ...
2018/03/16
1,137
3,448
<issue_start>username_0: For some rectangular we can select all indices in a 2D array very efficiently: ``` arr[y:y+height, x:x+width] ``` ...where `(x, y)` is the upper-left corner of the rectangle and `height` and `width` the height (number of rows) and width (number of columns) of the rectangular selection. Now,...
2018/03/16
287
1,060
<issue_start>username_0: I don't understand how this if statement executed as timer is nil ``` if timer != nil { logInfo("Cancelling notification for op=\(op), count=\(self.retryWindow.count)") timer!.invalidate() ``` [![enter image description here](https://i.stack.imgur.com/...
2018/03/16
3,976
17,239
<issue_start>username_0: I have a active project that has always used C#, Entity Framework, and SQL Server. However, with the feasibility of NoSQL alternatives daily increasing, I am researching all the implications of switching the project to use MongoDB. It is obvious that the major transition hurdles would be due t...
2018/03/16
375
1,009
<issue_start>username_0: I have array with values sourceArray and I have array with values to replace toReplace. I want to replace all values that are in sourceArray that are equal to values in toReplace array. Is there some smart way to do it in Python ? E.g. ``` sourceArray = [0,1,2,3,4,5,5,6,7] toReplace = [5,6...
2018/03/16
1,988
5,678
<issue_start>username_0: Let's say we have this datetime: ``` var d = new Date("Sat Jul 21 2018 14:00:00 GMT+0200"); ``` Exporting it as a string (`console.log(d)`) gives inconsistent results among browsers: * `Sat Jul 21 2018 14:00:00 GMT+0200 (Paris, Madrid (heure d’été))` with Chrome * `Sat Jul 21 14:00:00 UTC+0...
2018/03/16
947
3,927
<issue_start>username_0: It seems like you should be able to do this because building a form dynamically based off of a class definition (Angular) would work so much better if the logic could be written agnostically of the class. This would be scalable, so an addition of a field to the class would not also require an u...
2018/03/16
430
1,902
<issue_start>username_0: I've been trying to learn about WCF services and hosts. I made a simple host program to host my simple service. It works fine, but I don't understand how the host program can continue completing unrelated tasks after opening the service. Does the service run on a separate thread that opens behi...
2018/03/16
1,081
3,817
<issue_start>username_0: I'm using serverless.yml to create a couple services in AWS cloudformation, specifically: cognitoUserPool and UserPoolClient. Both of these creations will return IDs that I will use on my flat html files with the cognito library to connect to amazon cognito, so, since I am serving flat files ...
2018/03/16
1,427
5,038
<issue_start>username_0: I am struggling to implement unit testing for action methods that incorporate `User.Identity.Name` functionality. The methods that I've come across fail because the properties that they suggest writing to throw 'read-only' errors (e.g. writing to `HttpContext` or the controller `User`) I have ...
2018/03/16
5,913
13,651
<issue_start>username_0: have the below RSA Private key with me and I have to generate a JWT token using **RS256 algorithm**. Here is my sample **Private Key**: ``` -----<KEY> ``` **Header** ``` { "alg": "RS256", "typ": "JWT" } ``` **Body**: ``` { "iss": "14a2fecb-ddd7-4823-46e2-67515bc01734", "sub": ...
2018/03/16
3,239
9,068
<issue_start>username_0: I am not sure what has happened, but all of a sudden I am getting weird behaviour in my controller. The controller is set up to return a json serialized object like so: ``` return Ok(JsonConvert.SerializeObject(result, Formatting.Indented)); ``` It was working correctly but now it is retur...
2018/03/16
944
3,103
<issue_start>username_0: I scaled a matrix based on its columns, like this: ``` scaler = MinMaxScaler(feature_range=(-1, 1)) data = np.array([[-1, 2], [-0.5, 6], [0, 10], [1, 18]]) scaler = scaler.fit(data) data_scaled = scaler.transform(data) ``` the `data_scaled` gave me the following: ``` array([[-1. , -1. ], ...
2018/03/16
2,545
8,299
<issue_start>username_0: I'm trying to display my output in a 4X4 format. The program receives name of a text file then get the values in the text file and store in the 2D array. Then later displays them like this ```none 7 2 4 5 5 2 6 4 2 2 5 5 9 2 4 5 ``` But the problem is, it doesn't display like that, I'm not...
2018/03/16
501
1,661
<issue_start>username_0: I'm doing a join between two tables to push criteria values into a record description. The problem is some records do not have some/all criteria and the entire string fails: `Select Concat(Description,' ',C.CritieraNameA,': ',T.CriteriaValueA,' ',C.CriteriaNameB,': ',T.CriteriaValueB) F...
2018/03/16
1,015
3,651
<issue_start>username_0: I have two tables temp\_number and temp\_port, I want to select only those number which are having only port name is 'ip sub' and want to exclude those numbers are having both port names or port name is 'local loop' ``` temp_number ----------------------------------- numberid | na...
2018/03/16
970
3,501
<issue_start>username_0: So I have a list of viewmodels that i iterate through and one of the properties in the viewmodel object is a dictionary. In my customercontroller, in the details action I get all the viewmodels that correspond to the id from the asp-route and in the view i have a form where I present all the di...
2018/03/16
423
1,397
<issue_start>username_0: I want to create a hotkey using a backslash key (`\`). Namely, I would like to assign `Media_Prev` to Windows button + backslash. I have tried both `LWin & \::Media_Prev` and `#\::Media_Prev`. However, these do not work: it just normally sends the backslash character. In AutoHotkey's key histor...
2018/03/16
976
3,280
<issue_start>username_0: ok so I understand this is a very basic JS logic but I am trying to replace any `document.write()` with `.innerHTML` and I tried it with the code below ``` function writeTimesTable(num) { for(let i = 1; i < 10; i++ ) { let writeString = i + " * " + num + " = "; writeString = writeStr...
2018/03/16
851
3,031
<issue_start>username_0: I'm trying to render an curved vertical list like this iOS component: <https://github.com/makotokw/CocoaWZYCircularTableView> That component (written in Obj-c) iterates the visible cells when laying them out, and sets the frame (i.e. indent) using asin. I know in React Native I can set the le...
2018/03/16
1,444
5,011
<issue_start>username_0: I am using Keras to perform landmark detection - specifically locating parts of the body on a picture of a human. I have gathered around 2,000 training samples and am using rmsprop w/ mse loss function. After training my CNN, I am left with `loss: 3.1597e-04 - acc: 1.0000 - val_loss: 0.0032 - v...
2018/03/16
1,283
3,651
<issue_start>username_0: Suppose I have several lists of colors, where each list correspond to a given person. I want to create a master list, so I know which person has has what colors in their list. Here's example data: ``` Sarah <- c("Red", "Blue", "Yellow", "Green", "Pink") Ben <- c("Black", "White", "Silver", "P...
2018/03/16
1,032
3,574
<issue_start>username_0: I am trying to create a 'secret' guestList to practice some closures and binding in JS. I am currently stuck because I need to use binding so the value of `i` updates after every iteration but I am really new to biding and I am having trouble wrapping my head around this... how do I call my var...
2018/03/16
838
2,947
<issue_start>username_0: I try to create registration in Angular 5. Everything seems to be working properly (accounts are added to the database) however I always get error `TypeError: undefined is not an object (evaluating 'data.Errors[0]')` Any ideas what is wrong? It seems to me that there is a problem with `data.Suc...
2018/03/16
702
2,154
<issue_start>username_0: I have created a table from my MySQL Table. Each row has five columns and the fifth column contains a hyperlink to a new php file. The new php file requires the variables contained in columns 3 and 4. My code for populating the table cells is as follows; ``` | | | | | | | | --- | --- | ...
2018/03/16
6,099
8,487
<issue_start>username_0: I have a very large dataset that can be described by the following `R` code: ``` set.seed(1) data <- data.frame(id = rep(c(rep(1,5), rep(2,5)),2), h = rep(1:2,10), d = c(rep(1,10), rep(2,10)), t = rep(c(sample(c(1,2,3), 5, replace = T), sample(c(1,2,3), 5...
2018/03/16
1,188
4,022
<issue_start>username_0: I am fairly new to power shell scripting. I am trying to write a script that will update the BIOS of several hundred Dell computers. But I am having an issue with these two errors: > > > ``` > Get-WmiObject : Invalid namespace "root\DCIM\SYSMAN" > At C:\Users\xxx\Desktop\Bios Updates Test.p...
2018/03/16
646
2,165
<issue_start>username_0: From a CSS Working Group [post](https://wiki.csswg.org/ideas/dollar-variables?s[]=variables): > > Custom properties are used for more than just variables [...] > > > Contradicting what a lot of people think (see [this](https://stackoverflow.com/a/48887899/3537581)), this post confirms no...
2018/03/16
469
1,433
<issue_start>username_0: I want to use `regex` to test if a string is either a `-` followed by some intentional note, or is completely blank without whitespace of any kind. I tested it on [regex101.com](http://www.regex101.com) but I don't understand how the `$` symbol doesn't singlehandedly prevent the `\n` character...
2018/03/16
447
1,476
<issue_start>username_0: Looking for a quick answer. I've moved my scss and fonts folders from src/ to src/assets and I'm getting the below error: [![enter image description here](https://i.stack.imgur.com/UKu1e.png)](https://i.stack.imgur.com/UKu1e.png) The code in this folder is as below: ``` src: url('~assets/...
2018/03/16
1,052
3,392
<issue_start>username_0: How to round a given number to a 0, 5 or 9, which ever is closest? I've tried with: ``` =MROUND(I2,5)-((MOD(MROUND(I2,5),10))=0) ``` But I need zeros too, this only gives me fives and nines. Thanks<issue_comment>username_1: ``` =1*(ROUNDDOWN(A2/10,0)&INDEX({0,5,9},MATCH(MIN(ABS({0,5,9}-MOD(A...
2018/03/16
1,661
5,537
<issue_start>username_0: Okey so I have created some booleans and according to them I would like to set color of a button. So lets say I have ``` boolean test1 = true; boolean test2 = false; ``` True would be green and false would be red. And now I would like my program to set the colors to buttons according to bool...
2018/03/16
730
2,675
<issue_start>username_0: I am trying to make a button for my website, which has a changing color hover effect. It can simply be done in css in this way: ``` .button{ color: green; } .button:hover { background : green; color: black; } ``` However, I wanted to give this a nice transition using JQuery (sin...
2018/03/16
1,198
2,523
<issue_start>username_0: This is my data set ``` fake_abalone2 Sex Length Diameter Height Whole Shucked Viscera Shell Rings Weight Weight Weight Weight 0 M 0.455 0.365 0.095 0.5140 0.2245 0.1010 0.1500 15 1 M 0.350 0.265 0.090 0.2255 ...
2018/03/16
797
1,967
<issue_start>username_0: I have an element in local storage with multiple elements, for simplicity, I will make the element: ``` * ``` The element is saved as a string and I want to manipulate the contents. Like such: ``` let local_storage_element = localStorage.getItem("val") $(local_storage_element+':last-ch...
2018/03/16
745
2,843
<issue_start>username_0: I need to persist state in Redux after refresh of my website. What is the easiest way to do this? I rather wouldn't like to use redux-persist if it possible.<issue_comment>username_1: Basically, you need two functions, **loadState()** and **saveState()**. ``` export const loadState = () => { ...
2018/03/16
213
693
<issue_start>username_0: I have the following line of code ``` import javax.xml.bind.DatatypeConverter; ``` which is giving me a ``` javax.xml.bind cannot be resolved ``` where can I find the library file for this import?<issue_comment>username_1: The module **javax.xml.bind** has been renamed and is also depreca...
2018/03/16
608
2,145
<issue_start>username_0: I have different timestamps and a timezones coming from an API as an object. Example: ``` {{'ts' : 1521311400000}, {'tz' : 'GMT+01:00'}} ``` How can I convert the timestamp to a human readable Date in that timezone using `toLocaleTimeString()`? I have tried to pass the timezone inside the `...
2018/03/16
1,165
4,812
<issue_start>username_0: I have an architectural problem. I'm using Django (with admin panel) and DRF (api with stateless authentication using JWT). Django has Admin users represented by model which is more or less the same as default Django User Model. Admins work with Django Admin only and can't use DRF api. DRF ha...
2018/03/16
514
1,781
<issue_start>username_0: I tried "T extends Array" but that doesnt work, ``` public class Foo { { ...} } public class Bar { { Foo f; <-- Error } } ``` From what I saw, I dont think its posible, but hey, I'm not a Java guru<issue_comment>username_1: No, you can't extend a class with `Array`. You can only extend ...
2018/03/16
695
2,509
<issue_start>username_0: Let's clarify three common scenarios when no item matches the request with a simple example: 1. `GET /posts/{postId}` and `postId` does not exist (status code 404, no question) 2. `GET /posts?userId={userId}` and the user with `userId` does not have any posts 3. `GET /posts?userId={userId}` an...
2018/03/16
463
1,988
<issue_start>username_0: I was making this simple python game where you guess a random number. I was wondering how you would loop it so it would keep going until you get the correct number. It needs to do that without changing the number while the player is guessing. ``` import random print('Welcome to Guess The Numbe...
2018/03/16
539
2,099
<issue_start>username_0: friends. I'm getting a syntax error, that is pointing at the closing curly bracket just above the render. It says that it's expecting a comma, but I don't understand why. All of the curly brackets have opening and closing brackets. What am I missing? ``` import React, {Component} from 'react';...
2018/03/16
473
1,997
<issue_start>username_0: I guess this is more of a philosophical question. I have one item with 4 variations. These variations will share about 80% of their columns. The item in question is a portfolio example and the variations are photography/video/web/graphic. They will share column names like client, date, etc. My...
2018/03/16
508
2,083
<issue_start>username_0: I fetch a list of users from the database with their details and I also fetch a list of blocked userID's from the database I just want to subtract the list of blocked user from the users array and and then load the screen so blocked user don't show up I have an array of userId's called "Use...
2018/03/16
831
3,437
<issue_start>username_0: I've been struggling for quite some time now with trying to maintain a list of objects when the ViewModel is submitted back to the controller. The ViewModel receives the list of objects just fine, but when the form is submitted back to the controller the list is empty. All of the non-collection...
2018/03/16
671
2,379
<issue_start>username_0: I upgraded my app from spring boot 1.5.9.RELEASE to 2.0.0.RELEASE, and I can no longer import `org.springframework.boot.context.embedded.LocalServerPort`. I was using this to inject the port the server is running on during a test: ``` public class Task1Test { @LocalServerPort private ...
2018/03/16
497
1,844
<issue_start>username_0: I have two dates. One of them is the current date, one of them is a date somebody uploaded something, this is stored in a database. I need to find out if the date stored in the database is older than 7 days from the current date. I'm using PHP's `date(d/m/y);`, I've tried some things online, I'...
2018/03/16
502
1,655
<issue_start>username_0: I try to generate 300k urls with python in a text file: ``` with open(r'somefile.txt') as f_out: for i in range(100, 120): f_out.write(r'www.website.com/{}\n'.format(i)) ``` But the result is: ``` www.website.com/ 101www.websitecom/ 102www.website.com/ ``` etc<issue_comment>username_1: I...
2018/03/16
415
1,495
<issue_start>username_0: I have two UILabels in a UIStackView. Is it possible for the UIStackView to get focus and gestures in tvOS?<issue_comment>username_1: It looks like it was moved to [org.springframework.boot.web.server.LocalServerPort](https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/api/org/springframew...
2018/03/16
1,323
2,371
<issue_start>username_0: There is an one-dimensional array, for instance, as shown in the following. Are there any functions that can transform this array into another array, which only keeps the top 5 elements of the existing array. These five kept elements are marked as `5, 4,3,2,1` based on their respective numerica...
2018/03/16
391
1,141
<issue_start>username_0: How do you count the amount of zero rows of a numpy array? ``` array = np.asarray([[1,1],[0,0],[1,1],[0,0],[0,0]]) ``` -> has three rows with all zero's, hence should give 3 Took me sometime to figure out this one and also couldn't find an answer on SO<issue_comment>username_1: ``` import ...
2018/03/16
172
708
<issue_start>username_0: Not to be confused with wanting to know how use strict works, but why is strict mode activated with `'use strict';` or `"use strict";` as opposed to an expression like `use strict;`?<issue_comment>username_1: `use strict;` would throw an error in JS engines that did not support strict mode. Us...
2018/03/16
727
2,858
<issue_start>username_0: I just learned about React Fragments. I understand that fragments are slightly more efficient by creating less tree nodes and makes it cleaner when looking at inspector, but then why should we ever use as containers in React components? Should we always just use React.Fragments in our componen...
2018/03/16
820
2,622
<issue_start>username_0: I am trying to create a dot plot using `geom_dotplot` of `ggplot2`. However, as shown in the examples on [this page](http://ggplot2.tidyverse.org/reference/geom_dotplot.html), the scales of y-axis range from 0 to 1. I wonder how I can change the y-axis scale so the values reflect the actual c...
2018/03/16
1,910
6,823
<issue_start>username_0: I'm trying to solve this excercise but I can't think of a solution. I need to check if a list is palindrome, taking these considerations: If the list is simple I just need to check if it's palindrome horizontally, but if it's a nested list I need to check both, vertical and horizontal. I ...
2018/03/16
1,052
3,538
<issue_start>username_0: I am trying to get the total minutes of a Local Time Object in my jtable. As I didnt find any method I tried to convert it to a string and then convert the string to minutes. The lenght of the nanoseconds is always changing depending of the table inputs and throws then a DateTimeParseException...
2018/03/16
1,130
3,718
<issue_start>username_0: I am trying to create a trigger in Oracle whereby we move deleted records to another table. So when deleted column is set to 1, it should move the records from the patient\_table to the deleted\_patient\_table. Can you please help :) ``` CREATE TABLE Patient_Table( PatientID NUMBER(6) Primary...
2018/03/16
1,064
3,620
<issue_start>username_0: * I am trying to integrate right click menu to the grid header. * when I right click on google link its working. * but where as when I right click on grid header the menu not showing . * can you tell me how to fix it . * providing my code below. <http://jsfiddle.net/c7gbh1e9/> ```here $('body...
2018/03/16
1,585
6,214
<issue_start>username_0: I have a largish base.twig file, and I want to break it up into three includes: header.twig, content.twig, and footer.twig. I'm having trouble getting the block from my child template to override the block included into my parent template and would like to know if it's even possible, and if not...
2018/03/16
619
2,467
<issue_start>username_0: This is the file path for my Pydev project in Eclipse: ``` project | +----tests | | | +----subtests | | | | | +----__init__.py | | | | | +----test1.py | | | +----__init__.py | | | +---...
2018/03/16
781
2,785
<issue_start>username_0: I have installed the latest versions of Unity (2017.3.1), Daydream SDKs (GVR SDK for Unity v1.130.0) and followed the steps here: <https://developers.google.com/vr/develop/unity/get-started#configure_build_settings_and_player_settings> However when I press Play I get the following error, ideas...
2018/03/16
3,312
12,133
<issue_start>username_0: I want to create a responsive, mobile optimized reading experience similar to an epub/ebook reader, like the Kindle app, or iBooks, using dynamic html as the source. Imagine a long article or blog post that requires a lot of vertical scrolling to read, especially on a small mobile device. What...
2018/03/16
217
765
<issue_start>username_0: Im trying to check the eloquent queries to check for n+1 problems. Im using this "Event::listen('illuminate.query', function($sql){ var\_dump($sql); });" on top of web.php routes file but no query appears. It seems that is because of the version of laravel, that is laravel 5. Do you know in ...
2018/03/16
1,956
7,202
<issue_start>username_0: I have a code like the foolowing: ``` def render(): loop = asyncio.get_event_loop() async def test(): await asyncio.sleep(2) print("hi") return 200 if loop.is_running(): result = asyncio.ensure_future(test()) else: result = loop.run_unt...
2018/03/16
818
2,318
<issue_start>username_0: I have a navigator structure like so: `stack drawer stack tab` My hierarchy from there is: ``` view view flatlist ``` I'm trying to get my flatlist to scroll downward. You can see the finger animation but the list isn't moving. You can see it in this gif: [Screen Recording 2018-03-...
2018/03/16
1,549
6,353
<issue_start>username_0: **tl;dr** How can I exclude a class from being included in the jar file generated by `bootJar`, depending on a Spring profile? --- *I'm going to intentionally be vague, but will try to provide as much info as possible.* I have a C# .NET web api (JSON over HTTP/1.1). This api receives an encr...
2018/03/16
850
3,014
<issue_start>username_0: I upgraded laravel spark to version six and connected to the github repo on the site. Everything seemed to go OK on the npm install command, but when I ran the npm run dev, I got a slew of errors that basically told me that things related to spark were not found. Seems to be related to the new ...