Tutorial by Examples

<svg> <defs> <radialGradient id="g"> <stop offset="10%" stop-color="green" /> <stop offset="90%" stop-color="white" /> </radialGradient> </defs> <rect width='100%' height...
JSON is a cross language, widely used method to serialize data Supported data types : int, float, boolean, string, list and dict. See -> JSON Wiki for more Here is an example demonstrating the basic usage of JSON :- import json families = (['John'], ['Mark', 'David', {'name': 'Avraham'}]) ...
Here is an example demonstrating the basic usage of pickle:- # Importing pickle try: import cPickle as pickle # Python 2 except ImportError: import pickle # Python 3 # Creating Pythonic object: class Family(object): def __init__(self, names): self.sons = names ...
Identifying your user is only part of security. Once you know who they are, you need a way to control their access to data in your database. Firebase Database Rules allow you to control access for each user. For example, here's a set of security rules that allows anyone to read the path /foo/, but n...
The Firebase Realtime Database is schemaless. This makes it easy to change things as you develop, but once your app is ready to distribute, it's important for data to stay consistent. The rules language includes a .validate rule which allows you to apply validation logic using the same expressions u...
The Firebase Realtime Database allows ordering and querying data. For small data sizes, the database supports ad hoc querying, so indexes are generally not required during development. Before launching your app though, it is important to specify indexes for any queries you have to ensure they contin...
You can save your code snippets for use later simply by drag and drop. For eg: if you have an NSLog statement that used for so many places somewhere else in the project, then you can save the NSLog statements to code snippets library. Drag the NSLog statement to code snippet library. Now you c...
The most simple way to create a thread is by calling a selector "in the background". This means a new thread is created to execute the selector. The receiving object can be any object, not just self, but it needs to respond to the given selector. - (void)createThread { [self performS...
Using a subclass of NSThread allows implementation of more complex threads (for example, to allow passing more arguments or to encapsulate all related helper methods in one class). Additionally, the NSThread instance can be saved in a property or variable and can be queried about its current state ...
Every thread has access to a mutable dictionary that is local to the current thread. This allows to cache informations in an easy way without the need for locking, as each thread has its own dedicated mutable dictionary: NSMutableDictionary *localStorage = [NSThread currentThread].threadDictionary;...
$ mkdir 20{09..11}-{01..12} Entering the ls command will show that the following directories were created: 2009-01 2009-04 2009-07 2009-10 2010-01 2010-04 2010-07 2010-10 2011-01 2011-04 2011-07 2011-10 2009-02 2009-05 2009-08 2009-11 2010-02 2010-05 2010-08 2010-11 2011-02 2011-05 2011-08 2011...
$ cp .vimrc{,.bak} This expands into the command cp .vimrc .vimrc.bak.
$ mv filename.{jar,zip} This expands into mv filename.jar filename.zip .
// Include the MFC header: // (you do not need to and should not include the standard Windows headers, e.g. // Windows.h) #include <AfxWin.h> // MFC core and standard components // The following header defines resource constants, such as dialog and control IDs: #include &qu...
Go in the Firebase console. Choose your project Click on the Database section on the left, and then select the Rules tab. If you would like to test your security rules before putting them into production, you can simulate operations in the console using the Simulate button in the upper right ...
The default rules require Authentication. They allow full read and write access to authenticated users of your app. They are useful if you want data open to all users of your app but don't want it open to the world. // These rules require authentication { "rules": { ".read&...
Just define: // These rules give anyone, even people who are not users of your app, // read and write access to your database { "rules": { ".read": true, ".write": true } } It can be useful during development but pay attention because This level o...
You can define a private rules to disable read and write access to your database by users. With these rules, you can only access the database when you have administrative privileges (which you can get by accessing the database through the Firebase console or by signing in from a server). // These...
Here's an example of a rule that gives each authenticated user a personal node at /users/$user_id where $user_id is the ID of the user obtained through Authentication. // These rules grant access to a node matching the authenticated // user's ID from the Firebase auth token { "rules"...
An indeterminate ProgressBar shows a cyclic animation without an indication of progress. Basic indeterminate ProgressBar (spinning wheel) <ProgressBar android:id="@+id/progressBar" android:indeterminate="true" android:layout_width="wrap_content" ...

Page 442 of 1336