Tutorial by Examples: ci

This example is based on spring boot 1.5.1.RELEASE. with the following dependencies: <!-- Spring --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency>...
Code echo get_permalink( 44 ); Output The link of the post id:44, for example: http://website.com/category/name-of-post/
Code get_the_title( 44 ); Output The title of the post id:44.
C++17 The if constexpr statement can be used to conditionally compile code. The condition must be a constant expression. The branch not selected is discarded. A discarded statement inside a template is not instantiated. For example: template<class T, class ... Rest> void g(T &&p, Re...
Create a new Xamarin Forms app using PCL File -> New Solution -> Multiplatform App -> Xamarin Forms -> Forms App; Name the project as EffectsDemo Under the iOS project, add a new Effect class that inherits from PlatformEffect class and overrides the methods OnAttached, OnDetached and ...
$rootId = Mage::app()->getStore($storeId)->getRootCategoryId(); $categories = Mage::getModel('catalog/category')->getCollection() ->addAttributeToSelect('*') ->addFieldToFilter('path', array('like'=> "1/$rootId/%")) ->addAttributeToFilter('level', 2...
An explicit instantiation definition creates and declares a concrete class, function, or variable from a template, without using it just yet. An explicit instantiation can be referenced from other translation units. This can be used to avoid defining a template in a header file, if it will only be i...
Decimal fixed point types are typically used in accounting. They are characterised by both a delta and a number of decimal digits. Their arithmetical operations reflect the rules of accounting. type Money is delta 0.001 digits 10; Oil_Price : Money := 56.402; Loss : Money := 0.002 / 3; -- ...
It is very easy to disable turbolinks on specific links. According to the official turbolinks documentation: Turbolinks can be disabled on a per-link basis by annotating a link or any of its ancestors with data-turbolinks="false". Examples: // disables turbolinks for this one link ...
Policies are classes that help you organise authorisation logic around a model resource. Using our previous example, we might have a ContentPolicy that manages user access to the Content model. To make ContentPolicy, laravel provides an artisan command. Simply run php artisan make:policy ContentPo...
Writing Policies follows much the same pattern as writing Gates. The content permission gate can be rewritten as a Policy like this: function view($user, $content) { return $user->isSubscribedTo($content->id); } Policies can contain more methods as needed to take care of all authori...
Via The User model The Laravel User model contains two methods that help with authorisations using Policies; can and can't. These two can be used to determine if a user has authorisation or not on a model respectively. To check if a user can view a content or not, you can do the following: if($us...
One time definition of a generic base class with recursive type specifier. Each node has one parent and multiple children. /// <summary> /// Generic base class for a tree structure /// </summary> /// <typeparam name="T">The node type of the tree</typeparam> pub...
This is an example of how you would do a one to many mapping using XML. We will use Author and Book as our example and assume an author may have written many books, but each book will only have one author. Author class: public class Author { private int id; private String firstName; ...
hql = "Select id, name From Employee";
There will be times where you only want to import a specific sheet from an excel file with multiple sheets. To do that, we'll use "SHEET=". PROC IMPORT OUT= YourNewTable DATAFILE= "myfolder/excelfilename.xlsx" DBMS=xlsx REPLACE; SHEET="Sheet1&quo...
Some projects like GoLang might need to clone other dependent GitLab repositories during build. To get this working you can add a Deploy Key to dependent repositories and put the private key (without password) into the origin repository. Create and check-in a SSH key inside the Git Repository that ...
By leveraging some of the member variables in the GridLayout instance, we can change the margins around the layout, and spacing between cells. In this example we set the following: verticalSpacing = 0 - Sets the vertical spacing between cells to 0px. horizontalSpacing = 20 - Sets the horizontal ...
Asks the delegate to open a resource specified by a URL, and provides a dictionary of launch options. Example of usage: func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { return SomeManager.shared.handle( ...
Note: manifest (in DllReferencePlugin) should reference path (defined in DllPlugin) const webpack = require('webpack'); const path = require('path'); const isDevelopment = process.env.NODE_ENV !== 'production'; const ExtractTextPlugin = require('extract-text-webpack-plugin'); const extractCSS...

Page 38 of 42