Tutorial by Examples: n

Once you are done with a worker you should terminate it. This helps to free up resources for other applications on the user’s computer. Main Thread: // Terminate a worker from your application. worker.terminate(); Note: The terminate method is not available for service workers. It will be term...
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 ...
console.dir(object) displays an interactive list of the properties of the specified JavaScript object. The output is presented as a hierarchical listing with disclosure triangles that let you see the contents of child objects. var myObject = { "foo":{ "bar":"d...
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...
Retrieve System DateTime VBA supports 3 built-in functions to retrieve the date and/or time from the system's clock. FunctionReturn TypeReturn ValueNowDateReturns the current date and timeDateDateReturns the date portion of the current date and timeTimeDateReturns the time portion of the current d...
These functions take a Variant that can be cast to a Date as a parameter and return an Integer representing a portion of a date or time. If the parameter can not be cast to a Date, it will result in a run-time error 13: Type mismatch. FunctionDescriptionReturned valueYear()Returns the year portion ...
DateDiff() DateDiff() returns a Long representing the number of time intervals between two specified dates. Syntax DateDiff ( interval, date1, date2 [, firstdayofweek] [, firstweekofyear] ) interval can be any of the intervals defined in the DatePart() function date1 and date2 are the two ...
CDate() CDate() converts something from any datatype to a Date datatype Sub CDateExamples() Dim sample As Date ' Converts a String representing a date and time to a Date sample = CDate("September 11, 2001 12:34") Debug.Print Format$(sample, "yyyy-mm-dd hh:nn:...
How To Install ANTLR in Eclipse (Last tested on Indigo and ANTLR IDE 2.1.2) Install Eclipse. Download ANTLR complete binaries jar that includes ANTLR v2. Extract to a temp directory. Copy the antlr-n.n folder to an appropriate permanent location, for example the same folder that Eclipse is in...
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...
Suppose we want to read and stack a bunch of similarly-formatted files. The quick solution is: rbindlist(lapply(list.files(patt="csv$"), fread), id=TRUE) We might not be satisfied with this for a couple reasons: It might run into errors when reading with fread or when stacking with ...
Specifies custom foreign key name if a foreign key not following EF's convention is desired. public class Person { public int IdAddress { get; set; } [ForeignKey(nameof(IdAddress))] public virtual Address HomeAddress { get; set; } } This can also be used when you have multipl...
The available commands will be displayed, including a brief description, in tabular format. In Windows 10 the following commands are listed: CommandDescriptionASSOCDisplays or modifies file extension associations.ATTRIBDisplays or changes file attributes.BREAKSets or clears extended CTRL+C checkin...
Split vector of texts using one pattern: stri_split_fixed(c("To be or not to be.", "This is very short sentence.")," ") # [[1]] # [1] "To" "be" "or" "not" "to" "be." # # [[2]] # [1] "This" ...
You want to convert all elements in an array to some other form. For example, you have theUsers = [ {id: 1, username: 'john'} {id: 2, username: 'lexy'} {id: 3, username: 'pete'} ] and you want to have an array of usernames only, i.e. ['john', 'lexy', 'pete'] Method 1 - using .map ...
theUsers = [ {id: 1, username: 'john'} {id: 2, username: 'lexy'} {id: 3, username: 'pete'} ] To retain only users whose id is greather than 2, use the following: [{id: 3, username: 'pete'}] Method 1 - using .filter filteredUsers = theUsers.filter (user) -> user.id >= 2 Met...
The text displayed in a button can be customized, by creating a ButtonType instance yourself: ButtonType answer = new ButtonType("42"); ButtonType somethingElse = new ButtonType("54"); Alert alert = new Alert(Alert.AlertType.NONE, "What do you get when you multiply six ...
/// <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...
root: build.gradle buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle-experimental:0.8.0-alpha4' } } allprojects { repositories { jcenter() } } app: build.gradle apply plugin: 'com.andro...

Page 489 of 1088