Class for working with record sets.
| Properties | |
|---|---|
|
protected
|
Internal variable for storing the dbworker. |
|
protected
|
Internal array for storing the target fields. |
|
protected
|
Internal array for storing the key fields. These are the fields that are used to uniquely identify a record. |
|
protected
|
Internal variable for storing the target table name. |
| Methods | |
|---|---|
|
protected
|
This is internal auxiliary function for converting an array to a where clause. |
|
public
|
Commits the transation. |
|
public
|
Counts records based on the where clause. |
|
public
|
Counts records based on the query. |
|
public
|
Deletes records by a given where clause. |
|
public
|
Deletes records by a given query. |
|
public
|
Defines the field mappings for working with record sets based on a table. |
|
public
|
Defines the field mappings for working with record sets based on a query. |
|
public
|
Escapes the string so that it can be used in the query without causing an error. |
|
public
|
Formats the date to a string compatible for the corresponding database. |
|
public
|
Formats the date/time to a string compatible for the corresponding database. |
|
public
|
Returns the dbworker to be used for working with the database. |
|
public
|
Loads a record into an array in the form "field_name" => "value" based on a table. |
|
public
|
Loads a record into an array in the form "field_name" => "value". |
|
public
|
Loads records into an array in the form |
|
public
|
Loads records into an array in the form |
|
public
|
Checks that the value is a number and returns it, or returns the string NULL if the value is empty. |
|
protected
|
This is internal auxiliary function for saving a record set from an array with key field values as array dimensions. |
|
public
|
Escapes the string so that it can be used in the query without causing an error or returns the sstring NULL if the string is empty. |
|
public
|
Rolls back the transation. |
|
public
|
Saves a record from an array in the form "field_name" => "value" into the table. |
|
public
|
Saves records from an array in the form $records["key_field1"]["key_field2"]["key_fieldN"]["field_name"] = "value" into the table. |
|
public
|
Sets the dbworker to be used for working with the database. |
|
public
|
Starts the transation. |
|
protected
|
This is internal auxiliary function for checking that the recordset manager is intialized correctly. |
Internal variable for storing the dbworker.
Internal array for storing the target fields.
Internal array for storing the key fields. These are the fields that are used to uniquely identify a record.
Internal variable for storing the target table name.
This is internal auxiliary function for converting an array to a where clause.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $where_clause | by reference | string|array |
The where clause that should be checked. If an array of keys is passed, the where clause is build based on it. |
It might throw an exception in the case if a field for the clause wad not described by the initialization.
Commits the transation.
It might throw an exception in the case of any errors.
Counts records based on the where clause.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $where_clause | by value | string|array |
The where clause that should restrict the result. If an array of keys is passed, the where clause is build automatically based on it. |
Returns the number of records.
Counts records based on the query.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $query | by value | string |
The query to be used. |
Returns the number of records.
Deletes records by a given where clause.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $where_clause | by value | string|array |
The where clause that should restrict the result. If an array of keys is passed, the where clause is build automatically based on it. |
It might throw an exception in the case of any errors:
Deletes records by a given query.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $query | by value | string |
The query to be used. |
It might throw an exception in the case of any errors:
Defines the field mappings for working with record sets based on a table.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $table | by value | string |
The name of the table. |
|
| $fields | by value | array |
The array of fields in the form "field name" => "field type". |
|
| $key_fields | by value | array |
The array of key fields. These are the fields that are used to uniquely identify a record. |
It might throw an exception in the case of any errors:
Defines the field mappings for working with record sets based on a query.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $fields | by value | array |
The array of fields in the form "field name" => "field type". |
|
| $key_fields | by value | array |
The array of key fields. These are the fields that are used to uniquely identify a record. |
It might throw an exception in the case of any errors:
Escapes the string so that it can be used in the query without causing an error.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $str | by value | string |
The string to be escaped. |
Returns the escaped string.
Formats the date to a string compatible for the corresponding database.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $date | by value | int |
The date value as timestamp. |
Returns the string representation of the date compatible for the corresponding database.
Formats the date/time to a string compatible for the corresponding database.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $datetime | by value | int |
The date/time value as timestamp. |
Returns the string representation of the date/time compatible for the corresponding database.
Returns the dbworker to be used for working with the database.
Returns the dbworker to be used for working with the database.
Loads a record into an array in the form "field_name" => "value" based on a table.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $record | by reference | array |
The target array where the data should be loaded. |
|
| $where_clause | by value | string|array |
The where clause that should restrict the result to one record. If an array of keys is passed, the where clause is build automatically based on it. |
It might throw an exception in the case of any errors:
Loads a record into an array in the form "field_name" => "value".
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $record | by reference | array |
The target array where the data should be loaded. |
|
| $query | by value | string |
The query to be used. |
It might throw an exception in the case of any errors:
Loads records into an array in the form
$records["key_field1"]["key_field2"]["key_fieldN"]["field_name"] = "value".
baed on a table.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $records | by reference | array |
The target array where the data should be loaded. |
|
| $where_clause | by value | string|array |
The where clause that should restrict the result. If an array of keys is passed, the where clause is build automatically based on it. |
|
| $order_clause | by value | string | "" |
The order clause to sort the results. |
| $limit | by value | int | 0 |
The limit how many records shoud be loaded. 0 for unlimited. |
It might throw an exception in the case of any errors:
Loads records into an array in the form
$records["key_field1"]["key_field2"]["key_fieldN"]["field_name"] = "value".
baed on a query.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $records | by reference | array |
The target array where the data should be loaded. |
|
| $query | by value | string |
The query to be used. |
It might throw an exception in the case of any errors:
Checks that the value is a number and returns it, or returns the string NULL if the value is empty.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $str | by value | string |
The string to be escaped. |
Returns the escaped string.
It might throw an exception in the case of any errors.
This is internal auxiliary function for saving a record set from an array with key field values as array dimensions.
It expand this multidimensional array into the set of flat records suitable for call \SmartFactory\RecordsetManager::saveRecord().
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $subarray | by reference | array |
The current subarray ro be processed. |
|
| $key_fields | by value | array |
The array of the key fields. These are the fields that are used to uniquely identify a record. |
|
| $parent_values | by reference | array |
The array of the values of the foreign keys in the form "field_name" => "value". |
|
| $record | by reference | array |
The array where the resulting flat record is built. |
|
| $identity_field | by value | string |
The name of the identity field if exists. If the identity field is specified and the record does not exist yet in the table, the source array is extended with a pair "identity field" => "identity value" issued by the database by this insert operation. |
It might throw an exception in the case of any errors:
Escapes the string so that it can be used in the query without causing an error or returns the sstring NULL if the string is empty.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $str | by value | string |
The string to be escaped. |
Returns the escaped string.
Rolls back the transation.
It might throw an exception in the case of any errors.
Saves a record from an array in the form "field_name" => "value" into the table.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $record | by reference | array |
The source array with the data to be saved. |
|
| $where_clause | by value | string|array |
The where clause that should be used to define whether a record should be inserted or updated. If an array of keys is passed, the where clause is build automatically based on it. |
|
| $identity_field | by value | string | "" |
The name of the identity field if exists. If the identity field is specified and the record does not exist yet in the table, the source array is extended with a pair "identity field" => "identity value" issued by the database by this insert operation. |
It might throw an exception in the case of any errors:
Saves records from an array in the form $records["key_field1"]["key_field2"]["key_fieldN"]["field_name"] = "value" into the table.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $records | by reference | array |
The source array with the data to be saved. |
|
| $parent_values | by value | array | [] |
If this recordset is a child subset of data to be saved, you can set the values of the foreign keys in the form "field_name" => "value". |
| $identity_field | by value | string | "" |
The name of the identity field if exists. If the identity field is specified and the record does not exist yet in the table, the source array is extended with a pair "identity field" => "identity value" issued by the database by this insert operation. |
It might throw an exception in the case of any errors:
Sets the dbworker to be used for working with the database.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $dbworker | by value | \SmartFactory\DatabaseWorkers\DBWorker |
The dbworker to be used for working with the database. |
Starts the transation.
It might throw an exception in the case of any errors.
This is internal auxiliary function for checking that the recordset manager is intialized correctly.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $type | by value | string |
The type of validation - table or query. |
It might throw an exception in the case of any errors:


