Tutorial by Examples

A ViewPager allows to show multiple fragments in an activity that can be navigated by either fliping left or right. A ViewPager needs to be feed of either Views or Fragments by using a PagerAdapter. There are however two more specific implementations that you will find most useful in case of using ...
A TabLayout can be used for easier navigation. You can set the tabs for each fragment in your adapter by using TabLayout.newTab() method but there is another more convenient and easier method for this task which is TabLayout.setupWithViewPager(). This method will sync by creating and removing tabs...
Razor has its own comment syntax which begins with @* and ends with *@. Inline Comment: <h1>Comments can be @*hi!*@ inline</h1> Multi-line Comment: @* Comments can spread over multiple lines *@ HTML Comment You can also use the normal HTML comment syntax starting with &...
While inside a Razor code block, the browser will only recognize HTML code if the code is escaped. Use @: for a Single line: @foreach(int number in Model.Numbers) { @:<h1>Hello, I am a header!</h1> } Use <text> ... </text> for Multi-line: @{ var number = 1; ...
Razor code can be inserted anywhere within HTML code. Razor code blocks are enclosed in @{ ... }. Inline variable and functions start with @. Code inside the Razor brackets follow the normal C# or VB rules. Single line statement: @{ var firstNumber = 1; } Multi-line code block: @{ var sec...
First create an express app: const express = require('express'); const app = express(); Then you can define routes like this: app.get('/someUri', function (req, res, next) {}) That structure works for all HTTP methods, and expects a path as the first argument, and a handler for that path, w...
After installation process, the following lines should be entered in mongo shell (client terminal). > db.world.insert({ "speech" : "Hello World!" }); > cur = db.world.find();x=cur.next();print(x["speech"]); Hello World! Explanation: In the first line,...
SQL TermsMongoDB TermsDatabaseDatabaseTableCollectionEntity / RowDocumentColumnKey / FieldTable JoinEmbedded DocumentsPrimary KeyPrimary Key (Default key _id provided by mongodb itself)
MMAP is a pluggable storage engine that was named after the mmap() Linux command. It maps files to the virtual memory and optimizes read calls. If you have a large file but needs to read just a small part of it, mmap() is much faster then a read() call that would bring the entire file to the memory....
WiredTiger supports LSM trees to store indexes. LSM trees are faster for write operations when you need to write huge workloads of random inserts. In WiredTiger, there is no in-place updates. If you need to update an element of a document, a new document will be inserted while the old document will...
All data is stored in-memory (RAM) for faster read/access.
A key-value engine created to integrate with Facebook's RocksDB.
A storage engine created by SanDisk that makes it possible to bypass the OS file system layer and write directly to the storage device.
A storage engine created by Percona that uses fractal tree indexes.
This uses the Dropbox .NET SDK to download a file from the Dropbox API at the remote path to the local file "Test", while tracking progress: var response = await client.Files.DownloadAsync(path); ulong fileSize = response.Response.Size; const int bufferSize = 1024 * 1024; var buffer ...
jQuery.ajax({ url: 'https://api.dropboxapi.com/2/users/get_current_account', type: 'POST', headers: { "Authorization": "Bearer <ACCESS_TOKEN>" }, success: function (data) { console.log(data); }, error: function (error) { ...
To create a UIImageView programmatically, all you need to do is create an instance of UIImageView: //Swift let imageView = UIImageView() //Objective-C UIImageView *imageView = [[UIImageView alloc] init]; You can set the size and position of the UIImageView with a CGRect: //Swift imageView...
You can assign an image to a UIImageView during initialization, or later using the image property: //Swift UIImageView(image: UIImage(named: "image1")) UIImageView(image: UIImage(named: "image1"), highlightedImage: UIImage(named: "image2")) imageView.image = UII...
You can animate a UIImageView by quickly displaying images on it in a sequence using the UIImageView's animation properties: imageView.animationImages = [UIImage(named: "image1")!, UIImage(named: "image2")!, UIImage(nam...
We use Notification.requestPermission to ask the user if he/she wants to receive notifications from our website. Notification.requestPermission(function() { if (Notification.permission === 'granted') { // user approved. // use of new Notification(...) syntax will now be succe...

Page 85 of 1336