Tutorial by Examples: e

During design, the architect should look at what parts of the system need restricted access, and which parts can be less protected. For example, everyone can have read access to the public web page of the company, but only authorized individuals can edit the content. To help with the decisions to b...
Checkbox is a control that allow user to get boolean values from user for a spesific question like "Are you ok?". Has a event called CheckedChanged, which occurs whenever the check property is changed. Here is a CheckBox that has a question "Is Checked?". We got this Message...
When Vim opens a file with <CR><NL> line endings (common on MSDOS based operating systems, also called CRLF) it will set fileformat to dos, you can check what with: :set fileformat? fileformat=dos Or just :set ff? fileformat=dos To convert it to <NL> line endings (com...
HelloWorld.proj <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="SayHello"> <!-- Properties can be passed as command line parameters. i.e. /p:Name=MyName or /p:Name="My Name" (Use quotes if the value includes ...
If there is a null object on the collection it not throws a NPE, it returns a null instead: assert ['cat', 'dog', 'fish', null]*.length() == [3, 3, 4, null] Using it directly in a null object it's also null-safe: def nullCollection = null assert nullCollection*.length() == null
The sample content used here is Tears of Steel, by Blender Foundation. Specifically, we will use the download titled "HD 720p (~365MB, mov, 2.0)". This is a single file that ends with the extension "mov" and will play in just about any modern media player. Note that the download...
in the index.html, link the CSS from Google CDN <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.1/angular-material.min.css"> Required dependencies: angular angular-aria angular-animate angular-messages <!-- Angular M...
Same as, with writing classes - start with the simple cases, then add requirement (aka tests) and implementation (aka production code) case by case: [Test] public void EnsureThat_IsLeapYearIfDecimalMultipleOf4() {...} [Test] public void EnsureThat_IsNOTLeapYearIfDecimalMultipleOf100 {...} [Tes...
Testcode has the same quality demands, as production code. MakeSut() improves readability can be easily refactored perfectly supports dependency injection. Here's the concept: [Test] public void TestSomething() { var sut = MakeSut(); string result = sut.Do(); Assert....
Here the steps required to create a Firebase project and to connect with an Android app. Add Firebase to your app Create a Firebase project in the Firebase console and click Create New Project. Click Add Firebase to your Android app and follow the setup steps. When prompted, enter yo...
Add post-formats to post_type 'page' add_post_type_support( 'page', 'post-formats' ); Next example registers custom post type 'my_custom_post_type', and add Post Formats. Register custom post type 'my_custom_post_type' add_action( 'init', 'create_my_post_type' ); function create_my_post_type(...
Function Call add_theme_support( 'post-formats' )
Sometimes you want to know the position (index) of the current element while iterating over an enumerator. For such purpose, Ruby provides the with_index method. It can be applied to all the enumerators. Basically, by adding with_index to an enumeration, you can enumerate that enumeration. Index is ...
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { AppComponent } from './app.component'; @NgModule({ imports: [ BrowserModule ], declarations: [ AppComponent ], bootstrap: [ AppComponent ] }) export class AppModul...
$_cat = new Mage_Catalog_Block_Navigation(); $curent_cat = $_cat->getCurrentCategory(); $curent_cat_id = $curent_cat->getId(); $parentId=Mage::getModel('catalog/category')->load($curent_cat_id)->getParentId(); $parent = Mage::getModel('catalog/category')->load($parentId); $catego...
$categoryName = Mage::registry('current_category')->getName(); foreach ($categoryName as $_category): $categoryName = $_category->getName(); endforeach;
First we initialize our initial value problem we want to solve. odefun = @(t,y) cos(y).^2*sin(t); tspan = [0 16*pi]; y0=1; We then use the ode45 function without any specified options to solve this problem. To compare it later we plot the trajectory. [t,y] = ode45(odefun, tspan, y0); plot(t,...
Spring provides a useful task scheduling support. To enable it, just annotate any of your @Configuration classes with @EnableScheduling: @Configuration @EnableScheduling public class MyConfig { // Here it goes your configuration }
If we want some code to be executed periodically after the execution which was before is finished, we should use fixed delay (measured in milliseconds): @Component public class MyScheduler{ @Scheduled(fixedDelay=5000) public void doSomething() { // this will execute pe...
If we want something to be executed periodically, this code will be triggered once per the value in milliseconds we specify: @Component public class MyScheduler{ @Scheduled(fixedRate=5000) public void doSomething() { // this will execute periodically } }

Page 744 of 1191