Tips and FAQs¶
It takes too long time to compile a computational graph. Can I skip it?¶
Chainer does not compile computational graphs, so you cannot skip it, or, I mean, you have already skipped it :).
It seems you have actually seen on-the-fly compilations of CUDA kernels. CuPy compiles kernels on demand to make kernels optimized to the number of dimensions and element types of input arguments. Pre-compilation is not available, because we have to compile an exponential number of kernels to support all CuPy functionalities. This restriction is unavoidable because Python cannot call CUDA/C++ template functions in generic way. Note that every framework using CUDA require compilation at some point; the difference between other statically-compiled frameworks (such as cutorch) and Chainer is whether a kernel is compiled at installation or at the first use.
These compilations should run only at the first use of the kernels.
The compiled binaries are cached to the $(HOME)/.cupy/kernel_cache
directory by default.
If you see that compilations run every time you run the same script, then the caching is failed.
Please check that the directory is kept as is between multiple executions of the script.
If your home directory is not suited to caching the kernels (e.g. in case that it uses NFS), change the kernel caching directory by setting the CUPY_CACHE_DIR
environment variable to an appropriate path.
See CuPy Overview for more details.
mnist example does not converge in CPU mode on Mac OS X¶
Many users reported that mnist example does not work correctly on Mac OS X. We are suspecting it is caused by vecLib, that is a default BLAS library installed on Mac OS X.
Note
Mac OS X is not officially supported. I mean it is not tested continuously on our test server.
We recommend to use other BLAS libraries such as OpenBLAS. We empirically found that it fixes this problem. It is necessary to reinstall NumPy to use replaced BLAS library. Here is an instruction to install NumPy with OpneBLAS using Homebrew.
$ brew tap homebrew/science
$ brew install openblas
$ brew install numpy --with-openblas
If you want to install NumPy with pip, use site.cfg file.
You can check if NumPy uses OpenBLAS with numpy.show_config
method.
Check if blas_opt_info refers to openblas.
>>> import numpy
>>> numpy.show_config()
lapack_opt_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/opt/openblas/lib']
define_macros = [('HAVE_CBLAS', None)]
language = c
blas_opt_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/opt/openblas/lib']
define_macros = [('HAVE_CBLAS', None)]
language = c
openblas_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/opt/openblas/lib']
define_macros = [('HAVE_CBLAS', None)]
language = c
openblas_lapack_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/opt/openblas/lib']
define_macros = [('HAVE_CBLAS', None)]
language = c
blas_mkl_info:
NOT AVAILABLE
See detail about this problem in issue #704.


package
statements that do not correspond to the project directory structure.
Also, reports classes without package
statements if the class is not located directly in
source root directory.
While it's not strictly mandated by Java language, it's good to keep classes
from package com.example.myapp
inside the com/example/myapp
directory under
the source root. Failure to do this may confuse code readers and make some tools working incorrectly.


To someone I can trust with my life, it’s been over a year since we started talking, and a year ago, I could have never imagined still being in contact with you, and to this extent! From playing PUBG together (even though I was the one playing and you were just standing there), to simply talking, to watching movies, I loved every moment of it.
To one of the strongest people I know, I could only wish to be as secure and headstrong as you. Having gone through so much and still having time to talk to me, will be something I shall never forget. I hope you know how much it means to me, how much YOU mean to me.
To the most genuine and sincere person I know, the true value of your friendship lies in your uncanny ability to change my mood without even trying. The impact you have had on my life is truly infinite and I can safely say that I would not be the same person if it wasn’t for you.
SO HAPPPYY BIRTHDAYY PROCHII!!  I want you to have a wonderful day and a brilliant year ahead.
Love you loads.
Thanayy (that really good-looking friend you have)


{% extends 'home/base.html' %} {% load static %} {% block head %}
Here's a few questions that we get pretty frequently!
w3Hacks is an online platform where anyone can learn industry-level software engineering skills through project-based learning and learning by doing! We have tons of exercises, events, and content to make sure that you learn best!
w3Hacks is made for those who don't learn best from a book, but for those who learn best by getting their hands dirty in the task and learning by doing. We make all of our exercises independent to how you want to complete it and have it personally grade it by our staff.
Project-based learning is learning certain concepts, tools, and technologies by using them in practice.


Deconnexion
Personnel
Civilite
Nom
Prenom
Email
Tel
Active
Actions
sd
sdf
sdf
sdf
sdf
sdf
show
edit
Create a new entry


--- layout: post title: WWDC2008メモ categories: - blog tags: - "徒然" status: draft type: post published: false meta: {} author: login: sonson email<EMAIL_ADDRESS>display_name: sonson first_name: '' last_name: '' ---
session 313
size scaling
setting view port size for iPhone
text scaling
-webkit-text-scale
media query
Safari uses "screen"
automatically identify device
feature detection
search - user agent
Resource limits
iPhone and Safari try to protect themselves. automatically shutdown it.
Be mindfule of memory usage
10MB per text resource
8MB image file tiff, png, gif
32MB Jpeg
while inactive, scripts may be stopped
not paused, media playback
Webkit
office, iwork, pdf
console.error
console.warn
console.log
Event javascript
one finger tap and release
click, mousedown, up, move
scroll
two fingers pan
rotate device
Google Map
open map with native app.
what's new 2.0
faster, faster
bytes per resource is important because of high latency
Touch and gesture events
352 iPhone tricks
Visual CSS
CSS Properties
CSS vissual effects
css transforms
css transitions
css animations
combine with touch events for interactive DHTML
379, 344, 391, 341?
Tools
set latency and bandwidth for evaluation page
921 using dashcode
session 900
#ifdef TARGET_IPHONE_SIMULATER
#else
#endif
NSZombies
Guardmalloc
Tech Note 2124
Interfacebuilder
Related to 910, 923
Analyzing your application
Instruments - analyze iPhone application
Sign?
UDID unique id for every device
Public and private key for certification
send public key to apple
apple makes certification with public key
Shark
select profile network/iPhone
911, 932 abount shark tuning app's perfomance
session 337
Patterns for Organizing Content
Nav, Tab Bar
Nav. bar
Hierarchy of content
Tab bar
Self-contained modes
Parts of screenful
MVC model
building an iPhone Application
recipes
list controller, detail controller, photo controller
self contains controller
UIViewController - design rules?
InterfaceBuilder
view controller contains views, data and logic
view controller is file's owner
Hook up view outlet
use initiWithNibName:bundle:
XCode
override - loadView
Hool events
appear -> load data
disappear -> save data
releated session - 362, 410
UINavigationController
Stack of view controllers
push and pop - controllers and titles
Navigating
Rarely call pop directly
Demo... make, push and pop views
Tab bar
tab bar also set self.view to window
Rotating views
autoresizingmask
session 706
System sound - first step
playing small sound
audiotoolbox/audioservies.h
Audio File API
audio file formats, mpeg4, mp3, aac, core audio format, aiff, aifc, wav
audio file, arbitary seeking ,data
AudioFileOpenURL
AudioFileStream
Audio Queue API
Audio Recording
supported format
PCM, Apple Lossless, a-law, IMA4, iLBC
Demo - aqTouch
Recording and Play
Listed recorded sound file
Where does the audio go?
built in mic and speaker
send sound to ex, car via USB
~~~~
Game with OpenAL
OpenGL like library for 3D audio same coordinate system
OpenAL
without recording feature
alcDeviceOpen
OpenAL extentsions : iPhone
static buffer extention
Demo OpenAL
Greate!!!!!!!!!!!!!!!
sound session is controlled os with category?
oalDemo is running while iTunes music is running background
Ociroscope demo
running smoothly
session 105
Abount itunes music store
AppStore
Hosting
Global distribute
Worldwide payment processing
reach iPhone, iPod touch, iTunes users.
Starting early July
Focus on creating great apps
Touch Fighter...loanch title? game?
Introducing iTunes Connect
iTunes Connect
Set Up Account
Distribution - sign up
Add new application
primary language and company name
only prompted the first time you add an app
later can't change these
Export Compliance
encyption statement? - U.S. departement of comerce
Enter App Details
SKU number?
Support Devices
iPhone
iPhone and iPod touch
Game Advisiories, Ratings
Upload content
Icon is required
Rounded corners and shine automatically
App ID
Compress .app as .zip archive
Handling Large Binaries
Hard limit 2GB
Use the Application Loader tool for large binaries
Icon, Screen shot.
Specify availability
For commercial app
Set payment Info
Set price
Non-US print, sign return W-8BEN form by post
For worldwide app
Add languages
Supported languages
Demo - app store
building xcode
fill out web form, upload icon and screenshot
upload binary file
Use iTunes to Your advantage
ease of purchase on devices or computer
Discoverablity
Application name
category
Titling
touch fighter v2 -> touch fighter
iPhone touch fighter -> touch fighter
touch fighter extreme action ->
Touch Fighter -> OK
Icon
take care cultural problem
dont't be afraid to consult a professional graphic designer
Icon
Normal
Rounded
Shine
Screen shots
Show your product in the best light
Other info
version number
....description
After Submitting Your App
Update binary
provide addtional content, version, release notes in each language new app binary
session 362
Controls, views, animiations
What is view
UIResponder <- UIView <- UIControl
quadrilateral region
UIControl?
UIControlEvent******* -> UIControlEventTouchDownRepeat
UIControlEvent is a bit mask
UIView
frame <- superview coordinates
bounds <- self coordinates
UIView UIViewAnimation category
handled by CoreAnimation
Why is fast? -> HW acceleration
UIView animations
Asynchronous, delegate and callback
+setAnimationDuration:
+setAnimationCurve
+setAnimationDelegate
+setAnimationDidStopSelector
beginAnimations:context:
what is context?
[UIView beginAnimations:@"name" context:nil]
[myView setAlpha:0.0f];
[UIView commitAnimations];
Demo - animation
UIApplication - beginIgnoringInteractionEvents
UIApplication - endIgnoringInteractionEvents
setAnimationDelegate:
UIViewController, UIViewRotation category
Header view, content view, footer view
2 stages of rotation
CoreAnimation - lower level animation api
CAKeyframeAnimation
addAnimation:forKey:
Demo
half way...defines position during the animation
ballistics....弾道
session 519
Push Notification Service
User Experience
unknown servers, unknown data, unknown, connections
Badges, Alerts, Custom Sounds, Centralized Settings, every application, can set timing.
Easy
push and anyone
3 Cocoa, 2 http
HTTP
Property
Practice
data via the other connection, only notification
Client - side
Decide when to listen or ignore server by user with centerlized setting
session 724
OpenCL
Quartz composer - patch
Kernel patch
iteration patch
As a renderer QCView or QCCompositionLayer
session 727
OpenCL ANSI-C99
for heterogeneous parrele data
device group
Example - bais and scale
__kernel void sace
clCreateArray -> memory on GPU and CPU
perlin noise, generate natural - OpenGL and OpenCL
SPH demo - water splash
maximize computation
maximize memory locality
minimize bandwidth usage
minimize divergence
nVidia engeneer
Outline
Filling up the GPU
Use the local memory
Optimize for memory performance
Example - fluids algrorithmn
brute force is best
Ph.D
for expensive computation O( n log(n) )
Accelerate.framework
many hand-tuned general purpose routines
N-body physics simulation
gravitational interaction between a system of N particles
O( n*n )
Real scientists use real algorithmns
Make sure you have the right algorithmn first
Data struction is important
(x,y,z,w)[n] -> x[n], y[n], z[n]
Optimizing for GPU
use more thread, less loop.
copy to local memory
k-d tree
session 417
Application launch
Make launch and quit quickly
iPhone's youtube
defers networking operations
static memory
-mthumb complier flag
enabled by default
not suitable for floating-point intensive code
dead code stripping
PNG is optimised
plist is optimised
avoid atomic properties
recommend, property is nonatomic
Allocate memory wisely
autorelease can be expensive
use release whenever possible
eliminate memory leaks
Low-memory warnings
app is delegate for warning
purge offscreen view
delete cache objects
respond to low-memory notifications
File performance
use memory mapping for large file
avoids loading entire file into memory
mmap munmap
NSData initWithContentsOfMappedFile
For large datasets, use SQLite
more efficient for randam access data
Battery
transmitting is the most expensive operation
use compact formats
avoid chatty protocols
transmit/receice in bursts
Core Location
session 546
ImagePicker
Save photos -> save with ImagePicker
presentModalViewController->UIImagePickerController
getting image by delegate methods
Image data from NSDictionary
savephotos are copied to iPhoto library


