Tutorial by Examples

The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. Its goal is to provide a free, open, and robust framework for caching and optimizing PHP intermediate code. installation sudo apt-get install php-apc sudo /etc/init.d/apache2 restart Add Cache: apc_add ($key, $value , $t...
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
Nouns should always be singular. Be consistent with the nouns. For instance Find-Package needs a provider the noun is PackageProvider not ProviderPackage.
Person Microdata <section itemscope itemtype="http://schema.org/Person"> Hello, my name is <span itemprop="name">John Doe</span>, I am a <span itemprop="jobTitle">Graduate research assistant</span> at the <span itempr...
Integers Signed: i8, i16, i32, i64, isize Unsigned: u8, u16, u32, u64, usize The type of an integer literal, say 45, will be automatically inferred from context. But to force it, we add a suffix: 45u8 (without space) will be typed u8. Note: Size of isize and usize depend on the architecture. On ...
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...
Detailed instructions on getting data-warehouse set up or installed.
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...
The continue statement in Objective-C programming language works somewhat like the break statement. Instead of forcing termination, however, continue forces the next iteration of the loop to take place, skipping any code in between. For the for loop, continue statement causes the conditional test a...
import socket import hashlib import os import time import itertools import threading import sys import Crypto.Cipher.AES as AES from Crypto.PublicKey import RSA from CryptoPlus.Cipher import IDEA #server address and port number input from admin host= raw_input("Server Address - &gt...
import time import socket import threading import hashlib import itertools import sys from Crypto import Random from Crypto.PublicKey import RSA from CryptoPlus.Cipher import IDEA #animating loading done = False def animate(): for c in itertools.cycle(['....','.......','..........'...
There are specific scenarios where in we might need to create a Quartz scheduler,based on user input on when a scheduler should be triggered,apart from we can handle cases,where we have certain pre-defined functionalities,which need to be triggered based on user action,at a certain period. This exa...
Especially in a ListView, you can run into performance problems by doing too many findViewById() calls during scrolling. By using the ViewHolder pattern, you can save these lookups and improve your ListView performance. If your list item contains a single TextView, create a ViewHolder class to stor...
Check the right software versions are installed: ansible >=2.0 python >=2.6 shade module for python $ansible --version ansible 2.2.0.0 $python --version Python 2.7.5 Install 'shade' the python component used to pilot openstack. $pip install shade Note : if you use a company...
Our openstack tenant is already set: a virtual lan gives instances private IP a virtual router map public IP to private IP a security key has been generated we have default firewall configuration for ssh and port 80 we are able to launch an instance thanks to the OpenStack web interface ...
Let use 'os_server' command from module 'Cloud' [http://docs.ansible.com/ansible/os_server_module.html]. Variables are defined in ./group_vars/all. $vi launch_compute.yml - name: launch a compute instance hosts: localhost gather_facts: False tasks: - name: Create and launch the VM ...
Use the 'os_server_facts' command from module 'Cloud' [http://docs.ansible.com/ansible/os_server_module.html]. Variables are defined in ./group_vars/all and the instance name is in server: "MyOwnPersonalInstance". $vi get_compute_info.yml - name: Get and print instance IP hosts: loca...
Instead of printing all the informations, we print only IP address of the first instance whose name is "MyOwnPersonalInstance". It's usually all we need. $vi get_compute_ip.yml - name: Get and print instance IP hosts: localhost gather_facts: False tasks: - name: Get VM infos...

Page 1094 of 1336