Tutorial by Examples: l

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&...
IObserver<T> and IObservable<T> interfaces can be used to implement observer pattern in .NET IObservable<T> interface represents the class that sends notifications IObserver<T> interface represents the class that receives them public class Stock { private string Sym...
Code function add_the_theme_page(){ add_menu_page('Theme page title', 'Theme menu label', 'manage_options', 'theme-options', 'page_content', 'dashicons-book-alt'); } add_action('admin_menu', 'add_the_theme_page'); function page_content(){ echo '<div class="wrap"><h2&...
This example is a very simple Spring Boot application. Maven Dependencies At first add the following dependencies to your project. Spring Initializr is recommended when you create a new project. <parent> <groupId>org.springframework.boot</groupId> <artifactId>spr...
First you have to create a file constants.php and it is a good practice to create this file inside app/config/ folder. You can also add constants.php file in compose.json file. Example File: app/config/constants.php Array based constants inside the file: return [ 'CONSTANT' => 'This...
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...
Code <h1><?php echo get_option( 'blogname' ); ?></h1> Output Name of the blog in H1 style
Code <?php echo get_option( 'something_bla_bla_bla' ); ?> Output false Code <?php echo get_option( 'something_bla_bla_bla', 'Oh no!' ); ?> Output Oh no!
By using tools like lscpu as lscpu is an easy way to get CPU information. $ lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per socket: 4 So...
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 ...
Sometimes we'd like to pause code execution to inspect the state of the application (see Debugging). When running code through the MATLAB editor, this can be done using the "Pause" button in the UI or by pressing Ctrl+c (on Windows). However, when a computation was initiated from a GUI (vi...
/* * 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...
Including a Static Section on a page is similar to including a snippet. The only difference is instead of using the word include you use the word section. {% section 'section-file-name' %} Using this tag will "hardcode" the section into your theme at the place where you put the code an...
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...
/* * This design have some major issues * For each new shape added the unit testing * of the GraphicEditor should be redone * When a new type of shape is added the time * for adding it will be high since the developer * who add it should understand the logic * of the Gr...
/* * For each new shape added the unit testing * of the GraphicEditor should not be redone * No need to understand the sourcecode * from GraphicEditor. * Since the drawing code is moved to the * concrete shape classes, it's a reduced risk * to affect old functionallity when new * functionall...
Area The term used in Debian Policy for the main, contrib, and non-free divisions. Architecture The type of system a piece of software is built for. Such as amd64, i386, armel, s390x, powerpc, armhf, mips, AArch64, POWER. Binary package An installable .deb file Source package A unit of upstr...
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...
Html.TextBox() @Html.TextBox("Name", null, new { @class = "form-control" }) output:<input class="form-control" id="Name"name="Name"type="text"value=""/> @Html.TextBox("Name", "Stack Overflow", new { ...

Page 741 of 861