Add nuget package System.ComponentModel.Annotations
Define a class:
public class BankAccount
{
public enum AccountType
{
Saving,
Current
}
[Required(ErrorMessage="First Name Required")]
[MaxLength(15,ErrorMessage="First Name s...
Yarn uses the same registry that npm does. That means that every package that is a available on npm is the same on Yarn.
To install a package, run yarn add package.
If you need a specific version of the package, you can use yarn add package@version.
If the version you need to install has been tag...
In the menu bar, click Build > Generate Signed APK.
Select the module you would like to release from the drop down and click Next.
To Create a new keystore, click Create new. Now fill the required information and press ok in New Key Store.
On the Generate Signed APK Wiz...
To add a component with a selector [prefix]-user-list, run:
$ ng g c user-list
installing component
create src/app/user-list/user-list.component.css
create src/app/user-list/user-list.component.html
create src/app/user-list/user-list.component.spec.ts
create src/app/use...
To create a window do a prefix followed by c
ie, by default ctrlb followed by c
To list all windows, do a prefix followed by w
ie, by default ctrlb followed by w
To rename current window, do a prefix followed by ,
ie, by default ctrlb followed by ,
To split pane vertically, do a prefix followed by %
ie, by default ctrlb followed by %
To split pane horizontally, do a prefix followed by "
ie, by default ctrlb followed by "
To add a directive with a selector [prefix]Highlight, run:
$ ng g d highlight
installing directive
create src/app/highlight.directive.spec.ts
create src/app/highlight.directive.ts
update src/app/app.module.ts
To prevent prefix usage add --prefix false or -p false flag
...
The S3 object system is a very simple OO system in R.
Every object has an S3 class. It can be get (got?) with the function class.
> class(3)
[1] "numeric"
It can also be set with the function class:
> bicycle <- 2
> class(bicycle) <- 'vehicle'
> class(bicycle)
...
To add a service with a name UserService, run:
$ ng g s user
installing service
create src/app/user.service.spec.ts
create src/app/user.service.ts
To prevent .spec files creation add --spec false or -sp false flag
$ ng g s user --spec false
installing service
...
To add a pipe with a name searchByName, run:
$ ng g p search-by-name
installing pipe
create src/app/search-by-name.pipe.spec.ts
create src/app/search-by-name.pipe.ts
update src/app/app.module.ts
To prevent .spec files creation add --spec false or -sp false flag
$ ng ...
To add a module called GuestModule, run:
$ ng g m guest
installing module
create src/app/guest/guest.module.ts
To enable .spec files creation add --spec or -sp flag
$ ng g m guest --spec
installing module
create src/app/guest/guest.module.spec.ts
create src/app/...
The default configuration <C-b> is not the easiest to use. It'd be better to use something like ctrla. To do so, add this to tmux.conf
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
Instead of defining URL endpoints for each data resource, in GraphQL you define a single endpoint that accepts GraphQL queries. Unlike traditional database query languages, GraphQL Query Language (GQL) is a projection of data returned by a root level query. The GraphQL schema will define the data mo...
Let's go through the problem first. Have a look on the code below:
public class BankAccount
{
public BankAccount() {}
public string AccountNumber { get; set; }
public decimal AccountBalance { get; set; }
public decimal CalculateInterest()
{
// Co...
Here, we try to explain OCP using codebase. First we'll show a scenario that violate OCP and then we'll remove that violation.
Area Calculation (OCP violation Code) :
public class Rectangle{
public double Width {get; set;}
public double Height {get; set;}
}
public class Circle{
public do...