Package homeworks.hw1
Class MyStack<T>
- java.lang.Object
-
- homeworks.hw1.MyStack<T>
-
- All Implemented Interfaces:
java.lang.Iterable<T>
public class MyStack<T> extends java.lang.Object implements java.lang.Iterable<T>
MyStack
is a simple class that implements a stack abstraction. To help debug the class and demonstrate how fail-fastIterator
s should work, this class is madeIterable
.MyStack
instances are created with a maximum capacity which is provided at construction time. If pushes are made that would exceed this capacity, an instance ofStackOverflowError
is thrown.- Author:
- Jason Filippou and ***** YOUR NAME HERE! ****
- See Also:
StackOverflowError
-
-
Method Summary
Modifier and Type Method Description boolean
isEmpty()
Queriesthis
for emptiness.java.util.Iterator<T>
iterator()
Returns a smart pointer over elements of typeT
.T
peek()
Return the top element of the stack without removing it..T
pop()
Return and remove the top element of the stack.void
push(T element)
Adds an element to the top of the stack.int
size()
Returns the number of elements pushed, but not popped, inthis
.
-
-
-
Constructor Detail
-
MyStack
public MyStack(int maxCapacity, StackSize expectedSize) throws InvalidCapacityException
Creates an instance ofMyStack
with a provided maximum capacity.- Parameters:
maxCapacity
- The maximum number of elements we allow inthis
.expectedSize
- AStackSize
instance that describes the user expectation about the stack.- Throws:
InvalidCapacityException
- ifmaxCapacity
< 0
-
-
Method Detail
-
push
public void push(T element) throws java.lang.StackOverflowError
Adds an element to the top of the stack. For the underlying implementation, we use the "back" of the list as the "top" of the stack.- Parameters:
element
- The datum to push intothis
.- Throws:
java.lang.StackOverflowError
- If we attempt to push into a stack that is at capacity.
-
pop
public T pop()
Return and remove the top element of the stack.- Returns:
- The top element of the stack, simultaneously removing it.
-
peek
public T peek() throws java.util.EmptyStackException
Return the top element of the stack without removing it..- Returns:
- The top element of the stack, without removing it.
- Throws:
java.util.EmptyStackException
- ifthis
is empty.
-
isEmpty
public boolean isEmpty()
Queriesthis
for emptiness.- Returns:
true
iffthis
is empty,false
otherwise.
-
size
public int size()
Returns the number of elements pushed, but not popped, inthis
.- Returns:
- the number of elements stored in
this
.
-
iterator
public java.util.Iterator<T> iterator()
Returns a smart pointer over elements of typeT
. You should think about how you can implement thisIterator
to:- Access the elements in so-called proper order, which is fancy speak for " the order that the data structure implies by its semantics ". For a stack, proper order means LIFO, since when imagining a stack, we want the most recently pushed element to be accessed first, the second most recent one accessed second, etc. For a priority queue, proper order would mean from smaller to greater priority, with tie-breakers broken by insertion order (FIFO).
- Make it fail-fast. After you do this, you will probably also want to implement a
fail-safe
Iterator
so that you can answer your homework effectively. Can you see for yourself how complex the behavior and implementation of such aIterator
can be?
- Specified by:
iterator
in interfacejava.lang.Iterable<T>
- Returns:
- An
Iterator
instance. - See Also:
ConcurrentModificationException
,IllegalStateException
,NoSuchElementException
-
-


Stencil components are rendered using JSX, a popular, declarative template syntax. Each component has a render
function that returns the JSX content.
The example below uses a basic if-else statement to determine what to render.
render() {
if (this.name) {
return (

Hello, my name is {this.name}

);
} else {
return (

Hello, World

);
}
}
Go ahead and toggle the name
property on the my-first-component
element. Different content will be rendered conditionally.
Looping (for loops, while loops) works just like it does in javascript.
In the example below, we're going to assume the component has a local property called todos
which is a list of todo objects. We'll use the map function on the array to loop over each item in the map, and to convert it to something else - in this case JSX.
render() {
const todosHtml = this.todos.map((todo: any) => {
return (

{todo.taskName}

{todo.isCompleted}

);
});
return todosHtml;
}
Each item in the this.todos
list is looped over, and JSX
is returned for it. The array of JSX content is then returned.
Stencil uses native DOM events.
Here's an example of handling a button click. Note the use of the Arrow function.
...
export class MyComponent {
handleClick(event: UIEvent) {
alert('Received the button click!');
}
render() {
return (
<button onClick={ (event: UIEvent) => this.handleClick(event)}>Click Me!</button>
);
}
}
Here's another of listening to input change
. Note the use of the Arrow function.
...
export class MyComponent {
inputChanged(event: UIEvent) {
console.log('input changed: ', event.target.value);
}
render() {
return (
<input onChange={ (event: UIEvent) => this.inputChanged(event)}>
);
}
}
In the example above, there is only a single element, a

tag, rendered. Tags are nestable just like in standard HTML.
render() {
return (

Item #1

Item #2

Item #3

);
}
In the case where a component has multiple "top level" elements, the render
function must return an array. Note the comma in between the

elements.
render() {
return ([
// first top level element

Item #1

Item #2

Item #3

,
// second top level element, note the , above

... more html content ...

]);
}


Login to the MiniOne
User Name
Password
Login
[Go to Register]
User Name or Password invalid, please verify


Show Your Gtalk Presence on WordPress
I couldn’t find a plugin that showed my presence in a way that I liked so I threw together the following php script. It’s influenced by the Gtalk (Status) to WordPress (G2W) plugin by Aw Guo. It includes simplehtmldom, a very easy to use HTML DOM parser.
The first step is to get a Gtalk Chatback Badge. Edit the badge, making sure “Show your status message” is ticked. Copy the hashcode in the url of your badge. It’s the string after after ?tk
. Replace HASHCODE
in the following code with your hashcode.
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Add the following to the page where you want to show your status.
1
|
|


Toggle navigation
Log In
Sign Up
Make
learning fun!
Where your instructor knows the best way to make you understand.
Sign up for free
Or download the app:


