Your Results!
You forgot to answer a question above!
Scroll back up to answer it and get your results.
The Wall - Silicon Valley
Silicon Valley lies beyond the wall of fog that separates the San Francisco peninsula from the South Bay. The “kings” beyond the Wall, like those in Silicon Valley, are the type of people who make their own rules, have libertarian values, and don’t answer to tradition.
Winterfell - Mission
Like the Northmen, the Mission’s current inhabitants love beards, craft ales, and canines. They worship the “old gods” of vintage and artisan, tend to be counterculture, and are obsessed with change and the weather. You also love tradition, but ponder about new possibilities and change, and the Mission will provide constant new juxtapositions for you to mull over.
Pyke - Sunset
Like the Ironborn, the people of the Outer Sunset are a distinct, tight-knit community that worships the salty sea. The Outer Sunset’s leathery surf culture, weathered architecture, and independent spirit all correspond well with the characteristics of the Ironborn. You're also obsessed with the ocean and rainy fog offshore, all of which the Sunset will provide.
Riverrun - Golden Gate Park
Situated in the middle of Westeros, the Riverlands serve as a borderland between several strong kingdoms, whereas Golden Gate Park borders the Richmond, Sunset, and Haight. Both are lush areas of fertile land veined with bodies of freshwater. You thrive on being near greenery and fresh running streams, so living anywhere near Golden Gate Park is a must for you.
Eyrie - Twin Peaks
The Eyrie is an impenetrable landmark of a castle atop one of the highest peaks in the Vale, so the San Francisco equivalent is also one of the highest points, Twin Peaks, with its own notable local landmark nearby, Sutro Tower. You love mountains, high places, and pretending to touch the sky, and you'll love living in Twin Peaks.
Dragonstone - SOMA
If Beyond the Wall is Silicon Valley, the other disrupting force in the city hails from SOMA, or our equivalent to Dragonstone, which was once a volcano. Stannis Baratheon is the most notable Westerosi pioneer of a strange yet powerful new religion, just as SOMA is the city’s hotbed of innovation and new wealth. You love fiery locales like volcanos, and are ready for that hotbed to explode - living in SOMA will allow you to see it all first hand.
Casterly Rock - Financial District
Casterly Rock sits atop a hill and gold mine, and is the seat of wealthy House Lannister. Similarly, the Financial District is surrounded by hills and is where all of the banks are. If FiDi is Casterly Rock, then the Embarcadero is the bustling harbor of Lannisport, specializing in the trade of luxury wares. You love sitting atop a tall hill, wealth, and being around money, so stick around the Financial District.
Civic Center / Tenderloin - King's Landing
King’s Landing features the ruling palaces in the middle, surrounded by juxtapositions of affluence and poverty. The natural counterpart here in San Francisco is the Civic Center, with its gilded City Hall and several grand theaters, all situated around two large plazas. Similar to King’s Landing, the Civic Center is currently characterized by new Mid-Market wealth butting heads with the Tenderloin’s Flea Bottom. You love the stink of the city and revel in urbanity, so why not live right in the middle of it?
Storm's End - Presidio
Storm’s End, the seat of House Baratheon, is a mighty fortress on a seaward cliff, so our equivalent is the Presidio, which was historically fortified and home to many now-defunct military bases. Much like the Presidio and neighboring Sea Cliff and Lands End, the Stormlands are rugged, beautifully forested, and often shrouded in fog. You enjoy the stormy weather along the coast and being at the edge of the bay - the Presidio is for you.
Highgarden - Castro
Like Highgarden, the Castro is colorful, flamboyant, romantic, and stylish. Highgarden is ruled by House Tyrell, which includes the beautiful Ser Loras, whose late lover Renly Baratheon was attended by his own order of knights known as the Rainbow Guard; the fashionable Lady Margaery, Renly’s former “fruit fly”; and the sassy Lady Olenna, Westeros’ best answer to a Golden Girl. You love beautiful things, gilded and shiny, so live in the Castro, where you'll always find them.
Dorne - Dogpatch
Like Dogpatch, Dorne is an isolated region of Westeros, separated from the rest of the continent by a set of hills. Both are bordered by sea, known for sunny, dry climates. Dorne is culturally similar to the Free Cities of Essos, and Dogpatch shares the industrial past, warehouse culture, and creative vibe of Oakland. Dorne is also well known for its wine production, and likewise, wineries are popping up all over Dogpatch lately. Dogpatch is one of the few places in San Francisco where you'll get consistently warmer weather and a unique vibe akin to Oakland, which is just what the doctor ordered (for you).
Essos - Oakland
Essos is across the Narrow Sea from Westeros, and the East Bay lies beyond the Narrow Bay from San Francisco. Just as Daenerys Targaryen sweeps through Essos, bestowing peace with her melting-pot army and trio of dragons, the East Bay is up-and-coming, diverse, chaotic, and vibrant. And, of course, the East Bay is also known for its growing array of artists, musicians, free spirits, and fire-breathing creatures. It's hot and sprawling in Oakland, divergent from San Francisco, and that's just what you like.


Issues with SQL
SQL Injection
Well! This is something really nasty that I knew nothing about. Just as well my databases don't exist on the web. It turns out that if your database application gets user input from a web form and you haven't taken precautions, then a user with malicious intent, can insert some clever data into that form and do drastic things to your underlying database.
A malicious user might insert (or inject!) data into your form to extract or delete data causing catastrophic damage. The examples given in w3schools.com include the extraction of username and password information
Another example has the malicious user deleting vast quantities of your precious data.
Why is this a problem!
Isn't that obvious! There is a conflict between giving the user flexibility with the choice of username and password and other data access options and openness issues versus the need to be secure and aware of malicious intent. It is very disconcerting to know that a user could enter a value into a dialog box and effectively delete an entire table of data. With good backups this possibly isn't as commercially disasterous as having secure user and password information stolen. Either way it is a very bad look for a database developer to put their clients at such risk. It is also a commercial nightmare for a client company to have such an attack. It could easily put you out of business and ruin your reputation. Not to mention the financial implications were sensitive client data stolen and used by hackers for their own gain.
How to prevent it?
There appears to be some fairly straightforward methods for combatting this kind of malicious attack. According to the www.owasp.org web site:
"It is somewhat shameful that there are so many successful SQL Injection attacks occurring, because it is EXTREMELY simple to avoid SQL Injection vulnerabilities in your code.
SQL Injection flaws are introduced when software developers create dynamic database queries that include user supplied input. To avoid SQL injection flaws is simple. Developers need to either: a) stop writing dynamic queries; and/or b) prevent user supplied input which contains malicious SQL from affecting the logic of the executed query."
So preventing SQL injection is easy then! Great
Prepared Statements (Parameterized Queries)
The basic gist of this option is to prepare predefined options for the user rather than leaving everything wide open for them to dynamically enter. I think basically this means limit the user entered data to a particular variable and then pass the variable into a predefined SQL string to complete the query. So if you needed the user to enter a customer name for example, you would get them to enter their choice into a variable like custname and then pass just that piece of data to a SQL string that was just expecting that one piece of data in the specific place where the customer name is required. Thus preventing additional code from having any meaning to the SQL query.
Stored Procedures
The alternative seems to be to use stored procedures. This option seems very similar, in that you prepare an SQL string and pass in a variable, the difference is that the stored procedure resides in the database itself. The advantage of the previous option is that the code is database independent unlike stored procedures. There are also a few finer points with stored procedures that need to be taken into account when implementing this option.


--- layout: post title: Lazy Evaluation categories: - Lisp - Technical Skills tags: - programming type: post published: false ---
I just read an awesome way to define a lazy list.


US aircraft carrier transits Strait of Hormuz
by AFPWashington (AFP) - The US aircraft carrier strike group Abraham Lincoln sailed through the key Strait of Hormuz on Tuesday to show Washington's "commitment" to freedom of navigation, the Pentagon said, amid tensions with Tehran.
The group's move through the strategic waterway separating Iran and the United Arab Emirates towards the Gulf was scheduled, and unfolded without incident, the US Navy said in a statement.
The strait is a chokepoint for a third of the world's seaborne oil.
A Pentagon official who spoke on condition of anonymity said exchanges between US forces and Iran's coast guard were "safe and professional."
It was the first time a US aircraft carrier group went through the strait since Iran downed a US drone in June in the same area.
Also in June, two foreign tankers were attacked in the area. Those attacks were blamed on Iran, though it denied involvement.
The last time a US aircraft carrier transited the strait was in April, the Pentagon official said.
The Strait of Hormuz is particularly vulnerable because it is very narrow -- about 50 kilometers (30 miles) wide -- and not very deep.
Iran, which has a sophisticated military and controls much of the oil shipping lanes through the Strait of Hormuz, regularly threatens to shut it down if its enemies, such as the United States, commit hostile acts.


|
Division A
|
Pts
|
Wks
|
Avg
|
|
Pinseekers
|
450
|
9
|
50.00
|
|
Fore Warning
|
440
|
9
|
48.89
|
|
Shanks
|
423
|
9
|
47.00
|
|
Laka Talent
|
401
|
9
|
44.56
|
|
Jerry's Kids
|
365
|
9
|
40.56
|
|
|
Division B
|
Pts
|
Wks
|
Avg
|
|
Sharks
|
510
|
9
|
56.67
|
|
Teed Off
|
432
|
9
|
48.00
|
|
Prepress
|
432
|
9
|
48.00
|
|
Greens Keepers
|
421
|
9
|
46.78
|
|
Sandmen
|
403
|
9
|
44.78
|
|


The Bride and Groom
How We Met
Edwina grew up in Hong Kong, while Jonathan grew up in Hearst, a small village in Canada. Our very different worlds collided in Vancouver, where we both studied at UBC. We stuck together through all kinds of life transitions, and eventually became adults together.
Now, a decade later, we're finally tying the knot. We're excited to share this moment with our closest friends and family. See you soon!
Over The Years
Wedding
Important Note: Bali is notorious for traffic jams and it can take almost an hour to get anywhere, even if it seems close on the map. Please plan accordingly so you don't miss any of the festivities!
 Standing canapes will be served, and we've also pre-ordered a limited amount of beer and wine — early birds get a free round!
