Tutorial by Examples

Images and files can be uploaded/submitted to server by setting enctype attribute of form tag to multipart/form-data. enctype specifies how form data would be encoded while submitting to the server. Example <form method="post" enctype="multipart/form-data" action="uplo...
The hash package offers a hash structure in R. However, it terms of timing for both inserts and reads it compares unfavorably to using environments as a hash. This documentation simply acknowledges its existence and provides sample timing code below for the above stated reasons. There is no ident...
Although package:listenv implements a list-like interface to environments, its performance relative to environments for hash-like purposes is poor on hash retrieval. However, if the indexes are numeric, it can be quite fast on retrieval. However, they have other advantages, e.g. compatibility with ...
Python3 - sudo pip3 install tornado Python2 - sudo pip install tornado Packages which will are optional but recommended to install alongside Tornado : concurrent.futures pycurl pycares Twisted monotonic or monotime
$params = @{ Uri = "https://your.hipchat.com/v2/room/934419/notification?auth_token=???" Method = "POST" Body = @{ color = 'yellow' message = "This is a test message!" notify = $false message_format = "text" ...
#include <iostream> #include <string> int main() { const char * C_String = "This is a line of text w"; const char * C_Problem_String = "This is a line of text ኚ"; std::string Std_String("This is a second line of text w"); std::string...
display: inline-block; The display property with the value of inline-block is not supported by Internet Explorer 6 and 7. A work-around for this is: zoom: 1; *display: inline; The zoom property triggers the hasLayout feature of elements, and it is available only in Internet Explorer. The *di...
C99 Since C99 the C library has a set of safe conversion functions that interpret a string as a number. Their names are of the form strtoX, where X is one of l, ul, d, etc to determine the target type of the conversion double strtod(char const* p, char** endptr); long double strtold(char const* p...
What is .postMessage(), when and why do we use it .postMessage() method is a way to safely allow communication between cross-origin scripts. Normally, two different pages, can only directly communicate with each other using JavaScript when they are under the same origin, even if one of them is emb...

try

The keyword try is followed by a block, or by a constructor initializer list and then a block (see here). The try block is followed by one or more catch blocks. If an exception propagates out of the try block, each of the corresponding catch blocks after the try block has the opportunity to handle t...
Official documentation: http://erlang.org/doc/tutorial/nif.html NIFs were introduced in Erlang/OTP R13B03 as an experimental feature. The purpose is to allow calling C-code from inside Erlang code. NIFs are implemented in C instead of Erlang, but they appear as any other functions in the scope of ...
Here is a very simple example to illustrate how to write a NIF. Directory structure: nif_test ├── c_src │   ├── Makefile │   └── nif_test.c ├── rebar.config └── src ├── nif_test.app.src └── nif_test.erl This structure can be easily initialized using Rebar3: $ rebar3 new lib nif_...
Official documentation: http://erlang.org/doc/man/erl_nif.html The most important structs, types and macros of the Erlang C API are the following: ERL_NIF_TERM: the type for Erlang terms. This is the return type that NIF functions must follow. ERL_NIF_INIT(MODULE, ErlNifFunc funcs[], load, relo...
Website: http://www.syntevo.com/smartgit/ Price: Free for non-commercial use only. A perpetual license costs 99 USD Platforms: Linux, OS X, Windows Developed by: syntevo
var client = new AmazonDynamoDBClient(); // Store item client.PutItem(new PutItemRequest { TableName = "Books", Item = new Dictionary<string, AttributeValue> { { "Title", new AttributeValue { S = "Cryptonomicon" } }, { "...
var client = new AmazonDynamoDBClient(); Table booksTable = Table.LoadTable(client, "Books"); // Store item Document book = new Document(); book["Title"] = "Cryptonomicon"; book["Id"] = 42; book["Authors"] = new List<string> { "Ne...
This example consists of two parts: first, we must define our Book type; second, we use it with DynamoDBContext. [DynamoDBTable("Books")] class Book { [DynamoDBHashKey] public int Id { get; set; } public string Title { get; set; } public List<string> Authors { ...
The Collections class provides a way to make a list unmodifiable: List<String> ls = new ArrayList<String>(); List<String> unmodifiableList = Collections.unmodifiableList(ls); If you want an unmodifiable list with one item you can use: List<String> unmodifiableList = Col...
The Collections class allows for you to move objects around in the list using various methods (ls is the List): Reversing a list: Collections.reverse(ls); Rotating positions of elements in a list The rotate method requires an integer argument. This is how many spots to move it along the line b...
Comparator.comparing(Person::getName) This creates a comparator for the class Person that uses this person name as the comparison source. Also it is possible to use method version to compare long, int and double. For example: Comparator.comparingInt(Person::getAge) Reversed order To create ...

Page 733 of 1336