State says Ohio jobless rate unchanged since September
by EndPlayCOLUMBUS, Ohio (AP) - Ohio's seasonally adjusted unemployment rate was unchanged from September to October.
State officials on Friday said the unemployment rate was 4.2% last month, the same as September. Ohio's unemployment rate stood at 4.6% in October 2018.
The national rate was 3.6% in October, up from last month, and down from 3.8% in October 2018.
The state Job and Family Services Department says Ohio's nonagricultural wage and salary employment decreased by 1,000 jobs from September to October.
The agency reports that losses in construction and manufacturing once again exceeded gains in mining and logging.
Manufacturing lost 2,300 jobs from September to October while the construction sector lost 1,000 jobs. Private sector service jobs declined by 800 jobs, while local and state government hiring was up.


about 200 Glorious Miles!
Use the controls in the upper left hand corner to zoom in and/or pan around (or you may click
and drag map to move around and double click on map to zoom in one level). Click on legs to see the elevation profile, leg
description, turn-by-turn directions, and more! Finally, use the leg and exchange links beneath the map to navigate to desired
locations quickly.
View Texas Independence Relay in a larger map
Links to Legs:
Links to Exchanges:


---
layout: single
title: "[Survey] Investigation Prioritization of Crimes Involving Digital Evidence"
date: '2013-11-22T17:30:00.000+09:00'
author: Joshua James
tags:
- Survey
- Crime
modified_time: '2013-11-22T17:30:05.538+09:00'
blogger_id: tag:blogger.com,1999:blog-2701259639305045003.single-5381255388567830076
blogger_orig_url: http://www.cybercrimetech.com/2013/11/survey-investigation-prioritization-of.html
---
The following survey is being conducted by Joshua James of the Digital Forensic Investigation Research Laboratory (DigitalFIRE) to assess public opinion on the investigation prioritization of crimes involving digital evidence.
This survey consists of 10 questions, which will take approximately 5 minutes to complete.
English version: http://goo.gl/qbpo77
Korean version: http://goo.gl/AKIhV1
Please share!


WITNESS LIST Business & Industry Committee (Subcommittee on Healthcare Technology) July 12, 2000-1:00P Interim Charge On: Cole, Ph.D., John F. (Self and Institute for Drug Development) Duncan, York (Self) Lee, Wen-Hwa (U.T. Health Science Center at San Antonio; Dept. of Molecular Medicine/Institute of Biotechnology)


Value you entered is
{{ control.errors.minlength.actualLength }} character(s) long,
it must be at least {{control.errors.minlength.requiredLength}} characters
Value you entered is
{{ control.errors.maxlength.actualLength }} character(s) long,
but it must be smaller than {{control.errors.maxlength.requiredLength}} characters


APP: CC BY
fukuno.jig.jp
(
src on GitHub
)
LIB:
WTFPL
luncheon/lch-color-wheel: A wheel-style color picker based on CIE L*C*h color space.


All rooms are antique furnished and include a private bathroom with deep claw foot tubs,replica old time flush toilets, and period sinks. Each room has free wifi, free breakfast, laundry service, cable T.V., telephone, freeparking and air conditioning.
Book A Room »Melody of Love
Known as the Honeymoon Room. This wonderful room features a double whirlpool bath nestled along Sioux Quartzite wall, a four-post queen-size bed, and mauve and blue decor.
Victorian Vista
This room is furnished with two antique beds, one of which is a beatiul sleigh bed.
Decorated in Victorian pink with rich red carpet. This room is handicap accessible.
|
|


Critically injured teenage girl 'threw herself on top of baby to save his life' during machete attack
A 13-year-old girl is in a critical condition after a machete attack at a house in Co. Fermanagh at the weekend.
A 41-year-old woman was also treated for stab wounds to her leg.
Police say a number of men armed with machetes broke into a house at Trasna Way in Lisnaskea at about 9.15pm on Saturday night and attacked the girl and the woman.
A baby was also at the scene but was unharmed.
No arrests have been made and police are treating the investigation as attempted murder
Speaking to ITV News, the baby's grandmother, Elizabeth Joyce, said the young girl tried to save his life.
She said: "They burst through the house, one attacker came to me attacking. I was screaming and kicking and fighting back. The other attacker went for the wee fella, but his auntie, who is in hospital in a very critical condition, she threw herself on top of the baby to save the baby's life."
PSNI Detective Sergeant Keith Monaghan said: “This must have been a terrifying ordeal for those involved and we are determined to find the men responsible. We have several lines of enquiry which we are progressing at this time but I would ask anyone with information or who noticed any suspicious activity in the area to contact detectives in Enniskillen and pass that information on.”
Alliance Fermanagh representative Matthew Beaumont said whoever carried out an attack in Lisnaskea needs to be caught quickly.
READ MORE
Index finds couples on high mortgage rates work an extra day a month to pay debt
“This attack in Lisnaskea, carried out by men carrying machetes, is to be condemned in the strongest possible terms. Whoever was responsible for this horrific attack must be caught quickly and face justice.”
“I hope the two females injured make a full and speedy recovery. This must have been a terrifying experience for them.”


Effervescent: Tutorial
Massive Danger
Introduction
Effervescent is a JavaScript game engine that
Getting Started
Installation
Creating your first game
Running your first game
The game object
Entities, Components, and Systems
Entities
Components
Systems
Bringing it all together
Display
Sprites
States
Keyboard
Mouse
Physics
Player Data
Files
Preferences
Saves
Debugging
Logging
Distribution
Conclusion


