date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2018/03/08
652
2,147
<issue_start>username_0: I am using Laravel. I am using the `mailtrap.io` driver for testing to send a welcome email after the user has registered but I am not getting the welcome email. I am only getting an email for password reset. Very weird because I did this before and I'm not understanding. Can someone please...
2018/03/08
371
1,458
<issue_start>username_0: I wish to develop a Web app using PHP as my server-side language and Angular 2 as my MVC framework. When I collecting information about Angular 2, I've seen that it is a good (and **recommended**) practice to install Node.js and npm first for Angular 2, because it uses Typescript. I have an exp...
2018/03/08
566
1,973
<issue_start>username_0: I have a 'functions' module where I keep a bunch of useful code that reduces coding time and redundancy. What i'd really like to do is sandwich the code as much as I can. The problem I'm having is that you cannot place a 'Next' instruction on the same line as a 'For' and 'if'. Here's what I cu...
2018/03/08
493
1,756
<issue_start>username_0: I can't send or receive email, i added the following settings to the : site.ini located in `D:\EasyPHP-.3.3\www\ezpublish5.4\ezpublish_legacy\settings` : ```html Transport=sendmail #A list of possible handlers for sending mails, use the setting Transport to specify which one to use Transpor...
2018/03/08
1,527
5,398
<issue_start>username_0: I have a data source that has multiple outline levels. Here is an example: ``` Level 1 | Level 2 | Level 3 A 1 X1 A 1 X2 A 2 X3 B 3 X4 B 4 X5 B 4 X5 C 5 X6 C 5 X6 C ...
2018/03/08
747
2,633
<issue_start>username_0: Suppose I have a model **Incident** and **Employee** related by associations: **Incident** ``` belongs_to :recipient, class_name: 'Employee', foreign_key: :recipient_id belongs_to :responder, class_name: 'Employee', foreign_key: :responder_id ``` I would like to have a scope in Incident mod...
2018/03/08
832
3,044
<issue_start>username_0: I have here a code which allows me to change the color of the buttons. Weird thing for me is that it only changes one button instead all of them. But I want to have it changed all of them at the same site. Here is a codepen code with HTML: <https://codepen.io/akincakiner/pen/EExxMe> ```js /*S...
2018/03/08
803
2,357
<issue_start>username_0: I have the following string: example = "1,3,4-7,9,13-17" With these values ​​I want the next array: 1,3,4,5,6,7,9,13,14,15,16,17 With the script below I get the values ​​between the commas, but how do I get the rest. ``` teststring = "1,3,4-7,9,13-17" testtable=split(teststring, ","); for i...
2018/03/08
571
1,778
<issue_start>username_0: I have a column called `cc\_flags' in a Python astropy table. It looks like:: cc\_flags --------- ``` 0000 ddOO 0000 hHOO 0000 DD00 hHOO hHPO P000 00h0 ... 0000 ``` I'd like to pull out every row with the last character of the four if it is a '0'., i.e a '\*\*\*0' or a '???0' matcher. I'm...
2018/03/08
649
4,956
<issue_start>username_0: I am trying to select the records thier 'Text' field match the following form: ``` __\_\_ xyz \_\___ ``` where \_\_ means anything, and xyz represents the own word that I'm searching for. Notice: the field 'Text' is a multiline string. Here is the query, but it doesn't return any records: ...
2018/03/08
1,865
6,522
<issue_start>username_0: I have this code, that will print all the permutations of a list : ``` def permute(iterable,fixed=0): for i in range(fixed,len(iterable)): iterable[fixed:] = [iterable[i]] + iterable[fixed:i] + iterable[i+1:] if fixed==len(iterable)-1: print iterable pe...
2018/03/08
717
2,395
<issue_start>username_0: I have a navigation bar with the same color as the view's background. If the user presses a button, the color of the view is changing, but the color of the nav bar isn't. If I'm trying to change it manually, with ``` self.navigationController?.navigationBar.barTintColor = UIColor(red: 104.0/25...
2018/03/08
791
2,843
<issue_start>username_0: i will discuss my case to make a good understand for my question at first i am getting data from my api client as my class : ``` return JsonConvert.DeserializeObject(responseContent); ``` so i get the data of my class : which is ``` public enum TestStatus { Sucess, Error } public c...
2018/03/08
834
3,422
<issue_start>username_0: I'm coding a guitar tuner in c#. Using the NAudio library, I can compute an FFT of my microphone's data in real time. The FFT works well when i visualize it, but when I try to extract the fundamental frequency, I only get results far from what i'm supposed to have. I suppose this has to do wit...
2018/03/08
4,603
11,260
<issue_start>username_0: One text file 'Truth' contains these following values : ``` 0.000000 3.810000 Three 3.810000 3.910923 NNNN 3.910923 5.429000 AAAA 5.429000 7.060000 AAAA 7.060000 8.411000 MMMM 8.411000 8.971000 MMMM 8.971000 13.40600 MMMM 13.40600 13.82700 Zero 1...
2018/03/08
3,742
9,563
<issue_start>username_0: I'm trying to get the values of inputs. I should get an array of strings but instead I only get one string. Shouldn't `$('input[name="paramDescriptions"]').val();` get all the values of the input where name equals x? How do I fix this ```js $('#submit').click(function() { var paramDescri...
2018/03/08
1,270
4,630
<issue_start>username_0: Is there an api to retreive in real time the DTU consumption? I want to rebuild a chart like this on my website. ![demo image](https://i.stack.imgur.com/JgmvL.png)<issue_comment>username_1: I don't know about any API doing that but you can use the following query to create your own API or creat...
2018/03/08
722
2,913
<issue_start>username_0: I'm new to MongoDB, and the most difficult to understand is how to ensure data integrity. I've got two collections Post -> Comment (One to many). Is there a way to store number of comments for each post, without of using [two phase commit](https://docs.mongodb.com/manual/tutorial/perform-two-...
2018/03/08
465
2,040
<issue_start>username_0: We are working on PAAS applications (Spring Boot) which have 2-3 different modules in which each module has some redundant code for creating and closing database and MQ connections. We are using Hikari DataSource for maintaining pool connections, and are planning to centralize the code which c...
2018/03/08
495
1,843
<issue_start>username_0: Hey guys I do have a simple form where users could choose between three options. If the user has selected an option and presses the enter key the search button should be triggered. So far everything works fine with that code below: ``` Search ``` Now here is my problem: If the user has ch...
2018/03/08
400
1,578
<issue_start>username_0: I have a Filemaker 16 hosted application to be used with a ipad. Within the application I have a scripted container field which captures a users signature. Once the user has signed the field they click accept, the first time clicking accept the signature window closes and show it was loaded but...
2018/03/08
3,039
12,404
<issue_start>username_0: I'm trying **ARKit 1.5** with image recognition and, as we can read in the code of the [sample project from Apple](https://developer.apple.com/documentation/arkit/recognizing_images_in_an_ar_experience): *Image anchors are not tracked after initial detection, so create an animation that limits...
2018/03/08
216
766
<issue_start>username_0: I need to compare two date (the type in db is TIMESTAMP) in my db (MySQL). Something like this: (this query in very very simplified because I need this answer only) ``` SELECT count(id) as count FROM table WHERE data1 > data2 ``` `data1` and `data1` are two TIMESTAMP columns in my db. I do...
2018/03/08
591
2,385
<issue_start>username_0: So, I have a custom class 'User' like this: ``` class User { string firstname; string lastname; string proposedname; public User(string firstname, string lastname) { this.firstname = firstname; this.lastname = lastname; ...
2018/03/08
1,032
4,429
<issue_start>username_0: I realize this question has been asked before, but I haven't found an answer that I understand yet. I am still new to asynchronous programming, and I'm having a difficult time trying to figure out how to do the simplest things in Protractor/Javascript. For example, how do I construct the func...
2018/03/08
530
1,480
<issue_start>username_0: I'm' trying to convert string to JSON file using the `json.dump` method. Before the conversion, I need to add escape character before each char that represented as hex for example `'\x00'` or `'\x96'`. In the end I need to convert string like: ``` '\x94\xa0aaa' ``` To: ``` '\\x94\\xa0aaa' ...
2018/03/08
799
2,609
<issue_start>username_0: I keep getting an Internal Server Error while trying to transfer a large document between two MarkLogic clusters. It times out after 5 minutes. ``` SVC-SOCRECV: xdmp:http-post(...) Timeout (decodeResponseLine1) ``` The url looks like this: ``` http://source-host:8020/uri.transfer.xqy?key=/...
2018/03/08
1,948
7,819
<issue_start>username_0: I have been performing UI tests and so far so good, my challenge at the moment is performing test on a recyclerView adapter class. I do not have the slightest idea of what kind of test can be done. My code is below. ``` public class HomeAdapter extends RecyclerView.Adapter { private Contex...
2018/03/08
816
2,962
<issue_start>username_0: if I add a marker with a label on a Google Maps map and then I call fitBounds to another region, I still continue to see the label without the marker unless I zoom out. Is it a bug? Here's a working fiddle, try to click Milano button: [JSFiddle](https://jsfiddle.net/tr7c87d7/) Html: ``` ```...
2018/03/08
443
1,207
<issue_start>username_0: I have two lists similar to these (equal length and populated with `string` values): ``` a = ["W", "", "X", "", "Y", "Z"] b = ["a", "b", "c", "d", "e", "f"] ``` I want to remove the elements from list `a`, if the element is an empty `string`. In addition, I want to remove corresponding eleme...
2018/03/08
196
740
<issue_start>username_0: In the picture below i see my branches as tree from the master. How can i get the same graph with my local folder before pushing every thing to Github? I want to see that if my current branch come from the master? Sorry if the name is not telling my issue very clear but just because i don't kn...
2018/03/08
341
1,244
<issue_start>username_0: I am trying to show make an activity in my app where the statusbar is completely transparent. I added this to my style: ``` @android:color/transparent true true ``` But for some reason all views in my are all appearing below the statusbar. All the views are top aligned to parent `app:layout...
2018/03/08
454
1,590
<issue_start>username_0: i have a list of countries with id i want to pull the country id of a specific country name ``` export const country_list_with_id = [ { id: 1, code: "AF", name: "Afghanistan" }, { id: 2, code: "AL", ...
2018/03/08
826
2,342
<issue_start>username_0: I have a list of unequal lists. I would like to generate a new list with list comprehension from the sublists. ``` s = [['a','b','c','d'],['e','f','g'],['h','i'],['j','k','l','m']] ``` I am trying the following code but it keeps raising an indexError: ``` new_s = [] for i in range(len(s)): ...
2018/03/08
932
3,404
<issue_start>username_0: This is a question about using the angular-l10n translation module, but since it's a more typescript specific question i post it here. To dynamically configure the module (and for example set the default language), i have to use the following method: ``` load(): Function { this.localeConfig...
2018/03/08
825
2,722
<issue_start>username_0: When the value of the `ng-model` is `"24" (string)` instead of `24 (number)`, on an `input[type="number"]` it throws following error: > > Error: [ngModel:numfmt] <http://errors.angularjs.org/1.5.8/ngModel/numfmt?p0=24> > > > I tried to set the input as follow: ``` ``` However, this thr...
2018/03/08
650
2,519
<issue_start>username_0: I have an Angular5 single-page app that works perfectly on Google Chrome, Firefox, Microsoft Edge and mobile browsers. However, with IE11, I get the errors: `ERROR TypeError: Object doesn't support property or method 'find'` and `ERROR TypeError: Object doesn't support property or method 's...
2018/03/08
899
2,889
<issue_start>username_0: ```html **The Dormouse's story** .... **A tale** ``` I need to get all direct children of tag , but not the grand children. So in this case, it should only output and . The closest method I found outputs both tags and all of their children. How can I do it right?<issue_comment>userna...
2018/03/08
547
1,483
<issue_start>username_0: folks! I am looking for some help in writing a C++ code. The problem is stated below: ``` I have an equation x = (A-a[i]) + (B-b[j]) + (C-c[k]) + (D-d[l]) Now (i,j,k,l) can be any permutation of (0,1,2,3) (i.e. 24 possibilities). ``` And need to chec...
2018/03/08
719
2,472
<issue_start>username_0: I'm trying to make the key `Ctrl+UpArrow` execute both commands `cursorUp` and `scrollLineUp`. I was hoping that this would work, but it doesn't: ```jsonc { "key": "ctrl+up", "command": ["cursorUp", "scrollLineUp"], // This doesn't work "when": "editorTextFocus" } ``` How do I do ...
2018/03/08
554
2,095
<issue_start>username_0: we want to create a Sales Order with Cloud SDK (Version 1.9.2) using Virtual Data Model (A\_SalesOrder) in our Java Application. We are calling S4 OnPremise System (1709). ``` SalesOrder so = SalesOrder.builder() .salesOrderType("ZKE") .salesOrganizati...
2018/03/08
400
1,240
<issue_start>username_0: I have a query that returns customer phone numbers. Many of the numbers are bogus or invalid, where the customer has put in all 9's, all 1's, all 0's or a combination of both. How can I go about removing rows where the Phone numbers have x amount of recurring digits to where I can eliminate the...
2018/03/08
789
3,103
<issue_start>username_0: In Asp.Net MVC, you can easily return a partial view by doing the following: `return PartialView("ModelName", Model);` How is this done on a RazorPage ViewModel Handler?<issue_comment>username_1: I figured this out. It is not nearly as straight forward as it is in MVC. You have to create an e...
2018/03/08
4,024
7,869
<issue_start>username_0: My Issue: --------- I have two functions that operate on the same logic. I have pinpointed the error to the following lines of code. In the first example, the code operates without error: `StressQoQ <- ifelse(HPF$index ==0, 0, StressQoQ)` However, in the second example, I receive an error "Err...
2018/03/08
828
3,699
<issue_start>username_0: I have a scenario : ``` UI<--->Spring boot micro-service REST API<--->server ``` Now, there is a situation in which I want to handle custom exceptions(which I am aware how to do) in order to return specific Http Status and message back to UI when server responds in certain manne...
2018/03/08
391
1,403
<issue_start>username_0: I have the following XML document: ``` test test test test test test ``` This is the XPath query: ``` //description/descriptionextension[contains(@name,'valid')]/../@name ``` Is it possible to fetch the description name only if all child description extensions are 'valid'. Her...
2018/03/08
446
1,477
<issue_start>username_0: How can I go about checking to see if a one to many table contains one or more results in a temporary table? ``` @colors Temp Table ------ Red Blue Green Pink Yellow SELECT u.userID, u.color FROM USERS as u WHERE u.field = '123' AND ( (SELECT t2.userColor FROM ...
2018/03/08
3,168
9,616
<issue_start>username_0: I have been given a task to create a table with where the CustomerID will have to be in text(Varchar) and must be unique. I created the table using the example bellow (Using calculated field). I was told that the table should not contain any calculated filed and the LEN of the CustomerID column...
2018/03/08
3,202
9,430
<issue_start>username_0: I'm building a random forest on some data from work (this means I can't share that data, there are 15k observations), using the caret train function for cross validation, the accuracy of the model is very low: 0.9%. here's the code I used: ``` set.seed(512) n <- nrow(my_data) train_indices <...
2018/03/08
2,524
7,808
<issue_start>username_0: I have an Access DB (part of Office 365) with extension (.accdb). This database is protected by a password. I'm trying to create a connection to this Access db in SSIS but it keeps failing when I do a "Test Connection". I'm using the following provider in my connection: 1. Native OLE DB\Micro...
2018/03/08
755
2,116
<issue_start>username_0: I would like to add a new column D to data.frames in a list that contains the first part of column B. But I'm not sure how to adress within lists down to the column level? create some data ``` df1 <- data.frame(A = "hey", B = "wass.7", C = "up") df2 <- data.frame(A = "how", B = "are.1", C = "...
2018/03/08
422
1,471
<issue_start>username_0: This is a simple code that counts two to the right degree. Starting from somewhere around 60 degrees the answer is incorrect. I need to count 2^200. The answer shouldn't be in the form like "1.606938e+60", but by numbers. How to do this in C++? ``` #include using namespace std; int main() {...
2018/03/08
1,120
4,335
<issue_start>username_0: I have an HTML input. The input is on the web page which is opened in Chrome on an Android phone. I want an option to let the user to see a numeric keyboard when he starts entering the value. But at the same moment, I want him to have a possibility to enter alphanumeric characters. * I cannot...
2018/03/08
363
1,321
<issue_start>username_0: When I run `python -m venv`, the virtual environment directory that `venv` creates includes a binary named `python` and another named `python3` which is just a link to `python`. (In my installation, `python` is Python 3.6 and `python2` is Python 2.7.) My problem is, sometimes (and I can't unde...
2018/03/08
381
1,291
<issue_start>username_0: This is mostly a SQL syntax / SQL capability question. Why does the following query NOT work: ``` SELECT * from ( select m.*, p.type, from multipliers m inner join pushes p on m.push_id = p.id where p.type = 'CONSTANT' ) AS res1 where res1.push_id = ( select max(push_...
2018/03/08
711
2,506
<issue_start>username_0: I have a small Python app that simply records a webpage / web animation with Selenium and FFmpeg. Worked like a charm until yesterday. It seems that Google has removed the "--disable-infobars" feature. Can this be disabled from another flag or function? Or am I forced to add padding to the to...
2018/03/08
644
1,639
<issue_start>username_0: I'm trying to fill missing values in a column in a DataFrame with the value from another DataFrame's column. Here's the setup: ``` import numpy as np import pandas as pd df = pd.DataFrame({ 'a': [2, 3, 5, np.nan, np.nan], 'b': [10, 11, 13, 14, 15] }) df2 = pd.DataFrame({ 'x': [1]...
2018/03/08
756
2,674
<issue_start>username_0: I have 3 worksheets: Table of Contents, Sheet Generator, and Sheet 1. The "Sheet Generator" worksheet is where the unique sheet name is created, we will call the unique sheet "Sheet 1". At the point of generating "Sheet 1", the macro also inputs the unique name "Sheet 1" into a new line in in ...
2018/03/08
1,271
3,750
<issue_start>username_0: Having a bit of trouble with a clonable element, specifically handling the input on the PHP backend. Given the following form: ``` {{ csrf\_field() }} ``` Note how the `title[]` is an array input, so multiple `titles` can be uploaded (following clone of `.clonable`), and the `attachments[...
2018/03/08
371
1,257
<issue_start>username_0: I need to exclude a single file type from the script below. Can someone show me what to add and exclusion for files that have a .partial extension? ``` #!/bin/bash cd /data/user1/upload thetime=`date +%Y-%m-%d_%H:%M:%S` # for i in *.* do extn=${i##*.} # save the extension of the file ...
2018/03/08
483
1,525
<issue_start>username_0: **Rasa NLU version** (e.g. `0.7.3`): rasa-nlu-0.11.3 **Used backend / pipeline** : spacy\_sklearn **Operating system** : Windows 10 **Issue**: I am trying to follow the sample code for training as stated in the rasa website. ``` from rasa_nlu.training_data import load_data from rasa_nlu.con...
2018/03/08
1,128
3,571
<issue_start>username_0: Hi I have a shell command like this. ``` s3=$(awk 'BEGIN{ print "S3 bucket path" } /Executing command\(queryId/{ sub(/.*queryId=[^[:space:]]+: /,""); q=$0 } /s3:\/\//{ print "," $10 }' OFS=',' hive-server2.log) ``` The output of the above command like this. ``` echo $s3 2018-02-21T17:58:...
2018/03/08
1,034
3,628
<issue_start>username_0: I have a simple landing page with a fullscreen background image and no other content. However, when I load this, the footer comes all the way up to the Navbar and stops the image from being fullscreen (image is fullscreen on pages with content). This is how it looks: <https://i.stack.imgur.com/...
2018/03/08
1,088
3,815
<issue_start>username_0: How can I indicate multiple records with the same Invoice number, but a different Sales Person ID? Our commissions can be split into multiple Salespeople, so there can be two different Salespeople per an invoice. For example: ``` Grouped by: Sales Person ID (No Changing this option) These r...
2018/03/08
458
1,449
<issue_start>username_0: I see a lot of queries made for Oracle using `CASE columnX WHEN NULL` how to design query if `CASE columnX WHEN NOT NULL` ? SQL developer throws an error on the query so how to make condition query using CASE... WHEN...? ``` WITH dates_list AS (SELECT TO_DATE('02-19-2018','MM-dd-yyyy') +...
2018/03/08
632
2,066
<issue_start>username_0: I fetch data from an API and returns it into view which works properly. But i'm finding it hard to group the data by date. When i try i get this error: `The pipe 'groupBy' could not be found` pipe.ts ``` import { Pipe, PipeTransform } from "@angular/core"; @Pipe({name: 'groupBy'}) export cla...
2018/03/08
2,480
8,970
<issue_start>username_0: I'm using contact form 7 to create an enquiry form. On the website, the user can add any number of items to a basket. I have a page with a form to collect personal details, and I'm outputting the basket data on that page also (the basket data is stored using Local Storage). I want to email ...
2018/03/08
1,091
4,335
<issue_start>username_0: I'm trying to search using the `System.DirectoryServices.AccountManagement` library in c#. The goal is to find an AD user with the pager field containing a string. For example, if I have `.pager = "F1234b!@"` I need to find a user who's pager field contains "`1234`". I can't figure out how to...
2018/03/08
1,021
4,339
<issue_start>username_0: So, I'm looking solution for the problem... Ok, let me share my thoughts and possible you could help me or say that I'm wrong. **Introduction:** When you are creating angular apps usually you create the service which calls like AuthService which contain methods login, logout, refreshToken and...
2018/03/08
1,225
4,384
<issue_start>username_0: We rebooted a machine running mysql, and we're having some odd issues. Most processes from other machines are able to connect to without issue. We can also connect locally if we connect through the loopback address explicitly. This works: ``` mysql -hlocalhost -utest_user -psecret_password ...
2018/03/08
245
737
<issue_start>username_0: When working with pandas, I often use name based column indexing. E.g: ``` df = pd.DataFrame({"abc":[1,2], "bde":[3,4], "mde":[3,4]}) df[["mde","bde"]] ``` As I have longer column names it because easy for me to create a typo in the column names since they are strings and no code completion....
2018/03/08
335
1,214
<issue_start>username_0: I try to make simple `pipeline` on `Jenkins` to remove files from few directories time to time. I decided not to create `python` script with `Jenkinsfile` as new project, instead of it I try to define new `pipeline` script in `Jenkins` job. ```groovy pipeline { agent any stages { sta...
2018/03/08
405
1,591
<issue_start>username_0: Documentation in FCM focuses heavily on Android/iOS and my lowly `webpush` self is struggling with `click_action`. `click_action` was a key which could be used in older APIs and appears to be no longer available for `webpush`. The only specific reference to this is in this blog post: <https:/...
2018/03/08
651
1,556
<issue_start>username_0: I have a problem (maybe it is not that difficult but I cannot figure it out: I have a list (l) of 25 and I want to divide the list into 5 groups but randomly. The problem I have is if I use *sample(l, 5)* and this 5times it does not give me unique samples. So basically, I am looking for is to ...
2018/03/08
606
2,404
<issue_start>username_0: After upgrading, it seems all my .net core console apps now get the wrong path when debugging. I had the following code ``` private static void ConfigureServices(IServiceCollection serviceCollection) { // build configuration var configuration = new ConfigurationBuilder() ...
2018/03/08
223
670
<issue_start>username_0: I have this json file in a react app. How can I display the content of the array [emails] ? ``` { "deputes" : [ { "depute" : { "emails" : [ { "email" : "<EMAIL>" }, { "email" : "<EMAIL>" } ], ``` Right now, I can use this code to display the first ite...
2018/03/08
817
2,621
<issue_start>username_0: In T-SQL I'm attempting to update a stock user field with the number of weeks we expect it to be delivered to us by taking the difference between today and the purchase order due in dates. However the select query can return more than one line of purchase orders if there is more than one purcha...
2018/03/08
774
2,817
<issue_start>username_0: I have learned that `boto3` offers two levels of abstraction: a low-level API called `client` that is a thin wrapper around the AWS HTTP API, and a high-level client called `resource` that offers real Python objects. My question is, where is the API documentation for the `resource` API? I foun...
2018/03/08
1,398
5,463
<issue_start>username_0: I'm working on a tagging part on a site similar to Facebook. The idea is that whenever someone types @ in the post area, a drop down menu appears containing all of his friends. He then picks who he wants to tag and clicks on that person's profile. I have a javascript function which detects when...
2018/03/08
841
2,742
<issue_start>username_0: I want to create function to toggle field value at any level of nested object ```js function toggle(object, field) { object[field] = !object[field]; } ``` But if I want to change nested objects like this: ``` outer: { inner: { enable: true } } ``` I can't pass it just like `togg...
2018/03/08
784
3,311
<issue_start>username_0: We are trying to migrate our code from ASP.NET that was written some time ago to ASP.NET Core 2.0. This piece of code stores a document in SQL Server and retrieves it. ``` ***Original Code:*** protected void btnUpload_Click(object sender, EventArgs e) { foreach (HttpPostedFile postedF...
2018/03/08
954
3,674
<issue_start>username_0: I am Learning about promises. ``` app.get('/message',function(req, res){ var promise = new Promise(function(resolve, reject){ resolve("hi"); }); promise.then(function(message){ res.json(message); }) }); ``` This works good. Though This is too simple. To wr...
2018/03/08
775
2,944
<issue_start>username_0: Given a tensor whose shape is `Nx2`, how is it possible to select `k` elements from this tensor akin to `np.random.choice` (with equal probability) ? Another point to note is that the value of `N` dynamically changes during execution. Meaning to say that I'm dealing with a dynamically-sized ten...
2018/03/08
851
3,827
<issue_start>username_0: I have an API running in AWS Lambda and AWS Gateway using [Up](https://up.docs.apex.sh/). My API creates a database connection on startup, and therefore Lambda does this when the function is triggered for the first time. My API is written in node using Express and [pg-promise](https://github.co...
2018/03/08
615
2,237
<issue_start>username_0: I am extracting a zip file like this ``` ZipFile.ExtractToDirectory(zipFile, extractTo); ``` But I am getting a ``` {"Could not find a part of the path 'C:\\....many subfolders\\Extremely long filename'."} ``` The zip file contains a file with a very long path and filename c.a. 280 chars...
2018/03/08
1,530
6,239
<issue_start>username_0: I have a view controller with a tableview containing a list of chats, a search controller enbeded in the navigation item (iOS 11 feature) ``` let searchController = UISearchController(searchResultsController: nil) searchController.dimsBackgroundDuringPresentation = false navigationItem.searchC...
2018/03/08
2,493
7,063
<issue_start>username_0: **Summary**: I would like to parse the JSON output of `tshark` as it is outputted. As of now I was parsing normal output, line by line, and each line had the complete information. It was therefore a matter of ``` p = subprocess.Popen("/usr/bin/tshark", stdin=subprocess.PIPE, stdout=subproces...
2018/03/08
363
1,385
<issue_start>username_0: Python 3.5 introduced *type hints* which allow one to write the following: ``` from typing import Union answer: Union[int, str] = 42 answer = '42' ``` documentation: <https://docs.python.org/3/library/typing.html#typing.Union> I think I understand the naive meaning of the above code. In pa...
2018/03/08
476
1,556
<issue_start>username_0: I have a nohup job that is running in background. It has a for loop that will repeat a task for 10 times. I have to use "kill " 10 times to stop it completely. Is there a more efficient way to do this?<issue_comment>username_1: what if you: ``` ps -ef|grep ``` Upvotes: 3 <issue_comment>userna...
2018/03/08
505
1,736
<issue_start>username_0: The dashboard that is generated via JMeter - When the PerfMon Metrics collector writes to the JTL file with CPU information, it presents response times (ms) in the Statistics section. However, I wanted to see the CPU Usage as a % (like you can see in the Chart display for PerfMon) presented in ...
2018/03/08
1,038
3,806
<issue_start>username_0: I'm completely new with sagas. Recently I was experimenting with an infrastructure for my future projects, including `react-router` v4 and sagas. Well following the Beginner tutorial of sagas and some investigation on the matter i create an approximation, the idea is to make every connected c...
2018/03/08
412
1,698
<issue_start>username_0: I'm trying to get an A/B test with Remote Config up and running and I'm having some trouble with the iOS part. After setting the experiment up as described in the documentation it doesn't seem to work. For all iOS versions I've tried I'm always receiving the default remote config value (I tried...
2018/03/08
300
1,277
<issue_start>username_0: After a few days, sometimes my previously running application will flake out with this error and no longer load. I have searched, but have not found the cause. I have a hunch that it may be because I'm giving my Node.js app only 256MB memory, but cannot confirm. Any recommendations?<issue_comme...
2018/03/08
458
1,579
<issue_start>username_0: As you can see from the image, the background of the `UILabel` is set to yellow. The attributed text does not use all the space before wrapping to the next line ("at" should be in the first line). Any way to fix it? [![enter image description here](https://i.stack.imgur.com/kFW3q.png)](https:/...
2018/03/08
796
2,887
<issue_start>username_0: I have a php (5.3) file that sets a Multi-Dimensional Array ``` $prices = array( array('at',$ANewPrice2,$ANewMargin,$ACode), array('aB',$ANewPrice2,$ANewMargin,$ACode), array('c', $NPrice2,$NPriceMargin,10), array('d',$BW...
2018/03/08
831
3,026
<issue_start>username_0: I'm having a difficult time autofocusing an input field with semantic-ui-react. The [documentation](https://react.semantic-ui.com/elements/input) doesn't seem to include an `autoFocus` prop and the `focus` prop doesn't place the cursor inside the input field as would be expected. ``` this.s...
2018/03/08
764
2,725
<issue_start>username_0: I'm Using momentjs to find the time until a date. ``` moment(end).locale('nl').fromNow('s') ``` Currently using this, only this this returns `1 day` I'm looking for something like `86400` Is this possible with momentjs?<issue_comment>username_1: I would have assumed that semantic UI would ...
2018/03/08
348
1,499
<issue_start>username_0: ``` \begin{frame}[fragile] \frametitle{Implementation Strategy} These are the scripts to create master and slave databases in both servers. \begin{verbatim} This is the SQL Server Script: CREATE DATABASE master go ...
2018/03/08
887
2,654
<issue_start>username_0: The question is styled in python 2.7 . I'm using `OrderedDict` to store some items as follows: ``` d = OrderedDict(zip(['a', 'b', 'c', 'd'], range(4))) ``` (`d` equals to `{'a': 0, 'b': 1, 'c': 2, 'd': 3}`) Is there a way iterating dictionary `d`, starting from specific key? For instance, ...
2018/03/08
973
3,521
<issue_start>username_0: I have a function that reads a list of names and uses that as input into another command like so: ``` runMain() { getName=$(PGPASSWORD=<PASSWORD> psql -h myendpoint.com -U ops_readonly -d dev -p 5439 -t -c "select datname from pg_database where datname not like 'template%' and datname not ...