fanotify_init - create and initialize fanotify group
#include <fcntl.h>
#include <sys/fanotify.h>
int fanotify_init(unsigned int flags, unsigned
int event_f_flags);
For an overview of the fanotify API, see fanotify(7).
fanotify_init() initializes a new fanotify group and
returns a file descriptor for the event queue associated with the group.
The file descriptor is used in calls to fanotify_mark(2) to
specify the files, directories, mounts or filesystems for which fanotify
events shall be created. These events are received by reading from the file
descriptor. Some events are only informative, indicating that a file has
been accessed. Other events can be used to determine whether another
application is permitted to access a file or directory. Permission to access
filesystem objects is granted by writing to the file descriptor.
Multiple programs may be using the fanotify interface at the same
time to monitor the same files.
In the current implementation, the number of fanotify groups per
user is limited to 128. This limit cannot be overridden.
Calling fanotify_init() requires the CAP_SYS_ADMIN
capability. This constraint might be relaxed in future versions of the API.
Therefore, certain additional capability checks have been implemented as
indicated below.
The flags argument contains a multi-bit field defining the
notification class of the listening application and further single bit
fields specifying the behavior of the file descriptor.
If multiple listeners for permission events exist, the
notification class is used to establish the sequence in which the listeners
receive the events.
Only one of the following notification classes may be specified in
flags:
- FAN_CLASS_PRE_CONTENT
- This value allows the receipt of events notifying that a file has been
accessed and events for permission decisions if a file may be accessed. It
is intended for event listeners that need to access files before they
contain their final data. This notification class might be used by
hierarchical storage managers, for example.
- FAN_CLASS_CONTENT
- This value allows the receipt of events notifying that a file has been
accessed and events for permission decisions if a file may be accessed. It
is intended for event listeners that need to access files when they
already contain their final content. This notification class might be used
by malware detection programs, for example.
- FAN_REPORT_FID (since Linux 5.1)
- This value allows the receipt of events which contain additional
information about the underlying filesystem object correlated to an event.
An additional structure encapsulates the information about the object and
is included alongside the generic event metadata structure. The file
descriptor that is used to represent the object correlated to an event is
instead substituted with a file handle. It is intended for applications
that may find the use of a file handle to identify an object more suitable
than a file descriptor. Additionally, it may be used for applications that
are interested in directory entry events, such as FAN_CREATE,
FAN_ATTRIB, FAN_MOVE, and FAN_DELETE for example.
Note that the use of directory modification events are not supported when
monitoring a mount point. The use of FAN_CLASS_CONTENT or
FAN_CLASS_PRE_CONTENT is not permitted with this flag and will
result in the error EINVAL. See fanotify(7) for additional
information.
- FAN_CLASS_NOTIF
- This is the default value. It does not need to be specified. This value
only allows the receipt of events notifying that a file has been accessed.
Permission decisions before the file is accessed are not possible.
Listeners with different notification classes will receive events
in the order FAN_CLASS_PRE_CONTENT, FAN_CLASS_CONTENT,
FAN_CLASS_NOTIF. The order of notification for listeners in the same
notification class is undefined.
The following bits can additionally be set in flags:
- FAN_CLOEXEC
- Set the close-on-exec flag (FD_CLOEXEC) on the new file descriptor.
See the description of the O_CLOEXEC flag in open(2).
- FAN_NONBLOCK
- Enable the nonblocking flag (O_NONBLOCK) for the file descriptor.
Reading from the file descriptor will not block. Instead, if no data is
available, read(2) fails with the error EAGAIN.
- FAN_UNLIMITED_QUEUE
- Remove the limit of 16384 events for the event queue. Use of this flag
requires the CAP_SYS_ADMIN capability.
- FAN_UNLIMITED_MARKS
- Remove the limit of 8192 marks. Use of this flag requires the
CAP_SYS_ADMIN capability.
- FAN_REPORT_TID (since Linux 4.20)
- Report thread ID (TID) instead of process ID (PID) in the pid field
of the struct fanotify_event_metadata supplied to read(2)
(see fanotify(7)).
The event_f_flags argument defines the file status flags
that will be set on the open file descriptions that are created for fanotify
events. For details of these flags, see the description of the flags
values in open(2). event_f_flags includes a multi-bit field
for the access mode. This field can take the following values:
- O_RDONLY
- This value allows only read access.
- O_WRONLY
- This value allows only write access.
- O_RDWR
- This value allows read and write access.
Additional bits can be set in event_f_flags. The most
useful values are:
- O_LARGEFILE
- Enable support for files exceeding 2 GB. Failing to set this flag
will result in an EOVERFLOW error when trying to open a large file
which is monitored by an fanotify group on a 32-bit system.
- O_CLOEXEC (since Linux 3.18)
- Enable the close-on-exec flag for the file descriptor. See the description
of the O_CLOEXEC flag in open(2) for reasons why this may be
useful.
The following are also allowable: O_APPEND, O_DSYNC,
O_NOATIME, O_NONBLOCK, and O_SYNC. Specifying any other
flag in event_f_flags yields the error EINVAL (but see
BUGS).
On success, fanotify_init() returns a new file descriptor. On error, -1
is returned, and errno is set to indicate the error.
- EINVAL
- An invalid value was passed in flags or event_f_flags.
FAN_ALL_INIT_FLAGS (deprecated since Linux kernel version 4.20)
defines all allowable bits for flags.
- EMFILE
- The number of fanotify groups for this user exceeds 128.
- EMFILE
- The per-process limit on the number of open file descriptors has been
reached.
- ENOMEM
- The allocation of memory for the notification group failed.
- ENOSYS
- This kernel does not implement fanotify_init(). The fanotify API is
available only if the kernel was configured with
CONFIG_FANOTIFY.
- EPERM
- The operation is not permitted because the caller lacks the
CAP_SYS_ADMIN capability.
fanotify_init() was introduced in version 2.6.36 of the Linux kernel and
enabled in version 2.6.37.
This system call is Linux-specific.
The following bug was present in Linux kernels before version 3.18:
- *
- The O_CLOEXEC is ignored when passed in event_f_flags.
The following bug was present in Linux kernels before version
3.14:
- *
- The event_f_flags argument is not checked for invalid flags. Flags
that are intended only for internal use, such as FMODE_EXEC, can be
set, and will consequently be set for the file descriptors returned when
reading from the fanotify file descriptor.
fanotify_mark(2), fanotify(7)
This page is part of release 5.05 of the Linux man-pages project. A
description of the project, information about reporting bugs, and the latest
version of this page, can be found at https://www.kernel.org/doc/man-pages/.


method of static class JsNgram
Description
Generate html button to control pages for result.
Example
selector.append(JsNgram.makeLinkToNext(true, selector, null, 200, 100));
Usage
makeLinkToNext(isPerfection, selector, doc, start, limit);
Argument isPerfection is a boolean value whether the button is for perfect matches or partial matches.
Argument selector is a html element to place the next results.
A button for next hits in a document is generated when argument doc is a document id.
A button for next documents is generated when argument doc is null.
Argument start is a number of items already shown.
Argument limit is a number of items to show when the button pressed.
A html div
element of class ui
icluding a button
element with a click event showing next results is created.


Essay
An essay is a non-fiction work making arguments or setting out opinions on any topic.
Books
The Busy Blue Jay: True Bird Stories from My Notebooks
by Olive Thorne Miller
A story about a blue jay named Jakie. This chapter focuses on his mischevious behavior.
A Defence of Free-Thinking in Mathematics
by George Berkeley
An essay/argument for Sir Isaac Newton and the author’s mathematical beliefs and philosophies. The full title is "A Defence of Free-Thinking in Mathematics: In answer To a Pamphlet of Philalethes Cantabrigiensis, intitled, Geometry no Friend to Infidelity, or a Defence of Sir ISAAC NEWTON, and the BRITISH Mathematicians. Also an Appendix concerning Mr. WALTON’s Vindication of the Principles of Fluxions contained in the ANALYST."
History
by Ralph Waldo Emerson
History is within everyone, so living life is the best way to know history/people/life. History books should be written from this more open, organic perspective. Someone experiencing life is closer to true knowledge than someone who reads about it.
Selected Essays of Robert Louis Stevenson
by Robert Louis Stevenson
This book collects essays of Robert Louis Stevenson, including selections from Across the Plains (1892) and Essays of Travel (1911).
The Souls of Black Folk
by W. E. B. Du Bois
The Souls of Black Folk is a classic work of African–American literature by activist W.E.B. Du Bois. The book, published in 1903, contains several essays on race, some of which had been previously published in Atlantic Monthly magazine. Du Bois drew from his own experiences to develop this groundbreaking work on being African–American in American society. Outside of its notable place in African–American history, The Souls of Black Folk also holds an important place in social science as one of the early works to deal with sociology.
Passages
What Christmas is as We Grow Older
Dickens' Christmas Stories
by Charles Dickens
The speaker compares the feelings and hopes of youth at Christmastime with the changes that occur with age.
From Mandarin to St. Augustine
Florida: Essays and Poems
by Harriet Beecher Stowe
The author discusses the many wonders of nature that can be witnessed while traveling between Mandarin and St. Augustine, Florida.
The Grand Tour Up River
Florida: Essays and Poems
by Harriet Beecher Stowe
The Author gives a detailed description of the vegetation and wildlife that surrounds the St. Johns River.
Spanish-American War: The Rough Riders in Tampa
Florida: Essays and Poems
by Theodore Roosevelt
The Rough Riders’ time in Tampa is filled with misunderstandings which they deal with as best they can.
St. Augustine
Florida: Essays and Poems
by Harriet Beecher Stowe
The Author describes the scenery in St. Augustine, Florida.
Philosophy of Furniture
The Works of Edgar Allan Poe
by Edgar Allan Poe
The author discusses the different presentations of wealth in European and American culture, focusing on the concept of "a well furnished apartment".
The Poetic Principle
The Works of Edgar Allan Poe
by Edgar Allan Poe
The author presents his opinion on poetry and the ultimate goal of art.
The Philosophy of Composition
The Works of Edgar Allan Poe
by Edgar Allan Poe
The author presents his theory on the subject of compositiion.
Old English Poetry
The Works of Edgar Allan Poe
by Edgar Allan Poe
The author presents his opinion of English poetry.


