Connection refused on docker container
I'm new to Docker and trying to make a demo Rails app. I made a dockerfile that looks like this: ``` FROM ruby:2.2 MAINTAINER marko@codeship.com # Install apt based dependencies required to run Rai...
- Modified
- 23 Apr at 16:52
How to display only files from aws s3 ls command?
I am using AWS CLI to list the files in an AWS S3 bucket using the following command ([aws s3 ls](http://docs.aws.amazon.com/cli/latest/reference/s3/ls.html)): ``` aws s3 ls s3://mybucket --recursive ...
- Modified
- 3 Feb at 10:46
How to change value of a request parameter in laravel
I need to change value of my request parameter like this: ``` $request->name = "My Value!"; ``` I use this code but does not work: ``` $request->offsetSet('img', $img); ```
- Modified
- 20 Mar at 19:24
ServiceStack MQ server shutdown does not wait for worker background threads to complete
I'm using ServiceStack MQ (ServiceStack.Aws.Sqs.SqsMqServer v4.0.54). I'm running MQ server inside a Windows Service. When the Windows service is about to shutdown, I would like to wait for all ...
- Modified
- 23 Apr at 00:38
ServiceStack request parameters missing
I'm doing a service with ServiceStack, and I'm having a problem. I don´t see the request parameters, so, when I call the method, all parameters of the request are null. Here is the code: ``` public c...
- Modified
- 23 Apr at 00:21
Algorithm To Calculate Different Types Of Memory
I am trying to calculate memory. I have calculated Available, InUse, Free, and Cached with the following code ``` ObjectQuery wql = new ObjectQuery("SELECT * FROM Win32_OperatingSystem"); ...
- Modified
- 25 Apr at 15:48
Sequential await VS Continuation await
I was wondering what is the best/correct way of writing asynchronous code that is composed of two (or more) async and dependent (the first have to finish to execute second) operations. Example with a...
- Modified
- 22 Apr at 15:44
When should I use curly braces for ES6 import?
It seems to be obvious, but I found myself a bit confused about when to use curly braces for importing a single module in ES6. For example, in the React-Native project I am working on, I have the foll...
- Modified
- 31 Dec at 02:0
How to mention @channel(All the team members) using slack api while post message
I want to post a message in slack using api. How can I mention all the team members of a channel just like @channel in slack?
Transient errors during SQL Server failovers
We have a client application accessing a SQL Server database (mirrored and clustered) through a C# dll with retry logic on specific error numbers. We are having issues during fail overs where transie...
- Modified
- 25 Apr at 14:35
How to use ASP.net Core 1 "SignInManager" without EntityFramework
I'm looking to implement ASP.net authentication via the SignInManager but without the EntityFramework. I have built my own database layer using SQLClient and want to just create whatever calls is nee...
- Modified
- 22 Apr at 12:47
Omitted setter vs private setter?
What is the difference between a property with a omitted setter and a property with a private setter? ``` public string Foo { get; private set; } ``` vs ``` public string Foo { get; } ```
Package php5 have no installation candidate (Ubuntu 16.04)
When i try to install php5 in Ubuntu 16.04 by using following code: ``` sudo apt-get install php5 php5-mcrypt ``` I get following error: ``` Reading package lists... Done Building dependency tree ...
- Modified
- 12 Jul at 19:7
How to get dates between two dates in C#
I would like to get dates between two dates. Instead of expected different dates, I get and . What would be the problem with the code below? `StartDate` value is `01/04/2016 00:00:00` `EndDate` valu...
Authenticating socket io connections using JWT
How can I authenticate a socket.io connection? My application uses a login endpoint from another server (python) to get a token, how can I get use that token whenever a user opens a socket connection ...
'PDFsharp cannot handle this PDF feature introduced with Acrobat 6' error while opening PDF file
I use PDFsharp (v1.32) for merging several PDF files. I open documents using this code: ``` PdfDocument inputDocument = PdfReader.Open(pdfFilePath, PdfDocumentOpenMode.Import); ``` And while openin...
In ServiceStack, how can I InitSchema of OrmLiteAuthRepository to a Named connection?
We're using the built in OrmLiteAuthRepository in ServiceStack, which has the InitSchema implementation: ``` public void InitSchema() { this.hasInitSchema = true; using (IDbConnection dbConn = th...
- Modified
- 22 Apr at 07:55
How to display full output in Jupyter, not only last result?
I want Jupyter to print all the interactive output without resorting to print, not only the last result. How to do it? Example : ``` a=3 a a+1 ``` I would like to display > 3 4
Why would I not use SqlBulkCopy.EnableStreaming?
The documentation says that it uses less memory, and my ad hoc performance tests show that it is faster. So why would I ever choose to not enable streaming? Reference: [SqlBulkCopy.EnableStreaming Pr...
- Modified
- 22 Apr at 06:20
Is there any command to pass a list of keys and get a list of hashes in Redis?
The only way I know to get a list of hashes is to put `HGETALL key` command in a loop for given keys. But, is there any single command to pass a list of keys and get a list of hashes in Redis? This wo...
- Modified
- 22 Apr at 04:1
ValueError when checking if variable is None or numpy.array
I'd like to check if variable is None or numpy.array. I've implemented `check_a` function to do this. ``` def check_a(a): if not a: print "please initialize a" a = None check_a(a) a = np...
Fluent Assertions: Approximately compare a classes properties
I have a class `Vector3D` that has the properties `X`, `Y` and `Z` of type double (it also has other properties such as `Magnitude`). What is the best way of approximately comparing all the propertie...
- Modified
- 22 Apr at 01:9
Printing a java map Map<String, Object> - How?
How to I print information from a map that has the object as the value? I have created the following map: ``` Map<String, Object> objectSet = new HashMap<>(); ``` The object has its own class with...
ServiceStack.Funq.Quartz cannot instantiating type?
ServiceStack.Funq.Quartz Sample Code is ``` public class MyServices : Service { public object Any(Hello request) { return new HelloResponse { Result = "Hello, {0}!".Fmt(request.Name)...
- Modified
- 21 Apr at 23:39