|
motley-php
Useful PHP utility classes and programs
|
A class with protected and private methods. More...
Public Member Functions | |
| __construct () | |
| Class constructor. More... | |
| publicFunction () | |
| A sample public function. More... | |
| protectedFunction () | |
| A sample protected function. More... | |
| privateFunction () | |
| A sample private function. More... | |
| staticProtectedFunction () | |
| A sample static protected function. More... | |
| staticPrivateFunction () | |
| A sample static private function. More... | |
Static Public Member Functions | |
| static | staticPublicFunction () |
| A sample static public function. More... | |
Data Fields | |
| const | PUBFUN = "Public Function" |
| Public function result. More... | |
| const | PROFUN = "Protected Function" |
| Protected function result. More... | |
| const | PRIFUN = "Private Function" |
| Private function result. More... | |
| const | STAPUBFUN = "Static Public Function" |
| Static public result. More... | |
| const | STAPROFUN = "Protected Function" |
| Static protected result. More... | |
| const | STAPRIFUN = "Private Function" |
| Static private result. More... | |
A class with protected and private methods.
This allows other classes which use reflection to be more thoroughly tested.
Definition at line 15 of file ZzzSampleClass.php.
| Motley\Test\ZzzSampleClass::__construct | ( | ) |
Class constructor.
Definition at line 24 of file ZzzSampleClass.php.
| Motley\Test\ZzzSampleClass::publicFunction | ( | ) |
| Motley\Test\ZzzSampleClass::protectedFunction | ( | ) |
A sample protected function.
Definition at line 34 of file ZzzSampleClass.php.
| Motley\Test\ZzzSampleClass::privateFunction | ( | ) |
A sample private function.
Definition at line 40 of file ZzzSampleClass.php.
|
static |
A sample static public function.
Definition at line 46 of file ZzzSampleClass.php.
| Motley\Test\ZzzSampleClass::staticProtectedFunction | ( | ) |
A sample static protected function.
Definition at line 52 of file ZzzSampleClass.php.
| Motley\Test\ZzzSampleClass::staticPrivateFunction | ( | ) |
A sample static private function.
Definition at line 58 of file ZzzSampleClass.php.
| const Motley\Test\ZzzSampleClass::PUBFUN = "Public Function" |
Public function result.
Definition at line 16 of file ZzzSampleClass.php.
Referenced by Motley\Test\UnitTestSupportTest\testInvokeFunction().
| const Motley\Test\ZzzSampleClass::PROFUN = "Protected Function" |
Protected function result.
Definition at line 17 of file ZzzSampleClass.php.
Referenced by Motley\Test\UnitTestSupportTest\testInvokeFunction().
| const Motley\Test\ZzzSampleClass::PRIFUN = "Private Function" |
Private function result.
Definition at line 18 of file ZzzSampleClass.php.
Referenced by Motley\Test\UnitTestSupportTest\testInvokeFunction().
| const Motley\Test\ZzzSampleClass::STAPUBFUN = "Static Public Function" |
Static public result.
Definition at line 19 of file ZzzSampleClass.php.
Referenced by Motley\Test\UnitTestSupportTest\testInvokeFunction().
| const Motley\Test\ZzzSampleClass::STAPROFUN = "Protected Function" |
Static protected result.
Definition at line 20 of file ZzzSampleClass.php.
Referenced by Motley\Test\UnitTestSupportTest\testInvokeFunction().
| const Motley\Test\ZzzSampleClass::STAPRIFUN = "Private Function" |
Static private result.
Definition at line 21 of file ZzzSampleClass.php.
Referenced by Motley\Test\UnitTestSupportTest\testInvokeFunction().


It's time for chili http://www.tumblr.com/tagged/time+for+chili 1/28/2011, 6:41:17 PM Favs: 0 Retweets: 0 link


Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
RuntimeException
RuntimeException is the superclass of those
exceptions that can be thrown during the normal operation of the
Java Virtual Machine. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| AutoCloseable
A resource that must be closed when it is no longer needed.
|
| Boolean
The Boolean class wraps a value of the primitive type
boolean in an object. |
| CharSequence
A CharSequence is a readable sequence of
char values. |
| ClassLoader
A class loader is an object that is responsible for loading classes.
|
| Comparable
This interface imposes a total ordering on the objects of each class that
implements it.
|
| Iterable
Implementing this interface allows an object to be the target of
the "foreach" statement.
|
| Object
Class
Object is the root of the class hierarchy. |
| Override
Indicates that a method declaration is intended to override a
method declaration in a supertype.
|
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Class
Instances of the class
Class represent classes and
interfaces in a running Java application. |
| ClassLoader
A class loader is an object that is responsible for loading classes.
|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| IllegalStateException
Signals that a method has been invoked at an illegal or
inappropriate time.
|
| Object
Class
Object is the root of the class hierarchy. |
| Override
Indicates that a method declaration is intended to override a
method declaration in a supertype.
|
RuntimeException
RuntimeException is the superclass of those
exceptions that can be thrown during the normal operation of the
Java Virtual Machine. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Comparable
This interface imposes a total ordering on the objects of each class that
implements it.
|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Class
Instances of the class
Class represent classes and
interfaces in a running Java application. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
RuntimeException
RuntimeException is the superclass of those
exceptions that can be thrown during the normal operation of the
Java Virtual Machine. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| ClassLoader
A class loader is an object that is responsible for loading classes.
|
| Cloneable
A class implements the
Cloneable interface to
indicate to the Object.clone() method that it
is legal for that method to make a
field-for-field copy of instances of that class. |
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Number
The abstract class
Number is the superclass of classes
BigDecimal , BigInteger ,
Byte , Double , Float ,
Integer , Long , and Short . |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| ClassLoader
A class loader is an object that is responsible for loading classes.
|
| Error
An
Error is a subclass of Throwable
that indicates serious problems that a reasonable application
should not try to catch. |
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| IllegalArgumentException
Thrown to indicate that a method has been passed an illegal or
inappropriate argument.
|
| Object
Class
Object is the root of the class hierarchy. |
| Override
Indicates that a method declaration is intended to override a
method declaration in a supertype.
|
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| UnsupportedOperationException
Thrown to indicate that the requested operation is not supported.
|
| Class and Description |
|---|
| ClassLoader
A class loader is an object that is responsible for loading classes.
|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| IllegalArgumentException
Thrown to indicate that a method has been passed an illegal or
inappropriate argument.
|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| String
The
String class represents character strings. |
| Class and Description |
|---|
| IllegalArgumentException
Thrown to indicate that a method has been passed an illegal or
inappropriate argument.
|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| ClassLoader
A class loader is an object that is responsible for loading classes.
|
| Error
An
Error is a subclass of Throwable
that indicates serious problems that a reasonable application
should not try to catch. |
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| IllegalArgumentException
Thrown to indicate that a method has been passed an illegal or
inappropriate argument.
|
| Object
Class
Object is the root of the class hierarchy. |
| Override
Indicates that a method declaration is intended to override a
method declaration in a supertype.
|
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| IllegalArgumentException
Thrown to indicate that a method has been passed an illegal or
inappropriate argument.
|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| ClassLoader
A class loader is an object that is responsible for loading classes.
|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Class
Instances of the class
Class represent classes and
interfaces in a running Java application. |
| Comparable
This interface imposes a total ordering on the objects of each class that
implements it.
|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
RuntimeException
RuntimeException is the superclass of those
exceptions that can be thrown during the normal operation of the
Java Virtual Machine. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Comparable
This interface imposes a total ordering on the objects of each class that
implements it.
|
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
RuntimeException
RuntimeException is the superclass of those
exceptions that can be thrown during the normal operation of the
Java Virtual Machine. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Comparable
This interface imposes a total ordering on the objects of each class that
implements it.
|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
RuntimeException
RuntimeException is the superclass of those
exceptions that can be thrown during the normal operation of the
Java Virtual Machine. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Class
Instances of the class
Class represent classes and
interfaces in a running Java application. |
| IllegalAccessException
An IllegalAccessException is thrown when an application tries
to reflectively create an instance (other than an array),
set or get a field, or invoke a method, but the currently
executing method does not have access to the definition of
the specified class, field, method or constructor.
|
| IllegalArgumentException
Thrown to indicate that a method has been passed an illegal or
inappropriate argument.
|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| ClassLoader
A class loader is an object that is responsible for loading classes.
|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Cloneable
A class implements the
Cloneable interface to
indicate to the Object.clone() method that it
is legal for that method to make a
field-for-field copy of instances of that class. |
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Class
Instances of the class
Class represent classes and
interfaces in a running Java application. |
| Deprecated
A program element annotated @Deprecated is one that programmers
are discouraged from using, typically because it is dangerous,
or because a better alternative exists.
|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
RuntimeException
RuntimeException is the superclass of those
exceptions that can be thrown during the normal operation of the
Java Virtual Machine. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Class
Instances of the class
Class represent classes and
interfaces in a running Java application. |
| Deprecated
A program element annotated @Deprecated is one that programmers
are discouraged from using, typically because it is dangerous,
or because a better alternative exists.
|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
RuntimeException
RuntimeException is the superclass of those
exceptions that can be thrown during the normal operation of the
Java Virtual Machine. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Class
Instances of the class
Class represent classes and
interfaces in a running Java application. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| Class and Description |
|---|
| Class
Instances of the class
Class represent classes and
interfaces in a running Java application. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Class
Instances of the class
Class represent classes and
interfaces in a running Java application. |
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
RuntimeException
RuntimeException is the superclass of those
exceptions that can be thrown during the normal operation of the
Java Virtual Machine. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| ClassCastException
Thrown to indicate that the code has attempted to cast an object
to a subclass of which it is not an instance.
|
| ClassNotFoundException
Thrown when an application tries to load in a class through its
string name using:
The
forName method in class Class . |
| IllegalAccessException
An IllegalAccessException is thrown when an application tries
to reflectively create an instance (other than an array),
set or get a field, or invoke a method, but the currently
executing method does not have access to the definition of
the specified class, field, method or constructor.
|
| InstantiationException
Thrown when an application tries to create an instance of a class
using the
newInstance method in class
Class , but the specified class object cannot be
instantiated. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
RuntimeException
RuntimeException is the superclass of those
exceptions that can be thrown during the normal operation of the
Java Virtual Machine. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
RuntimeException
RuntimeException is the superclass of those
exceptions that can be thrown during the normal operation of the
Java Virtual Machine. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Exception
The class
Exception and its subclasses are a form of
Throwable that indicates conditions that a reasonable
application might want to catch. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Throwable
The
Throwable class is the superclass of all errors and
exceptions in the Java language. |
| Class and Description |
|---|
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
| Class and Description |
|---|
| ClassCastException
Thrown to indicate that the code has attempted to cast an object
to a subclass of which it is not an instance.
|
| ClassNotFoundException
Thrown when an application tries to load in a class through its
string name using:
The
forName method in class Class . |
| IllegalAccessException
An IllegalAccessException is thrown when an application tries
to reflectively create an instance (other than an array),
set or get a field, or invoke a method, but the currently
executing method does not have access to the definition of
the specified class, field, method or constructor.
|
| InstantiationException
Thrown when an application tries to create an instance of a class
using the
newInstance method in class
Class , but the specified class object cannot be
instantiated. |
| NullPointerException
Thrown when an application attempts to use
null in a
case where an object is required. |
| Object
Class
Object is the root of the class hierarchy. |
| String
The
String class represents character strings. |
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved.


