Tutorial by Examples

A topic might only apply to certain versions. When creating a new topic, the appropriate versions can be chosen in the title section of the topic. In the following example .NET 2.0, 4.0, 4.5.1; Compact Framework 3.7 and Micro Framework 4.2 are selected. This selection will show up next to the to...
An example cannot be associated with a version number directly. Parts of it can however be declared to apply only for certain versions. <!-- if version [eq Java SE 1.3] --> This content is for Java SE 1.3 <!-- end version if -->
If there are many version tables, the title of the desired one has to be included in angle brackets. <!-- if version <Micro Framework> [eq 4.4] --> This content is for Micro Framework 4.4 <!-- end version if -->
The markdown help states Available conditionals are gt, gte, lt, lte, eq, and neq. <!-- if version [eq C++03] --> eq equal to <!-- end version if --> <!-- if version [neq C++03] --> neq not equal to <!-- end version if --> <!-- if version [gt C++03] -...
Multiple conditions can be used. <!-- if version [lte 1.2.0] [gt 1.3.12] [gt 1.4.9] [neq 1.2.0] [eq 1.5.7] --> content <!-- end version if -->
POSIX thread library provides implementation of the mutex primitive, used for the mutual exclusion. Mutex is created using pthread_mutex_init, and destroyed using pthread_mutex_destroy. Obtaining a mutex can be done using pthread_mutex_lock or pthread_mutex_trylock, (depending if the timeout is desi...
The command :g/apples/y A will yank all lines containing the word apples into the a register, which can be pasted with "ap. Any regular expression can be used. Note the space before the A, and the capitalization of the register letter. If a capital letter is used as the yank register, matc...

Str

Returns character data (varchar) converted from numeric data. Parameters: float expression. An approximate numeric data type with a decimal point. length. optional. The total length of the string expression that would return, including digits, decimal point and leading spaces (if needed). The d...
Returns a Unicode string surrounded by delimiters to make it a valid SQL Server delimited identifier. Parameters: character string. A string of Unicode data, up to 128 characters (sysname). If an input string is longer than 128 characters function returns null. quote character. Optional. A sing...
pmap takes a function (that you specify) and applies it to all of the elements in an array. This work is divided up amongst the available workers. pmap then returns places the results from that function into another array. addprocs(3) sqrts = pmap(sqrt, 1:10) if you function takes multiple ar...
@parallel can be used to parallellize a loop, dividing steps of the loop up over different workers. As a very simple example: addprocs(3) a = collect(1:10) for idx = 1:10 println(a[idx]) end For a slightly more complex example, consider: @time begin @sync begin @paral...
The macros @spawn and @spawnat are two of the tools that Julia makes available to assign tasks to workers. Here is an example: julia> @spawnat 2 println("hello world") RemoteRef{Channel{Any}}(2,1,3) julia> From worker 2: hello world Both of these macros will evaluate an ex...
The Julia documentation advises that pmap() is designed for the case where each function call does a large amount of work. In contrast, @parallel for can handle situations where each iteration is tiny, perhaps merely summing two numbers. There are several reasons for this. First, pmap incurs ...
According to the documentation under ?@async, "@async wraps an expression in a Task." What this means is that for whatever falls within its scope, Julia will start this task running but then proceed to whatever comes next in the script without waiting for the task to complete. Thus, for...
When you first start Julia, by default, there will only be a single process running and available to give work to. You can verify this using: julia> nprocs() 1 In order to take advantage of parallel processing, you must first add additional workers who will then be available to do work that...
SELECT s.name AS [schema], t.object_id AS [table_object_id], t.name AS [table_name], c.column_id, c.name AS [column_name], i.name AS [index_name], i.type_desc AS [index_type] FROM sys.schemas AS s INNER JOIN sys.tables AS t ON s.schema_id = t.schema_id I...
SELECT @@VERSION Returns the version of MS SQL Server running on the instance. SELECT @@SERVERNAME Returns the name of the MS SQL Server instance. SELECT @@SERVICENAME Returns the name of the Windows service MS SQL Server is running as. SELECT serverproperty('ComputerNamePhysicalNetBIOS'...
Whenever you change data, in a Data Manipulation Language(DML) command, you can wrap your changes in a transaction. DML includes UPDATE, TRUNCATE, INSERT and DELETE. One of the ways that you can make sure that you're changing the right data would be to use a transaction. DML changes will take a loc...
To create a view with an index, the view must be created using the WITH SCHEMABINDING keywords: CREATE VIEW view_EmployeeInfo WITH SCHEMABINDING AS SELECT EmployeeID, FirstName, LastName, HireDate FROM [dbo].Employee GO Any clustered or non-clustered ...
Stored procedures can return values using the OUTPUT keyword in its parameter list. Creating a stored procedure with a single out parameter CREATE PROCEDURE SprocWithOutParams ( @InParam VARCHAR(30), @OutParam VARCHAR(30) OUTPUT ) AS BEGIN SELECT @OutParam = @InParam + ' must co...

Page 615 of 1336