Cliff Lounge Terrace at Ulu Cliff House
Saturday, October 13th, 2018
Starts at 5:00 PM
Jalan Labuansait No.315,
Padang-Padang, Pecatu, Kuta Sel.,
Kabupaten Badung, Bali 80361, Indonesia
(maps)
Wedding Day
Pandawa Cliff Estate
Monday, October 15, 2018
| 4:00 PM | Welcome Refreshments |
| 4:30 PM | Wedding Ceremony |
| 5:00 PM | Cocktails & Canapes |
| 6:30 PM | Dinner Reception |
| 9:00 PM | Dancing (and Drinking!) |
Jl. Karang Putih No.18,
Kutuh, Bukit, Kuta Selatan,
Kutuh, Kuta Sel., Kabupaten Badung,
Bali 80361, Indonesia
(maps)
Dress Code: Summer Cocktail Attire — dress up and come ready to have fun!
Gifts
We're asking you to fly halfway across the world to see us. We don't expect any gifts, just the pleasure of your company. If you still feel that you'd want to bring a gift, we kindly ask for cash; we don't want to have to carry an engraved toaster through immigration. 🙂
Accommodations
Here are some recommended accommodations for your stay in Bali. If you're traveling in a group, villas might be worth looking into!
Hotels & Resorts
Movenpick Jimbaran
Watermark Hotel
Intercontinental Jimbaran
Ayana Resort
Four Seasons Jimbaran
Anantara Resort
Alila Villas Uluwatu
Hideaway Villas
Belmond Jimbaran Puri
Gravity Hotel
Area Map
About Bali
Bali is an island and province of Indonesia. The province includes the island of Bali and a few smaller neighbouring islands. (Wikipedia)
The mere mention of Bali evokes thoughts of a paradise. It's more than a place; it's a mood, an aspiration, a tropical state of mind. (Lonely Planet)
RSVP
Thank you for your RSVPs! You can contact us directly if you have a change of plans.


You can now buy the Mate 30 series without any referral code, get free gifts worth up to RM537
If you’re a fan of Huawei, you should know that Huawei’s latest Mate 30 flagship series has officially started selling in Malaysia from today onwards (15 November 2019)! This time, you can choose to purchase either Huawei Mate 30 for RM2799 or Huawei Mate 30 Pro for RM3899 without any referral code.
Other than that, for those who purchase the device can also get exclusive FREE gifts worth up to RM537 on a first come first serve basis! The free gifts include a Huawei SuperCharge Wireless Car Charger and 1 year extended warranty from Huawei Care. Other than the Mate 30 series, there are also other Huawei products you can buy and get free gifts as well.
Huawei Mate 30's specs:
- 6.62-inch FHD+OLED display (2340 x 1080)
- Kirin 990 chipset
- 8GB RAM
- 128GB storage (expandable up to 256GB)
- 4200mAh battery
- Huawei SuperCharge (40W), Wireless Huawei SuperCharge (27W)
- USB Type-C, 3.5mm audio jack
- Back cameras: 40 MP ( SuperSensing Camera, f/1.8 aperture) + 16 MP (Ultra Wide Angle Camera, f/2.2 aperture) + 8 MP (Telephoto Camera, f/2.4 aperture, OIS)
- 24 MP front camera (f/2.0 aperture)
- running EMUI10 based on HMS
Huawei Mate 30 Pro's specs:
- 6.53-inch FHD+OLED display (2400 x 1176), 88° ultra-curved screen
- Kirin 990 chipset
- 8GB RAM
- 256GB storage
- 4500mAh battery
- Huawei SuperCharge (40W), Wireless Huawei SuperCharge (27W)
- USB Type-C
- Back cameras: 40 MP ( Cine Camera, f/1.8 aperture) + 40 MP (SuperSensing Camera, f/1.6 aperture, OIS) + 8 MP (Telephoto Camera, f/2.4 aperture, OIS) + 3D Depth Sensing Camera supports Autofocus (phase focus, contrast focus), supports AIS (Huawei AI Image Stabilization).
- 32 MP front camera (f/2.0 aperture)
- supports NFC
- IP68 rating for dust and water resistant
- Virtual Volume Turner
- running EMUI10 based on HMS
Huawei is also offering free gifts for purchasing other products such as an upgraded version of Huawei Matebook 13, Huawei Watch GT2, Huawei x Gentle Monster, Huawei Freebuds 3, and Huawei WiFi Q2 Pro. There is a table below for you to refer to the price and the free gifts available for each product.
Huawei x Gentle Monster will also be available only for limited stocks in Malaysia, and only 10 of these stores are selling it, check out the stores below!
Want to know more about the promotion from Huawei, head to Huawei's official site and facebook page for more information. For more tech news, stay tuned on TechNave.com.


I love learning new and better ways to create seamless user experiences with clean, efficient, and scalable code. I consider work an ongoing education, and I'm always looking for opportunities to work with those who are willing to share their knowledge as much as I want to learn. At the end of the day, my primary goal is to create something beautiful with people that bring out the best in me.
When I am not staring at the computer screen, I find myself playing sports, checking out new restaurants, snapping my dog, or just being outdoorsy.
JavaScript, Ruby, HTML5, CSS3, Python
Postgres, MySQL, Active Record, mongoDB
Rails, Node, Express, React, Angular, Vue, Redux, jQuery, Bootstrap
Git, Test Driven Development, Rspec, Capybara, Jasmine, Mocha, Chai, CSS Grid, Flexbox
An Instagram like web application that uses React and Redux to focus on the front-end. I learned the basics of Redux like dispatching actions and reducers for state management. My next steps would to use Saga or Thunk as my Redux middleware to integrate my axios data request into a Redux action creator which then feeds to my Redux store asynchronously.
A single page web application built using Vue.js to show pictures, menu and contact for a restaurant. The best thing about this project was learning and use more Vue code instead of jQuery helpers. Also, I applied CSS Grid to make the website responsive for web and mobile. I really enjoyed applying this because it eliminates importing CSS frameworks like Bootstrap which slows down the website. I have a better understanding of how webpack and babel works in development and production mode which is deployed to AWS.
I built a CRUD application learning a new technology, Vue.js and Semantic for easy responsive design. Vue is great to implement into projects on the front end with very easy to learn user interfaces.n I used Vue-cli to easily setup the project using webpack. This project covered a lot the basics of Vue.js like data binding, event listeners, attribute and class binding, custom events, event dispatcher and more.
A single-page application to battle fellow githubbers using ReactJS. Enter your GitHub username to see who scores the most points. Calls on the GitHub API to pull the most popular repositories based on language and profile information. I enjoyed building this project to learn the fundamentals of ReactJS like state, props, routing, and components and the life-cycle.
Quick and easy way to keep track of friendly golf wagers with your friends! Enter all the skins, pars, birdies and more into the fields and it will calculate who owes who in real time. No more staring at the scorecard trying to do all the math in your head! Built with Angular, HTML5, CSS3, and Bootstrap and mobile friendly.
Recreated a pricing calculator based off the number of units managed on Latchel with free, unlimited, perpetual use. The previous calculator was powered by a third party company and Latchel wanted to replace it with an in-house calculator. The calculator was built using Angular to display the monthly price in real time.
Shop n Go is an e-commerce website I created for buying products using the Stripe API. I have implemented Elasticsearch to help you find your items as well a category section to help narrow down your search. Anyone can sign up for free with and email address and start shopping. Primarily built with node.js, HTML5, CSS3 and jQuery connected to monogoDB database.
A web application to connect people by playing sports. From one on one to groups activities, PickUp finds events nearby based off your location using the Google Maps API. Primarily built using Ruby on Rails and JavaScript with PostgreSQL on the back-end. jQuery and AJAX to make the site dynamic and interactive.
Have a sweet project in mind or just want to say hi? Feel free to send me a message!


An ephemeron is an object with two components called its key and its datum. It differs from an ordinary pair as follows: if the garbage collector (GC) can prove that there are no references to the key except from the ephemeron itself and possibly from the datum, then it is free to break the ephemeron, dropping its reference to both key and datum. In other words, an ephemeron can be broken when nobody else cares about its key. Ephemerons can be used to construct weak vectors or lists and (possibly in combination with finalizers) weak hash tables.
Much of this specification is derived with thanks from the MIT Scheme Reference Manual.


Sorry, The username or password you entered dosen't match.Please recheck them.
Please rotate your device anticlockwise till its in landscape mode.If you are already in landscape mode try refreshing the page.
X
This page is incompatible with your device's screen size. Use another device with a screen size of 7" or above or try tilting your device in Landscape mode or refresh the page.


Benflix
New Shows!
Movies
Shop
[Settings]
Help
Continue watching Spaceballs 3
Star Wars Ewok Musical Jubilee
Potatoes of the world
Puppy Bowl XIV
Manage history
Video title
Here is a lot of text about the show whose thumbbox is hovered over. There is no auto playing video!
Custom playlist
All faves
Popular


Hullo from the root!
Wassup from the child!
the child is not the same as the root
And back to the the root again


