Tutorial by Examples: ast

One implementation of the io.Reader interface can be found in the bytes package. It allows a byte slice to be used as the source for a Reader. In this example the byte slice is taken from a string, but is more likely to have been read from a file or network connection. message := []byte("Hello...
You can put your azure SQL Database in SQL elastic pool: CREATE DATABASE wwi ( SERVICE_OBJECTIVE = ELASTIC_POOL ( name = mypool1 ) ) You can create copy of an existing database and place it in some elastic pool: CREATE DATABASE wwi AS COPY OF myserver.WideWorldImporters ( SERVICE_OBJECTIV...
Range.CurrentRegion is a rectangular range area surrounded by empty cells. Blank cells with formulas such as ="" or ' are not considered blank (even by the ISBLANK Excel function). Dim rng As Range, lastCell As Range Set rng = Range("C3").CurrentRegion ' or Set rng = Shee...
GCobol >>SOURCE FORMAT IS FIXED *> *************************************************************** *> Purpose: Demonstrate a merge pass *> Tectonics: cobc -x gnucobol-merge-sample.cob *> *************************************************************** ...
The STDIN stream in Julia refers to standard input. This can represent either user input, for interactive command-line programs, or input from a file or pipeline that has been redirected into the program. The readline function, when not provided any arguments, will read data from STDIN until a newl...
Elastic Beanstalk (EB) is essentially a hybrid between Golden AMIs and CloudFormation, while vastly simplifying the learning curve of Puppet or Chef. An Elastic Beanstalk deployment is broken down into two components: Application and Environment. Application Consider this your top-level groupin...
Blue/Green deployment is a release technique that reduces downtime and risk by running two identical production environments (one called "Blue", the other called "Green"). At any one time, only one of the environments is serving live traffic, while the other is sitting idle. Whe...
Consider 2 MySQL Servers for replication setup, one is a Master and the other is a Slave. We are going to configure the Master that it should keep a log of every action performed on it. We are going to configure the Slave server that it should look at the log on the Master and whenever changes happ...
class Program { static void Main(string[] args) { //Initialize a new container WindsorContainer container = new WindsorContainer(); //Register IService with a specific implementation and supply its dependencies container.Register(Component.For<ISer...
Private Sub Get_Last_Used_Row_Index() Dim wS As Worksheet Set wS = ThisWorkbook.Sheets("Sheet1") Debug.Print LastRow_1(wS) Debug.Print LastRow_0(wS) End Sub You can choose between 2 options, regarding if you want to know if there is no data in the worksheet :...
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...
$scheme = 'https' $url_format = '{0}://example.vertigion.com/foos?{1}' $qs_data = @{ 'foo1'='bar1'; 'foo2'= 'complex;/?:@&=+$, bar''"'; 'complex;/?:@&=+$, foo''"'='bar2'; } [System.Collections.ArrayList] $qs_array = @() foreach ($qs in $qs_data.GetEnumerator()...
Encoded with [uri]::EscapeDataString() First, we'll decode the URL and Query String encoded with [uri]::EscapeDataString() in the above example: https://example.vertigion.com/foos? foo2=complex%3B%2F%3F%3A%40%26%3D%2B%24%2C%20bar'%22& complex%3B%2F%3F%3A%40%26%3D%2B%24%2C%20foo'%22=bar2&am...
MasterDetailPage: Manages two separate Pages (panes) of information. XAML <?xml version="1.0" encoding="utf-8" ?> <MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class=&quot...
Akka Streams allows you to easily create a stream leveraging the power of the Akka framework without explicitly defining actor behaviors and messages. Every stream will have at least one Source (origin of the data) and at least one Sink (destination of the data). import akka.actor.ActorSystem impo...
var x = 5; var str = "if (x == 5) {console.log('z is 42'); z = 42;} else z = 0; "; console.log("z is ", eval(str)); The use of eval is strongly discouraged. See the Remarks section for details.
XML <Deborah> <address>Dark world</address> <master>Babadi</master> <ID>#0</ID> <colour>red</colour> <side>evil</side> </Deborah> XPATH boolean(/Deborah/master/text()) OR string(/Deborah/master...
XML <Dobby> <address>Hogwartz</address> <master></master> <colour>wheatish</colour> <side>all good</side> </Dobby> XPATH boolean(/Dobby/master/text()) OR string(/Dobby/master) != '' OUTPUT false
Given a text file test.txt: Ford Jeep Honda The following script is processing this text file: 'Read in File Data to an array, separate by newline vb equivalent (vbcrlf) Dim car, cars Dim filefullname : filefullname = "C:\testenv\test.txt" cars = Split(CreateObject("Scriptin...
'Note: I use this method to extract non-html data in extracted GET telnet results 'This example effectively grabs every other vehicle that have start and finish 'characters, which in this case is "/". 'Resulting in an array like this: 'extractedData(0) = "/Jeep" 'extractedD...

Page 22 of 26