Tutorial by Examples: f

A try-except block may be nested inside a try-finally block. AcquireResource; try UseResource1; try UseResource2; except on E: EResourceUsageError do begin HandleResourceErrors; end; end; UseResource3; finally ReleaseResource; end; If an EResourceUsageE...
In order to print the value of a variable such as, set tempVar "This is a string." The argument in the puts statement is preceded by a $ sign, which tells Tcl to use the value of the variable. % set tempVar "This is a string." This is a string. % puts $tempVar This is a s...
Any project that targets netstandard1.X can be packed into a NuGet package by running: dotnet pack The resulting package can be uploaded to NuGet, MyGet, or hosted in a local package source.
This example describes how to create a SurfaceView with a dedicated drawing thread. This implementation also handles edge cases such as manufacture specific issues as well as starting/stopping the thread to save cpu time. import android.content.Context; import android.graphics.Canvas; import and...
Front matter tells Jekyll to parse a file. You add predefined variables, which are YAML sets, to the front matter. Then, you can use Liquid tags in your files to access the front matter. Front matter is indicated with two triple-dashed lines. You must place the variables between the two triple-dash...
GitHub expands Markdown syntax to provide new useful features. Header # Header1 ## Header2 ### Header3 #### Header4 ##### Header5 ###### Header6 H1 === H2 --- Emphasis *Italic1* _Italic2_ **Bold1** __Bold2__ ***Bold_Italic*** ~~Strikethrough~~ Horizontal Line --- *** ___ ...
Config a remote for my fork $ cd my_local_repo $ git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git # Specify a new remote upstream repository that will be synced with the fork $ git remote -v # Verify the new upstream repository specified for my f...
Go to the GitHub website Open your repository Click Settings Under GitHub Pages, click "Launch Automatic Page Generator" Follow the instructions
Run the following command, replacing username with the username, to clone all of the GitHub repositories for that user to the current directory. curl "https://api.github.com/users/username/repos?page=1&per_page=100" | grep -e 'git_url*' | cut -d \" -f 4 | xargs -L1 git clone T...
// Default export export default {}; // Named export export const SomeVariable = {};
In your mainModule file: export const SomeVar = {};
programWithFlags has only one difference from program. It can accept the data upon initialization from JavaScript: var root = document.body; var user = { id: 1, name: "Bob" }; var app = Elm.Main.embed( root, user ); The data, passed from JavaScript is called Flags. In this example ...
[timer fire]; Calling the fire method causes an NSTimer to perform the task it would have usually performed on a schedule. In a non-repeating timer, this will automatically invalidate the timer. That is, calling fire before the time interval is up will result in only one invocation. In a repeat...
Each process in erlang has a process identifier (Pid) in this format <x.x.x>, x being a natural number. Below is an example of a Pid <0.1252.0> Pid can be used to send messages to the process using 'bang' (!), also Pid can be bounded to a variable, both are shown below MyProcessId =...
class Product(models.Model): name = models.CharField(max_length=20) price = models.FloatField() To Get average price of all products: >>> from django.db.models import Avg, Max, Min, Sum >>> Product.objects.all().aggregate(Avg('price')) # {'price__avg': 124.0} To ...
Subtracting the values of two pointers to an object results in a signed integer *1. So it would be printed using at least the d conversion specifier. To make sure there is a type being wide enough to hold such a "pointer-difference", since C99 <stddef.h> defines the type ptrdiff_t. ...
The package's official wiki has some essential materials: As a new user, you will want to check out the vignettes, FAQ and cheat sheet. Before asking a question -- here on StackOverflow or anywhere else -- please read the support page. For help on individual functions, the syntax is h...
Syntax $this->load->model('model_name'); $this->model_name->method_name(); Practice $this->load->model('home_model'); $this->home_model->get_data();
public function method_name($single, $array) { echo $single; print_r($array); } Beware with the order which pass from controller to model.
Javascript engines first look for variables within the local scope before extending their search to larger scopes. If the variable is an indexed value in an array, or an attribute in an associative array, it will first look for the parent array before it finds the contents. This has implications wh...

Page 165 of 457