Tutorial by Examples: o

Detailed instructions on getting titanium set up or installed.
Prepare First create a "message.properties" file in Resources/Files/. Example: ############## # Test message.properties ############## label.age=Enter your age: validate.error.reqired.age=Sorry, but you have to give away the secret of your age ... Next, connect the resource with y...
Detailed instructions on getting cdi set up or installed.
Sometimes your webpage needs a automatic redirect. For example, to redirect to example.com after 5 seconds: <meta http-equiv="refresh" content="5;url=https://www.example.com/" /> This is line will send you to the designated website (in this case example.com after 5 sec...
One of the more annoying things that programmers can do is to scatter calls to printStackTrace() throughout their code. The problem is that the printStackTrace() is going to write the stacktrace to standard output. For an application that is intended for end-users who are not Java programmers,...
Union types are used in several languages, like C-language, to contain several different types which can "overlap". In other words, they might contain different fields all of which start at the same memory offset, even when they might have different lengths and types. This has the benef...
setuptools_scm is an officially-blessed package that can use Git or Mercurial metadata to determine the version number of your package, and find Python packages and package data to include in it. from setuptools import setup, find_packages setup( setup_requires=['setuptools_scm'], use_...
PostScript is a Turing-complete general programming language, designed and developed by Adobe Systems. Many of the ideas which blossomed in PostScript had been cultivated in projects for Xerox and Evans & Sutherland. Its main real-world application historically is as a page description language...
var List: TList<TDateTime>; ... List.Sort( TComparer<TDateTime>.Construct( function(const A, B: TDateTime): Integer begin Result := CompareDateTime(A, B); end ) );
IProgress<T> can be used to report progress of some procedure to another procedure. This example shows how you can create a basic method that reports its progress. void Main() { IProgress<int> p = new Progress<int>(progress => { Console.WriteLine("Runni...
It's important to note that the System.Progress<T> class does not have the Report() method available on it. This method was implemented explicitly from the IProgress<T> interface, and therefore must be called on a Progress<T> when it's cast to an IProgress<T>. var p1 = new P...
def hello_world(greeting: str = 'Hello'): print(greeting + ' world!') Note the spaces around the equal sign as opposed to how keyword arguments are usually styled.
CREATE TABLE menagerie.bird ( bird_id INT NOT NULL AUTO_INCREMENT, species VARCHAR(300) DEFAULT NULL COMMENT 'You can include genus, but never subspecies.', INDEX idx_species (species) COMMENT 'We must search on species often.', PRIMARY KEY (bird_id) ) ENGINE=InnoDB COMMENT 'Thi...
Emacs' documentation uses a consistent notation for all key bindings, which is explained here: Key chords A "key chord" is obtained by pressing two or more keys simultaneously. Key chords are denoted by separating all keys by dashes (-). They usually involve modifier keys, which are put ...
Create example table Employee: CREATE TABLE Employee ( Id INT, EmpName VARCHAR(25), EmpGender VARCHAR(6), EmpDeptId INT ) Creates stored procedure that checks whether the values passed in stored procedure are not null or non empty and perform insert operation in Employee ta...
Uname is the short name for unix name. Just type uname in console to get information about your operating system. uname [OPTION] If no OPTION is specified, uname assumes the -s option. -a or --all - Prints all information, omitting -p and -i if the information is unknown. Example: > unam...
Open a Command Prompt window and run the following commands: adb kill-server set ADB_TRACE=sockets adb nodaemon server 2>&1 | for /f "usebackq tokens=7*" %a in (`findstr /c:"): '"`) do @echo %a %b >> %USERPROFILE%\Desktop\adb_host_log.txt Now you can run your A...
Exceptions encountered while running a test will fail the test, and if the test is not in a test set, terminate the test engine. Usually, this is a good thing, because in most situations exceptions are not the desired result. But sometimes, one wants to test specifically that a certain exception is ...
What's the deal with the following? julia> @test 0.1 + 0.2 == 0.3 Test Failed Expression: 0.1 + 0.2 == 0.3 Evaluated: 0.30000000000000004 == 0.3 ERROR: There was an error during testing in record(::Base.Test.FallbackTestSet, ::Base.Test.Fail) at ./test.jl:397 in do_test(::Base.Test....
Powershell allows multiple assignment of variables and treats almost everything like an array or list. This means that instead of doing something like this: $input = "foo.bar.baz" $parts = $input.Split(".") $foo = $parts[0] $bar = $parts[1] $baz = $parts[2] You can simply...

Page 599 of 1038