@ThreadSafe
public interface GridFSBucket
| Modifier and Type | Method and Description |
|---|---|
void |
delete(org.bson.BsonValue id)
Given a
id , delete this stored file's files collection document and associated chunks from a GridFS bucket. |
void |
delete(org.bson.types.ObjectId id)
Given a
id , delete this stored file's files collection document and associated chunks from a GridFS bucket. |
void |
downloadToStream(org.bson.BsonValue id,
OutputStream destination)
Downloads the contents of the stored file specified by
id and writes the contents to the destination Stream. |
void |
downloadToStream(org.bson.types.ObjectId id,
OutputStream destination)
Downloads the contents of the stored file specified by
id and writes the contents to the destination Stream. |
void |
downloadToStream(String filename,
OutputStream destination)
Downloads the contents of the latest version of the stored file specified by
filename and writes the contents to
the destination Stream. |
void |
downloadToStream(String filename,
OutputStream destination,
com.mongodb.client.gridfs.model.GridFSDownloadOptions options)
Downloads the contents of the stored file specified by
filename and by the revision in options and writes the
contents to the destination Stream. |
void |
downloadToStreamByName(String filename,
OutputStream destination)
Deprecated.
use
downloadToStream(String, OutputStream) instead. |
void |
downloadToStreamByName(String filename,
OutputStream destination,
com.mongodb.client.gridfs.model.GridFSDownloadByNameOptions options)
Deprecated.
|
void |
drop()
Drops the data associated with this bucket from the database.
|
GridFSFindIterable |
find()
Finds all documents in the files collection.
|
GridFSFindIterable |
find(org.bson.conversions.Bson filter)
Finds all documents in the collection that match the filter.
|
String |
getBucketName()
The bucket name.
|
int |
getChunkSizeBytes()
Sets the chunk size in bytes.
|
com.mongodb.ReadConcern |
getReadConcern()
Get the read concern for the GridFSBucket.
|
com.mongodb.ReadPreference |
getReadPreference()
Get the read preference for the GridFSBucket.
|
com.mongodb.WriteConcern |
getWriteConcern()
Get the write concern for the GridFSBucket.
|
GridFSDownloadStream |
openDownloadStream(org.bson.BsonValue id)
Opens a Stream from which the application can read the contents of the stored file specified by
id . |
GridFSDownloadStream |
openDownloadStream(org.bson.types.ObjectId id)
Opens a Stream from which the application can read the contents of the stored file specified by
id . |
GridFSDownloadStream |
openDownloadStream(String filename)
Opens a Stream from which the application can read the contents of the latest version of the stored file specified by the
filename . |
GridFSDownloadStream |
openDownloadStream(String filename,
com.mongodb.client.gridfs.model.GridFSDownloadOptions options)
Opens a Stream from which the application can read the contents of the stored file specified by
filename and the revision
in options . |
GridFSDownloadStream |
openDownloadStreamByName(String filename)
Deprecated.
use
openDownloadStream(String) instead. |
GridFSDownloadStream |
openDownloadStreamByName(String filename,
com.mongodb.client.gridfs.model.GridFSDownloadByNameOptions options)
Deprecated.
use
openDownloadStream(String, GridFSDownloadOptions) instead. |
GridFSUploadStream |
openUploadStream(org.bson.BsonValue id,
String filename)
Opens a Stream that the application can write the contents of the file to.
|
GridFSUploadStream |
openUploadStream(org.bson.BsonValue id,
String filename,
com.mongodb.client.gridfs.model.GridFSUploadOptions options)
Opens a Stream that the application can write the contents of the file to.
|
GridFSUploadStream |
openUploadStream(String filename)
Opens a Stream that the application can write the contents of the file to.
|
GridFSUploadStream |
openUploadStream(String filename,
com.mongodb.client.gridfs.model.GridFSUploadOptions options)
Opens a Stream that the application can write the contents of the file to.
|
void |
rename(org.bson.BsonValue id,
String newFilename)
Renames the stored file with the specified
id . |
void |
rename(org.bson.types.ObjectId id,
String newFilename)
Renames the stored file with the specified
id . |
void |
uploadFromStream(org.bson.BsonValue id,
String filename,
InputStream source)
Uploads the contents of the given
InputStream to a GridFS bucket. |
void |
uploadFromStream(org.bson.BsonValue id,
String filename,
InputStream source,
com.mongodb.client.gridfs.model.GridFSUploadOptions options)
Uploads the contents of the given
InputStream to a GridFS bucket. |
org.bson.types.ObjectId |
uploadFromStream(String filename,
InputStream source)
Uploads the contents of the given
InputStream to a GridFS bucket. |
org.bson.types.ObjectId |
uploadFromStream(String filename,
InputStream source,
com.mongodb.client.gridfs.model.GridFSUploadOptions options)
Uploads the contents of the given
InputStream to a GridFS bucket. |
GridFSBucket |
withChunkSizeBytes(int chunkSizeBytes)
Create a new GridFSBucket instance with a new chunk size in bytes.
|
GridFSBucket |
withReadConcern(com.mongodb.ReadConcern readConcern)
Create a new GridFSBucket instance with a different read concern.
|
GridFSBucket |
withReadPreference(com.mongodb.ReadPreference readPreference)
Create a new GridFSBucket instance with a different read preference.
|
GridFSBucket |
withWriteConcern(com.mongodb.WriteConcern writeConcern)
Create a new GridFSBucket instance with a different write concern.
|
String getBucketName()
int getChunkSizeBytes()
com.mongodb.WriteConcern getWriteConcern()
WriteConcern
com.mongodb.ReadPreference getReadPreference()
ReadPreference
com.mongodb.ReadConcern getReadConcern()
ReadConcern
GridFSBucket withChunkSizeBytes(int chunkSizeBytes)
chunkSizeBytes
- the new chunk size in bytes.GridFSBucket withReadPreference(com.mongodb.ReadPreference readPreference)
readPreference
- the new ReadPreference
for the GridFSBucketGridFSBucket withWriteConcern(com.mongodb.WriteConcern writeConcern)
writeConcern
- the new WriteConcern
for the GridFSBucketGridFSBucket withReadConcern(com.mongodb.ReadConcern readConcern)
readConcern
- the new ReadConcern
for the GridFSBucketGridFSUploadStream openUploadStream(String filename)
As the application writes the contents to the returned Stream, the contents are uploaded as chunks in the chunks collection. When the application signals it is done writing the contents of the file by calling close on the returned Stream, a files collection document is created in the files collection.
filename
- the filename for the streamGridFSUploadStream openUploadStream(String filename, com.mongodb.client.gridfs.model.GridFSUploadOptions options)
As the application writes the contents to the returned Stream, the contents are uploaded as chunks in the chunks collection. When the application signals it is done writing the contents of the file by calling close on the returned Stream, a files collection document is created in the files collection.
filename
- the filename for the streamoptions
- the GridFSUploadOptionsGridFSUploadStream openUploadStream(org.bson.BsonValue id, String filename)
As the application writes the contents to the returned Stream, the contents are uploaded as chunks in the chunks collection. When the application signals it is done writing the contents of the file by calling close on the returned Stream, a files collection document is created in the files collection.
id
- the custom id value of the filefilename
- the filename for the streamGridFSUploadStream openUploadStream(org.bson.BsonValue id, String filename, com.mongodb.client.gridfs.model.GridFSUploadOptions options)
As the application writes the contents to the returned Stream, the contents are uploaded as chunks in the chunks collection. When the application signals it is done writing the contents of the file by calling close on the returned Stream, a files collection document is created in the files collection.
id
- the custom id value of the filefilename
- the filename for the streamoptions
- the GridFSUploadOptionsorg.bson.types.ObjectId uploadFromStream(String filename, InputStream source)
InputStream
to a GridFS bucket.
Reads the contents of the user file from the Stream
and uploads it as chunks in the chunks collection. After all the
chunks have been uploaded, it creates a files collection document for filename
in the files collection.
filename
- the filename for the streamsource
- the Stream providing the file dataorg.bson.types.ObjectId uploadFromStream(String filename, InputStream source, com.mongodb.client.gridfs.model.GridFSUploadOptions options)
InputStream
to a GridFS bucket.
Reads the contents of the user file from the Stream
and uploads it as chunks in the chunks collection. After all the
chunks have been uploaded, it creates a files collection document for filename
in the files collection.
filename
- the filename for the streamsource
- the Stream providing the file dataoptions
- the GridFSUploadOptionsvoid uploadFromStream(org.bson.BsonValue id, String filename, InputStream source)
InputStream
to a GridFS bucket.
Reads the contents of the user file from the Stream
and uploads it as chunks in the chunks collection. After all the
chunks have been uploaded, it creates a files collection document for filename
in the files collection.
id
- the custom id value of the filefilename
- the filename for the streamsource
- the Stream providing the file datavoid uploadFromStream(org.bson.BsonValue id, String filename, InputStream source, com.mongodb.client.gridfs.model.GridFSUploadOptions options)
InputStream
to a GridFS bucket.
Reads the contents of the user file from the Stream
and uploads it as chunks in the chunks collection. After all the
chunks have been uploaded, it creates a files collection document for filename
in the files collection.
id
- the custom id value of the filefilename
- the filename for the streamsource
- the Stream providing the file dataoptions
- the GridFSUploadOptionsGridFSDownloadStream openDownloadStream(org.bson.types.ObjectId id)
id
.id
- the ObjectId of the file to be put into a stream.void downloadToStream(org.bson.types.ObjectId id, OutputStream destination)
id
and writes the contents to the destination
Stream.id
- the ObjectId of the file to be written to the destination streamdestination
- the destination streamGridFSDownloadStream openDownloadStream(org.bson.BsonValue id)
id
.id
- the custom id value of the file, to be put into a stream.void downloadToStream(org.bson.BsonValue id, OutputStream destination)
id
and writes the contents to the destination
Stream.id
- the custom id of the file, to be written to the destination streamdestination
- the destination streamvoid downloadToStream(String filename, OutputStream destination)
filename
and writes the contents to
the destination
Stream.filename
- the name of the file to be downloadeddestination
- the destination streamvoid downloadToStream(String filename, OutputStream destination, com.mongodb.client.gridfs.model.GridFSDownloadOptions options)
filename
and by the revision in options
and writes the
contents to the destination
Stream.filename
- the name of the file to be downloadeddestination
- the destination streamoptions
- the download optionsGridFSDownloadStream openDownloadStream(String filename)
filename
.filename
- the name of the file to be downloadedGridFSDownloadStream openDownloadStream(String filename, com.mongodb.client.gridfs.model.GridFSDownloadOptions options)
filename
and the revision
in options
.filename
- the name of the file to be downloadedoptions
- the download optionsGridFSFindIterable find()
GridFSFindIterable find(org.bson.conversions.Bson filter)
Below is an example of filtering against the filename and some nested metadata that can also be stored along with the file data:
Filters.and(Filters.eq("filename", "mongodb.png"), Filters.eq("metadata.contentType", "image/png"));
filter
- the query filterFilters
void delete(org.bson.types.ObjectId id)
id
, delete this stored file's files collection document and associated chunks from a GridFS bucket.id
- the ObjectId of the file to be deletedvoid delete(org.bson.BsonValue id)
id
, delete this stored file's files collection document and associated chunks from a GridFS bucket.id
- the id of the file to be deletedvoid rename(org.bson.types.ObjectId id, String newFilename)
id
.id
- the id of the file in the files collection to renamenewFilename
- the new filename for the filevoid rename(org.bson.BsonValue id, String newFilename)
id
.id
- the id of the file in the files collection to renamenewFilename
- the new filename for the filevoid drop()
@Deprecated GridFSDownloadStream openDownloadStreamByName(String filename)
openDownloadStream(String)
instead.filename
.filename
- the name of the file to be downloaded@Deprecated GridFSDownloadStream openDownloadStreamByName(String filename, com.mongodb.client.gridfs.model.GridFSDownloadByNameOptions options)
openDownloadStream(String, GridFSDownloadOptions)
instead.filename
and the revision
in options
.filename
- the name of the file to be downloadedoptions
- the download options@Deprecated void downloadToStreamByName(String filename, OutputStream destination)
downloadToStream(String, OutputStream)
instead.filename
and writes the contents to
the destination
Stream.filename
- the name of the file to be downloadeddestination
- the destination stream@Deprecated void downloadToStreamByName(String filename, OutputStream destination, com.mongodb.client.gridfs.model.GridFSDownloadByNameOptions options)
downloadToStream(String, OutputStream, GridFSDownloadOptions)
instead.filename
and by the revision in options
and writes the
contents to the destination
Stream.filename
- the name of the file to be downloadeddestination
- the destination streamoptions
- the download optionsCopyright © 2017. All rights reserved.


