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.
AWS-SDK for javascript
Lambda contains aws-sdk (https://aws.amazon.com/sdk-for-node-js/) in its global so no need to upload this node-module into the zip.
const AWS = require('aws-sdk');
Sample function
module.exports.myFunction = (event, context, callback) => {
const response = {
...
The following is an example of using an user-defined function to be called multiple(∞) times in a script with ease.
import turtle, time, random #tell python we need 3 different modules
turtle.speed(0) #set draw speed to the fastest
turtle.colormode(255) #special colormode
turtle.pensize(4) #siz...
Install cordova using the following command npm install -g cordova.
Use cordova -version to check the cordova version.
Set path variables ANDROID_HOME and JAVA_HOME.
Example:
export ANDROID_HOME = /home/geethu/android-sdk-linux
export PATH = $PATH:$ANDROID_HOME/tools:$ANDROID_H...
The Stock Items screen (IN.20.25.00) is one of the most often used data entry forms of Acumatica ERP to export data. Inventory ID is the only primary key on the Stock Items screen:
To export records from a data entry form, your SOAP request must always begin with the ServiceCommands.Every[Key] co...
To create a new project ng new [project-name] which initializes git.Install packages for tooling via npm. It creates the project successfully.
cd [project-name] and execute either npm start or ng serve
It'll run the server in the given default port.
Application will refresh according to the chan...
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...
Given the following custom Boolean type we want to wrap:
typedef char MYBOOL;
#define TRUE 1
#define FALSE 0
A simple approach might be to write the following typemaps in our SWIG interface:
%typemap(in) MYBOOL %{
// $input is what we got passed from Python for this function argument
$1...
Go to terminal,
cd projectFolder
git remote -v (it will show previous git url)
git remote set-url origin https://[email protected]/username/newName.git
git remote -v (double check, it will show new git url)
git push (do whatever you want.)
bindings: {
mandatory: '='
optional: '=?',
foo: '=?bar'
}
Optional attributes should be marked with question mark: =? or =?bar. It is protection for ($compile:nonassign) exception.
We injecting the module in the application
var Registration=angular.module("myApp",["ngRoute"]);
now we use $routeProvider from "ngRoute"
Registration.config(function($routeProvider) {
});
finally we integrating the route, we define "/ad...
In traditional object-oriented languages, x = x + 1 is a simple and legal expression. But in Functional Programming, it's illegal.
Variables don't exist in Functional Programming. Stored values are still called variables only because of history. In fact, they are constants. Once x takes a value, it...
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...
Pointers are variables that store the address of another variable.As language feature they are available in several programming languages like, but not limited to :
Go
C/C++
Ada
Pascal
C# (available under certain constraints)
COBOL
FORTRAN
To get started with C/C++ pointers , follow thes...
If you do not only wish to display static objects, but have your UI respond to changes to correlating objects, you need to understand the basics of the INotifyPropertyChanged interface.
Assuming we have our MainWindowdefined as
<Window x:Class="Application.MainWindow"
xmlns="...