Ghanaian female star Mukarama Abdulai bags brace as Apache Ladies secure semi-final berth in NJCAA Championship
Mukarama Abdulai bagged a brace for Tyler Junior College Apache Ladies in their 3-2 win over Snow (Utah) to secure a semi-final berth in the NJCAA Championship.
The Ghanaian female star opened the scoring for her side as they coasted to victory.
The win means Tyler Junior College Apache Ladies are one win away from playing in their fourth straight national soccer championship match.
The Apache Ladies, seeded No. 3, will play in the noon semifinal against host and No. 2 seed Eastern Florida State (16-0-0) on Friday.
The other semifinal will pit No. 1 Monroe (New York) (13-0-0) against No. 11 Lewis & Clark (Illinois) (20-3) at 9 a.m. Friday.
The winners advance to the national championship game that is scheduled for 6 p.m. Saturday.
Snow tied the game at 2-2 with 11:50 on the clock in the second half but TJC’s Nukarama Abdulai, a 5-8 freshman forward from Tamale, Ghana, scored the go-ahead goal and the eventual game-winner with 9:54 on the scoreboard.
The victory gave the No. 3 seed Apache Ladies the Pool C championship over No. 10 Seminole State of Oklahoma (1-1) and Snow (0-2).
Abdulai scored the first goal of the game for a 1-1 tie and Vicki Adams, a 5-3 freshman from Gyongyos, Hungary, gave TJC a 2-1 lead.
Patricia Estupinan, a sophomore from Spain, had two assists, while Abdulai had an assist.
Sydney Malmstrom, a sophomore from Whitehouse, was in goal for the Apache Ladies.
TJC has won six straight games.
The Apache Ladies have won three national soccer championships — 2009, 2011 and 2017.


