Tutorial by Examples: c

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...
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 -->
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...
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...
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...
One might want to GROUP BY more than one column declare @temp table(age int, name varchar(15)) insert into @temp select 18, 'matt' union all select 21, 'matt' union all select 21, 'matt' union all select 18, 'luke' union all select 18, 'luke' union all select 21, 'luke' union all select 1...
-- Identity primary key - unique arbitrary increment number create table person ( id int identity(1,1) primary key not null, firstName varchar(100) not null, lastName varchar(100) not null, dob DateTime not null, ssn varchar(9) not null )
-- GUID primary key - arbitrary unique value for table create table person ( id uniqueIdentifier default (newId()) primary key, firstName varchar(100) not null, lastName varchar(100) not null, dob DateTime not null, ssn varchar(9) not null )
-- natural primary key - using an existing piece of data within the table that uniquely identifies the record create table person ( firstName varchar(100) not null, lastName varchar(100) not null, dob DateTime not null, ssn varchar(9) primary key not null )
-- composite key - using two or more existing columns within a table to create a primary key create table person ( firstName varchar(100) not null, lastName varchar(100) not null, dob DateTime not null, ssn varchar(9) not null, primary key (firstName, lastName, dob) )
In the absence of explicit initialization, external and static variables are guaranteed to be initialized to zero; automatic variables (including register variables) have indeterminate1 (i.e., garbage) initial values. Scalar variables may be initialized when they are defined by following the name w...
The simplest way is to use the Activator class. However, even though Activator performance have been improved since .NET 3.5, using Activator.CreateInstance() is bad option sometimes, due to (relatively) low performance: Test 1, Test 2, Test 3... With Activator class Type type = typeof(BigInteg...
AppDomain.UnhandledException This event provides notification of uncaught exceptions.It allows the application to log information about the exception before the system default handler reports the exception to the user and terminates the application.If sufficient information about the state of the a...
n order to debug a remote Java application, it should be launched with some extra arguments to instruct the JVM to execute it in debug mode. This is done as follows: java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 -jar sampleApp.jar The above command tells the JVM to s...
AssemblyConfiguration: The AssemblyConfiguration attribute must have the configuration that was used to build the assembly. Use conditional compilation to properly include different assembly configurations. Use the block similar to the example below. Add as many different configurations as you com...

Page 382 of 826