Tutorial by Examples: c

The Factory method pattern is a creational pattern that abstracts away the instantiation logic of an object in order to decouple the client code from it. When a factory method belongs to a class that is an implementation of another factory pattern such as Abstract factory then it is usually more ap...
Swift 2.3 let url = NSURL(string: "http://google.com/lastPath") let lastPath = url?.lastPathComponent Swift 3.0 let url = URL(string: "http://google.com/lastPath") let lastPath = url?.lastPathComponent
GET your REST data and store in a PowerShell object: $Post = Invoke-RestMethod -Uri "http://jsonplaceholder.typicode.com/posts/1" Modify your data: $Post.title = "New Title" PUT the REST data back $Json = $Post | ConvertTo-Json Invoke-RestMethod -Method Put -Uri "h...
GET your REST data and store in a PowerShell object: $Users = Invoke-RestMethod -Uri "http://jsonplaceholder.typicode.com/users" Modify many items in your data: $Users[0].name = "John Smith" $Users[0].email = "[email protected]" $Users[1].name = "Jane S...
# Define a class class TypeName { # Property with validate set [ValidateSet("val1", "Val2")] [string] $P1 # Static property static [hashtable] $P2 # Hidden property does not show as result of Get-Member hidden [int] $P3 # Constructor Ty...
These are the available editions of SQL Server, as told by the Editions Matrix: Express: Entry-level free database. Includes core-RDBMS functionality. Limited to 10G of disk size. Ideal for development and testing. Standard Edition: Standard Licensed edition. Includes core functionality and Busi...
Returns the total number of values in a given column. We have table as shown in figure that will be used to perform different aggregate functions. The table name is Marksheet. Select COUNT(MarksObtained) From Marksheet The count function doesn't consider rows with NULL value in the field used...
In Julia, you can have an Array that holds other Array type objects. Consider the following examples of initializing various types of Arrays: A = Array{Float64}(10,10) # A single Array, dimensions 10 by 10, of Float64 type objects B = Array{Array}(10,10,10) # A 10 by 10 by 10 Array. Each ele...
There are numerous ways to convert numeric types to strings in Julia: julia> a = 123 123 julia> string(a) "123" julia> println(a) 123 The string() function can also take more arguments: julia> string(a, "b") "123b" You can also insert (aka ...
There are a number of different methods that can be used to create the same type of expression. The expressions intro mentioned the :() syntax. Perhaps the best place to start, however is with strings. This helps to reveal some of the fundamental similarities between expressions and strings in Ju...
As mentioned in the Intro to Expressions expressions are a specific type of object in Julia. As such, they have fields. The two most used fields of an expression are its head and its args. For instance, consider the expression MyExpr3 = Expr(:(=), :x, 2) discussed in Creating Expressions. We...
There are a number of useful web resources that can help further your knowledge of expressions in Julia. These include: Julia Docs - Metaprogramming Wikibooks - Julia Metaprogramming Julia’s macros, expressions, etc. for and by the confused, by Gray Calhoun Month of Julia - Metaprogramming, b...
CREATE SCHEMA dvr AUTHORIZATION Owner CREATE TABLE sat_Sales (source int, cost int, partid int) GRANT SELECT ON SCHEMA :: dvr TO User1 DENY SELECT ON SCHEMA :: dvr to User 2 GO
ALTER SCHEMA dvr TRANSFER dbo.tbl_Staging; GO This would transfer the tbl_Staging table from the dbo schema to the dvr schema
A JavaScript Iterator is an object with a .next() method, which returns an IteratorItem, which is an object with value : <any> and done : <boolean>. A JavaScript AsyncIterator is an object with a .next() method, which returns a Promise<IteratorItem>, a promise for the next value. ...
jmp a_label ;Jump to a_label jmp bx ;Jump to address in BX jmp WORD [aPointer] ;Jump to address in aPointer jmp 7c0h:0000h ;Jump to segment 7c0h and offset 0000h jmp FAR WORD [aFarPointer] ;Jump to segment:offset...
In order to use a conditional jump a condition must be tested. Testing a condition here refers only to the act of checking the flags, the actual jumping is described under Conditional jumps. x86 tests conditions by relying on the EFLAGS register, which holds a set of flags that each instruction ca...
Based on the state of the flags the CPU can either execute or ignore a jump. An instruction that performs a jump based on the flags falls under the generic name of Jcc - Jump on Condition Code1. Synonyms and terminology In order to improve the readability of the assembly code, Intel defined severa...

Page 498 of 826