Tutorial by Examples

Comments are programmer-readable annotations that are ignored at runtime. Their purpose is to make source code easier to understand. Single line comments The # character is used to add single line comments. #!/usr/bin/ruby -w # This is a single line comment. puts "Hello World!" Whe...
In Vue.js, conditional rendering is achieved by using a set of directives on elements in the template. v-if Element displays normally when condition is true. When the condition is false, only partial compilation occurs and the element isn't rendered into the DOM until the condition becomes true. ...
Assuming we have a Vue.js instance defined as: var vm = new Vue({ el: '#example', data: { a: true, b: false } }); You can conditionally render any html element by including the v-if directive; the element that contains v-if will only render if the condition eval...
The use of the v-show directive is almost identical to that of v-if. The only differences are that v-show does not support the <template> syntax, and there is no "alternative" condition. var vm = new Vue({ el: '#example', data: { a: true } }); The basic u...
Note: I am assuming that debugfs is mounted under /sys/kernel/debug If not, try: mount -t debugfs none /sys/kernel/debug Change into the tracing directory: cd /sys/kernel/debug/tracing/ Make sure the function tracer is disabled: echo nop > current_tracer Enable all I2C events: echo ...
Const zipCode As Long = 10012 Dim zipCodeText As String 'Convert the zipCode number to a string of digit characters zipCodeText = CStr(zipCode) 'zipCodeText = "10012"
Const zipCode As long = 10012 Dim zeroPaddedNumber As String zeroPaddedZipCode = Format(zipCode, "00000000") 'zeroPaddedNumber = "00010012"
'Declare an array of bytes, assign single-byte character codes, and convert to a string Dim singleByteChars(4) As Byte singleByteChars(0) = 72 singleByteChars(1) = 101 singleByteChars(2) = 108 singleByteChars(3) = 108 singleByteChars(4) = 111 Dim stringFromSingleByteChars As String stringFro...
'Declare an array of bytes, assign multi-byte character codes, and convert to a string Dim multiByteChars(9) As Byte multiByteChars(0) = 87 multiByteChars(1) = 0 multiByteChars(2) = 111 multiByteChars(3) = 0 multiByteChars(4) = 114 multiByteChars(5) = 0 multiByteChars(6) = 108 multiByteChar...
As a root user: nginx -s restart Ubuntu example sudo service nginx restart
As a root user: sudo nginx -s reload Ubuntu 14.04 example sudo service nginx reload Ubuntu 16.04 example sudo systemctl reload nginx Before reloading, it is a good idea to check config for syntax errors: sudo nginx -t Or sudo service nginx configtest
Run as a root user. Fast shutdown: nginx -s stop Graceful shutdown: nginx -s quit
This is the first phase of referencing. Essentially when you assign by reference, you're allowing two variables to share the same value as such. $foo = &$bar; $foo and $bar are equal here. They do not point to one another. They point to the same place (the "value"). You can also...
Occasionally there comes time for you to implicitly return-by-reference. Returning by reference is useful when you want to use a function to find to which variable a reference should be bound. Do not use return-by-reference to increase performance. The engine will automatically optimize this o...
This allows you to pass a variable by reference to a function or element that allows you to modify the original variable. Passing-by-reference is not limited to variables only, the following can also be passed by reference: New statements, e.g. foo(new SomeClass) References returned from functi...
LocalBroadcastManager is used to send Broadcast Intents within an application, without exposing them to unwanted listeners. Using LocalBroadcastManager is more efficient and safer than using context.sendBroadcast() directly, because you don't need to worry about any broadcasts faked by other Applic...
The following example encrypts a given data block using AES. The encryption key is derived in a secure way (random salt, 1000 rounds of SHA-256). The encryption uses AES in CBC mode with random IV. Note that the data stored in the class EncryptedData (salt, iv, and encryptedData) can be concatenate...
add filter method in RecyclerView.Adapter: public void filter(String text) { if(text.isEmpty()){ items.clear(); items.addAll(itemsCopy); } else{ ArrayList<PhoneBookItem> result = new ArrayList<>(); text = text.toLower...
We can easily separate distribution specific tasks and variables into different dedicated .yml files. Ansible helps us to automatically identify the target hosts distribution via {{ ansible_distribution }} and {{ ansible_distribution_version }}, so we just have to name the distribution dedicated .y...
We can provision remote systems with Ansible. You should have an SSH key-pair and you should take your SSH public key to the machine ~/.ssh/authorized_keys file. The porpuse is you can login without any authorization. Prerequisites: Ansible You need an Inventory file (for ex.: development.ini...

Page 461 of 1336