Tutorial by Examples: anonymous

In android, every developer uses Anonymous Class (Runnable) at least once in a project. Any Anonymous Class has a reference to its parent (activity). If we perform a long-running task, the parent activity will not be destroyed until the task is ended. Example uses handler and Anonymous Runnable cla...
Anonymous types provide a convenient way to encapsulate a set of read-only properties into a single object without having to explicitly define a type first. The type name is generated by the compiler and is not available at the source code level. The type of each property is inferred by the compiler...
Anonymous functions technique uses the fact that CALL command uses internally GOTO when subroutine is called and abusing help message printing with variable double expansion: @echo off setlocal set "anonymous=/?" call :%%anonymous%% a b c 3>&1 >nul if "%0" == ...
Here 2 examples of recursive anonymous functions based on previous example. Firstly, simple infinite loop: InfiniteLoop = fun R() -> R() end. Secondly, anonymous function doing loop over list: LoopOverList = fun R([]) -> ok; R([H|T]) -> R(T) end. These two func...
You can execute anonymous block. This example shows also how to return value from dynamic SQL: declare query_text varchar2(1000) := 'begin :P_OUT := cos(:P_IN); end;'; in_value number := 0; out_value number; begin execute immediate query_text using out out_value, in in_value; dbms_o...

Page 3 of 3