MySQL fails on: mysql "ERROR 1524 (HY000): Plugin 'auth_socket' is not loaded"

My local environment is: - - - with installed MySQL 5.7``` sudo apt-get install mysql-common mysql-server ``` --- When I tried to login to MySQL (via CLI): ``` mysql -u root -p ``` I came ac...

17 Jun at 10:36

How to clear Laravel route caching on server

This is regarding route cache on localhost # About Localhost I have 2 routes in my route.php file. Both are working fine. No problem in that. I was learning route:clear and route:cache and found ...

16 Aug at 15:57

Exclude values from Random.Range()?

If you are using `Random.Range()` to generate values, is there any way to exclude some values within the range (for example: pick a number between 1 and 20, but not 6 through 8)?

17 Jun at 13:36

Changing the TransactionScope IsolationLevel to Snapshot in Inmemory DB

I am using the in-memory database (using ServiceStack.OrmLite.Sqlite.Windows) for unit testing in servicestack based web API. the method I am trying to test is as follows. ``` public object Get(object...

Escape dollar sign in string by shell script

Suppose I have a script named dd.sh, and I run it like this ``` ./dd.sh sample$name.mp4 ``` So `$1` is the string `sample$name.mp4`. ``` echo '$1' // shows $1 echo "$1" // shows "sample.mp4"; want "...

9 Jan at 16:15

Custom ormlite query implementation based on class interface

I'd like to extend certain ORMLite methods based on the object's implementation. E.g., I have an interface: ``` public interface IHaveTimestamps { DateTime CreatedOn { get; set; } DateTime...

17 Jun at 07:25

How to create empty constructor for data class in Kotlin Android

I have 10+ variables declared in Kotlin data class, and I would like to create an empty constructor for it like how we typically do in Java. Data class: ``` data class Activity( var updated_on: St...

30 Nov at 10:39

SQL Server is not a valid installation folder how to fix location

I want to install SQL server on my pc, but when I am try to give path for installation, I am getting this error, the C:\Program Files (x86)\Microsoft SQL Server\ is not valid installation folder, I tr...

31 May at 09:43

How many CPUs does a docker container use?

Lets say I am running a [multiprocessing](https://docs.python.org/2/library/multiprocessing.html) service inside a docker container spawning multiple processes, would docker use all/multiple cores/CPU...

27 Feb at 01:57

Can built-in logging messages be turned off?

Once logging is configured with ``` LogManager.LogFactory = new Log4NetFactory(configureLog4Net: true); ``` it can be used anywhere with ``` ILog log = LogManager.GetLogger("foo); log.Error("foo...

16 Jun at 21:19

console.log not working in Angular2 Component (Typescript)

I am relatively new to both Angular2 and typescript. Since typescript is a superset of javascript, I'd expect functions like `console.log` to work. `console.log` works perfectly in `.ts` files when ou...

16 Jun at 21:19

Is that possible to send HttpWebRequest using TLS1.2 on .NET 4.0 framework

My application connects to Experian server and Experian will soon stop supporting TLS 1.0 and TLS 1.1. All connectivity using HTTPS must use TLS Version 1.2. I want to do some research on that issue ...

Is changing the size of a struct a breaking change in C#?

Just curious, is changing the size of a struct/value type a breaking change in C#? Structs tend to be more sensitive in terms of memory layout since altering them directly affects the size of arrays/o...

16 Jun at 17:19

This view is not constrained vertically. At runtime it will jump to the left unless you add a vertical constraint

[](https://i.stack.imgur.com/0gpVY.png)New Layout editor in Android Studio 2.2 keeps showing this error on views like EditText and Buttons. kindly help.Also, any links that help in onboarding with the...

Implement "percent chance" in C#

I need some help with percent chance in C# code. Let's say i have for loop from 1 to 100 and in that loop i have an "if" code that i want to be executed 70% times (on random). How would i achieve that...

16 Jun at 12:1

Uncaught SyntaxError: Invalid or unexpected token

I have a razor syntax like this: ``` foreach(var item in model) { <td><a href ="#" onclick="Getinfo(@item.email);" >6/16/2016 2:02:29 AM</a> </td> } ``` My javascript that recieves the req...

16 Jun at 11:56

Laravel: how to set date format on model attribute casting?

I have in model: ``` protected $casts = [ 'date' => 'date', ]; ``` Does laravel have some ability to set cast format, something like: ``` protected $casts = [ 'date' => 'date_format:d/m/yy...

7 Dec at 12:39

chart js 2 how to set bar width

I'm using Chart js version: 2.1.4 and I'm not able to limit the bar width. I found two options on stackoverflow ``` barPercentage: 0.5 ``` or ``` categorySpacing: 0 ``` but neither of one works ...

16 Jun at 10:35

How to log the HTTP Response Body in ASP.NET Core 1.0

I'm creating a public REST Api using ASP.NET Core 1.0 RC2 and like to log incoming requests and outgoing responses. I have created a middleware class which is added to the pipeline before the call to...

23 May at 10:31

Having an actual decimal value as parameter for an attribute (example xUnit.net's [InlineData]

I'm trying to do unit testing with [xUnit.net](https://github.com/xunit/xunit). I want a 'Theory' test with '[InlineData]' which includes 'decimals': ``` [Theory] [InlineData(37.60M)] public void MyD...

6 Sep at 06:46

Can I send files via email using MailKit?

As the title, is MailKit supported to send file? If yes, how can I do it?

What is the difference between casting long.MaxValue to int and casting float.MaxValue to int?

I'm trying to understand difference between some data types and conversion. ``` public static void ExplicitTypeConversion2() { long longValue=long.MaxValue; float floatValue = flo...

16 Jun at 12:53

What does mean "?" after variable in C#?

What does this condition mean? ``` if (!helper?.Settings.HasConfig ?? false) ``` P.S. - `helper``class`- `Settings`- `HasConfig`

13 Feb at 13:6

Delete duplicates in a List of int arrays

having a List of int arrays like: ``` List<int[]> intArrList = new List<int[]>(); intArrList.Add(new int[3] { 0, 0, 0 }); intArrList.Add(new int[5] { 20, 30, 10, 4, 6 }); //this intArrList.Add(new i...

6 Mar at 18:21

Swapping Azure Web App deployment slots logs out all users in ASP.NET Core RC2

Whenever I updated my ASP.NET Core RC2 website running on as an Azure Web App, it logs out all users. It seems to be related to swapping a staging deployment slot to production (I use web deploy from ...