How to run a cron job inside a docker container?

I am trying to run a cronjob inside a docker container that invokes a shell script. Yesterday I have been searching all over the web and stack overflow, but I could not really find a solution that wor...

9 Mar at 17:25

Custom Serialization using Attributes and ServiceStack.Text.JsonSerializer

We use custom attributes to annotate data how it should be displayed: ``` public class DcStatus { [Format("{0:0.0} V")] public Double Voltage { get; set; } [Format("{0:0.000} A")] public Do...

Distributed architecture with MassTransit, RabbitMQ and SignalR

I'm developing distributed application with help of [MassTransit](http://masstransit-project.com/) and [rabbitmq](https://www.rabbitmq.com/) I have to provide ability to generate report on a web page...

react open file browser on click a div

My react component: ``` import React, { PropTypes, Component } from 'react' class Content extends Component { handleClick(e) { console.log("Hellooww world") } render() { ...

26 May at 09:43

WSFederationConstants.Parameters.Result equivalent in WIF .NET 4.5

I am trying to convert some code written in ASP.NET (with .NET version 3.5) that is using Windows Identity Foundation in MVC 5 that is using .NET 4.5 I found some useful information on msdn [here](ht...

26 May at 09:28

Xamarin Forms: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation

I am struggling with this issue. I created just a simple cross platform page here is XAML code: ``` <?xml version="1.0" encoding="utf-8" ?> <CarouselPage xmlns="http://xamarin.com/schemas/2014/forms"...

29 Jul at 12:46

ServiceStack SOAP XmlException: The input document has exceeded a limit set by MaxCharactersInDocument

As the title suggest, we are currently struggling with a ServiceStack v 4.0.44 SOAP service that throws the exception ([full stacktrace here](https://gist.github.com/anonymous/9ce3dcc3338dfcf5fc539b6a...

23 May at 11:52

Difference between using the ASP.NET Core Web Application (.NET Core) with net461 set as the only framework and using the (.NET Framework) template

With the release of .NET Core RC2 Microsoft made it so there are now 3 Web Application templates: - - - I am trying to use the new Core Web Application template but without trying to target Linux, OS...

24 Apr at 10:59

: could not connect to redis Instance at XX.XXX.XX.XXX:6379

Hi I am trying to connect to a redis server listening on port 6379 on AWS EC2 linux server. ``` container.Register<IRedisClientsManager>(c => new PooledRedisClientManager(new[] {"XX.XXX.XX.XXX:6379"}...

ASP.NET Core RC2 Project Reference "The Dependency X could not be resolved"

## Overview I've got an ASP.NET Core RC2 .NET framework web project, and I'd like to add a project reference to my regular C# class library contained within the same solution. ## Steps to repro:...

25 May at 22:35

How to serialize ANY object into a string?

I'm running into an issue where my JSON serializer is failing randomly due to the character `

6 May at 18:52

When is DbConnection.StateChange called?

I have the following code: ``` class Program { static void Main() { var connection = new SqlConnection("myConnectionString"); connection.Open(); connection.StateChange...

25 May at 16:32

Is it ok having both Anacondas 2.7 and 3.5 installed in the same time?

I am using currently Anaconda with Python 2.7, but I will need to use Python 3.5. Is it ok to have them installed both in the same time? Should I expect some problems? I am on a 64-bit Win8.

29 Aug at 14:35

OrmLite query to select some of the columns from each of 2 joined tables

Following on from [this comment](https://stackoverflow.com/questions/37416424/how-do-i-join-2-tables-in-servicestack-ormlite-and-select-both-classes/37420341?noredirect=1#comment62383922_37420341), ho...

23 May at 11:48

How to mock a method returning Task<IEnumerable<T>> with Task<List<T>>?

I'm attempting to set up a unit test initializer (in Moq) where an interface method is being mocked: ``` public interface IRepository { Task<IEnumerable<myCustomObject>> GetSomethingAsync(string ...

25 May at 13:47

When using servicestacks's DynamoDbCacheClient, what is the suggested way of cleaning old sessions

We have just switched from using the ServiceStack MemoryCacheClient to using the DynamoDbCacheClient to store authenticated user sessions, and the switch was very smooth. ServiceStack is storing auth...

25 May at 13:32

How can I find out what version of Log4J I am using?

As we all know, at least four or five Log4j JAR files end up being in the classpath. How can I tell which version I am using?

26 Jan at 03:31

How to use systemctl in Ubuntu 14.04

I try to perform the following command in Ubuntu 14.04: ``` systemctl enable --now docker-cleanup-dangling-images.timer ``` I also tried it with sudo, I tried to replace systemctl with service and ...

25 May at 13:25

Convert string to buffer Node

I am using a library which on call of a function returns the toString of a buffer. The exact code is ``` return Buffer.concat(stdOut).toString('utf-8'); ``` But I don't want string version of it....

25 May at 12:29

Get all keys from Redis Cache database

I am using Redis cache for caching purpose (specifically `stackexchange.Redis C# driver`. Was wondering is there any ways to get all the keys available in cache at any point in time. I mean the simila...

25 May at 11:57

Proper way to restrict text input values (e.g. only numbers)

Is it possible to implement an `input` that allows to type only numbers inside without manual handling of `event.target.value`? In React, it is possible to define `value` property and afterwards inpu...

18 Oct at 21:55

matplotlib: how to draw a rectangle on image

How to draw a rectangle on an image, like this: [](https://i.stack.imgur.com/KWG46.jpg) ``` import matplotlib.pyplot as plt from PIL import Image import numpy as np im = np.array(Image.open('dog.png')...

9 Jul at 16:7

Correct way to push into state array

I seem to be having issues pushing data into a state array. I am trying to achieve it this way: ``` this.setState({ myArray: this.state.myArray.push('new value') }) ``` But I believe this is incorr...

25 May at 11:8

How do you get ServiceStack.ToJson to *sometimes* ignore properties?

I have a ServiceStack DTO: ``` [Route("/images", "POST")] public class PostImageCommand { public string Notes { get; set; } public byte[] Image { get; set; } //other properties removed fo...

25 May at 09:35

How to Validate on Max File Size in Laravel?

I'm trying to validate on a max file size of 500kb in Laravel: ``` $validator = Validator::make($request->all(), [ 'file' => 'size:500', ]); ``` But this says that the file should be exactly 5...

28 Nov at 15:52