Tutorial by Examples: and

It's relatively easy to parse the command line by hand if you aren't looking for anything too complex: # Naive error checking abort('Usage: ' + $0 + ' site id ...') unless ARGV.length >= 2 # First item (site) is mandatory site = ARGV.shift ARGV.each do | id | # Do something interestin...
One of the central difficulties of writing an Android application using Dagger is that many Android framework classes are instantiated by the OS itself, like Activity and Fragment, but Dagger works best if it can create all the injected objects. Instead, you have to perform members injection in a li...
A couple of other options allow stack traces to include implementation and/or reflection frames. This may be useful for debugging purposes. For instance, we can add the SHOW_REFLECT_FRAMES option to the StackWalker instance upon creation, so that the frames for the reflective methods are printed as ...
FusionCharts Suite XT is a comprehensive, JavaScript charting library that includes more than 90 charts and 1150 maps. All these charts and maps are distributed as 4 different packages that are named as: FusionCharts XT FusionWidgets XT PowerCharts XT FusionMaps XT Details of each of these ...
Bukkit uses an event based system that allows plugin developers to interact with and modify the server and specific actions that occur in the world. Creating an Event Handler Event handlers are methods that get called when their event occurs. They are generally public and void as well as named o...
math.js 'use strict'; const Promise = require('bluebird'); module.exports = { // example of a callback-only method callbackSum: function(a, b, callback) { if (typeof a !== 'number') return callback(new Error('"a" must be a number')); if (typeof b !== 'number...
Fetching the values from the SQLite3 database. Print row values returned by select query import sqlite3 conn = sqlite3.connect('example.db') c = conn.cursor() c.execute("SELECT * from table_name where id=cust_id") for row in c: print row # will be a list To fetch single match...
It's possible to have your own custom code styles, share them with other team members and use a shortcut to auto format the code in a file. To create your own custom code style, go to: Preferences -> Editor -> Code Style There are some general code style settings here. You can also select ...
Block Size and Blocks in HDFS : HDFS has the concept of storing data in blocks whenever a file is loaded. Blocks are the physical partitions of data in HDFS ( or in any other filesystem, for that matter ). Whenever a file is loaded onto the HDFS, it is splitted physically (yes, the file is divi...
Introduction So you want to start using bootstrap for your project? Great! then lets get started right now!. What is bootstrap? Bootstrap is an open source library wich you can use to make amazing responsive projects with using responsive design and simple code. Responsive Design is a design phil...
After php 5.4. 5.5 and 5.6 this new mayor update came. The update comes with many new programming features, techniques and ways of writing code. Installing PHP 7 could be done in multiple ways. To install it for a localhost development like WAMP or XAMPP either check for software updates from their...
#lang scribble/manual @section{Introduction} First paragraph. Some text, some text, some text, some text, some text, some text. @section{More stuff} @subsection{This is a subsection} Second paragraph. More text, more text, more text, more text, more text, more text.
In the following naive parallel merge sort example, std::async is used to launch multiple parallel merge_sort tasks. std::future is used to wait for the results and synchronize them: #include <iostream> using namespace std; void merge(int low,int mid,int high, vector<int>&num)...
This is project directory. A service endpoint interface First we will create a service endpoint interface. The javax.jws.WebService @WebService annotation defines the class as a web service endpoint. import javax.jws.WebMethod; import javax.jws.WebService; import javax.jws.soap.SOAPBi...
Magics whose name begins with just one % take as argument the rest of the line and are called line magics. Magics that begin with a double percent sign %% take a multi-line argument and are called cell magics. A commonly used magic is %timeit, a wrapper around the Python's timeit.timeit function, f...
apcu_store can be used to store, apcu_fetch to retrieve values: $key = 'Hello'; $value = 'World'; apcu_store($key, $value); print(apcu_fetch('Hello')); // 'World'
Expand-Archive -Path C:\Archives\Documents.zip -DestinationPath C:\Documents this will extract all files from Documents.zip into the folder C:\Documents
The List interface is implemented by different classes. Each of them has its own way for implementing it with different strategies and providing different pros and cons. Classes implementing List These are all of the public classes in Java SE 8 that implement the java.util.List interface: Abs...
Scope is used as the "glue" that we use to communicate between the parent controller, the directive, and the directive template. Whenever the AngularJS application is bootstrapped, a rootScope object is created. Each scope created by controllers, directives and services are prototypically ...
In brief: Properties make it easy to pass updates from the python side to the user interface Binding passes the changes that happened on the user interface to the python side. from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.lang import Builder from kivy.properti...

Page 141 of 153