Accessing advanced EV3 features¶
MicroPython runs on top of ev3dev, which is a specific version of Linux. Linux is an operating system. (Other popular operating systems are Microsoft Windows and Apple macOS.) This means that your EV3 is almost like a real computer, just much smaller.
Note
If you just want to write MicroPython programs, you can skip the remaining sections.
The remaining sections are aimed at curious users who want go beyond MicroPython and access some of the other built-in features of Linux and ev3dev.
 Instead, you can access files and programs on it using the command line. It is also called the terminal.
Follow the steps in Figure 16 to access the command line. Now you can enter commands by typing them in and pressing enter.
Running basic commands
For example, if you type the following command and press enter:
ls
then you will see the contents of the current folder. Figure 16
shows the result: it listed the project folder of the getting_started
project that we just ran.
If you type the following command and press enter:
exit
then the command line will be closed. Alternatively, click the garbage icon shown in Figure 16.
You can copy text from the command line by selecting it and
then pressing ctrl
shift
c
.
You can paste text into the command line
using ctrl
shift
v
.
Running commands as an administrator
Some commands require a password to run. This is similar to administrative
tasks on your computer or tablet, such as installing a new app. These commands
work like any other command, but you add sudo
in front of
them.
As an exercise, you can run the following command to turn the EV3 Brick off:
sudo poweroff
You will be prompted for a password. Type maker
and then press Enter
.
Warning
Only run commands with sudo
if you know what you are doing.
Learning more about the command line
To learn more about the command line and many of the available commands, we recommend reading the beginner-friendly free ebook called The Linux Command Line.
To learn more about ev3dev-specific tips and tricks, visit the ev3dev website.
Changing the EV3 Brick name¶
When you search for your EV3 using Visual Studio Code, you see all EV3 Bricks listed by their name. By default, all EV3 Bricks are named ev3dev. Follow these steps to change that name:
Open Visual Studio Code and connect to your EV3 as usual.
Read the steps above about running commands as an administrator.
Think of a good name. In this example, we’ll call it
autonomous-vehicle2
Enter the following command and press enter:
sudo hostnamectl set-hostname autonomous-vehicle2Reboot the EV3 Brick for the change to take effect.
You may need to reboot your computer as well.
EV3 Brick names should only contain lowercase letters a
through z
,
the digits 0
through 9
, and the hyphen -
. It must start with a
letter or digit. It cannot include spaces or other symbols.


--- layout: post title: first sketch using webchemy date: '2017-03-06T07:27:40+01:00' categories: - Sketches picture_url: https://film-Storyboards.tumblr.com/post/158066483706/first-sketch-using-webchemy ---
First sketch using Webchemy.


