Tutorial by Examples: f

This is an example to show how to change the allowed choices on a subCategory select field depending on the value of the category select field. To do that you have to make your subCategory choices dynamical for both client and server side. 1. Make the form dynamic on the client side for display / ...
Most Ruby code utilizes the implicit receiver, so programmers who are new to Ruby are often confused about when to use self. The practical answer is that self is used in two major ways: 1. To change the receiver. Ordinarily the behavior of def inside a class or module is to create instance methods...
Setup variables JUSERID=$[ ( $RANDOM % 100 ) + 1 ] JUSERNAME="admin" JUSEREMAIL="[email protected]" JUSERPASS="qweasd" DB="joomla_3" DBUSER="jdbuser" DBPASS="dbupass" DBPREFIX="prfx_" JOOMLAVERSION="3.6.2" ...
Before reading and writing text files you should know what encoding to use. See the Perl Unicode Documentation for more details on encoding. Here we show the setting of UTF-8 as the default encoding and decoding for the function open. This is done by using the open pragma near the top of your code (...
Modern browsers provide a classList object to ease manipulation of the element's class attribute. Older browsers require direct manipulation of the element's className property. * Note class names are not stored in the element's property in any particular order W3C DOM4 Testing if an element cont...
In InnoDB, having a long PRIMARY KEY (either a single column with a lengthy value, or several columns that form a long composite value) wastes a lot of disk space. The primary key value for a row is duplicated in all the secondary index records that point to the same row. Create an AUTO_INCREME...
You may want to re-seed your database without affecting your previously created seeds. For this purpose, you can use firstOrCreate in your seeder: EmployeeType::firstOrCreate([ 'type' => 'manager', ]); Then you can seed the database: php artisan db:seed Later, if you want to add a...
DECLARE v_num1 NUMBER(10); v_num2 NUMBER(10); BEGIN v_num1 := 2; v_num2 := 1; IF v_num1 > v_num2 THEN dbms_output.put_line('v_num1 is bigger than v_num2'); END IF; END;
DECLARE v_num1 NUMBER(10); v_num2 NUMBER(10); BEGIN v_num1 := 2; v_num2 := 10; IF v_num1 > v_num2 THEN dbms_output.put_line('v_num1 is bigger than v_num2'); ELSE dbms_output.put_line('v_num1 is NOT bigger than v_num2'); END IF; END;
DECLARE v_num1 NUMBER(10); v_num2 NUMBER(10); BEGIN v_num1 := 2; v_num2 := 2; IF v_num1 > v_num2 THEN dbms_output.put_line('v_num1 is bigger than v_num2'); ELSIF v_num1 < v_num2 THEN dbms_output.put_line('v_num1 is NOT bigger than v_num2'); ELSE dbms_out...
To receive push notifications we are supposed to tell the plugin to listen to incoming push notifications. This step is done after initialization & registration import { Push, NotificationEventResponse} from "ionic-native"; //the push element is created in the initial...
just execute uname -a. On Arch: $ uname -a Linux nokia 4.6.4-1-ARCH #1 SMP PREEMPT Mon Jul 11 19:12:32 CEST 2016 x86_64 GNU/Linuxenter code here
The Maven Surefire plugin runs during the test phase of the Maven build process or when test is specified as a Maven goal. The following directory structure and minimum pom.xml file will configure Maven to run a test. Directory structure inside the project's root directory: ─ project_root ├─ p...
Most of linux distros stores its version info in the /etc/lsb-release (debian) or /etc/redhat-release (RPM based) file. Using below generic command should get you past most of the Debian and RPM derivatives as Linux Mint and Cent-Os. Example on Ubuntu Machine: cat /etc/*release DISTRIB_ID=Ubuntu ...
val allowedUsers = users.filter { it.age > MINIMUM_AGE }
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...
This example will explore how to see the layout of a video track and how to extract the individual pictures within it. 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 t...
I.Overview A significant difference between MongoDB & RDBMS is MongoDB has many kinds of operators. One of them is update operator, which is used in update statements. II.What happen if we don't use update operators? Suppose we have a student collection to store student information(Table view...
There exist cases in which it is necessary to put data of different types together. In Azure ML for example, it is necessary to pass informations from a R script module to another one exclusively throught dataframes. Suppose we have a dataframe and a number: > df name height team...
Create a new console application and add a reference to the Service Bus NuGet package, similar to the sending application above. Add the following using statement to the top of the Program.cs file. using Microsoft.ServiceBus.Messaging; Add the following code to the Main method, set ...

Page 274 of 457