Exception Handling
Introduction
An exception is an abnormal event that arises during the execution of the program and disrupts the normal flow of the program. Abnormality do occur when your program is running. For example, you might expect the user to enter an integer, but receive a text string; or an unexpected I/O error pops up at runtime. What really matters is "what happens after an abnormality occurred?" In other words, "how the abnormal situations are handled by your program." If these exceptions are not handled properly, the program terminates abruptly and may cause severe consequences. For example, the network connections, database connections and files may remain opened; database and file records may be left in an inconsistent state.
Java has a built-in mechanism for handling runtime errors, referred to as exception handling. This is to ensure that you can write robust programs for mission-critical applications.
Older programming languages such as C have some drawbacks in exception handing. For example, suppose the programmer wishes to open a file for processing:
- The programmers are not made to aware of the exceptional conditions. For example, the file to be opened may not necessarily exist. The programmer therefore did not write codes to test whether the file exists before opening the file.
- Suppose the programmer is aware of the exceptional conditions, he/she might decide to finish the main logic first, and write the exception handling codes later – this "later", unfortunately, usually never happens. In other words, you are not force to write the exception handling codes together with the main logic.
- Suppose the programmer decided to write the exception handling codes, the exception handling codes intertwine with the main logic in many if-else statements. This makes main logic hard to follow and the entire program hard to read. For example,
if (file exists) { open file; while (there is more records to be processed) { if (no IO errors) { process the file record } else { handle the errors } } if (file is opened) close the file; } else { report the file does not exist; }
Java overcomes these drawbacks by building the exception handling into the language rather than leaving it to the discretion of the programmers:
- You will be informed of the exceptional conditions that may arise in calling a method - Exceptions are declared in the method's signature.
- You are forced to handle exceptions while writing the main logic and cannot leave them as an afterthought - Your program cannot compiled without the exception handling codes.
- Exception handling codes are separated from the main logic - Via the
try-catch-finally
construct.
Let's look into these three points in more details.
Point 1: Exceptions must be Declared
As an example, suppose that you want to use a java.util.Scanner
to perform formatted input from a disk file. The signature of the Scanner
's constructor with a File
argument is given as follows:
public Scanner(File source) throws FileNotFoundException;
The method's signature informs the programmers that an exceptional condition "file not found" may arise. By declaring the exceptions in the method's signature, programmers are made to aware of the exceptional conditions in using the method.
Point 2: Exceptions must be Handled
If a method declares an exception in its signature, you cannot use this method without handling the exception - you can't compile the program.
Example 1: The program did not handle the exception declared, resutled in compilation error.
import java.util.Scanner; import java.io.File; public class ScannerFromFile { public static void main(String[] args) { Scanner in = new Scanner(new File("test.in")); // do something ... } }
ScannerFromFile.java:5: unreported exception java.io.FileNotFoundException; must be caught or declared to be thrown
Scanner in = new Scanner(new File("test.in"));
^
To use a method that declares an exception in its signature, you MUST either:
- provide exception handling codes in a "
try-catch
" or "try-catch-finally
" construct, or - not handling the exception in the current method, but declare the exception to be thrown up the call stack for the next higher-level method to handle.
Example 2: Catch the exception via a "try-catch
" (or "try-catch-finally
") construct.
import java.util.Scanner; import java.io.File; import java.io.FileNotFoundException; public class ScannerFromFileWithCatch { public static void main(String[] args) { try { Scanner in = new Scanner(new File("test.in")); // do something if no exception ... // you main logic here in the try-block } catch (FileNotFoundException ex) { // error handling separated from the main logic ex.printStackTrace(); // print the stack trace } } }
If the file cannot be found, the exception is caught in the catch-block. In this example, the error handler simply prints the stack trace, which provides useful information for debugging. In some situations, you may need to perform some clean-up operations, or open another file instead. Take note that the main logic in the try-block is separated from the error handling codes in the catch-block.
Example 3: You decided not to handle the exception in the current method, but throw the exception up the call stack for the next higher-level method to handle.
import java.util.Scanner; import java.io.File; import java.io.FileNotFoundException; public class ScannerFromFileWithThrow { public static void main(String[] args) throws FileNotFoundException { // to be handled by next higher-level method Scanner in = new Scanner(new File("test.in")); // this method may throw FileNotFoundException // main logic here ... } }
In this example, you decided not to handle the FileNotFoundException
thrown by the Scanner(File)
method (with try-catch
). Instead, the caller of Scanner(File)
- the main()
method - declares in its signature "throws FileNotFoundException
", which means that this exception will be thrown up the call stack, for the next higher-level method to handle. In this case, the next higher-level method of main()
is the JVM, which simply terminates the program and prints the stack trace.
Point 3: Main logic is separated from the exception handling codes
As shown in Example 2, the main logic is contained in the try-block, while the exception handling codes are kept in the catch-block(s) separated from the main logic. This greatly improves the readability of the program.
For example, a Java program for file processing could be as follows:
try { // Main logic here open file; process file; ...... } catch (FileNotFoundException ex) { // Exception handlers below // Exception handler for "file not found" } catch (IOException ex) { // Exception handler for "IO errors" } finally { close file; // always try to close the file }
Method Call Stack
A typical application involves many levels of method calls, which is managed by a so-called method call stack. A stack is a last-in-first-out queue. In the following example, main()
method invokes methodA()
; methodA()
calls methodB()
; methodB()
calls methodC()
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
public class MethodCallStackDemo { public static void main(String[] args) { System.out.println("Enter main()"); methodA(); System.out.println("Exit main()"); } public static void methodA() { System.out.println("Enter methodA()"); methodB(); System.out.println("Exit methodA()"); } public static void methodB() { System.out.println("Enter methodB()"); methodC(); System.out.println("Exit methodB()"); } public static void methodC() { System.out.println("Enter methodC()"); System.out.println("Exit methodC()"); } } |
Enter main() Enter methodA() Enter methodB() Enter methodC() Exit methodC() Exit methodB() Exit methodA() Exit main()
As seen from the output, the sequence of events is:
- JVM invoke the
main()
. main()
pushed onto call stack, before invokingmethodA()
.methodA()
pushed onto call stack, before invokingmethodB()
.methodB()
pushed onto call stack, before invokingmethodC()
.methodC()
completes.methodB()
popped out from call stack and completes.methodA()
popped out from the call stack and completes.main()
popped out from the call stack and completes. Program exits.
suppose that we modify methodC()
to carry out a "divide-by-0" operation, which triggers a ArithmeticException
:
public static void methodC() {
System.out.println("Enter methodC()");
System.out.println(1 / 0); // divide-by-0 triggers an ArithmeticException
System.out.println("Exit methodC()");
}
The exception message clearly shows the method call stack trace with the relevant statement line numbers:
Enter main() Enter methodA() Enter methodB() Enter methodC() Exception in thread "main" java.lang.ArithmeticException: / by zero at MethodCallStackDemo.methodC(MethodCallStackDemo.java:22) at MethodCallStackDemo.methodB(MethodCallStackDemo.java:16) at MethodCallStackDemo.methodA(MethodCallStackDemo.java:10) at MethodCallStackDemo.main(MethodCallStackDemo.java:4)
MethodC()
triggers an ArithmeticException
. As it does not handle this exception, it popped off from the call stack immediately. MethodB()
also does not handle this exception and popped off the call stack. So does methodA()
and main()
method. The main()
method passes back to JVM, which abruptly terminates the program and print the call stack trace, as shown.
Exception & Call Stack
When an exception occurs inside a Java method, the method creates an Exception
object and passes the Exception
object to the JVM (in Java term, the method "throw
" an Exception
). The Exception
object contains the type of the exception, and the state of the program when the exception occurs. The JVM is responsible for finding an exception handler to process the Exception
object. It searches backward through the call stack until it finds a matching exception handler for that particular class of Exception
object (in Java term, it is called "catch
" the Exception
). If the JVM cannot find a matching exception handler in all the methods in the call stack, it terminates the program.
This process is illustrated as follows. Suppose that methodD()
encounters an abnormal condition and throws a XxxException
to the JVM. The JVM searches backward through the call stack for a matching exception handler. It finds methodA()
having a XxxException
handler and passes the exception object to the handler. Notice that methodC()
and methodB()
are required to declare "throws XxxException"
in their method signatures in order to compile the program.
Exception Classes - Throwable, Error, Exception & RuntimeException
The figure below shows the hierarchy of the Exception
classes. The base class for all Exception
objects is java.lang.Throwable
, together with its two subclasses java.lang.Exception
and java.lang.Error
.
- The
Error
class describes internal system errors (e.g.,VirtualMachineError
,LinkageError
) that rarely occur. If such an error occurs, there is little that you can do and the program will be terminated by the Java runtime. - The
Exception
class describes the error caused by your program (e.g.FileNotFoundException
,IOException
). These errors could be caught and handled by your program (e.g., perform an alternate action or do a graceful exit by closing all the files, network and database connections).
Checked vs. Unchecked Exceptions
As illustrated, the subclasses of Error
and RuntimeException
are known as unchecked exceptions. These exceptions are not checked by the compiler, and hence, need not be caught or declared to be thrown in your program. This is because there is not much you can do with these exceptions. For example, a "divide by 0" triggers an ArithmeticException
, array index out-of-bound triggers an ArrayIndexOutOfBoundException,
which are really programming logical errors that shall be been fixed in compiled-time, rather than leaving it to runtime exception handling.
All the other exception are called checked exceptions. They are checked by the compiler and must be caught or declared to be thrown.
Exception Handling Operations
Five keywords are used in exception handling: try
, catch
, finally
, throws
and throw
(take note that there is a difference between throw
and throws
).
Java’s exception handling consists of three operations:
- Declaring exceptions;
- Throwing an exception; and
- Catching an exception.
Declaring Exceptions
A Java method must declare in its signature the types of checked exception it may "throw" from its body, via the keyword "throws".
For example, suppose that methodD()
is defined as follows:
public void methodD() throws XxxException, YyyException { // method body throw XxxException and YyyException }
The method's signature indicates that running methodD()
may encounter two checked exceptions: XxxException
and YyyException
. In other words, some of the abnormal conditions inside methodD()
may trigger XxxException
or YyyException
.
Exceptions belonging to Error
, RuntimeException
and their subclasses need not be declared. These exceptions are called unchecked exceptions because they are not checked by the compiler.
Throwing an Exception
When a Java operation encounters an abnormal situation, the method containing the erroneous statement shall create an appropriate Exception
object and throw it to the Java runtime via the statement "throw XxxException
". For example,
public void methodD() throws XxxException, YyyException { // method's signature // method's body ... ... // XxxException occurs if ( ... ) throw new XxxException(...); // construct an XxxException object and throw to JVM ... // YyyException occurs if ( ... ) throw new YyyException(...); // construct an YyyException object and throw to JVM ... }
Note that the keyword to declare exception in the method's signature is "throws
" and the keyword to throw an exception object within the method's body is "throw
".
Catching an Exception
When a method throws an exception, the JVM searches backward through the call stack for a matching exception handler. Each exception handler can handle one particular class of exception. An exception handler handles a specific class can also handle its subclasses. If no exception handler is found in the call stack, the program terminates.
For example, suppose methodD()
declares that it may throw XxxException
and YyyException
in its signature, as follows:
public void methodD() throws XxxException, YyyException { ...... }
To use methodD()
in your program (says in methodC()
), you can either:
- Wrap the call of
methodD()
inside a try-catch (or try-catch-finally) as follows. Each catch-block can contain an exception handler for one type of exception.public void methodC() { // no exception declared ...... try { ...... // uses methodD() which declares XxxException & YyyException methodD(); ...... } catch (XxxException ex) { // Exception handler for XxxException ...... } catch (YyyException ex} { // Exception handler for YyyException ...... } finally { // optional // These codes always run, used for cleaning up ...... } ...... }
- Suppose that
methodC()
who callsmethodD()
does not wish to handle the exceptions (via a try-catch), it can declare these exceptions to be thrown up the call stack in its signature as follows:public void methodC() throws XxxException, YyyException { // for next higher-level method to handle ... // uses methodD() which declares "throws XxxException, YyyException" methodD(); // no need for try-catch ... }
In this case, if aXxxException
orYyyException
is thrown bymethodD()
, JVM will terminatemethodD()
as well asmethodC()
and pass the exception object up the call stack to the caller ofmethodC()
.
try-catch-finally
The syntax of try-catch-finally is:
try { // main logic, uses methods that may throw Exceptions ...... } catch (Exception1 ex) { // error handler for Exception1 ...... } catch (Exception2 ex) { // error handler for Exception1 ...... } finally { // finally is optional // clean up codes, always executed regardless of exceptions ...... }
If no exception occurs during the running of the try-block, all the catch-blocks are skipped, and finally-block will be executed after the try-block. If one of the statements in the try-block throws an exception, the Java runtime ignores the rest of the statements in the try-block, and begins searching for a matching exception handler. It matches the exception type with each of the catch-blocks sequentially. If a catch-block catches that exception class or catches a superclass of that exception, the statement in that catch-block will be executed. The statements in the finally-block are then executed after that catch-block. The program continues into the next statement after the try-catch-finally, unless it is pre-maturely terminated or branch-out.
If none of thecatch
-block matches, the exception will be passed up the call stack. The current method executes the finally
clause (if any) and popped off the call stack. The caller follows the same procedures to handle the exception.
The finally
block is almost certain to be executed, regardless of whether or not exception occurs (unless JVM encountered a severe error or a System.exit()
is called in the catch
block).
Example 1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import java.util.Scanner; import java.io.File; import java.io.FileNotFoundException; public class TryCatchFinally { public static void main(String[] args) { try { // main logic System.out.println("Start of the main logic"); System.out.println("Try opening a file ..."); Scanner in = new Scanner(new File("test.in")); System.out.println("File Found, processing the file ..."); System.out.println("End of the main logic"); } catch (FileNotFoundException ex) { // error handling separated from the main logic System.out.println("File Not Found caught ..."); } finally { // always run regardless of exception status System.out.println("finally-block runs regardless of the state of exception"); } // after the try-catch-finally System.out.println("After try-catch-finally, life goes on..."); } } |
This is the output when the FileNotFoundException
triggered:
Start of the main logic Try opening a file ... File Not Found caught ... finally-block runs regardless of the state of exception After try-catch-finally, life goes on...
This is the output when no exception triggered:
Start of the main logic Try opening a file ... File Found, processing the file ... End of the main logic finally-block runs regardless of the state of exception After try-catch-finally, life goes on...
Example 2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
public class MethodCallStackDemo { public static void main(String[] args) { System.out.println("Enter main()"); methodA(); System.out.println("Exit main()"); } public static void methodA() { System.out.println("Enter methodA()"); try { System.out.println(1 / 0); // A divide-by-0 triggers an ArithmeticException - an unchecked exception // This method does not catch ArithmeticException // It runs the "finally" and popped off the call stack } finally { System.out.println("finally in methodA()"); } System.out.println("Exit methodA()"); } } |
Enter main() Enter methodA() finally in methodA() Exception in thread "main" java.lang.ArithmeticException: / by zero at MethodCallStackDemo.methodA(MethodCallStackDemo.java:11) at MethodCallStackDemo.main(MethodCallStackDemo.java:4)
try-catch-finally
- A try-block must be accompanied by at least one catch-block or a finally-block.
- You can have multiple catch-blocks. Each catch-block catches only one type of exception.
- A catch block requires one argument, which is a
throwable
object (i.e., a subclass ofjava.lang.Throwable
), as follows:catch (AThrowableSubClass aThrowableObject) { // exception handling codes }
- You can use the following methods to retrieve the type of the exception and the state of the program from the
Throwable
object:printStackTrace()
: Prints thisThrowable
and its call stack trace to the standard error streamSystem.err
. The first line of the outputs contains the result oftoString()
, and the remaining lines are the stack trace. This is the most common handler, if there is nothing better that you can do. For example,try { Scanner in = new Scanner(new File("test.in")); // process the file here ...... } catch (FileNotFoundException ex) { ex.printStackTrace(); }
You can also useprintStackTrace(PrintStream s)
orprintStackTrace(PrintWriter s)
.getMessage()
: Returns themessage
specified if the object is constructed using constructorThrowable(String message)
.toString()
: Returns a short description of thisThrowable
object, consists of the name of the class, a colon':'
, and a message fromgetMessage()
.
- A catch block catching a specific exception class can also catch its subclasses. Hence,
catch(Exception ex) {...}
catches all kinds of exceptions. However, this is not a good practice as the exception handler that is too general may unintentionally catches some subclasses' exceptions it does not intend to. - The order of catch-blocks is important. A subclass must be caught (and placed in front) before its superclass. Otherwise, you receive a compilation error "exception
XxxException
has already been caught". - The finally-block is meant for cleanup code such as closing the file, database connection regardless of whether the try block succeeds. The finally block is always executed (unless the catch-block pre-maturely terminated the current method).
What if I really don't care about the exceptions
Certainly not advisable other than writing toy programs. But to bypass the compilation error messages triggered by methods declaring unchecked exceptions, you could declare "throws Exception
" in your main()
(and other methods), as follows:
public static void main(String[] args) throws Exception { // throws all subclass of Exception to JRE Scanner in = new Scanner(new File("test.in")); // declares "throws FileNotFoundException" ...... // other exceptions }
Overriding and Overloading Methods
An overriding method must have the same argument list and return-type (or subclass of its original from JDK 1.5). An overloading method must have different argument list, but it can have any return-type.
An overriding method cannot have more restricted access. For example, a method with protected
access may be overridden to have protected or public access but not private
or default access. This is because an overridden method is considered to be a replacement of its original, hence, it cannot be more restrictive.
An overriding method cannot declare exception types that were not declared in its original. However, it may declare exception types are the same as, or subclass of its original. It needs not declare all the exceptions as its original. It can throw fewer exceptions than the original, but not more.
An overloading method must be differentiated by its argument list. It cannot be differentiated by the return-type, the exceptions, and the modifier, which is illegal. It can have any return-type, access modifier, and exceptions, as long as it can be differentiated by the argument list.
Common Exception Classes
ArrayIndexOutOfBoundsException: thrown by JVM when your code uses an array index, which is is outside the array's bounds. For example,
int[] anArray = new int[3]; System.out.println(anArray[3]);
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3
NullPointerException: thrown by the JVM when your code attempts to use a null reference where an object reference is required. For example,
String[] strs = new String[3]; System.out.println(strs[0].length());
Exception in thread "main" java.lang.NullPointerException
NumberFormatException: Thrown programmatically (e.g., by Integer.parseInt()
) when an attempt is made to convert a string to a numeric type, but the string does not have the appropriate format. For example,
Integer.parseInt("abc");
Exception in thread "main" java.lang.NumberFormatException: For input string: "abc"
ClassCastException: thrown by JVM when an attempt is made to cast an object reference fails. For example,
Object o = new Object(); Integer i = (Integer)o;
Exception in thread "main" java.lang.ClassCastException: java.lang.Object cannot be cast to java.lang.Integer
IllegalArgumentException: thrown programmatically to indicate that a method has been passed an illegal or inappropriate argument. You could re-use this exception for your own methods.
IllegalStateException: thrown programmatically when a method is invoked and the program is not in an appropriate state for that method to perform its task. This typically happens when a method is invoked out of sequence, or perhaps a method is only allowed to be invoked once and an attempt is made to invoke it again.
NoClassDefFoundError: thrown by the JVM or class loader when the definition of a class cannot be found. Prior to JDK 1.7, you will see this exception call stack trace if you try to run a non-existent class. JDK 1.7 simplifies the error message to "Error: Could not find or load main class xxx".
Creating Your Own Exception Classes
You should try to reuse the Exception
classes provided in the JDK, e.g., IndexOutOfBoundException
, ArithmeticException
, IOException
, and IllegalArugmentException
. But you can always create you own Exception
classes by extending from the class Exception
or one of its subclasses.
Note that RuntimeException
and its subclasses are not checked by the compiler and need not be declared in the method's signature. Therefore, use them with care, as you will not be informed and may not be aware of the exceptions that may occur by using that method (and therefore do not have the proper exception handling codes) – a bad software engineering practice.
Example
1 2 3 4 5 6 |
// Create our own exception class by subclassing Exception. This is a checked exception public class MyMagicException extends Exception { public MyMagicException(String message) { //constructor super(message); } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
public class MyMagicExceptionTest { // This method "throw MyMagicException" in its body. // MyMagicException is checked and need to be declared in the method's signature public static void magic(int number) throws MyMagicException { if (number == 8) { throw (new MyMagicException("you hit the magic number")); } System.out.println("hello"); // skip if exception triggered } public static void main(String[] args) { try { magic(9); // does not trigger exception magic(8); // trigger exception } catch (MyMagicException ex) { // exception handler ex.printStackTrace(); } } } |
The output is as follows:
hello MyMagicException: you hit the magic number at MyMagicExceptionTest.magic(MyMagicExceptionTest.java:6) at MyMagicExceptionTest.main(MyMagicExceptionTest.java:14)
Assertion (JDK 1.4)
JDK 1.4 introduced a new keyword called assert
, to support the so-called assertion feature. Assertion enables you to test your assumptions about your program logic (such as pre-conditions, post-conditions, and invariants). Each assertion contains a boolean expression that you believe will be true when the program executes. If it is not true, the JVM will throw an AssertionError
. This error signals you that you have an invalid assumption that needs to be fixed. Assertion is much better than using if-else statements, as it serves as proper documentation on your assumptions, and it does not carry performance liability in the production environment (to be discussed later).
The assert
statement has two forms:
assert booleanExpr; assert booleanExpr : errorMessageExpr;
When the runtime execute the assertion, it first evaluates the booleanExpr
. If the value is true
, nothing happens. If it is false
, the runtime throws an AssertionError
, using the no-argument constructor (in the first form) or errorMessageExpr
as the argument to the constructor (in the second form). If an object is passed as the errorMessageExpr
, the object's toString()
will be called to obtain the message string.
Assertion is useful in detecting bugs. It also serves to document the inner workings of you program (e.g., pre-conditions and post-conditions) and enhances the maintainability.
One good candidate for assertion is the switch-case statement where the programmer believes that one of the cases will be selected, and the default-case is not plausible. For example,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
public class AssertionSwitchTest { public static void main(String[] args) { char operator = '%'; // assumed either '+', '-', '*', '/' only int operand1 = 5, operand2 = 6, result = 0; switch (operator) { case '+': result = operand1 + operand2; break; case '-': result = operand1 - operand2; break; case '*': result = operand1 * operand2; break; case '/': result = operand1 / operand2; break; default: assert false : "Unknown operator: " + operator; // not plausible here } System.out.println(operand1 + " " + operator + " " + operand2 + " = " + result); } } |
Assertion, by default, are disabled to ensure that they are not a performance liability in the production environment. To enable assertion, use the runtime command-line option –enableassertions
(or –ea
).
In the above example, "assert false
" always triggers an AssertionError
. However, the output is different, depending on whether assertion is enabled or disabled.
> javac AssertionSwitchTest.java // no option needed to compile > java -ea AssertionSwitchTest // enable assertion
Exception in thread "main" java.lang.AssertionError: % at AssertionSwitchTest.main(AssertionSwitchTest.java:11)
> java AssertionSwitchTest // assertion disable by default
5 % 6 = 0
In the above example, since the "assert false
" always triggers an AssertionError
, you could choose to throw
an AssertionError
. "throw
" is always enabled during runtime.
default: throw new AssertionError("Unknown operator: " + operator);
Another usage of assertion is to assert "internal invariants". In other words, to assert the possible values of an internal variable. For example,
1 2 3 4 5 6 7 8 9 |
public class AssertionTest { public static void main(String[] args) { int number = -5; // assumed number is not negative // This assert also serve as documentation assert (number >= 0) : "number is negative: " + number; // do something System.out.println("The number is " + number); } } |
> java -ea AssertionSwitchTest // enable assertion
Exception in thread "main" java.lang.AssertionError: -5 at AssertionTest.main(AssertionTest.java:5)
Assertion can be used for verifying:
- Internal Invariants: Assert that a value is within a certain constraint, e.g.,
assert x > 0
. - Class Invariants: Assert that an object's state is within a constraint. What must be true about each instance of a class before or after the execution of a method? Class invariants are typically verified via
private boolean
method, e.g., anisValid()
method to check if aCircle
object has a positive radius. - Control-Flow Invariants: Assert that a certain location will not be reached. For example, the
default
clause of aswitch-case
statement. - Pre-conditions of methods: What must be true when a method is invoked? Typically expressed in terms of the method's arguments or the states of its objects.
- Post-conditions of methods: What must be true after a method completes successfully?
Pre-conditions of public methods
Assertion should not be used to check the validity of the arguments (pre-condition) passed into "public" method. It is because public
methods are exposed and anyone could call this method with an invalid argument. Instead, use a if
statement to check the argument and throw an IllegalArgumentException
otherwise. On the other hand, private
methods are under your sole control and it is appropriate to assert the pre-conditions. For example,
// Constructor of Time class
public Time(int hour, int minute, int second) {
if(hour < 0 || hour > 23 || minute < 0 || minute > 59 || second < 0 || second > 59) {
throw new IllegalArgumentException();
}
this.hour = hour;
this.minute = minute;
this.second = second;
}
Example
[TODO] Example on pre-condition (private method), post-condition, and class invariant.
LINK TO JAVA REFERENCES & RESOURCES


#include <parameter.hpp>
Public Types | |
| typedef boost::signals2::signal< void(const Arg &) > | sig_with_value_type |
Public Member Functions | |
| arg_holder (void(*fn)(const Arg &)) | |
| Overloaded ctor for register global function with argument. | |
| template<typename Object> | |
| arg_holder (Object *obj, void(Object::*fn)(const Arg &)) | |
| Overloaded ctor for register member-function with argument. | |
| arg_holder (void(*fn)(Arg)) | |
| Overloaded ctor for register global function with argument. Used for POD-type argument (int, double, etc). | |
| template<typename Object> | |
| arg_holder (Object *obj, void(Object::*fn)(Arg)) | |
| Overloaded ctor for register member-function with argument. Used for POD-type argument (int, double, etc). | |
Data Fields | |
| sig_with_value_type | sig_with_value |
| Signal for callback correspond function. Must be used for parameters with value. | |
| Arg | def_value |
| Default parameter's value. |
Definition at line 60 of file parameter.hpp.
| typedef boost::signals2::signal< void ( const Arg& ) > clp_parser::detail::arg_holder< Arg >::sig_with_value_type |
Definition at line 62 of file parameter.hpp.
| clp_parser::detail::arg_holder< Arg >::arg_holder | ( | void(*)(const Arg &) | fn | ) | [inline, explicit] |
Overloaded ctor for register global function with argument.
| fn | Pointer on function. |
Definition at line 66 of file parameter.hpp.
| clp_parser::detail::arg_holder< Arg >::arg_holder | ( | Object * | obj, | |
| void(Object::*)(const Arg &) | fn | |||
| ) | [inline, explicit] |
Overloaded ctor for register member-function with argument.
| obj | Pointer on object. | |
| fn | Pointer on member-function. |
Definition at line 74 of file parameter.hpp.
| clp_parser::detail::arg_holder< Arg >::arg_holder | ( | void(*)(Arg) | fn | ) | [inline, explicit] |
Overloaded ctor for register global function with argument. Used for POD-type argument (int, double, etc).
| fn | Pointer on function. |
Definition at line 82 of file parameter.hpp.
| clp_parser::detail::arg_holder< Arg >::arg_holder | ( | Object * | obj, | |
| void(Object::*)(Arg) | fn | |||
| ) | [inline, explicit] |
Overloaded ctor for register member-function with argument. Used for POD-type argument (int, double, etc).
| obj | Pointer on object. | |
| fn | Pointer on member-function. |
Definition at line 91 of file parameter.hpp.
| sig_with_value_type clp_parser::detail::arg_holder< Arg >::sig_with_value |
Signal for callback correspond function. Must be used for parameters with value.
Definition at line 98 of file parameter.hpp.
| Arg clp_parser::detail::arg_holder< Arg >::def_value |


{% extends "base.html" %} {% block title %}How much did you miss out on?{% endblock %} {% block content %}
* Does not account for dividends.
${{initial_investment}} in {{ticker}} on {{month}}/{{day}}/{{year}} is now worth ${{future_value}}
{% endblock %}


public class SpreadsheetReaderService
extends java.lang.Object
| Constructor and Description |
|---|
SpreadsheetReaderService() |
| Modifier and Type | Method and Description |
|---|---|
int |
getColumns()
Get the amount of columns for the loaded spreadsheet.
|
int |
getIndexForColumnName(java.lang.String columnName)
Get the matrix column index for the given column name.
|
int |
getLines()
Get the amount of lines for the loaded spreadsheet.
|
java.util.List<java.lang.String> |
getSpreadsheetColumnNames()
Get the name of the columns of the loaded spreadsheet.
|
java.lang.String[][] |
getSpreadsheetContent()
Get the content of the loaded spreadsheet.
|
static SpreadsheetReaderService |
getSpreadsheetReaderService() |
SpreadsheetSplitter |
getSpreadsheetSplitterForCharacter(char character)
Get the splitter identified by the given character.
|
SpreadsheetSplitter |
getSpreadsheetSplitterForCharacter(java.lang.String character)
Get the splitter identified by the given character.
|
void |
loadSpreadsheet(java.lang.String filePath,
SpreadsheetSplitter splitter)
Read the spreadsheet at the given path and load the data.
|
public static SpreadsheetReaderService getSpreadsheetReaderService()
public SpreadsheetSplitter getSpreadsheetSplitterForCharacter(char character)
character
- The character with which to identify the splitter.public SpreadsheetSplitter getSpreadsheetSplitterForCharacter(java.lang.String character)
character
- The character with which to identify the splitter.public void loadSpreadsheet(java.lang.String filePath, SpreadsheetSplitter splitter)
getSpreadsheetContent()
.filePath
- The path of the file to read. This parameter can either be a
relative path or a full path.splitter
- The splitter with which to identify the columns in the filepublic java.util.List<java.lang.String> getSpreadsheetColumnNames()
loadSpreadsheet(String, SpreadsheetSplitter)
before calling this
method.public java.lang.String[][] getSpreadsheetContent()
loadSpreadsheet(String, SpreadsheetSplitter)
before calling this
method.public int getIndexForColumnName(java.lang.String columnName)
loadSpreadsheet(String, SpreadsheetSplitter)
before calling this
method.columnName
- The name of the column for which to get the indexpublic int getLines()
loadSpreadsheet(String, SpreadsheetSplitter)
before calling this
method.public int getColumns()
loadSpreadsheet(String, SpreadsheetSplitter)
before calling this
method.


Self confidence
What is the relationship between mindfulness and self awareness?
Self-awareness: is being able to look at your emotions in a neutral way even in the midst of emotionally challenging situations.
Mindfulness: is being able to focus your attention on a particular purpose or moment in time neutrally and simply observe.
These two things are very closely related if not one and the same. Being mindful and self aware will lead to a more accurate self-assessment and that in turn will lead to more self-confidence, so we can take life in our stride!.
Body scan
Body scan is a technique where you sit or lie comfortably and then focus on each part of your body and observe any problems or are simply aware of them. Start from the top of your head and work your way down, giving yourself time for each part. This technique can last from a few minutes to quite a long time. You decide!
When trying this technique I found it incredible how by just giving a body part our full attention for a few moments that part of the body became so relaxed and that a lot of tensions we build up during the day can simply be relieved. It is an easy exercise that I'd recommend anyone to try!
My emotions are not me...
In everyday life, it is so easy to lose yourself in your emotions and let yourself be carried by them. BUT: we are not our emotions!
With enough mindfulness practice, we will hopefully experience a very important shift towards being able to look at our emotions in a more objective way and understanding that we are in control of them rather than the opposite way round. Just like clouds in the sky, our emotions are a phenomena in our mind and body that simply come and go.


88rising
-
Walking (feat. Swae Lee & Major Lazer)
(Swae Lee) Ooh oh-oh, ooh oh-oh, ooh-oh-oh-ohh What it’s gon’ take (take) What it’s gon’ take to make you shake your wor...  Actin’ like that sh*t gone solve your problems These bad bi**hes ain’t lo... -
History
作曲 : Rich Brian 作词 : Rich Brian We got history Got me feelin’ the nostalgia when you look at me Thinking ‘bout what co... -
Breathe
You found the best of me inside your feelings The worst of me was waiting for that evening It’s just me these days I can... -
Need Is Your Love
(JojI): All my nights are long girl That’s why im alone girl Everytime we touch it’s like the very first time All I need... -
Head In The Clouds
[by:Trap_Girl] 作曲 : joji/ AUGUST 08/ Jordan Ware/ Avalos Jason Elmer/ Maurice Powell 作词 : Joji/AUGUST 08/Jordan Ware/A... -
La Cienega
[by:Trap_Girl] 作曲 : joji/NIKI/AUGUST 08 作词 : joji/NIKI/AUGUST 08 Empty bottles on the floor Party’s over, thank the Lo... -
Poolside Manor
[by:立酱] 作曲 : AUGUST 08/NIKI/Rashad Muhammad/Adam King Feeney/Deanna Stewart 作词 : AUGUST 08/NIKI/Adam King Feeney/Deann... -
Tequila Sunrise (feat. AUGUST 08 & GoldLink)
(AUGUST 08) I don't feel like arguin' tonight with you, with you Just wanna be the best that I can be for you Drinkin' t... -
I Love You 3000 II
(Stephanie Poetri) Baby, take my hand I want you to be my best friend Cause you're my Iron Man And I love you three thou... -
History
作曲 : Rich Brian 作词 : Rich Brian We got history Got me feelin’ the nostalgia when you look at me Thinking ‘bout what co... -
These Nights
(Rich Brian) She tell me settle down, what does it all mean anything you want, baby give it all to me I can be your baby... -
2 The Face
(Rich Brian) Up in the club takin’ shots to the face Toast to the fact that we living better days I got tears of joy, I ... -
These Nights
作曲 : Brian Imanuel/Montana/Wayne Best/McCulloch Sutphin/Jordan Orvosh/Stephen Langer/Kim Chung-ha 作词 : Brian Imanuel/M...  -
Midsummer Madness
作曲 : AUGUST 08/Rich Brian/Joji/Higher Brothers/Maurice Powell 作词 : AUGUST 08/Rich Brian/Joji/Higher Brothers/Maurice P... -
Hopscotch (feat. Barney Bones & Rich Brian)
(Intro) Midnight Mafia (Chorus - AUGUST 08) Hopscotch, shorty jumpin’ outta cool whip Hopscotch, shorty jumpin’ outta co... -
History (Kid Travis Cover)
[by:Trap_Girl] We got history Got me feeling the nostalgia When you look at me Thinking 'bout what could've happened Or ... -
Midsummer Madness(Howie X Remix)
当光洒进了 white Porsche 作曲 : Howie X 作词 : AUGUST 08/joji/Higher Brothers/Rich Brian Make it make sense Make it make sense,... -
Midsummer Madness
[by:Trap_Girl] Rules-oh-oh-oh-oh All these blurry nights feel the same to me 作曲 : AUGUST 08/ Rich Brian/ Joji/ Higher B... -
Disrespectin
作曲 : Rich Brian/ Higher Brothers/ AUGUST 08 作词 : Rich Brian/Higher Brothers/AUGUST 08 Diamonds stay: 'Disrespectin' (d... -
Peach Jam
作曲 : BlocBoy JB/AUGUST 08 作词 : AUGUST 08/BlocBoy JB Ayyy Yaaaa As fresh as the breeze and The dew in the morning Ayyy ... -
Calculator
(Chorus - AUGUST 08) Sh*t’s not adding up I think my calculator’s broken I’m not meant for love I’m not meant for love S... -
I Want In
[by:Trap_Girl] 作曲 : AUGUST 08/ NIKI/ Monique Proctor 作词 : AUGUST 08/NIKI/Monique Proctor Tryna be with you is crazy Yo... -
Japan 88
[by:立酱] 作曲 : Famous Dex/ Keith Ape/ VERBAL 作词 : Famous Dex/Keith Ape/VERBAL You know what I'm sayin' I just- that's ju... -
Strange Land
(NIKI): Here for the nosedive Whatever you need And I’m saving all the bold lines I’ll say em while you sleep You’re sle... -
Hold Me Down
(Melo) 我不再喜欢买下diamond and gold 我不再关心今年春天播种秋天带来多少收成 我此时此刻只想猛地踩下油门 风吹地头疼you bring me from Dallas to Houston 你是我最平静的港湾 跨过大西... -
Indigo
VERSE 1 You know I’m your type, right?  -
Indigo
作曲 : Nicole Zefanya/Rogét Chahayed/Wes Singerman/Taylor Dexter 作词 : Nicole Zefanya/Rogét Chahayed/Wes Singerman/Taylor... -
La La Lost You
While I’m on Sunset are you on the subway While I drive are you gettin’ on the L-train I mean, Manhattan’s nice, but so... -
Just Used Music Again
I just used music again I just forgot oh Bout direction I was driving Wall in the distance So, Another brick to hit the ... -
Let It Go
[by:立酱] 作曲 : Higher Brothers/Blocboy JB/Falcons 作词 : Higher Brothers/Blocboy JB Blocboy **： What's that in your hand b... -
Breathe
作曲 : George Miller/Christian Dold/Curt Cameruci/Christopher van den Hoef 作词 : George Miller/Christian Dold/Curt Cameru... -
Just Used Music Again
作曲 : Shinichi Osawa/Rhyme Michaelson-Lara 作词 : Shinichi Osawa/Rhyme Michaelson-Lara I just forgot oh Bout direction I ... -
Warpaint
[by:Trap_Girl] 作曲 : Bram Inscore/Ainslie Wills/Jessica Nitties 作词 : Bram Inscore/Ainslie Wills/Jessica Nitties Everyti... -
Midsummer Madness (KRANE Remix)
作曲 : AUGUST 08/Rich Brian/Joji/Higher Brothers/Maurice Powell 作词 : AUGUST 08/Rich Brian/Joji/Higher Brothers/Maurice P... -
Warpaint
[by:Trap_Girl] 作曲 : Bram Inscore/ Ainslie Wills/ Jessica Nitties 作词 : Bram Inscore/ Ainslie Wills/ Jessica Nitties Eve... -
Plans
作曲 : NIKI/ Tavoris Hollins Jr. / Karl Rubin/ Jahphet Landis / AUGUST 08 作词 : NIKI/AUGUST 08/Tavoris Hollins Jr./Karl R... -
Let It Go
作曲 : Higher Brothers/ Blocboy JB/ Falcons 作词 : Higher Brothers/ Blocboy JB Blocboy **： What's that in your hand boy, l... -
88rising-Midsummer Madness（跳跳堂 / 88rising remix）
作曲 : 跳跳堂/88rising 作词 : 88rising Last night I lost all my patience 昨夜我失去所有耐心 You were fnxked up, I was wasted 你一团糟，我筋疲力... -
History (Robotaki Remix)
作曲 : Rich Brian 作词 : Rich Brian We got history Got me feelin’ the nostalgia when you look at me Thinking ‘bout what co... -
Warpaint (Henry Fong Remix)
作曲 : Bram Inscore/Ainslie Wills/Jessica Nitties 作词 : Bram Inscore/Ainslie Wills/Jessica Nitties Everytime I turn my he... -
Let It Go (MEMBA Remix)
作曲 : Michael Graham Oatman/Higher Brothers/BlocBoy JB 作词 : Michael Graham Oatman/Higher Brothers/BlocBoy JB Blocboy JB... -
Lover Boy 88
作曲 : Phum Viphurit/ Higher Brothers 作词 : Higher Brothers [马思唯]成都in da house 南京也in da house LA in da house and Boston i... -
Peach Jam
作曲 : BlocBoy JB/ AUGUST 08 作词 : AUGUST 08/ BlocBoy JB Ayyy Yaaaa As fresh as the breeze and The dew in the morning Ayy...


Some Ranadu functions provide information about the data set. A good
starting point is DataFileInfo(), discussed in the previous chapter.
In addition, these functions may be helpful:
- Ranadu::getAttributes(): The data.frames produced
by getNetCDF() have assigned attributes that match those in the original
netCDF file, and these can be retrieved via getAttributes(), where
the argument can be either the data.frame (for which the returned
attributes are those associated with the data file) or a variable
name (for which the attributes are those associated with the variable).3.1 The result of the function call is a printed listing of attributes
and creation of a list (here in Z) that contains the attributes, so
it is usually preferable to assign the returned value to something
to avoid the double listing that would be produced otherwise.
- Ranadu::TellAbout() provides some information
about the characteristics of a data.frame or a variable in the data.frame.
- Ranadu::getStartEnd() returns the start
and end times of a data frame.
- Ranadu::ValueOf() and Ranadu::ValueOfAll()
for a specified time return the value of a specified variable or
of all variables, respectively.
The standard R routines “dim()”, “names()” and “str()”
will also provide information about a data.frame or a variable.


--- layout: post title: Creating videos for Android devices date: 2011-04-05 12:00:00 permalink: /2011/04/Creating-videos-for-Android-devices categories: [android] tags: [tips, video] ---
Encoding the perfect video for mobile devices is always hard: you want a small sized file, with high quality, and a codec which will work on all devices, no matter how fragmented the platform is.
Android supports a very nice set of video and audio formats. We see that support for H264 and AAC is available in all Android versions, but with some limitations: H264 is only supported in baseline profile and AAC is supported in MP4 container, and while testing we encountered some more limitations, like inability to play DCT-DECIMATTION encoded files.
I want to share the FFMpeg encoding configuration which worked for us.
We used H264, 20fps, 200kbps baseline profile, and AAC single channel 32kbps. 2 passes encoding was used.
FFMpeg supports preset files to help removing the endless flags from the command line:
First pass preset file (named 'libx264-android_firstpass.ffpreset')
coder=1
flags=+loop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partb8x8
me_method=dia
subq=2
me_range=16
g=250
keyint_min=25
sc_threshold=40
i_qfactor=0.71
b_strategy=1
qcomp=0.6
qmin=10
qmax=51
qdiff=4
bf=0
refs=1
directpred=1
trellis=0
flags2=-bpyramid-mixed_refs-wpred-dct8x8-fastpskip
wpredp=0
rc_lookahead=30
Second pass preset file (named 'libx264-android_baseline.ffpreset')
coder=0
flags=+loop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partb8x8
me_method=dia
subq=2
me_range=16
g=250
keyint_min=25
sc_threshold=40
i_qfactor=0.71
b_strategy=1
qcomp=0.6
qmin=10
qmax=51
qdiff=4
bf=0
refs=1
directpred=1
trellis=0
flags2=-bpyramid-mixed_refs-wpred-dct8x8-fastpskip
wpredp=0
rc_lookahead=30
From FFMpeg folder run the following command for the first pass:
bin\ffmpeg -i source_video_file.avi -vcodec libx264 -r 20 -s 320x240 -b 220k -bt 240k -pass 1 -fpre presets\libx264-android_firstpass.ffpreset -y -an NUL.mp4
For the second pass (and actual encoding):
bin\ffmpeg -i source_video_file.avi -strict experimental -acodec aac -ar 16000 -ab 32k -ac 1 -vcodec libx264 -r 20 -s 320x240 -b 220k -bt 240k -pass 2 -fpre presets\libx264-android_baseline.ffpreset -y target_video_file.mp4


Canada Free Press Privacy Policies
This statement may be updated from time-to-time and was last updated, April 5, 2019.
We at Canada Free Press are committed to protecting the privacy and confidentiality of your personal information.
Collection, use and disclosure of personal information by the Canada Free Press are governed by the Personal Information Protection and Electronic Documents Act and any applicable provincial legislation. That Privacy Code explains what personal information can be collected and how it can be used.
Personal information is any information about an identifiable individual. Personal information does not include the name, title, business address or telephone number of an employee of an organization.
Information used solely for journalistic, literary or artistic purposes is exempted from the Act as is demographic statistics about Free Press customers, number of visitors, and average time spent on the website.
Our web site does not collect "cookies" which are text files which are usually meant to store your personal preferences for particular web sites, such as language, favourite pages, etcetera. One exception to this is our Pulse Poll, which is provided by a third-party as an offsite service, which uses a cookie to prevent people from voting more than once.
We use third-party advertising companies to serve ads when you visit our Web site. These companies may use aggregated information (not including your name, address, email address or telephone number) about your visits to this and other Web sites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
We are not responsible for the policies of third-party websites we link to and those other sites may not be subject to a privacy code or the Act. Also, such links are not to be deemed as endorsements of those websites or of any products on those sites.
We will never sell or rent your personally identifiable information or a list of our customers to third parties.
Those who sign up for our update service can rest assured that your e-mail address is kept confidential and only used for the update mailings.
Other than the mailing list, or for journalist purposes, Canada Free Press shall limit its collection of personal information, to that which is collected by fair and lawful means necessary, such as banking details and credit history to assess the credit risk of advertisers and do maintain the right to pass on that information to credit bureaus and collection agencies in the case of outstanding accounts not paid.
If you have questions about this privacy policy or an inquiry about any information we may or do have on file please write to:
Privacy Officer
Canada Free Press


Seeking a challenging position in well-established company that offers professional growth and ample opportunity to learn and enrich my competencies in my profession.
percentage: 64
percentage: 75
percentage: 53
Description :
Design of Specific architecture for a given application is very much necessary to solve the present day complex problems. Low cost VLSI architectures are used to deal with these efforts. Since mobiles phones for used worldwide in large numbers, developing dedicated hardware on high volume products like these will benefit VLSI economically.Speech Processing is one of the complex DSP procedures in mobile phone since it involves; speech recognition, noise suppression, silence detection, pitch analysis and may more. VLSI programmable technologies, such as FPGA, which is recommended for low price VLSI, is used widely in market. In this paper we have developed one such application specific architecture for suppressing surrounding noise in the mobile communication.


US Census data from the 2013 American Community Survey aggregated to the zip code level.
The American Community Survey (ACS) is an ongoing survey that provides vital information on a yearly basis about our nation and its people. Information from the survey generates data that help determine how more than $400 billion in federal and state funds are distributed each year.
Through the ACS, we know more about jobs and occupations, educational attainment, veterans, whether people own or rent their home, and other topics. Public officials, planners, and entrepreneurs use this information to assess the past and plan the future.
Get Field Descriptions from this file.


| A Call To Praise |
| A Mighty Fortress Ab |
| A Mighty Fortress Bb |
| A Mighty Fortress C |
| A Mighty Fortress |
| Alive Forever Amen |
| All the Earth |
| All Things |
| Almighty F |
| Almighty |
| America the Beautiful |
| Ancient of Days |
| Anthem of Praise |
| Awesome In this Place E |
| Awesome In this Place |
| Backup Scores |
| Be Bold, Be Strong |
| Be Still My Soul |
| Be Strong in the Lord |
| Because He Lives |
| Bless His Holy Name |
| Bless the Lord O My Soul |
| Blessed Assurance Bb |
| Blessed Assurance |
| Born Is the King Its Christmas |
| Breathe On Me |
| Celebrate Jesus |
| Christ the Lord is Risen Today Traditional Piano Reduction |
| Christ the Lord is Risen Today Traditional |
| Christ the Lord is Risen Today |
| Come Christians Join to Sing |
| Come Thou Fount D |
| Come Thou Fount |
| Creation Sings |
| Days of Elijah G |
| Days of Elijah |
| Do You Hear What I Hear |
| Everlasting God Revised |
| Everlasting God |
| Example Scores.lnk |
| Faith of Our Fathers |
| Feels Like Redemption |
| Forever King |
| Friend of God |
| From the Inside Out |
| Get All Excited in G |
| Get All Excited |
| Glorious Day in C |
| Glorious Day |
| Glory All Glory |
| Glory to the Lord |
| God and God Alone |
| God Bless America |
| God Coming Down |
| God Lead the Dear Children Along |
| God Leads Us Along |
| God of Our Fathers Eb |
| God of Our Fathers F |
| Great and Mighty |
| Great is the Lord Bb |
| Great is the Lord |
| Great Is Thy Faithfulness |
| Greater Is He That Is in Me |
| Hallelujah to the Lamb |
| Hallelujah What a Savior |
| He Has Made Me Glad D |
| He Has Made Me Glad |
| He Is Lord |
| He Lives Chorus |
| He s My Son in F Piano Reduction |
| He s My Son in F |
| He s My Son |
| Heal the Wound Piano and Choir |
| Heal the Wound |
| His Name is Wonderful |
| Holy Ground |
| Holy Holy Holy D |
| Holy Holy Holy |
| HomeForChristmas2011 |
| Hosanna in the Highest |
| How Can I Keep from Singing |
| How Can I Kep from Singing |
| How Deep the Father s Love for Use |
| How Great Is Our God |
| How Great Thou Art |
| How Majestic is Your Name C |
| How Majestic is Your Name |
| How Many Lambs |
| I Can Pray |
| I Did Not Know the Man |
| I Give All to You |
| I Love to Praise Him |
| I Stand In Awe |
| I Will Bless Thee O Lord |
| I Will Celebrate |
| I Will Sing |
| I Willl Call Upon the Lord |
| I Worship You, Almighty God |
| In Christ Alone |
| In the First Light (Reprise) Choir Reduction |
| In the First Light (Reprise) |
| In the First Light Choir Reduction |
| In the First Light Interlude |
| In the First Light Piano_Choir |
| In the First Light Reprise |
| In the First Light |
| It Is Well with My Soul |
| Jesus Messiah |
| Jesus No Other Name |
| Jesus Saves Cottrell |
| Lamb of God Ab |
| Lamb of God Bb |
| Lamb of God Eb |
| Lamb of God |
| Let the Redeemed |
| Let There Be Glory and Honor and Praises |
| Let There Be Praise |
| Lets Just Praise the Lord |
| listofsongs.txt |
| Little Brown Jug |
| Lord I Lift Your Name On High |
| Lord Most High |
| Lord You re Holy |
| Low in the Grave He Lay |
| Majesty |
| Mercy Mercy Mercy |
| Mighty is Our God |
| Mighty To Save |
| More Precious Than Silver |
| My Jesus I Love Thee |
| My Life Is in You Lord |
| My Redeemer Lives |
| No Other Name |
| O Gethsemane |
| Open the Eyes of My Heart |
| Orphans of God |
| Overture - In the First Light |
| Praise Him Praise Him |
| Praise the King |
| Remember Me |
| Resurrection Hymn |
| Rise Up and Praise Him |
| Sanctus |
| See Your Glory |
| Shine Jesus Shine |
| Shine On Us |
| Sing to the King |
| So All Alone |
| songs.txt |
| Soon and Very Soon |
| Stand Up and Give Him the Praise Bb |
| Stand Up and Give Him the Praise |
| Surely Goodness and Mercy |
| talkin bout Jesus |
| Thankful to Be An American |
| The Solid Rock |
| The Star Spangled Banner |
| The Wonderful Cross |
| There Is A Fountain Hymn |
| There is a Fountain |
| There is a Name I Love to Hear |
| Theres Just Something About That Name |
| Tis So Sweet to Trust in Jesus |
| To God Be the Glory |
| Trust and Obey |
| Via Dolorosa |
| Victory In Jesus TC |
| Victory In Jesus |
| We Bow Down |
| We Bring the Sacrifice of Praise |
| We Cry Hosanna Lord |
| We Cry Hosanna Lord_Vocal |
| We re Marching to Zion |
| We Will Remember |
| We're On a Journey |
| What a Friend We Have In Jesus |
| What a Mighty God We Serve |
| Who Can Satisfy My Soul |
| Wonderful Merciful Savior |
| Worthy of Worship |
| Worthy VBS 2012 |
| Worthy You Are Worthy |
| Worthy |
| Written In Red |
| Ye Shall Be Witnesses |
| You Are (with Lyrics) 2 |
| You Are (with Lyrics) |
| You Are My All in All |
| You Are |
| You Said |


Routines
| Hours | Days | |||
|---|---|---|---|---|
| First day | Second day | Third day | ||
| 10 | 11 | Breakfast 350Cal | ||
| 11 | 12 | Jogging | ||
| 12 | 13 | Cardio | Snacks 200Cal | |
| 13 | 14 | Other | ||
| 14 | 15 | Lunch 650Cal | ||
| 15 | 16 | Other | ||
| 16 | 17 | |||
| 17 | 18 | Gym - lower body | Cardio | Gym - upper body |
| 18 | 19 | |||
| 19 | 20 | Dinner 700Cal | ||
| Repeat routine then pause one day |
| Hours | Days | ||
|---|---|---|---|
| First day | Second day | ||
| 10 | 11 | Breakfast 400Cal | |
| 11 | 12 | Jogging | Cardio |
| 12 | 13 | Cardio | Snacks 400Cal |
| 13 | 14 | Other | |
| 14 | 15 | Lunch 700Cal | |
| 15 | 16 | Other | |
| 16 | 17 | ||
| 17 | 18 | Gym - lower body | Gym - upper body |
| 18 | 19 | ||
| 19 | 20 | Dinner 800Cal | |
| Repeat continuously |


UK ticket holder wins £105m Euromillions jackpot
by Iain LynnA UK ticket-holder has won the £105 million EuroMillions jackpot on the 25th anniversary of the first National Lottery draw.
The winning main EuroMillions numbers were 08, 10, 15, 30 and 42 and the Lucky Star numbers were 04 and 06.
Andy Carter, senior winners' adviser at the National Lottery, said: "On our 25th birthday, one very lucky ticket-holder has scooped tonight's entire £105 million EuroMillions jackpot.
"Players across the country are now urged to check their tickets to see if they have won big.
READ MORE: Meet Lancashire's lottery millionaires since 1994
"Tonight's big winner has scooped the sixth EuroMillions jackpot banked in the UK this year."
Someone also became a millionaire by matching the Millionaire Maker code ZMSF62402.
A UK ticket-holder won a £170 million EuroMillions jackpot in October, making them the UK's biggest ever winner.
The previous biggest UK winners were Colin and Chris Weir, from Largs in North Ayrshire, Scotland, who won £161 million in July 2011.
A £123 million jackpot was won by a UK ticket-holder in June and a UK winner scooped £38 million in the EuroMillions in April.
Ade Goodchild, from Hereford, bagged £71 million on March 15 and Patrick and Frances Connolly, from Northern Ireland, won £114.9 million on New Year's Day.


This page uses the Shiny package for R, to serve up R statistical tools in a web based interface.
To use, upload a .csv file (.xls format not yet supported) in the provided sidebar to load your data into the tool. The file must contain a field named group and one named value. The analysis tools provided here will perform statistics on the groups in your data, where the group field varies by the the different plots, years, samples, etc. of your data set. The value field must contain the measured data of interest.
Upon successful upload, the startup tab, plot, should display histograms of your data and summary statistics for the first two groups in your data. Also available will be a simple threshold analysis.
The number of groups contained in your uploaded data will determine the other tools available for display, as described below:
Two group data:
A 2 sample T-test for displaying results of a t-test on two independent groups
A Paired T-test for displaying results of a T-test on two related groups (ie the same plot during different times).
(If your data has less than or more than two groups, these options will return 'null' in the interface)
Three or more group data:
ANOVA analysis


The core software to mine MAGI is the
CPU miner which is modified to include the M7M PoW hash function. Two major releases are available compiled by
Spexx, and the MAGI team (
m-minerd).
NeedIfFindIt released a frond-end GUI version for the easy setup, as well as, importantly, having control on the hashing rate in line with the MAGI's PoW block value.
m-cpuminer-qt is another GUI miner released by the MAGI team; the current version allows control on hashing at a fixed rate (by using -e flag).


I’ve been working with the Access Storage Framework introduced with Android KitKat, a feature that I’ve been waiting for a long time. Everything seemed to be alright, quite easy to implement, until I faced a strange issue. Once the file has been selected by the user, I wanted to store the file’s URI and re-open that URI the next time applicati... Read more 09 Jan 2015 - 1 minute read
Life is too short: please, don’t waste your time writing code! I’m not saying that you don’t have to code, but many people tend to waste too much time typing on the keyboard instead of producing code. Mee too. Following examples relate to Android’s world, but that can be easily adapted to other languages and programming tasks. Aliases Android... Read more 16 Dec 2014 - 1 minute read
Starting from this blog post by Bryan Rosenbaum, here is a gradle task to auto increment versionCode inside your build.gradle file. import java.util.regex.Pattern ... task incrementVersionCode << { println(":incrementVersionCode - Incrementing Version Code...") def buildGradleFile = file("build.gradle") def patternVersionCod... Read more 04 Nov 2014 - less than 1 minute read
There are many ways to create a fragment in Android, but to create a fragment properly you need to follow specific guidelines. For example, it’s required that the class has a public zero-parameters constructor. If we need to pass parameters to the fragment, we need to use the method setArguments(). Try to pass some parameters to the constructo... Read more 08 Sep 2014 - less than 1 minute read
Here are two simple methods to write a boolean value into a Parcelable object and read a boolean from a Parcelabe. public static void writeBoolean(Parcel destination, boolean value) { if (destination != null) { destination.writeInt(value ? 0 : 1); } } public static boolean readBoolean(Parcel in) { if (in != null) { return in.rea... Read more 17 Jun 2014 - less than 1 minute read


---
sort_order: 22
tei_id: rdx_b5j2m.p.idp145417376
annotation_count: 0
images:
small-thumbnail: http://readux.library.emory.edu/books/emory:b5j2m/pages/emory:p742v/mini-thumbnail/
json: http://readux.library.emory.edu/books/emory:b5j2m/pages/emory:p742v/info/
full: http://readux.library.emory.edu/books/emory:b5j2m/pages/emory:p742v/fs/
page: http://readux.library.emory.edu/books/emory:b5j2m/pages/emory:p742v/single-page/
thumbnail: http://readux.library.emory.edu/books/emory:b5j2m/pages/emory:p742v/thumbnail/
title: Page 22
number: 22
---
{% raw %}8 MRS. II. BEECHER STOWe's " UNCLE TOM."{% endraw %}
{% raw %}tat ion for goodness of heart and an almost saint¬{% endraw %}
{% raw %}like benevolence, the habit of intemperance steadily{% endraw %}
{% raw %}gained around, ami finallv occasioned his death.{% endraw %}
{% raw %}Two negroes on the plantation found him one morn¬{% endraw %}
{% raw %}ing lying dead in the middle of a narrow stream,{% endraw %}
{% raw %}not a foot in depth. He had been away the night{% endraw %}
{% raw %}previous at a social party, and when returning home{% endraw %}
{% raw %}had fallen from his horse, probably, and being too{% endraw %}
{% raw %}intoxicated to stagger through the stream, fell and{% endraw %}
{% raw %}was drowned. " There's the place where inassa{% endraw %}
{% raw %}got drownded at;" how well I remember having{% endraw %}
{% raw %}it pointed out to me in those very words.{% endraw %}
{% raw %}For two or three years my mother and her young{% endraw %}
{% raw %}family of six children had resided on the doctor's.{% endraw %}
{% raw %}estate, and we had been in the main very happy-{% endraw %}
{% raw %}She was a good mother to us, a woman of deep piety,{% endraw %}
{% raw %}anxious above all things to touch our hearts with a{% endraw %}
{% raw %}sense of religion. How or where she acquired her{% endraw %}
{% raw %}knowledge of God, or her acquaintance with the{% endraw %}
{% raw %}Lord's Prayer, which she so frequentlv taught us to{% endraw %}
{% raw %}repeat, I am unable to say I remember seeing her{% endraw %}
{% raw %}often on her knees, and hearing- her pray by repeat¬{% endraw %}
{% raw %}ing constant ejaculations, and short phrases which{% endraw %}
{% raw %}were within my infant comprehension, and have re¬{% endraw %}
{% raw %}mained in my memory to this hour.{% endraw %}
{% raw %}Our term of happy union as one family was now,{% endraw %}
{% raw %}alas ! at an end. The doctor's death was a great{% endraw %}
{% raw %}calamity to us, for the estate and the slaves were to{% endraw %}
{% raw %}be sold and the proceeds divided among the heirs.{% endraw %}
{% raw %}The first sad announcement that the sale was to be ;{% endraw %}
{% raw %}the knowledge that all ties of the past were to be{% endraw %}
{% raw %}sundered ; the frantic terror at the idea of being sent{% endraw %}


This inspections reports usage of the default file template for File Header.
Also, the inspection proposes to change default file template and its usage.


__construct()
__construct()
IPTools
IP Address Conversion and CIDR calculator
CalcCIDR(string $ip_addr) : array
Given an IP address or IP address with CIDR notation, provides information about an IP address range
| string | $ip_addr | An IP address with or without CIDR notation |
a list of objects containing information about the IP address range


博客
邱张华
Tailwind Cheat Sheet
2022/05/03
Men never grow up :)
Links
https://nerdcave.com/tailwind-cheat-sheet


<script src="RGraph.common.core.js"></script> <script src="RGraph.common.dynamic.js"></script> <script src="RGraph.gauge.js"></script>Put this where you want the chart to show up:
<canvas id="cvs" width="250" height="250"> [No canvas support] </canvas>This is the code that generates the chart - it should be placed AFTER the canvas tag(s):


Effects of different proton pump inhibitors on acyclovir activity in HSV-1-infected HaCaT cells as indicated by cytopathogenic effect (CPE) formation. Proton pump inhibitors alone did not reduce CPE formation. Numerical values are presented in Supplementary Table S4. ∗ P < 0.05 relative to acyclovir alone.


jsonbox.io lets you store, read & modify JSON data over HTTP APIs for free. Copy the URL below and start sending HTTP requests to play around with your data store. Please read the docs for more info.


fun writeInstance(data: Sample<TData>): Unit
Overrides RegisterSet.writeInstance
Writes an instance from some data set to the register sets input registers.
NOTE: The number of input registers of the set must match the number of features in the instance.
data
- An instance to write to the input registers.
RegisterWriteRangeException
- When the number of features does not match the number of input registers.


Index
_
|
A
|
B
|
C
|
D
|
E
|
F
|
G
|
I
|
L
|
M
|
N
|
O
|
P
|
Q
|
R
|
S
|
T
|
X
|
Y
_
_id (feign.blocks.Absorber attribute)
(feign.blocks.Collimator attribute)
(feign.blocks.Detector attribute)
(feign.blocks.Material attribute)
(feign.blocks.Pin attribute)
A
Absorber (class in feign.blocks)
absorbers (feign.blocks.Experiment attribute)
accommat (feign.blocks.Absorber attribute)
add_absorber() (feign.blocks.Experiment method)
add_detector() (feign.blocks.Experiment method)
add_material() (feign.blocks.Experiment method)
add_pin() (feign.blocks.Assembly method)
add_region() (feign.blocks.Pin method)
Assembly (class in feign.blocks)
assembly (feign.blocks.Experiment attribute)
attenuation() (feign.blocks.Experiment method)
B
back (feign.blocks.Collimator attribute)
C
c (feign.geometry.Circle attribute)
checkComplete() (feign.blocks.Assembly method)
(feign.blocks.Experiment method)
Circle (class in feign.geometry)
Collimator (class in feign.blocks)
collimator (feign.blocks.Detector attribute)
color (feign.blocks.Collimator attribute)
(feign.blocks.Material attribute)
contributionMap (feign.blocks.Experiment attribute)
contributionMapAve (feign.blocks.Experiment attribute)
contributionMapAveErr (feign.blocks.Experiment attribute)
contributionMapAves (feign.blocks.Experiment attribute)
contributionMapErr (feign.blocks.Experiment attribute)
contributionMaps (feign.blocks.Experiment attribute)
coolant (feign.blocks.Assembly attribute)
corners (feign.geometry.Rectangle attribute)
D
density (feign.blocks.Material attribute)
Detector (class in feign.blocks)
detectors (feign.blocks.Experiment attribute)
distance() (feign.geometry.Point method)
distanceTravelled() (feign.blocks.Experiment method)
dTmap (feign.blocks.Experiment attribute)
dTmapErr (feign.blocks.Experiment attribute)
dTmaps (feign.blocks.Experiment attribute)
E
elines (feign.blocks.Experiment attribute)
encloses_point() (feign.geometry.Circle method)
(feign.geometry.Rectangle method)
Experiment (class in feign.blocks)
F
form (feign.blocks.Absorber attribute)
front (feign.blocks.Collimator attribute)
fuelmap (feign.blocks.Assembly attribute)
G
geomEff (feign.blocks.Experiment attribute)
geomEffAve (feign.blocks.Experiment attribute)
geomEffAveErr (feign.blocks.Experiment attribute)
geomEffAves (feign.blocks.Experiment attribute)
geomEffErr (feign.blocks.Experiment attribute)
geomEffs (feign.blocks.Experiment attribute)
get_MuTable() (feign.blocks.Experiment method)
I
inBetween() (feign.geometry.Point method)
intercept (feign.geometry.Segment attribute)
intersection() (feign.geometry.Circle method)
(feign.geometry.Rectangle method)
(feign.geometry.Segment method)
isEqual() (feign.geometry.Point method)
L
location (feign.blocks.Detector attribute)
M
M (feign.blocks.Assembly attribute)
Material (class in feign.blocks)
material (feign.blocks.Absorber attribute)
materials (feign.blocks.Experiment attribute)
(feign.blocks.Pin attribute)
mu (feign.blocks.Experiment attribute)
N
N (feign.blocks.Assembly attribute)
O
output (feign.blocks.Experiment attribute)
P
p (feign.geometry.Segment attribute)
p1 (feign.geometry.Rectangle attribute)
p1p2 (feign.geometry.Rectangle attribute)
p2 (feign.geometry.Rectangle attribute)
p2p3 (feign.geometry.Rectangle attribute)
p3 (feign.geometry.Rectangle attribute)
p3p4 (feign.geometry.Rectangle attribute)
p4 (feign.geometry.Rectangle attribute)
p4p1 (feign.geometry.Rectangle attribute)
path (feign.blocks.Material attribute)
Pin (class in feign.blocks)
pins (feign.blocks.Assembly attribute)
(feign.blocks.Experiment attribute)
pitch (feign.blocks.Assembly attribute)
Plot() (feign.blocks.Experiment method)
Point (class in feign.geometry)
points (feign.geometry.Segment attribute)
pool (feign.blocks.Assembly attribute)
Q
q (feign.geometry.Segment attribute)
R
r (feign.geometry.Circle attribute)
radii (feign.blocks.Pin attribute)
Rectangle (class in feign.geometry)
regions (feign.blocks.Pin attribute)
remove_absorber() (feign.blocks.Experiment method)
remove_detector() (feign.blocks.Experiment method)
remove_material() (feign.blocks.Experiment method)
remove_pin() (feign.blocks.Assembly method)
rotate() (feign.geometry.Point method)
(feign.geometry.Rectangle method)
(feign.geometry.Segment method)
Run() (feign.blocks.Experiment method)
S
Segment (class in feign.geometry)
set_absorbers() (feign.blocks.Experiment method)
set_accommat() (feign.blocks.Absorber method)
set_assembly() (feign.blocks.Experiment method)
set_back() (feign.blocks.Collimator method)
set_collimator() (feign.blocks.Detector method)
set_color() (feign.blocks.Collimator method)
(feign.blocks.Material method)
set_coolant() (feign.blocks.Assembly method)
set_density() (feign.blocks.Material method)
set_detectors() (feign.blocks.Experiment method)
set_elines() (feign.blocks.Experiment method)
set_form() (feign.blocks.Absorber method)
set_front() (feign.blocks.Collimator method)
set_fuelmap() (feign.blocks.Assembly method)
set_location() (feign.blocks.Detector method)
set_material() (feign.blocks.Absorber method)
set_materials() (feign.blocks.Experiment method)
set_output() (feign.blocks.Experiment method)
set_path() (feign.blocks.Material method)
set_pins() (feign.blocks.Assembly method)
set_pitch() (feign.blocks.Assembly method)
set_pool() (feign.blocks.Assembly method)
set_random() (feign.blocks.Experiment method)
set_source() (feign.blocks.Assembly method)
set_surrounding() (feign.blocks.Assembly method)
sides (feign.geometry.Rectangle attribute)
slope (feign.geometry.Segment attribute)
source (feign.blocks.Assembly attribute)
sourcePoints (feign.blocks.Experiment attribute)
surrounding (feign.blocks.Assembly attribute)
T
translate() (feign.geometry.Point method)
X
x (feign.geometry.Point attribute)
Y
y (feign.geometry.Point attribute)
feign
Navigation
Installation
Getting started
Examples
feign API Reference
Related Topics
Documentation overview
Quick search


Login
GitHub
Source
BIM360 URL Source Folder
Select Zip File
Transfer
Selected File To Transfer
Destination
BIM360 URL Destination Folder


Functions to assist in the processing and exploration of data from environmental monitoring programs. The package name stands for "water quality" and reflects the original focus on time series data for physical and chemical properties of water, as well as the biota. Intended for programs that sample approximately monthly, quarterly or annually at discrete stations, a feature of many legacy data sets. Most of the functions should be useful for analysis of similar-frequency time series regardless of the subject matter.
| Version: | 0.4.9 |
| Depends: | R (≥ 3.0.0) |
| Imports: | graphics, grDevices, methods, stats, ggplot2 (≥ 1.0), reshape2, zoo |
| Suggests: | knitr, rmarkdown |
| Published: | 2017-07-04 |
| Author: | Alan Jassby [aut], James Cloern [ctb], Joseph Stachelek [ctb, cre] |
| Maintainer: | Joseph Stachelek <stachel2 at msu.edu> |
| BugReports: | https://github.com/jsta/wql/issues |
| License: | GPL-2 |
| URL: | https://github.com/jsta/wql |
| NeedsCompilation: | no |
| Citation: | wql citation info |
| Materials: | README NEWS |
| CRAN checks: | wql results |
| Reference manual: | wql.pdf |
| Vignettes: |
wql: Exploring water quality monitoring data |
| Package source: | wql_0.4.9.tar.gz |
| Windows binaries: | r-devel: wql_0.4.9.zip, r-release: wql_0.4.9.zip, r-oldrel: wql_0.4.9.zip |
| OS X binaries: | r-release: wql_0.4.9.tgz, r-oldrel: wql_0.4.9.tgz |
Please use the canonical form https://CRAN.R-project.org/package=wql to link to this page.