Demo
Demo the modal dialog Demo with no header Demo with body onlyGeneral Info
quickModal is a jQuery plug in that creates a modal dialog from a div on the page, using the trigger's href attribute to set which div to display.
Features
- Multiple instances on a single page
- Customizable via plug in options and css.
- Lightweight (1.8kb minimized)
- Clicking out of the modal ara closes modal (i.e., close button optional)
How To Set Up & Use QuickModal
- Add the plug-in script to the page, after you've added jQuery.
<script src="/path-to-scripts/jquery.quickModal.min.js" type="text/javascript"></script>
- Add the modal's css to your css file, or to the page
<link href="/path-to-styles/quickModal.css" rel="stylesheet" />
- Call the plug in, using your selector's id or class
$('.modalTrigger').quickModal();
- Set any options you want to customize
$('.modalTrigger').quickModal({ overlayColor: "navy", borderRadius: "0", modalWidth: "700" });
- When the user clicks on your selector, the modal will quickly fade in. Clicking on the element with the closeButton class, or anywhere outside of the modal, will close the modal.
Notes
- The page behind the modal will not scroll while the modal is open, and the modal doesn't scroll - known bug (Issue #2).
- The term "overlay" refers to the partial opacity background behind the modal. (You've probably already worked that out, but just in case.)


Leadership - "Leadership is not about titles, positions or flowcharts. It is about on life influencing another" - John Maxwell
Good Communicator - I love to talk to people and relate to everyone in some way or another.
Accountability - I will be accountable for myself, my actions and my time.
I am committed to reaching out and asking for help if and whenever I may need it.
I am committed to helping my team and working together in order to reach our end goal.
I will always keep in contact with my facilitators, regardlessn of my circumstances.
I expect nothing from the facilitation team. I believe one of the keys to happiness lies within management of your expectations of people and circumstances.
I have a couple of one off events such as a Leadership Conference in Melbourne (19th to 25th of Feb), My Brothers Wedding (March 8th to 10th)


@Beta abstract var tileSize: Int
(source)
Returns a measure for the size of a board tile on screen, like the sidelength of a tile or the distance between two gridlines.
The SgfView uses this to draw the pieces and the markup at the appropriate size.


TeCanal Kids Corner
Play
Study
Read
Binary Explorer
Main Menu
Back
YES!! We did it! Thank you for your help! This should show Hacknet never to mess with me, or you, again. Thank you!


{% extends "layout.html" %} {% import "../includes/location_picker.html" as locationPicker %} {% block page_title %} Location Picker Example 5 {% endblock %} {% block proposition_header %} {% endblock %} {% block content %} Back Which other country would you like to visit this year? {{ locationPicker.macro('', locale, graph, reverseMap, true) }} {% endblock %} {% block body_end %} {% endblock %}


Diversity
Equal Employment Opportunity Statement
TAP|QA, LLC provides equal employment opportunities (EEO) to all employees and applicants
for employment without regard to race, color, religion, gender, sexual orientation,
gender identity, national origin, age, disability, genetic information, marital status,
amnesty or status as a covered veteran in accordance with applicable federal, state and
local laws. TAP|QA, LLC complies with applicable state and local laws governing
nondiscrimination in employment in every location in which the company has facilities.
This policy applies to all terms and conditions of employment, including hiring, placement,
promotion, termination, layoff , recall, transfer, leaves of absence, compensation and training.
TAP|QA, LLC expressly prohibits any form of unlawful employee harassment based on race,
color, religion, gender, sexual orientation, national origin, age, genetic information,
disability or veteran status.
Tap|QA, LLC's Anti-harassment Policy and Complaint Procedure
TAP/QA, LLC is committed to a work environment in which all individuals are treated with
respect and dignity. Each individual has the right to work in a professional atmosphere that
promotes equal employment opportunities and prohibits unlawful discriminatory practices,
including harassment. Therefore, TAP/QA, LLC expects that all relationships among persons
in the o ce and at client sites will be business-like and free of bias, prejudice and harassment.
It is the policy of TAP|QA, LLC to ensure equal employment opportunity without discrimination
or harassment on the basis of race, color, religion, gender, sexual orientation, gender
identity, national origin, age, disability, genetic information, marital status, amnesty or
status as a covered veteran. TAP|QA, LLC prohibits any such discrimination or harassment.
TAP/QA, LLC encourages reporting of all perceived incidents of discrimination or harassment.
It is the policy of TAP/QA, LLC to promptly and thoroughly investigate such reports. TAP/QA,
LLC prohibits retaliation against any individual who reports discrimination or harassment or
who participates in an investigation of such reports.
Definitions of Harassment
Sexual harassment constitutes discrimination and is illegal under federal, state and local laws.
For the purposes of this policy, sexual harassment is defined, as in the Equal Employment
Commission Guidelines, as unwelcome sexual advances, requests for sexual favors and other
verbal or physical conduct of a sexual nature when, for example a) submission to such conduct
is made either explicitly or implicitly a term or condition of an individual’s employment;
b) submission to or rejection of such conduct by an individual is used as the basis for
employment decisions affecting such individual; or c) such conduct has the purpose or effect
of unreasonably interfering with an individual’s work performance or creating an intimidating,
hostile or offensive working environment.
Sexual harassment may include a range of subtle and not-so-subtle behaviors and may
involve individuals of the same or different gender.
Harassment on the basis of any other protected characteristic is also
strictly prohibited. Under this policy, harassment is verbal, written or physical conduct
that denigrates or shows hostility or aversion toward an individual because of his/her
race, color, religion, gender, sexual orientation, national origin, age, disability,
marital status, citizenship, genetic information or any other characteristic protected by
law or that of his/her relatives, friends or associates, and that a) has the purpose or
effect of creating an intimidating, hostile or offensive work environment; b) has the
purpose or effect of unreasonably interfering with an individual’s work performance;
or c) otherwise adversely affects an individual’s employment opportunities.
Harassing conduct includes epithets, slurs or negative stereotyping; threatening,
intimidating or hostile acts; denigrating jokes; and written or graphic material
that denigrates or shows hostility or aversion toward an individual or group and that
is placed on walls or elsewhere on the employer’s premises or circulated in the
workplace, on company time or using company equipment via e-mail, phone
(including voice messages), text messages, tweets, blogs, social networking sites or other means.
Individuals and Conduct Covered
These policies apply to all applicants and employees, whether related to conduct engaged
in by fellow employees or someone not directly connected to TAP/QA, LLC (e.g., an outside
vendor, consultant or customer).
Conduct prohibited by these policies is unacceptable in
the workplace and in any work-related setting outside the workplace, such as during
business trips, business meetings and business-related social events.
Complaint Process
Individuals who believe they have been the victims of conduct prohibited by this policy
statement or who believe they have witnessed such conduct should discuss their concerns
with their immediate supervisor, Human Resources or any member of management.
When possible, TAP/QA, LLC encourages individuals who believe they are being subjected to
such conduct to promptly advise the offender that his or her behavior is unwelcome and
request that it be discontinued. Often, this action alone will resolve the problem.
TAP/QA, LLC recognizes, however, that an individual may prefer to pursue the matter
through complaint procedures.
TAP|QA, LLC encourages the prompt reporting of complaints or concerns so that rapid
and constructive action can be taken before relationships become irreparably strained.
Therefore, although no xed reporting period has been established, early reporting and
intervention have proven to be the most effective
method of resolving actual or perceived incidents of harassment.
Any reported allegations of harassment, discrimination or retaliation will be investigated promptly.
The investigation may include individual interviews with the parties involved and,
where necessary, with individuals who may have observed the alleged conduct or may have
other relevant knowledge.
Confidentiality will be maintained throughout the investigatory
process to the extent consistent with adequate investigation and appropriate corrective action.
Retaliation against an individual for reporting harassment or discrimination or for
participating in an investigation of a claim of harassment or discrimination is a serious
violation of this policy and, like harassment or discrimination itself, will be subject
to disciplinary action. Acts of retaliation should be reported immediately and will be
promptly investigated and addressed.
Misconduct constituting harassment, discrimination or retaliation will be dealt with
appropriately.
False and malicious complaints of harassment, discrimination or
retaliation may be the subject of appropriate disciplinary action.
Americans with Disabilities Act (ADA) and teh ADA Amendments Act (ADAAA)
The Americans with Disabilities Act (ADA) and the ADA Amendments Act, known as the ADAAA,
are federal laws that prohibit employers with 15 or more employees from discriminating
against applicants and individuals with disabilities and that, when needed, provide
reasonable accommodations to applicants and employees who are qualified for a job, with
or without reasonable accommodations, so that they may perform the essential job duties of the position.
It is the policy of TAP/QA, LLC to comply with all federal and state laws concerning
the employment of persons with disabilities and to act in accordance with regulations
and guidance issued by the Equal Employment Opportunity Commission (EEOC). Furthermore,
it is our company policy not to discriminate against qualified individuals with disabilities
in regard to application procedures, hiring, advancement, discharge, compensation, training
or other terms, conditions and privileges of employment.
The company will reasonably
accommodate qualified individuals with a disability so that they can perform the essential
functions of a job, unless doing so causes a direct threat to these individuals or others
in the workplace and the threat cannot be eliminated by reasonable accommodation and/or
if the accommodation creates an undue hardship to TAP/QA, LLC. Contact Human Resources
with any questions or requests for accommodation.
Employment
Background and Reference Checks
To ensure that individuals who join TAP/QA, LLC are well qualified and to ensure
that TAP|QA, LLC maintains a safe and productive work environment, it is our policy
to conduct pre-employment background checks on all applicants who accept an offer
of employment. Background checks may include verification of any information on the
applicant’s resume or application form.
All o ers of employment are conditioned on receipt of a background check report
that is acceptable to TAP|QA, LLC and the potential client site. All background
checks are conducted in conformity with the Federal Fair Credit Reporting Act,
the Americans with Disabilities Act, state and federal privacy and anti-discrimination
laws. Reports are kept confidential and are only viewed by individuals involved in
the hiring process.
If information obtained in a background check would lead TAP/QA, LLC to deny employment,
a copy of the report will be provided to the applicant, and the applicant will have the
opportunity to dispute the report’s accuracy. Background checks may include a criminal
record check, although a criminal conviction does not automatically bar an applicant
from employment.
Additional checks such as a driving record, education, or credit report may be made
on applicants for particular client sites and contracts.
TAP|QA, LLC also reserves the right to conduct a background check for current
employees to determine eligibility for promotion or reassignment in the same manner
as described above.
Discipline
Every employee has the duty and the responsibility to be aware of and abide by
existing rules and policies. Employees also have the responsibility to perform his/ her
duties to the best of his/her ability and to the standards as set forth in his/her
job description or as otherwise established.
TAP|QA, LLC supports the use of progressive discipline to address issues such as
poor work performance or misconduct. Our progressive discipline policy is designed
to provide a corrective action process to improve and prevent a recurrence of
undesirable behavior and/or performance issues. Our progressive discipline policy
has been designed consistent with our organizational values, Human Resources best
practices and employment laws.
Outlined below are the steps of our progressive discipline policy and procedure.
TAP|QA, LLC reserves the right to combine or skip steps in this process depending
on the facts of each situation and the nature of the offense. The level of disciplinary
intervention may also vary. Some of the factors that will be considered are as
follows: whether the offense is repeated despite coaching, counseling and/or training;
employee’s work record; and the impact the conduct and performance issues have
on the organization.
The following outlines TAP|QA, LLC’s progressive discipline process:
-
Verbal warning: A supervisor verbally counsels an employee about an issue of
concern, and a written record of the discussion is placed in the employee’s personnel
file for future reference.
-
Written warning: Written warnings are used for behavior or violations that a
supervisor considers serious or in situations when a verbal warning has not helped
change unacceptable behavior. Written warnings are placed in an employee’s personnel
file. Employees should recognize the grave nature of the written warning.
-
Performance improvement plan: Whenever an employee has been involved
in a disciplinary situation that has not been readily resolved or when he/she has
demonstrated an inability to perform assigned work responsibilities efficiently,
the employee may be given a final warning or placed on a performance improvement
(PIP). PIP status will last for a predetermined amount of time not to exceed 90 days.
Within this time period, the employee must demonstrate a willingness and ability
to meet and maintain the conduct and/or work requirements as specified by the
supervisor and the organization. At the end of the performance improvement period,
the performance improvement plan may be closed or, if established goals are not met,
dismissal may occur.
TAP|QA, LLC reserves the right to determine the appropriate level of discipline for
any inappropriate conduct, including oral and written warnings, suspension with or
without pay, demotion and discharge.
Separation of Employment
Separation of employment within an organization can occur for several different reasons.
-
Resignation: Although we hope your employment with us will be a mutually rewarding
experience, we understand that varying circumstances cause employees to voluntarily
resign employment. Resigning employees are encouraged to
provide two weeks’ notice, in writing, to facilitate a smooth transition out of
the organization. If an employee provides less notice than requested, the
employer may deem the individual to be ineligible for rehire depending on the
circumstances regarding the notice given.
-
Job abandonment: Employees who fail to report to work or contact their supervisor
for three (3) consecutive workdays shall be considered to have abandoned the job
without notice, effective at the end of their normal shift on the third day.
The supervisor shall notify the Human Resources Department at the expiration of
the third workday and initiate the paperwork to terminate the
employee. Employees who are separated due to job abandonment are ineligible to
receive accrued bene ts and are ineligible for rehire.
Termination: Employees of TAP|QA, LLC are employed on an at-will basis, and the
company retains the right to terminate an employee at any time.
Return of Company Property
The separating employee must return all company property at the time of separation,
including keys, computers, and identification cards. Failure to return some items may
result in deductions from the final paycheck.
If applicable, any accrued PTO will be paid in the last paycheck. If the balance of
PTO is negative (or the employee used more PTO than was accrued), the negative
amount will be deducted from the employee’s last paycheck.
If the employee has an outstanding expense report, they have one week following
their last day of employment with TAP|QA, LLC to turn in their report and
applicable receipts to be reimbursed.
Health insurance terminates the last day of the month of employment, unless an
employee requests immediate termination of benefits. Information for Consolidated
Omnibus Budget Reconciliation (COBRA) continued health coverage will be provided.
Employees will be required to pay their share of the dependent health and dental
premiums through the end of the month.
Rehire
Former employees who left TAP|QA, LLC in good standing and were classified as
eligible for rehire may be considered for reemployment. An application must be
submitted to the recruiters, and the applicant must meet all minimum qualifications
and requirements of the position, including any qualifying exam, when required.
Recruiters must obtain approval from the Managing Partners or designee prior to
rehiring a former employee. Rehired employees begin benefits just as any other new
employee. Previous tenure will not be considered in calculating longevity,
leave accruals or any other benefits.
Workplace Safety
Drug-Free Workplace
TAP|QA, LLC has a longstanding commitment to provide a safe and productive work
environment. Drug abuse poses a threat to the health and safety of employees and to
the security of our equipment and facilities. For these reasons, TAP|QA, LLC is
committed to the elimination of drug use in the workplace.
This policy outlines the practice and procedure designed to correct instances of
identified drug use in the workplace. This policy applies to all employees and all
applicants for employment of TAP|QA, LLC. The Human Resources Department is
responsible for policy administration.
Employee Assistance and Drug-Free Awareness
TAP|QA, LLC will assist and support employees who voluntarily seek help for such
problems before becoming subject to discipline and/or termination under this
or other policies. Such employees may be allowed to use accrued paid time off,
referred to treatment providers, and otherwise accommodated as required by law.
Such employees may be required to document that they are successfully following
prescribed treatment and to take and pass follow-up tests if they hold jobs that
are safety sensitive or that require driving or if they have violated this
policy previously.
Employees should report to work fit for duty and free of any adverse effects of
illegal drugs or alcohol. This policy does not prohibit employees from the lawful
use and possession of prescribed medications. Employees must, however, consult with
their doctors about the medications’ effect on their fitness for duty and ability
to work safely and promptly, and disclose any work restrictions to their supervisor.
Employees should not, however, disclose underlying medical conditions unless directed to do so.
Work Rules
The following work rules apply to all employees:
- Whenever employees are working, are present on company premises, are present at
the client site, or are conducting related work off-site, they are prohibited from:
-
Using, possessing, buying, selling, manufacturing or dispensing an illegal
drug (to include possession of drug paraphernalia).
-
Being under the influence of alcohol or an illegal drug as de ned in this policy.
-
The presence of any detectable amount of any illegal drug or illegal controlled
substance in an employee’s body while performing company business or while in
a company facility is prohibited.
 Employees taking a prescribed medication
