How to combine two lists in R
I have two lists: ``` l1 = list(2, 3) l2 = list(4) ``` I want a third list: ``` list(2, 3, 4). ``` How can I do it in simple way. Although I can do it in for loop, but I am expecting a one liner...
docker unauthorized: authentication required - upon push with successful login
While pushing the docker image (after successful login) from my host I am getting "unauthorized: authentication required". Details below. ``` -bash-4.2# docker login --username=asamba --email=anand...
- Modified
- 16 Apr at 11:45
Create and write to a text file inmemory and convert to byte array in one go
How can I create a .csv file implicitly/automatically by using the correct method, add text to that file existing in memory and then convert to in memory data to a byte array? ``` string path = @"C:\...
- Modified
- 16 Apr at 08:9
Enumerate Dictionary.Values vs Dictionary itself
I was exploring the sources of ASP.NET core on GitHub to see what kind of tricks the ASP.NET team used to speed up the framework. I saw something that intrigued me. In the source code of the [ServiceP...
- Modified
- 16 Apr at 00:53
What is the recommended implementation pattern in ServiceStack for providing token-based authentication?
I have a group of ServiceStack-based services that will need to authenticate with one another using OAuth2. Specifically, the services will retrieve reference tokens from an external authentication s...
- Modified
- 23 May at 10:28
How to version and separate Service Fabric applications?
All of the service fabric [examples](https://github.com/Azure-Samples/service-fabric-dotnet-getting-started) depict single-solution service fabric examples. This seems to go to the philosophy of micr...
- Modified
- 15 Apr at 21:53
After installing Homebrew I get `zsh: command not found: brew`
``` ➜ ~ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" -e:77: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040677 It appears H...
Loop through an object's properties and get the values for those of type DateTime
I have a list of objects (Cars). For each car in the list I need to loop through it and find any properties of type `DateTime`. If I find a property of `DateTime` I need to get the value and do a time...
- Modified
- 3 Mar at 08:28
Why does the compiler allow Convert.ToString() to be assigned to an integer?
I accidentally stumbled across something similar to the following in my code, it compiles fine but then obviously bombs at runtime: ``` dynamic fiftySixDynamic = 56; int fiftySixInt = System.Convert....
Resetting a form in Angular 2 after submit
I am aware that Angular 2 currently lacks a way to easily reset a form to a pristine state. Poking around I have found a solution like the one below that resets the form fields. It has been suggested...
- Modified
- 17 Apr at 15:11
Why ConfigureAwait(false) does not work while Task.Run() works?
I'm calling an `async` library method with `.ConfigureAwait(false)`. But, I still end up with deadlock. (I'm using it in ASP.NET controller API) But, if I use the same method wrapped into `Task.Run()`...
- Modified
- 18 Nov at 10:24
Angular2 @Input to a property with get/set
I have an Angular2 component in that component it currently has a bunch fields that have @Input() applied before them to allow binding to that property, i.e. ``` @Input() allowDay: boolean; ``` Wha...
- Modified
- 13 Mar at 10:29
how to add three dots to text when overflow in html?
How can I show three dots(...) in a text like this? [](https://i.stack.imgur.com/srdbx.png)
Dynamically add child components in React
My goal is to add components dynamically on a page/parent component. I started with some basic example template like this: main.js: ``` var App = require('./App.js'); var SampleComponent = require(...
- Modified
- 8 Aug at 13:39
Why use decimal(int [ ]) constructor?
I am maintaining a C# desktop application, on windows 7, using Visual Studio 2013. And somewhere in the code there is the following line, that tries to create a 0.01 decimal value, using a Decimal(Int...
- Modified
- 15 Apr at 14:14
ServiceStack Serviceless for CQRS
I would like to be able to leverage ServiceStacks routing and built in documentation functionality to expose service operations based on the message type annotation with route and verb. A generic Serv...
- Modified
- 15 Apr at 13:39
How can moment.js be imported with typescript?
I'm trying to learn Typescript. While I don't think it's relevant, I'm using VSCode for this demo. I have a `package.json` that has these pieces in it: ``` { "devDependencies": { "gulp": "^3.9...
- Modified
- 15 Apr at 13:15
What is the purpose of MemoryCache in MVC?
I'm a bit confused on the proper usage of MemoryCache. Should/can it be used to load static information to save on repeated calls? Should/can it be used to persist data on a view across several actio...
- Modified
- 15 Apr at 12:13
How to convert a plain object into an ES6 Map?
For some reason I can't find this simple thing in the [MDN docs](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map) (maybe I'm just missing it). I expected this to wor...
- Modified
- 15 Apr at 10:18
Shortcut key for commenting out lines of Python code in Spyder
I recently changed from the Enthought Canopy Python distribution to Anaconda, which includes the Spyder IDE. In Canopy's code editor, it was possible to comment and uncomment lines of code by pressin...
How to get current user in asp.net core
I want to get the current user, so I can access fields like their email address. But I can't do that in asp.net core. This is my code: `HttpContext` almost is null in of controller. It's not good to ...
- Modified
- 18 May at 13:46
How to copy text from a div to clipboard
Here is my code for when the user clicks on this button: ``` <button id="button1">Click to copy</button> ``` How do I copy the text inside this div? ``` <div id="div1">Text To Copy</div> ```
- Modified
- 26 Sep at 03:54
angular2 manually firing click event on particular element
I am trying to fire click event (or any other event) on element programatically , In other word I want to know the similar features as offered by jQuery .trigger() method in angular2. Is there any ...
- Modified
- 15 Apr at 06:13
Transactions with ASP.NET Identity UserManager
I'm trying to update a user. ``` AppUserManager appUserManager = HttpContext.GetOwinContext().GetUserManager<AppUserManager>(); AppUser member = await appUserManager.FindByIdAsync(User.Identity.Get...
- Modified
- 15 Apr at 00:21