Tutorial by Examples: ado

<svg width="800px" height="600px"> <defs> <filter id="drop-shadow"> <feGaussianBlur in="SourceAlpha" stdDeviation="4"/> <feOffset dx="5" dy="5" result="offsetblur"/> <f...
<svg width="800px" height="600px"> <defs> <filter id="inner-glow"> <feFlood flood-color="red"/> <feComposite in2="SourceAlpha" operator="out"/> <feGaussianBlur stdDeviation="2" r...
<svg width="800px" height="600px"> <defs> <filter id="complex-shadow" color-interpolation-filters="sRGB" x="-50%" y="-50%" height="200%" width="200%"> <!-- Take source alpha, offset it by angle/...
Elasticsearch is accessed through a HTTP REST API, typically using the cURL library. The messages between the search server and the client (your or your application) are sent in the form of JSON strings. By default, Elasticsearch runs on port 9200. In the examples below, ?pretty is added to tell El...
curl -XGET 'http://www.example.com:9200/myIndexName/myTypeName/1' Output: { "_index" : "myIndexName", "_type" : "myTypeName", "_id" : "1", "_version" : 1, "found": true, "_source&qu...
Quite often you have a file which was edited within DOS or Windows and you are viewing it under UNIX. This can look like the following when you view the file with vi. First line of file^M Next Line^M And another^M If you wish to remove the ^M, it can be that you delete each ^M by hand. Alter...
Hadoop Distributed File System (HDFS) is a Java-based file system that provides scalable and reliable data storage that is designed to span large clusters of commodity servers. HDFS, MapReduce, and YARN form the core of Apache™ Hadoop®. HDFS is designed to be highly fault-tolerant, which is achieve...
STEP 1: CREATE A DIRECTORY IN HDFS, UPLOAD A FILE AND LIST CONTENTS Let’s learn by writing the syntax. You will be able to copy and paste the following example commands into your terminal: hadoop fs -mkdir: Takes the path URI’s as an argument and creates a directory or multiple directories. Usag...
1. Print the Hadoop version hadoop version 2. List the contents of the root directory in HDFS hadoop fs -ls / 3. Report the amount of space used and available on currently mounted filesystem hadoop fs -df hdfs:/ 4. Count the number of directories,files and bytes under the paths tha...
shadowColor = color // CSS color shadowBlur = width // integer blur width shadowOffsetX = distance // shadow is moved horizontally by this offset shadowOffsetY = distance // shadow is moved vertically by this offset This set of attributes will add a shadow around a path. Bo...
Instead of var component = <Component foo={this.props.x} bar={this.props.y} />; Where each property needs to be passed as a single prop value you could use the spread operator ... supported for arrays in ES6 to pass down all your values. The component will now look like this. var compon...
Considering the following document : <?xml version='1.0' encoding='UTF-8' ?> <library> <book id='1'>Effective Java</book> <book id='2'>Java Concurrency In Practice</book> </library> One can use the following code to build a DOM tree out of a St...
Considering the following document : <?xml version='1.0' encoding='UTF-8' ?> <library> <book id='1'>Effective Java</book> <book id='2'>Java Concurrency In Practice</book> <notABook id='3'>This is not a book element</notABook> </librar...
HTML: <div id="title"> <h1 data-content="HOVER">HOVER</h1> </div> CSS: *{margin:0;padding:0;} html,body{height:100%;width:100%;overflow:hidden;background:#0099CC;} #title{ position:absolute; top:50%; left:50%; transform:translate(-50%,-...
If your team is following a rebase-based workflow, it may be a advantageous to setup git so that each newly created branch will perform a rebase operation, instead of a merge operation, during a git pull. To setup every new branch to automatically rebase, add the following to your .gitconfig or .gi...
Example for updating all documents where name is equal to "John": $filter = ['name' => 'John']; $document = ['name' => 'Mike']; $bulk = new \MongoDB\Driver\BulkWrite; $bulk->update( $filter, $document, ['multi' => true] ); $result = $manager->executeBu...
Example for deleting all documents where name is equal to "Peter": $bulk = new \MongoDB\Driver\BulkWrite; $filter = ['name' => 'Peter']; $bulk->delete($filter); $result = $manager->executeBulkWrite('database_name.collection_name', $bulk);
int arr[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; int i = 0; do { printf("%d\n", arr[i]); i++; } while (i < 10);
It redeclares a member that is not overridable. Only calls to the instance will be affected. Code inside the base classes will not be affected by this. Public Class Person Public Sub DoSomething() Console.WriteLine("Person") End Sub Public Sub UseMe() ...
In C, character constants and string literals are different things. A character surrounded by single quotes like 'a' is a character constant. A character constant is an integer whose value is the character code that stands for the character. How to interpret character constants with multiple charac...

Page 3 of 7