Inserting a row at the bottom of a spreadsheet is easy:
var someSheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0];
someSheet.appendRow(["Frodo", "Baggins", "Hobbit", "The Shire", 33]);
Note this will add the row after the last non-empty row.
I...
fs is the File System API in node. We can use the method readFile on our fs variable, pass it a data.csv file, format and function that reads and splits the csv for further processing.
This assumes you have a file named data.csv in the same folder.
'use strict'
const fs = require('fs');
fs.r...
Detailed instructions on getting rebol set up or installed.
The most mature and stable version of Rebol is the official Rebol2, available from the downloads page for multiple platforms. There are 2 flavors:
Rebol/View (version with gui, ~ 0.6 MB)
Rebol/Core (no gui, for servers, ~ 0.3 MB)
...
For Example:
echo Hello!
pause >nul
:Name
echo What Is Your Name
set /p Input=Name:
echo so %Input% Is Your Name, right?
echo Rename?
echo 1 For Yes
echo 2 For No
set /p Input=Rename:
if %Input%=1 goto Name
Another Example:
@echo off
echo 1 or 2?
set /p input=Choice:
if %input...
Going to its roots, Logstash has the ability to parse and store syslog data. This example shows a basic configuration that gets you to that.
input {
file {
path => [
"/var/log/syslog",
"/var/log/auth.log"
]
type => "syslog"
}
}...
Sometimes, you need to output to more than one index in ElasticSearch, or have a custom mapping you want to apply to new indices as they roll in.
There are two ways to apply a custom mapping. One way, is to upload an ElasticSearch template. See the ElasticSearch documentation for that. The other ...
Create a website on Azure using portal page
Getting started
The first thing to do is to login into your Azure account and go to your portal page. If you don't have yet an account, you can start a free trial here.
After you have logged into your account, you can start following this guide.
The ...
Always use Named Arguments to optional parameters, to avoid potential bugs when the method is modified.
class Employee
{
public string Name { get; private set; }
public string Title { get; set; }
public Employee(string name = "<No Name>", string title = "<...
As of the C 2011 Standard, listed in §5.1.1.2 Translation Phases, the translation of source code to program image (e.g., the executable) are listed to occur in 8 ordered steps.
The source file input is mapped to the source character set (if necessary). Trigraphs are replaced in this step.
Contin...
Get a list of themes.
$ wp theme list
Install the latest version from wordpress.org and activate
$ wp theme install twentysixteen --activate
Install from a local zip file
$ wp theme install ../my-theme.zip
Install from a remote zip file
$ wp theme install http://s3.amazonaws.com/bucketn...
Get a list of plugins
$ wp plugin list
List active plugins on the site.
$ wp plugin list --status=active --format=json
List plugins on each site in a network.
$ wp site list --field=url | xargs -I % wp plugin list --url=%
Activate plugin
$ wp plugin activate hello-dolly
Deactivate p...
You can customize the appearance of the TextInputLayout and its embedded EditTextby defining custom styles in your styles.xml. The defined styles can either be added as styles or themes to your TextInputLayout.
Example for customizing the hint appearance:
styles.xml:
<!--Floating label text st...
# Read a text file and replace the IPv4 and IPv6 by fake IP Address
# Describe all variables
$SourceFile = "C:\sourcefile.txt"
$IPv4File = "C:\IPV4.txt"
$DestFile = "C:\ANONYM.txt"
$Regex_v4 = "(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})"
$Anonym_v4 = &quo...
To create a ResultSet you should to create a Statement or PrepapredStatement :
Create ResultSet with Statement
try {
Class.forName(driver);
Connection connection = DriverManager.getConnection(
"jdbc:somedb://localhost/databasename", "username", "pass...
You can load AngularJS services in vanilla JavaScript using AngularJS injector() method.
Every jqLite element retrieved calling angular.element() has a method injector() that can be used to retrieve the injector.
var service;
var serviceName = 'myService';
var ngAppElement = angular.element(do...
After a while, you end up with many configuration items in your config.yml. It can make you configuration easier to read if you split your configuration across multiple files. You can easily include all files from a directory this way:
config.yml:
imports:
- { resource: parameters.yml }
...