How can I manually set an Angular form field as invalid?

I am working on a login form and if the user enters invalid credentials we want to mark both the email and password fields as invalid and display a message that says the login failed. How do I go abou...

11 Dec at 20:49

How can I diff two branches in GitHub?

I am just wondering if there is a way to simply diff two branches in GitHub? I know GitHub has capacity to do it because when we do code-reviews it does list out all the diffs nicely. I was just wonde...

21 Apr at 21:26

How to make SQLite foreign keys with SQLite.Net-PCL

In UWP, I enjoy the benefits of using SQLite.Net-PCL, creating classes to be used in apps as ObservableCollections to bind to the GridView. After including SQLiteNetExtensions to build a database wit...

ALTER TABLE DROP COLUMN failed because one or more objects access this column

I am trying to do this: ``` ALTER TABLE CompanyTransactions DROP COLUMN Created ``` But I get this: > Msg 5074, Level 16, State 1, Line 2 The object 'DF__CompanyTr__Creat__0CDAE408' is dependent...

21 Apr at 18:11

TypeError: You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable

I am trying to `map` from a service call but getting an error. Looked at [subscribe is not defined in angular 2?](https://stackoverflow.com/questions/41995647/subscribe-is-not-defined-in-angular-2) an...

19 Mar at 20:18

Swift error : signal SIGABRT how to solve it

I'm just a beginner in Swift coding. My idea is quite simple which is an app with two buttons. When clicked, a textfield will change its text. In the Main.StoryBoard, I add a textfield and two buttons...

29 Nov at 17:55

how get value on expando object #

First I read txt files into a folder, and after I hydrated objects with expando Object. But now I would like to get some value from this objects to fill a listview (winforms). ``` private void Form1...

21 Apr at 15:18

c# how to 'return if not null' in a one liner?

Is there a one liner to return something if it not null or continue execution, or how to make such thing? All this to avoid copy pasta the IF lines in several methods. Initial code would be this: ``...

28 Apr at 13:28

How to capture an email

I've created a basic Custom Task Pane in Outlook. I want to drag an email and drop it into the task pane. When dropped, it should allow me to capture the email as an object I guess, allowing me to d...

Kubernetes: how to set VolumeMount user group and file permissions

I'm running a Kubernetes cluster on AWS using kops. I've mounted an EBS volume onto a container and it is visible from my application but it's read only because my application does not run as root. Ho...

Pass argument to docker compose

In my docker compose file there is a dynamic field which I'd like to generate during the running. Actually it is a string template: ``` environment: - SERVER_URL:https://0.0.0.0:${PORT} ``` And...

21 Apr at 13:42

FluentAssertions Asserting multiple properties of a single object

Is there a way to do something like this using FluentAssertions ``` response.Satisfy(r => r.Property1== "something" && r.Property2== "anotherthing")); ``` I am trying to avoid writing multi...

29 May at 20:24

what this error mean: stale element reference: element is not attached to the page document?

In my C# app to use selenium web driver I get this error: > OpenQA.Selenium.StaleElementReferenceException: stale element reference: element is not attached to the page document in this code: ``...

21 Apr at 13:9

Reconfigure dependencies when Integration testing ASP.NET Core Web API and EF Core

I'm following this tutorial [Integration Testing with Entity Framework Core and SQL Server](http://www.davepaquette.com/archive/2016/11/27/integration-testing-with-entity-framework-core-and-sql-server...

How to use click event for label or textblock in wpf c# visual studio?

I am working on desktop application i got suggestion to use wpf instead winforms. I want to go to another form/window when i click my label but i cant find click event for label and textblock? also ca...

5 May at 17:45

Interesting interview exercise result: return, post increment and ref behavior

Here's a simple console application code, which returns a result I do not understand completely. Try to think whether it outputs 0, 1 or 2 in console: ``` using System; namespace ConsoleApplication...

22 Apr at 11:28

Homebrew: list available versions with new formula@version format

Homebrew recently deprecated `homebrew/versions` in favour of making versions available on `homebrew/core` via the new `formula@version` format. For example (as per [this answer](https://stackoverflow...

23 May at 11:47

How to uninstall an older PHP version from centOS7

My project is on Laravel 5.2. and as per guide it required php >= 5.5.6 but there was php 5.4 intalled and I had to upgrade php version through YUM, But now it is giving error "PDO driver not found" a...

26 Jul at 12:30

Would a Task<T>.Convert<TResult> extension method be useful or does it have hidden dangers?

I'm writing client libraries for Google Cloud APIs which have a fairly common pattern for async helper overloads: - - - Currently we're using async methods for that, but: - `(await foo.Bar().Confi...

27 Aug at 20:2

How can I remove all spaces from file in Notepad++?

How can I remove ALL whitescape in a file, using Notepad++? Example data: ``` ;; ;;;2017-03-02;8.026944444;16.88583333;8.858888889 ;; ; ; ; 2017-03-03 ; 7.912777778 ; 16.88583333 ; ...

21 Apr at 16:47

Given a commit id, how to determine if current branch contains the commit?

What I'm trying to do is a version check. I want to ensure the code stays on top of a minimum version. So I need a way to know if the current branch contains a specified commit.

11 Dec at 15:21

Disable button in angular with two conditions?

Is this possible in angular ? ``` <button type="submit" [disabled]="!validate && !SAForm.valid">Add</button> ``` I expect that if both of the conditions are true they will enable the button. I've al...

28 Jun at 17:49

How to query metadata for all existing fields

We want to enable the client to post to an endpoint such as: ``` [Route("Account", Name = "CreateAccount", Order = 1)] [HttpPost] public Account CreateAccount([FromBody] Account account) ...

Bulk Update in Entity Framework Core

I pull a bunch of timesheet entries out of the database and use them to create an invoice. Once I save the invoice and have an Id I want to update the timesheet entries with the invoice Id. Is there a...

ServiceStack Uint8Array error IE9 appending parameter URL

I realize that on IE9, servicestack TypeScript ServiceClient somehow is using Uint8Array to append paramter to url. Still that doest work on IE9. [http://docs.servicestack.net/typescript-add-servic...

21 Apr at 08:48