Tutorial by Examples: ect

Sub CreateTextFileExample() Dim fso As Object Set fso = CreateObject("Scripting.FileSystemObject") Dim targetFile As Object Dim myFilePath As String Dim myFileText As String myFilePath = "C:\mypath\to\myfile.txt" Set targetFile = fso.CreateT...
Const ForReading = 1 Const ForWriting = 2 Const ForAppending = 8 Sub WriteTextFileExample() Dim oFso Set oFso = CreateObject("Scripting.FileSystemObject") Dim oFile as Object Dim myFilePath as String Dim myFileText as String myFilePath = "C:\my...
traverse_ executes an Applicative action for every element in a Foldable structure. It ignores the action's result, keeping only the side-effects. (For a version which doesn't discard results, use Traversable.) -- using the Writer applicative functor (and the Sum monoid) ghci> runWriter $ trave...
For the sample XML (without namespaces): This XPath, /r/f/text() will select the text node with this string value: "Text 1" And this XPath, string(/r/f) will return the string value of f, which is also: "Text 1"
For the sample XML (without namespaces): This XPath, /r/e will select this element: <e a="1"/>
This Makefile will cross compile and zip up executables for Windows, Mac and Linux (ARM and x86). # Replace demo with your desired executable name appname := demo sources := $(wildcard *.go) build = GOOS=$(1) GOARCH=$(2) go build -o build/$(appname)$(3) tar = cd build && tar -cvzf $...
Clicking the Select an element in the page to inspect it button in the upper left corner of the Elements tab in Chrome or Inspector tab in Firefox, available from Developer Tools, and then clicking on a element of the page highlights the element and assigns it to the $0 variable. Elements inspecto...
SELECT Id, FName, LName, (SELECT COUNT(*) FROM Cars WHERE Cars.CustomerId = Customers.Id) AS NumberOfCars FROM Customers
package main import ( "fmt" "io/ioutil" ) func main() { files, err := ioutil.ReadDir(".") if err != nil { panic(err) } fmt.Println("Files and folders in the current directory:") for _, fileInfo := range fi...
To get a verbose list of all devices connected to adb, write the following command in your terminal: adb devices -l Example Output List of devices attached ZX1G425DC6 device usb:336592896X product:shamu model:Nexus_6 device:shamu 013e4e127e59a868 device usb:337641472X produc...
var object = { key1: 10, key2: 3, key3: 40, key4: 20 }; var array = []; for(var people in object) { array.push([people, object[people]]); } Now array is [ ["key1", 10], ["key2", 3], ["key3", 40], ["key4", 20] ] ...
Success output stream: cmdlet > file # Send success output to file, overwriting existing content cmdlet >> file # Send success output to file, appending to existing content cmdlet 1>&2 # Send success and error output to error stream Error output stream: cmdlet 2&g...
Configure your project-level build.gradle to include the android-apt plugin: buildscript { repositories { mavenCentral() } dependencies { classpath 'com.jakewharton:butterknife-gradle-plugin:8.5.1' } } Then, apply the android-apt plugin in your module-level build...
Library cargo new my-library This creates a new directory called my-library containing the cargo config file and a source directory containing a single Rust source file: my-library/Cargo.toml my-library/src/lib.rs These two files will already contain the basic skeleton of a library, such th...
Debug cargo build Release Building with the --release flag enables certain compiler optimizations that aren't done when building a debug build. This makes the code run faster, but makes the compile time a bit longer too. For optimal performance, this command should be used once a release build ...
From the official documentation: With Gradle: repositories { mavenCentral() // jcenter() works as well because it pulls from Maven Central } dependencies { compile 'com.github.bumptech.glide:glide:4.0.0' compile 'com.android.support:support-v4:25.3.1' annotationProcessor 'com.githu...
Generally, the syntax is: SELECT <column names> FROM <table name> WHERE <condition> For example: SELECT FirstName, Age FROM Users WHERE LastName = 'Smith' Conditions can be complex: SELECT FirstName, Age FROM Users WHERE LastName = 'Smith' AND (City = 'New York' OR C...
$collection = Mage::getModel('catalog/product')->getCollection(); $collection->addAttributeToFilter('sku', array('like' => 'UX%'));
$collection = Mage::getModel('catalog/product')->getCollection(); // Using operator $collection->addAttributeToFilter('status', array('eq' => 1)); // Without operator (automatically uses 'equal' operator $collection->addAttributeToFilter('status', 1);
When a column name matches a reserved keyword, standard SQL requires that you enclose it in double quotation marks: SELECT "ORDER", ID FROM ORDERS Note that it makes the column name case-sensitive. Some DBMSes have proprietary ways of quoting names. For example, SQL Serve...

Page 9 of 99