Proto2 vs. Proto3 in C#

I have to send messages to another team using the proto2 version of Google Protocol Buffers. They are using Java and C++ on Linux. I'm using C# on Windows. Jon Skeet's protobuf-csharp-port (https://gi...

7 May at 07:20

ServiceStack event for client disconnect

I'm experimenting with ServiceStack's Server Events feature and want to make a sort of "online users" test app. The idea is I want to update each user that connects to a channel "Users" whenever a new...

20 Apr at 10:51

Elegant initialization of an array of class instances in C#

Let's say I have a class like this: ``` public class Fraction { int numerator; int denominator; public Fraction(int n, int d) { // set the member variables } // And then a b...

24 Jan at 01:46

Why can't I debug code in an async method?

I actually started the night trying to learn more about MongoDB, but am getting hung up and the .NET await/async stuff. I am trying to implement the code shown on MongoDB's [site](https://docs.mongodb...

10 Sep at 12:20

Rendering newline character in VueJS

I'm creating a note app where users can add a note by entering multiline text in a textarea. When I save the note in Firebase it is being saved with newline (\n) characters which I want to visualize. ...

26 Sep at 21:8

How to remove the "Go to live visual tree" / "Enable selection" / "Display layout adorners" overlay when debugging?

How do I remove the box with the 3 icons when debugging? [](https://i.stack.imgur.com/rhlua.png)

installing python packages without internet and using source code as .tar.gz and .whl

we are trying to install couple of python packages without internet. ``` For ex : python-keystoneclient ``` For that we have the packages downloaded from [https://pypi.python.org/pypi/python-keysto...

19 Apr at 17:49

How to read a text file on Xamarin Forms PCL project?

I need to read a text file (Embedded resource) on my Xamarin.Forms PCL project. On the [working with files](https://developer.xamarin.com/guides/xamarin-forms/working-with/files/) xamarin docs it sugg...

19 Apr at 17:47

WPF WindowChrome: Edges of maximized Window are out of the screen

I use WindowChrome to customize a Window. When I maximize the Window, then the edges are out of the screen. I use the following code to fix this: ``` <Window x:Class="WpfApplication1.MainWindow" ...

20 Apr at 10:50

docker-compose : Unsupported config option for services service: 'web'

I am going through the [Getting Started with Docker Compose](https://docs.docker.com/compose/gettingstarted/) page. In Step 3, I made a `docker-compose.yml` file as described: ``` version: '2' service...

1 Oct at 00:40

DockPanel in UWP app?

I would like to know if there is anyway to reproduce the same behavior than with the `DockPanel` in WPF but in UWP app? I would like to have some container docked, and the last one filling the userin...

19 Apr at 16:35

Opening a .pdf file in windows form through a button click

On the current window that I have, I have a button. I want to be able to click the button and open up a .pdf file which is in the resources folder of this project. Is there an easy want to do this? ...

19 Apr at 15:17

Array.push() and unique items

I have a simple case of pushing unique values into array. It looks like this: ``` this.items = []; add(item) { if(this.items.indexOf(item) > -1) { this.items.push(item); console.lo...

19 Apr at 13:10

Why upload to Azure blob so slow?

I have a custom stream that is used to perform write operations directly into the page cloud blob. ``` public sealed class WindowsAzureCloudPageBlobStream : Stream { // 4 MB is the top most limit...

Single Dropdown with search box in it

I want to add search box to a single select drop down option. ``` <select id="widget_for" name="{{widget_for}}"> <option value="">select</option> {% for key, value in dr.items %} <input placehold...

Bouncy Castle's X509V3CertificateGenerator.SetSignatureAlgorithm marked obsolete. What do I do?

I am trying to create a self-signed trusted certificate. I am using Bouncy Castle from nuget, and the answer on [this question](https://stackoverflow.com/questions/22230745/generate-self-signed-certif...

C# html agility pack get elements by class name

I'm trying to get all the divs that their class contains a certain word: ``` <div class="hello mike">content1</div> <div class="hello jeff>content2</div> <div class="john">content3</div> ``` I need...

19 Apr at 07:40

Why is this HttpClient usage giving me an "Cannot access a disposed object." error?

I've simplified the code a bit but basically this keep giving me a "Cannot access a disposed object." error and I cant work out why? I have multiple tasks running simultaneously that perform a GET th...

21 Sep at 20:33

Settings must be of the form "name=value". No idea what to do

So I'm parsing a connection string for an Azure Storage Account and when I get to the page of the app that uses the connection string, the compiler catches an exception stating, "Settings must be of t...

18 Apr at 16:50

Copy multiple files with Ansible

How can I copy more than a single file into remote nodes by Ansible in a task? I've tried to duplicate the copy module line in my task to define files but it only copies the first file.

25 Jul at 14:51

Detect click outside div using javascript

I'd like to detect a click inside or outside a div area. The tricky part is that the div will contain other elements and if one of the elements inside the div is clicked, it should be considered a cli...

18 Apr at 13:29

What is fatal signal 6 in android logcat

Im new to android development my app gets constantly killed when switching 11 times from activity and than it only says > Fatal signal 6 (SIGABRT), code -6 in tid 9485 (Thread-141585) in my logcat...

18 Apr at 12:22

Best way to iterate over a list and remove items from it?

I need to iterate over a `List<myObject>` and remove items that answer a certain condition. I saw this answer ([https://stackoverflow.com/a/1582317/5077434](https://stackoverflow.com/a/1582317/507743...

23 May at 12:24

Why is Docker installed but not Docker Compose?

I have installed docker on CentOS 7 by running following commands, ``` curl -sSL https://get.docker.com/ | sh systemctl enable docker && systemctl start docker docker run hello-world ``` however whe...

8 Dec at 02:19

How to get the value of an input field using ReactJS?

I have the following React component: ``` export default class MyComponent extends React.Component { onSubmit(e) { e.preventDefault(); var title = this.title; console.log...

15 Oct at 10:1