Tutorial by Examples: ble

Block will capture variables that appeared in the same lexical scope. Normally these variables are captured as "const" value: int val = 10; void (^blk)(void) = ^{ val = 20; // Error! val is a constant value and cannot be modified! }; In order to modify the variable, you need to ...
int sum (int x, ...) { int result = x; va_list list = va_list (); for (int? y = list.arg<int?> (); y != null; y = list.arg<int?> ()) { result += y; } return result; } int a = sum (1, 2, 3, 36); With this function, you can pass as many int as you w...
Below is a single hidden layer Multilayer Perceptron (MLP) using nested scoping of variables. def weight_variable(shape): return tf.get_variable(name="weights", shape=shape, initializer=tf.zeros_initializer(dtype=tf.float32)) def bias_variable(shape): ...
It is very easy to disable turbolinks on specific links. According to the official turbolinks documentation: Turbolinks can be disabled on a per-link basis by annotating a link or any of its ancestors with data-turbolinks="false". Examples: // disables turbolinks for this one link ...
The visible binding will hide an element by applying style="display: none;" to it when the binding evaluate as falsey. <input type="text" data-bind="textInput: name"> <span class="error" data-bind="visible: isInvalid">Required!</span&...
These inspections are extremely useful for preventing NullPointerExceptions. By default they are disabled. You can find these inspections in Inspections preferences: Java | Probable bugs | Constant conditions & exceptions and @NotNull/@Nullable problems. There you can also configure your annotat...
And now let's say you want to do the opposite of entity splitting: instead of mapping one entity into two tables, you would like to map one table into two entities. This is called table splitting. Let's say you have one table with five columns: PersonId, Name, AddressLine, City, ZipCode, where Pers...
The Problem You have a set of things to do (activities). Each activity has a start time and a end time. You aren't allowed to perform more than one activity at a time. Your task is to find a way to perform the maximum number of activities. For example, suppose you have a selection of classes to ch...
In the following, weight is declared as a mutable field. type person = { name: string; mutable weight: int };; Remark: As far as design is concerned here, one would consider the fact that a person's name isn't likely to change, but their weight is.
Initializing a record with mutable fields isn't different from a regular record initialization. let john = { name = "John"; weight = 115 };;
To assign a new value to a mutable record field, use the <- operator. john.weight <- 120;; Note: The previous expression has a unit type.
hql = "From EntityName";
expdp <bkpadmin>/<bkp123> directory=DATAPUMP_REMOTE_DIR dumpfile=<customer.dmp> impdp <bkpadmin>/<bkp123> directory=DATAPUMP_REMOTE_DIR dumpfile=<customer.dmp> remap_schema=<source schema>:<target schema> remap_tablespace=<source tablespace&g...
There are some situations where you won't be sure what type a variable is when it is returned from a function. You can always check a variable's type by using var.(type) if you are unsure what type it is: x := someFunction() // Some value of an unknown type is stored in x now switch x := x.(type...
First, I will place my date into a Macro Variable. NOTE: I find that date9. works great with IBM® Netezza® SQL and Transact-SQL. Use whichever format that works for the type of SQL you're executing. data _null_; call symput('testDate',COMPRESS(put(today(),date9.))); ;RUN; %PUT ...
For example, imagine a screen with 3 sections, laid out like this: The blue box might be given a margin of 4,4,0,0. The green box might be given a margin of 4,4,4,0. The purple box margin would be 4,4,4,4. Here's the XAML: (I'm using a grid to achieve the layout; but this design principle applies...
Mailbox processors can be used to manage mutable state in a transparent and thread-safe way. Let's build a simple counter. // Increment or decrement by one. type CounterMessage = | Increment | Decrement let createProcessor initialState = MailboxProcessor<CounterMessage>.Sta...
const http = require('http') const fs = require('fs') const zlib = require('zlib') http.createServer((request, response) => { const stream = fs.createReadStream('index.html') const acceptsEncoding = request.headers['accept-encoding'] let encoder = { hasEncoder ...
You might want to rename the fields in the join table to be a little more friendly. You can do this by using the usual configuration methods (again, it doesn't matter which side you do the configuration from): public class CarEntityTypeConfiguration : EntityTypeConfiguration<Car> { publi...
To extend and expand upon the binding experience we have converters to convert one a value of one type into another value of another type. To leverage Converters in a Databinding you first need to create a DataConverter class tht extens either IValueConverter(WPF & UWP) or IMultiVal...

Page 55 of 62