--- layout: default title: Everything about me header_keywords_abstract : false header : simple_header one_sentence: The best way to have a good idea is to have lots of ideas header_image: me.JPG ---
Bioinformatics Research Scientist


Fresno City College CIT82 course is a fast-paced online class about learning the basics of various web developer tools, alongside HTML/CSS and Bootstrap.
This course is not an advanced nor intermediate course, instead focusing on getting first time web developers started with web developing. Every week there are two of the following assignments, lectures on web development topics, hands-on assignments focused on getting us to perform common web developer tasks, and discussions related to web development. Students are first taught critical web fundamentals before diving into web programming languages. This helps them understand the various web terms that are often discussed, such as front-end stacks and clears up any confusion regarding what web development actually is.
The website you see before you, formerly called as Project 0, is a culmination of everything that has been taught throughout this 9 week course. The most important topics and it's sub-topics which have been learned throughout these past 9 weeks have been picked. Each topic contains 5 sub-topics which I believe best represent the overall learning outcome of that particular section of the class. It is meant to be a brief overview of what aspiring students looking into joining this class in the future will be learning.


My profile
Logout
{{logo}}
menu
About us
Services
Product listing
Login/Signup
{{username}}
arrow_drop_down
About us
Services
Login/Signup


Selectors With Pure Swift
When reading Andy’s great post on how to sugar coat the awful syntax of selectors in Swift I figured there must be a way to get rid of selectors altogether and go with Pure Swift.
Objective-C archaisms were a big letdown for me, when I started learning Swift. Well, no more!
😖#selector(tapped(_:))😖
Yuuck! Everything about it is ugly: #selector(tapped(_:))
, @objc
…
Aaah… This looks much better, doesn’t it ? It’s almost like we can forget about the dinosaurs of the past. Can we achieve that easily though? Well, let’s try.
Nothing too fancy. Just a wrapper to hide all the ugliness and forget about it forever. Is that all ? Well, let’s try and use it.
Nope 😢 The text doesn’t get printed - the selector doesn’t get called.
- Target objects in UIKit are kept as weak references to avoid reference cycles
The object that contains our closure gets released when when the function is executed.
Sure, we can keep a reference to each ClosureSelector
object, but let’s just agree to not do that.
There must be some magic way…
Obj-C runtime to the rescue!
Let’s use object association and extensions to keep the reference to the wrapper, while the button is alive.
Doesn’t look as bad as I thought it would. Besides, you write it once for each class (yes NSTimer
, you’re next!) and forget about it.
It’ll keep the ClosureSelector
object alive as long as the UIButton
is alive - object association works very similarily to properties in Objective-C, hence the OBJC_ASSOCIATION_RETAIN_NONATOMIC
flag.
On a different note, it’s strange that objc_setAssociatedObject
works with pure Swift classes, huh ?
Done! That sure looks pretty to me 🦄 I hope that UIKit gets translated to pure swift one day, and we won’t have to resolve to such drastic measures.


Canoemates: A Story of the Florida Reef and Everglades
by Kirk Munroe
Chapter XIV: “Worth and Quorom are Missing”
Additional Information
- Year Published: 1892
- Language: English
- Country of Origin: United States of America
- Source: Munroe, K. (1892). Canoemates: A Story of the Florida Reef and Everglades. New York, NY: Harper & Brothers.
-
Readability:
- Flesch–Kincaid Level: 9.5
- Word Count: 1,515
- Genre: Adventure
- ✎ Cite This
Downloads
As Sumner was anxious to reach Lignum Vitae by the shortest possible route, the Transit was headed in through the channel between Lower Metacumba and Long keys. Both tide and wind being with her, the nimble-footed sharpie seemed to fly past the low reefs and sandspits on either side. Now she skimmed by the feeding grounds of flocks of gray pelicans, whose wise expressions and bald heads gave them the appearance of groups of old men, and then passed an old sponge crawl, or the worm eaten hull of some ancient wreck, both of which were covered with countless numbers of cormorants, gannets, and gulls. Waiting, with outstretched necks and pinions half spread, until the schooner was within a stone’s throw, these would fly with discordant cries of anger, wheel in great circles, and return to the places from which they had been driven the moment the threatened danger had passed.
Even after the sharpie was well inside the bay, and the island they sought was in sight, they could not lay a direct course towards it on account of a reef several miles in length that presented an effectual barrier to anything larger than a canoe. But one narrow channel cut through it, and this was away to the northward, close under a tiny mangrove key. Towards this then they steered, with Sumner at the tiller, for he was the only one on board familiar with the intricate navigation of those waters.
“You are certain that you are right, Sumner?” inquired Lieutenant Carey, anxiously, as they seemed about to drive headlong on the bar, and an ominous wake of muddy water showed that they were dragging bottom.
“Certain,” answered the boy, quietly.
“All right, then; I’ve nothing to say.”
Inch by inch the great centerboard rose in its trunk, and the slack of its pennant was taken in, as the water rapidly shoaled. Now she dragged so heavily that it seemed as though she were about to stop. Again the lieutenant looked at Sumner, and then cast a significant glance at the man stationed by the foresheet. But the boy never hesitated nor betrayed the least nervousness. An instant later the tiller was jammed hard over, there was a sharp order of “Trim in!” and, flying almost into the teeth of the wind, the light vessel shot through an Opening so narrow that she scraped bottom on both sides, and in another moment was dashing through deep water on the opposite side of the bar.
From here the run to Lignum Vitae was a long and short leg beat, with numerous shoals to be avoided. In spite of being kept busy with these, Sumner found time to note and wonder at a great column of smoke that rose from the island. What could Worth and Quorum be about? It looked as though they had managed to set the forest on fire. Filled with an uneasy apprehension, he jumped into a boat the moment the Transit’s anchor was dropped in the well-remembered cove, and sculled himself ashore. To his amazement he heard the sound of many voices, and discovered a dozen or so of men hard at work apparently cutting down the forest and burning it.
As he stepped ashore, and looked in vain for the familiar figures of his friends, a pleasant-faced young man advanced from where the laborers were at work to meet him.
“Can you tell me, sir, what has become of a boy named Worth Manton and an old colored man whom I left here the day before yesterday?” Sumner inquired, anxiously.
“If you mean the two whom I found camped here, and helping themselves to my provisions, I think I can,” answered the young man, with a smile. “They went over to Indian Key last evening on the boat that brought me here yesterday. They were very anxious concerning the fate of a friend who left them the evening before, and went over there on a raft, I believe they said. Can it be that you are the person they are seeking?”
“Yes, sir, I am.”
“Then you are Sumner Rankin, and I am very happy to meet you. My name is Haines. I have bought this key, and am clearing it, preparatory to having it planted with coconuts. The provisions and camp outfit that appeared here so mysteriously to you and your companions belong to me, and were left here by the mail schooner on her way up the reef. I expected to arrive, with my men, about the same time, but was detained. I am very glad, however, that they came in time to relieve your distress. I am also much obliged to you for affording them a shelter from the rain, without which some of the things would have been injured. Now will you pardon my curiosity if I ask how you happen to arrive here in a schooner from that direction when your friends said you had gone the other way, and were confident of finding you on Indian Key?”
When Sumner had given a brief outline of his recent adventure, Mr. Haines said: “You certainly have had a most remarkable experience, and I am glad your friends did not know of it, for young Manton was worried enough about you as it was. However, you will soon rejoin them, and when you have recovered your canoes, if you feel so inclined, I should be pleased to have you return here as my guests for as long as you choose to stay.”
Sumner thanked him, and said he should be happy to stop there on his return from the mainland. Then, begging to be excused, as he was impatient to go in search of his comrades, he jumped into his boat and returned to the Transit.
Lieutenant Carey was perfectly willing to proceed at once to Indian Key, but the tide was still running flood, and the breeze, which was each moment becoming lighter, was dead ahead for a run out through the channel. Under the circumstances, it would be useless to lift the anchor, and the impatient boy was forced to wait for the tide to turn. When it finally began to run ebb, the breeze had died out so entirely that there was not even the faintest ripple on the water, and another season of waiting was unavoidable.
By the lieutenant’s invitation Mr. Haines came off and dined with them. He proved a most charming companion, and laughed heartily at Sumner’s description of the amazement with which he, Worth, and Quorum had discovered the mysterious godsend of provisions. Mr. Haines declared that it was one of the best jokes he had ever known; though he was in doubt as to whether it was on him or on them. He appreciated Sumner’s impatience to be off, and when, late in the afternoon, a fair breeze sprang up, he made haste to take his leave that their departure might not be delayed.
It was nearly sunset when the Transit approached Indian Key so closely that objects the size of a man could be distinguished on it. Sumner was again at the helm, and he tried not to neglect his steering; but he could not keep his eyes from scanning anxiously every discernible foot of its surface. To his great disappointment not a soul appeared.
“They may be on the other side, keeping a lookout for passing vessels,” suggested Lieutenant Carey.
 For an hour they searched over every foot of the key, and through its deserted buildings, shouting as they went, but their search was in vain. Nothing was seen of the lost ones, nor had they left a trace to show that they had ever been on the island.
