Tutorial by Examples

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 = "&lt...
Detailed instructions on getting c#-4.0 set up or installed.
if ( ! function_exists('products_post_type') ) { function products_post_type() { $labels = array( 'name' => _x( 'Products', 'Post Type General Name', 'text_domain' ), 'singular_name' => _x( 'Product', 'Post Type Singular Name', 'text_domain'...
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...
WP_DEBUG is a PHP constant (a permanent global variable) that can be used to trigger the "debug" mode throughout WordPress. It is assumed to be false by default and is usually set to true in the wp-config.php file on development copies of WordPress. define( 'WP_DEBUG', true ); define( 'W...
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 deploy an Ember application simply transfer the output from ember build to a web server. This can be done with standard Unix file transfer tools such as rsync or scp. There are also services that will let you deploy easily. ember build scp -r dist/* myserver.com:/var/www/public/ normally we ...
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...
<template> <div class="hello"> <p>{{ filtered() }}</p> </div> </template> <script> export default { name: 'hello', data () { return { list: ['toto', 'titi', 'tata', 'tete'] } }, methods: { filtered ...
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 } ...
In many examples, you will find a service id like 'acme.demo.service.id' (a string with dots). You services.yml will look like this: services: acme.demo.service.id: class: Acme\DemoBundle\Services\DemoService arguments: ["@doctrine.orm.default_entity_manager", &quot...
Display the version currently installed. $ wp cli version Check for updates to WP-CLI. $ wp cli check-update Update WP-CLI to the latest stable release. $ wp cli update List all available aliases. $ wp cli alias Print various details about the WP-CLI environment. $ wp cli info Du...
Download WordPress core $ wp core download --locale=nl_NL Install WordPress $ wp core install --url=example.com --title=Example --admin_user=supervisor --admin_password=strongpassword [email protected] Display the WordPress version $ wp core version Transform a single-site i...

Page 1153 of 1336