How to fix incosistent and slow Google Cloud Storage response times?

I'm using Google Cloud Storage to store and retrieve some files, and my problem is that the response times I'm getting are inconsistent, and sometimes very slow. My application is an ASP.NET Core app...

What's happening in TryUpdateModelAsync

So I'm doing this [microsoft tutorial](https://learn.microsoft.com/en-us/aspnet/core/data/ef-mvc/crud) on ASP.NET Core with EF 6 and it just went through updating a model through the edit-controller. ...

15 Jun at 13:13

What is the LIMIT clause alternative in JPQL?

I'm working with PostgreSQL query implementing in JPQL. This is a sample native psql query which works fine, ``` SELECT * FROM students ORDER BY id DESC LIMIT 1; ``` The same query in JPQL doesnt ...

4 Oct at 17:3

STRING to DATE in BIGQUERY

I am struggling to try to do this with Google BigQuery: I do have a column with dates in the following STRING format: ``` 6/9/2017 (M/D/YYYY) ``` I am wondering how can I deal with this, trying to ...

21 Dec at 22:52

How can I use `return` to get back multiple values from a loop? Can I put them in a list?

I have some code that prints data from a global dictionary named `cal`: ``` def show_todo(): for key, value in cal.items(): print(value[0], key) ``` However, I want to use this code as pa...

7 Dec at 07:21

What is the reasoning behind x64 having such a different performance result from x86?

I was answering [a question on Code Review](https://codereview.stackexchange.com/questions/165407/optimizing-special-cases-of-modulo/165821#165821) and I discovered an interesting difference in perfor...

ServiceStack OpenAPI TagAttribute

Does anyone know where ServiceStack is referencing `TagAttribute` from. According to ServiceStack's OpenAPI documentation a route can be marked as `[Tag("Core Requests")]` to categorize the routes but...

15 Jun at 00:12

ServiceStack.Text CSV serialization of IEnumerable<object> ignores custom serialization functions

Firstly, please forgive any rookie mistakes here - I'm not a regular poster I'm afraid. Now on to the nitty gritty... I am trying to use ServiceStack.Text to serialize objects to CSV. If I keep it s...

The reference assemblies for framework ".NETFramework,Version=v4.6.2" were not found

When trying to compile a solution, I get the following build error: > Error MSB3644 The reference assemblies for framework ".NETFramework,Version=v4.6.2" were not found. To resolve this, install ...

14 Jun at 15:21

How does ServicePointManager.ReusePort and SO_REUSE_UNICASTPORT alleviate ephemeral port exhaustion?

Windows 10 and Windows Server 2016 introduced the `SO_REUSE_UNICASTPORT` socket option. It was made available for use in .NET starting from version 4.6 via the `ServicePointManager.ReusePort` static p...

Unsupported method: BaseConfig.getApplicationIdSuffix()

So I'm reading and the first two app examples I had no issues with the examples, this time the FlagQuiz example when loaded in Android Studio 3.0 Canary-3 I'm getting this error which isn't letting m...

23 Dec at 19:23

Generic Type JsonConvert.DeserializeObject<List<T>>(string)

I am using Newtonsoft.JSON. I won't know the type of object passed to this method, or retrieved to this method, so I am attempting to use `DeserializeObject` on an object I do not know the type of. Is...

22 May at 04:24

How to mock ServiceStackController Cache property?

Giving the following ServiceStack controller ``` public class MyController : ServiceStackController { public ActionResult Index() { return View(Cache.GetAllKeys()); } } ``` and...

Identify type of exception in ExceptionHandler of Servicestack

The ExceptionHandler(set inside the overridden Configure method of AppHostBase) of servicestack has the 'exception' parameter of generic Exception type in the lambda. ``` this.ExceptionHandler = (ht...

15 Jun at 07:16

Change properties to camelCase when serializing to XML in C#

I have multiple DTO classes that are (de)serialized from and to XML. I want to use the C# convention of PascalCase for properties, but I want them to appear as camelCase in the XML. Example: ``` [Xm...

14 Jun at 11:17

How to hide the Google Invisible reCAPTCHA badge

When implementing the new Google Invisible reCATPTCHA, by default you get a little "protected by reCAPTCHA" badge in the bottom right of the screen that pops out when you roll over it. [](https://i.s...

14 Jun at 11:19

How to read Azure web site app settings values

I am trying to configure some key/value pairs for my Azure web application using app settings section on Windows Azure preview portal. [](https://i.stack.imgur.com/nyABu.png) Now I am trying to rea...

What is the difference between Component, Behaviour and MonoBehaviour? And why these are separated?

`MonoBehaviour` extends `Behaviour` and `Behaviour` extends `Component`. I want to know why these classes are separated and the semantic meanings of these classes. Is there any purpose to separate the...

27 Dec at 04:16

Stopping a task without a CancellationToken

I am using an external library that has `async` methods, but not `CancellationToken` overloads. Now currently I am using an extension method from another StackOverflow question to add a `Cancellation...

14 Jun at 09:5

ASP.NET Core form POST results in a HTTP 415 Unsupported Media Type response

Sending a form POST HTTP request (`Content-Type: application/x-www-form-urlencoded`) to the below controller results into a response. ``` public class MyController : Controller { [HttpPost] p...

7 Jun at 13:38

C# Memory Mapped File doesn't take up physical memory space

I'm trying to cache a large amount of data in physical memory and share them for the other processes in the local environment. So I came up with MMF and read [Microsoft MMF document](https://learn.mic...

15 Jun at 01:12

Angular ngClass and click event for toggling class

In Angular, I would like to use `ngClass` and click event to toggle class. I looked through online but some are angular1 and there isn't any clear instruction or example. Any help will be much appreci...

16 Sep at 06:45

Service Stack SSE Javascript Client - Uncaught TypeError

I'm working on a simple SSE javascript client and reviewing the various examples the following should work: ``` var source = new EventSource( '/event-stream?channel=siteevent&t=' + new Date()...

14 Jun at 03:55

How to assign more memory to docker container

As the title reads, I'm trying to assign more memory to my container. I'm using an image from docker hub called "aallam/tomcat-mysql" in case that's relevant. When I start it normally without any spe...

4 Oct at 03:58

switch with var/null strange behavior

Given the following code: ``` string someString = null; switch (someString) { case string s: Console.WriteLine("string s"); break; case var o: Console.WriteLine("var o...

23 Jun at 15:31