must carry it in the container labeled by a licensed pharmacist or be prepared
to produce it if asked.
-
Any illegal drugs or drug paraphernalia will be turned over to an appropriate
law enforcement agency and may result in criminal prosecution.
-
TAP|QA, LLC and its clients reserve the right for any reason to perform a drug test on an employee.
Consequences
Applicants who refuse to cooperate in a drug test or who test positive will not be hired.
Employees who refuse to cooperate in required tests or who use, possess, buy, sell,
manufacture or dispense an illegal drug in violation of this policy will be terminated.
The first time an employee tests positive for illegal drug use under this policy,
the result will be discipline up to and including discharge.
Confidentiality
Information and records relating to positive test results, drug and alcohol
dependencies and legitimate medical explanations provided to the medical review
officer (MRO) shall be kept confidential to the extent required by law and
maintained in secure files separate from normal personnel files.
Inspections
TAP|QA, LLC reserves the right to inspect all portions of its premises for drugs,
alcohol or other contraband. All employees, contract employees and visitors may be
asked to cooperate in inspections of their persons, work areas and property that
might conceal a drug, alcohol or other contraband. Employees who possess such
contraband or refuse to cooperate in such inspections are subject to appropriate
discipline up to and including discharge.
Crimes Involving Drugs
TAP|QA, LLC prohibits all employees from manufacturing, distributing, dispensing,
possessing or using an illegal drug in or on company premises or while conducting
company business. Employees are also prohibited from misusing legally prescribed or
over-the-counter (OTC) drugs. Law enforcement personnel shall be notified, as
appropriate, when criminal activity is suspected.
Workplace Bullying
TAP|QA, LLC defines bullying as “repeated inappropriate behavior, either direct or
indirect, whether verbal, physical or otherwise, conducted by one or more persons
against another or others, at the place of work and/or in the course of employment.”
Such behavior violates the company Code of Ethics, which clearly states that all
employees will be treated with dignity and respect.
The purpose of this policy is to communicate to all employees, including supervisors,
managers and executives, that the company will not tolerate bullying behavior.
Employees found in violation of this policy will be disciplined up to and
including termination.
Bullying may be intentional or unintentional. However, it must be noted that where
an allegation of bullying is made, the intention of the alleged bully is irrelevant
and will not be given consideration when meting out discipline. As in sexual
harassment, it is the e ect of the behavior upon the individual that is important.
TAP|QA, LLC considers the following types of behavior examples of bullying:
-
Verbal bullying: Slandering, ridiculing or maligning a person or his/her
family; persistent name calling that is hurtful, insulting or humiliating;
using a person as the butt of jokes; abusive and offensive remarks.
-
Physical bullying: Pushing, shoving, kicking, poking, tripping, assault
or threat of physical assault; damage to a person’s work area or property.
-
Gesture bullying: Nonverbal threatening gestures or glances that
convey threatening messages.
-
Exclusion: Socially or physically excluding or disregarding a person
in work-related activities.
Violence in the Workplace
All employees, customers, vendors and business associates must be treated with
courtesy and respect at all times. Employees are expected to refrain from conduct
that may be dangerous to others.
Conduct that threatens, intimidates or coerces another employee, customer, vendor
or business associate will not be tolerated. TAP|QA, LLC resources may not be used
to threaten, stalk or harass anyone at the workplace or outside the workplace.
TAP|QA, LLC treats threats coming from an abusive personal relationship as it does
other forms of violence.
Indirect or direct threats of violence, incidents of actual violence and suspicious
individuals or activities should be reported as soon as possible to a supervisor,
security personnel, Human Resources, a senior advisor, or a Managing Partner.
When reporting a threat or incident of violence, the employee should be as specific
and detailed as possible. Employees should not place themselves in peril, nor
should they attempt to intercede during an incident.
Employees should promptly inform the Human Resources Department of any protective
or restraining order that they have obtained that lists the workplace as a protected
area. Employees are encouraged to report safety concerns with regard to intimate
partner violence. TAP|QA, LLC will not retaliate against employees making
good-faith reports.
TAP|QA, LLC will promptly and thoroughly investigate all reports of threats of
violence or incidents of actual violence and of suspicious individuals or activities.
The identity of the individual making a report will be protected as much as possible.
TAP|QA, LLC will not retaliate against employees making good-faith reports of
violence, threats or suspicious individuals or activities. In order to maintain
workplace safety and the integrity of its investigations, TAP|QA, LLC may suspend
employees suspected of workplace violence or threats of violence, either with or
without pay, pending investigation.
Anyone found to be responsible for threats of or actual violence or other conduct
that is in violation of these guidelines will be subject to prompt disciplinary
action up to and including termination of employment.
TAP|QA, LLC encourages employees to bring their disputes to the attention of
Human Resources before the situation escalates. TAP|QA, LLC will not discipline
employees for raising such concerns.
Safety
It is the responsibility of each employee to conduct all tasks in a safe and
efficient manner complying with all local, state and federal safety health
regulations and program standards, and with any special safety concerns for use
in a particular area or with a client.
Although most safety regulations are consistent throughout each client site and
contract, each employee has the responsibility to identify and familiarize
her/himself with the emergency plan for his/her working area.
It is the responsibility of the employee to complete an Accident and Incident Report
for each safety and health infraction that occurs by an employee or that the employee
witnesses. Failure to report such an infraction may result in employee disciplinary
action, including termination.
Furthermore, TAP|QA, LLC requires that every person in the organization assumes the
responsibility of individual and organizational safety. Failure to follow company
safety and health guidelines or engaging in conduct that places the employee,
client or company property at risk can lead to employee disciplinary action
and/or termination.
Smoke-Free Workplace
It is the policy of TAP|QA, LLC to prohibit smoking on all company premises in
order to provide and maintain a safe and healthy work environment for all employees.
The law de nes smoking as the “act of lighting, smoking or carrying a lighted or
smoldering cigar, cigarette or pipe of any kind.”
The smoke-free workplace policy applies to:
- All areas of company office.
- All company-sponsored off-site conferences and meetings.
- All visitors (customers and vendors) to the company premises.
Smoking is permitted in parking lots only.
Employees who violate the smoking policy will be subject to disciplinary action up
to and including immediate discharge.
Workplace Expectations
Confidentiality
Our clients and other parties with whom we do business entrust the company with
important information relating to their businesses. It is our policy that all
information considered confidential will not be disclosed to external parties or to
employees without a “need to know.” If an employee questions whether certain
information is considered confidential, he/she should rst check with his/her
immediate supervisor. All computers, laptops, and client information must be
securely stored and locked up at the end of every day.
This policy is intended to alert employees to the need for discretion at all
times and is not intended to inhibit normal business communications.
All inquiries from the media must be referred to the Managing Partners.
Conflicts of Interest
Employees must avoid any relationship or activity that might impair, or even appear
to impair, their ability to make objective and fair decisions when performing their
jobs. At times, an employee may be faced with situations in which business actions
taken on behalf of TAP/QA, LLC may con ict with the employee’s own personal interests.
All employees must disclose any possible con ict of interest prior to hire at
TAP|QA, LLC. Company property, information or business opportunities may not be
used for personal gain.
Conflicts of interest could arise in the following circumstances:
-
Being employed by, or acting as a consultant to, a competitor or potential
competitor, supplier or contractor, regardless of the nature of the employment,
while employed with TAP|QA, LLC
-
Serving as a board member for an outside commercial company or organization.
-
Owning or having a substantial interest in a competitor, supplier or contractor.
-
Accepting gifts, discounts, favors or services from a customer/potential customer,
competitor or supplier, unless equally available to all company employees.
Employees with a conflict-of-interest question should seek advice from
management or Human Resources. Before engaging in any activity, transaction or
relationship that might give rise to a con ict of interest, employees must seek
review from their manager or the Human Resources Department.
Outside Employment
Employees are permitted to engage in outside work or to hold other jobs,
subject to certain restrictions as outlined below.
Activities and conduct away from the job must not compete with, conflict with or
compromise the company interests or adversely a ect job performance and the ability
to fulfill all job responsibilities. Employees are prohibited from performing any
services for customers on nonworking time that are normally performed by TAP|QA, LLC.
This prohibition also extends to the unauthorized use of any company tools or
equipment and the unauthorized use or application of any confidential information.
In addition, employees are not to solicit or conduct any outside business during
paid working time.
Employees are cautioned to carefully consider the demands that additional work
activity will create before accepting outside employment. Outside employment
will not be considered an excuse for poor job performance, absenteeism,
tardiness, leaving early, refusal to travel or refusal to work overtime or different
hours. If TAP|QA, LLC determines that an employee’s outside work interferes with
performance, the employee may be asked to terminate the outside employment.
Attendance and Punctuality
All employees are required to adhere to their client’s schedule of core hours.
Vacation and holidays must be scheduled with the client in advance. Patterns of
absenteeism or tardiness may result in discipline even if the employee has not yet
exhausted available paid time off. Absences due to illnesses or injuries that
qualify under the Family and Medical Leave Act (FMLA) will not be counted against
an employee’s attendance record. Medical documentation within the guidelines of the
FMLA may be required in these instances.
Not reporting to work and not calling to report the absence is a no-call/no-show
and is a serious matter. The rst instance of a no call/no show will result in a
final written warning. The second separate offense may result in termination of employment
with no additional disciplinary steps. A no call/no show lasting three days may
be considered job abandonment and may be deemed an employee’s voluntary resignation of employment.
Attire and Grooming
It is important for all employees to project a professional image while at work by
being appropriately attired. TAP|QA, LLC employees are expected to be neat, clean
and well-groomed while on the job. Clothing must be consistent with the standards
for a business casual environment, and must be appropriate to the type of work being
performed. Beach, gym, and sporting attire is unacceptable to wear in any workplace.
Leggings, unless covered through mid-thigh by other appropriate clothing, are unacceptable.
Natural and artificial scents may become a distraction from a well-functioning
workplace and are also subject to this policy with the exception of religious and
cultural reasons, facial and tongue piercings as well as facial tattoos are prohibited.
TAP|QA, LLC is con dent that employees will use their best judgment regarding attire
and appearance. Management reserves the right to determine appropriateness. Any
employee who is improperly dressed will be counseled or in severe cases may be sent
home to change clothes. Continued disregard of this policy may be cause for
disciplinary action, which may result in termination.
Client Side
Employees are expected to demonstrate good judgment and professional taste while
on-site. Every client site may have different standards of work attire, and all
employees must adhere to their specific client site’s dress code. At a minimum,
employees must dress business casual for their first week at a new client.
Then, employees must match the dress code or dress one-step above the client.
On-Site at Tap|QA, LLC Office
Nice jeans may be worn at the TAP|QA, LLC office any day of the week.
Casual Friday is recognized at TAP|QA, LLC and appropriate clothing,
including jeans, graphic tee shirts, and sweatshirts are acceptable.
Core Hours
TAP|QA, LLC adheres to core hours from 9 am to 3 pm. However, for all employees,
their current client’s core hours take precedence, and must be adhered to.
Consultants working with clients on either the East or West Coasts should adjust
their schedules to match the core hours set by their client.
Electronic Communication and Internet Use
The following guidelines have been established for using the Internet, company
provided cell phones and e-mail in an appropriate, ethical and professional manner.
TAP|QA, LLC and its clients reserve the right to monitor all electronic and Internet
activity on company-provided equipment.
-
Internet, company-provided equipment, and services may not be used for
transmitting, retrieving or storing any communications of a defamatory,
discriminatory, harassing or pornographic nature.
-
Internet use will be monitored at the client site. Do not use company or client
equipment to stream videos, browse social media, or other restricted websites.
-
The following actions are forbidden: using disparaging, abusive, profane
or offensive language; creating, viewing or displaying materials that might
adversely or negatively re ect upon TAP|QA, LLC or be contrary to TAP|QA, LLC’s
best interests; and engaging in any illegal activities, including piracy,
cracking, extortion, blackmail, copyright infringement, and unauthorized access
of any computers and company-provided equipment such as cell phones and laptops.
-
Employees may not copy, retrieve, modify or forward copyrighted, proprietary,
and confidential materials of client information, except with permission.
-
Employees must not use the system in a way that disrupts its use by others.
Employees must not send or receive large les that could be saved/transferred
via thumb drives. Employees are prohibited from sending or receiving
files that are not related to work.
-
Employees should not open suspicious e-mails, pop-ups or downloads.
-
Internal and external e-mails are considered business records and may be subject
to discovery in the event of litigation. Be aware of this possibility when sending
e-mail within and outside the company.
-
Employees may not use or browse social media sites during business hours.
Right to Monitor
All company-supplied technology and company-related work records belong to the
company and not to the employee. Inappropriate or illegal use or communications
may be subject to disciplinary action up to and including termination of employment.
Social Media
Below are guidelines for personal social media use related to TAP|QA, LLC.
-
Employees may not post financial, confidential, sensitive or proprietary
information about the company, clients, employees or applicants.
-
Employees may not post obscenities, slurs or personal attacks that can
damage the reputation of the company, clients, employees, or applicants.
-
TAP|QA, LLC and/or clients may monitor content out on the Internet.
Policy violations may result in discipline up to and including termination
of employment.
Solicitations, Distributions and Posting of Materials
TAP|QA, LLC prohibits the solicitation, distribution and posting of materials on
or at company property by any employee or non employee, except as may be permitted
by this policy. The sole exceptions to this policy are charitable and community
activities supported by TAP|QA, LLC management and company-sponsored programs
related to TAP|QA, LLC’s products and services.
Provisions:
-
Non employees may not solicit employees or distribute literature of any kind on
company premises at any time.
-
Employees may only admit non employees to work areas with management
approval or as part of a company-sponsored program. These visits should not
disrupt work ow. An employee must accompany the non employee at all times
-
Former employees are not permitted onto company property except for official
company business.
-
Employees may not solicit other employees during work times, except in
connection with a company-approved or sponsored event.
-
Employees may not distribute literature of any kind during work times or in any
work area at any time, except in connection with a company-sponsored event.
-
The posting of materials or electronic announcements are permitted with approval
from the Managing Partners or Human Resources.
Badges
Consultants who work on-site will be issued a specific badge. This badge will allow
them to enter through the East and West doors from 6:30am - 10pm. If the consultant
is placed to work full time at an off-site account,
their badge will be returned and deactivated.
Consultants who work from the o ce infrequently will be issued a guest badge for daily access.
If a consultant loses their assigned badge, there is a one-time replacement fee of $10.00.
If a consultant is terminated, their badge must be turned in and will be
deactivated on their last day of employment with TAP|QA, LLC. If they fail to
turn in their badge, it will still be deactivated and a replacement fee of
$10.00 will be deducted from their last paycheck.
Employee Personnel Files
Employee files are maintained by the Human Resources Department and are considered
confidential. Managers and supervisors may only have access to personnel
file information on a need-to-know basis.
A manager or supervisor considering the hire of a former employee or transfer of a
current employee may be granted access to the file, or limited parts of it,
in accordance with anti-discrimination laws.
Personnel file access by current employees and former employees upon request will
generally be permitted within three days of the request unless otherwise required
under state law. Personnel files are to be reviewed in the Human Resources
Department. Personnel files may not be taken outside the department.
Representatives of government or law enforcement agencies, in the course of their
duties, may be allowed access to file information.
Time Off
Holiday Days Off
TAP|QA, LLC recognizes eight holidays each year:
- New Year's Day
- Memorial Day
- Independence Day
- Labor Day
- Thanksgiving Day
- Day After Thanksgiving
- Christmas Eve
- Christmas Day
A client site may observe holidays that are not included on the list of holidays
observed by TAP|QA, LLC. For example, a client may close its office to observe MLK Day.
In this instance, a TAP|QA, LLC employee has three options:
-
They may coordinate with their supervisor to arrange work, either on or off site
during the holiday.
-
They may coordinate with their supervisor to work 40 hours within a shorter week.
For example, they may work four, ten-hour days.
-
If the employee does not work on the holiday, in this example, MLK Day, they will
have to use 8 hours of PTO.
Vacation (As Applicable)
Salaried employees accrue PTO on a monthly basis. Employees are allowed to carry over
up to five days (40 hours) of PTO at the end of the year. Any remaining PTO will
be paid to the employee as a Billable Hours Bonus. TAP|QA, LLC allows its salaried
employees to go negative in their PTO up to a balance of negative 40 hours. Any
time off taken beyond negative 40 hours will be unpaid. To schedule vacation time,
employees must first have their time off approved by their manager at the client site.
Once approved, employees should send an email to Human Resources and Operations
to notify them of their date of absence and return to work.
When submitting hours for time off, the employee should leave notes detailing their
absence for the coinciding day(s) in Ebillity. If the time o will equal one workweek
or more, the employee must send an email to the Finance Department/Operations,
informing them of the dates of departure and return to work.
For applicable employees, leave taken beyond an employee’s available vacation balance
will result in a negative PTO balance. If separation of employment from TAP/ QA, LLC
occurs before this balance returns to either zero or positive, the remaining negative
balance will be deducted from the employee’s last paycheck.
Family and Medical Leave Act
The function of this policy is to provide employees with a general description of their
FMLA rights. In the event of any con ict between this policy and the applicable law,
employees will be a orded all rights required by law.
General Provisions
Under this policy, TAP|QA, LLC will grant up to 12 weeks (or up to 26 weeks of military
caregiver leave to care for a covered service member with a serious injury or illness)
during a 12-month period to eligible employees. The leave may be paid, unpaid or a
combination of paid and unpaid leave, depending on the circumstances of the leave
and as specified in this policy.
Eligibility
To qualify to take family or medical leave under this policy, the employee must meet the following conditions:
-
The employee must have worked for the company for 12 months or 52 weeks.
The 12 months or 52 weeks need not have been consecutive. Separate periods of
employment will be counted, provided that the break in service does not exceed
seven years. Separate periods of employment will be counted if the break in service
exceeds seven years due to National Guard or Reserve military service obligations
or when there is a written agreement, including a collective bargaining agreement,
stating the employer’s intention to rehire the employee after the service break.
For eligibility purposes, an employee will be considered to have been employed for
an entire week even if the employee was on the payroll for only part of a week or
if the employee is on leave during the week.
-
The employee must have worked at least 1,250 hours during the 12-month period
immediately before the date when the leave is requested to commence. The principles
established under the Fair Labor Standards Act (FLSA) determine the number of
hours worked by an employee. The FLSA does not include time spent on paid or unpaid
leave as hours worked. Consequently, these hours of leave should not be counted in
determining the 1,250 hours eligibility test for an employee under FMLA.
-
The employee must work in a work site where 50 or more employees are employed by
the company within 75 miles of that o ce or work site. The distance is to be
calculated by using available transportation by the most direct route.
Type of Leave Covered
To qualify as FMLA leave under this policy, the employee must be taking leave for
one of the reasons listed below:
Amount of Leave
An eligible employee may take up to 12 weeks for the first five FMLA circumstances above
(under heading “Type of Leave Covered”) under this policy during any 12-month period.
The company will measure the 12-month period as a rolling 12-month period
measured backward from the date an employee uses any leave under this policy.
Each time an employee takes leave, the company will compute the amount of leave the
employee has taken under this policy in the last 12 months and subtract it from the
12 weeks of available leave, and the balance remaining is the amount of time the
employee is entitled to take at that time.
An eligible employee can take up to 26 weeks for the FMLA military caregiver leave
circumstance above during a single 12-month period. For this military caregiver leave,
the company will measure the 12-month period as a rolling 12-month period measured
forward. FMLA leave already taken for other FMLA circumstances will be deducted f
rom the total of 26 weeks available.
If a husband and wife both work for the company and each wishes to take leave for the
birth of a child, adoption or placement of a child in foster care, or to care for a
parent (but not a parent “in-law”) with a serious health condition, the husband and
wife may only take a combined total of 12 weeks of leave. If a husband and wife both
work for the company and each wishes to take leave to care for a covered injured or
ill service member, the husband and wife may only take a combined total of 26 weeks
of leave.
Employee Status and Benefits During Leave
While an employee is on leave, the company will continue the employee’s health benefits
during the leave period at the same level and under the same conditions as if the
employee had continued to work. Payment of the employee portion of the premium is
still the responsibility of the employee, and must be arranged by the employee with
the Finance Department/Operations.
Employee Status and Benefits During Leave
An employee who takes leave under this policy may be asked to provide a
fitness for duty (FFD) clearance from the health care provider.
Disability leave for the birth of a child and for an employee’s serious health
condition, including workers’ compensation leave (to the extent that it qualifies), will be
designated as FMLA leave and will run concurrently with FMLA.
Intermittent Leave or a Reduced Work Schedule
The employee may take FMLA leave in 12 consecutive weeks, may use the leave
intermittently (take a day periodically when needed over the year) or, under certain
circumstances, may use the leave to reduce the workweek or workday, resulting in a
reduced-hour schedule. In all cases, the leave may not exceed a total of 12 workweeks
(or 26 workweeks to care for an injured or ill service member over a 12-month period).
Certification for the Employee’s Serious Health Condition
The company will require certification for the employee’s serious health condition.
The employee must respond to such a request within 15 days of the request or provide a
reasonable explanation for the delay. Failure to provide certification may result in a
denial of continuation of leave.
Certification for the Family Member’s Serious Health Condition
The company will require certi cation for the family member’s serious health condition.
The employee must respond to such a request within 15 days of the request or provide a
reasonable explanation for the delay. Failure to provide certification may result in a
denial of continuation of leave.
Certification of Qualifying Exigency for Military Family Leave
The company will require certification of the qualifying exigency for military family
leave. The employee must respond to such a request within 15 days of the request or
provide a reasonable explanation for the delay. Failure to provide certification may
result in a denial of continuation of leave.
Certification for Serious Injury or Illness of Covered Service Member for Military Family Leave
The company will require certification for the serious injury or illness of the covered
service member. The employee must respond to such a request within 15 days of
the request or provide a reasonable explanation for the delay. Failure to provide
certification may result in a denial of continuation of leave.
Recertification
The company may request recertification for the serious health condition of the
employee or the employee’s family member when circumstances have changed significantly,
or if the employer receives information casting doubt on the reason given for the
absence, or if the employee seeks an extension of his or her leave. Otherwise, the
company may request recertification for the serious health condition of the employee
or the employee’s family member every six months in connection with an FMLA absence.
Procedure for Requesting FMLA Leave
All employees requesting FMLA leave must provide Human Resources with verbal or
written notice of the need for the leave. When the need for the leave is foreseeable,
the employee must provide the employer with at least 30 days’ notice. When an employee
becomes aware of a need for FMLA leave less than 30 days in advance, the employee must
provide notice of the need for the leave either the same day or the next business day.
When the need for FMLA leave is not foreseeable, the employee must comply
with the company’s usual and customary notice and procedural requirements for
requesting leave (contact Human Resources). The employee will work with TAP|QA, LLC
Operations sta to work out a transition plan for the client.
Intent to Return to Work from FMLA Leave
The company may require an employee on FMLA leave to report periodically on the
employee’s status and intent to return to work.
All questions regarding FMLA should be directed to Human Resources.