Duke's Forest is a simple e-commerce application that contains several web applications and illustrates the use of multiple Java EE 7 APIs:
JavaServer Faces technology, including Ajax
Contexts and Dependency Injection for Java EE (CDI)
Java API for RESTful Web Services (JAX-RS)
Java Persistence API (JPA)
Java API for JavaBeans Validation (Bean Validation)
Enterprise JavaBeans (EJB) technology
Java Message Service (JMS)
The application consists of the following projects.
Duke's Store: A web application that has a product catalog, customer self-registration, and a shopping cart. It also has an administration interface for product, category, and user management. The project name is dukes-store
.
Duke's Shipment: A web application that provides an interface for order shipment management. The project name is dukes-shipment
.
Duke's Payment: A web service application that has a RESTful web service for order payment. The project name is dukes-payment
.
Duke's Resources: A simple Java archive project that contains all resources used by the web projects. It includes messages, CSS style sheets, images, JavaScript files, and JavaServer Faces composite components. The project name is dukes-resources
.
Entities: A simple Java archive project that contains all JPA entities. This project is shared among other projects that use the entities. The project name is entities
.
Events: A simple Java archive project that contains a POJO class that is used as a CDI event. The project name is events
.
The following topics are addressed here:
Duke's Forest is a complex application consisting of three main projects and three subprojects. Figure 59-1 shows the architecture of the three main projects that you will deploy: Duke's Store, Duke's Shipment, and Duke's Payment. It also shows how Duke's Store makes use of the Events and Entities projects.
Figure 59-1 Architecture of the Duke's Forest Example Application
Duke's Forest uses the following Java EE 7 platform features:
Java Persistence API entities
Bean Validation annotations on the entities for verifying data
XML annotations for Java API for XML binding (JAXB) serialization
Web services
A JAX-RS web service for payment, with security constraints
A JAX-RS web service that is EJB based
Enterprise beans
Local session beans
All enterprise beans packaged within the WAR
Contexts and Dependency Injection (CDI)
CDI annotations for JavaServer Faces components
A CDI managed bean used as a shopping cart, with conversation scoping
Qualifiers
Events and event handlers
Servlets
A servlet for dynamic image presentation
JavaServer Faces 2.2 technology, using Facelets for the web front end
Templating
Composite components
File upload
Resources packaged in a JAR file so they can be found in the classpath
Security
Java EE security constraints on the administrative interface business methods (enterprise beans)
Security constraints for customers and administrators (web components)
Single Sign-On (SSO) to propagate an authenticated user identity from Duke's Store to Duke's Shipment
The Duke's Forest application has two main user interfaces, both packaged within the Duke's Store WAR file:
The main interface, for customers and guests
The administrative interface used to perform back office operations, such as adding new items to the catalog
The Duke's Shipment application also has a user interface, accessible to administrators.
Figure 59-2 shows how the web applications and the web service interact.
Figure 59-2 Interactions between Duke's Forest Components
As illustrated in Figure 59-2, the customer interacts with the main interface of Duke's Store, while the administrator interacts with the administration interface. Both interfaces access a façade consisting of managed beans and stateless session beans, which in turn interact with the entities that represent database tables. The façade also interacts with web services APIs that access the Duke's Payment web service. When the payment for an order is approved, Duke's Store sends the order to a JMS queue. The administrator also interacts with the interface of Duke's Shipment, which can be accessed either directly through Duke's Shipment or from the administration interface of Duke's Store by means of a web service. When the administrator approves an order for shipping, Duke's Shipment consumes the order from the JMS queue.
The most fundamental building blocks of the application are the Events and Entities projects, which are bundled into Duke's Store and Duke's Shipment along with the Duke's Resources project.
Events are one of the core components of Duke's Forest. The events
project, included in all three of the main projects, is the most simple project of the application. It has only one class, OrderEvent
, but this class is responsible for most of the messages between objects in the application.
The application can send messages based on events to different components and react to them based on the qualification of the event. The application supports the following qualifiers:
@LoggedIn
: For authenticated users
@New
: When a new order is created by the shopping cart
@Paid
: When an order is paid for and ready for shipment
The following code snippet from the PaymentHandler
class of Duke's Store shows how the @Paid
event is handled:
@Inject @Paid Event<OrderEvent> eventManager; ... public void onNewOrder(@Observes @New OrderEvent event) { if (processPayment(event)) { orderBean.setOrderStatus(event.getOrderID(), String.valueOf(OrderBean.Status.PENDING_PAYMENT.getStatus())); logger.info("Payment Approved"); eventManager.fire(event); } else { orderBean.setOrderStatus(event.getOrderID(), String.valueOf(OrderBean.Status.CANCELLED_PAYMENT.getStatus())); logger.info("Payment Denied"); } }
To enable users to add more events to the project easily or update an event class with more fields for a new client, this component is a separate project within the application.
The entities
project is a Java Persistence API (JPA) project used by both Duke's Store and Duke's Shipment. It is generated from the database schema shown in Figure 59-3 and is also used as a base for the entities consumed and produced by the web services through JAXB. Each entity has validation rules based on business requirements, specified using Bean Validation.
Figure 59-3 Duke's Forest Database Tables and Their Relationships
The database schema contains eight tables:
PERSON
, which has a one-to-many relationship with PERSON_GROUPS
and CUSTOMER_ORDER
GROUPS
, which has a one-to-many relationship with PERSON_GROUPS
PERSON_GROUPS
, which has a many-to-one relationship with PERSON
and GROUPS
(it is the join table between those two tables)
PRODUCT
, which has a many-to-one relationship with CATEGORY
and a one-to-many relationship with ORDER_DETAIL
CATEGORY
, which has a one-to-many relationship with PRODUCT
CUSTOMER_ORDER
, which has a one-to-many relationship with ORDER_DETAIL
and a many-to-one relationship with PERSON
and ORDER_STATUS
ORDER_DETAIL
, which has a many-to-one relationship with PRODUCT
and CUSTOMER_ORDER
(it is the join table between those two tables)
ORDER_STATUS
, which has a one-to-many relationship with CUSTOMER_ORDER
The entity classes that correspond to these tables are as follows.
Person
, which defines attributes common to customers and administrators. These attributes are the person's name and contact information, including street and email addresses. The email address has a Bean Validation annotation to ensure that the submitted data is well-formed. The generated table for the Person
entity also has a DTYPE
field that represents the discriminator column. Its value identifies the subclass (Customer
or Administrator
) to which the person belongs.
Customer
, a specialization of Person
with a specific field for CustomerOrder
objects.
Administrator
, a specialization of Person
with fields for administration privileges.
Groups
, which represents the group (USERS
or ADMINS
) to which the user belongs.
Product
, which defines attributes for products. These attributes include name, price, description, associated image, and category.
Category
, which defines attributes for product categories. These attributes include a name and a set of tags.
CustomerOrder
, which defines attributes for orders placed by customers. These attributes include an amount and a date, along with id values for the customer and the order detail.
OrderDetail
, which defines attributes for the order detail. These attributes include a quantity and id values for the product and the customer.
OrderStatus
, which defines a status attribute for each order.
The dukes-payment
project is a web project that holds a simple Payment web service. Since this is an example application, it does not obtain any real credit information or even customer status to validate the payment. For now, the only rule imposed by the payment system is to deny all orders above $1,000. This application illustrates a common scenario where a third-party payment service is used to validate credit cards or bank payments.
The project uses HTTP Basic Authentication and JAAS (Java Authentication and Authorization Service) to authenticate a customer to a JAX-RS web service. The implementation itself exposes a simple method, processPayment
, which receives an OrderEvent
to evaluate and approve or deny the order payment. The method is called from the checkout process of Duke's Store.
The dukes-resources
project contains a number of files used by both Duke's Store and Duke's Shipment, bundled into a JAR file placed in the classpath. The resources are in the src/main/resources
directory:
META-INF/resources/css
: Two style sheets, default.css
and jsfcrud.css
META-INF/resources/img
: Images used by the projects
META-INF/resources/js
: A JavaScript file, util.js
META-INF/resources/util
: Composite components used by the projects
bundles/Bundle.properties
: Application messages in English
bundles/Bundle_es.properties
: Application messages in Spanish
ValidationMessages.properties
: Bean Validation messages in English
ValidationMessages_es.properties
: Bean Validation messages in Spanish
Duke's Store, a web application, is the core application of Duke's Forest. It is responsible for the main store interface for customers as well as the administration interface.
The main interface of Duke's Store allows the user to perform the following tasks:
Browsing the product catalog
Signing up as a new customer
Adding products to the shopping cart
Checking out
Viewing order status
The administration interface of Duke's Store allows administrators to perform the following tasks:
Product maintenance (create, edit, update, delete)
Category maintenance (create, edit, update, delete)
Customer maintenance (create, edit, update, delete)
Group maintenance (create, edit, update, delete)
The project also uses stateless session beans as façades for interactions with the JPA entities described in The entities Project, and CDI managed beans as controllers for interactions with Facelets pages. The project thus follows the MVC (Model-View-Controller) pattern and applies the same pattern to all entities and pages, as in the following example.
AbstractFacade
is an abstract class that receives a Type<T>
and implements the common operations (CRUD) for this type, where <T>
is a JPA entity.
ProductBean
is a stateless session bean that extends AbstractFacade
, applying Product
as Type<T>
, and injects the PersistenceContext
for the EntityManager
. This bean implements any custom methods needed to interact with the Product
entity or to call a custom query.
ProductController
is a CDI managed bean that interacts with the necessary enterprise beans and Facelets pages to control the way the data will be displayed.
ProductBean
begins as follows:
@Stateless public class ProductBean extends AbstractFacade<Product> { private static final Logger logger = Logger.getLogger(ProductBean.class.getCanonicalName()); @PersistenceContext(unitName="forestPU") private EntityManager em; @Override protected EntityManager getEntityManager() { return em; } ...
The enterprise beans used in Duke's Store provide the business logic for the application and are located in the com.forest.ejb
package. All are stateless session beans.
AbstractFacade
is not an enterprise bean but an abstract class that implements common operations for Type<T>
, where <T>
is a JPA entity.
Most of the other beans extend AbstractFacade
, inject the PersistenceContext
, and implement any needed custom methods:
AdministratorBean
CategoryBean
EventDispatcherBean
GroupsBean
OrderBean
OrderDetailBean
OrderJMSManager
OrderStatusBean
ProductBean
ShoppingCart
UserBean
The ShoppingCart
class, although it is in the ejb
package, is a CDI managed bean with conversation scope, which means that the request information will persist across multiple requests. Also, ShoppingCart
is responsible for starting the event chain for customer orders, which invokes the RESTful web service in dukes-payment
and publishes an order to the JMS queue for shipping approval if the payment is successful.
Like the other case study examples, Duke's Store uses Facelets to display the user interface. The main interface uses a large number of Facelets pages to display different areas. The pages are grouped into directories based on which module they handle.
template.xhtml
: Template file, used for both main and administration interfaces. It first performs a browser check to verify that the user's browser supports HTML 5, which is required for Duke's Forest. It divides the screen into several areas and specifies the client page for each area.
topbar.xhtml
: Page for the login area at the top of the screen.
top.xhtml
: Page for the title area.
left.xhtml
: Page for the left sidebar.
index.xhtml
: Page for the main screen content.
login.xhtml
: Login page specified in web.xml
. The main login interface is provided in topbar.xhtml
, but this page appears if there is a login error.
admin
directory: Pages related to the administration interface, described in Facelets Files Used in the Administration Interface of Duke's Store.
customer
directory: Pages related to customers (Create.xhtml
, Edit.xhtml
, List.xhtml
, Profile.xhtml
, View.xhtml
).
order
directory: Pages related to orders (Create.xhtml
, List.xhtml
, MyOrders.xhtml
, View.xhtml
).
orderDetail
directory: Popup page allowing users to view details of an order (View_popup.xhtml
).
product
directory: Pages related to products (List.xhtml
, ListCategory.xhtml
, View.xhtml
).
The Facelets pages for the administration interface of Duke's Store are found in the web/admin
directory:
administrator
directory: Pages related to administrator management (Create.xhtml
, Edit.xhtml
, List.xhtm
l, View.xhtml
)
category
directory: Pages related to product category management (Create.xhtml
, Edit.xhtml
, List.xhtml
, View.xhtml
)
customer
directory: Pages related to customer management (Create.xhtml
, Edit.xhtml
, List.xhtml
, Profile.xhtml
, View.xhtml
)
groups
directory: Pages related to group management (Create.xhtml
, Edit.xhtml
, List.xhtml
, View.xhtml
)
order
directory: Pages related to order management (Create.xhtml
, Edit.xhtml
, List.xhtml
, View.xhtml
)
orderDetail
directory: Popup page allowing the administrator to view details of an order (View_popup.xhtml
)
product
directory: Pages related to product management (Confirm.xhtm
l, Create.xhtml
, Edit.xhtml
, List.xhtml
, View.xhtml
)
Duke's Store uses the following CDI managed beans, which correspond to the enterprise beans. The beans are in the com.forest.web
package:
AdministratorController
CategoryController
CustomerController
CustomerOrderController
GroupsController
OrderDetailController
OrderStatusController
ProductController
UserController
The CDI managed beans in the main interface of Duke's Store use the following helper classes, found in the com.forest.web.util
package:
AbstractPaginationHelper
: An abstract class with methods used by the managed beans
ImageServlet
: A servlet class that retrieves the image content from the database and displays it
JsfUtil
: Class used for JavaServer Faces operations, such as queuing messages on a FacesContext
instance
MD5Util
: Class used by the CustomerController
managed bean to generate an encrypted password for a user
Duke's Store defines the following qualifiers in the com.forest.qualifiers
package:
@LoggedIn
: Qualifies a user as having logged in
@New
: Qualifies an order as new
@Paid
: Qualifies an order as paid
Duke's Store defines event handlers related to the OrderEvent
class packaged in the events
project (see The events Project). The event handlers are in the com.forest.handlers
package.
IOrderHandler
: The IOrderHandler
interface defines a method, onNewOrder
, implemented by the two handler classes.
PaymentHandler
: The ShoppingCart
bean fires an OrderEvent
qualified as @New
. The onNewOrder
method of PaymentHandler
observes these events and, when it intercepts them, processes the payment using the Duke's Payment web service. After a successful response from the web service, PaymentHandler
fires the OrderEvent
again, this time qualified as @Paid
.
DeliveryHandler
: The onNewOrder
method of DeliveryHandler
observes OrderEvent
objects qualified as @Paid
(orders paid and ready for delivery) and modifies the order status to PENDING_SHIPMENT
. When an administrator accesses Duke's Shipment, it will call the Order Service, a RESTful web service, and ask for all orders in the database that are ready for delivery.
Duke's Store uses the following deployment descriptors, located in the web/WEB-INF
directory:
faces-config.xml
: The JavaServer Faces configuration file
glassfish-web.xml
: The configuration file specific to GlassFish Server
web.xml
: The web application configuration file
Duke's Shipment is a web application with a login page, a main Facelets page, and some other objects. This application, which is accessible only to administrators, consumes orders from a JMS queue and calls the RESTful web service exposed by Duke's Store to update the order status. The main page of Duke's Shipment shows a list of orders pending shipping approval and a list of shipped orders. The administrator can approve or deny orders for shipping. If approved, the order is shipped, and it appears under the Shipped heading. If denied, the order disappears from the page, and on the customer's Orders list it appears as cancelled.
There is also a gear icon on the Pending list that makes an Ajax call to the Order Service to refresh the list without refreshing the page. The code looks like this:
<h:commandLink> <h:graphicImage library="img" title="Check for new orders" style="border:0px" name="refresh.png"/> <f:ajax execute="@form" render="@form" /> </h:commandLink>
The UserBean
stateless session bean used in Duke's Shipment provides the business logic for the application and is located in the com.forest.shipment.session
package.
Like Duke's Store, Duke's Shipment uses the AbstractFacade
class. This class is not an enterprise bean but an abstract class that implements common operations for Type<T>
, where <T>
is a JPA entity.
The OrderBrowser
stateless session bean, located in the com.forest.shipment.ejb
package, has one method that browses the JMS order queue and another that consumes an order message after the administrator approves or denies the order for shipment.
Duke's Shipment has only one page, so it has many fewer Facelets files than Duke's Store.
template.xhtml
: The template file, like the one in Duke's Store, first performs a browser check to verify that the user's browser supports HTML 5, which is required for Duke's Forest. It divides the screen into areas and specifies the client page for each area.
topbar.xhtml
: Page for the login area at the top of the screen.
top.xhtml
: Page for the title area.
index.xhtml
: Page for the initial main screen content.
login.xhtml
: Login page specified in web.xml
. The main login interface is provided in topbar.xhtml
, but this page appears if there is a login error.
admin/index.xhtml
: Page for the main screen content after authentication.
Duke's Shipment uses the following CDI managed beans, in the com.forest.shipment
package:
web.ShippingBean
: Managed bean that acts as a client to the Order Service
web.UserController
: Managed bean that corresponds to the UserBean
session bean
The Duke's Shipment managed beans use only one helper class, found in the com.forest.shipment.web.util
package:
JsfUtil
: Class used for JavaServer Faces operations, such as queuing messages on a FacesContext
instance
Duke's Shipment includes the @LoggedIn
qualifier described in Qualifiers Used in Duke's Store.
You can use NetBeans IDE or Maven to build and deploy Duke's Forest.
Make sure that GlassFish Server has been started (see Starting and Stopping GlassFish Server), as well as the database server (see Starting and Stopping the Java DB Server).
From the File menu, choose Open Project.
In the Open Project dialog box, navigate to:
tut-install/examples/case-studies
Select the dukes-forest
folder.
Select the Open Required Projects check box and click Open Project.
Right-click the dukes-forest
folder and select Build.
This task configures the server, creates and populates the database, builds all the subprojects, assembles them into JAR and WAR files, and deploys the dukes-payment
, dukes-store,
and dukes-shipment
applications.
To configure the server, this task creates a JDBC security realm named jdbcRealm, enables default principal-to-role mapping, and enables single sign-on (SSO) for the HTTP Service.
Make sure that GlassFish Server has been started (see Starting and Stopping GlassFish Server), as well as the database server (see Starting and Stopping the Java DB Server).
In a terminal window, go to:
tut-install/examples/case-studies/dukes-forest/
Enter the following command to configure the server, create and populate the database, build all the subprojects, assemble them into JAR and WAR files, and deploy the dukes-payment
, dukes-store,
and dukes-shipment
applications:
mvn install
To configure the server, this task creates a JDBC security realm named jdbcRealm, enables default principal-to-role mapping, and enables single sign-on (SSO) for the HTTP Service.
Running the Duke's Forest application involves several tasks:
Registering as a customer of Duke's Store
As a customer, purchasing products
As an administrator, approving or denying shipment of a product
As an administrator, creating a new product, customer, group, or category
In a web browser, enter the following URL:
http://localhost:8080/dukes-store
The Duke's Forest - Store page opens.
Click Sign Up at the top of the page.
Fill in the form fields, then click Save.
All fields are required, and the Password value must be at least 7 characters in length.
To log in as the user you created, or as one of two users already in the database, enter the user name and password and click Log In.
The preexisting users have the user names<EMAIL_ADDRESS>and<EMAIL_ADDRESS>, and they both have the same password, 1234
.
Click Products in the left sidebar.
On the page that appears, click one of the categories (Plants, Food, Services, or Tools).
Choose a product and click Add to Cart.
You can order only one of any one product, but you can order multiple different products in multiple categories. The products and a running total appear in the Shopping Cart in the left sidebar.
When you have finished choosing products, click Checkout.
A message appears: "Your order is being processed. Check the Orders page to see the status of your order."
Click Orders in the left sidebar to verify your order.
If the total of the order exceeds $1,000, the status of the order is "Order cancelled," because the Payment web service denies orders over that limit. Otherwise, the status is "Ready to ship."
When you have finished placing orders, click Logout at the top of the page.
Log in to Duke's Store as an administrator.
Your user name is<EMAIL_ADDRESS>, and your password is 1234
.
The main administration page allows you to view categories, customers, administrators, groups, products, and orders, and to create new objects of all types except orders.
At the bottom of the page, click Approve Shipment.
This action takes you to Duke's Shipment, retaining your administrator login.
On the Pending list, click Approve to approve an order and move it to the Shipped area of the page.
If you click Deny, the order disappears from the page. If you log in to Duke's Store again as the customer, it will appear in the Orders list as "Order cancelled."
To return to Duke's Store from Duke's Shipment, click Return to Duke's Store.
You can create other kinds of objects as well as products. Creating products is more complex than the other creation processes, so it is described here.
Log in to Duke's Store as an administrator.
On the main administration page, click Create New Product.
Enter values in the Name, Price, and Description fields.
Select a category, then click Next.
On the Upload the Product Image page, click Browse to locate an image on your file system using a file chooser.
Click Next.
On the next page, view the product fields, then click Done.
Click Products in the left sidebar, then click the category to verify that the product has been added.
Click Administration at the top of the page to return to the main administration page, or click Logout to log out.


BANK OF AFRICA
AGENCE SAN PEDRO
14 BP 1210 San Pedro 14
Cote D'Ivoire-West Africa.
Dear Sir,
I am Mrs Dorise Marie FRANCOISE,an accountant of auditing and accounting section of Bank of Africa in Cote D'Ivoire.
With due respect and regard I wish to seek your urgent assistance to transfer the sum of (U.S.7.5 MILLION DOLLARS)SEVEN MILLION FIVE HUNDRED THOUSAND DOLLARS from the above mentioned bank. This money belongs to one of our customers,(Robert Rice ) who died in a plane crash with his wife and the fund has been lying dormant with the bank with out any claim,either from his family or relation up to date.
I am contacting you to act as the bonafide next of kin to the deceased.There is no risk in this transaction,as all loope holes has been taken care of,and all necessary informations as regards to this fund have been secured.
Be notified that
I am still working with the bank and it's only me and my colleagues that are aware of this development,thus treat this proposal as confidential and secret for our security.
I have served the bank faithfully for good number of years and 'am presently preparing for my retirement therefore,I see this as a golden opportunity to be comfortable in life after retirement.
As soon as this fund is secured into your account,I will come over for the collection of our due share.
The sharing mod is as follows:20% for you the account owner,70% for me and my colleagues ,while 10% will be set aside for expensis made during the transaction.
Looking foward to hearing from you.
My regards,
Mrs Dorise Marie Françoise
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


topgrade- Say yes to all updates:
topgrade -y- Cleanup temporary/old files:
topgrade -c- Disable a certain update operation:
topgrade --disable operation- Only perform a certain update operation:
topgrade --only operation- Edit the config file with default editor:
topgrade --edit-config


CLDF-related Publications
Catalogs
Glottolog
Concepticon
- Paper: Concepticon. A resource for the linking of concept lists (bibliographic information)
- Concepticon data release on Zenodo:
- pyconcepticon library for Concepticon API access:
CLTS
- Paper: A cross-linguistic database of phonetic transcription systems (bibliographic information)
- CLTS data release on Zenodo:
- CLTS library for CLTS appi access: pyclts
Tools
- pycldf for programmatic access to CLDF data:
- pyigt for handling interlinear glossed text with Python:
- cldfbench for creating CLDF datasets from existing data:
- Datasette plugin to explore CLDF datasets: datasette-cldf


Bold-faced Fun Charlie's Angels
By Ross Anthony
Boy, this was a fun movie! Aside from a small lull in the third act, "Charlie's Angels" are simply devilishly hilarious. Don't be duped into thinking that "Bikinis and Karate" are all they have to offer.
I've also heard folks say, "It was stupid!" But, me thinks, they missed the point.  The filmmakers are having fun, poking fun, with fun music and fun action. And the plot isn't even half-bad (1/8 bad maybe, but 1/2 -- nahhh). Anyway, the first half of this film rocks, glides, boogies, in such unique style that I didn't even care about the plot. Actually, when the film begins tending a bit too closely to its detective story - that's when things slow down.
But, the beauty is in the ridiculous. As Weird Al says, "Dare to be stupid."
Opening off the clouds of the Columbia logo through the window of a plane, Drew Barrymore, cleverly disguised as LL Cool J, commands a powerful action sequence that grabs you from your seat and tosses you into a way-jamming, rip-roaring 10 minute, opening which I feared the film could never match on an excitement level. But I was wrong.
Tom Green's a cappella tormenting vocalization of, "Just call me Angel of the morning" eases us back into a gentler pace. The movie's tempo is set from there.
"The Matrix" meets Maxwell Smart or Smart Jack or Jack Benny or Benny Hill. High-tech cool action gets double-dipped in humor and then impacted with the tongue tightly into the cheek.
All three angels dress in undercover kimonos as the track rocks out "Turning Japanese ... I really think so" or playing the tuba and accordion dressed as Swedish barmaids. Barbie must have been envious.
Lucy Liu massages a suspect. He sighs, "You're very good with your hands, I could use somebody like you on my staff." She retorts, "My hands aren't going anywhere near your staff." You can expect more of this risque double entendre.
Later to the tune of Heart's "Barracuda" black-leather-clad Lucy Liu struts into a computer corporation where everyone is dressed in white. This wonderful contrast displays the film's bold and ballsy breakout attitude.
Cleavage touting Drew exhales, "I love cars" as she licks the steering wheel. It's ridiculous on purpose! Don't take it seriously folks, you'll miss out. Cameron Diaz talks to her current boyfriend on the cell as she trades kicks with the enemy. The enemy breaks her phone, an appalled Diaz cries, "Hey, I really like that guy!"
All act well (save for the Tom Green reprise), Sam Rockwell giving a great performance as Knox, the computer genius. Ten story high kudos are due to director McG for having the guts and charisma to put together a truly invigorating mix of satire and action. I loved it.
"Charlie's Angels" is an Indy car race that breaks from the circle.
Charlie's Angels. Copyright © 2000. Rated PG-13. * Starring Cameron Diaz, Drew Barrymore, Lucy Liu, Bill Murray, Tim Curry, Crispin Glover, Kelly Lynch, Luke Wilson, Sam Rockwell. * Directed By Mcg. * Written By Ryan Rowe & Ed Solomon and John August * Produced By Leonard Goldberg, Drew Barrymore, Nancy Juvonen At Columbia.
Grade..........................A-
-- Copyright © 2000. Ross Anthony, currently based in Los Angeles, has scripted and shot documentaries, music videos, and shorts in 35 countries across North America, Europe, Africa and Asia.
For more reviews visit: http://www.RossAnthony.com
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


Outside, on the stone-paved path between the yellow-brick house and the terraced vegetable garden, Rand stood staring down the canyon, not seeing much beyond afternoon shadows creeping across the canyon floor. If only he could trust Moiraine not to hand him to the Tower on a leash; he had no doubt she could do it, without using the Power once, if he gave her an inch. The woman could manipulate a bull through a mouse hole without ever letting it know. He could use her. Light, I’m as bad as she is. Use the Aiel. Use Moiraine. If only I could trust her.
He headed toward the mouth of the canyon, slanting down whenever he found a footpath leading that way. They were all narrow, paved with small stones, some of the steeper carved in steps. Hammers ringing in several smithies echoed faintly. Not all of the buildings were houses. Through one open door he saw several women working looms, and another showed a silversmith putting up her small hammers and gouges, a third a man at a potter’s wheel, his hands in the clay and the brick kilns hot behind him. Men and boys, except the youngest, all wore the cadin’sor, the coat and breeches in grays and browns, but there were often subtle differences between warriors and craftsmen, a smaller belt knife or none at all, perhaps a shoufa with no black veil attached. Yet watching a blacksmith heft a spear he had just given a foot-long point, Rand had no doubt the man could use the weapon as readily as make it.
The paths were not crowded, but there were plenty of people about. Children laughed, running and playing, the smaller girls almost as likely to be carrying pretend spears as dolls. Gai’shain carried tall clay jars of water on their heads, or weeded in the gardens, often under the direction of a child of ten or twelve. Men and women going about the tasks of their lives, not really that different from the things they might have done in Emond’s Field, whether sweeping in front of a door or mending a wall. The children hardly gave him a glance, for all his red coat and thick-soled boots, and the gai’shain were so self-effacing it was difficult to say whether they noticed him or not. But craftsmen or fighters, men or women, the adults looked at him with an air of speculation, an edge of uncertain anticipation.
Very young boys ran barefoot in robes much like those of the gai’shain, but in the grayish-brown of the cadin’sor, not white. The youngest girls darted about on bare feet, too, in short dresses that sometimes failed to cover their knees. One thing about the girls caught his eye; up to perhaps twelve or so, they wore their hair in two braids, one over each ear, plaited with brightly colored ribbons. Just the way Egwene had worn hers. It had to be coincidence. Likely the reason she had stopped was that one of the Aiel woman had told her that was how young Aiel girls wore their hair. A foolish thing to be thinking about anyway. Right now he had one woman to deal with. Aviendha.
On the canyon floor, the peddlers were doing a brisk trade with the Aiel crowding around the canvas-topped wagons. At least the drivers were, and Keille, a blue lace shawl on her ivory combs today, was bargaining hard in a loud voice. Kadere sat on an upturned barrel in the shade of his white wagon in a cream-colored coat, mopping his face, making no effort to sell anything. He eyed Rand and made as if to rise before sinking back. Isendre was nowhere to be seen, but to Rand’s surprise, Natael was, his patch-covered cloak attracting a flock of following children, and some adults. Apparently the attraction of a new and larger audience had pulled him away from the Shaido. Or maybe Keille just did not want him out of her sight. Engrossed in her trading as she was, she found time to frown at the gleeman often.
Rand avoided the wagons. Questions asked of Aiel told him where the Jindo had gone, each to the roof of his or her society here at Cold Rocks. The Roof of the Maidens lay halfway up the still brightly lit east wall of the canyon, a garden-topped rectangle of grayish stone doubtless larger inside than it looked. Not that he saw the inside. A pair of Maidens squatting beside the door with spears and bucklers refused him entrance, amused and scandalized that a man wanted to enter, but one agreed to carry his request in.
A few minutes later the Jindo and Nine Valleys Maidens who had gone to the Stone came out. And all the other Maidens of Nine Valleys sept in Cold Rocks, too, crowding the path to either side and climbing up on the roof among the rows of vegetables to watch, grinning as if they expected entertainment. Gai’shain, male as well as female, followed to serve them small cups of dark-brewed tea; whatever rule kept men outside the Roof of the Maidens apparently did not apply to gai’shain.
After he had examined several offerings, Adelin, the yellow-haired Jindo woman with the thin scar on her cheek, produced a wide bracelet of ivory heavily carved with roses. He thought it should suit Aviendha; whoever made it had carefully shown thorns among the blossoms.
Adelin was tall even for an Aiel woman, only a hand too short to look him the eyes. When she heard why he wanted it—almost why; he just said it was a present for Aviendha’s teachings, not a sop to soothe the woman’s temper so he could stand to be near her—Adelin looked around at the other Maidens. They had all stopped grinning, their faces expressionless. “I will take no price for this, Rand al’Thor,” she said, putting the bracelet in his hand.
“Is this wrong?” he asked. How would Aiel see it? “I don’t want to dishonor Aviendha in any way.”
“It will not dishonor her.” She beckoned a gai’shain woman carrying pottery cups and pitcher on a silver tray. Pouring two cups, she handed one to him. “Remember honor,” she said, sipping from his cup.
Aviendha had never mentioned anything like this. Uncertain, he took a sip of bitter tea and repeated, “Remember honor.” It seemed the safest thing to say. To his surprise, she kissed him lightly on each cheek.
An older Maiden, gray-haired but still hard-faced, appeared in front of him. “Remember honor,” she said, and sipped.
He had to repeat the ritual with every Maiden there, finally just touching the cup to his lips. Aiel ceremonies might be short and to the point, but when you had to repeat one with seventy-odd women, even sips could fill you up. Shadows were climbing the east side of the canyon by the time he escaped.
He found Aviendha near Lian’s house, vigorously beating a blue-striped carpet hung on a line, more piled beside her in a heap of colors. Brushing sweat-damp strands of hair from her forehead, she stared at him expressionlessly when he handed her the bracelet and told her it was a gift in return for her teaching.
“I have given bracelets and necklaces to friends who did not carry the spear, Rand al’Thor, but I have never worn one.” Her voice was perfectly flat. “Such things rattle and make noise to give you away when you must be silent. They catch when you must move quickly.”
“But you can wear it now that you are going to be a Wise One.”
“Yes.” She turned the ivory circle over as if unsure what to do with it, then abruptly thrust her hand through it and held her wrist up to stare at it. She could have been looking at an manacle.
 Aviendha, Adelin said it would not touch your honor. She even seemed to approve.” He mentioned the tea-sipping ceremony, and she squeezed her eyes shut and shuddered. “What is wrong?”
“They think you are trying to attract my interest.” He would not have believed her voice could be so flat. Her eyes held no emotion at all. “They have approved of you, as if I still carried the spear.”
“Light! Simple enough to set them straight.
“No! You accepted their approval, and now you would reject it? That would dishonor me! Do you think you are the first man to try to catch my eye? They must think as they think, now. It means nothing.” Grimacing, she gripped the woven carpet beater with both hands. “Go away.” With a glance at the bracelet, she added, “You truly know nothing, do you? You know nothing. It is not your fault.” She seemed to be repeating something she had been told, or trying to convince herself. “I am sorry if I ruined your meal, Rand al’Thor. Please go. Amys says I must clean all of these rugs and carpets no matter how long it takes. It will take all night, if you stand here talking.” Turning her back to him, she thwacked the striped carpet violently, the ivory bracelet jumping on her wrist.
He did not know whether the apology sprang from his gift or an order from Amys—he suspected the latter—yet she actually sounded as if she meant it. She was certainly not pleased—judging by the sharp grunt of effort that accompanied every full-armed swing of the beater—but she had not looked hateful once. Upset, appalled, even furious, but not hateful. That was better than nothing. She might become civil eventually.
As he stepped into the brown-tiled entry chamber of Lian’s house, the Wise Ones were talking together, all four with shawls draped loosely over their elbows. They fell silent at his appearance.
“I will have you shown to your sleeping room,” Amys said. “The others have seen theirs.”
“Thank you.” He glanced back at the door, frowning slightly. “Amys, did you tell Aviendha to apologize to me for dinner?”
“No. Did she?” Her blue eyes looked thoughtful for a moment; he thought Bair almost smiled. “I would not have ordered her to, Rand al’Thor. A forced apology is no apology.”
“The girl was told only to dust carpets until she had sweated out some of her temper,” Bair said. “Anything more came from her.”
“And not in hopes of escaping her labors,” Seana added. “She must learn to control her anger. A Wise One must be in control of her emotions, not they in control of her.” With a slight smile, she glanced sideways at Melaine. The sun-haired woman compressed her lips and sniffed.
They were trying to convince him Aviendha was going to be wonderful company from now on. Did they really think he was blind? “You must know that I know. About her. That you set her to spy on me.”
“You do not know as much as you think,” Amys said, for all the world like an Aes Sedai with hidden meanings she did not intend to let him see.
Melaine shifted her shawl, eyeing him up and down in a considering manner. He knew a little about Aes Sedai; if she were Aes Sedai, she would be Green Ajah. “I admit,” she said, “that at first we thought you would not see beyond a pretty young woman, and you are handsome enough that she should have found your company more amusing than ours. We did not reckon with her tongue. Or other things.”
“Then why are you so eager for her to stay with me?” There was more heat in his voice than he wanted.  Amys asked calmly. “If you refused to accept her, how could we force her on you?”
“At least this way I know who the spy is.” Having Aviendha under his eye had to be better than wondering which of the Aiel were watching him. Without her, he would probably suspect that every casual comment from Rhuarc was an attempt to pry. Of course, there was no way to say it was not. Rhuarc was married to one of these women. Suddenly he was glad he had not confided more in the clan chief. And sad that he had thought of it. Why had he ever believed the Aiel would be simpler than Tairen High Lords? “I’m satisfied to leave her right where she is.”
“Then we are all satisfied,” Bair said.
He eyed the leathery-faced woman leerily. There had been a note of something in her voice, as if she knew more than he did. “She will not find out what you want.”
“What we want?” Melaine snapped; her long hair swung as she tossed her head. “The prophecy says ‘a remnant of a remnant shall be saved.’ What we want, Rand al’Thor, Car’a’carn, is to save as many of our people as we can. Whatever your blood, and your face, you have no feeling for us. I will make you know our blood for yours if I have to lay the—”
“I think,” Amys cut her off smoothly, “that he would like to see his sleeping room now. He looks tired.” She clapped her hands sharply, and a willowy gai’shain woman appeared. “Show this man to the room that has been prepared for him. Bring him whatever he needs.”
Leaving him standing there, the Wise Ones headed for the door, Bair and Seana looking daggers at Melaine, like members of the Women’s Circle eyeing someone they meant to call to account sharply. Melaine ignored them; as the door closed behind them she was muttering something that sounded like “talk sense into that fool girl.”
What girl? Aviendha? She was already doing what they wanted. Egwene maybe? He knew she was studying something with the Wise Ones. And what was Melaine willing to “lay” in order to make him “know their blood for his”? How could laying something make him decide he was Aiel? Lay a trap, maybe? Fool! She wouldn’t say right out she means to lay a trap. What sorts of things do you lay? Hens lay eggs, he thought, laughing softly. He was tired. Too tired for questions now, after twelve days in the saddle and part of a thirteenth, all of them oven-hot and dry; he did not want to think of how he would feel if he had walked that distance at the same pace. Aviendha must have steel legs. He wanted a bed.
The gai’shain was pretty, despite a thin scar slanting just above one pale blue eye into hair so light as to look almost silver. Another Maiden; only not for the moment. “If it pleases you to follow me?” she murmured, lowering her eyes.
The sleeping room was not a bedchamber, of course. Unsurprisingly, the “bed” consisted of a thick pallet unfolded atop layered, brightly colored rugs. The gai’shain—her name was Chion—looked shocked when he asked for wash water, but he was tired of sweat baths. He was willing to bet Moiraine and Egwene had not had to sit in a tent full of steam to get clean.  He chased her out when she offered to wash him. Strange people, all of them!
The room was windowless, lit by silver lamps hanging from brackets on the walls, but he knew it could not yet be full dark outside when he finished washing. He did not care. Only two blankets lay on the pallet, neither particularly thick. No doubt a sign of Aiel hardiness. Remembering the cold nights in the tents, he dressed again except for his coat and boots before blowing out the lamps and crawling beneath the blankets in pitch darkness.
Tired as he was, he could not stop tossing and thinking. What did Melaine mean to lay? Why did the Wise Ones not care that he knew Aviendha was their spy? Aviendha. A pretty woman, if surlier than a mule with four stone-bruised hooves. His breathing slowed, his thoughts became misty. A month.
Too long. No choice. Sooner. Isendre smiling. Kadere watching. Trap. Lay a trap. Whose trap? Which trap? Traps. If only he could trust Moiraine. Perrin. Home. Perrin was probably swimming in . . .
Eyes closed, Rand stroked through the water. Nicely cool. And so wet. It seemed that he had never before realized how good wet felt. Lifting his head, he looked around at the willows lining one end of the pond, the big oak at the other, stretching thick, shading limbs over the water. The Waterwood. It was good to be home. He had the feeling he had been away; where was not exactly clear, but not important, either. Up to Watch Hill. Yes. He had never been farther than that. Cool and wet. And alone.
Suddenly two bodies hurtled through the air, knees clutched to chest, landing with great splashes that blinded him. Shaking the water out of his eyes, he found Elayne and Min smiling at him from either side, just their heads showing above the pale green surface. Two strokes would take him to either woman. Away from the other. He could not love both of them. Love? Why had that popped into his head?
“You do not know who you love.”
He spun about in a swirl of water. Aviendha stood on the bank, in cadin’sor rather than skirt and blouse. Not glaring, though, just looking. “Come into the water,” he said. “I’ll teach you how to swim.”
Musical laughter pulled his head around to the opposite bank. The woman who stood there, palely naked, was the most beautiful he had ever seen, with big, dark eyes that made his head whirl. He thought he knew her.
“Should I allow you to be unfaithful to me, even in your dreams?” she said. Somehow he was aware without looking that Elayne and Min and Aviendha were not there anymore., This was beginning to feel very odd.
For a long moment she considered him, completely unconscious of her nudity. Slowly she posed on toe tips, arms swept back, then dove cleanly into the pond. When her head popped above the surface, her shining black hair was not wet. That seemed surprising, for a moment. Then she had reached him—had she swum, or was she just there?—tangling arms and legs around him. The water was cool, her flesh hot.
“You cannot escape me,” she murmured. Those dark eyes seemed far deeper than the pond. “I will make you enjoy this so you never forget, asleep or awake.”
Asleep or . . . ? Everything shifted, blurred. She wrapped herself around him tighter, and the blur went away. Everything was as it had been. Rushes filled one end of the pond; leatherleaf and pine grew almost to the water’s edge at the other.
“I know you,” he said slowly. He thought he must, or why would he be letting her do this? “But I don’t . . . This is not right.” He tried to pull her loose, but as fast as he pried an arm away, she had it back again.
“I ought to mark you.” There was a fierce edge in her voice. “First that milk-hearted Ilyena and now . . . How many women do you hold in your thoughts?”
 She had broken the skin; he was bleeding.
“Is this how you amuse yourself when I wonder where you have gone?” a man’s voice said contemptuously. “Why should I hold to anything when you risk our plan this way?”
Abruptly the woman was on the bank, clothed in white, narrow waist belted in wide woven silver, silver stars and crescents in her midnight hair. The land rose slightly behind her to an ash grove on a mound. He did not remember seeing ash before. She was facing—a blur. A thick, gray, man-sized fuzzing of the air. This was all . . . wrong, somehow.
“Risk,” she sneered. “You fear risk as much as Moghedien, don’t you? You would creep about like the Spider herself.  If I must take risks, I want a greater reward than pulling strings on a puppet.”
“What do you mean?” she said dangerously.
The blur shimmered; somehow Rand knew it for hesitation, uncertainty over having said too much. And then suddenly the blur was gone. The woman looked at him, still neck-deep in the pond; her mouth tightened with irritation, and she vanished.
He started awake and lay still, peering up into blackness. A dream. But an ordinary dream, or something else? Fumbling a hand from under the blankets, he felt the side of his neck, felt the tooth marks and the thin trickle of blood. Whatever kind of dream, she had been in it. Lanfear. He had not dreamed her. And that other; a man. A cold smile crept onto his face. Traps all around. Traps for unwary feet. Have to watch where I step, now. So many traps. Everybody was laying them.
Laughing softly, he twisted around to go back to sleep—and froze, holding his breath. He was not alone in the room. Lanfear.
Frantically he reached for the True Source. For an instant he feared fear itself might defeat him. Then he floated in the cold calm of the Void, filled with a raging river of the Power. He sprang to his feet, lashing out. The lamps burst alight.
Aviendha sat cross-legged by the door, mouth hanging open and green eyes bulging by turns at the lamps and the bonds, invisible to her, that wrapped her completely. Not even her head could move; he had expected someone standing, and the weave extended well above her. He released the flows of Air immediately.
She scrambled to her feet, nearly losing her shawl in her haste. “I . . . I do not believe I will ever become used to . . . ” She gestured at the lamps. “From a man.”
“You have seen me wield the Power before.” Anger oozed across the surface of the Void surrounding him. Sneaking into his room in the dark. Frightening him half to death. She was lucky he had not hurt her, killed her by accident. “You had best grow used to it. I am He Who Comes With the Dawn whether you want to admit it or not.”
“That is not part—”
“Why are you here?” he demanded coldly.
“The Wise Ones are taking turns watching over you from outside. They meant to continue watching from . . .
“From where?” She only stared at him, her face growing more and more crimson. “Aviendha, from wh—?” Dreamwalkers. Why had it never occurred to him? “From inside my dreams,” he said harshly. “How long have they been spying inside my head?”
She let out a long, heavy breath. “I was not supposed to let you know. If Bair finds out—Seana said it was too dangerous tonight. I do not understand it: I cannot enter the dream without one of them to help me. Something dangerous tonight is all I know. That is why they are taking turns at the door to this roof. They are all worried.”
“You still haven’t answered my question.”
“I do not know why I am here,” she muttered. “If you need protection . . . ” She glanced at her short belt knife, touched the hilt. The ivory bracelet seemed to irritate her; she folded her arms so it was tucked into her armpit. “I could not protect you very well with a knife this small, and Bair says if I pick up a spear again without someone actually attacking me, she will have my hide for a waterskin. I do not know why I should give up sleep to protect you at all. Because of you, I was beating rugs until less than a hour ago. By moonlight!”
“That wasn’t the question. How long—?” He cut off suddenly. There was a feel in the air, a sense of wrongness. Of evil. It could be imagination, residue from his dream. It could be.
Aviendha gasped as the flame-red sword appeared in his hands, its slightly curved blade marked with the heron. Lanfear had accused him of using only the tenth part of what he was capable of, yet most of that tenth came by guess and fumbling. He did not know even the tenth part of what he could do. But he knew the sword.
“Stay behind me.” He was just aware of her unsheathing her belt knife as he padded from the room in his stocking feet, soundless on the carpets. Oddly, the air was no cooler than when he had lain down. Perhaps those stone walls held what heat there was, for the farther out he went, the colder it grew.
Even the gai’shain must have sought their pallets by now. The halls and chambers stood silent and empty, most dimly illuminated by the scattered lamps still burning. Here where extinguished lamps meant pitch dark at noon, some lamps were always left lit. The feeling was still vague, but it would not go away. Evil.
He stopped suddenly, in the wide archway leading to the brown-tiled entry chamber. One silver lamp at each end of the room gave a pale light.  Chion’s eyes were nearly closed, and she wore an ecstatic smile. A flush of embarrassment slid across the surface of the Void. Then the man raised his head.
Black eyes regarded Rand, too big in a pale, gaunt-cheeked face; a puckered, red-lipped mouth opened in a parody of a smile, showing sharp teeth. Chion crumpled to the floor as the cloak unfolded, spread into wide, batlike wings. The Draghkar stepped over her, white, white hands reaching for Rand, the long, slender fingers tipped with claws. Claws and teeth were not the danger, though. It was the Draghkar’s kiss that killed, and worse.
Its crooning, hypnotic song clung tight around the Void. Those dark, leathery wings moved to enfold him as he stepped forward. One moment of startlement flashed in the huge black eyes before the Power-made sword clove the Draghkar’s skull to the bridge of its nose.
A steel blade would have bound, but the blade woven of fire pulled free easily as the creature fell. For a moment, deep in the heart of the Void, Rand examined the thing at his feet. That song. Had he not been shielded from emotion by emptiness, kept dispassionate and distant, that song would have snared his mind. The Draghkar surely believed it had when he came to it so willingly.
Aviendha ran past him to half-kneel beside Chion and feel the gai’shain’s throat. “Dead,” she said, thumbing the woman’s eyelids the rest of the way shut. “Perhaps better for it.  A Draghkar! Here!” She glared at him from her crouch. “Trollocs at Imre Stand, and now a Draghkar here.
A bar of solid fire shot over her from his blade to strike the chest of the Draghkar just filling the outer doorway. Bursting into flame, the Shadowspawn staggered back screaming, stumbling across the path, beating wings that dripped fire.
“Rouse everyone,” Rand said calmly. Had Chion fought? How far had her honor held her? It would have made no difference. Draghkar died more easily than Myrddraal, but they were more dangerous in their own way. “If you know how to sound the alarm, do it.”
“The gong by the door—”
“I will do it. Wake them. There may be more than two.”
Nodding, she dashed back the way they had come, shouting, “Up spears! Wake and up spears!”
Rand stepped outside warily, sword ready, the Power filling him, thrilling him. Sickening him. He wanted to laugh, to vomit. The night was freezing, but he was barely aware of the cold.
The burning Draghkar was sprawled in the terrace garden, stinking of burning meat, adding the light of its low fire to the moon. A little way down the path Seana lay, long graying hair spread in a fan, staring at the sky with wide, unblinking eyes. Her belt knife lay beside her, but she had had no chance against a Draghkar.
Even as Rand snatched the leather-padded mallet hanging beside the square bronze gong, pandemonium erupted from the canyon mouth, human shouts and Trolloc howls, the clash of steel, screams. He sounded the gong hard, a sonorous toll that echoed down the canyon; almost immediately another gong sounded, then more, and from dozens of mouths the cry, “Up spears!”
Confused yells rose around the peddlers’ wagons below. Rectangles of light appeared, doors flung open on the two boxlike wagons, gleaming white in the moonlight. Someone was shouting angrily down there—a woman; he could not tell who.
Wings beat in the air above him. Snarling, Rand raised the fiery sword; the One Power burned in him, and fire roared from the blade. The stooping Draghkar exploded in a rain of burning chunks that fell into the darkness below.
“Here,” Rhuarc said. The clan chief’s eyes were hard above his black veil; fully dressed, he carried buckler and spears. Mat stood behind him, coatless and bareheaded, shirt half tucked in, blinking uncertainly and gripping his black-hafted spear with both hands.
Rand took the shoufa from Rhuarc, then let it drop. A bat-winged shape wheeled across the moon, then swooped low on the far side of the canyon, vanishing in the shadows. “They hunt for me. Let them see my face.” The Power surged in him; the sword in his hand flared till it seemed a small sun illumined him. “They can’t find me if they do not know where I am.” Laughing, because they could not see the joke, he ran down toward the sound of battle.
Pulling his spear free of a boar-snouted Trolloc’s chest, Mat crouched, eyes searching the moonlit darkness near the canyon mouth for another. Burn Rand! None of the shapes he saw moving were big enough to be a Trolloc.  Low moans came from the wounded. A shadowy form he thought was Moiraine knelt beside a downed Aiel. Those balls of fire she tossed about were impressive, almost as much as that sword of Rand’s, spurting bars of flame. The thing still shone so a circle of light surrounded the man. I should have stayed in my blankets is what I should have done.  More Aiel were beginning to appear, women in skirts come to help with the injured. Some of those women carried spears; they might not do the fighting normally, but once the battle had reached into the hold they had not stood by and watched.
A Maiden stopped beside him, unveiling. He could not make out her face, all moonshadows. “You dance your spear well, gambler. Strange days when Trollocs come to Cold Rocks.” She glanced at the shadowy shape he thought was Moiraine. “They might have forced a way in without the Aes Sedai.”
“There weren’t enough for that,” he said without thinking. “They were meant to pull attention here.” So those Draghkar would have a free hand to reach Rand?
“I think you are right,” she said slowly. “Are you a battle leader among the wetlanders?”
 “I read a book once,” he muttered, turning away.  Maybe the peddlers would be ready to leave after this.
When he stopped by the wagons, though, neither Keille nor Kadere was anywhere to be seen. The drivers were all clumped together, hastily passing around jars of something that smelled like the good brandy they had been selling, muttering and as agitated as if the Trollocs had actually come within smelling distance of them. Isendre stood at the top of the steps to Kadere’s wagon, frowning at nothing. Even with her brows furrowed she was beautiful behind that misty scarf. He was glad that at least his memories of women were his own.
“The Trollocs are done,” he told her, leaning on his spear so she would be sure to notice it. No point risking having my skull split without getting a little good out of it. No effort at all was needed to sound tired. “A hard fight, but you’re safe, now.”
She stared down at him, face expressionless, eyes glittering in the moonlight like dark, polished stone.  What did it take to impress the woman? Bed was what he wanted.  The man seemed to enjoy it. Laughing like that.
Rand was coming up the canyon now, the glow of that sword like lamplight around him in the night. Aviendha appeared, running to meet him with her skirts pulled up above her knees, then stopped. Letting her skirts fall, she smoothed them and fell in beside Rand, lifting her shawl around her head. He seemed not to see her, and her face was blank as stone. They deserved each other.
“Rand,” a hurrying shadow called with Moiraine’s voice, nearly as melodious as Keille’s, but a cool music. Rand turned, waiting, and she slowed before she could be seen clearly, entering the light regally enough for any palace. “Matters grow more dangerous, Rand. The attack at Imre Stand could have been aimed at the Aiel—not likely, yet it could have been—but tonight the Draghkar were surely aimed at you.”
“I know.” Just like that. As calm as she and even colder.
Moiraine’s lips compressed, and her hands were too still on her skirts; she was not best pleased. “Prophecy is most dangerous when you try to make it happen. Did you not learn that in Tear? The Pattern weaves itself around you, but when you try to weave it, even you cannot hold it. Force the Pattern too tight, and pressure builds. It can explode wildly in every direction. Who can say how long before it settles to focus on you again, or what will happen before it does?”
“As clear as most of your explanations,” Rand said dryly. “What do you want, Moiraine? It is late, and I am tired.”
“I want you to confide in me. Do you think you have already learned all there is to know, little more than a year out of your village?”
“No, I haven’t learned everything yet.” Now he sounded amused; sometimes Mat was not sure he was still as sane as he looked. “You want me to confide in you, Moiraine? All right.  Say plainly that whatever I tell you, you won’t try to stop me, won’t hinder me in any way. Say you won’t try to use me for the Tower’s ends. Say it plain and straight so I know it’s true.”
“I will do nothing to hinder you fulfilling your destiny. I have devoted my life to that. But I will not promise to watch while you lay your head on a chopping block.”
“Not good enough, Moiraine. Not good enough. But if I could confide in you, I’d still not do it here. The night has ears.” There were people moving all around in the darkness, but none close enough to hear. “Even dreams have ears.” Aviendha tugged her shawl forward to shadow her face; even an Aiel could feel the cold, apparently.
Rhuarc stepped into the light, black veil hanging loose. “The Trollocs were only a diversion for the Draghkar, Rand al’Thor. Too few to be else. Draghkar meant for you, I think. Leafblighter does not want you to live.”
“The danger grows,” Moiraine said quietly.
The clan chief glanced at her before going on. “Moiraine Sedai is right. Since the Draghkar failed, I fear we can expect the Soulless next; what you call Gray Men. I want to put spears around you at all times. For some reason, the Maidens have volunteered for this task.”
The cold was getting to Aviendha. Shoulders hunched, she had her hands shoved into her armpits as far they would go.
“If they wish it,” Rand said. He sounded a touch uncomfortable under all that ice. Mat did not blame him; he would not have put himself in the Maidens’ hands again for all the silk on Sea Folk ships.
“They will watch better than anyone else,” Rhuarc said, “having asked for the task. I do not mean to leave it to them alone, however. I will have everyone on guard. I believe it will be the Soulless next time, but that does not mean it cannot be something else. Ten thousand Trollocs instead of a few hundred.”
“What about the Shaido?” Mat wished he had not cracked his teeth when they all looked at him. Maybe they had not even realized he was there until then. Still, he might as well say it. “I know you don’t like them, but if you think there’s really any chance of a bigger attack, wouldn’t it be better to have them in here than outside?”
Rhuarc grunted; from him, that equaled a curse from most men. “I would not bring near a thousand Shaido inside Cold Rocks if Grassburner were coming. I could not in any case. Couladin and the Shaido folded their tents at nightfall. We are well rid of them. I sent runners to make sure they leave Taardad land without taking a few goats or sheep with them.”
That sword vanished from Rand’s hand, the abrupt absence of its light like blindness. Mat squeezed his eyes shut to help them adapt, but when he opened them again, the moonlight still seemed dark.
“Which way did they go?” Rand asked.
“North,” Rhuarc told him. “No doubt Couladin means to meet Sevanna on her way to Alcair Dal, to influence her against you. He may succeed. The only reason she laid her bridal wreath at Suladric’s feet instead of his was that she meant to wed a clan chief. But I told you to expect trouble from her. Sevanna delights in causing trouble. It should not matter. If the Shaido will not follow you, they are small loss.”
“I mean to go to Alcair Dal,” Rand said firmly. “Now. I will apologize to any chief who feels dishonored by coming late, but I’ll not let Couladin be there any longer before me than I can manage. He won’t stop at turning Sevanna against me, Rhuarc. I cannot afford to hand him a month for it.”
After a moment, Rhuarc said, “Perhaps you are right.  At sunrise, then. I will choose out ten Red Shields for my honor, and the Maidens will provide yours.”
“I mean to be leaving when first light hits the sky, Rhuarc. With every hand that can carry a spear or draw a bow.”
“Custom—”
“There are no customs to cover me, Rhuarc.” You could have cracked rocks with Rand’s voice, or put a skim of ice on wine. “I have to make new customs.” He laughed roughly. Aviendha looked shocked, and even Rhuarc blinked, taken aback. Only Moiraine was unaffected, with those considering eyes. “Someone had best let the peddlers know,” Rand continued. “They won’t want to miss the fair, but if they don’t stop those fellows drinking they will be too drunk to handle reins. What of you. Mat? Are you coming?”
He certainly did not intend to let the peddlers get away from him, not his way out of the Waste. “Oh, I am right behind you, Rand.” The worst of it was, it felt right saying that. Bloody ta’veren tugging at me! How had Perrin pulled free? Light, I wish I was with him right now. “I guess I am.”
 There was still time to get a little sleep at least. Behind him he could hear Rand chuckling.


execline Software skarnet.org
piperw creates a pipe (an anonymous one), then executes a program.
piperw fdr fdw prog...
piperw creates a pipe with descriptor fdw as the writing end and descriptor fdr as the reading end. It then execs into prog with its arguments.


Deleting a record in the database and viewing the delete event
Now that you have seen how the Debezium MySQL connector captured the create and update events in the inventory
database,
you will now delete one of the records and see how the connector captures it.
By completing this procedure, you will learn how to find details about delete events, and how Kafka uses log compaction to reduce the number of delete events while still enabling consumers to get all of the events.
-
In the terminal that is running the MySQL command line client, run the following statement:
mysql> DELETE FROM customers WHERE id=1004; Query OK, 1 row affected (0.00 sec)
If the above command fails with a foreign key constraint violation, then you must remove the reference of the customer address from the addresses table using the following statement:
mysql> DELETE FROM addresses WHERE customer_id=1004;
-
Switch to the terminal running
watch-topic
to see two new events.By deleting a row in the
customers
table, the Debezium MySQL connector generated two new events. -
Review the key and value for the first new event.
Here are the details of the key for the first new event (formatted for readability):
{ "schema": { "type": "struct", "name": "dbserver1.inventory.customers.Key" "optional": false, "fields": [ { "field": "id", "type": "int32", "optional": false } ] }, "payload": { "id": 1004 } }
This key is the same as the key in the previous two events you looked at.
Here is the value of the first new event (formatted for readability):
{ "schema": {...}, "payload": { "before": { (1) "id": 1004, "first_name": "Anne Marie", "last_name": "Kretchmar", "email"<EMAIL_ADDRESS>}, "after": null, (2) "source": { (3) "name": "1.1.0.Beta2", "name": "dbserver1", "server_id": 223344, "ts_sec":<PHONE_NUMBER>, "gtid": null, "file": "mysql-bin.000003", "pos": 725, "row": 0, "snapshot": null, "thread": 3, "db": "inventory", "table": "customers" }, "op": "d", (4) "ts_ms":<PHONE_NUMBER>315 (5) } }
1 The before
field now has the state of the row that was deleted with the database commit.2 The after
field isnull
because the row no longer exists.3 The source
field structure has many of the same values as before, except thets_sec
andpos
fields have changed (thefile
might have changed in other circumstances).4 The op
field value is nowd
, signifying that this row was deleted.5 The ts_ms
field shows the time stamp for when Debezium processes this event.Thus, this event provides a consumer with the information that it needs to process the removal of the row. The old values are also provided, because some consumers might require them to properly handle the removal.
-
Review the key and value for the second new event.
Here is the key for the second new event (formatted for readability):
{ "schema": { "type": "struct", "name": "dbserver1.inventory.customers.Key" "optional": false, "fields": [ { "field": "id", "type": "int32", "optional": false } ] }, "payload": { "id": 1004 } }
Once again, this key is exactly the same key as in the previous three events you looked at.
Here is the value of that same event (formatted for readability):
{ "schema": null, "payload": null }
If Kafka is set up to be log compacted, it will remove older messages from the topic if there is at least one message later in the topic with same key. This last event is called a tombstone event, because it has a key and an empty value. This means that Kafka will remove all prior messages with the same key. Even though the prior messages will be removed, the tombstone event means that consumers can still read the topic from the beginning and not miss any events.


--- layout: pipeline title: Accelerators permalink: pipeline/accelerators/ ---
Faith-based accelerator; 5-month journey that builds infrastructure, deepens character, attracts investors.
UpTechAccepts up to 10 startups per year to participate in a 6 month program with up to $50,000 in funding for each team.
XLerate Health13-week training course that connects startups to mentors and leading health and wellness companies and offers a $20,000 stipend for 6% equity stake.
Awesome FellowshipMentor-driven program designed to accelerate high tech startups; provides mentorship and a variety of tech talent for up to 1 year.
The BranderyRuns a 4 mo accelerator program for 10-12 companies for 6% equity stake in exchange for $50k, a year of free office space, and additional resources.


We aggregate mices!
- deliver virtual eyeballs
- generate front-end action-items
- seize cutting-edge niches
- extend back-end infrastructures
- target one-to-one platforms
- transition revolutionary paradigms
- reinvent rich architectures
- reintermediate front-end synergies
- exploit back-end solutions
- seize back-end architectures
- utilize holistic vortals
- synergize cross-media deliverables


--- layout: post title: Creating a basic CRUD on Laravel 4 permalink: creating-a-basic-crud-on-laravel-4/ date: 2013-10-29 14:47:32.000000000 +08:00 categories: - coding - howto - php tags: - getting started with laravel - laravel 4 generator - laravel for dummies - laravel scaffolding status: publish type: post published: true meta: _edit_last: '2' _wpas_mess: Creating a basic CRUD for Laravel 4 _wpas_skip_1611607: '1' _wpas_skip_2452381: '1' _wpas_skip_2203490: '1' _wpas_skip_2452385: '1' _thumbnail_id: '1139' _wpas_done_all: '1' dsq_thread_id: '2955572674' cleaned: true ---
If you don't want to get fed up by too much things that you need to know just to see how to do Create, Read, Update and Delete database stuffs in Laravel, then this tutorial is for you. Admit it, Laravel is a complex beast, this approach might not be the best way to introduce Laravel, but if you are like me who believes in KISS principle, you can tame this beast once you get the basics.
Disclaimer: Though this will get you straight to the point, I still recommend reading stuffs on the official Laravel documentation to better understand how things works. This tutorial is only for the sake of providing a less complex approach on learning Laravel
At the end of this tutorial, you should be able to create a basic application wherein you can add, edit, delete and list Tweets. The tweet is just as simple as a table with 2 fields : author and body. Here are the screencaps of what we are going to make
Create
This is a form wherein you can enter the new Tweets. Its just a dead simple form with two fields. Author - is the owner of the tweet, Body is the contents of the tweet.
Read
This is just a basic form wherein you can see all the Tweets. There are edit and delete buttons and a link to create new tweet.
Update
This is the page where the app goes when you hit the Edit button on the Tweet listing.
Delete
This is the delete button, when you click that, that tweet will be deleted and the page will reload.
Simple huh?, now are you aready?
Ok, before we start, let me ask you first if you have already know how to install/download Laravel, since installing Laravel is another topic, you can go in this page first then go back here and we will kick some ass.
... a few moments later
Ok, here, so you are back and you think you have Laravel in your end waiting to be developed.
In the root folder of you project, you will see a composer.json file
"require": {
"laravel/framework": "4.0.*",
"way/generators": "dev-master"
}
add the "way/generators": "dev-master" in the require element and save the file as indicated above.
Then on the root folder of your project, run this command in the console:
composer update
What we just did is, in our Laravel project, we had added a new package hosted in packagist.org name "generators". This is a package created by "way" (his full name is Jeffrey Way). We are adding this package because we want to use it to generate the parts of our application so that we don't have to manually create those one by one. You don't have to know what package is in order to follow this tutorial, what is important for now is you understand that we had added the generators page, because it will help us generate "things" for us.
After the generators package is downloaded, you have to enable it in your config file. To do this, go to app/config/app.php and open it up.
install it by adding (see screenshot above)
'Way\Generators\GeneratorsServiceProvider'
Now that you have the library installed, the next step is for you to make sure you have your database configured. You have to edit this in app\config\database.php file. You can use any database you like and make sure the account you are using has CREATE, UPDATE, EDIT, DELETE permission.

Well, it creates many stuffs so that you don't have to create those yourself. Basically it creates the Model, Views and Controllers for your application, it also create a migration script that will create the necessary table to store the data, it registers the routes and setup validation etc., simply put, it simply creates a whole bunch of stuff for you.
now, execute this command in your console:
php artisan serve
It will output something like
Laravel development server started on http://localhost:8000
now open your browser and go to that url indicated and add "tweets" on it: http://localhost:8000/tweets
(note: the port number could vary)
Surprise! your CRUD application is already done!
You should be able to see the screenshots I posted earlier. You can add/edit/delete tweets w/o even writing a single line of PHP, HTML and CSS code.
That looks very simple huh, now that you know the "shortcut" of creating a Laravel application. I suggest you read the Laravel documentation and do further reading while looking at the files of this application, that way, you can understand how things works.


The destination you selected is not available in this set of documents. If you're viewing this from a CD, check the product software CD or the OTN documentation site for additional documents. If you're viewing this from OTN, search other document sets.