|
SideCar
|
Abstract base class of an input message buffer that will hold a maximum number of messages in FIFO order. More...
#include </Users/howes/src/sidecar/Algorithms/ChannelBuffer.h>
Public Types | |
| using | Container = std::deque< Messages::PRIMessage::Ref > |
| using | const_iterator = Container::const_iterator |
Public Member Functions | |
| ChannelBuffer (ManyInAlgorithm &processor, size_t channelIndex, size_t maxBufferSize) | |
| Constructor. More... | |
| virtual | ~ChannelBuffer () |
| Destructor. More... | |
| size_t | getChannelIndex () const |
| Obtain the channel index for this object. More... | |
| size_t | getMaxBufferSize () const |
| Obtain the maximum number of messages to hold. More... | |
| size_t | size () const |
| Obtain the number of messages in the buffer. More... | |
| bool | isEmpty () const |
| Determine if the buffer is empty. More... | |
| bool | isEnabled () const |
| Determine if the buffer is enabled. More... | |
| uint32_t | getNextSequenceCounter () const |
| Obtain the sequence counter of the first message in the queue. More... | |
| bool | pruneToSequenceCounter (uint32_t sequenceCounter) |
| Remove messages from the front of the queue whose sequence counter values are less than the given value. More... | |
| virtual void | setMaxBufferSize (size_t maxBufferSize) |
| Change the maximum number of messages to hold. More... | |
| virtual void | setEnabled (bool value) |
| Change the enabled state. More... | |
| virtual void | reset () |
| Reset the buffer by forgetting any held messagess. | |
| virtual void | getSlice (int offset, int span, VsipComplexVector &slice, bool doPop)=0 |
| Obtain a slide of the data, copying it into a VSIPL vector. More... | |
| bool | addData (const Messages::PRIMessage::Ref &msg) |
| Add a message to the queue. More... | |
| virtual bool | makeEnabledParameter () |
| Create a runtime parameter to control the channel enabled state. More... | |
| virtual bool | makeEnabledParameter (const std::string &shortName, const std::string &longName) |
| Create a runtime parameter to control the channel enabled state. More... | |
| const_iterator | begin () const |
| Obtain read-only iterator to the first sample value in the message. More... | |
| const_iterator | end () const |
| Obtain read-only iterator to the last + 1 sample value in the message. More... | |
| Messages::PRIMessage::Ref | getFront () const |
| Obtain the oldest message in the queue. More... | |
| Messages::PRIMessage::Ref | popFront () |
| Remove the oldest message in the queue. More... | |
Static Public Member Functions | |
| static std::string | MakeGenericShortName (int index) |
| Create generic short name for the input channel. More... | |
| static std::string | MakeGenericLongName (int index) |
| Create generic long name for the input channel. More... | |
Protected Member Functions | |
| void | popFrontInternal () |
| Remove the oldest message from the queue. More... | |
| void | pruneToMaxBufferSize () |
| Remove messages until the size of the buffer is less than or equal to maxBufferSize_. | |
| virtual void | enabledChanged (const Parameter::BoolValue ¶meter) |
| Callback invoked when the 'enabled' parameter state changes. More... | |
Abstract base class of an input message buffer that will hold a maximum number of messages in FIFO order.
Held messages are of type PRIMessage; a derived template class, TChannelBuffer, works with concrete SideCar messages types.
Note that this class works with a ManyInAlgorithm instance, requiring one in its constructor. After a ChannelBuffer places a new message in its queue, it calls the ManyInAlgorithm::processMessageReceived() method to notify the ManyInAlgorithm object of new data.
Definition at line 29 of file ChannelBuffer.h.
| ChannelBuffer::ChannelBuffer | ( | ManyInAlgorithm & | processor, |
| size_t | channelIndex, | ||
| size_t | maxBufferSize | ||
| ) |
Constructor.
| processor | object to notify when new data arrives in the buffer |
| channelIndex | the channel index unique to this object |
| maxBufferSize | the maximum number of messages to hold |
Definition at line 24 of file ChannelBuffer.cc.
|
virtual |
| bool ChannelBuffer::addData | ( | const Messages::PRIMessage::Ref & | msg | ) |
Add a message to the queue.
| msg | the message to process |
Definition at line 96 of file ChannelBuffer.cc.
References isEnabled(), SideCar::Algorithms::ManyInAlgorithm::processMessageReceived(), and pruneToMaxBufferSize().
Referenced by getNextSequenceCounter().
|
inline |
Obtain read-only iterator to the first sample value in the message.
Definition at line 172 of file ChannelBuffer.h.
|
protectedvirtual |
Callback invoked when the 'enabled' parameter state changes.
| parameter | the parameter that changed |
Definition at line 51 of file ChannelBuffer.cc.
References SideCar::Parameter::TValue< ParamDef >::getValue(), and setEnabled().
Referenced by makeEnabledParameter(), and popFront().
|
inline |
Obtain read-only iterator to the last + 1 sample value in the message.
Definition at line 178 of file ChannelBuffer.h.
|
inline |
Obtain the channel index for this object.
Definition at line 72 of file ChannelBuffer.h.
Referenced by SideCar::Algorithms::SimpleOp::SimpleOp(), and SideCar::Algorithms::Summer::Summer().
|
inline |
Obtain the oldest message in the queue.
NOTE: only call if the queue is not empty.
Definition at line 184 of file ChannelBuffer.h.
Referenced by SideCar::Algorithms::TChannelBuffer< Messages::Video >::getFront(), SideCar::Algorithms::TChannelBuffer< Messages::Video >::getSlice(), popFront(), and SideCar::Algorithms::TChannelBuffer< Messages::Video >::popFront().
|
inline |
Obtain the maximum number of messages to hold.
Definition at line 78 of file ChannelBuffer.h.
|
inline |
Obtain the sequence counter of the first message in the queue.
NOTE: if the queue is empty, this returns 0.
Definition at line 103 of file ChannelBuffer.h.
References addData(), getSlice(), makeEnabledParameter(), pruneToSequenceCounter(), reset(), setEnabled(), and setMaxBufferSize().
|
pure virtual |
Obtain a slide of the data, copying it into a VSIPL vector.
NOTE: only valid if isEmpty() is false. Always works on the first message in the FIFO queue.
| offset | index of the first sample value to use |
| span | count of sample values to gather |
| slice | container to hold the resulting complex values |
| doPop | if true, remove the first message from the queue after working with it |
Implemented in SideCar::Algorithms::TChannelBuffer< T >, and SideCar::Algorithms::TChannelBuffer< Messages::Video >.
Referenced by getNextSequenceCounter().
|
inline |
Determine if the buffer is empty.
Definition at line 90 of file ChannelBuffer.h.
Referenced by SideCar::Algorithms::TChannelBuffer< Messages::Video >::getFront(), SideCar::Algorithms::TChannelBuffer< Messages::Video >::getSlice(), popFront(), SideCar::Algorithms::TChannelBuffer< Messages::Video >::popFront(), popFrontInternal(), and pruneToSequenceCounter().
|
inline |
Determine if the buffer is enabled.
A disabled buffer ignores all addData() calls.
Definition at line 96 of file ChannelBuffer.h.
Referenced by addData(), SideCar::Algorithms::ManyInAlgorithm::getNumInfoSlots(), SideCar::Algorithms::SimpleOp::SimpleOp(), and SideCar::Algorithms::Summer::Summer().
|
virtual |
Create a runtime parameter to control the channel enabled state.
The created Parameter::BoolValue object will have names created from MakeGenericShortName() and MakeGenericLongName().
Definition at line 37 of file ChannelBuffer.cc.
References MakeGenericLongName(), and MakeGenericShortName().
Referenced by SideCar::Algorithms::BinaryOp::BinaryOp(), getNextSequenceCounter(), SideCar::Algorithms::SimpleOp::SimpleOp(), and SideCar::Algorithms::Summer::Summer().
|
virtual |
Create a runtime parameter to control the channel enabled state.
| shortName | |
| longName |
Definition at line 43 of file ChannelBuffer.cc.
References enabledChanged(), SideCar::Parameter::TValue< ParamDef >::Make(), and SideCar::Algorithms::Algorithm::registerParameter().
|
static |
Create generic long name for the input channel.
Given an index value of N, this will return a string with the format "Input # Enabled", with # replaced by the value N+1.
| index | the channel index to use |
Definition at line 17 of file ChannelBuffer.cc.
Referenced by makeEnabledParameter().
|
static |
Create generic short name for the input channel.
Given an index value of N, this will return a string with the format "input#Enabled", with # replaced by the value N+1.
| index | the channel index to use |
Definition at line 9 of file ChannelBuffer.cc.
Referenced by makeEnabledParameter().
|
inline |
Remove the oldest message in the queue.
NOTE: only call if the queue is not empty.
Definition at line 188 of file ChannelBuffer.h.
References enabledChanged(), getFront(), isEmpty(), popFrontInternal(), and pruneToMaxBufferSize().
Referenced by SideCar::Algorithms::TChannelBuffer< Messages::Video >::getSlice(), and SideCar::Algorithms::Printer::startup().
|
protected |
Remove the oldest message from the queue.
Updates the nextSequenceCounter_ value. NOTE: only call if the queue is not empty.
Definition at line 108 of file ChannelBuffer.cc.
References isEmpty().
Referenced by popFront(), SideCar::Algorithms::TChannelBuffer< Messages::Video >::popFront(), pruneToMaxBufferSize(), and pruneToSequenceCounter().
| bool ChannelBuffer::pruneToSequenceCounter | ( | uint32_t | sequenceCounter | ) |
Remove messages from the front of the queue whose sequence counter values are less than the given value.
| sequenceCounter | the value to compare against |
Definition at line 59 of file ChannelBuffer.cc.
References isEmpty(), and popFrontInternal().
Referenced by getNextSequenceCounter().
|
virtual |
Change the enabled state.
| value | new value |
Definition at line 81 of file ChannelBuffer.cc.
References SideCar::Algorithms::ManyInAlgorithm::channelEnabledChanged(), and reset().
Referenced by enabledChanged(), and getNextSequenceCounter().
|
virtual |
Change the maximum number of messages to hold.
| maxBufferSize | new value |
Definition at line 74 of file ChannelBuffer.cc.
References pruneToMaxBufferSize().
Referenced by getNextSequenceCounter().
|
inline |
Obtain the number of messages in the buffer.
Definition at line 84 of file ChannelBuffer.h.
Referenced by pruneToMaxBufferSize().


