Tutorial by Examples: and

// Let's take an arbitrary piece of data, a 4-byte integer in this case let some_data: u32 = 14; // Create a constant raw pointer pointing to the data above let data_ptr: *const u32 = &some_data as *const u32; // Note: creating a raw pointer is totally safe but dereferencing a raw pointe...
// Let's take a mutable piece of data, a 4-byte integer in this case let mut some_data: u32 = 14; // Create a mutable raw pointer pointing to the data above let data_ptr: *mut u32 = &mut some_data as *mut u32; // Note: creating a raw pointer is totally safe but dereferencing a raw pointe...
HanlderManager providing: public class HandlerManagerProvider { private static HandlerManager handlerManager; private HandlerManagerProvider() { } public static HandlerManager get() { return handlerManager != null ? handlerManager : (handlerManager =...
Using compose with a View, ViewModel and Model is an easy way to reuse and combine different Views and ViewModels. Given the following View and ViewModel (applies to each alternative below): src/greeter.html <template> <h1>Hello, ${name}!</h1> </template> src/gree...
Sometimes we want to use a where query on a a collection of records returned which is not ActiveRecord::Relation.Hence we get the above error as Where clause is know to ActiveRecord and not to Array. There is a precise solution for this by using Joins. EXAMPLE:- Suppose i need to find all user ...
Objective-C Import the following to your ViewController #import <CoreImage/CoreImage.h> #import <CoreImage/CoreImage.h> #import <QuartzCore/QuartzCore.h> Call the function [self faceDetector]; Function definition: -(void)faceDetector { // Load the picture for face...
Go through the steps: Add 'NSAppleMusicUsageDescription' to your Info.plist for the privacy authority. Make sure your music is available in your iPhone. It will not work in the simulator. iOS 10.0.1 import UIKit import AVFoundation import MediaPlayer class ViewController: UIViewControll...
import Foundation class CookiesSingleton { static let instance : CookiesSingleton = CookiesSingleton() static var enableDebug = true func loadCookies() { if let cookiesDetails = NSUserDefaults.standardUserDefaults().objectForKey("customeWebsite") { for (keys,_) i...
DBCC commands enable user to maintain space in database, clean caches, shrink databases and tables. Examples are: DBCC DROPCLEANBUFFERS Removes all clean buffers from the buffer pool, and columnstore objects from the columnstore object pool. DBCC FREEPROCCACHE -- or DBCC FREEPROCCACHE (0x06...
Trace flags in SQL Server are used to modify behavior of SQL server, turn on/off some features. DBCC commands can control trace flags: The following example switches on trace flag 3205 globally and 3206 for the current session: DBCC TRACEON (3205, -1); DBCC TRACEON (3206); The following examp...
Git config allows you to customize how git works. It is commonly used to set your name and email or favorite editor or how merges should be done. To see the current configuration. $ git config --list ... core.editor=vim credential.helper=osxkeychain ... To edit the config: $ git config &lt...
The Memory Model is difficult to understand, and difficult to apply. It is useful if you need to reason about the correctness of multi-threaded code, but you do not want to have to do this reasoning for every multi-threaded application that you write. If you adopt the following principals when wri...
Let's make a function to divide two numbers, that's very trusting about its input: def divide(x, y) return x/y end This will work fine for a lot of inputs: > puts divide(10, 2) 5 But not all > puts divide(10, 0) ZeroDivisionError: divided by 0 > puts divide(10, 'a') TypeE...
select :start_value + level -1 n from dual connect by level <= :end_value - :start_value + 1
Yu can define format of the file that will be imported using FORMATFILE option: INSERT INTO mytable SELECT a.* FROM OPENROWSET(BULK 'c:\test\values.txt', FORMATFILE = 'c:\test\values.fmt') AS a; The format file, format_file.fmt, describes the columns in values.txt: 9.0 2 1 SQ...
There are three ways to quote something using a Julia function: julia> QuoteNode(:x) :(:x) julia> Meta.quot(:x) :(:x) julia> Expr(:quote, :x) :(:x) What does "quoting" mean, and what is it good for? Quoting allows us to protect expressions from being interpreted as sp...
Data sets often contain comments that explain the data format or contain the license and usage terms. You usually want to ignore these lines when you read in the DataFrame. The readtable function assumes that comment lines begin with the '#' character. However, your file may use comment marks like ...
with Ada.Text_IO; use Ada.Text_IO; procedure Main is task My_Task; task body My_Task is begin for I in 1 .. 4 loop Put_Line ("Hello from My_Task"); end loop; end; begin Put_Line ("Hello from Main"); end; Result The order of Put...
with Ada.Text_IO; use Ada.Text_IO; procedure Main is task My_Task; task body My_Task is begin for I in 1 .. 4 loop Put_Line ("Hello from My_Task"); end loop; end; begin for I in 1 .. 4 loop Put_Line ("Hello from Main"); e...

Page 109 of 153