Tutorial by Examples: ble

Table file with header, footer, row names, and index column: file: table.txt This is a header that discusses the table file to show space in a generic table file index name occupation 1 Alice Salesman 2 Bob Engineer 3 Charlie Janitor This is a footer becaus...
.NET Framework defines a interface for types requiring a tear-down method: public interface IDisposable { void Dispose(); } Dispose() is primarily used for cleaning up resources, like unmanaged references. However, it can also be useful to force the disposing of other resources even though ...
public bool IsTypeNullable<T>() { return Nullable.GetUnderlyingType( typeof(T) )!=null; }
Creating a Custom Element with bindable properties is a snap. If you want to create an element that accepts one or more values which the plugin can use, the @bindable decorator and syntax is what you are looking for. Below, we are creating a custom element that accepts an array of fruits and displa...
In the following, we are creating an example of an Aurelia Custom Element which will allow you to display Youtube videos via their video ID. An Aurelia Custom Element can be defined in two different ways: the first one is by creating a viewmodel and accompanying view, the second one is by just cre...
It is possible to define local variables inside a function to reduce code repetition give name to subexpressions reduce the amount of passed arguments. The construct for this is let ... in .... bigNumbers = let allNumbers = [1..100] isBig number = ...
In the condition of the for and while loops, it's also permitted to declare an object. This object will be considered to be in scope until the end of the loop, and will persist through each iteration of the loop: for (int i = 0; i < 5; ++i) { do_something(i); } // i is no longer in scope...
Example uses basic HTTP syntax. Any <#> in the example should be removed when copying it. You can use the _cat APIs to get a human readable, tabular output for various reasons. GET /_cat/health?v <1> The ?v is optional, but it implies that you want "verbose" output. _...
data.table offers a wide range of possibilities to reshape your data both efficiently and easily For instance, while reshaping from long to wide you can both pass several variables into the value.var and into the fun.aggregate parameters at the same time library(data.table) #v>=1.9.6 DT <- ...
The ** operator works similarly to the * operator but it applies to keyword parameters. def options(required_key:, optional_key: nil, **other_options) other_options end options(required_key: 'Done!', foo: 'Foo!', bar: 'Bar!') #> { :foo => "Foo!", :bar => "Bar!" ...
Normal types, like String, are not nullable. To make them able to hold null values, you have to explicitly denote that by putting a ? behind them: String? var string : String = "Hello World!" var nullableString: String? = null string = nullableString // Compiler error: Can't...
set(my_global_string "a string value" CACHE STRING "a description about the string variable") set(my_global_bool TRUE CACHE BOOL "a description on the boolean cache entry") In case a cached variable is already defined in the cache when CMake processes the ...
set(my_variable "the value is a string") By default, a local variable is only defined in the current directory and any subdirectories added through the add_subdirectory command. To extend the scope of a variable there are two possibilities: CACHE it, which will make it globally av...
macro(set_my_variable _INPUT) if("${_INPUT}" STREQUAL "Foo") set(my_output_variable "foo") else() set(my_output_variable "bar") endif() endmacro(set_my_variable) Use the macro: set_my_variable("Foo") message(STATUS ${my_outpu...
macro(set_custom_variable _OUT_VAR) set(${_OUT_VAR} "Foo") endmacro(set_custom_variable) Use it with set_custom_variable(my_foo) message(STATUS ${my_foo}) which will print -- Foo
Sometimes developers write some code that desires access to stage, or Flash stage, to add listeners. It can work for the first time, then all of a sudden fail to work and produce the error 1009. The code in question can even be on the timeline, as it's the first initiative to add code there, and man...
The &AUX keyword can be used to define local variables for the function. They are not parameters; the user cannot supply them. &AUX variables are seldomly used. You can always use LET instead, or some other way of defining local variables in the function body. &AUX variables have the a...
To access a member of a class, you need to have a "handle" to the particular instance, as either the instance itself, or a pointer or reference to it. Given a class instance, you can point to various of its members with a pointer-to-member, IF you get the syntax correct! Of course, the poi...
A static member variable is just like an ordinary C/C++ variable, except with scope: It is inside a class, so it needs its name decorated with the class name; It has accessibility, with public, protected or private. So, if you have access to the static member variable and decorate it correctl...

Page 12 of 62