Tutorial by Examples

Input file Mary had a little lamb its fleece was white as snow and everywhere that Mary went the lamb was sure to go. Pig Word Count Code -- Load input from the file named Mary, and call the single -- field in the record 'line'. input = load 'mary' as (line); -- TOKENIZE splits the line...
View content: adb shell ls \$EXTERNAL_STORAGE adb shell ls \$SECONDARY_STORAGE View path: adb shell echo \$EXTERNAL_STORAGE adb shell echo \$SECONDARY_STORAGE
Entity Framework (EF) is an object-relational mapper that enables .NET developers to work with relational data using domain-specific objects. It eliminates the need for most of the data-access code that developers usually need to write. Entity Framework allows you to create a model by writing cod...
A job queue that maintains a worker pool, useful for doing things like background processing in web servers: package main import ( "fmt" "runtime" "strconv" "sync" "time" ) // Job - interface for job processing type Job interf...
Goal: <FruitBasket xmlns="http://www.fruitauthority.fake"> <Fruit> <FruitName>Banana</FruitName> <FruitColor>Yellow</FruitColor> </Fruit> <Fruit> <FruitName>Apple</FruitName> <FruitColor>Red<...
GC (Garbage Collector) is responsible for cleaning our garbage. While GC cleans our garbage, he removes the unused objects from the managed heap which cause heap fragmentation. When GC is done with the removal, it performs a heap compression (defragmintation) which involves moving objects on the he...
You can select the last day of month. SELECT (date_trunc('MONTH', ('201608'||'01')::date) + INTERVAL '1 MONTH - 1 day')::DATE; 201608 is replaceable with a variable.
using System.ComponentModel.DataAnnotations.Schema; public class Department { ... public virtual ICollection<Employee> PrimaryEmployees { get; set; } public virtual ICollection<Employee> SecondaryEmployees { get; set; } } public class Employee { ...
using System.ComponentModel.DataAnnotations.Schema; [ComplexType] public class BlogDetails { public DateTime? DateCreated { get; set; } [MaxLength(250)] public string Description { get; set; } } public class Blog { ... public BlogDetails BlogDetail { get...
Any attempt to modify a const object results in undefined behavior. This applies to const variables, members of const objects, and class members declared const. (However, a mutable member of a const object is not const.) Such an attempt can be made through const_cast: const int x = 123; const_cas...
The change the definition of a db column, the query below can be used for example, if we have this db schema users ( firstname varchar(20), lastname varchar(20), age char(2) ) To change the type of age column from char to int, we use the query below: ALTER TABLE users CHANGE age...
When you install Git, you also get its visual tools, gitk and git-gui. gitk is a graphical history viewer. Think of it like a powerful GUI shell over git log and git grep. This is the tool to use when you’re trying to find something that happened in the past, or visualize your project’s history. ...
In Unix, files and directories beginning with a period usually contain settings for a specific program/a series of programs. Dot files are usually hidden from the user, so you would need to run ls -a to see them. An example of a dot file is .bash_history, which contains the latest executed commands...
You will need a domain name from a registrar. In the gh-pages branch of your project repository, or the main branch of your username.github.io repository, create a CNAME file with the contents www.yourdomain.com - the canonical domain. At your registrar's domain configuration page, point your doma...
Note: in the subsequent passages, the terms hash map and hash table are used interchangeably and refer to the same concept, namely, a data structure providing efficient key lookup through use of an internal hash function. Introduction Although R does not provide a native hash table structure, simi...
Following function encapsulates code for using CreateProcess Windows API for launching other programs. It is configurable and can wait until calling process finishes or return immediately. Parameters: FileName - full path to executable Params - command line parameters or use empty string Fold...
C# Maximizing the window driver.Manage().Window.Maximize(); This is fairly straightforward, ensures that our currently active window is maximized. Position of the window driver.Manage().Window.Position = new System.Drawing.Point(1, 1); Here we essentially move the currently active window t...
Building and Installation on Windows 7 Prerequisites If you want to build VTK from latest sources you need git from Here or you can download a snapshot of the code as a zip and unzip on to your disk drive CMake Microsoft Visual Studio 2015 Plenty of free space - atleast a couple of GB to be ...
Use the $Resource variable to reference static resources. <img src="{!$Resource.myImage}" /> Can be used in conjunction with the URLFOR function to reference files inside of a zipped static resource: <apex:includeScript value="{!URLFOR($Resource.myResources, 'js/app.js')...
The $Label variable can be used to display text defined in your custom labels. <apex:outputText value="{!$Label.Welcome_Message}" /> You can do formatting with labels as well. Suppose you have a custom label named Welcome_Message defined as Welcome to our site, {0}! You could...

Page 714 of 1336