NPM
If external library like jQuery is installed using NPM
npm install --save jquery
Add script path into your angular-cli.json
"scripts": [
"../node_modules/jquery/dist/jquery.js"
]
Assets Folder
You can also save the library file in your assets/js directory and in...
To use jquery in your Angular 2.x components, declare a global variable on the top
If using $ for jQuery
declare var $: any;
If using jQuery for jQuery
declare var jQuery: any
This will allow using $ or jQuery into your Angular 2.x component.
The Sales Orders screen (SO.30.10.00) is a perfect example of a data entry form with a composite primary key. The primary key on the Sales Orders screen is composed by the Order Type and the Order Number:
The recommended 2-step strategy to export data from the Sales Orders screen or any other dat...
A single line comment starts with two hyphens (--) and extends up to the end of the line. Example :
-- This process models the state register
process(clock, aresetn)
begin
if aresetn = '0' then -- Active low, asynchronous reset
state <= IDLE;
elsif rising_edge(clock) then --...
Starting with VHDL 2008, a comment can also extend on several lines. Multi-lines comments start with /* and end with */. Example :
/* This process models the state register.
It has an active low, asynchronous reset
and is synchronized on the rising edge
of the clock. */
process(clock, ...
Starting a new comment (single line or delimited) inside a comment (single line or delimited) has no effect and is ignored. Examples:
-- This is a single-line comment. This second -- has no special meaning.
-- This is a single-line comment. This /* has no special meaning.
/* This is not a
si...
Redis provides three commands to count the items within a sorted set: ZCARD, ZCOUNT, ZLEXCOUNT.
The ZCARD command is the basic test for the cardinality of a set. (It is analogous to the SCARD command for sets.) . ZCARD returns the count of the members of a set.
Executing the following code to add...
If you add controls from third party libraries in a C# WPF project, the XAML file will normally have lines like this one.
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
This will perhaps not work with FsXaml.
The designer and the compiler accepts that line, but there will prob...
Let's assume you have a ListView wich is supposed to display every User object listed under the Users Property of the ViewModel where Properties of the User object can get updated programatically.
<ListView ItemsSource="{Binding Path=Users}" >
<ListView.ItemTemplate>
...
C++11
As a special case, a using-declaration at class scope can refer to the constructors of a direct base class. Those constructors are then inherited by the derived class and can be used to initialize the derived class.
struct Base {
Base(int x, const char* s);
};
struct Derived1 : Base {...
In the case of a discriminated record type, some of the components are known
as discriminants and the remaining components can depend upon these. The
discriminants can be thought of as parameterizing the type and the syntax reveals
this analogy.
In this example we create a type that provide a sq...
NLTK provides the FreqDist class that let's us easily calculate a frequency distribution given a list as input.
Here we are using a list of part of speech tags (POS tags) to see which lexical categories are used the most in the brown corpus.
import nltk
brown_tagged = nltk.corpus.brown.tagged_w...
You can assert that parameters have certain values with requires.
int fib (int i) requires (i > 0) {
if (i == 1) {
return i;
} else {
return fib (i - 1) + fib (i - 2);
}
}
fib (-1);
You won't get any error during the compilation, but you'll get an error wh...
A discriminant of a record type may influence the structure of objects. A choice of components may exists in an object according as a discriminant had had a particular value when the object was created. To support this variation, a record type's definition includes a distinction by cases that depend...
This example shows how to define sub-commands for a given command, and how to easily associate a command handler. This example defines a thing command with get and set subcommands.
package things;
import io.dropwizard.cli.Command;
import io.dropwizard.setup.Bootstrap;
import net.sourceforge.a...