Tutorial by Examples

Unlike show.bind when using if.bind the element will be removed from the page if the supplied binding value is false or added into the page if the value is true. export class MyViewModel { isVisible = false; } <template> <div if.bind="isVisible"><strong>If ...
Everything you need to get started with Django admin is already setup in Django's default project layout. This includes: # settings.py # `django.contrib.admin` and its dependancies. INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes',...
Create a server.js file with the following contents: 'use strict'; const Hapi = require('hapi'); // Create a server instance const server = new Hapi.Server(); // Specify connections (server available on http://localhost:8000) server.connection({ port: 8000 }); // Add a route ...
Detailed instructions on getting django-cms set up or installed.
The following are the steps to start an Eclipse remote debugger. This is useful when the application is not started from a server instance within Eclipse. This feature is really powerful and can also help debugging code which resides in the test or production environment. Let's have a look at the se...
Setup your view controller to manage editing of text for the text field. class MyViewController: UITextFieldDelegate { override viewDidLoad() { super.viewDidLoad() textField.delegate = self } } textFieldShouldReturn is called every time the return butto...
Detailed instructions on getting android-intent set up or installed.
Instructs the engine to use hash method to join tables in the argument. Usage : use_hash(TableA [TableB] ... [TableN]) As explained in many places, "in a HASH join, Oracle accesses one table (usually the smaller of the joined results) and builds a hash table on the join key in memory. It the...
SUBSTR retrieves part of a string by indicating the starting position and the number of characters to extract SELECT SUBSTR('abcdefg',2,3) FROM DUAL; returns: bcd To count from the end of the string, SUBSTR accepts a negative number as the second parameter, e.g. SELECT SUBSTR('abcdefg',-4,2...
LTRIM and RTRIM remove characters from the beginning or the end (respectively) of a string. A set of one or more characters may be supplied (default is a space) to remove. For example, select LTRIM('<===>HELLO<===>', '=<>') ,RTRIM('<===>HELLO<===>', '=<>'...
Create Oracle error log table ERR$_EXAMPLE for existing EXAMPLE table: EXECUTE DBMS_ERRLOG.CREATE_ERROR_LOG('EXAMPLE', NULL, NULL, NULL, TRUE); Make writing operation with SQL: insert into EXAMPLE (COL1) values ('example') LOG ERRORS INTO ERR$_EXAMPLE reject limit unlimited;
The difference in months between two dates can be found using the MONTHS_BETWEEN( date1, date2 ): SELECT MONTHS_BETWEEN( DATE '2016-03-10', DATE '2015-03-10' ) AS difference FROM DUAL; Outputs: DIFFERENCE ---------- 12 If the difference includes part months then it will return the ...
Query: WITH generator ( value ) AS ( SELECT 1 FROM DUAL UNION ALL SELECT value + 1 FROM generator WHERE value < 10 ) SELECT value FROM generator; Output: VALUE ----- 1 2 3 4 5 6 7 8 9 10
Sample Data: CREATE TABLE table_name ( value VARCHAR2(50) ); INSERT INTO table_name ( value ) VALUES ( 'A,B,C,D,E' ); Query: WITH items ( list, item, lvl ) AS ( SELECT value, REGEXP_SUBSTR( value, '[^,]+', 1, 1 ), 1 FROM table_name UNION ALL SELECT value, ...
For creating new user, We need to follow simple steps as below : Step 1: Login to MySQL as root $ mysql -u root -p Step 2 : We will see mysql command prompt mysql> CREATE USER 'my_new_user'@'localhost' IDENTIFIED BY 'test_password'; Here, We have successfully created new user, But this u...
we can create a new controller with rails g controller command. $ bin/rails generate controller controller_name The controller generator is expecting parameters in the form of generate controller ControllerName action1 action2. The following creates a Greetings controller with an action of hell...
public class App : Application { internal static NavigationPage NavPage; public App () { // The root page of your application MainPage = new RootPage(); } } public class RootPage : MasterDetailPage { public RootPage() { var menuPage = ne...
You can use re.finditer to iterate over all matches in a string. This gives you (in comparison to re.findall extra information, such as information about the match location in the string (indexes): import re text = 'You can try to find an ant in this string' pattern = 'an?\w' # find 'an' either w...
The Windows API GetTickCount function returns the number of milliseconds since the system (computer) was started. The simplest example follows: var Start, Stop, ElapsedMilliseconds: cardinal; begin Start := GetTickCount; // do something that requires measurement Stop := GetTickCount; ...
Appearance : Trying to access an array by a key that does not exist in the array Possible Solution : Check the availability before accessing it. Use: isset() array_key_exists()

Page 465 of 1336