Tutorial by Examples: a

Create a file .babelrc in the root of our working directory Filename: .babelrc { "presets": ["es2015","react"] }
Setup a simple html file in the root of the project directory Filename: index.html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body> <div id="App"></div> ...
Using webpack, you can bundle your component: $ webpack This will create our output file in build directory. Open the HTML page in a browser to see component in action
Convert the interface of a class into another interface clients expect. Adapter (or Wrapper) lets classes work together that couldn't otherwise because of incompatible interfaces. Adapter pattern's motivation is that we can reuse existing software if we can modify the interface. Adapter pattern...
A gen_server is a specific finite state machine working like a server. gen_server can handle different type of event: synchronous request with handle_call asynchronous request with handle_cast other message (not defined in OTP specification) with handle_info Synchronous and asynchronous mess...
This source code create a simple key/value store service based on map Erlang datastructure. Firstly, we need to define all information concerning our gen_server: -module(cache). -behaviour(gen_server). % our API -export([start_link/0]). -export([get/1, put/2, state/0, delete/1, stop/0]). %...
In the Garbage collection example, we implied that Java solves the problem of memory leaks. This is not actually true. A Java program can leak memory, though the causes of the leaks are rather different. Reachable objects can leak Consider the following naive stack implementation. public class ...
It is common practice to create groups of items by creating simple value nodes with item ID as key. For example, we can add a user to the group "administrators" by creating a node at /administrators/$user_id with a value true. We don't want anyone to know who administrators are, for securi...
Detailed instructions on getting mono set up or installed.
function downloadCsv() { var blob = new Blob([csvString]); if (window.navigator.msSaveOrOpenBlob){ window.navigator.msSaveBlob(blob, "filename.csv"); } else { var a = window.document.createElement("a"); a.href = window.URL.createObjectURL(blob, { ...
There are two operators for pointers: Address-of operator (&): Returns the memory address of its operand. Contents-of (Dereference) operator(*): Returns the value of the variable located at the address specified by its operator. int var = 20; int *ptr; ptr = &var; cout << var &...
Create a new ASP.Net Project: Select the empty template: Add two new folders: App and Scripts in the root folder: Add npm configuration file in the root folder: { "version": "1.0.0", "name": "phaser.js.environment.setup", "priva...
9.0 If(condition > value, "True", "False") We can use the If operator instead of If...Then...Else..End If statement blocks. Consider the following example: If 10 > 9 Then MsgBox("True") Else MsgBox("False") End If is the same as M...
Creating a List Node class listNode { public: int data; listNode *next; listNode(int val):data(val),next(NULL){} }; Creating List class class List { public: listNode *head; List():head(NULL){} void insertAtBegin(int val); void insertAtEnd(int val)...
Security was a part of the dark side of the symfony documentation, it has a dedicated component named Security Component. This component is configured in the security.yml file of the main application project. The default configuration is like this one : # app/config/security.yml security: p...
In a nutshell, Our Custom Element Should Have a Built in Search Functionality, that searches and marks places on the map. Accept An attribute called location-array , which is a list of places Have a Listener , for listening to an event called “google-map-ready“.This event is fired, when the ele...
Getting You Browser Ready - Polyfill it Create a new landing page for our element, at index.html. Include polyfills for a custom element to work.Also import the custom element g-map, which we registered with Polymer. Note: Webcomponents, are the necessary polyfill for browser support. Polym...
For Searching a place, we use the powerful element that Polymer ships, called google-map-search . All you need to do, is pass a map object and a query string to the element like so: <google-map-search map=[[map]] query=[[query]]></google-map-search> How do we pass the map ob...
Our goal however, was to make a list of places mark all of them on the map and, mark any other place of our choice, by using the search box We have a search box, where the user can search for one query at a time.In order to accommodate multiple queries, we need to cache the results for each ...
<link rel=import href="../bower_components/google-map/google-map.html"> <link rel=import href="../bower_components/google-map/google-map-marker.html"> <link rel=import href="../bower_components/google-map/google-map-search.html"> <link rel=import...

Page 810 of 1099