Tutorial by Examples

TokenName                           Description=Equal toReturns True if the left-hand and right-hand operands are equal. Note that this is an overload of the assignment operator.<>Not equal toReturns True if the left-hand and right-hand operands are not equal.>Greater thanReturns True if th...
All of the logical operators in VBA can be thought of as "overrides" of the bitwise operators of the same name. Technically, they are always treated as bitwise operators. All of the comparison operators in VBA return a Boolean, which will always have none of its bits set (False) or all of...
If you have an image and want to create a new image, with new dimensions, you can use imagecopyresampled function: first create a new image with desired dimensions: // new image $dst_img = imagecreatetruecolor($width, $height); and store the original image into a variable. To do so, you may us...
The Deque is the only Python data structure with fast Queue operations. (Note queue.Queue isn't normally suitable, since it's meant for communication between threads.) A basic use case of a Queue is the breadth first search. from collections import deque def bfs(graph, root): distances = {}...
A comment is a way to put arbitrary text inside source code without having the C++ compiler interpret it with any functional meaning. Comments are used to give insight into the design or method of a program. There are two types of comments in C++: Single-Line Comments The double forward-slash seq...
Draper automatically matches up models with their decorators by convention. # app/decorators/user_decorator.rb class UserDecorator < Draper::Decorator def full_name "#{object.first_name} #{object.last_name}" end def created_at Time.use_zone(h.current_user.timezone...
Postscript is a dynamic-namespacing or LISP 1 language. But it provides the tools to implement local variables in procedures and other effects needed to implement algorithms. For local names in a procedure, make a new dictionary at the start and pop it at the end. /myproc { 10 dict begin ...
Select a font and fontsize, select location, show string. %!PS /Palatino-Roman 20 selectfont 300 400 moveto (Hello, World!) show showpage Notes and common pitfalls: Failing to set a font (resulting in either no text or a default (ugly) font) Using findfont and setfont but forgettin...
Detailed instructions on getting rails-activerecord set up or installed.
After finding an official Julia package, it is straightforward to download and install the package. Firstly, it's recommended to refresh the local copy of METADATA: julia> Pkg.update() This will ensure that you get the latest versions of all packages. Suppose that the package we want to inst...
Sometimes, the latest tagged version of a package is buggy or is missing some required features. Advanced users may wish to update to the latest development version of a package (sometimes referred to as the "master", named after the usual name for a development branch in Git). The benefit...
Some experimental packages are not included in the METADATA package repository. These packages can be installed by directly cloning their Git repositories. Note that there may be dependencies of unregistered packages that are themselves unregistered; those dependencies cannot be resolved by the pack...
Using an AppCompat theme, the ProgressBar's color will be the colorAccent you have defined. 5.0 To change the ProgressBar color without changing the accent color you can use theandroid:theme attribute overriding the accent color: <ProgressBar android:theme="@style/MyProgress" ...
According to Material Documentation: A linear progress indicator should always fill from 0% to 100% and never decrease in value. It should be represented by bars on the edge of a header or sheet that appear and disappear. To use a material Linear ProgressBar just use in your xml: <Progres...
This example covers common errors with using the 'java' command. "Command not found" If you get an error message like: java: command not found when trying to run the java command, this means that there is no java command on your shell's command search path. The cause could be: yo...
Animation curves allows you to change a float parameter as the animation plays. For example, if there is an animation of length 60 seconds and you want a float value/parameter, call it X, to vary through the animation (like at animation time = 0.0s; X = 0.0 , at animation time = 30.0s; X = 1.0, at...
Buttons are one of the simplest controls and mostly used for executing some code when the user wants. Here we have a really simple case, show a Message box when a button is clicked. We add a button to a form, name it cmdShowMessage as used in code to identify the object and set the buttons text to ...
TextBoxes allow the user to input data into the program. We are going to modify the form and add a textbox so the messagebox show us the message that the user wants. Now our form looks like: And then modify the button click event to use the text of the textbox: private void cmdShowMessage_Click...
ComboBoxes allow the user to choose one of various options provided by the developer. We are going to modify the form and add a combobox so the messagebox show us the message that the user want from a list that we will provide. After adding the combo to the form we now add a list of options to the...
In Java, activerecord pattern isn't very popular. Though there are some implementations: http://arjava.sourceforge.net/ http://javalite.io/ http://www.javalobby.org/articles/activeobjects/ http://www.jooq.org/

Page 808 of 1336