Tutorial by Examples: f

We can use command uname with various options to get complete details of running kernel. uname -a Linux df1-ws-5084 4.4.0-64-generic #85-Ubuntu SMP Mon Feb 20 11:50:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux As per man page here few more options Usage: uname [OPTION]... Print certain system inf...
If you want to replace parts of your website, ajax is an easy way to do it. The website.html where you want to replace the content based on the selected value: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> ...
Let's initially understand basic types of custom validators: Inline Validator Standalone Validator Inline Validator: It is the type of the validator we create inside the class which is basically a method we define just like other methods but with extra parameters which is passed in by Yii2. ...
While designing a form, you might like to group a few input fields into a group to help organise the form layout. This can be done by using the tag . Here is an example for using it. For each fieldset, you can set a legend for the set using the tag LEGEND TEXT Example <form> <fieldset...
This is a jumbotron with a title, a content and a button. Code <div class="jumbotron"> <h1>Title text</h1> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tortor ipsum, convallis sit.</p> <p><a class="btn btn-default&...
Code add_action('admin_menu', 'register_my_custom_submenu_page'); function register_my_custom_submenu_page() { add_submenu_page( 'tools.php', 'Submenu Page', 'My Custom Submenu Page', 'manage_options', 'my-custom-submenu-page', 'my_cust...
library(tidyr) ## example data df <- read.table(text =" numbers firstName secondName 1 1 1.5862639 0.4087477 2 2 0.1499581 0.9963923 3 3 0.4117353 0.3740009 4 4 -0.4926862 0.4437916", header = T) df # numbers firstName secondName # 1 ...
/* * Component is an interface * which all elements (files, * folders, links ...) will implement */ class Component { public: virtual int getSize() const = 0; }; /* * File class represents a file * in file system. */ class File : public Component { public: virtual int...
For sections, instead of utilizing one big JSON file (like settings_schema.json, they instead keep their schema within the file of the section that is using it. To do this {% schema %} {% endschema %} tags are used and JSON is placed between them. From there, the format is similar to settings_schema...
One of the most useful things that came along with sections is blocks. Blocks are basically a blueprint for something that can be created an unlimited amount of times. One of the best examples is the slides of a slider. A block is a top level item in the schema, meaning it is alongside things like n...
First, lets overview what we need in order to setup Hibernate correctly. @EnableTransactionManagement and @EnableJpaRepositories - we want transactional management and to use spring data repositories. DataSource - main datasource for the application. using in-memory h2 for this example. LocalCo...
In order to expose Thymeleaf templates we need to define controllers. Example: @Controller @RequestMapping("/") public class MessageController { @Autowired private MessageRepository messageRepository; @GetMapping public ModelAndView index() { It...
First, install ipset if needed. Please refer to your distribution to know how to do it. As an example, here is the command for Debian-like distributions. $ apt-get update $ apt-get install ipset Then create a configuration file to define an ipset containing the IPs for which you want to open ac...
It is a common practice to name files using the date as prefix in the following format: YYYYMMDD, for example: 20170101_results.csv. A date in such string format can be verified using the following regular expression: \\d{4}(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]) The above expression considers d...
Navigate to project's app module and create libs directory. Place your .aar file there. For example myLib.aar. Add the code below to android block of app level's build.gradle file. repositories { flatDir { dirs 'libs' } } This way you defined a new ext...
Sometimes you would want to start or remove an action on a specific node at a certain time. For example, you might want to stop a moving object when the user taps the screen. This becomes very helpful when a node has multiple actions and you only wants to access one of them. let move = SKAction.mov...
package main import ( "fmt" "k8s.io/client-go/1.5/kubernetes" "k8s.io/client-go/1.5/pkg/api/v1" "k8s.io/client-go/1.5/rest" ) func main() { config, err = rest.InClusterConfig() if err != nil { return nil, err } ...
Code echo get_permalink(); Output The link of the current page, for example: http://website.com/category/name-of-post/
Code echo get_permalink( 44 ); Output The link of the post id:44, for example: http://website.com/category/name-of-post/

Page 395 of 457