Tutorial by Examples: er

The old good Java object serialization is available for you in Android. you can define Serializable classes like: class Cirle implements Serializable { final int radius; final String name; Circle(int radius, int name) { this.radius = radius; this.name = name; }...
You can also read and write from/to memory card (SD card) that is present in many Android devices. Files in this location can be accessed by other programs, also directly by the user after connecting device to PC via USB cable and enabling MTP protocol. Finding the SD card location is somewhat more...
class ParentClass { [string] $Message = "Its under the Parent Class" [string] GetMessage() { return ("Message: {0}" -f $this.Message) } } # Bar extends Foo and inherits its members class ChildClass : ParentClass { } $Inherit = [ChildClass...
From Java 8 onwards, the Lambda operator ( -> ) is the operator used to introduce a Lambda Expression. There are two common syntaxes, as illustrated by these examples: Java SE 8 a -> a + 1 // a lambda that adds one to its argument a -> { return a + 1; } // an equivalen...
index.html: <html ng-app="masterAngularMaterial"> <head> <!-- This is important (meta) --> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Angular and other dependencies --> ...
Let's take this example without using generics protocol JSONDecodable { static func from(_ json: [String: Any]) -> Any? } The protocol declaration seems fine unless you actually use it. let myTestObject = TestObject.from(myJson) as? TestObject Why do you have to cast the result to T...
Introduction When working with various libraries and their associated requirements, it is often necessary to know the version of current PHP parser or one of it's packages. This function accepts a single optional parameter in the form of extension name: phpversion('extension'). If the extension in...
/* Define a query named q1 for the Customer table */ DEFINE QUERY q1 FOR Customer. /* Open the query for all Customer records where the state is "tx" */ OPEN QUERY q1 FOR EACH Customer WHERE Customer.state ='TX'. ...
This query will join three tables: Customer, Order and Orderline. The use of the OF statement as in childtable OF parenttable assumes that indexes are constructed in a specific way. That is the case in the sports2000-database. DEFINE QUERY q1 FOR Customer, Order, Orderline. OPEN QUERY q1 FOR EA...
Variables can be modified using filters. To apply filter to variable follow variable name with pipe | and filter name: {{ variable|filterName }} For example to display variable value in uppercase use construct. {{ variable|upper }} Filters can be parametrized. Filter parameters are passed in...
To find a module that ends with DSC Find-Module -Name *DSC
If for some reason, the default PowerShell module repository PSGallery gets removed. You will need to create it. This is the command. Register-PSRepository -Default
Uninstall-Module -Name <Name> -RequiredVersion <Version>
This function will display the error message supplied to it using the following error template: Path - application/errors/error_general.php The optional parameter $status_code determines what HTTP status code should be sent with the error. Syntax show_error($message, $status_code, $heading = '...
RunTime Type Services (short: RTTS) are used either for: creating types (RunTime Type Creation; short: RTTC) analysing types (RunTime Type Identification; short: RTTI) Classes CL_ABAP_TYPEDESCR | |--CL_ABAP_DATADESCR | | | |--CL_ABAP_ELEMDESCR | |--CL_ABAP_REFDESCR ...
Verbs used to name CmdLets should be named from verbs from the list supplied be Get-Verb Further details on how to use verbs can be found at Approved Verbs for Windows PowerShell
Locking on an stack-allocated / local variable One of the fallacies while using lock is the usage of local objects as locker in a function. Since these local object instances will differ on each call of the function, lock will not perform as expected. List<string> stringList = new List<st...
Generate a RSA private key: openssl genrsa -des3 -out server.key 4096 Openssl should ask for a pass phrase at this step. Notice that we’ll use only certificate for communication and authentication, without pass phrase. Just use 123456 for example. Generate the Certificate Signing Request: openssl ...
To run the private registry (securely) you have to generate a self-signed certificate, you can refer to previous example to generate it. For my example I put server.key and server.crt into /root/certs Before run docker command you should be placed (use cd) into the directory that contains certs fo...
When you get a working registry running you can pull or push images on it. For that you need the server.crt file into a special folder on your docker client. The certificate allows you to authenticate with the registry, and then encrypt communication. Copy server.crt from registry machine into /etc...

Page 343 of 417