Tutorial by Examples

You can do a multiline doctest by using '...>' for the lines following the first iex> Foo.Bar.somethingConditional("baz") ...> |> case do ...> {:ok, _} -> true ...> {:error, _} -> false ...> end true
Instances have a lot of metadata that gets returned from a call to describe-instances, but often times you just want to see the basics. You can use a JMESPath query combined with table output to show concise instance information in an easily readable way. aws ec2 describe-instances --output table -...
There are several packages which can run Processing sketches in the Atom editor. These instructions use the Script package. There are also available packages for syntax highlighting and autocomplete, which are required for Script to identify Processing filetypes. Install the Script plugin. Either b...
Advanced functions behave the in the same way as cmdlets. The PowerShell ISE includes two skeletons of advanced functions. Access these via the menu, edit, code snippets, or by Ctrl+J. (As of PS 3.0, later versions may differ) Key things that advanced functions include are, built-in, customiz...
In this example, we will look at a method for returning the last non-empty column in a row. This method will work regardless of empty regions within the data set. However caution should be used if merged cells are involved, as the End method will be "stopped" against a merged region, ret...
First of all, Merged Cells are there only to improve the look of your sheets. So it is literally the last thing that you should do, once your sheet and workbook are totally functional! Where is the data in a Merged Range? When you merge a Range, you'll only display one block. The data will be ...
class MyResourceAdapter implements javax.resource.spi.ResourceAdapter { public void start(BootstrapContext ctx){..} public void stop(){..} public void endpointActivation (MessageEndpoingFactory mf, ActivationSpec a){..} public void endpointDeactivation (MessageEndpoingFact...
For example: You are going to migrate an existing column from non-required to required. In this case you might need to fill some default values in your migration for rows where the altered fields are actually NULL. In case the default value is simple (e.g. "0") you might use a default or d...
Pigeonhole Sort is a sorting algorithm that is suitable for sorting lists of elements where the number of elements (n) and the number of possible key values (N) are approximately the same. It requires O(n + Range) time where n is number of elements in input array and ‘Range’ is number of possible va...
Relational Algebra is not a full-blown SQL language, but rather a way to gain theoretical understanding of relational processing. As such it shouldn't make references to physical entities such as tables, records and fields; it should make references to abstract constructs such as relations, tuples ...
import Foundation class CookiesSingleton { static let instance : CookiesSingleton = CookiesSingleton() static var enableDebug = true func loadCookies() { if let cookiesDetails = NSUserDefaults.standardUserDefaults().objectForKey("customeWebsite") { for (keys,_) i...
Radix Sort is lower bound comparison based algorithm. It is a non-comparative integer sorting algorithm that sorts data with integer keys by grouping keys by individual digits which share some significant position and value. Radix sort is a linear time sorting algorithm that sort in O(n+k) time whe...
One easy algorithm to implement as a recursive function is factorial. ;;Compute the factorial for any n >= 0. Precondition: n >= 0, n is an integer. (defun factorial (n) (cond ((= n 0) 1) ;; Special case, 0! = 1 ((= n 1) 1) ;; Base case, 1! = 1 (t ...
If you're creating an image, decoding an image, or resizing an image to fit the large notification image area, you can get the correct pixel dimensions like so: Resources resources = context.getResources(); int width = resources.getDimensionPixelSize(android.R.dimen.notification_large_icon_width)...
DBCC commands enable user to maintain space in database, clean caches, shrink databases and tables. Examples are: DBCC DROPCLEANBUFFERS Removes all clean buffers from the buffer pool, and columnstore objects from the columnstore object pool. DBCC FREEPROCCACHE -- or DBCC FREEPROCCACHE (0x06...
DBCC commands enable user to validate state of database. ALTER TABLE Table1 WITH NOCHECK ADD CONSTRAINT chkTab1 CHECK (Col1 > 100); GO DBCC CHECKCONSTRAINTS(Table1); --OR DBCC CHECKCONSTRAINTS ('Table1.chkTable1'); Check constraint is added with nocheck options, so it will not be ...
DBCC commands can show information about database objects. DBCC PROCCACHE Displays information in a table format about the procedure cache. DBCC OUTPUTBUFFER ( session_id [ , request_id ]) Returns the current output buffer in hexadecimal and ASCII format for the specified session_id (and o...
Trace flags in SQL Server are used to modify behavior of SQL server, turn on/off some features. DBCC commands can control trace flags: The following example switches on trace flag 3205 globally and 3206 for the current session: DBCC TRACEON (3205, -1); DBCC TRACEON (3206); The following examp...
DBCC statements act as Database Console Commands for SQL Server. To get the syntax information for the specified DBCC command use DBCC HELP (...) statement. The following example returns all DBCC statements for which Help is available: DBCC HELP ('?'); The following example returns options f...
When called without arguments, Node.js starts a REPL (Read-Eval-Print-Loop) also known as the “Node shell”. At a command prompt type node. $ node > At the Node shell prompt > type "Hello World!" $ node > "Hello World!" 'Hello World!'

Page 974 of 1336