Tutorial by Examples: ant

There are a few changes where instant won't do its trick and a full build and reinstall fo your app will happen just like it used to happen before Instant Run was born. Change the app manifest Change resources referenced by the app manifest Change an Android widget UI element (requires a Clean ...
There are many different variants of the ARM architecture and implementations that have evolved over time. The notation can be confusing. For instance, arm7 and armv7, are completely different. The first is a CPU implementation; the second is a CPU architecture. The architecture, also called a f...
You can create temporary files which has a visible name on the file system which can be accessed via the name property. The file can, on unix systems, be configured to delete on closure (set by delete param, default is True) or can be reopened later. The following will create and open a named temp...
In an enum it is possible to define a specific behavior for a particular constant of the enum which overrides the default behavior of the enum, this technique is known as constant specific body. Suppose three piano students - John, Ben and Luke - are defined in an enum named PianoClass, as follows:...
A typeglob *foo holds references to the contents of global variables with that name: $foo, @foo, $foo, &foo, etc. You can access it like an hash and assign to manipulate the symbol tables directly (evil!). use v5.10; # necessary for say our $foo = "foo"; our $bar; say ref *foo{SCAL...
return flag ? "yes" : "no"; String cmp = (flag1 != flag2) ? "not equal" : "equal"; // Don't do this return (flag ? "yes" : "no"); Redundant grouping parentheses (i.e. parentheses that does not affect evaluation) may be used if t...
PhantomJS is a fully featured headless web browser with JavaScript support. Before you start you will need to download a PhantomJS driver, and make sure to put this in the beginning of your code: using OpenQA.Selenium; using OpenQA.Selenium.PhantomJS; Great, now onto the initialization: var d...
Converter between boolean and visibility. Get bool value on input and returns Visibility value. NOTE: This converter have already exists in System.Windows.Controls namespace. public sealed class BooleanToVisibilityConverter : IValueConverter { /// <summary> /// Convert bool or Nu...
angular .module('MyApp', []) .constant('VERSION', 1.0); Your constant is now declared and can be injected in a controller, a service, a factory, a provider, and even in a config method: angular .module('MyApp') .controller('FooterController', function(VERSION) { this.version = V...
Improper Inheritance Lets say there are 2 classes class Foo and Bar. Foo has two features Do1 and Do2. Bar needs to use Do1 from Foo, but it doesn't need Do2 or needs feature that is equivalent to Do2 but does something completely different. Bad way: make Do2() on Foo virtual then override it in B...
MY_CONSTANT = "Hello, world" # constant Constant = 'This is also constant' # constant my_variable = "Hello, venus" # not constatn Constant name start with capital letter. Everything that start with capital letter are considered as constant in Ruby. So class and module are al...
MY_CONSTANT = "Hello, world" MY_CONSTANT = "Hullo, world" The above code results in a warning, because you should be using variables if you want to change their values. However it is possible to change one letter at a time in a constant without a warning, like this: MY_CONST...
def say_hi MESSAGE = "Hello" puts MESSAGE end The above code results in an error: SyntaxError: (irb):2: dynamic constant assignment.
class Message DEFAULT_MESSAGE = "Hello, world" def speak(message = nil) if message puts message else puts DEFAULT_MESSAGE end end end The constant DEFAULT_MESSAGE can be changed with the following code: Message::DEFAULT_MESSAGE = "Hullo, wo...
In order to dynamically decide what beans to inject, we can use FactoryBeans. These are classes which implement the factory method pattern, providing instances of beans for the container. They are recognized by Spring and can be used transparently, without need to know that the bean comes from a fac...
If you need to clean the build: ndk-build clean
Create a DATABASE. Note that the shortened word SCHEMA can be used as a synonym. CREATE DATABASE Baseball; -- creates a database named Baseball If the database already exists, Error 1007 is returned. To get around this error, try: CREATE DATABASE IF NOT EXISTS Baseball; Similarly, DROP DATA...
The advantages of using Session State are 1)Better security 2)Reduced bandwidth The disadvantages of using Session state are 1)More resource consumption of server. 2)Extra code/care if a Web farm is used(we will discuss this shortly) **Session State Modes** ...
An antijoin returns rows from the left side of the predicate for which there are no corresponding rows on the right side of the predicate. It returns rows that fail to match (NOT IN) the subquery on the right side. SELECT * FROM employees WHERE department_id NOT IN (SELECT department_id F...

Page 6 of 11