How can I COUNT(DISTINCT) in ServiceStack Ormlite?

I'm writing a paged query in ServiceStack's OrmLite, selecting the total records and the ids of records in the page range. Assuming `query` is some arbitrary SqlExpression selecting a bunch of records...

15 Jun at 10:42

Gradient text color

Is there a generator , or an easy way to generate text like [this](http://patorjk.com/text-color-fader/) but without having to define letter So something like this: ``` .rainbow { background-imag...

Cookie set in ajax is not posted on get http call

SPA app, the specific requirements are: 1. Client calls api through ajax. Server responds with cookie header, among other things such as body. Set-Cookie: Auth=79c6fdfe12754560a2b5a62600df3215:INq8D...

15 Jun at 10:58

Servicestack MultiTenancy

I have ServiceStack v4.0.60 installed and am looking to ChangeDb in AppHost configuration as per the following: ``` container.Register<IDbConnectionFactory>(c => new OrmLiteConnectionFactory(def...

15 Jun at 07:45

Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style

When using eslint in the gulp project i have encountered a problem with error like this `Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style` and I am using Windows environment for the run...

15 Jun at 16:32

upload files to Azure file storage from web app using rest api

I have a web app that is currently using webforms, not MVC, which is going to be hosted on the Azure platform. The main function of this web app is to upload user files to Azure File Storage. The file...

.NET Core use Configuration to bind to Options with Array

Using the .NET Core `Microsoft.Extensions.Configuration` `ConfigurationBinder` has a method [BindArray](https://github.com/aspnet/Configuration/blob/dev/src/Microsoft.Extensions.Configuration.Binder...

How to remove underline below EditText indicator?

Recently I had to change the EditText indicator color and, after doing that, a weird line started to appear below the indicator. How can I remove that? Code for what I've done is below. [](https://i....

15 Jun at 02:36

Cannot find runtime 'node' on PATH - Visual Studio Code and Node.js

With a downloaded and installed version of Visual Studio Code 1.2.1, and a 64bit version of node.exe msi placed in my working directory (I am assuming that is correct), how do we add node and npm comm...

20 Mar at 15:19

SAP Sybase SQL Anywhere NullReference Exception when openening and closing many connections in a service

Currently I've the problem that SAP Sybase SQL Anywhere randomly throws `NullReferenceException`s in a service which executes a lot of sql queries. The connections are always created in a `using` bloc...

EntityFramework Multiple Where

I am wondering, if I use multiple `Where(...)` methods one after the other, is EntityFramework smart enough to combine it in a resulting query. Let's say I have: ``` context.Items .Where(item => ...

14 Jun at 20:24

"The breakpoint will not currently be hit. A copy of file was found in dll file, but the current source code is different"

I keep getting this error saying there's a copy of the .cs file hence the break point will not get hit. I have tried cleaning solution, rebuilding , deleting the .pdb files in the obj and bin folder...

java.io.FileNotFoundException: /storage/emulated/0/New file.txt: open failed: EACCES (Permission denied)

I've been trying to encrypt files and write those files back on to the same place. But I got the error message saying `"java.io.FileNotFoundException: /storage/emulated/0/New file.txt: open failed: EA...

14 Mar at 00:34

Async call to WCF client blocks subsequent synchronous calls

I'm seeing a problem with WCF when calling the generated Async methods on the client... If I await on an async method, and then subsequently call a non-async method on the same client, the blocking me...

Use of symbols '@', '&', '=' and '>' in custom directive's scope binding: AngularJS

I have read a lot about the use of these symbols in the implementation of custom directives in AngularJS but the concept is still not clear to me. What does it mean if I use one of the scope values in...

How can I limit ngFor repeat to some number of items in Angular?

My Code: ``` <li *ngFor="let item of list; let i=index" class="dropdown-item" (click)="onClick(item)"> <template [ngIf]="i<11">{{item.text}}</template> </li> ``` I am trying to have only 10 list ...

7 May at 04:17

Cannot convert type 'Task<Derived>' to 'Task<Interface>'

I have the following function with a delegate parameter that accepts a type of one interface and returns a task of another. ``` public void Bar(Func<IMessage, Task<IResult>> func) { throw new Not...

14 Jun at 18:42

This view is not constrained

I get the following error and I am using Android studio 2.2 Preview 3. I searched Google but couldn't find any resources. ``` Error: This view is not constrained, it only has design time positions, s...

14 Jun at 16:31

Is it possible to create a DbContext Interface or abstract class and use it to inject different DbContext Objects?

I have a software product which database was created on SQLServer and the table and column names were defined by the dev team, the model was then imported to Visual Studio using Database First approac...

19 Apr at 14:16

How to pass data to the previous page using PopAsync?

Consider the following scenario: 1. User is on some Page 1 2. He clicks button that moves him to Page 2 (calling await Navigation.PushAsync(new SomePage()); ) 3. After finishing certain action, he c...

14 Jun at 16:29

Enumerable.Concat not working

Below is the code: ``` string[] values = Acode.Split(','); IEnumerable<Test> tst = null; foreach (string a in values) { if (tst== null) tst = entities.Test.Where(t=> (t.TCode == Convert....

14 Jun at 15:19

SyntaxError: Unexpected token function - Async Await Nodejs

I was experimenting on using Node version with some of my code. Had plans to migrate most of the hyper-callback oriented codes to something that looks cleaner and maybe performs better. I have no cl...

Check if Field Equals Null in MongoDb C# Driver 2.0

I have a very simple query for mongo: ``` db.items.find( { MyFieldName: { $exists: true, $eq: null } } ); ``` Not that it needs to be explained, but it finds documents which have a `MyFieldName` an...

14 Jun at 15:1

Enumerable.Empty<T>().AsQueryable(); This method supports the LINQ to Entities infrastructure and is not intended to be used directly from your code

I am getting runtime error > This method supports the LINQ to Entities infrastructure and is not intended to be used directly from your code.Description: An unhandled exception occurred during the...

How to manage the version number in Git?

Let's imagine the [blerp](http://xkcd.com/1692/) command line tool maintained on [git](/questions/tagged/git). This tool has the (hidden) `--version` option which returns its [version](https://en.wiki...

2 Sep at 17:19