About
Projects
Contact
I'm Wandy Santana
a Front-End Developer 🖱
Let's see my projects 💾
Kemus Corp. landing page
Pets website
Let's work together... 🚀


User Login
Username
Password
Exchange
NSE
BSE
MSE
Buy/Sell Stocks
Symbol
*
Target Price
*
Volume
*
Exchange
*
NSE
BSE
MSE
Portfolio and Account Summary
Market Data
Symbol
NSE
BSE
MSE
Last Trade
Volume
Last Trade
Volume
Last Trade
Volume
My Portfolio
Symbol
Quantity
Inv. Price
Inv. Value
Live Price
Latest Value


steal('can/util','can/observe', function( can ) {
this file should not be stolen directly
steal('can/util','can/observe', function( can ) {
can.Model
A can.Observe
that connects to a RESTful interface.
Generic deferred piping function
/**
* @add can.Model
*/
var pipe = function( def, model, func ) {
var d = new can.Deferred();
def.then(function(){
var args = can.makeArray( arguments ),
success = true;
try {
args[0] = model[func](args[0]);
} catch(e) {
success = false;
d.rejectWith(d, [e].concat(args));
}
if (success) {
d.resolveWith(d, args);
}
},function(){
d.rejectWith(this, arguments);
});
if(typeof def.abort === 'function') {
d.abort = function() {
return def.abort();
}
}
return d;
},
modelNum = 0,
ignoreHookup = /change.observe\d+/,
getId = function( inst ) {
Instead of using attr, use __get for performance. Need to set reading
can.Observe.__reading && can.Observe.__reading(inst, inst.constructor.id)
return inst.__get(inst.constructor.id);
},
Ajax options
generator function
ajax = function( ajaxOb, data, type, dataType, success, error ) {
var params = {};
If we get a string, handle it.
if ( typeof ajaxOb == "string" ) {
If there’s a space, it’s probably the type.
var parts = ajaxOb.split(/\s+/);
params.url = parts.pop();
if ( parts.length ) {
params.type = parts.pop();
}
} else {
can.extend( params, ajaxOb );
}
If we are a non-array object, copy to a new attrs.
params.data = typeof data == "object" && ! can.isArray( data ) ?
can.extend(params.data || {}, data) : data;
Get the url with any templated values filled out.
params.url = can.sub(params.url, params.data, true);
return can.ajax( can.extend({
type: type || "post",
dataType: dataType ||"json",
success : success,
error: error
}, params ));
},
makeRequest = function( self, type, success, error, method ) {
var args;
if we pass an array as self
it it means we are coming from
the queued request, and we’re passing already serialized data
self’s signature will be: [self, serializedData]
if(can.isArray(self)){
args = self[1];
self = self[0];
} else {
args = self.serialize();
}
args = [args];
var deferred,
The model.
model = self.constructor,
jqXHR;
destroy
does not need data.
if ( type == 'destroy' ) {
args.shift();
}
update
and destroy
need the id
.
if ( type !== 'create' ) {
args.unshift(getId(self));
}
jqXHR = model[type].apply(model, args);
deferred = jqXHR.pipe(function(data){
self[method || type + "d"](data, jqXHR);
return self;
});
Hook up abort
if(jqXHR.abort){
deferred.abort = function(){
jqXHR.abort();
};
}
deferred.then(success,error);
return deferred;
},
This object describes how to make an ajax request for each ajax method.
The available properties are:
url
- The default url to use as indicated as a property on the model.
type
- The default http request type
data
- A method that takes the arguments
and returns data
used for ajax.
/**
* @static
*/
/**
* @function can.Model.bind bind
* @parent can.Model.static
* @description Listen for events on a Model class.
*
* @signature `can.Model.bind(eventType, handler)`
* @param {String} eventType The type of event. It must be
* `"created"`, `"udpated"`, `"destroyed"`.
* @param {function} handler A callback function
* that gets called with the event and instance that was
* created, destroyed, or updated.
* @return {can.Model} The model constructor function.
*
* @body
* `bind(eventType, handler(event, instance))` listens to
* __created__, __updated__, __destroyed__ events on all
* instances of the model.
*
* Task.bind("created", function(ev, createdTask){
* this //-> Task
* createdTask.attr("name") //-> "Dishes"
* })
*
* new Task({name: "Dishes"}).save();
*/
/**
* @function can.Model.unbind unbind
* @parent can.Model.static
* @description Stop listening for events on a Model class.
*
* @signature `can.Model.unbind(eventType, handler)`
* @param {String} eventType The type of event. It must be
* `"created"`, `"udpated"`, `"destroyed"`.
* @param {function} handler A callback function
* that was passed to `bind`.
* @return {can.Model} The model constructor function.
*
* @body
* `unbind(eventType, handler)` removes a listener
* attached with [can.Model.bind].
*
* var handler = function(ev, createdTask){
*
* }
* Task.bind("created", handler)
* Task.unbind("created", handler)
*
* You have to pass the same function to `unbind` that you
* passed to `bind`.
*/
/**
* @property {String} can.Model.id id
* @parent can.Model.static
* The name of the id field. Defaults to `'id'`. Change this if it is something different.
*
* For example, it's common in .NET to use `'Id'`. Your model might look like:
*
* Friend = can.Model.extend({
* id: "Id"
* },{});
*/
/**
* @property {Boolean} can.Model.removeAttr removeAttr
* @parent can.Model.static
* Sets whether model conversion should remove non existing attributes or merge with
* the existing attributes. The default is `false`.
* For example, if `Task.findOne({ id: 1 })` returns
*
* { id: 1, name: 'Do dishes', index: 1, color: ['red', 'blue'] }
*
* for the first request and
*
* { id: 1, name: 'Really do dishes', color: ['green'] }
*
* for the next request, the actual model attributes would look like:
*
* { id: 1, name: 'Really do dishes', index: 1, color: ['green', 'blue'] }
*
* Because the attributes of the original model and the updated model will
* be merged. Setting `removeAttr` to `true` will result in model attributes like
*
* { id: 1, name: 'Really do dishes', color: ['green'] }
*
*/
ajaxMethods = {
/**
* @description Specifies how to create a new resource on the server. `create(serialized)` is called
* by [can.Model.prototype.save save] if the model instance [can.Model.prototype.isNew is new].
* @function can.Model.create create
* @parent can.Model.static
*
*
* @signature `can.Model.create: function(serialized) -> seferred`
*
* Specify a function to create persistent instances. The function will
* typically perform an AJAX request to a service that results in
* creating a record in a database.
*
* @param {Object} serialized The [can.Observe::serialize serialized] properties of
* the model to create.
* @return {can.Deferred} A Deferred that resolves to an object of attributes
* that will be added to the created model isntance. The object __MUST__ contain
* an [can.Model.id id] property so that future calls to [can.Model.prototype.save save]
* will call [can.Model.update].
*
*
* @signature `can.Model.create: "[METHOD] /path/to/resource"`
*
* Specify a HTTP method and url to create persistent instances.
*
* If you provide a URL, the Model will send a request to that URL using
* the method specified (or POST if none is specified) when saving a
* new instance on the server. (See below for more details.)
*
* @param {HttpMethod} METHOD An HTTP method. Defaults to `"POST"`.
* @param {STRING} url The URL of the service to retrieve JSON data.
*
*
* @signature `can.Model.create: {ajaxSettings}`
*
* Specify an options object that is used to make a HTTP request to create
* persistent instances.
*
* @param {can.AjaxSettings} ajaxSettings A settings object that
* specifies the options available to pass to [can.ajax].
*
* @body
*
* `create(attributes) -> Deferred` is used by [can.Model::save save] to create a
* model instance on the server.
*
* ## Implement with a URL
*
* The easiest way to implement create is to give it the url
* to post data to:
*
* var Recipe = can.Model.extend({
* create: "/recipes"
* },{})
*
* This lets you create a recipe like:
*
* new Recipe({name: "hot dog"}).save();
*
*
* ## Implement with a Function
*
* You can also implement create by yourself. Create gets called
* with `attrs`, which are the [can.Observe::serialize serialized] model
* attributes. Create returns a `Deferred`
* that contains the id of the new instance and any other
* properties that should be set on the instance.
*
* For example, the following code makes a request
* to `POST /recipes.json {'name': 'hot+dog'}` and gets back
* something that looks like:
*
* {
* "id": 5,
* "createdAt":<PHONE_NUMBER>
* }
*
* The code looks like:
*
* can.Model.extend("Recipe", {
* create : function( attrs ){
* return $.post("/recipes.json",attrs, undefined ,"json");
* }
* },{})
*/
create : {
url : "_shortName",
type :"post"
},
/**
* @description Update a resource on the server.
* @function can.Model.update update
* @parent can.Model.static
* @signature `can.Model.update: "[METHOD] /path/to/resource"`
* If you provide a URL, the Model will send a request to that URL using
* the method specified (or PUT if none is specified) when updating an
* instance on the server. (See below for more details.)
* @return {can.Deferred} A Deferred that resolves to the updated model.
*
* @signature `can.Model.update: function(id, serialized) -> can.Deffered`
* If you provide a function, the Model will expect you to do your own AJAX requests.
* @param {*} id The ID of the model to update.
* @param {Object} serialized The [can.Observe::serialize serialized] properties of
* the model to update.
* @return {can.Deferred} A Deferred that resolves to the updated model.
*
* @body
* `update( id, attrs ) -> Deferred` is used by [can.Model::save save] to
* update a model instance on the server.
*
* ## Implement with a URL
*
* The easist way to implement update is to just give it the url to `PUT` data to:
*
* Recipe = can.Model.extend({
* update: "/recipes/{id}"
* },{});
*
* This lets you update a recipe like:
*
* Recipe.findOne({id: 1}, function(recipe){
* recipe.attr('name','salad');
* recipe.save();
* })
*
* This will make an XHR request like:
*
* PUT /recipes/1
* name=salad
*
* If your server doesn't use PUT, you can change it to post like:
*
* Recipe = can.Model.extend({
* update: "POST /recipes/{id}"
* },{});
*
* The server should send back an object with any new attributes the model
* should have. For example if your server udpates the "updatedAt" property, it
* should send back something like:
*
* // PUT /recipes/4 {name: "Food"} ->
* {
* updatedAt : "10-20-2011"
* }
*
* ## Implement with a Function
*
* You can also implement update by yourself. Update takes the `id` and
* `attributes` of the instance to be udpated. Update must return
* a [can.Deferred Deferred] that resolves to an object that contains any
* properties that should be set on the instance.
*
* For example, the following code makes a request
* to '/recipes/5.json?name=hot+dog' and gets back
* something that looks like:
*
* {
* updatedAt: "10-20-2011"
* }
*
* The code looks like:
*
* Recipe = can.Model.extend({
* update : function(id, attrs ) {
* return $.post("/recipes/"+id+".json",attrs, null,"json");
* }
* },{});
*/
update : {
data : function(id, attrs){
attrs = attrs || {};
var identity = this.id;
if ( attrs[identity] && attrs[identity] !== id ) {
attrs["new" + can.capitalize(id)] = attrs[identity];
delete attrs[identity];
}
attrs[identity] = id;
return attrs;
},
type : "put"
},
/**
* @description Destroy a resource on the server.
* @function can.Model.destroy destroy
* @parent can.Model.static
*
* @signature `can.Model.destroy: function(id) -> deferred`
*
*
*
* If you provide a function, the Model will expect you to do your own AJAX requests.
* @param {*} id The ID of the resource to destroy.
* @return {can.Deferred} A Deferred that resolves to the destroyed model.
*
*
* @signature `can.Model.destroy: "[METHOD] /path/to/resource"`
*
* If you provide a URL, the Model will send a request to that URL using
* the method specified (or DELETE if none is specified) when deleting an
* instance on the server. (See below for more details.)
*
* @return {can.Deferred} A Deferred that resolves to the destroyed model.
*
*
*
* @body
* `destroy(id) -> Deferred` is used by [can.Model::destroy] remove a model
* instance from the server.
*
* ## Implement with a URL
*
* You can implement destroy with a string like:
*
* Recipe = can.Model.extend({
* destroy : "/recipe/{id}"
* },{})
*
* And use [can.Model::destroy] to destroy it like:
*
* Recipe.findOne({id: 1}, function(recipe){
* recipe.destroy();
* });
*
* This sends a `DELETE` request to `/thing/destroy/1`.
*
* If your server does not support `DELETE` you can override it like:
*
* Recipe = can.Model.extend({
* destroy : "POST /recipe/destroy/{id}"
* },{})
*
* ## Implement with a function
*
* Implement destroy with a function like:
*
* Recipe = can.Model.extend({
* destroy : function(id){
* return $.post("/recipe/destroy/"+id,{});
* }
* },{})
*
* Destroy just needs to return a deferred that resolves.
*/
destroy : {
type : "delete",
data : function(id){
var args = {};
args.id = args[this.id] = id;
return args;
}
},
/**
* @description Retrieve multiple resources from a server.
* @function can.Model.findAll findAll
* @parent can.Model.static
*
* @signature `can.Model.findAll( params[, success[, error]] )`
*
* Retrieve multiple resources from a server.
*
* @param {Object} params Values to filter the request or results with.
* @param {function(can.Model.List)} [success(list)] A callback to call on successful retrieval. The callback recieves
* a can.Model.List of the retrieved resources.
* @param {function(can.AjaxSettings)} [error(xhr)] A callback to call when an error occurs. The callback receives the
* XmlHttpRequest object.
* @return {can.Deferred} A deferred that resolves to a [can.Model.List] of retrieved models.
*
*
* @signature `can.Model.findAll: findAllData( params ) -> deferred`
*
* Implements `findAll` with a [can.Model.findAllData function]. This function
* is passed to [can.Model.makeFindAll makeFindAll] to create the external
* `findAll` method.
*
* findAll: function(params){
* return $.get("/tasks",params)
* }
*
* @param {can.Model.findAllData} findAllData A function that accepts parameters
* specifying a list of instance data to retreive and returns a [can.Deferred]
* that resolves to an array of those instances.
*
* @signature `can.Model.findAll: "[METHOD] /path/to/resource"`
*
* Implements `findAll` with a HTTP method and url to retrieve instance data.
*
* findAll: "GET /tasks"
*
* If `findAll` is implemented with a string, this gets converted to
* a [can.Model.findAllData findAllData function]
* which is passed to [can.Model.makeFindAll makeFindAll] to create the external
* `findAll` method.
*
* @param {HttpMethod} METHOD An HTTP method. Defaults to `"GET"`.
*
* @param {STRING} url The URL of the service to retrieve JSON data.
*
* @return {JSON} The service should return a JSON object like:
*
* {
* "data": [
* { "id" : 1, "name" : "do the dishes" },
* { "id" : 2, "name" : "mow the lawn" },
* { "id" : 3, "name" : "iron my shirts" }
* ]
* }
*
* This object is passed to [can.Model.models] to turn it into instances.
*
* _Note: .findAll can also accept an array, but you
* probably [should not be doing that](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)._
*
*
* @signature `can.Model.findAll: {ajaxSettings}`
*
* Implements `findAll` with a [can.AjaxSettings ajax settings object].
*
* findAll: {url: "/tasks", dataType: "json"}
*
* If `findAll` is implemented with an object, it gets converted to
* a [can.Model.findAllData findAllData function]
* which is passed to [can.Model.makeFindAll makeFindAll] to create the external
* `findAll` method.
*
* @param {can.AjaxSettings} ajaxSettings A settings object that
* specifies the options available to pass to [can.ajax].
*
* @body
*
* ## Use
*
* `findAll( params, success(instances), error(xhr) ) -> Deferred` is used to retrieve model
* instances from the server. After implementing `findAll`, use it to retrieve instances of the model
* like:
*
* Recipe.findAll({favorite: true}, function(recipes){
* recipes[0].attr('name') //-> "Ice Water"
* }, function( xhr ){
* // called if an error
* }) //-> Deferred
*
*
* Before you can use `findAll`, you must implement it.
*
* ## Implement with a URL
*
* Implement findAll with a url like:
*
* Recipe = can.Model.extend({
* findAll : "/recipes.json"
* },{});
*
* The server should return data that looks like:
*
* [
* {"id" : 57, "name": "Ice Water"},
* {"id" : 58, "name": "Toast"}
* ]
*
* ## Implement with an Object
*
* Implement findAll with an object that specifies the parameters to
* `can.ajax` (jQuery.ajax) like:
*
* Recipe = can.Model.extend({
* findAll : {
* url: "/recipes.xml",
* dataType: "xml"
* }
* },{})
*
* ## Implement with a Function
*
* To implement with a function, `findAll` is passed __params__ to filter
* the instances retrieved from the server and it should return a
* deferred that resolves to an array of model data. For example:
*
* Recipe = can.Model.extend({
* findAll : function(params){
* return $.ajax({
* url: '/recipes.json',
* type: 'get',
* dataType: 'json'})
* }
* },{})
*
*/
findAll : {
url : "_shortName"
},
/**
* @description Retrieve a resource from a server.
* @function can.Model.findOne findOne
* @parent can.Model.static
*
* @signature `can.Model.findOne( params[, success[, error]] )`
*
* Retrieve a single instance from the server.
*
* @param {Object} params Values to filter the request or results with.
* @param {function(can.Model)} [success(model)] A callback to call on successful retrieval. The callback recieves
* the retrieved resource as a can.Model.
* @param {function(can.AjaxSettings)} [error(xhr)] A callback to call when an error occurs. The callback receives the
* XmlHttpRequest object.
* @return {can.Deferred} A deferred that resolves to a [can.Model.List] of retrieved models.
*
* @signature `can.Model.findOne: findOneData( params ) -> deferred`
*
* Implements `findOne` with a [can.Model.findOneData function]. This function
* is passed to [can.Model.makeFindOne makeFindOne] to create the external
* `findOne` method.
*
* findOne: function(params){
* return $.get("/task/"+params.id)
* }
*
* @param {can.Model.findOneData} findOneData A function that accepts parameters
* specifying an instance to retreive and returns a [can.Deferred]
* that resolves to that instance.
*
* @signature `can.Model.findOne: "[METHOD] /path/to/resource"`
*
* Implements `findOne` with a HTTP method and url to retrieve an instance's data.
*
* findOne: "GET /tasks/{id}"
*
* If `findOne` is implemented with a string, this gets converted to
* a [can.Model.makeFindOne makeFindOne function]
* which is passed to [can.Model.makeFindOne makeFindOne] to create the external
* `findOne` method.
*
* @param {HttpMethod} METHOD An HTTP method. Defaults to `"GET"`.
*
* @param {STRING} url The URL of the service to retrieve JSON data.
*
* @signature `can.Model.findOne: {ajaxSettings}`
*
* Implements `findOne` with a [can.AjaxSettings ajax settings object].
*
* findOne: {url: "/tasks/{id}", dataType: "json"}
*
* If `findOne` is implemented with an object, it gets converted to
* a [can.Model.makeFindOne makeFindOne function]
* which is passed to [can.Model.makeFindOne makeFindOne] to create the external
* `findOne` method.
*
* @param {can.AjaxSettings} ajaxSettings A settings object that
* specifies the options available to pass to [can.ajax].
*
* @body
*
* ## Use
*
* `findOne( params, success(instance), error(xhr) ) -> Deferred` is used to retrieve a model
* instance from the server.
*
* Use `findOne` like:
*
* Recipe.findOne({id: 57}, function(recipe){
* recipe.attr('name') //-> "Ice Water"
* }, function( xhr ){
* // called if an error
* }) //-> Deferred
*
* Before you can use `findOne`, you must implement it.
*
* ## Implement with a URL
*
* Implement findAll with a url like:
*
* Recipe = can.Model.extend({
* findOne : "/recipes/{id}.json"
* },{});
*
* If `findOne` is called like:
*
* Recipe.findOne({id: 57});
*
* The server should return data that looks like:
*
* {"id" : 57, "name": "Ice Water"}
*
* ## Implement with an Object
*
* Implement `findOne` with an object that specifies the parameters to
* `can.ajax` (jQuery.ajax) like:
*
* Recipe = can.Model.extend({
* findOne : {
* url: "/recipes/{id}.xml",
* dataType: "xml"
* }
* },{})
*
* ## Implement with a Function
*
* To implement with a function, `findOne` is passed __params__ to specify
* the instance retrieved from the server and it should return a
* deferred that resolves to the model data. Also notice that you now need to
* build the URL manually. For example:
*
* Recipe = can.Model.extend({
* findOne : function(params){
* return $.ajax({
* url: '/recipes/' + params.id,
* type: 'get',
* dataType: 'json'})
* }
* },{})
*
*
*/
findOne: {}
},
Makes an ajax request function
from a string.
ajaxMethod
- The ajaxMethod
object defined above.
str
- The string the user provided. Ex: findAll: "/recipes.json"
.
ajaxMaker = function(ajaxMethod, str){
Return a function
that serves as the ajax method.
return function(data){
If the ajax method has it’s own way of getting data
, use that.
data = ajaxMethod.data ?
ajaxMethod.data.apply(this, arguments) :
Otherwise use the data passed in.
data;
Return the ajax method with data
and the type
provided.
return ajax(str || this[ajaxMethod.url || "_url"], data, ajaxMethod.type || "get")
}
}
can.Model = can.Observe({
fullName: "can.Model",
_reqs: 0,
/**
* @hide
* @function can.Model.setup
* @parent can.Model.static
*
* Configures
*
*/
setup : function(base){
create store here if someone wants to use model without inheriting from it
this.store = {};
can.Observe.setup.apply(this, arguments);
Set default list as model list
if(!can.Model){
return;
}
this.List = ML({Observe: this},{});
var self = this,
clean = can.proxy(this._clean, self);
go through ajax methods and set them up
can.each(ajaxMethods, function(method, name){
if an ajax method is not a function, it’s either a string url like findAll: “/recipes” or an ajax options object like {url: “/recipes”}
if ( ! can.isFunction( self[name] )) {
use ajaxMaker to convert that into a function that returns a deferred with the data
self[name] = ajaxMaker(method, self[name]);
}
check if there’s a make function like makeFindAll these take deferred function and can do special behavior with it (like look up data in a store)
if (self["make"+can.capitalize(name)]){
pass the deferred method to the make method to get back the “findAll” method.
var newMethod = self["make"+can.capitalize(name)](self[name]);
can.Construct._overwrite(self, base, name,function(){
increment the numer of requests
can.Model._reqs++;
var def = newMethod.apply(this, arguments);
var then = def.then(clean, clean);
then.abort = def.abort;
attach abort to our then and return it
return then;
})
}
});
if(self.fullName == "can.Model" || !self.fullName){
self.fullName = "Model"+(++modelNum);
}
Add ajax converters.
can.Model._reqs = 0;
this._url = this._shortName+"/{"+this.id+"}"
},
_ajax : ajaxMaker,
_makeRequest : makeRequest,
_clean : function(){
can.Model._reqs--;
if(!can.Model._reqs){
for(var id in this.store) {
if(!this.store[id]._bindings){
delete this.store[id];
}
}
}
return arguments[0];
},
/**
* @function can.Model.models models
* @parent can.Model.static
* @description Convert raw data into can.Model instances.
* @signature `can.Model.models(data[, oldList])`
* @param {Array<Object>} data The raw data from a `[can.Model.findAll findAll()]` request.
* @param {can.Model.List} [oldList] If supplied, this List will be updated with the data from
* __data__.
* @return {can.Model.List} A List of Models made from the raw data.
*
* @body
* `can.Model.models(data, xhr)` is used to
* convert the raw response of a [can.Model.findAll] request
* into a [can.Model.List] of model instances.
*
* This method is rarely called directly. Instead the deferred returned
* by findAll is piped into `models`. This creates a new deferred that
* resolves to a [can.Model.List] of instances instead of an array of
* simple JS objects.
*
* If your server is returning data in non-standard way,
* overwriting `can.Model.models` is the best way to normalize it.
*
* ## Quick Example
*
* The following uses models to convert to a [can.Model.List] of model
* instances.
*
* Task = can.Model.extend()
* var tasks = Task.models([
* {id: 1, name : "dishes", complete : false},
* {id: 2, name: "laundry", compelte: true}
* ])
*
* tasks.attr("0.complete", true)
*
* ## Non-standard Services
*
* `can.Model.models` expects data to be an array of name-value pair
* objects like:
*
* [{id: 1, name : "dishes"},{id:2, name: "laundry"}, ...]
*
* It can also take an object with additional data about the array like:
*
* {
* count: 15000 //how many total items there might be
* data: [{id: 1, name : "justin"},{id:2, name: "brian"}, ...]
* }
*
* In this case, models will return a [can.Model.List] of instances found in
* data, but with additional properties as expandos on the list:
*
* var tasks = Task.models({
* count : 1500,
* data : [{id: 1, name: 'dishes'}, ...]
* })
* tasks.attr("name") // -> 'dishes'
* tasks.count // -> 1500
*
* ### Overwriting Models
*
* If your service returns data like:
*
* {thingsToDo: [{name: "dishes", id: 5}]}
*
* You will want to overwrite models to pass the base models what it expects like:
*
* Task = can.Model.extend({
* models : function(data){
* return can.Model.models.call(this,data.thingsToDo);
* }
* },{})
*
* `can.Model.models` passes each intstance's data to `can.Model.model` to
* create the individual instances.
*/
models: function( instancesRawData, oldList ) {
until “end of turn”, increment reqs counter so instances will be added to the store
can.Model._reqs++;
if ( ! instancesRawData ) {
return;
}
if ( instancesRawData instanceof this.List ) {
return instancesRawData;
}
Get the list type.
var self = this,
tmp = [],
res = oldList instanceof can.Observe.List ? oldList : new( self.List || ML),
Did we get an array
?
arr = can.isArray(instancesRawData),
Did we get a model list?
ml = (instancesRawData instanceof ML),
Get the raw array
of objects.
raw = arr ?
If an array
, return the array
.
instancesRawData :
Otherwise if a model list.
(ml ?
Get the raw objects from the list.
instancesRawData.serialize() :
Get the object’s data.
instancesRawData.data),
i = 0;
if(typeof raw === 'undefined') {
throw new Error('Could not get any raw data while converting using .models');
}
!steal-remove-start
if ( ! raw.length ) {
steal.dev.warn("model.js models has no data.")
}
!steal-remove-end
if(res.length) {
res.splice(0);
}
can.each(raw, function( rawPart ) {
tmp.push( self.model( rawPart ));
});
We only want one change event so push everything at once
res.push.apply(res, tmp);
if ( ! arr ) { // Push other stuff onto `array`.
can.each(instancesRawData, function(val, prop){
if ( prop !== 'data' ) {
res.attr(prop, val);
}
})
}
at “end of turn”, clean up the store
setTimeout(can.proxy(this._clean, this), 1);
return res;
},
/**
* @function can.Model.model model
* @parent can.Model.static
* @description Convert raw data into a can.Model instance.
* @signature `can.Model.model(data)`
* @param {Object} data The data to convert to a can.Model instance.
* @return {can.Model} An instance of can.Model made with the given data.
*
* @body
* `can.Model.model(attributes)` is used to convert data from the server into
* a model instance. It is rarely called directly. Instead it is invoked as
* a result of [can.Model.findOne] or [can.Model.findAll].
*
* If your server is returning data in non-standard way,
* overwriting `can.Model.model` is a good way to normalize it.
*
* ## Example
*
* The following uses `model` to convert to a model
* instance.
*
* Task = can.Model.extend({},{})
* var task = Task.model({id: 1, name : "dishes", complete : false})
*
* tasks.attr("complete", true)
*
* `Task.model(attrs)` is very similar to simply calling `new Model(attrs)` except
* that it checks the model's store if the instance has already been created. The model's
* store is a collection of instances that have event handlers.
*
* This means that if the model's store already has an instance, you'll get the same instance
* back. Example:
*
* // create a task
* var taskA = new Task({id: 5, complete: true});
*
* // bind to it, which puts it in the store
* taskA.bind("complete", function(){});
*
* // use model to create / retrieve a task
* var taskB = Task.model({id: 5, complete: true});
*
* taskA === taskB //-> true
*
* ## Non-standard Services
*
* `can.Model.model` expects to retreive attributes of the model
* instance like:
*
*
* {id: 5, name : "dishes"}
*
*
* If the service returns data formatted differently, like:
*
* {todo: {name: "dishes", id: 5}}
*
* Overwrite `model` like:
*
* Task = can.Model.extend({
* model : function(data){
* return can.Model.model.call(this,data.todo);
* }
* },{});
*/
model: function( attributes ) {
if ( ! attributes ) {
return;
}
if ( typeof attributes.serialize === 'function' ) {
attributes = attributes.serialize();
}
var id = attributes[ this.id ],
model = (id || id === 0) && this.store[id] ?
this.store[id].attr(attributes, this.removeAttr || false) : new this( attributes );
if(can.Model._reqs){
this.store[attributes[this.id]] = model;
}
return model;
}
},
/**
* @prototype
*/
{
/**
* @function can.Model.prototype.isNew isNew
* @description Check if a Model has yet to be saved on the server.
* @signature `model.isNew()`
* @return {Boolean} Whether an instance has been saved on the server.
* (This is determined by whether `id` has a value set yet.)
*
* @body
* `isNew()` returns if the instance is has been created
* on the server. This is essentially if the [can.Model.id]
* property is null or undefined.
*
* new Recipe({id: 1}).isNew() //-> false
*/
isNew: function() {
var id = getId(this);
return ! ( id || id === 0 ); // If `null` or `undefined`
},
/**
* @function can.Model.prototype.save save
* @description Save a model back to the server.
* @signature `model.save([success[, error]])`
* @param {function} [success] A callback to call on successful save. The callback recieves
* the can.Model after saving.
* @param {function} [error] A callback to call when an error occurs. The callback receives the
* XmlHttpRequest object.
* @return {can.Deferred} A Deferred that resolves to the Model after it has been saved.
*
* @body
* `model.save([success(model)],[error(xhr)])` creates or updates
* the model instance using [can.Model.create] or
* [can.Model.update] depending if the instance
* [can.Model::isNew has an id or not].
*
* ## Using `save` to create an instance.
*
* If `save` is called on an instance that does not have
* an [can.Model.id id] property, it calls [can.Model.create]
* with the instance's properties. It also [can.trigger triggers]
* a "created" event on the instance and the model.
*
* // create a model instance
* var todo = new Todo({name: "dishes"})
*
* // listen when the instance is created
* todo.bind("created", function(ev){
* this //-> todo
* })
*
* // save it on the server
* todo.save(function(todo){
* console.log("todo", todo, "created")
* });
*
* ## Using `save` to update an instance.
*
* If save is called on an instance that has
* an [can.Model.id id] property, it calls [can.Model.create]
* with the instance's properties. When the save is complete,
* it triggers an "updated" event on the instance and the instance's model.
*
* Instances with an
* __id__ are typically retrieved with [can.Model.findAll] or
* [can.Model.findOne].
*
*
* // get a created model instance
* Todo.findOne({id: 5},function(todo){
*
* // listen when the instance is updated
* todo.bind("updated", function(ev){
* this //-> todo
* })
*
* // update the instance's property
* todo.attr("complete", true)
*
* // save it on the server
* todo.save(function(todo){
* console.log("todo", todo, "updated")
* });
*
* });
*
*/
save: function( success, error ) {
return makeRequest(this, this.isNew() ? 'create' : 'update', success, error);
},
/**
* @function can.Model.prototype.destroy destroy
* @description Destroy a Model on the server.
* @signature `model.destroy([success[, error]])`
* @param {function} [success] A callback to call on successful destruction. The callback recieves
* the can.Model as it was just prior to destruction.
* @param {function} [error] A callback to call when an error occurs. The callback receives the
* XmlHttpRequest object.
* @return {can.Deferred} A Deferred that resolves to the Model as it was before destruction.
*
* @body
* Destroys the instance by calling
* [Can.Model.destroy] with the id of the instance.
*
* recipe.destroy(success, error);
*
* This triggers "destroyed" events on the instance and the
* Model constructor function which can be listened to with
* [can.Model::bind] and [can.Model.bind].
*
* Recipe = can.Model.extend({
* destroy : "DELETE /services/recipes/{id}",
* findOne : "/services/recipes/{id}"
* },{})
*
* Recipe.bind("destroyed", function(){
* console.log("a recipe destroyed");
* });
*
* // get a recipe
* Recipe.findOne({id: 5}, function(recipe){
* recipe.bind("destroyed", function(){
* console.log("this recipe destroyed")
* })
* recipe.destroy();
* })
*/
destroy: function( success, error ) {
if(this.isNew()) {
var self = this;
var def = can.Deferred();
def.then(success, error);
return def.done(function(data) {
self.destroyed(data)
}).resolve(self);
}
return makeRequest(this, 'destroy', success, error, 'destroyed');
},
/**
* @description Listen to events on this Model.
* @function can.Model.prototype.bind bind
* @signature `model.bind(eventName, handler)`
* @param {String} eventName The event to bind to.
* @param {function} handler The function to call when the
* event occurs. __handler__ is passed the event and the
* Model instance.
* @return {can.Model} The Model, for chaining.
*
* @body
* `bind(eventName, handler(ev, args...) )` is used to listen
* to events on this model instance. Example:
*
* Task = can.Model.extend()
* var task = new Task({name : "dishes"})
* task.bind("name", function(ev, newVal, oldVal){})
*
* Use `bind` the
* same as [can.Observe::bind] which should be used as
* a reference for listening to property changes.
*
* Bind on model can be used to listen to when
* an instance is:
*
* - created
* - updated
* - destroyed
*
* like:
*
* Task = can.Model.extend()
* var task = new Task({name : "dishes"})
*
* task.bind("created", function(ev, newTask){
* console.log("created", newTask)
* })
* .bind("updated", function(ev, updatedTask){
* console.log("updated", updatedTask)
* })
* .bind("destroyed", function(ev, destroyedTask){
* console.log("destroyed", destroyedTask)
* })
*
* // create, update, and destroy
* task.save(function(){
* task.attr('name', "do dishes")
* .save(function(){
* task.destroy()
* })
* });
*
*
* `bind` also extends the inherited
* behavior of [can.Observe::bind] to track the number
* of event bindings on this object which is used to store
* the model instance. When there are no bindings, the
* model instance is removed from the store, freeing memory.
*/
_bindsetup: function(){
this.constructor.store[this.__get(this.constructor.id)] = this;
return can.Observe.prototype._bindsetup.apply( this, arguments );
},
/**
* @function can.Model.prototype.unbind unbind
* @description Stop listening to events on this Model.
* @signature `model.unbind(eventName[, handler])`
* @param {String} eventName The event to unbind from.
* @param {function} [handler] A handler previously bound with `bind`.
* If __handler__ is not passed, `unbind` will remove all handlers
* for the given event.
* @return {can.Model} The Model, for chaining.
*
* @body
* `unbind(eventName, handler)` removes a listener
* attached with [can.Model::bind].
*
* var handler = function(ev, createdTask){
*
* }
* task.bind("created", handler)
* task.unbind("created", handler)
*
* You have to pass the same function to `unbind` that you
* passed to `bind`.
*
* Unbind will also remove the instance from the store
* if there are no other listeners.
*/
_bindteardown: function(){
delete this.constructor.store[getId(this)];
return can.Observe.prototype._bindteardown.apply( this, arguments );;
},
Change id
.
___set: function( prop, val ) {
can.Observe.prototype.___set.call(this,prop, val)
If we add an id
, move it to the store.
if(prop === this.constructor.id && this._bindings){
this.constructor.store[getId(this)] = this;
}
}
});
can.each({
/**
* @function can.Model.makeFindAll
* @parent can.Model.static
*
* @signature `can.Model.makeFindAll: function(findAllData) -> findAll`
*
* Returns the external `findAll` method given the implemented [can.Model.findAllData findAllData] function.
*
* @params {can.Model.findAllData}
*
* [can.Model.findAll] is implemented with a `String`, [can.AjaxSettings ajax settings object], or
* [can.Model.findAllData findAllData] function. If it is implemented as
* a `String` or [can.AjaxSettings ajax settings object], those values are used
* to create a [can.Model.findAllData findAllData] function.
*
* The [can.Model.findAllData findAllData] function is passed to `makeFindAll`. `makeFindAll`
* should use `findAllData` internally to get the raw data for the request.
*
* @return {function(params,success,error):can.Deferred}
*
* Returns function that implements the external API of `findAll`.
*
* @body
*
* ## Use
*
* `makeFindAll` can be used to implement base models that perform special
* behavior. `makeFindAll` is passed a [can.Model.findAllData findAllData] function that retrieves raw
* data. It should return a function that when called, uses
* the findAllData function to get the raw data, convert them to model instances with
* [can.Model.models models].
*
* ## Caching
*
* The following uses `makeFindAll` to create a base `CachedModel`:
*
* CachedModel = can.Model.extend({
* makeFindAll: function(findAllData){
* // A place to store requests
* var cachedRequests = {};
*
* return function(params, success, error){
* // is this not cached?
* if(! cachedRequests[JSON.stringify(params)] ) {
* var self = this;
* // make the request for data, save deferred
* cachedRequests[JSON.stringify(params)] =
* findAllData(params).then(function(data){
* // convert the raw data into instances
* return self.models(data)
* })
* }
* // get the saved request
* var def = cachedRequests[JSON.stringify(params)]
* // hookup success and error
* def.then(success,error)
* return def;
* }
* }
* },{})
*
* The following Todo model will never request the same list of todo's twice:
*
* Todo = CachedModel({
* findAll: "/todos"
* },{})
*
* // widget 1
* Todo.findAll({})
*
* // widget 2
* Todo.findAll({})
*/
makeFindAll : "models",
/**
* @function can.Model.makeFindOne
* @parent can.Model.static
*
* @signature `can.Model.makeFindOne: function(findOneData) -> findOne`
*
* Returns the external `findOne` method given the implemented [can.Model.findOneData findOneData] function.
*
* @params {can.Model.findOneData}
*
* [can.Model.findOne] is implemented with a `String`, [can.AjaxSettings ajax settings object], or
* [can.Model.findOneData findOneData] function. If it is implemented as
* a `String` or [can.AjaxSettings ajax settings object], those values are used
* to create a [can.Model.findOneData findOneData] function.
*
* The [can.Model.findOneData findOneData] function is passed to `makeFindOne`. `makeFindOne`
* should use `findOneData` internally to get the raw data for the request.
*
* @return {function(params,success,error):can.Deferred}
*
* Returns function that implements the external API of `findOne`.
*
* @body
*
* ## Use
*
* `makeFindOne` can be used to implement base models that perform special
* behavior. `makeFindOne` is passed a [can.Model.findOneData findOneData] function that retrieves raw
* data. It should return a function that when called, uses
* the findOneData function to get the raw data, convert them to model instances with
* [can.Model.models models].
*
* ## Caching
*
* The following uses `makeFindOne` to create a base `CachedModel`:
*
* CachedModel = can.Model.extend({
* makeFindOne: function(findOneData){
* // A place to store requests
* var cachedRequests = {};
*
* return function(params, success, error){
* // is this not cached?
* if(! cachedRequests[JSON.stringify(params)] ) {
* var self = this;
* // make the request for data, save deferred
* cachedRequests[JSON.stringify(params)] =
* findOneData(params).then(function(data){
* // convert the raw data into instances
* return self.model(data)
* })
* }
* // get the saved request
* var def = cachedRequests[JSON.stringify(params)]
* // hookup success and error
* def.then(success,error)
* return def;
* }
* }
* },{})
*
* The following Todo model will never request the same todo twice:
*
* Todo = CachedModel({
* findOne: "/todos/{id}"
* },{})
*
* // widget 1
* Todo.findOne({id: 5})
*
* // widget 2
* Todo.findOne({id: 5})
*/
makeFindOne: "model",
makeCreate: "model",
makeUpdate: "model"
}, function( method, name ) {
can.Model[name] = function( oldMethod ) {
return function() {
var args = can.makeArray(arguments),
oldArgs = can.isFunction( args[1] ) ? args.splice( 0, 1 ) : args.splice( 0, 2 ),
def = pipe( oldMethod.apply( this, oldArgs ), this, method );
def.then( args[0], args[1] );
return the original promise
return def;
};
};
});
can.each([
/**
* @function can.Model.prototype.created created
* @hide
* Called by save after a new instance is created. Publishes 'created'.
* @param {Object} attrs
*/
"created",
/**
* @function can.Model.prototype.updated updated
* @hide
* Called by save after an instance is updated. Publishes 'updated'.
* @param {Object} attrs
*/
"updated",
/**
* @function can.Model.prototype.destroyed destroyed
* @hide
* Called after an instance is destroyed.
* - Publishes "shortName.destroyed".
* - Triggers a "destroyed" event on this model.
* - Removes the model from the global list if its used.
*
*/
"destroyed"], function( funcName ) {
can.Model.prototype[funcName] = function( attrs ) {
var stub,
constructor = this.constructor;
Update attributes if attributes have been passed
stub = attrs && typeof attrs == 'object' && this.attr(attrs.attr ? attrs.attr() : attrs);
triggers change event that bubble’s like handler( ‘change’,’1.destroyed’ ). This is used to remove items on destroyed from Model Lists. but there should be a better way.
can.trigger(this,"change",funcName)
!steal-remove-start
steal.dev.log("Model.js - "+ constructor.shortName+" "+ funcName);
!steal-remove-end
Call event on the instance’s Class
can.trigger(constructor,funcName, this);
};
});
Model lists are just like Observe.List
except that when their items are
destroyed, it automatically gets removed from the list.
/**
* @constructor can.Model.List
* @inherits can.Observe.List
* @parent canjs
* @download can/model
* @test can/model/qunit.html
*
* Works exactly like [can.Observe.List] and has all of the same properties,
* events, and functions as an observable list. The only difference is that
* when an item from the list is destroyed, it will automatically get removed
* from the list.
*
* ## Creating a new Model List
*
* To create a new model list, just use `new {model_name}.List(ARRAY)` like:
*
* var todo1 = new Todo( { name: "Do the dishes" } ),
* todo2 = new Todo( { name: "Wash floors" } )
* var todos = new Todo.List( [todo1, todo2] );
*
* ### Model Lists in `can.Model`
* [can.Model.findAll can.Model.findAll] or [can.Model.models] will
* almost always be used to return a `can.Model.List` object, even though it
* is possible to create new lists like below:
*
* var todos = Todo.models([
* new Todo( { name: "Do the dishes" } ),
* new Todo( { name: "Wash floors" } )
* ])
*
* todos.constructor // -> can.Model.List
*
* // the most correct way to get a can.Model.List
* Todo.findAll({}, function(todos) {
* todos.constructor // -> can.Model.List
* })
*
* ### Extending `can.Model.List`
*
* Creating custom `can.Model.Lists` allows you to extend lists with helper
* functions for a list of a specific type. So, if you wanted to be able to
* see how many todos were completed and remaining something could be written
* like:
*
* Todo.List = can.Model.List({
* completed: function() {
* var completed = 0;
* this.each(function(i, todo) {
* completed += todo.attr('complete') ? 1 : 0
* })
* return completed;
* },
* remaining: function() {
* return this.attr('length') - this.completed();
* }
* })
*
* Todo.findAll({}, function(todos) {
* todos.completed() // -> 0
* todos.remaining() // -> 2
* });
*
* ## Removing models from model list
*
* The advantage that `can.Model.List` has over a traditional `can.Observe.List`
* is that when you destroy a model, if it is in that list, it will automatically
* be removed from the list.
*
* // Listen for when something is removed from the todos list.
* todos.bind("remove", function( ev, oldVals, indx ) {
* console.log(oldVals[indx].attr("name") + " removed")
* })
*
* todo1.destroy(); // console shows "Do the dishes removed"
*
*
*/
var ML = can.Model.List = can.Observe.List({
setup: function(params){
if( can.isPlainObject(params) && ! can.isArray(params) ){
can.Observe.List.prototype.setup.apply(this);
this.replace(this.constructor.Observe.findAll(params))
} else {
can.Observe.List.prototype.setup.apply(this,arguments);
}
},
_changes: function(ev, attr){
can.Observe.List.prototype._changes.apply(this, arguments );
if(/\w+\.destroyed/.test(attr)){
var index = this.indexOf(ev.target);
if (index != -1) {
this.splice(index, 1);
}
}
}
})
return can.Model;
})


Apache Geronimo is a new effort coordinated by the Apache Software Foundation to make a J2EE compatible container. The core members of the Jetty development team are founding committer on the geronimo incubator project and Jetty 5.1 is being used as the default web container.


Administration
New
Approved
Denied
#
Username
Form
Submitted
#
Username
Form
Submitted
#
Username
Form
Submitted
×
Save Changes
Upvote
Downvote
Submit a K33N RP Application
Please select an application form:
Submit Application
Success:
The operation was successful.
Error:


Built by berto
View Code Source
Kerbal.me is a fan-made website
and is in no way affiliated with the KSP team
whoops


Home
Profile
messages
Docs
Dave Gamache
I wish i was a little bit taller,wish iwas a
baller,wish i had a garl...also.


Our Merchants Need Our Help!
Friends,
I believe the Town of Castine can and should do more to support our merchants. We often talk about attracting families to Castine to rent or buy, but when you ask most folks how they found Castine they’ve either been here their whole lives (summer, student, long-time resident), or they discovered it on a vacation or a day-trip.
When I helped start the Castine Farmers’ Market almost a decade ago, there were vendors and farmers excited to sell who had never actually been to Castine before. They lived in Ellsworth. That should not happen, and I think the town can do a better job of advertising the facilities we have and adding facilities we don’t have to attract more day-trippers and weekend vacationers.
That starts with supporting our merchants. Speaking with the head of the Castine Merchant’s Association yesterday, I discovered that the Visitor’s Center has been a huge success the past few years, but that the merchants need help keeping it going. I would like to work with the merchant’s association, perhaps attending their meetings as a non-voting participant, and working through the challenges of running a business in Castine and addressing their concerns with honesty and optimism.
Let’s build a stronger Castine, one business at a time!


Emoties in kleuren
Welke kleuren kunnen worden gebruikt bij welke emoties?
Exitement
Strength
Love
Energy
Confidence
Success
Bravery
Sociability
Creativity
Happiness
Warmth
Cheer
Nature
Healing
Freshness
Quality
Trust
Peace
Loyalty
Competence
Compassion
Sincerity
Sophstication
Sweet
Royalty
Luxury
Spirituality
Ambition
Dependable
Rugged
Trustworthy
Simple
Formality
Dramatic
Sophistication
Security
Clean
Simplicity
Innicence
Honest
Podcast voorbeeld met kleur
Wat voor invloed hebben verschillende kleuren op een podcast? Maken de kleuren de emoties van de sprekers duidelijker, of zorgt het juist voor meeer complexiteit?
Well, a woman was cleaning her garage and she moved a box, and there was a crocodile. So I had to ask her, like a crocodile, like, big, with-- she's like, yeah, it's going snap, snap at me.
She says that was an easy one, of course-- call Animal Care and Control. But she also helped with this call.
I had a woman who was-- I guess she had an unruly teenager. Even on the phone they were arguing. And she just couldn't take it. She couldn't take the disrespect, and she wanted help.
Natashia found herself off the grid, so she improvised. She's not allowed to give personal advice, which she told the woman. So she basically said the only thing she could say in this situation that they did not train her for-- I understand. She said I understand over and over. The woman kept her on the phone for 45 minutes, and it seemed to help.
Podcast voorbeeld van thisisamericanlife.org
Maken kleuren de emoties duidelijker?


Old Command Line Commands¶
In GeoMesa 1.3.0 some command names have changed. Please reference the chart below for more information.
Accumulo Command Line Tools¶
| Old | New |
|---|---|
| add-attribute-index | add-attribute-index |
| add-index | add-index |
| create | create-schema |
| deletecatalog | delete-catalog |
| deletefeatures | delete-features |
| deleteraster | delete-raster |
| describe | get-schema |
| env | env |
| explain | explain |
| export | export |
| genavroschema | gen-avro-schema |
| getsft | get-sft-config |
| help | help |
| ingest | ingest |
| ingestraster | ingest-raster |
| keywords | keywords |
| list | get-names |
| queryrasterstats | query-raster-stats |
| removeschema | remove-schema |
| stats-analyze | stats-analyze |
| stats-bounds | stats-bounds |
| stats-count | stats-count |
| stats-histogram | stats-histogram |
| stats-top-k | stats-top-k |
| tableconf | config-table |
| version | version |
Kafka Command Line Tools¶
| Old | New |
|---|---|
| create | create-schema |
| describe | get-schema |
| help | help |
| keywords | keywords |
| listen | listen |
| list | get-names |
| removeschema | remove-schema |
| version | version |


Early on in his public ministry, Jesus gave what is perhaps his most famous sermon: The Sermon on the Mount. In it, Jesus provided, among other things, a recipe for what the conduct of his followers should look like.
One of these teachings is never far from my mind:
“You are the salt of the earth, but if salt has lost its taste, how shall its saltiness be restored? It is no longer good for anything except to be thrown out and trampled under people’s feet.”
~ Matthew 5:13 ESV
For a long time, I took this verse rather simplistically: “As a follower of Christ, I must to make the world more flavorful, appetizing, etc.” That felt rather banal to me, but I had no other flash of inspiration; I left it as-is.
The truth is, though I might have pretended otherwise, I didn’t really know what it meant to be “salt” to the world.
TL;DR
Jesus’ command to be the “salt of the earth” is becoming clearer to me as more time goes on.
Diving In
Some time later, I looked into the Greek translation of this verse. Several words popped out to me:
- “lost its taste” is the translation for Greek word mórainó 1. Although this word can technically translate as tasteless, it more generally means “to lose usefulness.” 2
- “no longer good for anything” is the translation for the Greek word ischuó 3. This translates as “being unable to [have] embodied strength that “gets into the fray” (action)”.
Around the same time, I was reminded of a blindingly obvious principle that we don’t often think about in today’s world. In the ancient world, flavoring wasn’t salt’s only (or, arguably, primary) purpose; it’s also acted a preservative. Quite simply, salt was used to make sure things didn’t spoil further. This was a potent concept in antiquity 4:
Salt’s preservative ability was a foundation of civilization. It eliminated dependency on the seasonal availability of food and allowed travel over long distances.
Something began to stir in my mind.
The pieces began to assemble themselves:
- Jesus calls his followers to be the “salt of the earth.” In the spirit of preservation, one meaning of this must have been, “Your presence and actions – your ability to ‘get into the fray’ – should save your corner of the world from spoiling.”
- If one of his followers should “lose his taste” (i.e., become unable to do his preservative duty), his worth would be all but eliminated.
When I finally began to understand this verse’s nature – especially in my world – I began to see life in a more serious way. I started to see the rot. Hurts, broken relationships, downtrodden journeys, anger, malice, bitterness, jealousy…none of it is very unique, unfortunately, but it was all there, around me and in me.
The world’s hurts were far bigger than myself, but I began to feel responsibility (not only for adding to those hurts, but especially for neglecting my role as a salve). I feared that laziness would result in being “thrown out and trampled under people’s feet.”
All of this crystalized into one central thought: I needed to change the way I faced each day.
The Way Forward
A follower of Jesus should make the world around him better. He should inject both goodness and kindness into it. He should help shoulder the burdens of others and share what he has in his own life. He should show up in life’s most difficult moments and jump into the fray. To him, that should be the salt.
Tomorrow, my day will begin like any other. I’ll spend important time with my wife. I’ll interact with employees, coworkers, clients, and friends through a bevy of experiences. I’ll chat with family. In these experiences, I want to be salt. I want to celebrate the victories and accomplishments of others. I want to speak truth to those whose lives need it. I want to cry with and hug those who are hurting and shaken. In all things, I want my corner of the world to hurt less because of Jesus’ command to me: be the salt.
I won’t be perfect; God knows that my own struggles, deficiencies, judgements, and biases will deflect me from my purpose. I will clang around, trying to find my way amidst a cacophony of troubles. I will undoubtedly fail and ask forgiveness for those failings.
In all things, however, my commitment to my corner of the world remains the same: every single day I am alive, I will get into the fray with you. I will strive to be the salt.
- http://biblehub.com/greek/3471.htm ↩
- According to Strong’s Exhaustive Concordance, the full definition is “to become insipid; figuratively, to make (passively, act) as a simpleton — become fool, make foolish, lose savour.” ↩
- http://biblehub.com/greek/2480.htm ↩
- SHELF LIFE: Salt, History’s Mover and Shaker ↩


--- title: Overview | Zest fabricator: true ---
UI toolkit for building highly-modular design systems for rapid web page development.
This guide contains real working examples, code snippets, documentation, and style guidelines.
Start by adding the following files to your page:
<link rel="stylesheet" href="assets/toolkit/styles/toolkit.css">
<script src="assets/toolkit/scripts/toolkit.js"></script>
The repository can be found on Github


{{ define "main" }}
{{ .Date.Format "Monday, January 2, 2006" }}
Do you want to show your support? Like what you're reading? Tip me at cryptosafu.eth / 0x648d3d0438b1e4c7eb641f67e38ca86cf975ca8e (see QR code) ...or spread the word on Twitter!


Flyght Club
4.48 35,457 reviews #1 Finest Authentic Sneakers Store in Jakarta
Weekly Revenue Overview
7 - 13 May, 2019
$74,729.00
+21% from last week
205 sales in the past 7 days
Highest revenue since 2 weeks ago
Top Items
Sorted based on comparison with yesterday sales
Weekly Revenue Overview
Observe and manage your next decision
for your products properly
Shipping Performance
Calculated based on customer reviews


It's the End of the World as We Know It!
10 Seconds Remaining
Question
Do you know how it all ends?
Answers1
Answers2
Answers3
Answers4


--- layout: default ---
Data portals, APIs, tools, tutorials and free developer infrastructure for #Ecohack-ing in cities across the world.
This page is still a work in progress. If you'd like to help out, submit a pull request on Github.
One of the best places to get open government data is from their official data portal. Australia, Spain, United Kingdom and the US Federal Government post their data on these portals for anyone to access for free.
Open data portals and APIs available in EcoHack locations. Are we missing any? Want to list open data that powered your EcoHack project? Add them to our list!
| Title | Category | Description |
|---|
Free services and computing infrastructure for EcoHack developers. Are we missing any? Add them to our list!
| Title | Provider | Description |
|---|


Leslie is the team leader and was in charge of most of the back-end work when making DIY Tracker
Travis is the teams senior REACT developer and worked to make sure that several of the websites functions is up and running.
Cory is the teams junior REACT developer and worked in tandem with Travis to make sure the website functioned properly.
Tanner is one of the teams UI designers and came up with the home page's layout and color scheme.
Doni is the teams other UI designer and worked in tandem with Tanner to come up with the websites design and layout.
The team behind DIY Tracker are all students currently attending Lambda School. DIY Tracker was originally a project assigned by the school only for a grade but quickly became the teams own passion project and working on this project brought them together with their passion for creating.
If there are two traits that allowed humanity to thrive, it's curiousity and the ability to create things. Here at DIY Tracker, our ultimate goal is to bring people together by giving everyone the opportunity to create things, and share that process with others so that others may recreate said thing or put their own creative spin on it.


I have been meaning to write a post on configuration patterns in the .NET framework. Just about any app we write has some configuration data associated with it, and it sometimes gets ignored until the app is in production or at the very least until very late in the development cycle.
Microsoft provides a lot of options out of the box with the .NET framework, and even more through the Configuration Management Application Block. Most configuration concerns are the same whether it is a Windows app or a Web app, but since there are a lot of different options, how do we pick what is best for our application?
Before we get into any .NET-specific items, here are some general guidelines that I have used in the past:
Don’t rely on implicit configuration - allow the app to be explicitly configured programmatically
In the case of a library, we’ll want to be able to override configuration as needed for testing and special use cases. For example, I have a library for accessing CRM that has a configuration section. In some cases I want to test different configurations against different CRM servers in my tests, so I need a way to override the configuration file. Yes, you can do this in a convoluted way using the .NET framework, but it is much better to bake this into the library design. Another scenario is doing data export/import between multiple servers. I have a few tools that use the library I mentioned to take data from one CRM installation and move it to another one. If the library only supported one configuration section we’d have to build this functionality into the library, which is a concern that shouldn’t be part of the underlying, but of the application.
However, a very nice feature of a library is to have a default configuration, as well as a default configuration location. This means that if we provide a config specifically it will override everything else, but if not, we can make it easy on ourselves by providing some sensible defaults or by using the app.config file if it exists. This kind of fallthrough can be a little tricky, so it is worth thinking about up-front so that things go smoothly and predictably as development progresses. Configuration behavior is one of those things that is tough to change once it gets into production.
Use separate classes to hold configuration data
This should go without saying, but I’ll say it anyway - don’t put configuration variables into any other classes. Keep these concerns separate. If a class needs the configuration data, use composition to make the configuration object a private member. Another thing to watch out for is not using a configuration data in their own objects at all. I’ve seen a lot of project where configuration data was scattered all over the place. Don’t do this!
I’m going to follow up with some code examples soon so stay tuned.


{% extends "base.html" %} {% import "bootstrap/wtf.html" as wtf %} {% block page_content %}
ID Name Mission Email


This project could create the largest dataset of longitudinal tracking of moles and
may provide insights into the progression of moles to melanoma.
You may or may not personally benefit from this study. However, using the Mole
Mapper app may help you monitor your moles over time. You will be able to share your
mole photos and measurements as you wish, with your medical doctor and anyone you
choose. You will also receive alerts about future melanoma educational and community
events, free skin cancer screenings and/or skin cancer research opportunities from
the War on Melanoma™ Community Registry.


{% extends "registration/base_form.html" %} {% block title %}Register{% endblock %} {% block form_header %}Register{% endblock %} {% block form_extra %}Already have an account? Login to your account!{% endblock %}