Tutorial by Examples

Ways to get Highcharts: Load directly from Highcharts CDN Download files from official website. Through npm; npm install highcharts Through bower; bower install highcharts To load the main library from vendor's CDN, simply add the following to your code: <script src="ht...
The JavaFX APIs are available as a fully integrated feature of the Java SE Runtime Environment (JRE) and the Java Development Kit (JDK ). Because the JDK is available for all major desktop platforms (Windows, Mac OS X, and Linux), JavaFX applications compiled to JDK 7 and later also run on all...
Models are typically defined in the models.py file under your application subdirectory. The Model class of django.db.models module is a good starting class to extend your models from. For example: from django.db import models class Book(models.Model): title = models.CharField(max_length=100...
Once your virtual environment has been activated, any package that you install will now be installed in the virtualenv & not globally. Hence, new packages can be without needing root privileges. To verify that the packages are being installed into the virtualenv run the following command to che...
Assuming python and python3 are both installed, it is possible to create a virtual environment for Python 3 even if python3 is not the default Python: virtualenv -p python3 foo or virtualenv --python=python3 foo or python3 -m venv foo or pyvenv foo Actually you can create virtual ...
Java provides, as part of the utils package, a basic pseudo-random number generator, appropriately named Random. This object can be used to generate a pseudo-random value as any of the built-in numerical datatypes (int, float, etc). You can also use it to generate a random Boolean value, or a random...
The method nextInt(int bound) of Random accepts an upper exclusive boundary, i.e. a number that the returned random value must be less than. However, only the nextInt method accepts a bound; nextLong, nextDouble etc. do not. Random random = new Random(); random.nextInt(1000); // 0 - 999 int num...
NSArray *array = [NSArray arrayWithObjects:@"Nick", @"Ben", @"Adam", @"Melissa", nil]; NSPredicate *aPredicate = [NSPredicate predicateWithFormat:@"SELF beginswith[c] 'a'"]; NSArray *beginWithA = [array filteredArrayUsingPredicate:bPredicate]; ...
Getting ("a", 1) ^. _1 -- returns "a" ("a", 1) ^. _2 -- returns 1 Setting ("a", 1) & _1 .~ "b" -- returns ("b", 1) Modifying ("a", 1) & _2 %~ (+1) -- returns ("a", 2) both Traversal (1, 2) & bot...
Simple record {-# LANGUAGE TemplateHaskell #-} import Control.Lens data Point = Point { _x :: Float, _y :: Float } makeLenses ''Point Lenses x and y are created. let p = Point 5.0 6.0 p ^. x -- returns 5.0 set x 10 p -- returns Point { _x = 10.0, _y = 6.0 } p & x +~ ...
1. Install the Ionic Framework and Cordova (since Ionic apps are based on Cordova) using npm (the Node Package Manager): Make sure you have an up-to-date version of Node.js installed on your system. If you don't have Node.js installed, you can install it from here. Also, for Mac users, having the ...
Consider we have a class Animal which has a child class Dog class Animal { public Animal() { Console.WriteLine("In Animal's constructor"); } } class Dog : Animal { public Dog() { Console.WriteLine("In Dog's constructor"); } ...
Requirements: Installed Java JDK or JRE (version 7 or higher for Gradle 3.x version) Installation steps: Download Gradle distribution from the official web site Unpack the ZIP Add the GRADLE_HOME environment variable. This variable should point to the unpacked files from the previous step. Ad...
First of all, implement your view holder: implements View.OnClickListener, View.OnLongClickListener Then, register the listeners as follows: itemView.setOnClickListener(this); itemView.setOnLongClickListener(this); Next, override the listeners as follows: @Override public void onClick(Vie...
Properties are members of an object. Each named property is a pair of (name, descriptor). The name is a string that allows access (using the dot notation object.propertyName or the square brackets notation object['propertyName']). The descriptor is a record of fields defining the bevahiour of the pr...
Joins are used to combine different lists or tables holding data via a common key. Like in SQL, the following kinds of Joins are supported in LINQ: Inner, Left, Right, Cross and Full Outer Joins. The following two lists are used in the examples below: var first = new List<string>(){ &quot...
select LastName, FirstName, from Person Returns message: Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from Person' at line 2. Getting a "1064 error" message from MySQL mean...
By default error message appears below textbox in <div class="help-block"></div> on keyUp or after pressing submit button if any validation constraints aren't met. Sometimes we want a message on submit only i.e. no validation at onKeyup event. Let's check yii2/widgets/ActiveF...
Binary releases of Maven can be downloaded from the Maven website. The binary comes as a zip archive or as a tar.gz archive. After downloading it, the instructions from the install page can be followed: Ensure the JAVA_HOME environment variable is set and points to your JDK installation (not JRE...
// decode NSString *string = [[NSString alloc] initWithData:utf8Data encoding:NSUTF8StringEncoding]; // encode NSData *utf8Data = [string dataUsingEncoding:NSUTF8StringEncoding]; Some supported encodings are: NSASCIIStringEncoding NSUTF8StringEnc...

Page 112 of 1336