“It’s no use,” said Sumner at length; “they evidently are not here, and must have gone on in the boat that brought them when they failed to find me. Now, I don’t know of anything to do but to go out to the lighthouse after the canoes, and then come back here and wait. If Worth has gone on up the reef, he must pass here on his way back, while if he has gone the other way, he will hear of me at Key West and come back here again. I’m awfully sorry that I can’t go with you to the mainland, but I don’t see how I possibly can under the circumstances.”
Although the boy tried to speak cheerfully, and to take the brightest possible view of the disappearance of his young comrade, he was filled with anxiety, and it was with a heavy heart that he turned into his berth on board the schooner Transit that night.


Gradient from orange to a darker orange, by varying L in HSL
Gradient from orange to a darker orange, by varying L in Lab


Bible
Lower third simple
Full diagonal
Songs
Overlay
Stage
Lower third
Overlay
Right corder
Scoreboard
Overlay
Clock
Clock


| Figure 1 |
Extent of occurrence of the Atlantic Forest and Cerrado hots ... |
| Figure 2 |
Ladder plots of Atlantic Forest ( AF) and Cerrado ( CER) anu ... |
| Figure 3 |
Geographic distribution of gains (blue grids) and losses (br ... |
| Figure 4 |
Geographic distribution of the anuran richness gradients in ... |
| Figure 5 |
Geographic distribution of the local contributions to beta d ... |
| Figure 6 |
Geographic distribution of the local contributions to beta d ... |
| Figure 7 |
Triangular plots of the relationships among the pairs of gri ... |


Use Pod Security Policies in UCP
Estimated reading time: 15 minutesPod Security Policies (PSPs) are cluster-level resources which are enabled by default in Docker Universal Control Plane (UCP) 3.2. See Pod Security Policy for an explanation of this Kubernetes concept.
There are two default PSPs in UCP: a privileged
policy and an unprivileged
policy. Administrators of the cluster can enforce additional policies and apply
them to users and teams for further control of what runs in the Kubernetes
cluster. This guide describes the two default policies, and provides two
example use cases for custom policies.
Kubernetes Role Based Access Control (RBAC)
To interact with PSPs, a user will need to be granted access to the
PodSecurityPolicy
object in Kubernetes RBAC. If the user is a UCP Admin
,
then the user can already manipulate PSPs. A normal user can interact with
policies if a UCP admin creates the following ClusterRole
and
ClusterRoleBinding
:
$ cat <<EOF | kubectl create -f -
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: psp-admin
rules:
- apiGroups:
- extensions
resources:
- podsecuritypolicies
verbs:
- create
- delete
- get
- list
- patch
- update
EOF
$ USER=jeff
$ cat <<EOF | kubectl create -f -
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: psp-admin:$USER
roleRef:
kind: ClusterRole
name: psp-admin
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: User
name: $USER
EOF
Default pod security policies in UCP
By default, there are two policies defined within UCP, privileged
and
unprivileged
. Additionally, there is a ClusterRoleBinding
that gives every
single user access to the privileged policy. This is for backward compatibility
after an upgrade. By default, any user can create any pod.
Note: PSPs do not override security defaults built into the UCP RBAC engine for Kubernetes pods. These Security defaults prevent non-admin users from mounting host paths into pods or starting privileged pods.
$ kubectl get podsecuritypolicies
NAME PRIV CAPS SELINUX RUNASUSER FSGROUP SUPGROUP READONLYROOTFS VOLUMES
privileged true * RunAsAny RunAsAny RunAsAny RunAsAny false *
unprivileged false RunAsAny RunAsAny RunAsAny RunAsAny false *
The specification for the privileged
policy is as follows:
allowPrivilegeEscalation: true
allowedCapabilities:
- '*'
fsGroup:
rule: RunAsAny
hostIPC: true
hostNetwork: true
hostPID: true
hostPorts:
- max: 65535
min: 0
privileged: true
runAsUser:
rule: RunAsAny
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
volumes:
- '*'
The specification for the unprivileged
policy is as follows:
allowPrivilegeEscalation: false
allowedHostPaths:
- pathPrefix: /dev/null
readOnly: true
fsGroup:
rule: RunAsAny
hostPorts:
- max: 65535
min: 0
runAsUser:
rule: RunAsAny
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
volumes:
- '*'
Use the unprivileged policy
Note: When following this guide, if the prompt
$
followsadmin
, the action needs to be performed by a user with access to create pod security policies as discussed in the Kubernetes RBAC section. If the prompt$
followsuser
, the UCP account does not need access to the PSP object in Kubernetes. The user only needs the ability to create Kubernetes pods.
To switch users from the privileged
policy to the unprivileged
policy (or
any custom policy), an admin must first remove the ClusterRoleBinding
that
links all users and service accounts to the privileged
policy.
admin $ kubectl delete clusterrolebindings ucp:all:privileged-psp-role
When the ClusterRoleBinding
is removed, cluster admins can still deploy pods,
and these pods are deployed with the privileged
policy. But users or service
accounts are unable to deploy pods, because Kubernetes does not know what pod
security policy to apply. Note cluster admins would not be able to deploy
deployments, see using the unprivileged policy in a
deployment for more details.
user $ kubectl apply -f pod.yaml
Error from server (Forbidden): error when creating "pod.yaml": pods "demopod" is forbidden: unable to validate against any pod security policy: []
Therefore, to allow a user or a service account to use the unprivileged
policy
(or any custom policy), you must create a RoleBinding
to link that user or
team with the alternative policy. For the unprivileged
policy, a ClusterRole
has already been defined, but has not been attached to a user.
# List Existing Cluster Roles
admin $ kubectl get clusterrole | grep psp
privileged-psp-role 3h47m
unprivileged-psp-role 3h47m
# Define which user to apply the ClusterRole too
admin $ USER=jeff
# Create a RoleBinding linking the ClusterRole to the User
admin $ cat <<EOF | kubectl create -f -
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: unprivileged-psp-role:$USER
namespace: default
roleRef:
kind: ClusterRole
name: unprivileged-psp-role
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: User
name: $USER
namespace: default
EOF
In the following example, when user “jeff” deploys a basic nginx
pod, the unprivileged
policy
then gets applied.
user $ cat <<EOF | kubectl create -f -
apiVersion: v1
kind: Pod
metadata:
name: demopod
spec:
containers:
- name: demopod
image: nginx
EOF
user $ kubectl get pods
NAME READY STATUS RESTARTS AGE
demopod 1/1 Running 0 10m
To check which PSP is applied to a pod, you can get a detailed
view of the pod spec using the -o yaml
or -o json
syntax with kubectl
. You
can parse JSON output with jq.
user $ kubectl get pods demopod -o json | jq -r '.metadata.annotations."kubernetes.io/psp"'
unprivileged
Using the unprivileged policy in a deployment
Note: In a most use cases a Pod is not actually scheduled by a user. When creating Kubernetes objects such as Deployments or Daemonsets the pods are being scheduled by a service account or a controller.
If you have disabled the privileged
PSP policy, and created a RoleBinding
to map a user to a new PSP policy, Kubernetes objects like Deployments and
Daemonsets will not be able to deploy pods. This is because Kubernetes objects,
like Deployments, use a Service Account
to schedule pods, instead of the user
that created the Deployment.
user $ kubectl get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
nginx 0/1 0 0 88s
user $ kubectl get replicasets
NAME DESIRED CURRENT READY AGE
nginx-cdcdd9f5c 1 0 0 92s
user $ kubectl describe replicasets nginx-cdcdd9f5c
...
Warning FailedCreate 48s (x15 over 2m10s) replicaset-controller Error creating: pods "nginx-cdcdd9f5c-" is forbidden: unable to validate against any pod security policy: []
For this deployment to be able to schedule pods, the service account defined wthin the deployment specification needs to be associated with a PSP policy. If a service account is not defined within a deployment spec, the default service account in a namespace is used.
This is the case in the deployment output above, there is no service account
defined, therefore a Rolebinding
to grant the default service account in the
default namespace to use PSP policy is needed.
An example RoleBinding
to associate the unprivileged
PSP policy in UCP with
the defaut service account in the default namespace is:
admin $ cat <<EOF | kubectl create -f -
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: unprivileged-psp-role:defaultsa
namespace: default
roleRef:
kind: ClusterRole
name: unprivileged-psp-role
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: default
namespace: default
EOF
This should allow the replica set to schedule pods within the cluster:
user $ kubectl get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
nginx 1/1 1 1 6m11s
user $ kubectl get replicasets
NAME DESIRED CURRENT READY AGE
nginx-cdcdd9f5c 1 1 1 6m16s
user $ kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx-cdcdd9f5c-9kknc 1/1 Running 0 6m17s
user $ kubectl get pod nginx-cdcdd9f5c-9kknc -o json | jq -r '.metadata.annotations."kubernetes.io/psp"'
unprivileged
Applying the unprivileged PSP policy to a namespace
A common use case when using PSPs is to apply a particular policy to one
namespace, but not configure the rest. An example could be where an admin
might be want to configure keep the privileged
policy for all of the
infrastructure namespaces but configure the unprivileged
policy for the
end user namespaces. This can be done with the following example:
In this demonstration cluster, infrastructure workloads are deployed in the
kube-system
and the monitoring
namespaces. End User workloads are deployed
in the default
namespace.
admin $ kubectl get namespaces
NAME STATUS AGE
default Active 3d
kube-node-lease Active 3d
kube-public Active 3d
kube-system Active 3d
monitoring Active 3d
First, delete the ClusterRoleBinding
that is applied by default in UCP.
admin $ kubectl delete clusterrolebindings ucp:all:privileged-psp-role
Next, create a new ClusterRoleBinding
that will enforce the privileged
PSP
policy for all users and service accounts in the kube-system
and monitoring
namespaces, where in this example cluster the infrastructure workloads are
deployed.
admin $ cat <<EOF | kubectl create -f -
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: ucp:infrastructure:privileged-psp-role
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: privileged-psp-role
subjects:
- kind: Group
name: system:authenticated:kube-system
apiGroup: rbac.authorization.k8s.io
- kind: Group
name: system:authenticated:monitoring
apiGroup: rbac.authorization.k8s.io
- kind: Group
name: system:serviceaccounts:kube-system
apiGroup: rbac.authorization.k8s.io
- kind: Group
name: system:serviceaccounts:monitoring
apiGroup: rbac.authorization.k8s.io
EOF
Finally, create a ClusterRoleBinding
to allow all users who deploy pods and
deployments in the default
namespace to use the unprivileged
policy.
admin $ cat <<EOF | kubectl create -f -
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: ucp:default:unprivileged-psp-role
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: unprivileged-psp-role
subjects:
- kind: Group
name: system:authenticated:default
apiGroup: rbac.authorization.k8s.io
- kind: Group
name: system:serviceaccounts:default
apiGroup: rbac.authorization.k8s.io
EOF
Now when the user deploys in the default
namespace they will get the
unprivileged
policy but when they deploy in the monitoring namespace they
will get the privileged
policy.
user $ cat <<EOF | kubectl create -f -
apiVersion: v1
kind: Pod
metadata:
name: demopod
namespace: monitoring
spec:
containers:
- name: demopod
image: nginx
---
apiVersion: v1
kind: Pod
metadata:
name: demopod
namespace: default
spec:
containers:
- name: demopod
image: nginx
EOF
user $ kubectl get pods demopod -n monitoring -o json | jq -r '.metadata.annotations."kubernetes.io/psp"'
privileged
user $ kubectl get pods demopod -n default -o json | jq -r '.metadata.annotations."kubernetes.io/psp"'
unprivileged
Reenable the privileged PSP for all users
To revert to the default UCP configuration, in which all UCP users and service
accounts use the privileged
PSP, recreate the default
ClusterRoleBinding
:
admin $ cat <<EOF | kubectl create -f -
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: ucp:all:privileged-psp-role
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: privileged-psp-role
subjects:
- kind: Group
name: system:authenticated
apiGroup: rbac.authorization.k8s.io
- kind: Group
name: system:serviceaccounts
apiGroup: rbac.authorization.k8s.io
EOF
PSP examples
UCP admins or users with the correct permissions can create their own custom policies and attach them to UCP users or teams. This section highlights two potential use cases for custom PSPs. These two uses cases can be combined into the same policy. Note there are many more use cases with PSPs not covered in this document.
-
Preventing containers that start as the Root User
-
Applying default seccomp policies to all Kubernetes Pods.
For the full list of parameters that can be configured in a PSP, see the Kubernetes documentation.
Example 1: Use a PSP to enforce “no root users”
A common use case for PSPs is to prevent a user from deploying
containers that run with the root user. A PSP can be created to
enforce this with the parameter MustRunAsNonRoot
.
admin $ cat <<EOF | kubectl create -f -
apiVersion: extensions/v1beta1
kind: PodSecurityPolicy
metadata:
name: norootcontainers
spec:
allowPrivilegeEscalation: false
allowedHostPaths:
- pathPrefix: /dev/null
readOnly: true
fsGroup:
rule: RunAsAny
hostPorts:
- max: 65535
min: 0
runAsUser:
rule: MustRunAsNonRoot
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
volumes:
- '*'
EOF
If not done previously, the admin user must remove the ClusterRoleBinding
for the privileged
policy, and then add a new ClusterRole
and RoleBinding
to link a user to the new norootcontainers
policy.
# Delete the default privileged ClusterRoleBinding
admin $ kubectl delete clusterrolebindings ucp:all:privileged-psp-role
# Create a ClusterRole Granting Access to the Policy
admin $ cat <<EOF | kubectl create -f -
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: norootcontainers-psp-role
rules:
- apiGroups:
- policy
resourceNames:
- norootcontainers
resources:
- podsecuritypolicies
verbs:
- use
EOF
# Define a User to attach to the No Root Policy
admin $ USER=jeff
# Create a RoleBinding attaching the User to the ClusterRole
admin $ cat <<EOF | kubectl create -f -
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: norootcontainers-psp-role:$USER
namespace: default
roleRef:
kind: ClusterRole
name: norootcontainers-psp-role
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: User
name: $USER
namespace: default
EOF
If a user tries to deploy a pod that runs as a root user, such as the upstream
nginx
image, this should fail with a ConfigError
.
user $ cat <<EOF | kubectl create -f -
apiVersion: v1
kind: Pod
metadata:
name: demopod
spec:
containers:
- name: demopod
image: nginx
EOF
user $ kubectl get pods
NAME READY STATUS RESTARTS AGE
demopod 0/1 CreateContainerConfigError 0 37s
user $ kubectl describe pods demopod
<..>
Error: container has runAsNonRoot and image will run as root
Example 2: Use a PSP to apply seccomp policies
A second use case for PSPs is to prevent a user from deploying containers without a seccomp policy. By default, Kubernetes does not apply a seccomp policy to pods, so a default seccomp policy could be applied for all pods by a PSP.
admin $ cat <<EOF | kubectl create -f -
apiVersion: extensions/v1beta1
kind: PodSecurityPolicy
metadata:
name: seccomppolicy
annotations:
seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default'
seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
spec:
allowPrivilegeEscalation: false
allowedHostPaths:
- pathPrefix: /dev/null
readOnly: true
fsGroup:
rule: RunAsAny
hostPorts:
- max: 65535
min: 0
runAsUser:
rule: RunAsAny
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
volumes:
- '*'
EOF
If not done previously, the admin user must remove the ClusterRoleBinding
for the privileged
policy, and then add a new ClusterRole
and RoleBinding
to link a user to the new applyseccompprofile
policy.
# Delete the default privileged ClusterRoleBinding
admin $ kubectl delete clusterrolebindings ucp:all:privileged-psp-role
# Create a ClusterRole Granting Access to the Policy
admin $ cat <<EOF | kubectl create -f -
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: applyseccompprofile-psp-role
rules:
- apiGroups:
- policy
resourceNames:
- seccomppolicy
resources:
- podsecuritypolicies
verbs:
- use
EOF
# Define a User to attach to the No Root Policy
admin $ USER=jeff
# Create a RoleBinding attaching the User to the ClusterRole
admin $ cat <<EOF | kubectl create -f -
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: applyseccompprofile-psp-role:$USER
namespace: default
roleRef:
kind: ClusterRole
name: applyseccompprofile-psp-role
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: User
name: $USER
namespace: default
EOF
As shown in the following example, if a user tries to deploy an nginx
pod without applying
a seccomp policy as the pod metadata, Kubernetes automatically applies a policy for the user.
user $ cat <<EOF | kubectl create -f -
apiVersion: v1
kind: Pod
metadata:
name: demopod
spec:
containers:
- name: demopod
image: nginx
EOF
user $ kubectl get pods
NAME READY STATUS RESTARTS AGE
demopod 1/1 Running 0 16s
user $ kubectl get pods demopod -o json | jq '.metadata.annotations."seccomp.security.alpha.kubernetes.io/pod"'
"docker/default"


Page Title
Home
Blog
Archives
Contact Me
Article Title
Chapter 1
Article text text text
Article Title
Article text text text


- dataMissing - Variable in class trashday.ui.requests.SlotGroup
-
Deprecated.
- dateRelative(LocalDateTime, LocalDateTime) - Static method in class trashday.ui.FormatUtils
-
- dateRelative(LocalDate, LocalDate) - Static method in class trashday.ui.FormatUtils
-
- DateTimeUtils - Class in trashday.model
-
Helper functions that address gaps and inconsistencies among the various date/time components in
early Java, ical4j's work-arounds, and Java 8.
- deleteEntirePickup(String) - Method in class trashday.model.Schedule
-
Deprecated.
Delete all entries from the schedule for the given pickupName.
- deleteEntireSchedule() - Method in class trashday.model.Calendar
-
Delete all entries from the calendar.
- deleteEntireSchedule() - Method in class trashday.model.Schedule
-
Deprecated.
Delete all entries from the schedule.
- deleteMatchingDayOfMonth(NumberList, Integer) - Method in class trashday.model.CalendarEvent
-
Remove any entries in an RRULE's BYMONTHDAY list that match the given day-of-month.
- deleteMatchingDays(WeekDayList, DayOfWeek) - Method in class trashday.model.CalendarEvent
-
Remove any entries in an RRULE's BYDAY list that match the given
DayOfWeek
.
- deleteMatchingDays(WeekDayList, DayOfWeek, Integer) - Method in class trashday.model.CalendarEvent
-
Remove any entries in an RRULE's BYDAY list that match the given
DayOfWeek
and offset.
- deletePickupTime(String, DayOfWeek, LocalTime) - Method in class trashday.model.Schedule
-
Deprecated.
Delete a schedule entry for a given pickup name and time.
- deletePickupTimeOfWeek(String, TimeOfWeek) - Method in class trashday.model.Schedule
-
Deprecated.
Delete a schedule entry for a given pickup name and time.
- deleteRecurrenceDayOfMonth(Integer, Integer) - Method in class trashday.model.CalendarEvent
-
Remove recurrences that happen on given day-of-month from this
CalendarEvent
.
- deleteRecurrencesAll() - Method in class trashday.model.CalendarEvent
-
Remove all RRULE entries from this event.
- deleteRecurrenceWeekdayOfMonth(DayOfWeek, Integer, Integer) - Method in class trashday.model.CalendarEvent
-
Remove a weekday-of-month recurrences.
- deleteRecurrenceWeekly(DayOfWeek, int) - Method in class trashday.model.CalendarEvent
-
Remove weekly recurrences that match a given interval (e.g.
- description - Static variable in class trashday.ui.requests.SlotDayOfMonth
-
A printable description of this slot's purpose
- description - Static variable in class trashday.ui.requests.SlotDayOfWeek
-
A printable description of this slot's purpose
- description - Static variable in class trashday.ui.requests.SlotNextOrThis
-
Deprecated.
A printable description of this slot's purpose
- description - Static variable in class trashday.ui.requests.SlotNthOfMonth
-
A printable description of this slot's purpose
- description - Static variable in class trashday.ui.requests.SlotPickupName
-
A printable description of this slot's purpose
- description - Static variable in class trashday.ui.requests.SlotTimeOfDay
-
A printable description of this slot's purpose
- description - Static variable in class trashday.ui.requests.SlotTimeZone
-
A printable description of this slot's purpose
- description - Static variable in class trashday.ui.requests.SlotWeekOfMonth
-
A printable description of this slot's purpose
- domMap - Static variable in class trashday.ui.FormatUtils
-
Map of day-of-month numbers to spoken form.
- DynamoDao - Class in trashday.storage
-
Trash Day data access object for DynamoDB.
- DynamoDao(DynamoItemPersistence) - Constructor for class trashday.storage.DynamoDao
-
Create database access object
- DynamoItem - Class in trashday.storage
-
Class for storing a table item for each application user
in a Dynamo DB table.
- DynamoItem() - Constructor for class trashday.storage.DynamoItem
-
- DynamoItem(DynamoItem) - Constructor for class trashday.storage.DynamoItem
-
- DynamoItem.CalendarConverter - Class in trashday.storage
-
Class to handle serialization for
Calendar
objects.
- DynamoItem.IntentLogConverter - Class in trashday.storage
-
Class to handle serialization for
IntentLog
objects.
- DynamoItem.ScheduleConverter - Class in trashday.storage
-
Class to handle serialization for
Schedule
objects.
- DynamoItemPersistence - Class in trashday.storage
-
Client for DynamoDB persistence layer for the Trash Day
skill.
- DynamoItemPersistence(AmazonDynamoDBClient) - Constructor for class trashday.storage.DynamoItemPersistence
-
Create a new DB client to save/load user Schedules in
Dynamo DB.
- DynamoItemPersistence(AmazonDynamoDBClient, String) - Constructor for class trashday.storage.DynamoItemPersistence
-
Create a new DB client to save/load user Schedules in
Dynamo DB.
- generalAskOrTellResponse(SessionDao, boolean, boolean, String, String, Phrase, Phrase, Phrase, String, Phrase) - Static method in class trashday.ui.responses.ResponseHelpers
-
- generalAskResponse(SessionDao, boolean, String, String, Phrase, Phrase, Phrase, String, Phrase) - Static method in class trashday.ui.responses.ResponseHelpers
-
- generalTellResponse(SessionDao, boolean, String, String, Phrase, Phrase, String, Phrase) - Static method in class trashday.ui.responses.ResponseHelpers
-
- generalTellResponse(SessionDao, boolean, String, String, String, String, String, String) - Static method in class trashday.ui.responses.ResponseHelpers
-
- get(String) - Method in class trashday.ui.requests.SlotGroup
-
Deprecated.
- getCalendar() - Method in class trashday.storage.DynamoItem
-
Get the schedule attribute.
- getCalendar() - Method in class trashday.storage.SessionDao
-
- getConfirmationDescription() - Method in class trashday.storage.SessionDao
-
Get session attribute that contains a description of the confirmation action
currently in progress.
- getConfirmationIntent() - Method in class trashday.storage.SessionDao
-
Get session attribute that contains the intent name of the confirmation action
currently in progress.
- getCustomerId() - Method in class trashday.storage.DynamoItem
-
Get the customerId attribute.
- getDayOfWeek(WeekDay) - Static method in class trashday.model.DateTimeUtils
-
- getDayOfWeek() - Method in class trashday.model.TimeOfWeek
-
Deprecated.
Getter for the Day Of Week component of this weekly time.
- getDescription() - Method in interface trashday.ui.requests.Slot
-
Getter for slot description that tells the use of this slot in readable form.
- getDescription() - Method in class trashday.ui.requests.SlotDayOfMonth
-
Getter for slot description that tells the use of this slot in readable form.
- getDescription() - Method in class trashday.ui.requests.SlotDayOfWeek
-
Getter for slot description that tells the use of this slot in readable form.
- getDescription() - Method in class trashday.ui.requests.SlotNextOrThis
-
Deprecated.
Getter for slot description that tells the use of this slot in readable form.
- getDescription() - Method in class trashday.ui.requests.SlotNthOfMonth
-
Getter for slot description that tells the use of this slot in readable form.
- getDescription() - Method in class trashday.ui.requests.SlotPickupName
-
Getter for slot description that tells the use of this slot in readable form.
- getDescription() - Method in class trashday.ui.requests.SlotTimeOfDay
-
Getter for slot description that tells the use of this slot in readable form.
- getDescription() - Method in class trashday.ui.requests.SlotTimeZone
-
Getter for slot description that tells the use of this slot in readable form.
- getDescription() - Method in class trashday.ui.requests.SlotWeekOfMonth
-
Getter for slot description that tells the use of this slot in readable form.
- getEvents() - Method in class trashday.model.Calendar
-
Get all the iCal events in the
Calendar
.
- getEvents(String) - Method in class trashday.model.Calendar
-
Get all the iCal events in the
Calendar
for the
given pickup name.
- getHour() - Method in class trashday.model.TimeOfWeek
-
Deprecated.
Getter for the Time Of Day in terms of hour of the day.
- getIcalDateTime(LocalDateTime) - Method in class trashday.model.CalendarEvent
-
- getIntentLog() - Method in class trashday.storage.DynamoItem
-
Get the schedule attribute.
- getIntentLog() - Method in class trashday.storage.SessionDao
-
- getIntentLogUpdated() - Method in class trashday.storage.SessionDao
-
Load the session attribute that tracks if the intent log has been
updated and return true/false.
- getLocalDateTime(Date) - Method in class trashday.model.CalendarEvent
-
- getLocalDateTime(Date, TimeZone) - Static method in class trashday.model.DateTimeUtils
-
- getLog() - Method in class trashday.model.IntentLog
-
Basic getter for the underlying log data.
- getMinute() - Method in class trashday.model.TimeOfWeek
-
Deprecated.
Getter for the Time Of Day in terms of minute of the hour.
- getMinuteOfDay(LocalDateTime) - Static method in class trashday.model.DateTimeUtils
-
- getMinuteOfDay() - Method in class trashday.model.TimeOfWeek
-
Deprecated.
Getter for the Time Of Day in terms of minutes past
midnight.
- getMinuteOfWeek() - Method in class trashday.model.TimeOfWeek
-
Deprecated.
Getter for the Time Of Day in terms of minutes past
midnight on the first day of the week.
- getMinutesUntilNext(LocalDateTime) - Method in class trashday.model.TimeOfWeek
-
Deprecated.
Computes the number of minutes from a given datetime
until this Time Of Week will occur again.
- getMissingDataSpeech() - Method in class trashday.ui.requests.SlotGroup
-
Deprecated.
- getMisunderstoodSlotSpeech() - Method in class trashday.ui.requests.SlotGroup
-
Deprecated.
- getName() - Method in class trashday.model.CalendarEvent
-
- getName() - Method in interface trashday.ui.requests.Slot
-
Getter for slot name that is used in VUI Intent Schema / Sample Utterances.
- getName() - Method in class trashday.ui.requests.SlotDayOfMonth
-
Getter for slot name that is used in VUI Intent Schema / Sample Utterances.
- getName() - Method in class trashday.ui.requests.SlotDayOfWeek
-
Getter for slot name that is used in VUI Intent Schema / Sample Utterances.
- getName() - Method in class trashday.ui.requests.SlotNextOrThis
-
Deprecated.
Getter for slot name that is used in VUI Intent Schema / Sample Utterances.
- getName() - Method in class trashday.ui.requests.SlotNthOfMonth
-
Getter for slot name that is used in VUI Intent Schema / Sample Utterances.
- getName() - Method in class trashday.ui.requests.SlotPickupName
-
Getter for slot name that is used in VUI Intent Schema / Sample Utterances.
- getName() - Method in class trashday.ui.requests.SlotTimeOfDay
-
Getter for slot name that is used in VUI Intent Schema / Sample Utterances.
- getName() - Method in class trashday.ui.requests.SlotTimeZone
-
Getter for slot name that is used in VUI Intent Schema / Sample Utterances.
- getName() - Method in class trashday.ui.requests.SlotWeekOfMonth
-
Getter for slot name that is used in VUI Intent Schema / Sample Utterances.
- getNextOccurrence(LocalDateTime) - Method in class trashday.model.CalendarEvent
-
Find the first time this pickup occurs after the given
LocalDateTime
.
- getNextOrSameDayOfMonth(LocalDateTime, Integer, LocalTime) - Static method in class trashday.model.DateTimeUtils
-
Find the time a given day-of-month occurs.
- getNextOrSameWeekdayOfMonth(LocalDateTime, DayOfWeek, Integer, LocalTime) - Static method in class trashday.model.DateTimeUtils
-
Find the time a given weekday-of-month occurs.
- getNextPickupTime(LocalDateTime) - Method in class trashday.model.TimeOfWeek
-
Deprecated.
Computes the next date/time this Time Of Week will
occur after the given date/time.
- getOverallHelpCardSent() - Method in class trashday.storage.SessionDao
-
Load the session attribute that tracks if the overall help card has
been sent to the user during this session.
- getPickupCount() - Method in class trashday.model.NextPickups
-
Get the number of pickups that have been calculated.
- getPickupNames() - Method in class trashday.model.Schedule
-
Deprecated.
Getter for an order list of pickup names.
- getPickups() - Method in class trashday.model.NextPickups
-
Get the actual new pickup times.
- getPickupSchedule() - Method in class trashday.model.Schedule
-
Deprecated.
Get entire pickupSchedule.
- getPickupSchedule(String) - Method in class trashday.model.Schedule
-
Deprecated.
Gets a
SortedSet
of the
pickup times for a specific pickup name.
- getProperties() - Method in class trashday.model.CalendarEvent
-
- getProperties(String) - Method in class trashday.model.CalendarEvent
-
Get the iCal properties for this
CalendarEvent
that match
the given property name.
- getRecurrences() - Method in class trashday.model.CalendarEvent
-
- getRecurrencesPrintable(LocalDateTime) - Method in class trashday.model.CalendarEvent
-
Deprecated.
- getRecurrencesVerbal(LocalDateTime) - Method in class trashday.model.CalendarEvent
-
Deprecated.
- getRequestLocalDateTime(LaunchRequest, TimeZone) - Method in class trashday.TrashDayManager
-
- getRequestLocalDateTime(IntentRequest, TimeZone) - Method in class trashday.TrashDayManager
-
- getRRules() - Method in class trashday.model.CalendarEvent
-
- getSchedule() - Method in class trashday.storage.DynamoItem
-
Deprecated.
- getScheduleConfigInProgress() - Method in class trashday.storage.SessionDao
-
Load the session attribute that tracks if we are currently in a conversation
with the user about configuring the schedule.
- getSlot() - Method in interface trashday.ui.requests.Slot
-
Getter for the actual
Slot
from the Alexa request.
- getSlot() - Method in class trashday.ui.requests.SlotDayOfMonth
-
Getter for the actual
Slot
from the Alexa request.
- getSlot() - Method in class trashday.ui.requests.SlotDayOfWeek
-
Getter for the actual
Slot
from the Alexa request.
- getSlot() - Method in class trashday.ui.requests.SlotNextOrThis
-
Deprecated.
Getter for the actual
Slot
from the Alexa request.
- getSlot() - Method in class trashday.ui.requests.SlotNthOfMonth
-
Getter for the actual
Slot
from the Alexa request.
- getSlot() - Method in class trashday.ui.requests.SlotPickupName
-
Getter for the actual
Slot
from the Alexa request.
- getSlot() - Method in class trashday.ui.requests.SlotTimeOfDay
-
Getter for the actual
Slot
from the Alexa request.
- getSlot() - Method in class trashday.ui.requests.SlotTimeZone
-
Getter for the actual
Slot
from the Alexa request.
- getSlot() - Method in class trashday.ui.requests.SlotWeekOfMonth
-
Getter for the actual
Slot
from the Alexa request.
- getStartIcalDate() - Method in class trashday.model.CalendarEvent
-
Get event's start date/time.
- getStartingPoint() - Method in class trashday.model.NextPickups
-
Get the starting point for when these next pickups were calculated.
- getStartLocalDateTime() - Method in class trashday.model.CalendarEvent
-
Get event's start date/time.
- getTimeOfDay() - Method in class trashday.model.TimeOfWeek
-
Deprecated.
Getter for the Time Of Day component of this weekly time.
- getTimeZone() - Method in class trashday.storage.DynamoItem
-
Get the timeZone attribute.
- getTimeZone() - Method in class trashday.storage.SessionDao
-
- getUserId() - Method in class trashday.storage.SessionDao
-
Get the user id from the current
Session
.
- getVEvent() - Method in class trashday.model.CalendarEvent
-
- getWeekDay(DayOfWeek, Integer) - Static method in class trashday.model.DateTimeUtils
-
Convert from Java 8
DayOfWeek
with a given week-of-month offset into the ical4j
WeekDay
.
- handleAddFollowingBiWeeklyPickupRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user adds a biweekly pickup time into the schedule.
- handleAddMonthlyLastDayPickupRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user adds a last-day-of-month monthly pickup time into the schedule.
- handleAddMonthlyLastNDayPickupRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user adds a last-Nth-day-of-month monthly pickup time into the schedule.
- handleAddMonthlyLastNWeekdayPickupRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user adds a pickup on the Nth-to-last weekday of the month into the schedule.
- handleAddMonthlyPickupRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user adds a monthly pickup time into the schedule.
- handleAddMonthlyWeekdayPickupRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user adds a pickup on the Nth weekday of the month into the schedule.
- handleAddPickupRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user adds a (weekly) pickup time into the schedule.
- handleAddThisBiWeeklyPickupRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user adds a biweekly pickup time into the schedule.
- handleAddWeeklyPickupRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user adds a weekly pickup time into the schedule.
- handleDeleteBiWeeklyPickupRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user deletes a biweekly pickup time from the schedule.
- handleDeleteEntirePickupRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user deletes an entire pickup name from the schedule.
- handleDeleteEntireScheduleRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user deletes the entire schedule.
- handleDeleteMonthlyLastDayPickupRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user deletes a monthly pickup time from the schedule.
- handleDeleteMonthlyLastNDayPickupRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user deletes a monthly pickup time from the schedule.
- handleDeleteMonthlyLastNWeekdayPickupRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user deletes a Nth to last weekday-of-monthly pickup time from the schedule.
- handleDeleteMonthlyPickupRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user deletes a monthly pickup time from the schedule.
- handleDeleteMonthlyWeekdayPickupRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user deletes a weekday-of-monthly pickup time from the schedule.
- handleDeletePickupRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user deletes a (weekly) pickup time from the schedule.
- handleDeleteWeeklyPickupRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user deletes a weekly pickup time from the schedule.
- handleExitRequest(Session) - Method in class trashday.TrashDayManager
-
Respond when the user says "Stop" or "Cancel"
- handleHelpRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user says "Help." Give verbal and card-based help for how to
use the Trash Day application and commands the user can give to Trash Day.
- handleLaunchRequest(LaunchRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user says "Open Trash Day"
- handleNoRequest(Session) - Method in class trashday.TrashDayManager
-
Respond when the user gives a No.
- handleSetTimeZoneRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user tries to set the time zone.
- handleTellNextPickupRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user asks for the next pickup time for one or
all of the scheduled pickups.
- handleTellScheduleRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user asks to hear the entire pickup schedule.
- handleUpdateScheduleRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user says "Change Schedule"
- handleYesRequest(IntentRequest, Session) - Method in class trashday.TrashDayManager
-
Respond when the user gives a Yes or No.
- has(CalendarEvent) - Method in class trashday.model.Calendar
-
Test if this event already exists in the calendar.
- hasRrules() - Method in class trashday.model.CalendarEvent
-
Check if this event has existing recurrence rules.
- readUserData(SessionDao) - Method in class trashday.storage.DynamoDao
-
Reads user data from Dynamo DB and stores in the
SessionDao
.
- reprompt(String) - Static method in class trashday.ui.responses.ResponseHelpers
-
Create a new
Reprompt
object and
set its text value.
- reprompt(Phrase) - Static method in class trashday.ui.responses.ResponseHelpers
-
Create a new
Reprompt
object and
set its text value based one of the hard-coded phrases in
Phrase
.
- requiredValidationData - Variable in class trashday.ui.requests.SlotGroup
-
Deprecated.
- respondEntirePickupDelete(SessionDao, boolean, String, boolean) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user successfully deletes an entire pickup from the schedule.
- respondEntirePickupDeleteInvalidName(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to delete an entire pickup from the schedule but gave
invalid data for required fields like pickup name.
- respondEntirePickupDeleteMissingName(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to delete entire pickup from the schedule but is
missing essential data like pickup name.
- respondGeneralInvalidData(SessionDao, boolean, List<String>, Phrase, Phrase) - Static method in class trashday.ui.responses.ResponseHelpers
-
- respondGeneralMissingData(SessionDao, boolean, List<String>, Phrase, Phrase) - Static method in class trashday.ui.responses.ResponseHelpers
-
- respondGeneralPickupNotAdded(SessionDao, boolean, String) - Static method in class trashday.ui.responses.ResponseHelpers
-
- respondGeneralScheduleChange(SessionDao, boolean, String) - Static method in class trashday.ui.responses.ResponseHelpers
-
- respondHelpInitial(SessionDao, boolean) - Static method in class trashday.ui.responses.ResponsesHelp
-
Give help information before a user has set time zone or any schedule information.
- respondHelpNoSchedule(SessionDao, boolean) - Static method in class trashday.ui.responses.ResponsesHelp
-
Give help information after a user has set time zone but before the user has
set any schedule information.
- respondHelpOtherTimeZone(SessionDao, boolean) - Static method in class trashday.ui.responses.ResponsesHelp
-
Give help information when a user has requested "set time zone other"
- respondHelpWithSchedule(SessionDao, boolean) - Static method in class trashday.ui.responses.ResponsesHelp
-
Our standard help response is a verbal and
Card
response text.
- respondPickupAddBiWeeklyInvalidData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to add a pickup time to the schedule but gave
invalid data for required fields like pickup name, day of week,
or time of day.
- respondPickupAddBiWeeklyMissingData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to add a pickup time to the schedule but is
missing essential data like pickup name, day of week,
or time of day.
- respondPickupAddBiWeeklySingle(SessionDao, boolean, String, Boolean, DayOfWeek, LocalTime) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user successfully adds a pickup time to the schedule.
- respondPickupAddInvalidData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to add a pickup time to the schedule but gave
invalid data for required fields like pickup name, day of week,
or time of day.
- respondPickupAddMissingData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to add a pickup time to the schedule but is
missing essential data like pickup name, day of week,
or time of day.
- respondPickupAddMonthlyInvalidData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to add a pickup time to the schedule but gave
invalid data for required fields like pickup name, day of week,
or time of day.
- respondPickupAddMonthlyLastDayInvalidData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to add a pickup time to the schedule but gave
invalid data for required fields like pickup name, day of week,
or time of day.
- respondPickupAddMonthlyLastDayMissingData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to add a pickup time to the schedule but is
missing essential data like pickup name, day of week,
or time of day.
- respondPickupAddMonthlyLastDaySingle(SessionDao, boolean, String, Integer, LocalTime) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user successfully adds a pickup time to the schedule.
- respondPickupAddMonthlyLastNDayInvalidData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to add a pickup time to the schedule but gave
invalid data for required fields like pickup name, day of week,
or time of day.
- respondPickupAddMonthlyLastNDayMissingData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to add a pickup time to the schedule but is
missing essential data like pickup name, day of week,
or time of day.
- respondPickupAddMonthlyLastNDaySingle(SessionDao, boolean, String, Integer, LocalTime) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user successfully adds a pickup time to the schedule.
- respondPickupAddMonthlyLastNWeekdayInvalidData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to add a pickup time to the schedule but gave
invalid data for required fields like pickup name, week of month, day of week,
or time of day.
- respondPickupAddMonthlyLastNWeekdayMissingData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to add a pickup time to the schedule but is
missing essential data like pickup name, week of month, day of week,
or time of day.
- respondPickupAddMonthlyLastNWeekdaySingle(SessionDao, boolean, String, Integer, DayOfWeek, LocalTime) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user successfully adds a pickup time to the schedule.
- respondPickupAddMonthlyMissingData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to add a pickup time to the schedule but is
missing essential data like pickup name, day of week,
or time of day.
- respondPickupAddMonthlySingle(SessionDao, boolean, String, Integer, LocalTime) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user successfully adds a pickup time to the schedule.
- respondPickupAddMonthlyWeekdayInvalidData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to add a pickup time to the schedule but gave
invalid data for required fields like pickup name, week of month, day of week,
or time of day.
- respondPickupAddMonthlyWeekdayMissingData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to add a pickup time to the schedule but is
missing essential data like pickup name, week of month, day of week,
or time of day.
- respondPickupAddMonthlyWeekdaySingle(SessionDao, boolean, String, Integer, DayOfWeek, LocalTime) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user successfully adds a pickup time to the schedule.
- respondPickupAddSingle(SessionDao, boolean, String, DayOfWeek, LocalTime) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user successfully adds a pickup time to the schedule.
- respondPickupAddWeeklyInvalidData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to add a pickup time to the schedule but gave
invalid data for required fields like pickup name, day of week,
or time of day.
- respondPickupAddWeeklyMissingData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to add a pickup time to the schedule but is
missing essential data like pickup name, day of week,
or time of day.
- respondPickupAddWeeklySingle(SessionDao, boolean, String, DayOfWeek, LocalTime) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user successfully adds a pickup time to the schedule.
- respondPickupDeleteBiWeeklyInvalidData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to delete a pickup time from the schedule but gave
invalid data for required fields like pickup name, day of week,
or time of day.
- respondPickupDeleteBiWeeklyMissingData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to delete a pickup time from the schedule but is
missing essential data like pickup name, day of week,
or time of day.
- respondPickupDeleteBiWeeklySingle(SessionDao, boolean, String, DayOfWeek, LocalTime, boolean) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user successfully deletes a pickup time from the schedule.
- respondPickupDeleteInvalidData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to delete a pickup time from the schedule but gave
invalid data for required fields like pickup name, day of week,
or time of day.
- respondPickupDeleteMissingData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to delete a pickup time from the schedule but is
missing essential data like pickup name, day of week,
or time of day.
- respondPickupDeleteMonthlyInvalidData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to delete a pickup time from the schedule but gave
invalid data for required fields like pickup name, day of week,
or time of day.
- respondPickupDeleteMonthlyLastDayInvalidData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to delete a pickup time from the schedule but gave
invalid data for required fields like pickup name, day of week,
or time of day.
- respondPickupDeleteMonthlyLastDayMissingData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to delete a pickup time from the schedule but is
missing essential data like pickup name, day of week,
or time of day.
- respondPickupDeleteMonthlyLastDaySingle(SessionDao, boolean, String, Integer, LocalTime, boolean) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user successfully deletes a pickup time from the schedule.
- respondPickupDeleteMonthlyLastNDayInvalidData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to delete a pickup time from the schedule but gave
invalid data for required fields like pickup name, day of week,
or time of day.
- respondPickupDeleteMonthlyLastNDayMissingData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to delete a pickup time from the schedule but is
missing essential data like pickup name, day of week,
or time of day.
- respondPickupDeleteMonthlyLastNDaySingle(SessionDao, boolean, String, Integer, LocalTime, boolean) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user successfully deletes a pickup time from the schedule.
- respondPickupDeleteMonthlyLastNWeekdayInvalidData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to delete a pickup time from the schedule but gave
invalid data for required fields like pickup name, week of month, day of week,
or time of day.
- respondPickupDeleteMonthlyLastNWeekdayMissingData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to delete a pickup time from the schedule but is
missing essential data like pickup name, week of month, day of week,
or time of day.
- respondPickupDeleteMonthlyLastNWeekdaySingle(SessionDao, boolean, String, Integer, DayOfWeek, LocalTime, boolean) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user successfully deletes a pickup time from the schedule.
- respondPickupDeleteMonthlyMissingData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to delete a pickup time from the schedule but is
missing essential data like pickup name, day of week,
or time of day.
- respondPickupDeleteMonthlySingle(SessionDao, boolean, String, Integer, LocalTime, boolean) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user successfully deletes a pickup time from the schedule.
- respondPickupDeleteMonthlyWeekdayInvalidData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to delete a pickup time from the schedule but gave
invalid data for required fields like pickup name, week of month, day of week,
or time of day.
- respondPickupDeleteMonthlyWeekdayMissingData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to delete a pickup time from the schedule but is
missing essential data like pickup name, week of month, day of week,
or time of day.
- respondPickupDeleteMonthlyWeekdaySingle(SessionDao, boolean, String, Integer, DayOfWeek, LocalTime, boolean) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user successfully deletes a pickup time from the schedule.
- respondPickupDeleteSingle(SessionDao, boolean, String, DayOfWeek, LocalTime, boolean) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user successfully deletes a pickup time from the schedule.
- respondPickupDeleteWeeklyInvalidData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to delete a pickup time from the schedule but gave
invalid data for required fields like pickup name, day of week,
or time of day.
- respondPickupDeleteWeeklyMissingData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user tries to delete a pickup time from the schedule but is
missing essential data like pickup name, day of week,
or time of day.
- respondPickupDeleteWeeklySingle(SessionDao, boolean, String, DayOfWeek, LocalTime, boolean) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user successfully deletes a pickup time from the schedule.
- respondScheduleDeleteAllRequested(SessionDao, boolean, boolean) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond with an "Are you sure?" when user requests to
delete the entire schedule.
- respondScheduleDeleted(SessionDao, boolean, boolean) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when the user has confirmed to delete the entire schedule.
- respondSetTimeZoneInvalidData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user just tried to set time zone, but the time zone spoken was
not understood.
- respondSetTimeZoneMissingData(SessionDao, boolean, List<String>) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user just tried to set time zone, but they did not give
data required.
- respondTimeZoneUpdatedScheduleExists(SessionDao, boolean, TimeZone) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user just successfully updated the time zone and a schedule is
already configured.
- respondTimeZoneUpdatedScheduleMissing(SessionDao, boolean, TimeZone) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user just successfully updated the time zone, but there is no
schedule configured.
- ResponseHelpers - Class in trashday.ui.responses
-
Provides some "helper" functions that make the code more readable for
all child classes.
- ResponseHelpers() - Constructor for class trashday.ui.responses.ResponseHelpers
-
- ResponsesExit - Class in trashday.ui.responses
-
Organizes all the voice responses for Alexa "stop" and "exit" intents.
- ResponsesExit() - Constructor for class trashday.ui.responses.ResponsesExit
-
- ResponsesHelp - Class in trashday.ui.responses
-
Organizes all the voice responses for Alexa "help" intent.
- ResponsesHelp() - Constructor for class trashday.ui.responses.ResponsesHelp
-
- ResponsesSchedule - Class in trashday.ui.responses
-
Organizes all the voice responses when talking about
the Trash Day Schedule itself.
- ResponsesSchedule() - Constructor for class trashday.ui.responses.ResponsesSchedule
-
- ResponsesYesNo - Class in trashday.ui.responses
-
Organizes all the voice responses for Alexa "Yes" and "No"
intents.
- ResponsesYesNo() - Constructor for class trashday.ui.responses.ResponsesYesNo
-
- saveCompleteItem(DynamoItem) - Method in class trashday.storage.DynamoItemPersistence
-
Stores a complete (does not skip null attributes) item to DynamoDB.
- saveItem(DynamoItem) - Method in class trashday.storage.DynamoItemPersistence
-
Stores an item (skipping null item attributes) to DynamoDB.
- saveOnlyIntentLog(DynamoItem) - Method in class trashday.storage.DynamoItemPersistence
-
Stores the *only* intent log component of an item to DynamoDB.
- sched - Variable in class trashday.model.NextPickups
-
Deprecated.
- Schedule - Class in trashday.model
-
Deprecated.
- Schedule() - Constructor for class trashday.model.Schedule
-
Deprecated.
Create an empty schedule.
- Schedule(String) - Constructor for class trashday.model.Schedule
-
Deprecated.
Create a schedule from a given JSON.
- ScheduleConverter() - Constructor for class trashday.storage.DynamoItem.ScheduleConverter
-
- SESSION_ATTR_CALENDAR - Static variable in class trashday.storage.SessionDao
-
- SESSION_ATTR_CONFIRM_DESC - Static variable in class trashday.storage.SessionDao
-
Session
attribute key to store user text description of actions that require a Yes/No confirmation
- SESSION_ATTR_CONFIRM_INTENT - Static variable in class trashday.storage.SessionDao
-
Session
attribute key to store intent names that require a Yes/No confirmation
- SESSION_ATTR_INTENT_LOG - Static variable in class trashday.storage.SessionDao
-
Session
attribute key to store a log of intents performed
- SESSION_ATTR_INTENT_LOG_UPDATED - Static variable in class trashday.storage.SessionDao
-
Session
attribute key to store a flag when intent log is updated so we know to store it later to Dynamo DB
- SESSION_ATTR_OVERALL_HELP_CARD_SENT - Static variable in class trashday.storage.SessionDao
-
Session
attribute key to store if overall help card is already sent in this session.
- SESSION_ATTR_SCHEDULE_HELP_CARD_SENT - Static variable in class trashday.storage.SessionDao
-
Session
attribute key to store if Schedule help card is already sent in this session.
- SESSION_ATTR_SCHEDULE_IN_PROGRESS - Static variable in class trashday.storage.SessionDao
-
Session
attribute key to store user is currently configuring their
Schedule
.
- SESSION_ATTR_TIMEZONE - Static variable in class trashday.storage.SessionDao
-
- SESSION_ATTR_TIMEZONE_HELP_CARD_SENT - Static variable in class trashday.storage.SessionDao
-
Session
attribute key to store if Time Zone help card is already sent in this session.
- SessionDao - Class in trashday.storage
-
Trash Day data access object for Alexa Session.
- SessionDao(Session) - Constructor for class trashday.storage.SessionDao
-
Create data access object for a given
Session
- setCalendar(Calendar) - Method in class trashday.storage.DynamoItem
-
Set the calendar attribute.
- setCalendar(Calendar) - Method in class trashday.storage.SessionDao
-
- setConfirmationDescription(String) - Method in class trashday.storage.SessionDao
-
Set session attribute that contains a description of the confirmation action
currently in progress.
- setConfirmationIntent(String) - Method in class trashday.storage.SessionDao
-
Set session attribute that contains the intent name of the confirmation action
currently in progress.
- setCustomerId(String) - Method in class trashday.storage.DynamoItem
-
Set the customerId attribute.
- setDayOfWeek(DayOfWeek) - Method in class trashday.model.TimeOfWeek
-
Deprecated.
Setter for the Day Of Week portion of this weekly time.
- setIntentLog(IntentLog) - Method in class trashday.storage.DynamoItem
-
Set the intentLog attribute.
- setIntentLog(IntentLog) - Method in class trashday.storage.SessionDao
-
- setOverallHelpCardSent() - Method in class trashday.storage.SessionDao
-
Set the session attribute that tracks if the overall help card has
been sent to the user during this session.
- setSchedule(Schedule) - Method in class trashday.storage.DynamoItem
-
Deprecated.
- setScheduleConfigInProgress() - Method in class trashday.storage.SessionDao
-
Set the session attribute that tracks if we are currently in a conversation
with the user about configuring the schedule.
- setSessionAttributeTrue(String) - Method in class trashday.storage.SessionDao
-
- setTimeOfDay(int, int) - Method in class trashday.model.TimeOfWeek
-
Deprecated.
Setter for the Time Of Day portion of this weekly time.
- setTimeZone(TimeZone) - Method in class trashday.storage.DynamoItem
-
Set the timeZone attribute.
- setTimeZone(TimeZone) - Method in class trashday.storage.SessionDao
-
- setTimeZoneHelpCardSent() - Method in class trashday.storage.SessionDao
-
Set the session attribute that tracks if the time zone help card has
been sent to the user during this session.
- Slot - Interface in trashday.ui.requests
-
- SlotDayOfMonth - Class in trashday.ui.requests
-
Handle Intent Slot for Day Of Month information from user.
- SlotDayOfMonth(Intent) - Constructor for class trashday.ui.requests.SlotDayOfMonth
-
Handle parsing of a request slot intended to store Time Zone information
in user requests.
- SlotDayOfWeek - Class in trashday.ui.requests
-
Handle Intent Slot for Day Of Week information from user.
- SlotDayOfWeek(Intent) - Constructor for class trashday.ui.requests.SlotDayOfWeek
-
Handle parsing of a request slot intended to store Day Of Week information
in user requests.
- SlotGroup - Class in trashday.ui.requests
-
Deprecated.
- SlotGroup(List<String>, Map<String, Object>) - Constructor for class trashday.ui.requests.SlotGroup
-
Deprecated.
- slotNamesRequired - Variable in class trashday.ui.requests.SlotGroup
-
Deprecated.
- SlotNextOrThis - Class in trashday.ui.requests
-
Deprecated.
- SlotNextOrThis(Intent) - Constructor for class trashday.ui.requests.SlotNextOrThis
-
Deprecated.
Handle parsing of a request slot intended to store Pickup Name information
in user requests.
- SlotNthOfMonth - Class in trashday.ui.requests
-
Handle Intent Slot for Nth Day Of Month information from user.
- SlotNthOfMonth(Intent) - Constructor for class trashday.ui.requests.SlotNthOfMonth
-
Handle parsing of a request slot intended to store Time Zone information
in user requests.
- SlotPickupName - Class in trashday.ui.requests
-
Handle Intent Slot for Pickup Name information from user.
- SlotPickupName(Intent) - Constructor for class trashday.ui.requests.SlotPickupName
-
Handle parsing of a request slot intended to store Pickup Name information
in user requests.
- SlotTimeOfDay - Class in trashday.ui.requests
-
Handle Intent Slot for Time Of Day information from user.
- SlotTimeOfDay(Intent) - Constructor for class trashday.ui.requests.SlotTimeOfDay
-
Handle parsing of a request slot intended to store Time Of Day information
in user requests.
- SlotTimeZone - Class in trashday.ui.requests
-
Handle Intent Slot for Time Zone information from user.
- SlotTimeZone(Intent) - Constructor for class trashday.ui.requests.SlotTimeZone
-
Handle parsing of a request slot intended to store Time Zone information
in user requests.
- SlotWeekOfMonth - Class in trashday.ui.requests
-
Handle Intent Slot for Nth Week Of Month information from user.
- SlotWeekOfMonth(Intent) - Constructor for class trashday.ui.requests.SlotWeekOfMonth
-
Handle parsing of a request slot intended to store Week of Month information
in user requests.
- tellAllNextPickups(SessionDao, boolean, Date, TimeZone, NextPickups) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user asks to hear all the next pickup(s).
- tellCancellingAction(String) - Static method in class trashday.ui.responses.ResponsesYesNo
-
When we get a No from the user that is canceling an
action, we use this standard, verbal "Cancelled" from Alexa
without any associated
Card
.
- tellOneNextPickup(SessionDao, boolean, Date, TimeZone, NextPickups, String) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user asks to hear the next pickup(s) for a given pickup name.
- tellSchedule(SessionDao, boolean, LocalDateTime, Calendar) - Static method in class trashday.ui.responses.ResponsesSchedule
-
Respond when user asks to hear the schedule.
- tellYesNoMisunderstood() - Static method in class trashday.ui.responses.ResponsesYesNo
-
When we get a Yes/No from the user but don't have
any idea why, respond with a verbal "Sorry" from Alexa
without any associated
Card
.
- tellYesNoProblem(String) - Static method in class trashday.ui.responses.ResponsesYesNo
-
When we get an expected Yes/No from the user but we've
somehow lost track of how the application should respond
due to a code problem, then respond with a verbal "Oops" from Alexa
without any associated
Card
.
- TimeOfWeek - Class in trashday.model
-
Deprecated.
- TimeOfWeek(DayOfWeek, LocalTime) - Constructor for class trashday.model.TimeOfWeek
-
Deprecated.
Avoid using standard Jackson deserialization and replace
it with this method that truncates pickup times to the
minute.
- TimeOfWeek() - Constructor for class trashday.model.TimeOfWeek
-
Deprecated.
Create object with defaults of today at this time of day.
- TimeOfWeek(DayOfWeek, int, int) - Constructor for class trashday.model.TimeOfWeek
-
Deprecated.
Create object based on given Day of Week and Time Of Day information.
- TimeOfWeek(int, int, int) - Constructor for class trashday.model.TimeOfWeek
-
Deprecated.
Create object based on given Day of Week and Time Of Day information.
- ToCurrentIntentLog - Class in trashday.model
-
Handles converting from old versions of the
IntentLog
class during deserialization.
- ToCurrentIntentLog() - Constructor for class trashday.model.ToCurrentIntentLog
-
- ToCurrentSchedule - Class in trashday.model
-
Deprecated.
- ToCurrentSchedule() - Constructor for class trashday.model.ToCurrentSchedule
-
Deprecated.
- ToCurrentTimeOfWeek - Class in trashday.model
-
Deprecated.
- ToCurrentTimeOfWeek() - Constructor for class trashday.model.ToCurrentTimeOfWeek
-
Deprecated.
- toJson() - Method in class trashday.model.IntentLog
-
Create a JSON version of this object.
- toJson() - Method in class trashday.model.Schedule
-
Deprecated.
Create a JSON version of this object.
- toString() - Method in class trashday.model.IntentLog
-
Deprecated.
- toString() - Method in class trashday.model.NextPickups
-
Deprecated.
- toString() - Method in enum trashday.ui.responses.Phrase
-
- toStringPrintable(LocalDateTime) - Method in class trashday.model.Calendar
-
Deprecated.
- toStringPrintable() - Method in class trashday.model.IntentLog
-
Generate a printed representation of the Intent Log.
- toStringPrintable() - Method in class trashday.model.NextPickups
-
Deprecated.
- toStringPrintable() - Method in class trashday.model.Schedule
-
Deprecated.
Create a printable version of the Schedule.
- toStringPrintable() - Method in class trashday.model.TimeOfWeek
-
Deprecated.
Create a printable version of the TimeOfWeek.
- toStringRFC5545() - Method in class trashday.model.Calendar
-
Generate a
String
form of the
Calendar
that is suitable for serialization.
- toStringVerbal(LocalDateTime) - Method in class trashday.model.Calendar
-
Deprecated.
- toStringVerbal() - Method in class trashday.model.NextPickups
-
Deprecated.
- toStringVerbal() - Method in class trashday.model.Schedule
-
Deprecated.
Create a version of the Schedule suitable for Alexa to say.
- toStringVerbal() - Method in class trashday.model.TimeOfWeek
-
Deprecated.
Create a version of the TimeOfWeek suitable for Alexa to say.
- translateFromAlexaSpeak(String) - Static method in class trashday.ui.requests.SlotTimeZone
-
Since time zone information contains abbreviations, special characters,
numbers and computer-specific terms, we use this function to accept speech
from Alexa and try to convert it to a good java time zone name.
- translateToAlexaSpeak(String) - Static method in class trashday.ui.requests.SlotTimeZone
-
Translate a single java time zone ID to a textual representation suitable
for someone to say to Alexa.
- translateToAlexaSpeakSingleForm(String) - Static method in class trashday.ui.requests.SlotTimeZone
-
From a given time zone name, generates a textual representation suitable
for someone to say to Alexa.
- trashday - package trashday
-
Provides the core application logic of the Alexa skill
called "Trash Day".
- trashday.model - package trashday.model
-
Implements the
Calendar
object that stores the user's
regular pickup schedule.
- trashday.storage - package trashday.storage
-
Provides the classes necessary to store user information in the Alexa
session and Amazon Dynamo DB.
- trashday.ui - package trashday.ui
-
Organizes a variety of functions to handle the Alexa voice and card user
interface.
- trashday.ui.requests - package trashday.ui.requests
-
Organizes all the functions that interpret voice requests from
the user.
- trashday.ui.responses - package trashday.ui.responses
-
Organizes all the functions that provide voice responses to
the user.
- trashday.ui.speechAssets - package trashday.ui.speechAssets
-
Provides the intent schema and sample utterances required
to implement the Alexa voice user interface.
- trashday.ui.speechAssets.customSlotTypes - package trashday.ui.speechAssets.customSlotTypes
-
Provides expected words for the Custom Slot Types in the
voice user interface.
- TrashDayManager - Class in trashday
-
Handles the core application logic.
- TrashDayManager(AmazonDynamoDBClient, String) - Constructor for class trashday.TrashDayManager
-
Create manager object to handle mapping user intents to application
actions.
- TrashDaySpeechlet - Class in trashday
-
Handles routing session requests to the appropriate
TrashDayManager
methods.
- TrashDaySpeechlet() - Constructor for class trashday.TrashDaySpeechlet
-
Handle requests using a new connection to the Amazon Dynamo DB
cloud.
- TrashDaySpeechlet(AmazonDynamoDBClient, String) - Constructor for class trashday.TrashDaySpeechlet
-
Handle requests using a specified Dynamo DB and, optionally, a given
table for storing user data.
- TrashDaySpeechletRequestStreamHandler - Class in trashday
-
Ensure the Alexa request is intended for our service and pass it on
to our
TrashDaySpeechlet
.
- TrashDaySpeechletRequestStreamHandler() - Constructor for class trashday.TrashDaySpeechletRequestStreamHandler
-
Handle requests using the Amazon Dynamo DB cloud.
- TrashDaySpeechletRequestStreamHandler(AmazonDynamoDBClient, String) - Constructor for class trashday.TrashDaySpeechletRequestStreamHandler
-
Handle requests using a specified Dynamo DB.