Tutorial by Examples: apc

Note that this deals with the creation of a collection of type Map, which is distinct from the map method. Map Creation Map[String, Int]() val m1: Map[String, Int] = Map() val m2: String Map Int = Map() A map can be considered a collection of tuples for most operations, where the first e...
By default the Large Object Heap is not compacted unlike the classic Object Heap which can lead to memory fragmentation and further, can lead to OutOfMemoryExceptions Starting with .NET 4.5.1 there is an option to explicitly compact the Large Object Heap (along with a garbage collection): GCSettin...
Set up some constants for the server and authentication information. Assuming LDAPv3, but it's easy enough to change that. // Authentication, and the name of the server. private const string LDAPUser = "cn=example:app:mygroup:accts,ou=Applications,dc=example,dc=com"; private readonly ch...
The normal Java classloaders look for classes first in the bootstrap classpath, before checking for extensions and the application classpath. By default, the bootstrap classpath consists of the "rt.jar" file and some other important JAR files that are supplied by the JRE installation. Th...
Bootstrap components are a collection of optional jQuery plugins which bundled with Bootstrap. The purpose of Bootstrap components is to provide extended features and capabilities which would be difficult (or impossible) to accomplish without the use of Javascript. Some components provide are pure...
MAPCAR is the most used function of the family: CL-USER> (mapcar #'1+ '(1 2 3)) (2 3 4) CL-USER> (mapcar #'cons '(1 2 3) '(a b c)) ((1 . A) (2 . B) (3 . C)) CL-USER> (mapcar (lambda (x y z) (+ (* x y) z)) '(1 2 3) '(10 20 30) '(1...
MAPCAN: CL-USER> (mapcan #'reverse '((1 2 3) (a b c) (100 200 300))) (3 2 1 C B A 300 200 100) CL-USER> (defun from-to (min max) (loop for i from min to max collect i)) FROM-TO CL-USER> (from-to 1 5) (1 2 3 4 5) CL-USER> (mapcan #'from-to '(1 2 3) '(5 5 5)) (1 2 3 4 5...
MAPC: CL-USER> (mapc (lambda (x) (print (* x x))) '(1 2 3 4)) 1 4 9 16 (1 2 3 4) CL-USER> (let ((sum 0)) (mapc (lambda (x y) (incf sum (* x y))) '(1 2 3) '(100 200 300)) sum) 1400 ; => (1 x 100) + (2 x 200) + (3 x 30...
private static final String TAG = "IntentBitmapFetch"; private static final String COLON_SEPARATOR = ":"; private static final String IMAGE = "image"; @Nullable public Bitmap getBitmap(@NonNull Uri bitmapUri, int maxDimen) { InputStream is = context.getConten...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1">...
1.Download font-awesome from here. 2.Copy the font-awesome directory into your project. 3.In the of your html, reference the location to your font-awesome.min.css. <link rel="stylesheet" href="path/to/bootstrap/css/bootstrap.min.css"> <link rel="stylesheet&quot...
The module keyword can be used to begin a module, which allows code to be organized and namespaced. Modules can define an external interface, typically consisting of exported symbols. To support this external interface, modules can have unexported internal functions and types not intended for public...
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...
After you have set a few data to database and have get a structure consisting of several nodes like this; "user" : { "-KdbKcU2ptfYF2xKb5aO" : { "firstName" : "Arthur", "lastName" : "Schopenhauer", "userName&q...
There are many responsive scenarios where it's necessary to have column units exceeding 12 in a single .row element. This is known as column wrapping. If more than 12 columns are placed within a single row, each group of extra columns will, as one unit, wrap onto a new line. For example, cons...
LRU Cache The following example code demonstrates a possible implementation of the LruCache class for caching images. private LruCache<String, Bitmap> mMemoryCache; Here string value is key for bitmap value. // Get max available VM memory, exceeding this amount will throw an // OutOfMem...
Key Points:- Is Hash table and Linked list implementation of the Map interface, with predictable iteration order. inherits HashMap class and implements the Map interface. contains values based on the key. only unique elements. may have one null key and multiple null values. ...

Page 1 of 1