The Duke's Bookstore Interface
This section provides additional detail on the components of the Duke's Bookstore example and how they interact.
The Book Java Persistence API Entity
The Book entity, located in the dukesbookstore.entity package, encapsulates the book data stored by Duke's Bookstore.
The Book entity defines attributes used in the example:
A book ID
The author's first name
The author's surname
The title
The price
Whether the book is on sale
The publication year
A description of the book
The number of copies in the inventory
The Book entity also defines a simple named query, findBooks.
Enterprise Beans Used in Duke's Bookstore
Two enterprise beans located in the dukesbookstore.ejb package provide the business logic for Duke's Bookstore.
BookRequestBean is a stateless session bean that contains the business methods for the application. The methods create, retrieve, and purchase books, and update the inventory for a book. To retrieve the books, the getBooks method calls the findBooks named query defined in the Book entity.
ConfigBean is a singleton session bean used to create the books in the catalog when the application is initially deployed. It calls the createBook method defined in BookRequestBean.
Facelets Pages and Managed Beans Used in Duke's Bookstore
The Duke's Bookstore application uses Facelets and its templating features to display the user interface. The Facelets pages interact with a set of CDI managed beans that provide the underlying properties and methods for the user interface. The front page also interacts with the custom components used by the application.
The application uses the following Facelets pages, which are located in the tut-install/examples/case-studies/dukes-bookstore/web directory:
- bookstoreTemplate.xhtml
The template file, which specifies a header used on every page as well as the style sheet used by all the pages. The template also retrieves the language set in the web browser.
Uses the LocaleBean managed bean.
- index.xhtml
Landing page, which lays out the custom map and area components using managed beans configured in the faces-config.xml file, and allows the user to select a book and advance to the bookstore.xhtml page.
- bookstore.xhtml
Page that allows the user to obtain details on the selected book or the featured book, to add either book to the shopping cart, and to advance to the bookcatalog.xhtml page.
Uses the BookstoreBean managed bean.
- bookdetails.xhtml
Page that shows details on a book selected from bookstore.xhtml or other pages and allows the user to add the book to the cart and/or advance to the bookcatalog.xhtml.
Uses the BookDetailsBean managed bean.
- bookcatalog.xhtml
Page that displays the books in the catalog and allows the user to add books to the shopping cart, view the details for any book, view the shopping cart, empty the shopping cart, or purchase the books in the shopping cart.
Uses the CatalogBean and ShoppingCart managed beans.
- bookshowcart.xhtml
Page that displays the contents of the shopping cart and allows the user to remove items, view the details for an item, empty the shopping cart, purchase the books in the shopping cart, or return to the catalog.
Uses the ShowCartBean and ShoppingCart managed beans.
- bookcashier.xhtml
Page that allows the user to purchase books, specify a shipping option, subscribe to newsletters, or join the Duke Fan Club with a purchase over a certain amount.
Uses the CashierBean and ShoppingCart managed beans.
- bookreceipt.xhtml
Page that confirms the user's purchase and allows the user to return to the catalog page to continue shopping.
Uses the CashierBean managed bean.
In addition to the managed beans used by the Facelets template and pages, the application uses the following managed beans:
- AbstractBean
Contains utility methods called by other managed beans.
- ShoppingCartItem
Contains methods called by ShoppingCart, CatalogBean, and ShowCartBean.
Custom Components and Other Custom Objects Used in Duke's Bookstore
The map and area custom components for Duke's Bookstore, along with associated renderers, tag handlers, listener, and model class, are defined in the following packages in the tut-install/examples/case-studies/dukes-bookstore/src/java/dukesbookstore directory:
- components
Contains the MapComponent and AreaComponent classes. See Creating Custom Component Classes for more information.
- listeners
Contains the AreaSelectedEvent class, along with other listener classes. See Handling Events for Custom Components for more information.
- model
Contains the ImageArea class. See Configuring Model Data for more information.
- renderers
Contains the MapRenderer and AreaRenderer classes. See Delegating Rendering to a Renderer for more information.
- taglib
Contains the MapTag and AreaTag classes. See Creating the Component Tag Handler for more information.
The tut-install/examples/case-studies/dukes-bookstore/src/java/dukesbookstore directory also contains a custom converter and other custom listeners not specifically tied to the custom components:
- converters
Contains the CreditCardConverter class. See Creating and Using a Custom Converter for more information.
- listeners
Contains the LinkBookChangeListener, MapBookChangeListener, and NameChanged classes. See Implementing an Event Listener for more information.
Properties Files Used in Duke's Bookstore
The strings used in the Duke’s Bookstore application are encapsulated into resource bundles to allow the display of localized strings in multiple locales. The properties files, located in the tut-install/examples/case-studies/dukes-bookstore/src/java/dukesbookstore/web/messages/ directory, consist of a default file containing English strings, and three additional files for other locales. The files are as follows:
- Messages.properties
Default file, containing English strings.
- Messages_de.properties
File containing German strings.
- Messages_es.properties
File containing Spanish strings.
- Messages_fr.properties
File containing French strings.
The language setting in the user's web browser determines which locale is used. The html tag in bookstoreTemplate.xhtml retrieves the language setting from the language property of LocaleBean:
<html lang="#{localeBean.language}" ...
For more information about resource bundles, see Chapter 17, Internationalizing and Localizing Web Applications.
The resource bundle is configured as follows in the faces-config.xml file:
<application> <resource-bundle> <base-name>dukesbookstore.web.messages.Messages</base-name> <var>bundle</var> </resource-bundle> <locale-config> <default-locale>en</default-locale> <supported-locale>de</supported-locale> <supported-locale>fr</supported-locale> <supported-locale>es</supported-locale> </locale-config> </application>
This configuration means that in the Facelets pages, messages are retrieved using the prefix bundle with the key found in the Messages_locale.properties file, as in the following example from the index.xhtml page:
<h:outputText style="font-weight:bold" value="#{bundle.ChooseBook}" />
In Messages.properties, the key string is defined as follows:
ChooseBook=Choose a Book from our Catalog
Deployment Descriptors Used in Duke's Bookstore
The following deployment descriptors are used in Duke's Bookstore:
- src/conf/persistence.xml
The Java Persistence API configuration file.
- web/WEB-INF/beans.xml
An empty deployment descriptor file used to enable the CDI runtime.
- web/WEB-INF/bookstore.taglib.xml
The tag library descriptor file for the custom components.
- web/WEB-INF/faces-config.xml
The JavaServer Faces configuration file, which configures the managed beans for the map component as well as the resource bundles for the application.
- web/WEB-INF/glassfish-web.xml
The GlassFish-specific configuration file.
- web/WEB-INF/web.xml
The web application configuration file.