Many years ago, I collected some LaTeX templates when learning LaTeX. However, my interest in LaTeX was gone after submitting my PhD dissertation. I should have deleted these templates if they had not been so small. They would never be useful in the future, I thought.
In 2017, I started writing the book Learning R: R for Rookies. Unexpectedly, MS Word could not satisfy me with the typesetting. You know what I mean if you have experience (and pain) in writing a long book or dissertation with Word. Actually I suffered more, but I do not want to talk about it. I was sure that LaTeX could, but I would rather not use it.
Like a bolt out of the blue, I found bookdown.
From then on, I could not help spending time on this amazing tool. My book was completed with bookdown. My manuscripts, produced by bookdown, were submitted to academic journals and accepted. I wrote my papa-and-son diaries on bookdown.org. All the LaTeX templates were brought back to life: I packed them in an R package: bookdownplus.
Bookdownplus was supppsed to be a shortcut to bookdown. In the recently year, I have been doing my best to provide the beginners (and me) a friendly way to using bookdown. However, I struggled with two annoying problems. The first one is how the users (including me) can easily choose the right template. The second one is how the users (including me) can easily contribute their own templates to bookdownplus.
This web app you are viewing now is intended to solve these problems. Users can search for elegant bookdown templates of interest, download the template package, and leave their comments. Furthermore, contributors’ templates, if submitted to the bookdownplus repository, can view their templates on this website as soon as possible.
In another word, this web app is a showcase of the R bookdownplus package, or a window of bookdown templates.
bookdownplus is an open-source software package that helps users write many kinds of books and articles, including academic journal articles, theses and dissertations, programming books (especially in R language), even guitar books, chemical equations, mails, calendars, and diaries. bookdownplus works on the basis of bookdown.
bookdown is an open-source package that facilitates writing books and long-form articles/reports. It can generate printer-ready books and ebooks with multiple choices of output formats such as PDF, LaTeX, HTML, EPUB, and Word. bookdown stands on the shoulder of R Markdown.
R is an open source programing language. Markdown is a lightweight markup language with plain text formatting syntax. R Markdown is a combination of both, and more.
Well, it sounds complicated so far, but it actually isn’t.
You don’t have to know the definitions of R, Markdown or bookdown. Just move on and use it, and you will learn what they are. bookdownplus helps. Following the quick start on the bookdownplus repo, you can create a demo book (or multiple demo books) in .pdf or .doc, or even more formats with just one single command. Full documentation can be found in the book R bookdownplus Textbook.
You don’t know which template to choose? The home page of this website is a gallery of them, each with a title of the template name.
If you are willing to share your bookdown templates, just upload them to the bookdownplus repo. They will be displayed in the gallery automatically once accepted.
From the version 1.5, bookdownplus opens a widest-ever door to contributors. Here is how:
bookdownplus::share('your_template_name')
. Follow the instructions in each subfolder and create the required files.
Wait for the response, and your template will be available in the gallery. R users can get it easily by clicking the “.zip” link in the gallery, or running
bookdownplus("your_template_name")
Any suggestions? Please contact me!


