Tutorial by Examples: a

This design pattern is called Strategy Pattern. It is used to define a family of algorithms, encapsulates each one, and make them interchangeable. Strategy design pattern lets an algorithm vary independently from clients that use it. For example, animals can "walk" in many different w...
To use the method of inflector helper, first load the helper like all other helper with the following code: $this->load->helper('inflector');
Function singular($string), convert a plural word to singular. To get perfect result parameter $string should be a single word. The function will return string. echo singular("books"); //prints 'book'
is_countalbe($string) is use for checking a word has plural form or not. Return type will be boolean means if the given word has plural form it will return true, otherwise will return false. is_countable('book'); // Returns TRUE
For getting plural form of any English word the plural($string) function is handy. Like singular($string), the function plural($string) also return string result. echo plural("book"); //prints 'books'
Camel Case is the practise of writing compound words or phrases where every word begins with Capital letter, without space between word. The function camelize($string) helps to make a string camelized. It converts a string of words separated by spaces or underscores to camel case. echo camelize('Mc...
Remove delimiter The function humanize($words), takes multiple words separated by underscores and adds spaces for underscores with capitalized each word. echo humanize('mac_donald'); // Prints 'Mac Donald' The function can also replace any declared separator/delimiter. In this case, delimiter w...
PLEASE NOTE: ONLY PUT THIS CODE IN THE HEADER OF THE PAGE, OTHERWISE IT WILL NOT WORK! <?php if (!isset($_SERVER['PHP_AUTH_USER'])) { header('WWW-Authenticate: Basic realm="My Realm"'); header('HTTP/1.0 401 Unauthorized'); echo 'Text to send if user hits Cancel button';...
Add this dependency to the Cargo.toml file: [dependencies] iron = "0.4.0" Run cargo build and Cargo will download and install the specified version of Iron.
create table tgt ( id, val ) as select 1, 'a' from dual union all select 2, 'b' from dual ; Table TGT created. create table src ( id, val ) as select 1, 'x' from dual union all select 2, 'y' from dual ; Table SRC created. update ( select t.val as t_val, s.val as s_val ...
//Create a new ChromeDriver IWebDriver driver = new ChromeDriver(); //Navigate to www.google.com driver.Navigate().GoToUrl("https://www.google.com"); //Find the WebElement of the search bar IWebElement element = driver.FindElement(By.Name("q")); //Type Hello World int...
Detailed instructions on getting word-vba set up or installed.
def merge(X, Y): " merge two sorted lists " p1 = p2 = 0 out = [] while p1 < len(X) and p2 < len(Y): if X[p1] < Y[p2]: out.append(X[p1]) p1 += 1 else: out.append(Y[p2]) p2 += 1 out += X[p...
The NgFor directive instantiates a template once per item from an iterable. The context for each instantiated template inherits from the outer context with the given loop variable set to the current item from the iterable. To customize the default tracking algorithm, NgFor supports trackBy option. ...

Resetting Email CSS in