Tutorial by Examples: all

In this example we will extract all the web links from a website. I am using http://stackoverflow.com/ for illustration. Here recursion is used, where each obtained link's page is parsed for presence of an anchor tag and that link is again submitted to the same function. The condition if(add &&...
public class Foobar { public static void main(String[] args) { // example: Boolean ignore = null; if (ignore == false) { System.out.println("Do not ignore!"); } } } The pitfall here is that null is compared to false. Since w...
If we want to disable all the actions like Copy, Paste, Replace, Select, etc from UITextField then we can use following custom text field: class CustomTextField: UITextField { var enableLongPressActions = false required init(coder aDecoder: NSCoder) { super.init(coder: aDecoder)! } o...
You can define a function to be recursive with the rec keyword, so it can call itself. # let rec fact n = match n with | 0 -> 1 | n -> n * fact (n - 1);; val fact : int -> int = <fun> # fact 0;; - : int = 1 # fact 4;; - : int = 24 You can also define mutually re...
IMPORTANT!! Valet is a tool designed for macOS only. Prerequisites Valet utilizes your local machine's HTTP port (port 80), therefore, you will not be able to use if Apache or Nginx are installed and running on the same machine. macOS' unofficial package manager Homebrew is required to properly...
Assume that, we implement a simple API and we have the following models. class Parent(models.Model): name = models.CharField(max_length=50) class Child(models.Model): parent = models.ForeignKey(Parent) child_name = models.CharField(max_length=80) And we want to return a respo...
Detailed instructions on getting avr set up or installed.
Detailed instructions on getting greasemonkey set up or installed.
Detailed instructions on getting openui5 set up or installed.
Detailed instructions on getting angularjs-ng-repeat set up or installed.
The installation is quite simple as there are seperate installers for MacOS and Windows machines available here. Currently two versions are for download: one beta and one stable. Setup will start after you downloaded the program and you´ll need to login with your GitHub credentials. That is really ...
Install the dependencies: pip install jinja2 Install a framework: pip install flask Create the following structure ├── run.py └── templates Put a file template.html in the templates directory. The file can contain a jinja 2 variable named my_string. <!DOCTYPE html> <html lang=&qu...
Detailed instructions on getting jupyter-notebook set up or installed.
Firstly, we created a voter: namespace BBIT\CoreBundle\Security\Authorization\Voter; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; class EventVoter implements VoterInterface { const VIE...
Configuration file contains sections, each section contains keys and values. configparser module can be used to read and write config files. Creating the configuration file:- import configparser config = configparser.ConfigParser() config['settings']={'resolution':'320x240', ...
Detailed instructions on getting genymotion set up or installed.
Detailed instructions on getting pyramid set up or installed.
Detailed instructions on getting sugarcrm set up or installed.
To download and install Visual Studio 2017 Navigate to Visual Studio Official Website Here we will have list of Visual Studio software : 1. Visual Studio Community 2017 2. Visual Studio Professional 2017 3. Visual Studio Enterprise 2017 4. Visual Studio Code Here select your d...
Detailed instructions on getting codeception set up or installed.

Page 105 of 113