-
iPhone camera evolution: How does the iPhone 6 camera compare to previous ...
snapsnapsnap.photos
How does the iPhone 6 camera stack up against previous hardware? In her ongoing series, professional iPhone photographer Lisa Bettany takes a hard ...
-
Hyperlapse Lets You Selfielapse: This Week in Social Media |
www.socialmediaexaminer.com
Social media news and new developments making social media marketing easier. (Selfielapse, Facebook links, Facebook app, AmazonWishList, Promoted ...
-
The Clock Is Ticking: How to Save Money Booking Your Holiday Travel
lifehacker.com
The holiday season is fast approaching, and if you're planning a trip out of town to visit family or friends, time is running out to get the best ...
-
The Dos and Don'ts of Making Excuses at Work
lifehacker.com
Most bosses just plain don't want to hear excuses at all, but even still, there are some time you don't get a choice. The Wall Street Journal breaks ...
-
How to Stop Over-Analyzing Every Conversation
lifehacker.com
During every conversation I have, I analyze everything about the other person. I'm looking at their eyes, watching body language, and listening for ...
-
Apple’s IPhone Software Snafu Has Links to Flawed Maps - Bloomberg
www.bloomberg.com
Apple’s IPhone Software Snafu Has Links to Flawed Maps
-
Brainstorm Alone First, Then Collaborate on the Execution
lifehacker.com
Getting a group together to brainstorm an idea can seem productive. But too many ideas can make progress impossible. To really get moving, give ...
-
How To Boost and Maintain Your Credit Score, Explained with Apple Pie
lifehacker.com
We've discussed good credit habits in the past, but the way your credit score is weighted and how you can improve it can still be a murky topic. This ...
-
Apple on 'BendGate': A Bend in an iPhone Is Extremely Rare
mashable.com
Apple opens up about iPhone design and defends itself over charges that the iPhone 6 Plus bends too easily.
-
Apple has released iOS 8.0.2, which addresses the issues caused by the ...
lifehacker.com
Apple has released iOS 8.0.2, which addresses the issues caused by the previous update, among other fixes. Read more on 9to5 Mac.
-
The Best Way to Store Leftover Pizza in the Fridge
lifehacker.com
Pizza is the king of foods for many reasons, but the fact that leftovers are almost guaranteed is one of the best. For retaining optimum quality--and ...
-
Be Picky About Clients' Future Potential When Freelancing
lifehacker.com
When you're a freelancer, it's tempting to say yes to any opportunity that comes your way. However, it's okay to be choosy and pick the clients you ...
-
Twitter Reacts to Botched Apple iOS 8.0.1 Update
mashable.com
iPhone users reported issues with cell signal and Apple's Touch ID, and as a result, the company pulled the download.
-
Making the Case for Content Moderation
www.socialmediatoday.com
"Your submission awaits moderation." Whether you manage an online community or you’ve contributed to a website, you’re probably familiar with that ...
-
Four Ways to Measure the Impact of Social Media: A Case Study |
www.socialmediaexaminer.com
Do you need to justify social media efforts to company leaders? This case study shows how SAP North America tracks the impact of their social media.
-
iPhone 6 Review: The Phone That Lured Me Back to Apple
gizmodo.com
I'd rather get this out of the way up front: the iPhone 6 is the best smartphone you can buy. In fact, it's better than that. The iPhone 6 convinced ...
-
8 Words That Are Older Than You Think by Dictionary.com
dictionary.reference.com
Copyright © 2014 Dictionary.com, LLC. All rights reserved.
-
Do You Know Who Controls Your Website?
www.socialmediatoday.com
Domain Name Registration Information: It is imperative that you know - and have written down, backed up in the cloud and stored on a flash drive in a ...
-
Social Media Today
www.socialmediatoday.com
Join us for the premier social media, marketing, and communications event, brought to you for a second year by SMT. Summer pricing ends August 29, so ...
-
New this week on Foxtel: Cheese Slices, Ryder Cup, The Carbonaro Effect, ...
community.foxtel.com.au
Will Studd is back this week with Cheese Slices Season 7 on Lifestyle FOOD New shows and live events this week on Foxtel IT'S A double-shot of magic ...
-
Melbourne shooting: Man being investigated over terrorism shot dead after ...
www.abc.net.au
Police and forensic officers investigate the scene of a fatal shooting of an 18-year-old Narre Warren man at Endeavour Hills Police Station.
-
How to Find Your Drafts and Lists in Twitter's New iPhone App
mashable.com
The latest Twitter iPhone app update has many confused about here to find their drafts and lists. Here's where they went.
-
Steam Improves Search, Adds Curators to Make Finding Games Easier
lifehacker.com
Steam has always been a great place to find deals on games. Finding the right game amongst the library is a bit harder. Today, Steam makes it easier ...
-
Get Referrals From Existing Members To Invite Newcomers - The Online ...
www.feverbee.com
We all know the magic of referrals. Someone tells a friend about you, you contact the friend. Usually this leads to a positive outcome for all. We ...
-
3 Maxims of a Standout Company Blog
www.socialmediatoday.com
You’ve just been tasked with generating new and engaging content that will lure prospective customers to your company. What do you do now?
-
iPhone 6 and iPhone 6 Plus: Preliminary Results
www.anandtech.com
While we’re still working on the full review, I want to get out some preliminary results for the iPhone 6. For now, this means some basic performance ...
-
Get Perfect French Toast by Drying Your Bread in the Oven First
lifehacker.com
French toast is a classic breakfast staple, but it's hard to find the perfect balance of moisture. Drying out your bread slices beforehand can keep ...
-
Secure Loose Buttons with Twist Ties
lifehacker.com
We've all had to deal with a loose or popped button. Twist ties make a good quick fix if you can't get a hold of some proper replacement string and ...


This tutorial shows you the steps to follow to create a distributed version of the classic Hello World program using Java Remote Method Invocation (Java RMI). While you work through this example, you will probably come up with a number of related questions. You may find answers in the Java RMI FAQ.
The distributed Hello World example uses a simple client to make a remote method invocation to a server which may be running on a remote host. The client receives the "Hello, world!" message from the server.
This tutorial has the following steps:
Hello.java
- a remote
interfaceServer.java
- a remote
object implementation that implements the remote interfaceClient.java
- a simple
client that invokes a method of the remote interfaceexample.hello.Server
, which implements a remote
interface.
java.rmi.Remote
and declares a set of remote
methods. Each remote method must declare
java.rmi.RemoteException
(or a superclass of
RemoteException
) in its throws
clause, in
addition to any application-specific exceptions.
Here is the interface definition for the remote interface used
in this example, example.hello.Hello
. It declares just
one method, sayHello
, which returns a string to the
caller:
package example.hello; import java.rmi.Remote; import java.rmi.RemoteException; public interface Hello extends Remote { String sayHello() throws RemoteException; }Remote method invocations can fail in many additional ways compared to local method invocations (such as network-related communication problems and server problems), and remote methods will report such failures by throwing a
java.rmi.RemoteException
.
main
method that creates an instance of the remote
object implementation, exports the remote object, and then binds
that instance to a name in a Java RMI registry. The class
that contains this main
method could be the
implementation class itself, or another class entirely.
In this example, the main
method for the server is
defined in the class Server
which also implements the
remote interface Hello
. The server's main
method does the following:
Server
.
Descriptions for writing this server class follow the source code:
package example.hello; import java.rmi.registry.Registry; import java.rmi.registry.LocateRegistry; import java.rmi.RemoteException; import java.rmi.server.UnicastRemoteObject; public class Server implements Hello { public Server() {} public String sayHello() { return "Hello, world!"; } public static void main(String args[]) { try { Server obj = new Server(); Hello stub = (Hello) UnicastRemoteObject.exportObject(obj, 0); // Bind the remote object's stub in the registry Registry registry = LocateRegistry.getRegistry(); registry.bind("Hello", stub); System.err.println("Server ready"); } catch (Exception e) { System.err.println("Server exception: " + e.toString()); e.printStackTrace(); } } }
The implementation class Server
implements the
remote interface Hello
, providing an implementation
for the remote method sayHello
. The method
sayHello
does not need to declare that it throws any
exception because the method implementation itself does not throw
RemoteException
nor does it throw any other checked
exceptions.
Note: A class can define methods not specified in the remote interface, but those methods can only be invoked within the virtual machine running the service and cannot be invoked remotely.
main
method of the server needs to create the
remote object that provides the service. Additionally, the remote
object must be exported to the Java RMI runtime so that it
may receive incoming remote calls. This can be done as follows:
Server obj = new Server(); Hello stub = (Hello) UnicastRemoteObject.exportObject(obj, 0);The static method
UnicastRemoteObject.exportObject
exports the supplied remote object to receive incoming remote
method invocations on an anonymous TCP port and returns the stub
for the remote object to pass to clients. As a result of the
exportObject
call, the runtime may begin to listen on
a new server socket or may use a shared server socket to accept
incoming remote calls for the remote object. The returned stub
implements the same set of remote interfaces as the remote object's
class and contains the host name and port over which the remote
object can be contacted.
Note: For details on how to generate stub classes, see
the tools documentation for rmic
[UNIX, Windows]. For details on how
to deploy your application along with pregenerated stub classes,
see the codebase tutorial.
For a caller (client, peer, or applet) to be able to invoke a method on a remote object, that caller must first obtain a stub for the remote object. For bootstrapping, Java RMI provides a registry API for applications to bind a name to a remote object's stub and for clients to look up remote objects by name in order to obtain their stubs.
A Java RMI registry is a simplified name service that allows clients to get a reference (a stub) to a remote object. In general, a registry is used (if at all) only to locate the first remote object a client needs to use. Then, typically, that first object would in turn provide application-specific support for finding other objects. For example, the reference can be obtained as a parameter to, or a return value from, another remote method call. For a discussion on how this works, please take a look at Applying the Factory Pattern to Java RMI.
Once a remote object is registered on the server, callers can look up the object by name, obtain a remote object reference, and then invoke remote methods on the object.
The following code in the server obtains a stub for a registry on the local host and default registry port and then uses the registry stub to bind the name "Hello" to the remote object's stub in that registry:
Registry registry = LocateRegistry.getRegistry(); registry.bind("Hello", stub);The static method
LocateRegistry.getRegistry
that
takes no arguments returns a stub that implements the remote
interface java.rmi.registry.Registry
and sends
invocations to the registry on server's local host on the default
registry port of 1099
. The bind
method is
then invoked on the registry
stub in order to bind the
remote object's stub to the name "Hello"
in the
registry.
Note: The call to LocateRegistry.getRegistry
simply returns an appropriate stub for a registry. The call does
not check to see if a registry is actually running. If no registry
is running on TCP port 1099 of the local host when the
bind
method is invoked, the server will fail with a
RemoteException
.
The client program obtains a stub for the registry on the
server's host, looks up the remote object's stub by name in the
registry, and then invokes the sayHello
method on the
remote object using the stub.
Here is the source code for the client:
package example.hello; import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; public class Client { private Client() {} public static void main(String[] args) { String host = (args.length < 1) ? null : args[0]; try { Registry registry = LocateRegistry.getRegistry(host); Hello stub = (Hello) registry.lookup("Hello"); String response = stub.sayHello(); System.out.println("response: " + response); } catch (Exception e) { System.err.println("Client exception: " + e.toString()); e.printStackTrace(); } } }
This client first obtains the stub for the registry by invoking
the static LocateRegistry.getRegistry
method with the
hostname specified on the command line. If no hostname is
specified, then null
is used as the hostname
indicating that the local host address should be used.
Next, the client invokes the remote method lookup
on the registry stub to obtain the stub for the remote object from
the server's registry.
Finally, the client invokes the sayHello
method on
the remote object's stub, which causes the following actions to
happen:
The response message returned from the remote invocation on the
remote object is then printed to System.out
.
The source files for this example can be compiled as follows:
javac -d destDir Hello.java Server.java Client.javawhere destDir is the destination directory to put the class files in.
Note: For details on how to deploy your application along with pregenerated stub classes, see the codebase tutorial.
To run this example, you will need to do the following:
To start the registry, run the rmiregistry
command
on the server's host. This command produces no output (when
successful) and is typically run in the background. For more
information, see the tools documentation for
rmiregistry
[UNIX, Windows].
For example, on the Solaris Operating System:
rmiregistry &
Or, on Windows platforms:
start rmiregistry
By default, the registry runs on TCP port 1099. To start a registry on a different port, specify the port number from the command line. For example, to start the registry on port 2001 on a Windows platform:
start rmiregistry 2001
If the registry will be running on a port other than 1099,
you'll need to specify the port number in the calls to
LocateRegistry.getRegistry
in the Server
and Client
classes. For example, if the registry is
running on port 2001 in this example, the call to
getRegistry
in the server would be:
Registry registry = LocateRegistry.getRegistry(2001);
To start the server, run the Server
class using the
java
command as follows:
On the Solaris Operating System:
java -classpath classDir -Djava.rmi.server.codebase=file:classDir/ example.hello.Server &
On Windows platforms:
start java -classpath classDir -Djava.rmi.server.codebase=file:classDir/ example.hello.Server
where classDir is the root directory of the class
file tree. Setting the java.rmi.server.codebase
system
property ensures that the registry can load the remote interface
definition (note that the trailing slash is important); for more
information about using this property, see the codebase tutorial.
The output from the server should look like this:
Server ready
The server remains running until the process is terminated by the user (typically by killing the process).
Once the server is ready, the client can be run as follows:
java -classpath classDir example.hello.Client
where classDir is the root directory of the class file tree.
The output from the client is the following message:
response: Hello, world!


OsamaBinNaughty's Magic ID Generator:
BTC: 17hhTW69Ko5AdNbSEBQaZnzpRJKLdvuUw5
Below is a list of usable generators:
- South Carolina
- Florida [Male Only, Please Send Any Info You Have To Improve]
Below is a list of states that are broken and need donors of ID scans:
- New York
- Florida [Priority]
- New Jersey
- North Carolina


The Evolution of JavaScript
Origins of JavaScript
- JavaScript was originally developed in 1995 under the name Mocha and was officially called LiveScript when it shipped in beta.
- Due to JavaScript's original inability to process code asyncrhonously, the language was often looked down upon.
- With the addition of AJAX, JavaScript gained an even larger following and a large party of frameworks and libraries were created.
Javascript joins Back-end Dev
- JavaScript had been used sparingly in server-side implementations, but in 2009 Node.js was released, which allowed full-stack development using JS.
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tincidunt vehicula dolor, vitae rhoncus lacus tempor nec. Praesent congue, nulla eu aliquet consequat.
- Nam ac hendrerit mi, sed varius lectus. Nunc sed iaculis ipsum. Nullam ultrices at massa eget sagittis.
JavaScript in Modern Dev
- Nam ac hendrerit mi, sed varius lectus. Nunc sed iaculis ipsum. Nullam ultrices at massa eget sagittis.
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tincidunt vehicula dolor, vitae rhoncus lacus tempor nec. Praesent congue, nulla eu aliquet consequat.
- Aenean mattis odio sed quam porttitor laoreet. Ut rutrum tortor et risus luctus aliquam. Etiam dignissim dui.
For more information about how JavaScript has evolved over the years, check out this JavaScript article from Medium.


{% extends 'lostfound/base.html' %} {% load staticfiles %} {% block extra_stylesheets %} {% endblock %}
The password reset link was invalid, possibly because it has already been used. Please request a new password reset.


CORE Project
Click for more information about designing an interface to simplify the IRB process.
Projects
Home
Penguin
KidPrint
Wayfinding at UCSD
BioCircuits


At Bobo Studio we specialize in providing high quality solutions to difficult problems. Whether you need assistance with a new website, help developing an online marketing campaign, or simply some support & guidance, we are here to help you through each stage of the process.


The uvm_visitor class provides an abstract base class for a visitor. The visitor visits instances of type NODE. For general information regarding the visitor pattern see http://en.wikipedia.org/wiki/Visitor_pattern
| uvm_visitor #(NODE) | The uvm_visitor class provides an abstract base class for a visitor. |
| uvm_structure_proxy #(STRUCTURE) | The uvm_structure_proxy is a wrapper and provides a set of elements of the STRUCTURE to the caller on demand. |
| uvm_visitor_adapter #(STRUCTURE,uvm_visitor#(STRUCTURE)) | The visitor adaptor traverses all nodes of the STRUCTURE and will invoke visitor.visit() on every node. |
| uvm_top_down_visitor_adapter | This uvm_top_down_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion. |
| uvm_bottom_up_visitor_adapter | This uvm_bottom_up_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion. |
| uvm_by_level_visitor_adapter | This uvm_by_level_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion. |
| uvm_component_proxy | The class is providing the proxy to extract the direct subcomponents of s |
| uvm_component_name_check_visitor | This specialized visitor analyze the naming of the current component. |
virtual function void begin_v()
This method will be invoked by the visitor before the first NODE is visited
virtual function void end_v()
This method will be invoked by the visitor after the last NODE is visited
pure virtual function void visit( NODE node )
This method will be invoked by the visitor for every visited node of the provided structure. The user is expected to provide the own functionality in this function.
class count_nodes_visitor#(type T=uvm_component) extends uvm_visitor#(T); function new (string name = ""); super.new(name); endfunction local int cnt; virtual function void begin_v(); cnt = 0; endfunction virtual function void end_v(); `uvm_info("TEXT",$sformatf("%d elements",cnt),UVM_NONE) endfunction virtual function void visit(T node); cnt++; endfunction endclass
The uvm_structure_proxy is a wrapper and provides a set of elements of the STRUCTURE to the caller on demand. This is to decouple the retrieval of the STRUCTUREs subelements from the actual function being invoked on STRUCTURE
| uvm_structure_proxy #(STRUCTURE) | |
| The uvm_structure_proxy is a wrapper and provides a set of elements of the STRUCTURE to the caller on demand. | |
| Methods | |
| get_immediate_children | This method will be return in children a set of the direct subelements of s |
pure virtual function void get_immediate_children( STRUCTURE s, ref STRUCTURE children[$] )
This method will be return in children a set of the direct subelements of s
The visitor adaptor traverses all nodes of the STRUCTURE and will invoke visitor.visit() on every node.
| uvm_visitor_adapter #(STRUCTURE,uvm_visitor#(STRUCTURE)) | |
| The visitor adaptor traverses all nodes of the STRUCTURE and will invoke visitor.visit() on every node. | |
| Methods | |
| accept() | Calling this function will traverse through s (and every subnode of s). |
pure virtual function void accept( STRUCTURE s, VISITOR v, uvm_structure_proxy#(STRUCTURE) p, bit invoke_begin_end = 1 )
Calling this function will traverse through s (and every subnode of s). For each node found v.visit(node) will be invoked. The children of s are recursively determined by invoking p.get_immediate_children().~invoke_begin_end~ determines whether the visitors begin/end functions should be invoked prior to traversal.
This uvm_top_down_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion. During traversal s will be visited before all subnodes of s will be visited.
| uvm_top_down_visitor_adapter | ||||||||||||||||||||||
| This uvm_top_down_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion. | ||||||||||||||||||||||
| Class Hierarchy | ||||||||||||||||||||||
| ||||||||||||||||||||||
| Class Declaration | ||||||||||||||||||||||
|
This uvm_bottom_up_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion. During traversal all children of node s will be visited s will be visited.
| uvm_bottom_up_visitor_adapter | ||||||||||||||||||||||
| This uvm_bottom_up_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion. | ||||||||||||||||||||||
| Class Hierarchy | ||||||||||||||||||||||
| ||||||||||||||||||||||
| Class Declaration | ||||||||||||||||||||||
|
This uvm_by_level_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion. During traversal will visit all direct children of s before all grand-children are visited.
| uvm_by_level_visitor_adapter | ||||||||||||||||||||||
| This uvm_by_level_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion. | ||||||||||||||||||||||
| Class Hierarchy | ||||||||||||||||||||||
| ||||||||||||||||||||||
| Class Declaration | ||||||||||||||||||||||
|
The class is providing the proxy to extract the direct subcomponents of s
| uvm_component_proxy | ||||||||
| The class is providing the proxy to extract the direct subcomponents of s | ||||||||
| Class Hierarchy | ||||||||
| ||||||||
| Class Declaration | ||||||||
|
This specialized visitor analyze the naming of the current component. The established rule set ensures that a component.get_full_name() is parsable, unique, printable to order to avoid any ambiguities when messages are being emitted.
ruleset a legal name is composed of
the check is coded here as a function to complete it in a single function call otherwise save/restore issues with the used dpi could occur
| uvm_component_name_check_visitor | ||||||||
| This specialized visitor analyze the naming of the current component. | ||||||||
| Class Hierarchy | ||||||||
| ||||||||
| Class Declaration | ||||||||
| ||||||||
| Methods | ||||||||
| get_name_constraint | This method should return a regex for what is being considered a valid/good component name. |
virtual function string get_name_constraint()
This method should return a regex for what is being considered a valid/good component name. The visitor will check all component names using this regex and report failing names
This uvm_top_down_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion.
class uvm_top_down_visitor_adapter#( type STRUCTURE = uvm_component, VISITOR = uvm_visitor#(STRUCTURE) ) extends uvm_visitor_adapter#(STRUCTURE,VISITOR)
This uvm_bottom_up_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion.
class uvm_bottom_up_visitor_adapter#( type STRUCTURE = uvm_component, VISITOR = uvm_visitor#(STRUCTURE) ) extends uvm_visitor_adapter#(STRUCTURE,VISITOR)
This uvm_by_level_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion.
class uvm_by_level_visitor_adapter#( type STRUCTURE = uvm_component, VISITOR = uvm_visitor#(STRUCTURE) ) extends uvm_visitor_adapter#(STRUCTURE,VISITOR)
The class is providing the proxy to extract the direct subcomponents of s
class uvm_component_proxy extends uvm_structure_proxy#( uvm_component )
This specialized visitor analyze the naming of the current component.
class uvm_component_name_check_visitor extends uvm_visitor#( uvm_component )
This method will be return in children a set of the direct subelements of s
pure virtual function void get_immediate_children( STRUCTURE s, ref STRUCTURE children[$] )
Calling this function will traverse through s (and every subnode of s).
pure virtual function void accept( STRUCTURE s, VISITOR v, uvm_structure_proxy#(STRUCTURE) p, bit invoke_begin_end = 1 )
This method should return a regex for what is being considered a valid/good component name.
virtual function string get_name_constraint()


|
Binding of Isaac - Afterbirth+ Lua Reference/Guide
|
To access the debug console, mods must be enabled. If you don't have any mods to enable, download one from Steam Workshop, or create an empty folder in your mods.
To show the console, while in a run press the grave/tilde (`~) key. It should be below Esc on most keyboards.
To hide the console, just hit Enter without typing anything.
Beware of spoilers! You can easily learn things accidentally via the debug console that you might have wanted to learn from regular gameplay!
The debug console is a feature of Isaac that's been around since Rebirth, but until AB+ it's only been enabled in developer builds. Now modders can finally unleash its power! It can be a big time saver for testing your changes during development of mods.
The debug console is not completely stable, so if you enter commands like numbers outside certain ranges, it may crash. Some of the crashes are documented below, but there are likely others.
If you're testing a specific item or item combo, it's useful to enter your commands and then exit and continue so your items are reloaded when you continue and you don't need to keep retyping the same command. Also, try the clipboard! You can paste multiple commands at once or copy the last few commands you entered using the copy command.
Some commands that are still in the game aren't listed here since they're only useful for Nicalis developers, or are no longer useful. For instance, the achievement
and eggs
commands unlock stuff in your game save, but saving your persistent data is disabled when mods are turned on.
#Commands
Syntax
spawn mega maw spawn 20 spawn 10.1 spawn <IP_ADDRESS>
Very similar names are incredibly common among entities, so you'll likely need to type the name to figure out the number, then delete it and type the number manually. The decimal syntax lets you specify: Type.Variant.Subtype.Champion. spawn <IP_ADDRESS>
will get you a gaper(10)'s flaming variant(.2) with a blue champion type(.4).
Syntax
goto s.boss.1010 goto s.error.21 goto d.10
s is for special room types, and d is for normal room types. The rooms will be different depending on what floor you're on, so goto d.10
will take you to a different room on stage 1 than it will on stage 3.
Syntax
stage 1 stage 10a stage 3b
Move to another floor on the same seed. You can use this to skip ahead to a later floor, go backwards to an earlier floor, or reset the current floor by entering the current floor's id.
Entering nonexistent floors can crash the game.
Syntax
gridspawn 1000 gridspawn 1494 gridspawn 9000 gridspawn 9100
Spawns the grid entity with the given ID at a random place in the room. For some reason it doesn't always do something, possibly because of failing to overwrite other grid entities or trying to spawn outside the room or something. Pits won't look right until you leave the room and come back.
Various cheats that are useful for testing. Some of the ones not listed here are obsolete, not very useful, or possibly broken. Here are the ones that are still useful.
debug 3 Complete invincibility
debug 4 +40 damage to tears, but not to other weapons. Good with Soy Milk.
debug 7 Display damage values, similar to the Spider Mod item
debug 8 Your active item always has max charge.
debug 9 Your luck is very high, so luck-based random events like random tear effects happen more often.
debug 10 All enemies take rapid damage at all times, so rooms are usually cleared in under a second.
aliases: givetim
, g
Item and trinket syntax
giveitem dr. fetus giveitem c15 giveitem Petrified Poop giveitem t15 giveitem ipec givetim mutant sp g soy milk
Name collisions are somewhat common among items, so you'll likely need to type the name to figure out the number, then delete it and type the number manually. For items, use "c15" to give the item by number instead of name. For trinkets numbers, use "t15" Notice how it can autocomplete if you don't type the full name. It doesn't work with some odd item names like "<3" so you'll have to figure out the collectible number and use "c15" instead. >**Note** >There is a bug where any word beginning with lowercase "p" is interpreted as a pill effect id p0 (Bad Gas). Items that start with P should be typed with a capital letter.
Pill syntax
giveitem p0 g p22
Card syntax
giveitem k1 g k45
Unfortunately you can't type pills or cards by name, so you have to figure out the number. You can give yourself pills even if that pill's effect is not in the rotation. It won't subsequently appear in rotation afterwards. >**Note** >There is a bug where any word beginning with lowercase "p" is interpreted as a pill effect id p0 (Bad Gas). Items that start with P should be typed with a capital letter.

Syntax
costumetest costumetest 33
Gives Isaac a number of totally random costumes, without having the associated items.
The same as holding R. Resets the game back to the beginning of a new run.
Prints a list of all items in your possession, and how many of each
Syntax
spawn 10 repeat 50 giveitem meat! repeat 100 repeat 100
The commands above will spawn one, then fifty gapers, and then give you one MEAT! and then two hundred more MEAT!s. repeat
looks back up the previous console command. The last one that wasn't a repeat
command is re-entered as many times as requested. You can use this to give yourself tons of items or spawn tons of enemies. Exercise restraint! Remember that an extreme number of repetitions of some commands might crash the game or leave it hanging for a long time.
Removes all easter egg effects from the current run.
Syntax
seed GGGG GGGG seed T1MM AY48
It's much easier just to exit to the character select and type the seed the normal way. Easter egg seeds won't work. It's case-sensitive (uppercase only) and doesn't replace "i" with "1," etc.
Syntax
challenge 20
Starts a new run on a random seed on the given challenge number. Numbers greater than the number of challenges included in the base game will cause the game to crash.
Syntax
combo 0.69
Gives you an item combo, taking 69 random items from the specified item pool (in this case, 0 is the treasure room item pool).
This command wasn't designed for general consumption, as macros can only be added in C++ code. Sorry! If there's enough demand we can consider adding a similar feature for modder access. It just pastes a bunch of hardcoded console commands one after another using an abbrevition that's quick to type. You can use the clipboard to similar effect.
Syntax
curse 2 curse 16 curse 127
Set a value corresponding to a sum of the desired curses. Darkness (1) + Labyrinth (2) + Lost (4) + Unknown (8) + Cursed (16) + Maze (32) + Blind (64) = 127
The stage
or reseed
commands are useful after adding curse of the labyrinth to force the floor to be re-generated.
Generates a new layout for the current floor with a new floor seed. This floor will no longer match other people playing the same seed.
Syntax
copy 3
Copies the last three console commands to your clipboard. Paste one or more commands with ctrl+v, or command+v on mac.
Syntax
luarun /full_path/hello.lua luarun relative_path/hello.lua
Takes a path to a lua file and runs it immediately. Paths are relative to the folder where the game is installed.
Syntax
luamod mygreatmod
Takes a mod folder name and runs the main.lua for it. This can be used to reload a mod without relaunching the game.
Reports memory usage for Lua


Overview
WPF (
Windows
Presentation Foundation)
is a framework (first introduced in .NET3.0) for building rich dynamic
GUI. Any C# script utilizing the
WPF classes can be executed by CS-Script as any other scripts. It is
possible because from the CLR point of view WPF classes are just
ordinary CLR classes.
That is it WPF
is nothing else but a collection of CLR classes.
WPF is directly related to XAML - another part of .NET3.0+.
XAML (
Extensible
Application Markup Language) is
a language for describing GUI layout and it's relationships with the
business objects. XAML primarily used in conjunction with WPF. Usually
it is used in a compiled form for initialization GUI layout at
runtime and as
such it does require it's own compiler.
It is
important to note that XAML has nothing to do with CLR. This is the
reason why scripts which are utilizing XAML has to be handled by the
script engine in a special way.
WPF script which are not using XAML do not require any special
treatment and can be executed normally.
Starting from version 1.9.0 CS-Script includes special edition of the
C# compiler capable of processing XMAL files. The following code
sample demonstrates how WPF script can use XAML:
Samples\WPF\Hello.cs
//css_inc Hello.xaml;
//css_ref WindowsBase;
//css_ref PresentationCore;
//css_ref PresentationFramework;
using System;
using System.Windows;
public partial class MainWindow : System.Windows.Window
{
public MainWindow()
{
InitializeComponent();
}
void OnClick(object sender, RoutedEventArgs e)
{
MessageBox.Show("Hello World!");
}
[STAThread]
public static void Main()
{
MainWindow wnd = new MainWindow();
wnd.ShowDialog();
}
} |
Samples\WPF\Hello.xaml
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Hello World Application" Height="117" Width="280">
<Grid>
<Button Margin="108,27,109,34" Name="button1" Click="OnClick" >Say Hello</Button>
</Grid>
</Window> |
The code above is a
WPF multi-file "Hello World" script (
Hello.cs + Hello.xaml)
from CS-Script samples library (Script Library). Xaml file can be
included in the primary script as any other secondary script file: with
directive
//css_import
or
//css_include
(in short form
//css_imp
or
//css_inc).
Limitations
Unfortunately MS did not provide XAML compiler as a stand-alone
application. Instead MS has merged XAML compiler with
MSBuild.exe and in
this form it is used by CS-Script custom compiler
CSSCodeProvider.dll.
Such
approach is inconsistent with the way how C# code is usually
processed
by CS-Script. And that is why implementation of the XAML support may
change in future depending on MS decision to
ship stand-alone
version of XAML compiler.
You may also notice that WPF scripts and executables produces from the
scripts sometimes demonstrates slight startup-delay. This is a .NET
bag, which was already reported to MS
(https://connect.microsoft.com/feedback/ViewFeedback.aspx?FeedbackID=273495&SiteID=212).
Silverlight
Silverlight is a subset of WPF and as such does not require any special
technique to be executed as a script: you just need to reference
appropriate assemblies and include code-behind and XAML files
(this can change in the future). However CS-Script offers an
interesting technique for viewing Silverlight content without a
browser: Silverlight Player script (<cs-script>\Lib\silverlight.cs).
Execute the following command in command to playback XAP file (e.g.
myApp.xap):
cscs silverlight myApp.xap
Silverlight Player is a viewer for XAP (compressed Silverlight
content) files. Silverlight Player is capable not only rendering
Silverlight content but also generating self-sufficient executable from
XAP file.
Thus you can convert XAP file into WinForm executable which can be
executed on any Windows PC having Silverlight runtime installed. It
does not require any other files to be distributed or even temporary
created on target PC at runtime as it hosts it's own built-in
Web server, IE Web browser and contains XAP file as embedded
resource.
Execute the following command in command prompt to convert XAP file into self-sufficient executable (e.g.
myApp.xap ->
myApp.exe):
cscs silverlight /exe myApp.xap
To allow
using Silverlight Player by right clicking XAP files in
Windows Explorer the "View" and "Convert to EXE" shell extensions have
been made available. They can be installed by executing corresponding
batch files from <cs-script>\Samples\Silverlight directory.
Silverlight Player script was inspired by Tamir Khason effort described here:
http://blogs.microsoft.co.il/blogs/tamir/archive/2008/05/02/stand-alone-multiplatform-silverlight-application.aspx.
Silverlight content sample (BookPages.xap) is taken from
SOTC: programming and
development tutorial blog.
See Also
Alternative
compilers |
Script
Library |
Importing
scripts


Documentation Hierarchy
In the context of comparison and archival operations, the configuration is organized into a hierarchical taxonomy. The hierarchy is much like
the Object Explorer view of SQL Server Management Studio.
The SQLClue SQLInstance Type Document Hierarchy can be generalized as:
|
SubType: Server | |
|
|
'SQLInstance'
|
|
|
'SQLInstance|Item'
|
|
|
'SQLInstance|JobServer'
|
|
|
'SQLInstance|Databases'
|
|
|
'SQLInstance|Collection'
|
|
|
'SQLInstance|Collection|Item'
|
|
SubType: JobServer
|
|
|
|
'SQLInstance|JobServer|Item'
|
|
|
'SQLInstance|JobServer|Collection'
|
|
|
'SQLInstance|JobServer|Collection|Item'
|
|
SubType: Database
|
|
|
|
'SQLInstance|Databases|DbName'
|
|
|
'SQLInstance|Databases|DbName|Item
|
|
|
'SQLInstance|Databases|DbName|Collection'
|
|
|
'SQLInstance|Databases|DbName|Collection|Item'
|
|
|
'SQLInstance|Databases|DbName|ServiceBroker'
|
|
SubType: ServiceBroker
|
|
|
|
'SQLInstance|Databases|DbName|ServiceBroker|Collection'
|
|
|
'SQLInstance|Databases|DbName|ServiceBroker|Collection|Item'
|
The Node User Defined Type
A User Defined Type is used to represent this hierarchy.
SELECT top(10) [Node]
, [Node].ToString() AS [ToString() method]
, [Node].[Type] AS [Type property]
, [Node].[SubType] AS [SubType property]
, [Node].[Length] AS [Length (# elements in Node) property]
, [Node].[SQLInstance] AS [SQL Instance property]
, [Node].[Database] AS [Database property]
, [Node].[Collection] AS [Collection Name property]
, [Node].[IsCollection] AS [IsCollection property]
, [Node].[Path] AS [Parent Node property]
, [Node].[Item] AS [Item Name property]
, [Node].[IsNull] AS [IsNull property]
FROM [dbo].[tSQLCfgChange]
ORDER BY Node
Event Notification capable target SQL Server instances (SQL Server 2005 and SQL Server 2008)
include the name of the user making the change and the script executed to effect
the change in the archive record for changes that raise a detectable event.
This is a listing of the event groups monitored by SQLClue. See SQL Server Books Online for a complete
description of each group and the events thyat fall under each group.
-
DDL_TABLE_EVENTS
-
DDL_VIEW_EVENTS
-
DDL_INDEX_EVENTS
-
DDL_SYNONYM_EVENTS
-
DDL_FUNCTION_EVENTS
-
DDL_PROCEDURE_EVENTS
-
DDL_TRIGGER_EVENTS
-
DDL_ASSEMBLY_EVENTS
-
DDL_TYPE_EVENTS
-
DDL_SCHEMA_EVENTS
-
DDL_ROLE_EVENTS
-
DDL_CERTIFICATE_EVENTS
-
DDL_AUTHORIZATION_DATABASE_EVENTS
-
DDL_GDR_DATABASE_EVENTS
-
DDL_APPLICATION_ROLE_EVENTS
-
DDL_USER_EVENTS
-
DDL_MESSAGE_TYPE_EVENTS
-
DDL_CONTRACT_EVENTS
-
DDL_ROUTE_EVENTS
-
DDL_REMOTE_SERVICE_BINDING_EVENTS
-
DDL_XML_SCHEMA_COLLECTION_EVENTS
-
DDL_PARTITION_EVENTS
|


#include <Table.h>
|
| static size_t | getRow (const std::string &pos) |
| |
| static size_t | getColumn (const std::string &pos) |
| |
Table is a class which takes care of a collection of objects of abstract type Cell Table holds a 2-dimensional dynamic array of pointers to Cell. Using polymorphism, it can create objects of any class type which extends the abstract class Cell. Currently, only 4 child-classes are being supported:
◆ Table() [1/3]
Empty constructor. Table has default size of 1x1
◆ Table() [2/3]
| Table::Table |
( |
size_t |
rows, |
|
|
size_t |
cols |
|
) |
| |
Constructor which takes initial table size (rows count and columns count)
- Exceptions
-
| invalid_argument | thrown if either initial rows count, or initial columns count is zero |
◆ Table() [3/3]
| Table::Table |
( |
const Table & |
copy | ) |
|
Copy constructor which created perfect copy (with copied allocated memory) of an object
◆ ~Table()
Destructor which makes sure to free any allocated dynamic memory by this class
◆ allocateTable()
| Cell *** Table::allocateTable |
( |
std::size_t |
row, |
|
|
std::size_t |
column |
|
) |
| |
|
private |
Allocates dynamic 2-dimensional array of type Cell pointer (Cell*).
- Parameters
-
| row | allocated new dynamic array's count of rows |
| column | allocated new dynamic array's count of columns (count of elements in every row) |
- Returns
- Pointer to the newly allocated 2-dimensional dynamic array of type Cell*. Exception Safety. If an exception occurs, the function handles it and returns nullptr.
◆ columnsCount()
| size_t Table::columnsCount |
( |
| ) |
|
- Returns
- Count of columns in this this table
◆ deleteCellValue()
| void Table::deleteCellValue |
( |
size_t |
row, |
|
|
size_t |
column |
|
) |
| |
Deletes any allocated dynamic memory associated by a cell on the provided row and column
- Parameters
-
| wanted | position (row and column) |
◆ extendTable()
| void Table::extendTable |
( |
size_t |
rows, |
|
|
size_t |
columns |
|
) |
| |
|
private |
Extends table up to given new values for rows and columns. Shrinking is not possible in neither dimension.
- Parameters
-
| new | rows and columns count |
◆ getCellByString()
| const Cell* Table::getCellByString |
( |
const std::string & |
pos | ) |
|
Function, which takes a typical excel representation of a position of a cell. If found returns a pointer to the cell this position refers to in the table If not found, returns a null pointer.
◆ getCellPointer()
| const Cell * Table::getCellPointer |
( |
size_t |
row, |
|
|
size_t |
column |
|
) |
| const |
Tries to find the cell on position row and column. If found, returns its pointer. If not, returns null pointer.
◆ getCenteredString()
| void Table::getCenteredString |
( |
std::string & |
result, |
|
|
const std::string & |
value, |
|
|
size_t |
length, |
|
|
char |
filling |
|
) |
| |
|
private |
Takes a string and centers it based on wanted length and fills the whitespace with a wanted char
- Exceptions
-
| invalid_argument | thrown if new length is smaller than the length of the string to be centered |
- Parameters
-
| result | centered string |
| value | string to be centered |
| length | new wanted lenth |
| filling | what char to fill the whitespace when centering the string |
- Note
- example:
void getCenteredString(std::string &result, const std::string &value, size_t length, char filling)
Definition: Table.cpp:205
◆ getColumn()
| size_t Table::getColumn |
( |
const std::string & |
pos | ) |
|
|
static |
Static function, which takes a typical excel representation of a position of a cell and returns the column it actually refers to as a positive integer.
◆ getConstructedCellValue()
| std::string Table::getConstructedCellValue |
( |
size_t |
row, |
|
|
size_t |
column |
|
) |
| |
Tries to get the constructed value of a cell on position row and column. If found, returns it. If not, returns empty string.
◆ getDisplayableCellValue()
| std::string Table::getDisplayableCellValue |
( |
size_t |
row, |
|
|
size_t |
column |
|
) |
| |
Tries to get the displayable value of a cell on position row and column. If found, returns it. If not, returns empty string.
◆ getRow()
| size_t Table::getRow |
( |
const std::string & |
pos | ) |
|
|
static |
Static function, which takes a typical excel representation of a position of a cell and returns the row it actually refers to as a positive integer.
◆ isCellInsideTable()
| bool Table::isCellInsideTable |
( |
size_t |
row, |
|
|
size_t |
column |
|
) |
| const |
Checks whether a cell is inside or outside of table's size borders
◆ operator=()
Operator= which created perfect copy (with copied allocated memory) of an object
◆ print()
| std::string Table::print |
( |
| ) |
|
- Returns
- The entire table gets convented into a string, which can be displayed. The string represents the current table formatted in a readable way. Takes the displayable string of all existing cells in this class
◆ recalculateAllFormulas()
| void Table::recalculateAllFormulas |
( |
| ) |
|
Find all allocated objects of type CellFormula and calls its public member fucntion recalculate
◆ releaseTableData()
| void Table::releaseTableData |
( |
bool |
fullDataClear | ) |
|
|
private |
Release any dynamically allocated memory associated with private member: Cell*** tableData
◆ resetTable()
| void Table::resetTable |
( |
| ) |
|
Deletes any allocated dynamic memory associated by this class. Automatically sets the table to size 1x1 and ensures it can still be used right after this command is called
◆ rowsCount()
| size_t Table::rowsCount |
( |
| ) |
|
- Returns
- Count of rows in this this table
◆ setCellValue()
| void Table::setCellValue |
( |
size_t |
row, |
|
|
size_t |
column, |
|
|
const std::string & |
value |
|
) |
| |
Creates a new dynamically allocated cell of proper type based on the provided string and associates it with 2-dimensional coordinates, respectively row and column
- Exceptions
-
| invalid_argument | Thrown if provided string does not represent any valid and and supported class type |
- Parameters
-
| row | the row this new cell will be associated with |
| column | the column this new cell will be associated with |
| value | the value this new cell will be associated with |
◆ columnsCount_
| size_t Table::columnsCount_ |
|
private |
Allocated count of column in this table
◆ rowsCount_
Allocated count of rows in this table
◆ table_
2-dimensional dynamic array of Cell pointers
The documentation for this class was generated from the following files:


|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
| Interface Summary | |
|---|---|
| JCoServer | The JCoServer interface provides access to the public APIs in the JCo server implementation. |
| JCoServerAuthorizationData | Authorization parameters sent by the caller system JCoServerAuthorizationData will be passed to the JCoSecurityHandler, if ones is installed, on each call. |
| JCoServerCallHandlerFactory | JCoServerCallHandlerFactory is the base interface for the JCoServerFunctionHandlerFactory and JCoServerRequestHandlerFactory. |
| JCoServerContext | JCoServerContext provides additional information for the remote call |
| JCoServerContextInfo | JCoServerContextInfo provides additional information of the remote system and the context of the request. |
| JCoServerErrorListener | Listener interface for the errors occurred inside of the JCoServer. |
| JCoServerExceptionListener | Listener interface for the exceptions occurred inside of the JCoServer in the JCo runtime. |
| JCoServerFunctionHandler | Interface for the function handler. |
| JCoServerFunctionHandlerFactory | Factory for creating function handlers for a server instance. |
| JCoServerRequestHandler | Interface for the request handler. Request handler that needs to be implemented by the server application. |
| JCoServerRequestHandlerFactory | Factory for creating request handlers for a server instance. |
| JCoServerRunnable | Interface marker for the runnable-s used by the JCo server internally. |
| JCoServerSecurityHandler | Security Handler will be asked to check the permissions of the user, who initiated a remote call. |
| JCoServerStateChangedListener | JCo server state change listener interface. |
| JCoServerThreadStarter | Interface can be implemented by the infrastructure within an application server. |
| JCoServerTIDHandler | This interface defines methods to handle transactions being received from an SAP system. |
| JCoServerUnitIDHandler | This interface defines methods to handle a function unit received by a JCoServer . |
| Class Summary | |
|---|---|
| DefaultServerHandlerFactory<T> | This class is the base for a trivial default implementation of JCoServerFunctionHandlerFactory and JCoServerRequestHandlerFactory. |
| DefaultServerHandlerFactory.FunctionHandlerFactory | Trivial implementation for JCoServerFunctionHandlerFactory. |
| DefaultServerHandlerFactory.RequestHandlerFactory | Trivial implementation for JCoServerRequestHandlerFactory. |
| JCoServerFactory | Factory for creating server instances used by JCo applications. |
| Enum Summary | |
|---|---|
| JCoServerCallType | Describes all types of requests a server can receive via RFC from the ABAP client. |
| JCoServerState | JCoServerState reflects the possible states of a JCoServer. |
| Exception Summary | |
|---|---|
| JCoApplicationAuthorizationException | Using this exception the application's security handler notifies the sender system, that the user, who initiated a remote call, does not have enough permissions |
Contains the interfaces and factories for server functionality. There are both infrastructure related parts as well as
interfaces typically used by an application implementing a function module. Some of them cannot be assigned clearly to
infrastructure or application. But a rough specification could be as follows.
JCoServerContext(Info)
: Can be used by an application to get information about the current request context, in particular also about the caller systemJCoServerRunnable
and JCoThreadStarter
: Provides the thread environment,
in which function modules are executed. Sometimes, an application server requires certain Thread
subclasses for that. JCo
might be the easiest variant for small
applications. JCoSecurityHandler
: Allows checking the authorization for incoming requests. JCoServer
and JCoServerFactory
: Working with the server.
|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |


↠ GitHub Repo ↞
↠ API Friends List ↞
Let's find you a fiend!
Please answer the questions below to find your match:
Your Name
Link to your best photo!
Choose from 1 (strongly disagree) to 5 (strongly agree).


Dining Halls
A major part of living on Ohio University’s campus is eating in the dining halls. OU has a registered dietitian and nutrition educator, Angie Bohyer. If one has a food allergy or a special diet need, they can contact her at<EMAIL_ADDRESS>"I can share that during (Bobcat Student Orientation), consistent with other times of the year, our OHIO Culinary Services’ menus, nutritional information and allergens will be available in each venue and on the Culinary Services app,” Gwyn Scott, associate vice president for auxiliaries, said in an email.
The Culinary Services app can be downloaded onto smartphones through the app store.
Odyssey Nutrition
Located at 9 W. Union St., Odyssey Nutrition is a smoothie and juice bar. It specializes in meal replacement smoothies and energizing teas. Odyssey accommodates dietary restrictions and allergies.
“At Odyssey Nutrition we are exactly what our name says we’re all about health and exploring different options that not only taste good but are good for you,” Stephen Adonis, media contact at Odyssey Nutrition, said in an email. “Primarily we serve protein… replacement smoothies that are plant-based, herbal aloe for digestive health and herbal teas that help improve energy. My number one focus is making sure that what we serve creates nutritional value without all the extra empty calories, while still maintaining amazing flavor, all being a positive environment. We welcome individuals of all ages to come on out and enjoy what we offer at Odyssey Nutrition.”
Bagel Street Deli
Bagel Street Deli’s menu is sectioned into different genres of bagel sandwiches. The restaurant, located at 27 S. Court St., has two sections that are titled “Veggie Delights” and “Tofu Time” that accommodates well to vegans and vegetarians. Vegan cream cheese is available as well. Cheese is optional on all menu items. Bagel Street Deli also has a selection of salads to choose from for those with a gluten allergy or other dietary restrictions that keep them from eating bagels.
Fluff Bakery
Fluff Bakery, located at 8 N. Court St., has a “veggie specialties” part of its menu with a variety of vegan and vegetarian options such as a vegan breakfast burrito and a pesto egg and cheese sandwich. Additionally, Fluff Bakery has four different rice bowls that are all gluten free. Their pastries and baked goods also accommodate vegan people and gluten allergies. The bakery serves desserts such as a gluten free cream cheese swirl brownie, a vegan chocolate chip cookie and more.


Learning ToDo -- Backbone.js
Your task:
Show all
|
Show pending
|
Show completed
Toggle
Description
Is completed?
Action panel


The National Vitals Statistics Report conducted a study to see whether a pregnancy check box on a death certificate would make a difference in maternal mortality rates.
Over the course of 2015 and 2016, researchers discovered that more maternal deaths were reported using the checkbox than without the checkbox at a ratio of 3.07.
The study also showed black women are more likely to die from pregnancy complications compared to white and Hispanic women.
Nicole Jean-Baptiste, doula and co-founder of Bronx (Re) Birth said that some of her black pregnant clients fear dying due to negligence of hospital staff.
“We're seeing that black pregnant women are going into hospital spaces, and they are needing to self-advocate, or at least have someone there who can support them in doing this [giving birth] right,” said Jean-Baptiste.


Penalties for speeding drivers
A chara, – Further to your Editorial (November 20th), I believe that more could, and should, be done to avoid so many tragic road deaths and injuries.
Speed is so often a killer and I agree therefore with Minister for Transport Shane Ross that penalties for motorists exceeding speed limits should be increased. It’s incredible that some 120,000 motorists have failed to take a driving test and that thousands more disqualified drivers continue to drive because of failure to enforce the law. Garda authorities have responsibilities to resolve such enforcement issues. – Is mise,
SEÁN Ó CUINN,
An Charraig Dhubh, Co Átha Cliath.


android.support.v7.internal.widget
Class ScrollingTabContainerView
java.lang.Object
HorizontalScrollView
android.support.v7.internal.widget.ScrollingTabContainerView
- All Implemented Interfaces:
- AdapterViewICS.OnItemClickListener
public class ScrollingTabContainerView
- extends HorizontalScrollView
- implements AdapterViewICS.OnItemClickListener
This widget implements the dynamic action bar tab behavior that can change across different
configurations or circumstances.
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScrollingTabContainerView
public ScrollingTabContainerView(Context context)
onMeasure
public void onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
setAllowCollapse
public void setAllowCollapse(boolean allowCollapse)
setTabSelected
public void setTabSelected(int position)
setContentHeight
public void setContentHeight(int contentHeight)
animateToTab
public void animateToTab(int position)
onAttachedToWindow
public void onAttachedToWindow()
onDetachedFromWindow
public void onDetachedFromWindow()
addTab
public void addTab(ActionBar.Tab tab,
boolean setSelected)
addTab
public void addTab(ActionBar.Tab tab,
int position,
boolean setSelected)
updateTab
public void updateTab(int position)
removeTabAt
public void removeTabAt(int position)
removeAllTabs
public void removeAllTabs()
onItemClick
public void onItemClick(android.support.v7.internal.widget.AdapterViewICS<?> parent,
View view,
int position,
long id)
- Description copied from interface:
AdapterViewICS.OnItemClickListener
- Callback method to be invoked when an item in this AdapterView has
been clicked.
Implementers can call getItemAtPosition(position) if they need
to access the data associated with the selected item.
- Specified by:
onItemClick
in interface AdapterViewICS.OnItemClickListener
- Parameters:
parent
- The AdapterView where the click happened.view
- The view within the AdapterView that was clicked (this
will be a view provided by the adapter)position
- The position of the view in the adapter.id
- The row id of the item that was clicked.


The following demonstrates a tool that helps data analysts explore privacy preserving statistics describing a dataset and query the dataset for their own statistics by distributing a privacy budget across different possible statistical calculations. This tool is called the interactive query interface. Users select which statistics they would like to calculate and are given estimates of how accurately each statistic can be computed.
You can bring up an explanatory page at any point, by clicking any of the information buttons, marked .


Please indicate your team members and the task assignment for each member:
Joe John Dinkha : Set Up the main table, the index page
YanningXue : Javascript, game logic, win checking, button event listener, Cell display
Abdullah Fouad Alkawai : input page


Now that we have the foundation of the app, let's continue by getting the NoteListActivity to show our list of notes. For now, we will have it show dummy notes that we create manually - we'll wait until the next chapter before implementing persistence to load and save notes.
Our first task is to create the Note object. This object will act as a very simple vehicle for our Note's data, such as its unique id, title, and text among other data.
Right click the edu.gatech.androidnoteapp
folder in the Project explorer and select New->Java Class as shown in Figure 4-1. Name it Note
and replace its content with this code:
package edu.gatech.androidnoteapp;
import java.sql.Date;
/**
* The authoritative representation of a note in memory.
*/
public class Note {
/**
* A unique id for this note.
*/
private long noteID;
/**
* The title of the note.
*/
private String titleText;
/**
* The body of the note.
*/
private String bodyText;
/**
* The date when the note was last saved.
*/
private Date lastEditDate;
/**
* The color the note should render with.
*/
private String displayColor;
public Note(long id, String title, String body, Date date, String color) {
this.noteID = id;
this.titleText = title;
this.bodyText = body;
this.lastEditDate = date;
this.displayColor = color;
}
/**
* Returns the ID of the note
*/
public long getID() {
return noteID;
}
/**
* Returns the Title of the note
*/
public String getTitle() {
return titleText;
}
/**
* Returns the Text of the note
*/
public String getText() {
return bodyText;
}
/**
* Returns the Date of the last edit to the note
*/
public Date getDate() {
return lastEditDate;
}
/**
* Returns the Color of the note
*/
public String getColor() {
return displayColor;
}
/**
* Sets the ID of the note
*/
public void setID(int ID) {
noteID = ID;
}
/**
* Sets the Title of the note
*/
public void setTitle(String title) {
titleText = title;
}
/**
* Sets the Text of the note
*/
public void setText(String body) {
bodyText = body;
}
/**
* Sets the Date of the last edit to the note
*/
public void setDate(Date newDate) {
lastEditDate = newDate;
}
/**
* Sets the Color of the note
*/
public void setColor(String newColor) {
displayColor = newColor;
}
}
Notice that this class is simply a collection of variables, getters, setters, and a constructor for convenience. In your own app, this class can be as complex as you want to make it. This is all we need to do for the Note class.
Our next task is to add the list visual itself to the screen. These are called ListView
s and they represent a UI container that pulls information from a data source in Java (often an array), formats that data into a visual layout representing a row in the list, and displays those rows in the ListView
.
Start by opening the layout file of our NoteListActivity: res/layout/activity_note_list.xml
.
Reminder: If you see a mockup phone screen instead of the XML text, click on the tab underneath the Palette and mockup that says "Text".
As we learned earlier, this layout determines the visual representation of the Activity
, containing all of the UI components (View
s) and layout items (ViewGroup
s).
Let's remove our "Hello World" TextView
from the layout and replace it with a ListView
. Replace the following lines:
<TextView android:text="@string/hello_world"
android:layout_width="match_parent"
android:layout_height="match_parent" />
With these lines:
<ListView android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
The android:id="@android:id/list"
part is very important. This assigns a specific identifier to the list that will enable our Activity
to locate it later in the tutorial.
Your layout file should now look like this:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".NoteListActivity">
<ListView android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
Click on the triangle to the right to learn about an alternative way to accomplish the same thing on the "Design" tab.
TextView
by clicking on it and pressing delete. Then from the Palette on the left under the Containers subheading, drag in a ListView
. Be sure to set its width and height to match_parent
in the Properties pane.
If you choose this alternative route, you must then enter the "Text" tab and change android:id="@+id/listView"
to android:id="@android:id/list"
.If you go back to the Design tab, your preview should look like Figure 4-2:
This is all we need to do as far as creating and laying out the ListView
. If you test the app at this point it will look empty since we have not yet linked data to the list.
Before we add support to our ListView
to show list items, let's create a layout that describes how we want each row in the list to look and what View
s it has. Right click the layout
folder in the Project explorer in the far left pane. Select New->Layout resource file. Name it note_row_layout.xml
.
For each note, we want its row to display the title of the note, and beneath that, the last date it was edited. For this we need two TextView
s. Structure your XML contents as follows:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/full_row"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="64dip">
<LinearLayout
android:id="@+id/row_layout"
android:orientation="vertical"
android:paddingRight="8dip"
android:paddingLeft="16dip"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/note_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="The Title"
android:textAppearance="@android:style/TextAppearance.Medium" />
<TextView
android:id="@+id/note_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="The Date"
android:textAppearance="@android:style/TextAppearance.Small" />
</LinearLayout>
</LinearLayout>
Notice how we wrap both TextView
s in a "vertical" LinearLayout
so that the first TextView
is on top and the second is below it. We also made sure to set the width/height of the LinearLayout
and TextView
s to wrap_content
so they don't monopolize the space but share it instead.
Also, take special note of the ids
we have assigned to the title and date TextView
s (note_title
and note_date
). These ids
are what we will reference to locate these two views and set their text in the next section.
The row layout should look like Figure 4-3 if you preview it:
That's all we need to do to set our desired layout. Before we can display the rows, however, we must create a class that links together the layout we just created, our list row data, and our ListView
. These types of classes are called Adapter
s.
Right click the edu.gatech.androidnoteapp
folder in the Project explorer and select New->Java Class. Name it NoteListAdapter
.
An adapter is a class that links a data source (e.g. an array of Note
objects) to a View
that pulls from data sources (e.g. ListView
). It is like a middleman that handles translating the data into a format that the View
is designed to accept.
Android has a ListAdapter
class, but for our purposes we need to extend BaseAdapter
since we need to track our list row IDs manually. This way we can have the rows be able to reference our actual Note
s, which will help us when implementing the NoteListActivity
later.
Replace the entirety of this file's content with this code:
package edu.gatech.androidnoteapp;
import android.app.Activity;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.LinearLayout;
import android.widget.TextView;
import java.sql.Date;
import java.util.List;
/**
* An adapter for a list of notes.
*/
public class NoteListAdapter extends BaseAdapter {
private List<Note> items;
private Activity context;
public NoteListAdapter(Activity context, List<Note> items) {
super();
this.context = context;
this.items = items;
}
/**
* @return The number of items in the list of notes
*/
@Override
public int getCount() {
return items.size();
}
/**
* Get the item at the indicated position
* @param position The desired position for the item to get
* @return The item at the indicated position
*/
@Override
public Note getItem(int position) {
return items.get(position);
}
/**
* Get the ID of the item with the indicated position
* @param position The desired position for the item whose ID you'll get
* @return The ID of the desired item
*/
@Override
public long getItemId(int position) {
return getItem(position).getID();
}
/**
* Return a view object for the given position
* @param position The desired position for the item to get
* @param convertView The old view to reuse if possible
* @param parent The parent for the view to which the returned View will be attached
* @return The resulting View created from the desired item index
*/
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View view;
RowViewElements viewElements;
if(convertView == null) { // if no existing view, populate all view fields
// populate the view parent based on XML in note_row_layout
view = LayoutInflater.from(context).inflate(R.layout.note_row_layout, parent, false);
viewElements = new RowViewElements();
viewElements.title = (TextView)view.findViewById(R.id.note_title);
viewElements.date = (TextView)view.findViewById(R.id.note_date);
viewElements.layout = (LinearLayout)view.findViewById(R.id.full_row);
view.setTag(viewElements);
} else {
// If there is an existing view,
view = convertView;
viewElements = (RowViewElements)view.getTag();
}
// update view based on Note at given position
Note note = getItem(position);
viewElements.setTitle(note.getTitle());
viewElements.setDate(note.getDate());
viewElements.setBackgroundColor(note.getColor());
return view;
}
/**
* For any given item in the Notes, we'll return a row whose data will be
* stored in this class while we're creating it
*/
private class RowViewElements {
/**
* The encompassing layout for the entire row
*/
private LinearLayout layout;
/**
* The TextView for the title for the returned row for the given note
*/
private TextView title;
/**
* The TextView for the last modified date for the returned row for the
* given note
*/
private TextView date;
/**
* @param color String color of the note
*/
public void setBackgroundColor(String color){ this.layout.setBackgroundColor(Color.parseColor(color)); }
/**
* @return Title for this RowViewElement
*/
public TextView getTitle() {
return title;
}
/**
* @param title Title for this RowViewElement
*/
public void setTitle(String title) {
this.title.setText(title);
}
/**
* @return Date for this RowViewElement
*/
public TextView getDate() {
return date;
}
/**
* @param date Date for this RowViewElement
*/
public void setDate(Date date) {
this.date.setText(date.toString());
}
}
}
What we have just done is implement a subclass of BaseAdapter
, overriding many of its methods. A lot of this class implements the default behavior, but there are three important things to take notice of here.
The first is that we maintain a reference to a list of Note
s in this class. This serves as an unchanging reference to the underlying data source from which we pull rows and to which we add rows.
The second is that we implemented getItemId()
to return the id stored in our Note
. This will be helpful later when we want to find a Note
object based solely on its position in the list when the row is touched.
The third is the behavior of getView()
. The way a list manages View
s for its rows is by recycling them if possible. Since the View
types of every row in the list are the same, you only need enough View
s to display the number of items shown on screen. Then, for example, when you scroll the list, the View
s that go off screen can be recycled to handle the items that come on screen.
Notice that we implemented a class called RowViewElements
. This acts as a simple vehicle, much like a Note
, to store references to View
s within each list row. In getView()
, if we are processing a new View
that is not being recycled (if (convertView == null)
), we have to link each reference to the View
s in the row's layout, otherwise we don't since they have already been linked by this same code before being recycled.
Another important part of initializing a non-recycled View
is LayoutInflater.from(context).inflate(R.layout.note_row_layout, parent, false);
With this line we are essentially creating an instance of a note_row_layout
, corresponding to the note_row_layout.xml
that we created earlier that is the visual representation of our list rows.
We then, regardless of whether the View
is recycled or not, use the View
references from RowViewElements
to set the actual title, date, and color of the row.
We have to get the actual Note
data from somewhere to link with the NoteListAdapter
. We could just make a list of Note
objects, but it would be nice if we encapsulated the list in a class to let us pull from a database, a file, the Internet, etc. along with allowing us to call complex functions to, for example, add or delete notes.
Let's create a NoteDBModel
interface that supports these methods. Right click the edu.gatech.androidnoteapp
folder in the Project explorer and select New->Java Class. Name it NoteDBModel
and set its Kind to Interface. Replace the contents with this code:
package edu.gatech.androidnoteapp;
import java.util.ArrayList;
/**
* An interface to the note database for reading and writing.
*/
public interface NoteDBModel {
/**
* Sets the adapter to be notified when the data changes
* @param adapter The adapter to notify
*/
public void setAdapter(NoteListAdapter adapter);
/**
* Refreshes the notes ArrayList for later use with getNotes()
*/
public void refreshNotes();
/**
* @return ArrayList of Notes from the Database
*/
public ArrayList<Note> getNotes();
/**
* Saves a new note to the database.
*
* @param note The note to create.
*/
public void createNote(Note note);
/**
* Saves a note to the database.
* Will overwrite notes with the same ID.
*
* @param note The note to save.
*/
public void saveNote(Note note);
/**
* Deletes a note from the database.
*
* @param note The note to delete.
*/
public void deleteNote(Note note);
/**
* Tries to find a note with the given id.
*
* @param id The id to look up.
* @return The note with the given id, else null
*/
public Note getNoteByID(long id);
}
With this definition, we can be sure that any class that implements this interface will support these methods. Now let's create a class that implements this interface.
Our goal is to have persistent storage of notes so when we save a note, close the app, and open the app again, the note will still be there. One common way to achieve persistence on Android devices is to use a SQLite database. This is a simple relational database (one row for each object, one column for each attribute) that is stored on the device and it supports the SQL language for row inserting, deleting, updating, etc. We will cover the database in more detail in Chapter 6.
For now, we will make a barebones ("stubbed out") implementation of this class and hardcode some list items to show how the list works. Right click the edu.gatech.androidnoteapp
folder in the Project explorer and select New->Java Class. Name it NoteSQLiteDBModel
and replace the contents with this code:
package edu.gatech.androidnoteapp;
import android.content.Context;
import java.util.ArrayList;
/**
* An implementation of a notes database that uses SQLite for storage.
*/
public class NoteSQLiteDBModel implements NoteDBModel {
/**
* List of notes, mirrored from database data.
*/
private ArrayList<Note> notes = new ArrayList<Note>();
/**
* The adapter that should update
*/
private NoteListAdapter adapter;
//TODO: add database variables
/**
* Standard constructor for the SQLiteModel, initializes the dbHelper variable so we can access the correct database
* @param context Android context (usually an activity)
*/
public NoteSQLiteDBModel(Context context) {
//TODO: open database
}
/**
* Sets the adapter to be notified when the data changes
* @param adapter The adapter to notify
*/
public void setAdapter(NoteListAdapter adapter) {
this.adapter = adapter;
}
//TODO: add open function
/**
* Refreshes the (ArrayList<Note> notes) from the database
*/
public void refreshNotes() {
notes.clear();
//TODO: pull from database instead of placeholders
notes.add(new Note(0, "Note 1", "Note text 1", new java.sql.Date(0), "#FFFFFF"));
notes.add(new Note(0, "Note 2", "Note text 2", new java.sql.Date(0), "#FF6666"));
notes.add(new Note(0, "Note 3", "Note text 3", new java.sql.Date(0), "#4DDB4D"));
notes.add(new Note(0, "Note 4", "Note text 4", new java.sql.Date(0), "#19A3FF"));
notes.add(new Note(0, "Note 5", "Note text 5", new java.sql.Date(0), "#FFFACD"));
if (adapter != null) {
adapter.notifyDataSetChanged();
}
}
/**
* Standard getter for the notes ArrayList
* @return notes ArrayList
*/
public ArrayList<Note> getNotes() {
return notes;
}
//TODO: add restart db function
//TODO: add cursor to note function
/**
* Adds a note to the database and calls refreshNotes() to fix the ArrayList appropriately
* @param note The note to create.
*/
public void createNote(Note note) {
//TODO: add a new note to database
refreshNotes();
}
/**
* Saves a note's data in the database, then calls refreshNotes() to rebuild the ArrayList appropriately
* @param note The note to save.
*/
public void saveNote(Note note) {
//TODO: update note in database
refreshNotes();
}
/**
* Deletes a note based on it's ID inside the database
* @param note The note to delete.
*/
public void deleteNote(Note note) {
//TODO: delete note from database
refreshNotes();
}
public Note getNoteByID(long id) {
for (Note note : notes) {
if (note.getID() == id) {
return note;
}
}
return null;
}
}
The main point of this class is to manage the notes ArrayList
. Currently, we are doing that manually by adding new Note
s in refreshNotes(). Later we will update the ArrayList
by pulling from the SQLite database.
Let's make one last change before we make our Activity
display notes. We will make the options menu show "Add Note" instead of "Settings" and assign an id so we can actually add the note when it is pressed later on.
Start by opening the menu file of the NoteListActivity
's menu: res/menu/menu_note_list.xml
. This file was automatically created when the project was created.
Change both the id and title from "action_settings" to "action_addnote".
The final layout should look like this:
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="edu.gatech.androidnoteapp.NoteListActivity">
<item android:id="@+id/action_addnote" android:title="@string/action_addnote"
android:orderInCategory="100" app:showAsAction="never" />
</menu>
Finally, let's return to our original NoteListActivity
to add support to actually show some list items.
Start by opening our NoteListActivity
java file. Replace its contents with this code:
package edu.gatech.androidnoteapp;
import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ContextMenu.ContextMenuInfo;
import android.widget.ListView;
import android.widget.AdapterView.AdapterContextMenuInfo;
/**
* The main activity that shows the list of notes.
* It is created on app open and stays until app close.
*
*/
public class NoteListActivity extends ListActivity {
//TODO: add static activity ids
private static final int DELETE_ID = Menu.FIRST;
/**
* The controller that manages note data.
*/
public NoteDBModel model;
public NoteListAdapter adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
model = new NoteSQLiteDBModel(this);
setContentView(R.layout.activity_note_list);
model.refreshNotes();
adapter = new NoteListAdapter(this, model.getNotes());
model.setAdapter(adapter);
setListAdapter(adapter);
registerForContextMenu(getListView());
}
/**
* Creates the menu for the action bar.
*/
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_note_list, menu);
return true;
}
/**
* Called when a menu item from the action bar is clicked.
* Creates a note if add note is clicked.
*/
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_addnote) {
createNote();
return true;
}
return super.onOptionsItemSelected(item);
}
/**
* Creates a context menu when user long-presses a list item.
*/
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, v, menuInfo);
menu.add(0, DELETE_ID, 0, R.string.menu_deletenote);
}
/**
* Called when a context item is clicked.
* Deletes the note if delete is clicked.
*/
@Override
public boolean onContextItemSelected(MenuItem item) {
switch(item.getItemId()) {
case DELETE_ID:
AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
model.deleteNote(model.getNoteByID(info.id));
return true;
}
return super.onContextItemSelected(item);
}
/**
* Called when a new note is created.
* Starts the edit activity.
*/
private void createNote() {
//TODO: spawn note edit activity
}
/**
* Called when a note in the list is clicked.
* Starts the edit activity, passing the note to edit.
*/
@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
//TODO: spawn note edit activity passing note id
}
/**
* Called when this activity is returned to from edit activity.
* Refreshes the list with the new note data.
*/
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode, resultCode, intent);
model.refreshNotes();
}
}
ListActivity
is a predefined Android subclass of Activity
that has convenient pre-made functionality for managing ListView
s.
When the Activity
is created, we create a new model and adapter and bind them with the ListView
.We also reference our for the options menu. The Context menu pops up when a row item is touched and held and we use this for deleting notes. The rest of the methods are stubs that we will fill out in the following chapters.
That's all for the basics of the note list! When you run your app, it should look like Figure 4-4 and Figure 4-5:


RUMBLE IN THE BRONX A film review by Yamamoto Copyright 1996 Yamamoto
There I was, about to save this damsel in distress and this wicked witch shows up and ruined everything. Actually, there was this cute woman lost and wanted directions. I was about to give her her the correct directions and this woman comes up and start mouthing off as if she knew it all and gave the woman the wrong information. Of course being the conscientious guy that I am, I told the woman that she just gave wrong directions and gave the woman the correct information. And they all lived happily ever after.
 It's not really an action film but a comedy packed with actions. Yes, it dubbed. Yes it does first come across like one of those late night kung fu movies. No, it's a lot funnier than you think. And no, you won't have to worry about a plot 'cause it ain't there. No, it's more entertaining than you expect.
No nakkid boobs. 4 doz bullets. 5 dead bodies. 32 on the vomit meter. 2 moon shots. What we got here are: airplane-fu, baggage- fu, Manhattan-fu, grafitti-fu, one way mirror-fu, attack of killer zit-fu, shop lifting-fu, ultimate jacket-fu, dream car-fu, attack of killer bikers-fu, wedding of the century-fu, more bikers from hell-fu, diamond-fu, attack of killer bottles-fu, forgive and for- get-fu, FBI-fu, whole lotta kung-fu and insatiable action-fu. Drive in academy nomination for Jackie Chan for saying stuff like "we should be drinking together" and to Anita Mui for saying stuff like "I should never have trusted you" and to Francois Choi for saying stuff like "you'll get use to it" and to Kris Lord for saying stuff like "I don't bargain." Two and a half stars. Shaggy Bob says wicked!
Alien Alert! Why are so many people protesting the 3rd execution in this state this decade? It cost what, $50k per year per inmate to keep 'em inside while a bullet cost what $0.10? You figure the math. Do you realize what you can do with that kind of money? May be if we save enough money, and put them in education, we won't need such extensive justice system. Ok, I can always dream can't I?
(c) 2/24/96 - Shaggy Bob
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


French tourist dies trying to take selfie at Thai waterfall
Second person to die there this year
by Amy Woodyatt, CNN(CNN) - A French tourist has died after falling from a waterfall in Thailand while attempting to take a selfie.
The 33-year-old man died on Thursday after he slipped and fell from the Na Mueang 2 waterfall on the Thai island of Koh Samui -- the same spot where a Spanish tourist died in a fall in July, the AFP news agency reported.
"His friend said he was trying to take a selfie and then he slipped and fell," Lieutenant Phuvadol Viriyavarangkul of the island's tourist police told AFP.
Viriyavarangkul told the news agency that the spot is roped off and there is a sign warning tourists of the danger.
CNN has contacted the French Foreign Ministry for comment on the incident.
Some 259 people worldwide died while taking selfies from October 2011 to November 2017, according to a study published in India's Journal of Family Medicine and Primary Care.
According to the study, the most selfie deaths occurred in India, followed by Russia, the US and Pakistan. Most of the victims were men (about 72%) and under the age of 30.
In October, four members of the same family drowned at a dam in India after slipping into the water while trying to take a selfie.
CNN's Saskya Vandoorne contributed to this story.


The Cloud Platform deployment target is a collection of servers that the QuantConnect team manages. It's the same deployment target you use if you create projects, spin up research nodes, and deploy algorithms on the QuantConnect website. For more information about QuantConnect Cloud, including our infrastructure and usage quotas, see Cloud Platform.
Follow these steps to set the deployment target Cloud Platform:
After you set the deployment target to Cloud Platform, the following icons are gold:
| Icon | Name |
|---|---|