Overview
A ui definition in Semantic usually contains a list of mutually exclusive variations on an element design. A type is designated by an additional class name on a UI element
Content
Types may require different html structures to work correctly. For example, an icon menu might expect different content like icons glyphs instead of text to be formatted correctly
HTML Differences
Types may also each require slightly different html. For example, a tiered menu needs html specified for a sub menu to display itself correctly


Welcome to WATSAN Portal: Kibera! Start by clicking New Project below, then follow the steps to find out the likely cost of a new city-connected water or toilet facility at your location and to find out how to apply for the connection with Nairobi Water.


This room is for the adventurist type, as you will be sleeping with a bunch of people. You will have your own foot locker for your belongings.
This is a small 12x15 room with your own lock.
This is our flagship room.


Water
|
|
| Extra Hour | |
| Constant | |
| Actual Indoor Temp: | C° | ||
| Actual Outdoor Temp: | C° | ||
| Actual Boiler Temp: | C° | ||
| Solar Energy Today: | kWh | ||
Save energy by using solar panel over boiler when possible |
|||
Heating |
|
| Extra Hour |
|
| Constant | |


{% extends "sproutforms/_layout" %} {% block content %}
Take a look at the code of this template to see an example with comments.
Thank you for your message. We'll be in touch soon!
{% else %} {# If you want more fine-grained control over your fields, you will have to build the Form youself, and then you can control the specific fields more directly. #} {% endif %} {% endblock %}


| 1 |
| h07 |
| CS24 W18 |
| Name: | ||||
|---|---|---|---|---|
| (as it would appear on official course roster) | ||||
| Umail address: | @umail.ucsb.edu | section |
||
| Optional: name you wish to be called if different from name above. | ||||
| Optional: name of "homework buddy" (leaving this blank signifies "I worked alone" |
h07: Chapter 6, sections 6.1-6.6
| ready? | assigned | due | points |
|---|---|---|---|
| false | Tue 05/15 11:00AM | Tue 05/22 11:00AM |
You may collaborate on this homework with AT MOST one person, an optional "homework buddy".
MAY ONLY BE TURNED IN IN THE LECTURE/LAB LISTED ABOVE AS THE DUE DATE,
OR IF APPLICABLE, SUBMITTED ON GRADESCOPE. There is NO MAKEUP for missed assignments;
in place of that, we drop the three lowest scores (if you have zeros, those are the three lowest scores.)
Please:
- No Staples.
- No Paperclips.
- No folded down corners.
Complete your reading of Chapter 6, section 6.1 -6.2, 6.3 (ignore references to multiset of page 139), 6.4-6.6 (If you don’t have a copy of the textbook yet, there is one on reserve at the library under “COMP000-STAFF - Permanent Reserve”).
-
1. (10 pts) Write a template function named IsEqual() that compares two items and returns a boolean. If the items are equal the function should return true otherwise it should return false. The function has two parameters of the same type. The type may be any type that has a copy constructor and the == operator defined.
2. (10 pts) Re-read pages 314-315. Then consider the Sequence class provided in this file . The Sequence class currently stores a list of words in a static array. Convert this class to a template class that can be used to store a collection of any datatype instead of just std::string. Write the new definition of the Sequence class below. You don't have to implement the methods.


Portuguese Pointer
| Portuguese Pointer Picture | |
| Breed Information | |
|---|---|
| Popularity | # |
| Name | Portuguese Pointer |
| Other names | Perdigueiro Portugues, Portuguese Pointing Dog |
| Origin | Portugal |
| Breed Group | Gun Dogs (UKC) |
| Size | Medium |
| Type | Purebred |
| Life span | 12-14 years |
| Temperament | AffectionateCalmLivelySubmissive |
| Height | Male: 20–24 inches (51–61 cm)Female: 19–22 inches (48–56 cm) |
| Weight | Male: 44–60 pounds (20–27 kg)Female: 35–49 pounds (16–22 kg) |
| Colors | White & YellowYellowLight BrownBrownWhite & Light Brown |
| Litter Size | 5-8 puppies |
| Puppy Price | Average $800 - $1000 USD |
| Breed Characteristics | |
| Adaptability | 2 stars |
| Apartment Friendly | 1 starsThese dogs are not recommended for apartment life. They are moderately active indoors and do best with acreage. |
| Barking Tendencies | 2 starsOccassional |
| Cat Friendly | 2 stars |
| Child Friendly | 3 stars |
| Dog Friendly | 3 stars |
| Exercise Needs | 4 starsThey need to be taken on a daily, brisk, long walk, jog. While out on the walk the dog must be made to heel beside or behind the person holding the lead, as instinct tells a dog the leader leads the way, and that leader needs to be the human. |
| Grooming | 2 starsThe smooth coat of the Portuguese Pointer is very easy to groom. Brush regularly with a firm bristle brush and bathe only when necessary. |
| Health Issues | 2 starsProne to hip dysplasia and other joint related problems. Keep ears clean to prevent ear infections. Some lines have had albino pups born.Hypoallergenic: No |
| Intelligence | 3 starsRanking: (#). (See All Rankings) |
| Playfulness | 2 stars |
| Shedding Level | 2 stars |
| Stranger Friendly | 3 stars |
| Trainability | 3 stars |
| Watchdog Ability | 4 stars |
| Portuguese Pointer Puppy Picture | ||
| Puppy Names | ||
|---|---|---|
| Rank | Male | Female |
| 01 | Buddy | Chloe |
| 02 | Jack | Bella |
| 03 | Toby | Coco |
| 04 | Zeus | Maggie |
| 05 | Duke | Ellie |
| 06 | Harley | Ruby |
| 07 | Bailey | Piper |
| 08 | Oscar | Stella |
| 09 | Riley | Lola |
| 10 | Louie | Penny |
| See All Names › |
| Overview |
|---|
|
The Portuguese Pointer is a medium-sized, well-balanced dog with a distinctive “square” face, drop ears, and a tail that is carried pendant when the dog is standing and level with the back or slightly above when the dog is moving. The body of the Portuguese Pointer is almost square. The Portuguese Pointer should be evaluated as a working gun dog and exaggerations or faults should be penalized in proportion to how much they interfere with the dog’s ability to work. The Portuguese Pointer has strong hunting instincts. In the field, the Portuguese Pointer is a tenacious hunter in all sorts of terrain and climate. The dog’s affectionate nature is so intense that the Portuguese standard describes it as “…occasionally even embarrassing”. This devotion, however, makes the Portuguese a joy in the field because no dog delights more in sharing the hunt with its master. |
| History |
| The Portuguese name for this breed is “Perdigueiro Português,” derived from “perdigon,” the Portuguese word for “partridge.” The Portuguese Pointer is probably descended from the dogs used by Portuguese falconers in the fifth and sixth centuries. Portuguese Pointers were described in a 12th century Portuguese book of hunting by Joao I, and appear in the 13th century paintings of Alfonso III. The Portuguese were a great seafaring people and it is quite likely that this well-established breed influenced the development of a number of European gun dogs. The breed was introduced to England where its influence can still be seen in the English Pointer. The Portuguese Pointer was recognized by the United Kennel Club on January 1, 1996. |


Error #01: FILES SCRATCHED,XX (,TT,SS on error) Status message after scratching. XX is the number of deleted files. If an error occured, TT and SS show the block where it appeared.


| AbstractFilteredLogEventObserver |
Abstract superclass of LogEventObservers to filter which messages are logged.
|
| CompositeLogEventObserver |
Delegates log events to a list of observers.
|
| ConditionalLogEventGenerator |
|
| FixedLevelThresholdConditionalObserver |
|
| JavaUtilLoggingAdapter |
An adapter from java.util.logging to LogEvents.
|
| LevelLoggingEventGenerator |
|
| LevelThresholdConditionalObserver |
|
| LogEventFilter |
A LogEventObserver that forwards all log events to a delegate observer
if they have a log level equal to or more severe than the LogEventFilter.getThreshold()
or if there is a MDC variable on the thread which fulfills a
configured logging rule.
|
| LogEventPredicate.AllConditions |
A rule specifying that any log message will be logged if they must fulfill
all of the specified conditions.
|
| LogEventPredicate.AlwaysCondition |
|
| LogEventPredicate.AnyCondition |
A rule specifying that any log message will be logged if they must fulfill
at least one of the specified conditions.
|
| LogEventPredicate.InheritCondition |
|
| LogEventPredicate.MarkerCondition |
Abstract superclass for rules about markers
|
| LogEventPredicate.NeverCondition |
|
| LogEventPredicate.NotAllCondition |
|
| LogEventPredicate.RequiredMarkerCondition |
A rule specifying that any log message will be logged if they must have one of
the required markers or a marker that contains one of the required markers.
|
| LogEventPredicate.RequiredMdcCondition |
A rule specifying that any log message will be logged if they they have an
MDC value with the key where the value matches one of the accepted values
|
| LogEventPredicate.SuppressedMarkerCondition |
A rule specifying that log message will be logged if they don't have one
of the suppressed markers or a marker containing any of the suppressed markers
|
| LogEventPredicate.SuppressedMdcCondition |
|
| LoggerDelegator |
Internal implementation of SLF4J Logger .
|
| NullLogEventObserver |
|
| NullLoggingEventGenerator |
Log generator which does nothing.
|
| SLF4JServiceProviderImpl |
|


| PhotoLine Tip: Distorted text |
| 1. Start
with an image of your choice, for example this nice flower.
2. Write your
text on it.
3. Select
the layer tool from the toolbar and change the workmode to Distort.
You can do that fix in the tool options of the layer tool (also in the
context menu) or just for the moment when you press the Ctrl and Alt
key.
4. Now move
the top edges of the text layer with the mouse.
5. Here is
the result:
|
| ««Previous Tip <Contents> Next Tip»» |
| Please email questions and suggestions on these tips to Gerhard Huber. |


{% extends "base.html" %} {% block content %} {% import "macros/forms.html" as forms %}
Gendifo is the generic discussion forum.
Just looking for something generic to talk about? You're in the right place!
{{group.info}}


Capital’s air quality ‘very poor’; condition likely to improve today
Western disturbance, rainfall expected over next few days
by Staff ReporterThe air quality of Delhi stayed in the ‘very poor’ category on Saturday, but may improve to ‘poor’ category on Sunday, said forecasting agency SAFAR.
The average level of PM2.5 was over twice (135.5 ug/m3) the safe limit (60ug/m3) in Delhi-NCR at 7 p.m., as per the Central Pollution Control Board (CPCB).
Cracking the whip, the Delhi Pollution Control Committee (DPCC) and the Transport Department have impounded 63 “visibly polluting vehicles” in the last three days and imposed a penalty of ₹49.15 lakh on the violators. The owners will have to pay the fines, ranging between ₹50,000 and ₹1 lakh, and also obtain PUC certificates before they can get their vehicles back.
Delhi’s Air Quality Index (AQI) on Saturday was 312 (very poor), down from Friday’s 360 (very poor), as per the 4 p.m. bulletin by the CPCB. The contribution of stubble burning in neighbouring States to Delhi’s pollution was 7%.
DFS roped in
Meanwhile, Special Secretary of Department of Environment Arun Mishra said that the Delhi Chief Secretary on Saturday directed the Delhi Fire Service to sprinkle water on main roads at 13 pollution hotspots across the city to combat pollution.
Chief Fire Officer Atul Garg said that the department has deployed fire tenders at the hotspots identified by the CPCB. He added that 20 fire tenders have been pressed into service and more will be deployed.


Paste your known hash and then type as many passwords into the "Guess" field. Your guess will be hashed (and rehashed 3 more times). If the known hash matches any of the guess hashes you will be notified and futher input will be prevented.
Each individual keystroke triggers a test, and there is no limit to the number of attempts you may make. Processing is done entirely within your browswer, and never sent elsewhere.
Tip: try X03MO1qnZdYdgyfeuILPmQ==
and guess password


Instructions
The big white box above is the where you can draw vertices and edges.
Here's how to use it:
- Add a vertex (node): double-click on the canvas
- Make source vertex: double-click on an existing vertex
-
Add an edge: shift-drag on the canvas from one vertex to
another
- Move something: drag it around
-
Delete something: click it and press the delete key (not the
backspace key)
-
Type numeric subscript: put an underscore before the number
(like "S_0")
-
Type greek letter: put a backslash before it (like "\beta")


The strategy code mainly consists of three parts: Initialization, Warm Up, and Weekly Rebalancing.
In the Initialize function, we set up look-back period, beginning cash balance, the size of the investment universe, the number of traded stocks, etc. We use self._numOfWeeks to count?the number of weeks that have passed since the start date, and self._LastDay to indicate whether it is a new week. self._ifWarmUp is true when the self._numOfWeeks is 3, which means as long as next week's data come, we can make our investment decisions.??self._stocks is a list containing all the symbols of the 100 stocks that are taken into consideration. self._values is a dictionary with keys the stock symbols and values the lists containing the prices of stock each week since 4 weeks ago.
def Initialize(self): self.SetStartDate(2005, 1, 1) self.SetEndDate(2017, 5, 10) self.SetCash(1000000) self.UniverseSettings.Resolution = Resolution.Daily self.AddUniverse(self.CoarseSelectionFunction) self._numberOfSymbols = 100 self._numberOfTradings = int(0.1 * self._numberOfSymbols) self._numOfWeeks = 0 self._LastDay = -1 self._ifWarmUp = False self._stocks = [] self._values = {}
Also, we need to use?CoarseSelectionFunction to select 100 qualified stocks from the total stock universe. Here, we sort the total stock universe by each stock's DollarVolume in decreasing order. Then, we select the first 100 stocks that have the largest DollarVolume among all the stocks in the universe.
def CoarseSelectionFunction(self, coarse): sortedByDollarVolume = sorted(coarse, key=lambda x: x.DollarVolume, reverse=True) top100 = sortedByDollarVolume[:self._numberOfSymbols] return [i.Symbol for i in top100]
Before we are able to make our investment decisions, we must have at least 4 weeks' data to calculate the performance, i.e. the monthly return, of each stock. Hence, we need a warm up period as long as 3 weeks to accumulate price series, so that once the fourth week's data come we can calculate?the return of the whole month.
self._stocks = [] self.uni_symbol = None symbols = self.UniverseManager.Keys for i in symbols: if str(i.Value) == "QC-UNIVERSE-COARSE-USA": self.uni_symbol = i for i in self.UniverseManager[self.uni_symbol].Members: self._stocks.append(i.Value.Symbol) self._values[i.Value.Symbol] = [self.Securities[i.Value.Symbol].Price]
We get all the symbols of qualified stocks from UniverseManager and keep them in self._stocks which is a list. Then we create for each key in the dictionary self._values a list where its first week's price is stored. And every time new data come, we append the new price to the end of the list of each stock.
for stock in self._stocks: self._values[stock].append(self.Securities[stock].Price)
After the warm-up period, we calculate monthly returns every week and based on the returns, we make our investment decisions.
returns = {} for stock in self._stocks: newPrice = self.Securities[stock].Price oldPrice = self._values[stock].pop(0) self._values[stock].append(newPrice) returns[stock] = newPrice/oldPrice
Every week when new data come, we use them along with the data four weeks ago to calculate the monthly returns. At the same time, we remove the oldest data from our lists. This step is essential to prevent memory size exceeding the limit.
newArr = [(v,k) for k,v in returns.items()] newArr.sort() for ret, stock in newArr[self._numberOfTradings:-self._numberOfTradings]: self.SetHoldings(stock, 0) for ret, stock in newArr[0:self._numberOfTradings]: self.SetHoldings(stock, 0.5/self._numberOfTradings) for ret, stock in newArr[-self._numberOfTradings:]: self.SetHoldings(stock, -0.5/self._numberOfTradings)
Finally, we sort the returns in increasing order. For the stocks whose monthly returns fall into the first 10% (performed badly in last month), we long them; For those fall into the last 10% (performed well in last month), we short them. Others (between 10% and 90%) will be set to 0.


Users scan the customer data via File Scan or customer dbscan in the screening Management. The screening results are loaded into WatchList Alert database for review. This function is used to search watchlist alerts and make decisions on them.
Click the WatchList Alert in the left navigation menu under Case Management, a new WatchList Alert Tab folder will be created in the right panel. There are 3 sub-Tab folders: Search WatchList Alert, Search Result WatchList Alert and Create New WatchList Alert.
Search Criteria
| Field Name | Description |
|---|---|
| WLAlert Id | This is the unique number for the watch list alert entry in the system. |
| Customer Id | Used only when use customer dbscan. |
| CreatedByDate | Date and Time when this entry is created |
| CreatedByUser | User who create this entry. |
| OrgUnit Code | select values from the dropdown list. |
| Status Code | select values from the dropdown list. |
| Assigned By | select values from the dropdown list. |
| Assigned To | select values from the dropdown list. |
| Assigned To | select values from the dropdown list. |
| Group | |
| AND | Select AND radio box if you want those criteria add together. |
| OR | Select OR radio box if you want to get the result if either of the criteria is met. |
The top part is the table which shows the list of the watch list alerts that meet the search criteria. The bottom part is the details, Hits, Customers, Documents, Emails, and Audit Logs of the selected entry.
Each alert has one to many hits. A hit is created when the name or alias of the sanction list match all or part of the customer name. The Hit detail screen shows all the information from the sanction list.
Alert Audit Log with action name, action reason, from status, to status, comment, action by, and action date.
Double Click the selected record in the table to modify this entry. A new tab folder “Update/Delete WatchList Alert” will be added, as shown below.
Select the “Create New WatchList Alert” Tab to create a new entry.
Note
Normally Watchlist alerts are created by File Scan or Customer DBScan.
| Field Name | Description |
|---|---|
| WLAlert Id | This is the unique number for the watch list alert entry in the system. |
| Scanned Data | The data that is scanned by the screening engine. |
| Customer Id | Used only when customer dbscan is used. |
| OrgUnit Code | Select values from the dropdown list. |
| Assigned By | Select values from the dropdown list. |
| Assigned To | Select values from the dropdown list. |
| Assigned To | Select values from the dropdown list. |
| Group | |
| Action Reason | Select from the dropdown list |
| Alert Comments | A free text area to allow users to add comments. |


John Legend wears onesie, sings 'All of Me' at Universal Studios
Chrissy Teigen posts video
by Leah Asmelash, CNN(CNN) - Imagine this.
John Legend, in a onesie with his face on it and a little tipsy, crooning his 2013 hit "All of Me" on stage at Universal Studios in Los Angeles.
The good news is you don't have to imagine it. This wild scenario actually took place and — to the utter amusement of everyone — it was caught on camera.
Chrissy Teigen, who is married to the singer, posted the video Saturday on Twitter, writing bluntly, "John got wine drunk and sang a song at universal studios last night."
 It's hilarious.
In a follow-up to her tweet, Teigen wrote, "the whole joke was supposed to be that literally no one was watching or at the stage but then he got on stage and was like ITS ME JOHN LEGEND."
Legend, however, posted a slightly different version of events on his Instagram feed.
 Costume theme was onesies. We bought a few new ones and raided the closet too and found the perfect one for me to wear," he wrote. "Someone made Chrissy a onesie with my face on it and of course I had to wear it. Then I found a reluctant DJ with a mic and serenaded myself. It was a night."
Hmm ... no mention of being "wine drunk" in Legend's recounting.


Surf declining for north and west shores, but advisory still up for east-facing beaches
by Ben GutierrezHONOLULU, Hawaii (HawaiiNewsNow) - Strong trade winds are still pushing in advisory-level surf for east-facing shores, but a high surf advisory for north and west shores has been canceled as a short-lived northwest swell declines slowly.
The advisory remains in effect until 6 a.m. Monday for the east-facing shores of Kauai, Oahu, Molokai, Maui and the Big Island.
East shore waves are forecast at 6 to 9 feet, with rough and choppy conditions.
Beachgoers should expect strong breaking waves, along with strong longshore and rip currents that can make swimming difficult and dangerous. Use caution and heed all advice from ocean safety lifeguards.
Copyright 2019 Hawaii News Now. All rights reserved.


Critic Consensus: Playing as both an exciting sci-fi adventure and a remarkable portrait of childhood, Steven Spielberg's touching tale of a homesick alien remains a piece of movie magic for young and old.


"x" "1" "UMBUZEIRO,GDA FREEMAN,HS WARREN,SH PALMA DE OLIVEIRA,D TEARO,YWATANABE,T AND CLAXTON,LD, THE CONTRIBUTION OF AZO DYES TO THE MUTAGENICACTIVITY OF THE CRISTAIS RIVER, CHEMOSPHERE 60(1):55-64, 2005"


Frontend Developer (VueJS)
Bengaluru, Karnataka
<EMAIL_ADDRESS>9536867801
Skills
HTML5
CSS3
Javascript
Vuejs
Languages
English
Hindi
Creation of interactive one page web application using Javascript.Good understanding of HTML5, CSS3, JSON and Responsiveness. Newly found love is ReactJS. Overall good knowledge of web protocols and how information flows between frontend, backend and Rest APIs.
Changing people's life by revolutionizing the way mortgage applications are filled in the American housing market using technology and making data-driven investments in housing, employment, and public life.
Developed multiple Shopify stores that are being accessed by thousands of users on a daily basis.
Souq.com is the largest e-commerce company in the middle east. It's basically Amazon of middle east.
Burger Builder is the Single Page Application used to make your own burger by adding ingredients in it. React is being used to make it a single page Application.Link given below:
The whole UI is being made using Vanilla JS and Bootstrap(v4). The content is available in two languages i.e. English and Hindi according to the choice of the user. Link given below:
StaartlBachelor Degree (Computer Science)
10th (2009) , 12th (2011)


MAD DOG AND GLORY A film review by Scott Fisher Copyright 1995 Scott Fisher
(1993) MPAA rating: R Directed by John McNaughton. Lead actors: Robert DeNiro, Uma Thurman, Bill Murray.
Let's get one thing straight up front. MAD DOG AND GLORY is NOT a drama. When I rented it on video tape, the store had put it in the Drama section (as has the Internet Movie Database). I'm not sure it's a comedy though. Deconstructionist satire might be a way to describe it. Its charm comes from breaking expectations--showing life in an unflattering, unexpected, and humorous way.
Superficially, the plot seems as though it belongs to a traditional romantic comedy--THE BUTCHER'S WIFE, or WHILE YOU WERE SLEEPING, for example. Wayne (DeNiro), a middle-aged cop, intervenes in a convenience store robbery, saving mob boss (Murray) being held at gun point. The next day, Wayne receives an invitation to a party at a local comedy club. Frank, the mob boss that Wayne saved, turns out to own the club. He does stand-up comedy there for all his mob friends. In gratitude for saving his life, Frank sends Glory (Thurman) to live with Wayne for a week to "make him happy." At first Wayne tries to ignore Glory, but they eventually fall in love--Wayne no longer wants to give Glory back after the week is over. The conflict between Wayne's love for Glory and the fear of defying Frank form the basic conflict.
After the summary, you might wonder why MAD DOG AND GLORY is any different than any romantic comedy.
First, consider that Bill Murray plays a mob boss while DeNiro takes the part of a cop. DeNiro usually plays the famous gangster. Second, DeNiro is not heroic (in any traditional sense). He's scared witless in the robbery in which he saves Frank's life. A non-aggressive cop? When was the last time you saw that in a movie?
The list of shattered expectations goes on and on: the sex scene, instead of being glamorous, is downright awkward and humorous. The mob boss, has a sensitive and insecure side (he talks about his psychologist constantly), instead of being the powerful and threatening person portrayed in most movies. Though the script keeps foreshadowing the death of DeNiro's partner, he never dies. Almost every time you expect something to happen, something different occurs instead.
After reading a few reviews of the movie at the Internet Movie Database, I was amazed that people took it so seriously. Many apparently took it at face value--as a drama. The humor was deadpan and sometimes subtle--the kind of thing you'd expect if David Byrne and Woody Allen made a movie together. Still, I'd think that most people would pick up on it. Then again, I know some people who took _Spinal Tap_ at face value, as a "rockumentary." Maybe some awareness of movie conventions and stereotypes is necessary to enjoy this movie.
I loved this movie, and though it had its share of problems, it's one of the best movies I've seen in the last year. Though rough around the edges, this thinking person's comedy brings something lively to the screen. If you want to watch something tired and homogenized, look elsewhere. MAD DOG AND GLORY's sense of comedic adventure make this movie a very entertaining experience.
Rating: *** (8 on a scale of 1 to 10).
-- Scott Fisher
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


So let's say you have an array and youd really like to see all the elements of it listed out in a string. Maybe you just wanna see the data a few times, maybe you want to see it infinitely. Either way the enumerable command you're looking for is cycle. Cycle calls for the block of each element n times or forever if you don't feel like defining it. See below for an example.
a = ["a", "b", "c"]
a.cycle { |x| puts x } # print, a, b, c, a, b, c,.. forever.
a.cycle(2) { |x| puts x } # print, a, b, c, a, b, c.