Opening a database is an asynchronous operation. We need to send a request to open our database and then listen for events so we know when it's ready.
We'll open a DemoDB database. If it doesn't exist yet, it will get created when we send the request.
The 2 below says that we're asking for version...
(defn print-some-items
[[a b :as xs]]
(println a)
(println b)
(println xs))
(print-some-items [2 3])
This example prints the output
2
3
[2 3]
The argument is destructured and the items 2 and 3 are assigned to the symbols a and b. The original argument, the entire vector [2 ...
Click Right Mouse on Database you want to migrate then -> Tasks -> Generate Scripts...
Wizard will open click Next then chose objects you want to migrate and click Next again, then click Advanced scroll a bit down and in Types of data to script choose Schema and data (unless you want ...
VBA supports 2 calendars : Gregorian and Hijri
The Calendar property is used to modify or display the current calendar.
The 2 values for the Calendar are:
ValueConstantDescription0vbCalGregGregorian calendar (default)1vbCalHijriHijri calendar
Example
Sub CalendarExample()
'Cache the curren...
Server Syntax
var io = require('socket.io')(80);
io.on('connection', function (mysocket) {
//custom event called `private message`
mysocket.on('private message', function (from, msg) {
console.log('I received a private message by ', from, ' saying ', msg);
});
//internal `di...
/// <summary>
/// Converts a data type to another data type.
/// </summary>
public static class Cast
{
/// <summary>
/// Converts input to Type of default value or given as typeparam T
/// </summary>
/// <typepara...
/// <summary>
/// Read configuration values from app.config and convert to specified types
/// </summary>
public static class ConfigurationReader
{
/// <summary>
/// Get value from AppSettings by key, convert to Type of default value or typ...
You can wrap values into actions and pipe the result of one computation into another:
return :: Monad m => a -> m a
(>>=) :: Monad m => m a -> (a -> m b) -> m b
However, the definition of a Monad doesn’t guarantee the existence of a function of type Monad m => m a -&...
Enums are defined by the following the syntax above.
typedef NS_ENUM(NSUInteger, MyEnum) {
MyEnumValueA,
MyEnumValueB,
MyEnumValueC,
};
You also can set your own raw-values to the enumeration types.
typedef NS_ENUM(NSUInteger, MyEnum) {
MyEnumValueA = 0,
MyEnumValueB =...
When object's are linked by a lookup or master-detail relationship, the parent records field's can be referenced from the child record or 'base object' in a query. This is also known as upwards traversal.
SELECT FirstName, Account.Name, Account.Category__c FROM Contact
It's possible to traverse ...
Swift
UIApplication.sharedApplication().preferredContentSizeCategory
Objective-C
[UIApplication sharedApplication].preferredContentSizeCategory;
This returns a content size category constant, or an accessibility content size category constant.
You can register for notifications of when the device text size is changed.
Swift
NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(updateFont), name: name:UIContentSizeCategoryDidChangeNotification, object: nil)
Objective-C
[[NSNotificationCenter defaultCenter] addObs...
Create this class :
public class InputFilterMinMax implements InputFilter {
private int min, max;
public InputFilterMinMax(int min, int max) {
this.min = min;
this.max = max;
}
public InputFilterMinMax(String min, String max) {
this.min = Integer...
Comments in Tcl are best thought of as another command.
A comment consists of a # followed by any number of characters up to the next newline. A comment can appear wherever a command can be placed.
# this is a valid comment
proc hello { } {
# the next comment needs the ; before it to indicat...