Updates:
Run Configuration
to run tests using prove
with default IDE tests result UI, (requires Tap::Formatter::Camelcade
).
""
operator is overloaded. Additionally, you may
specify
custom renderer for any package, using
File | Settings | Build, Execution, Deployment | Debugger | Data Views | Perl5 Type Renderers
settings (requires debugger module 2019.1), by @cdalvaro.
Readonly
syntax support, by @pJungler.Log::Log4perl
imports support, by @giddel.File::Spec::Functions
subs. Actual module has tricky exporting, binding OS-specific
implementation
in runtime. Plugin for now resolves to the Unix implementations from the File::Spec::Unix
, by @grakkpl.
Bundle::Camelcade
module introduced. Installs all modules
that may may be required when working with the perl plugin. Going to be suggested for installation as alternative for particular
modules, #1946.
File | Settings | Editor |
Language Injections
,
by @Christoffen.
__END__
block, #1896.(?{...})
and (??{...})
, #1906.
defined
or string/numeric equality check, by @RickMeasham.
Fixes:
Run Configuration
editor now looks less chaotic.Install package
action is now split by spaces, commas and semicolons, allowing to install arbitrary
version
with cpan, e.g. HURRICUP/Devel-Camelcadedb-v2018.3.0.tar.gz
.
e
modifier, #1915-v
response, by @EdenOaksConsulting.
Types::Standard
things, #1887.try-catch
syntaxes.


{% extends "base.html" %} {% block title %}View - imageX{% endblock %} {% block content %}
Description: {{ image.description }}
Tag(s): {% for t in image.tag.all %}{{ t }}{%if not forloop.last%}, {%endif%}{% endfor %}
Category: {{ cat }}
Photographer: {{ image.photographer.username.first_name }} {{ image.photographer.username.last_name }} ({{ image.photographer.username }})
Upload Date: {{ image.upload_date }}
Likes: {{ image.num_of_likes }}
Downloads: {{ image.num_of_downloads }}


Struts 2
>
Home
>
Tutorials
>
Step by Step
Struts 2
Step by Step
Edit Page
Browse Space
Add Page
Add News
Added by
plightbo
, last edited by
Ted Husted
on Sep 04, 2006 (
view change
)
Under Construction
This is a work in progress. Thank you for your patience.
Ready, Set, Go!
Hello World
Using Tags
Coding Actions
Validating Input
Selecting Results
Localizing Output
Flying Solo
For more coding examples, see the
Cookbook
.
Next:
Ready, Set, Go!
Children
Show Children
Hide Children
Selecting Results
(Struts 2)
Hello World
(Struts 2)
Flying Solo
(Struts 2)
Coding Actions
(Struts 2)
Ready, Set, Go!
(Struts 2)
TutorialLesson06
(Struts 2)


Mathzar
Factors
BreakIt
Table
Mathzar
Click any of the top buttons to continue.
Number
Submit
BreakIt
Submit
Table
Submit


{% extends 'base.html' %} {% block content %}
Welcome, start editing this template in apps/base/templates/base/home.html
apps/base/templates/base/home.html


8
1 Yahweh says, "Get a trumpet and blow it.
There are enemies swooping down over my people,
as an eagle swoops down over a victim.
This is because my people have left my covenant with them
and have violated the law I gave them.
2 My people Israel cry out to me and say,
'Our God, we are loyal to you!'
3 But the people of Israel have thrown away what is good,
so their enemies will chase after them.
4 Israel has appointed kings for themselves,
but they did not consult with me about it.
They chose their own kings
without asking me to approve them.
They took their silver and gold and formed them into the idols they worshiped,
but the people will perish as a result."
5 The prophet says, "Yes, Yahweh has rejected your idol, you people of Samaria—an idol made in the form of a calf!"
Yahweh says, "Perhaps these people will never again be able to do things that please me. I am very angry with them!
6 The shame of it is that this idol came from Israel! A craftsman made it.
It is only an idol; it cannot be the true and living God!
I will ensure that someone will smash it to bits.
7 This is because these people do useless things, so something terrible will destroy them.
Their grain standing in the fields will give no harvest.
And even if it does, foreign soldiers will eat everything it produces.
8 Other nations have destroyed Israel's power.
Now Israel is like an old, broken pot that no one wants.
9 They asked the king of Assyria for help;
they were like a wild donkey wandering off by itself.
The people of Israel have tried to pay other nations to protect them.
10 Although they do this,
I will soon gather them up to destroy them.
They will begin to become poor because they will have to pay money to Assyria's king.
11 The people of Ephraim have built many altars on which to offer sacrifices for their sins;
however, these altars have become places where the people commit terrible sins against me.
12 Even if I wrote out for the people of Israel my laws ten thousand times,
they would refuse to obey them.
They would say they had never heard of them.
13 Let us think about the sacrifices that they give to me.
They sacrifice the meat and then they eat it;
but I, Yahweh, am not pleased with those sacrifices.
I will think about their sins and will punish the people for them.
I will make them go back to Egypt.
14 And why has this happened?
The people of Israel have forgotten me, the God who made them a nation. Instead of honoring me, they have built huge homes to live in.
And instead of worshiping Yahweh, the people of Judah have built walls around their cities for protection.


Ping-Pong
Let's Play Ping Pong!
Rules:
Ping Pong will count up to your number from 1 with the following exceptions:
- Numbers divisible by 3 are replaced with "ping"
- Numbers divisible by 5 are replaced with "pong"
- Numbers divisible by 15 are replaced with "ping-pong"


The Windows Library for JavaScript has a built-in templating engine that enables developers to easily create item templates, such as the one used in the ListView in this example. Many of the templates that Windows uses are provided on the Windows developer center so that you can copy and paste them into your own apps.


Well, there is one more step. You see this game is part of a coding class, a capstone
project of sorts. But it turns out people don't know if using Canvas API meets any of the requirements, and while
being able to take multiple inputs and things is great... I digress.
This form is just one of those things you have to do. If you want to play the internet's
most popular game about a tooth and candy with a latin name created by Patrick Gabbard, you have to fill out the
form.


Hello! Thanks for stopping by my website. Say hi!
Say hi!
Name:
E-mail:
More information
Favorite Animal:
*
Favorite Color:
*
Gender:
Cat
Potato
Comment:


Hot Restaurant
Book your seat before they are all gone!
View Tables
Name:
Email address:
Phone number:
Unique ID:
Submit
API Table Link
|
API Wait List


Javalanche report for class:
org.joda.time.MonthDay
1: /*
2: * Copyright 2001-2010 Stephen Colebourne
3: *
4: * Licensed under the Apache License, Version 2.0 (the "License");
5: * you may not use this file except in compliance with the License.
6: * You may obtain a copy of the License at
7: *
8: * http://www.apache.org/licenses/LICENSE-2.0
9: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.joda.time;
17:
18: import java.io.Serializable;
19: import java.util.ArrayList;
20: import java.util.Calendar;
21: import java.util.Date;
22: import java.util.List;
23: import java.util.Locale;
24:
25: import org.joda.convert.FromString;
26: import org.joda.convert.ToString;
27: import org.joda.time.base.BasePartial;
28: import org.joda.time.chrono.ISOChronology;
29: import org.joda.time.field.AbstractPartialFieldProperty;
30: import org.joda.time.field.FieldUtils;
31: import org.joda.time.format.DateTimeFormat;
32: import org.joda.time.format.DateTimeFormatter;
33: import org.joda.time.format.DateTimeFormatterBuilder;
34: import org.joda.time.format.ISODateTimeFormat;
35:
36: /**
37: * MonthDay is an immutable partial supporting the monthOfYear and dayOfMonth fields.
38: *

39: * NOTE: This class only supports the two fields listed above.
40: * It is impossible to query any other fields, such as dayOfWeek or centuryOfEra.
41: *

42: * Calculations on MonthDay are performed using a {@link Chronology}.
43: * This chronology is set to be in the UTC time zone for all calculations.
44: *

45: * One use case for this class is to store a birthday without the year (to avoid
46: * storing the age of the person).
47: * This class can be used as the gMonthDay type in XML Schema.
48: *

49: * Each individual field can be queried in two ways:
50: *

51: *
getMonthOfYear()
52: *
monthOfYear().get()
53: *

54: * The second technique also provides access to other useful methods on the
55: * field:
56: *

57: *
numeric value - monthOfYear().get()
58: *
text value - monthOfYear().getAsText()
59: *
short text value - monthOfYear().getAsShortText()
60: *
maximum/minimum values - monthOfYear().getMaximumValue()
61: *
add/subtract - monthOfYear().addToCopy()
62: *
set - monthOfYear().setCopy()
63: *

64: *

65: * MonthDay is thread-safe and immutable, provided that the Chronology is as well.
66: * All standard Chronology classes supplied are thread-safe and immutable.
67: *
68: * @author Chris Pheby
69: * @since 2.0
70: */
71: public final class MonthDay
72: extends BasePartial
73: implements ReadablePartial, Serializable {
74:
75: /** Serialization version */
76: private static final long serialVersionUID =<PHONE_NUMBER>050434609L;
77:
78: /** The singleton set of field types */
79: private static final DateTimeFieldType[] FIELD_TYPES = new DateTimeFieldType[] {
80: DateTimeFieldType.monthOfYear(),
81: DateTimeFieldType.dayOfMonth(), };
82:
83: /** The singleton set of field types */
84: private static final DateTimeFormatter PARSER = new DateTimeFormatterBuilder()
85: .appendOptional(ISODateTimeFormat.localDateParser().getParser())
86: .appendOptional(DateTimeFormat.forPattern("--MM-dd").getParser()).toFormatter();
87:
88: /** The index of the monthOfYear field in the field array */
89: public static final int MONTH_OF_YEAR = 0;
90: /** The index of the day field in the field array */
91: public static final int DAY_OF_MONTH = 1;
92:
93: //-----------------------------------------------------------------------
94: /**
95: * Obtains a {@code MonthDay} set to the current system millisecond time
96: * using ISOChronology in the default time zone.
97: * The resulting object does not use the zone.
98: *
99: * @return the current month-day, not null
100: * @since 2.0
101: */
102: public static MonthDay now() {
103: return new MonthDay();
104: }
105:
106: /**
107: * Obtains a {@code MonthDay} set to the current system millisecond time
108: * using ISOChronology in the specified time zone.
109: * The resulting object does not use the zone.
110: *
111: * @param zone the time zone, not null
112: * @return the current month-day, not null
113: * @since 2.0
114: */
115: public static MonthDay now(DateTimeZone zone) {
116: if (zone == null) {
117: throw new NullPointerException("Zone must not be null");
118: }
119: return new MonthDay(zone);
120: }
121:
122: /**
123: * Obtains a {@code MonthDay} set to the current system millisecond time
124: * using the specified chronology.
125: * The resulting object does not use the zone.
126: *
127: * @param chronology the chronology, not null
128: * @return the current month-day, not null
129: * @since 2.0
130: */
131: public static MonthDay now(Chronology chronology) {
132: if (chronology == null) {
133: throw new NullPointerException("Chronology must not be null");
134: }
135: return new MonthDay(chronology);
136: }
137:
138: //-----------------------------------------------------------------------
139: /**
140: * Parses a {@code MonthDay} from the specified string.
141: *

142: * This uses {@link ISODateTimeFormat#localDateParser()} or the format {@code --MM-dd}.
143: *
144: * @param str the string to parse, not null
145: * @since 2.0
146: */
147: @FromString
148: public static MonthDay parse(String str) {
149: return parse(str, PARSER);
150: }
151:
152: /**
153: * Parses a {@code MonthDay} from the specified string using a formatter.
154: *
155: * @param str the string to parse, not null
156: * @param formatter the formatter to use, not null
157: * @since 2.0
158: */
159: public static MonthDay parse(String str, DateTimeFormatter formatter) {
160: LocalDate date = formatter.parseLocalDate(str);
161: return new MonthDay(date.getMonthOfYear(), date.getDayOfMonth());
162: }
163:
164: //-----------------------------------------------------------------------
165: /**
166: * Constructs a MonthDay from a java.util.Calendar
167: * using exactly the same field values avoiding any time zone effects.
168: *

169: * Each field is queried from the Calendar and assigned to the MonthDay.
170: *

171: * This factory method ignores the type of the calendar and always
172: * creates a MonthDay with ISO chronology. It is expected that you
173: * will only pass in instances of GregorianCalendar however
174: * this is not validated.
175: *
176: * @param calendar the Calendar to extract fields from
177: * @return the created MonthDay, never null
178: * @throws IllegalArgumentException if the calendar is null
179: * @throws IllegalArgumentException if the monthOfYear or dayOfMonth is invalid for the ISO chronology
180: */
181: public static MonthDay fromCalendarFields(Calendar calendar) {
182: if (calendar == null) {
183: throw new IllegalArgumentException("The calendar must not be null");
184: }
185: return new MonthDay(calendar.get(Calendar.MONTH) + 1, calendar.get(Calendar.DAY_OF_MONTH));
186: }
187:
188: /**
189: * Constructs a MonthDay from a java.util.Date
190: * using exactly the same field values avoiding any time zone effects.
191: *

192: * Each field is queried from the Date and assigned to the MonthDay.
193: *

194: * This factory method always creates a MonthDay with ISO chronology.
195: *
196: * @param date the Date to extract fields from
197: * @return the created MonthDay, never null
198: * @throws IllegalArgumentException if the calendar is null
199: * @throws IllegalArgumentException if the monthOfYear or dayOfMonth is invalid for the ISO chronology
200: */
201: @SuppressWarnings("deprecation")
202: public static MonthDay fromDateFields(Date date) {
203: if (date == null) {
204: throw new IllegalArgumentException("The date must not be null");
205: }
206: return new MonthDay(date.getMonth() + 1, date.getDate());
207: }
208:
209: //-----------------------------------------------------------------------
210: /**
211: * Constructs a MonthDay with the current monthOfYear, using ISOChronology in
212: * the default zone to extract the fields.
213: *

214: * The constructor uses the default time zone, resulting in the local time
215: * being initialised. Once the constructor is complete, all further calculations
216: * are performed without reference to a time-zone (by switching to UTC).
217: *
218: * @see #now()
219: */
220: public MonthDay() {
221: super();
222: }
223:
224: /**
225: * Constructs a MonthDay with the current month-day, using ISOChronology in
226: * the specified zone to extract the fields.
227: *

228: * The constructor uses the specified time zone to obtain the current month-day.
229: * Once the constructor is complete, all further calculations
230: * are performed without reference to a time-zone (by switching to UTC).
231: *
232: * @param zone the zone to use, null means default zone
233: * @see #now(DateTimeZone)
234: */
235: public MonthDay(DateTimeZone zone) {
236: super(ISOChronology.getInstance(zone));
237: }
238:
239: /**
240: * Constructs a MonthDay with the current month-day, using the specified chronology
241: * and zone to extract the fields.
242: *

243: * The constructor uses the time zone of the chronology specified.
244: * Once the constructor is complete, all further calculations are performed
245: * without reference to a time-zone (by switching to UTC).
246: *
247: * @param chronology the chronology, null means ISOChronology in the default zone
248: * @see #now(Chronology)
249: */
250: public MonthDay(Chronology chronology) {
251: super(chronology);
252: }
253:
254: /**
255: * Constructs a MonthDay extracting the partial fields from the specified
256: * milliseconds using the ISOChronology in the default zone.
257: *

258: * The constructor uses the default time zone, resulting in the local time
259: * being initialised. Once the constructor is complete, all further calculations
260: * are performed without reference to a time-zone (by switching to UTC).
261: *
262: * @param instant the milliseconds from 1970-01-01T00:00:00Z
263: */
264: public MonthDay(long instant) {
265: super(instant);
266: }
267:
268: /**
269: * Constructs a MonthDay extracting the partial fields from the specified
270: * milliseconds using the chronology provided.
271: *

272: * The constructor uses the time zone of the chronology specified.
273: * Once the constructor is complete, all further calculations are performed
274: * without reference to a time-zone (by switching to UTC).
275: *
276: * @param instant the milliseconds from 1970-01-01T00:00:00Z
277: * @param chronology the chronology, null means ISOChronology in the default zone
278: */
279: public MonthDay(long instant, Chronology chronology) {
280: super(instant, chronology);
281: }
282:
283: /**
284: * Constructs a MonthDay from an Object that represents some form of time.
285: *

286: * The recognised object types are defined in
287: * {@link org.joda.time.convert.ConverterManager ConverterManager} and
288: * include ReadableInstant, String, Calendar and Date.
289: * The String formats are described by {@link ISODateTimeFormat#localDateParser()}.
290: *

291: * The chronology used will be derived from the object, defaulting to ISO.
292: *
293: * @param instant the date-time object, null means now
294: * @throws IllegalArgumentException if the instant is invalid
295: */
296: public MonthDay(Object instant) {
297: super(instant, null, ISODateTimeFormat.localDateParser());
298: }
299:
300: /**
301: * Constructs a MonthDay from an Object that represents some form of time,
302: * using the specified chronology.
303: *

304: * The recognised object types are defined in
305: * {@link org.joda.time.convert.ConverterManager ConverterManager} and
306: * include ReadableInstant, String, Calendar and Date.
307: * The String formats are described by {@link ISODateTimeFormat#localDateParser()}.
308: *

309: * The constructor uses the time zone of the chronology specified.
310: * Once the constructor is complete, all further calculations are performed
311: * without reference to a time-zone (by switching to UTC).
312: * The specified chronology overrides that of the object.
313: *
314: * @param instant the date-time object, null means now
315: * @param chronology the chronology, null means ISO default
316: * @throws IllegalArgumentException if the instant is invalid
317: */
318: public MonthDay(Object instant, Chronology chronology) {
319: super(instant, DateTimeUtils.getChronology(chronology), ISODateTimeFormat.localDateParser());
320: }
321:
322: /**
323: * Constructs a MonthDay with specified year and month
324: * using ISOChronology.
325: *

326: * The constructor uses the no time zone initialising the fields as provided.
327: * Once the constructor is complete, all further calculations
328: * are performed without reference to a time-zone (by switching to UTC).
329: *
330: * @param monthOfYear the month of the year
331: * @param dayOfMonth the day of the month
332: */
333: public MonthDay(int monthOfYear, int dayOfMonth) {
334: this(monthOfYear, dayOfMonth, null);
335: }
336:
337: /**
338: * Constructs an instance set to the specified monthOfYear and dayOfMonth
339: * using the specified chronology, whose zone is ignored.
340: *

341: * If the chronology is null, ISOChronology is used.
342: *

343: * The constructor uses the time zone of the chronology specified.
344: * Once the constructor is complete, all further calculations are performed
345: * without reference to a time-zone (by switching to UTC).
346: *
347: * @param monthOfYear the month of the year
348: * @param dayOfMonth the day of the month
349: * @param chronology the chronology, null means ISOChronology in the default zone
350: */
351: public MonthDay(int monthOfYear, int dayOfMonth, Chronology chronology) {
352: super(new int[] {monthOfYear, dayOfMonth}, chronology);
353: }
354:
355: /**
356: * Constructs a MonthDay with chronology from this instance and new values.
357: *
358: * @param partial the partial to base this new instance on
359: * @param values the new set of values
360: */
361: MonthDay(MonthDay partial, int[] values) {
362: super(partial, values);
363: }
364:
365: /**
366: * Constructs a MonthDay with values from this instance and a new chronology.
367: *
368: * @param partial the partial to base this new instance on
369: * @param chrono the new chronology
370: */
371: MonthDay(MonthDay partial, Chronology chrono) {
372: super(partial, chrono);
373: }
374:
375: /**
376: * Handle broken serialization from other tools.
377: * @return the resolved object, not null
378: */
379: private Object readResolve() {
380: if (DateTimeZone.UTC.equals(getChronology().getZone()) == false) {
381: return new MonthDay(this, getChronology().withUTC());
382: }
383: return this;
384: }
385:
386: //-----------------------------------------------------------------------
387: /**
388: * Gets the number of fields in this partial, which is two.
389: * The supported fields are MonthOfYear and DayOfMonth.
390: * Note that only these fields may be queried.
391: *
392: * @return the field count, two
393: */
394: public int size() {
395: return 2;
396: }
397:
398: /**
399: * Gets the field for a specific index in the chronology specified.
400: *

401: * This method must not use any instance variables.
402: *
403: * @param index the index to retrieve
404: * @param chrono the chronology to use
405: * @return the field, never null
406: */
407: protected DateTimeField getField(int index, Chronology chrono) {
408: switch (index) {
409: case MONTH_OF_YEAR:
410: return chrono.monthOfYear();
411: case DAY_OF_MONTH:
412: return chrono.dayOfMonth();
413: default:
414: throw new IndexOutOfBoundsException("Invalid index: " + index);
415: }
416: }
417:
418: /**
419: * Gets the field type at the specified index.
420: *
421: * @param index the index to retrieve
422: * @return the field at the specified index, never null
423: * @throws IndexOutOfBoundsException if the index is invalid
424: */
425: public DateTimeFieldType getFieldType(int index) {
426: return FIELD_TYPES[index];
427: }
428:
429: /**
430: * Gets an array of the field type of each of the fields that this partial supports.
431: *

432: * The fields are returned largest to smallest, Month, Day.
433: *
434: * @return the array of field types (cloned), largest to smallest, never null
435: */
436: public DateTimeFieldType[] getFieldTypes() {
437: return (DateTimeFieldType[]) FIELD_TYPES.clone();
438: }
439:
440: //-----------------------------------------------------------------------
441: /**
442: * Returns a copy of this month-day with the specified chronology.
443: * This instance is immutable and unaffected by this method call.
444: *

445: * This method retains the values of the fields, thus the result will
446: * typically refer to a different instant.
447: *

448: * The time zone of the specified chronology is ignored, as MonthDay
449: * operates without a time zone.
450: *
451: * @param newChronology the new chronology, null means ISO
452: * @return a copy of this month-day with a different chronology, never null
453: * @throws IllegalArgumentException if the values are invalid for the new chronology
454: */
455: public MonthDay withChronologyRetainFields(Chronology newChronology) {
456: newChronology = DateTimeUtils.getChronology(newChronology);
457: newChronology = newChronology.withUTC();
458: if (newChronology == getChronology()) {
459: return this;
460: } else {
461: MonthDay newMonthDay = new MonthDay(this, newChronology);
462: newChronology.validate(newMonthDay, getValues());
463: return newMonthDay;
464: }
465: }
466:
467: /**
468: * Returns a copy of this month-day with the specified field set to a new value.
469: *

470: * For example, if the field type is dayOfMonth then the day
471: * would be changed in the returned instance.
472: *

473: * These three lines are equivalent:
474: *

475: * MonthDay updated = md.withField(DateTimeFieldType.dayOfMonth(), 6);
476: * MonthDay updated = md.dayOfMonth().setCopy(6);
477: * MonthDay updated = md.property(DateTimeFieldType.dayOfMonth()).setCopy(6);
478: *

479: *
480: * @param fieldType the field type to set, not null
481: * @param value the value to set
482: * @return a copy of this instance with the field set, never null
483: * @throws IllegalArgumentException if the value is null or invalid
484: */
485: public MonthDay withField(DateTimeFieldType fieldType, int value) {
486: int index = indexOfSupported(fieldType);
487: if (value == getValue(index)) {
488: return this;
489: }
490: int[] newValues = getValues();
491: newValues = getField(index).set(this, index, newValues, value);
492: return new MonthDay(this, newValues);
493: }
494:
495: /**
496: * Returns a copy of this month-day with the value of the specified field increased.
497: *

498: * If the addition is zero, then this is returned.
499: *

500: * These three lines are equivalent:
501: *

502: * MonthDay added = md.withFieldAdded(DurationFieldType.days(), 6);
503: * MonthDay added = md.plusDays(6);
504: * MonthDay added = md.dayOfMonth().addToCopy(6);
505: *

506: *
507: * @param fieldType the field type to add to, not null
508: * @param amount the amount to add
509: * @return a copy of this instance with the field updated, never null
510: * @throws IllegalArgumentException if the value is null or invalid
511: * @throws ArithmeticException if the new date-time exceeds the capacity
512: */
513: public MonthDay withFieldAdded(DurationFieldType fieldType, int amount) {
514: int index = indexOfSupported(fieldType);
515: if (amount == 0) {
516: return this;
517: }
518: int[] newValues = getValues();
519: newValues = getField(index).add(this, index, newValues, amount);
520: return new MonthDay(this, newValues);
521: }
522:
523: /**
524: * Returns a copy of this month-day with the specified period added.
525: *

526: * If the addition is zero, then this is returned.
527: * Fields in the period that aren't present in the partial are ignored.
528: *

529: * This method is typically used to add multiple copies of complex
530: * period instances. Adding one field is best achieved using methods
531: * like {@link #withFieldAdded(DurationFieldType, int)}
532: * or {@link #plusMonths(int)}.
533: *
534: * @param period the period to add to this one, null means zero
535: * @param scalar the amount of times to add, such as -1 to subtract once
536: * @return a copy of this instance with the period added, never null
537: * @throws ArithmeticException if the new date-time exceeds the capacity
538: */
539: public MonthDay withPeriodAdded(ReadablePeriod period, int scalar) {
540: if (period == null || scalar == 0) {
541: return this;
542: }
543: int[] newValues = getValues();
544: for (int i = 0; i < period.size(); i++) {
545: DurationFieldType fieldType = period.getFieldType(i);
546: int index = indexOf(fieldType);
547: if (index >= 0) {
548: newValues = getField(index).add(this, index, newValues,
549: FieldUtils.safeMultiply(period.getValue(i), scalar));
550: }
551: }
552: return new MonthDay(this, newValues);
553: }
554:
555: //-----------------------------------------------------------------------
556: /**
557: * Returns a copy of this month-day with the specified period added.
558: *

559: * If the amount is zero or null, then this is returned.
560: *

561: * This method is typically used to add complex period instances.
562: * Adding one field is best achieved using methods
563: * like {@link #plusMonths(int)}.
564: *
565: * @param period the duration to add to this one, null means zero
566: * @return a copy of this instance with the period added, never null
567: * @throws ArithmeticException if the new month-day exceeds the capacity
568: */
569: public MonthDay plus(ReadablePeriod period) {
570: return withPeriodAdded(period, 1);
571: }
572:
573: //-----------------------------------------------------------------------
574: /**
575: * Returns a copy of this month-day plus the specified number of months.
576: *

577: * This month-day instance is immutable and unaffected by this method call.
578: * The month will wrap at the end of the year from December to January.
579: * The day will be adjusted to the last valid value if necessary.
580: *

581: * The following three lines are identical in effect:
582: *

583: * MonthDay added = md.plusMonths(6);
584: * MonthDay added = md.plus(Period.months(6));
585: * MonthDay added = md.withFieldAdded(DurationFieldType.months(), 6);
586: *

587: *
588: * @param months the amount of months to add, may be negative
589: * @return the new month-day plus the increased months, never null
590: */
591: public MonthDay plusMonths(int months) {
592: return withFieldAdded(DurationFieldType.months(), months);
593: }
594:
595: /**
596: * Returns a copy of this month-day plus the specified number of days.
597: *

598: * This month-day instance is immutable and unaffected by this method call.
599: * The month will wrap at the end of the year from December to January.
600: *

601: * The following three lines are identical in effect:
602: *

603: * MonthDay added = md.plusDays(6);
604: * MonthDay added = md.plus(Period.days(6));
605: * MonthDay added = md.withFieldAdded(DurationFieldType.days(), 6);
606: *

607: *
608: * @param days the amount of days to add, may be negative
609: * @return the new month-day plus the increased days, never null
610: */
611: public MonthDay plusDays(int days) {
612: return withFieldAdded(DurationFieldType.days(), days);
613: }
614:
615: //-----------------------------------------------------------------------
616: /**
617: * Returns a copy of this month-day with the specified period taken away.
618: *

619: * If the amount is zero or null, then this is returned.
620: *

621: * This method is typically used to subtract complex period instances.
622: * Subtracting one field is best achieved using methods
623: * like {@link #minusMonths(int)}.
624: *
625: * @param period the period to reduce this instant by
626: * @return a copy of this instance with the period taken away, never null
627: * @throws ArithmeticException if the new month-day exceeds the capacity
628: */
629: public MonthDay minus(ReadablePeriod period) {
630: return withPeriodAdded(period, -1);
631: }
632:
633: //-----------------------------------------------------------------------
634: /**
635: * Returns a copy of this month-day minus the specified number of months.
636: *

637: * This MonthDay instance is immutable and unaffected by this method call.
638: * The month will wrap at the end of the year from January to December.
639: * The day will be adjusted to the last valid value if necessary.
640: *

641: * The following three lines are identical in effect:
642: *

643: * MonthDay subtracted = md.minusMonths(6);
644: * MonthDay subtracted = md.minus(Period.months(6));
645: * MonthDay subtracted = md.withFieldAdded(DurationFieldType.months(), -6);
646: *

647: *
648: * @param months the amount of months to subtract, may be negative
649: * @return the new month-day minus the increased months, never null
650: */
651: public MonthDay minusMonths(int months) {
652: return withFieldAdded(DurationFieldType.months(), FieldUtils.safeNegate(months));
653: }
654:
655: /**
656: * Returns a copy of this month-day minus the specified number of months.
657: *

658: * This month-day instance is immutable and unaffected by this method call.
659: * The month will wrap at the end of the year from January to December.
660: *

661: * The following three lines are identical in effect:
662: *

663: * MonthDay subtracted = md.minusDays(6);
664: * MonthDay subtracted = md.minus(Period.days(6));
665: * MonthDay subtracted = md.withFieldAdded(DurationFieldType.days(), -6);
666: *

667: *
668: * @param days the amount of days to subtract, may be negative
669: * @return the new month-day minus the increased days, never null
670: */
671: public MonthDay minusDays(int days) {
672: return withFieldAdded(DurationFieldType.days(), FieldUtils.safeNegate(days));
673: }
674:
675: //-----------------------------------------------------------------------
676: /**
677: * Converts this object to a LocalDate with the same month-day and chronology.
678: *
679: * @param year the year to use, valid for chronology
680: * @return a LocalDate with the same month-day and chronology, never null
681: */
682: public LocalDate toLocalDate(int year) {
683: return new LocalDate(year, getMonthOfYear(), getDayOfMonth(), getChronology());
684: }
685:
686: //-----------------------------------------------------------------------
687: /**
688: * Get the month of year field value.
689: *
690: * @return the month of year
691: */
692: public int getMonthOfYear() {
693: return getValue(MONTH_OF_YEAR);
694: }
695:
696: /**
697: * Get the day of month field value.
698: *
699: * @return the day of month
700: */
701: public int getDayOfMonth() {
702: return getValue(DAY_OF_MONTH);
703: }
704:
705: //-----------------------------------------------------------------------
706: /**
707: * Returns a copy of this month-day with the month of year field updated.
708: *

709: * MonthDay is immutable, so there are no set methods.
710: * Instead, this method returns a new instance with the value of
711: * month of year changed.
712: *
713: * @param monthOfYear the month of year to set
714: * @return a copy of this object with the field set, never null
715: * @throws IllegalArgumentException if the value is invalid
716: */
717: public MonthDay withMonthOfYear(int monthOfYear) {
718: int[] newValues = getValues();
719: newValues = getChronology().monthOfYear().set(this, MONTH_OF_YEAR, newValues, monthOfYear);
720: return new MonthDay(this, newValues);
721: }
722:
723: /**
724: * Returns a copy of this month-day with the day of month field updated.
725: *

726: * MonthDay is immutable, so there are no set methods.
727: * Instead, this method returns a new instance with the value of
728: * day of month changed.
729: *
730: * @param dayOfMonth the day of month to set
731: * @return a copy of this object with the field set, never null
732: * @throws IllegalArgumentException if the value is invalid
733: */
734: public MonthDay withDayOfMonth(int dayOfMonth) {
735: int[] newValues = getValues();
736: newValues = getChronology().dayOfMonth().set(this, DAY_OF_MONTH, newValues, dayOfMonth);
737: return new MonthDay(this, newValues);
738: }
739:
740: //-----------------------------------------------------------------------
741: /**
742: * Gets the property object for the specified type, which contains
743: * many useful methods.
744: *
745: * @param type the field type to get the property for
746: * @return the property object
747: * @throws IllegalArgumentException if the field is null or unsupported
748: */
749: public Property property(DateTimeFieldType type) {
750: return new Property(this, indexOfSupported(type));
751: }
752:
753: //-----------------------------------------------------------------------
754: /**
755: * Get the month of year field property which provides access to advanced functionality.
756: *
757: * @return the month of year property
758: */
759: public Property monthOfYear() {
760: return new Property(this, MONTH_OF_YEAR);
761: }
762:
763: /**
764: * Get the day of month field property which provides access to advanced functionality.
765: *
766: * @return the day of month property
767: */
768: public Property dayOfMonth() {
769: return new Property(this, DAY_OF_MONTH);
770: }
771:
772: //-----------------------------------------------------------------------
773: /**
774: * Output the month-day in ISO8601 format (--MM-dd).
775: *
776: * @return ISO8601 time formatted string.
777: */
778: @ToString
779: public String toString() {
780: List<DateTimeFieldType> fields = new ArrayList<DateTimeFieldType>();
781: fields.add(DateTimeFieldType.monthOfYear());
782: fields.add(DateTimeFieldType.dayOfMonth());
783: return ISODateTimeFormat.forFields(fields, true, true).print(this);
784: }
785:
786: /**
787: * Output the month-day using the specified format pattern.
788: *
789: * @param pattern the pattern specification, null means use toString
790: * @see org.joda.time.format.DateTimeFormat
791: */
792: public String toString(String pattern) {
793: if (pattern == null) {
794: return toString();
795: }
796: return DateTimeFormat.forPattern(pattern).print(this);
797: }
798:
799: /**
800: * Output the month-day using the specified format pattern.
801: *
802: * @param pattern the pattern specification, null means use toString
803: * @param locale Locale to use, null means default
804: * @see org.joda.time.format.DateTimeFormat
805: */
806: public String toString(String pattern, Locale locale) throws IllegalArgumentException {
807: if (pattern == null) {
808: return toString();
809: }
810: return DateTimeFormat.forPattern(pattern).withLocale(locale).print(this);
811: }
812:
813: //-----------------------------------------------------------------------
814: /**
815: * The property class for MonthDay.
816: *

817: * This class binds a YearMonth to a DateTimeField.
818: *
819: * @author Chris Pheby
820: * @since 2.0
821: */
822: public static class Property extends AbstractPartialFieldProperty implements Serializable {
823:
824: /** Serialization version */
825: private static final long serialVersionUID =<PHONE_NUMBER>190224363L;
826:
827: /** The partial */
828: private final MonthDay iBase;
829: /** The field index */
830: private final int iFieldIndex;
831:
832: /**
833: * Constructs a property.
834: *
835: * @param partial the partial instance
836: * @param fieldIndex the index in the partial
837: */
838: Property(MonthDay partial, int fieldIndex) {
839: super();
840: iBase = partial;
841: iFieldIndex = fieldIndex;
842: }
843:
844: /**
845: * Gets the field that this property uses.
846: *
847: * @return the field
848: */
849: public DateTimeField getField() {
850: return iBase.getField(iFieldIndex);
851: }
852:
853: /**
854: * Gets the partial that this property belongs to.
855: *
856: * @return the partial
857: */
858: protected ReadablePartial getReadablePartial() {
859: return iBase;
860: }
861:
862: /**
863: * Gets the partial that this property belongs to.
864: *
865: * @return the partial
866: */
867: public MonthDay getMonthDay() {
868: return iBase;
869: }
870:
871: /**
872: * Gets the value of this field.
873: *
874: * @return the field value
875: */
876: public int get() {
877: return iBase.getValue(iFieldIndex);
878: }
879:
880: //-----------------------------------------------------------------------
881: /**
882: * Adds to the value of this field in a copy of this MonthDay.
883: *

884: * The value will be added to this field. If the value is too large to be
885: * added solely to this field then it will affect larger fields.
886: * Smaller fields are unaffected.
887: *

888: * The MonthDay attached to this property is unchanged by this call.
889: * Instead, a new instance is returned.
890: *
891: * @param valueToAdd the value to add to the field in the copy
892: * @return a copy of the MonthDay with the field value changed
893: * @throws IllegalArgumentException if the value isn't valid
894: */
895: public MonthDay addToCopy(int valueToAdd) {
896: int[] newValues = iBase.getValues();
897: newValues = getField().add(iBase, iFieldIndex, newValues, valueToAdd);
898: return new MonthDay(iBase, newValues);
899: }
900:
901: /**
902: * Adds to the value of this field in a copy of this MonthDay wrapping
903: * within this field if the maximum value is reached.
904: *

905: * The value will be added to this field. If the value is too large to be
906: * added solely to this field then it wraps within this field.
907: * Other fields are unaffected.
908: *

909: * For example,
910: * --12-30 addWrapField one month returns --01-30.
911: *

912: * The MonthDay attached to this property is unchanged by this call.
913: * Instead, a new instance is returned.
914: *
915: * @param valueToAdd the value to add to the field in the copy
916: * @return a copy of the MonthDay with the field value changed
917: * @throws IllegalArgumentException if the value isn't valid
918: */
919: public MonthDay addWrapFieldToCopy(int valueToAdd) {
920: int[] newValues = iBase.getValues();
921: newValues = getField().addWrapField(iBase, iFieldIndex, newValues, valueToAdd);
922: return new MonthDay(iBase, newValues);
923: }
924:
925: //-----------------------------------------------------------------------
926: /**
927: * Sets this field in a copy of the MonthDay.
928: *

929: * The MonthDay attached to this property is unchanged by this call.
930: * Instead, a new instance is returned.
931: *
932: * @param value the value to set the field in the copy to
933: * @return a copy of the MonthDay with the field value changed
934: * @throws IllegalArgumentException if the value isn't valid
935: */
936: public MonthDay setCopy(int value) {
937: int[] newValues = iBase.getValues();
938: newValues = getField().set(iBase, iFieldIndex, newValues, value);
939: return new MonthDay(iBase, newValues);
940: }
941:
942: /**
943: * Sets this field in a copy of the MonthDay to a parsed text value.
944: *

945: * The MonthDay attached to this property is unchanged by this call.
946: * Instead, a new instance is returned.
947: *
948: * @param text the text value to set
949: * @param locale optional locale to use for selecting a text symbol
950: * @return a copy of the MonthDay with the field value changed
951: * @throws IllegalArgumentException if the text value isn't valid
952: */
953: public MonthDay setCopy(String text, Locale locale) {
954: int[] newValues = iBase.getValues();
955: newValues = getField().set(iBase, iFieldIndex, newValues, text, locale);
956: return new MonthDay(iBase, newValues);
957: }
958:
959: /**
960: * Sets this field in a copy of the MonthDay to a parsed text value.
961: *

962: * The MonthDay attached to this property is unchanged by this call.
963: * Instead, a new instance is returned.
964: *
965: * @param text the text value to set
966: * @return a copy of the MonthDay with the field value changed
967: * @throws IllegalArgumentException if the text value isn't valid
968: */
969: public MonthDay setCopy(String text) {
970: return setCopy(text, null);
971: }
972: }
973:
974: }
| ID | Line | Type | Detected |
|---|
| 10103 | 116 | Negate jump condition (Replace IFNONNULL with IFNULL) | |
| 10104 | 132 | Negate jump condition (Replace IFNONNULL with IFNULL) | |
| 10105 | 149 | Remove method call | |
| 10106 | 160 | Remove method call | |
| 10107 | 161 | Remove method call | |
| 10108 | 161(1) | Remove method call | |
| 10109 | 182 | Negate jump condition (Replace IFNONNULL with IFNULL) | |
| 10110 | 185 | Replace a constant (Replace 2 with 3(INT)) | |
| 10112 | 185 | Replace a constant (Replace 2 with 0(INT)) | |
| 10111 | 185 | Replace a constant (Replace 2 with 1(INT)) | |
| 10115 | 185(1) | Replace a constant (Replace 1 with 0(INT)) | |
| 10114 | 185(1) | Replace a constant (Replace 1 with 2(INT)) | |
| 10117 | 185(2) | Replace a constant (Replace 5 with 0(INT)) | |
| 10118 | 185(2) | Replace a constant (Replace 5 with 6(INT)) | |
| 10119 | 185(2) | Replace a constant (Replace 5 with 4(INT)) | |
| 10116 | 185 | Replace arithmetic operator (Replace IADD with ISUB) | |
| 10113 | 185 | Remove method call | |
| 10120 | 185(1) | Remove method call | |
| 10121 | 203 | Negate jump condition (Replace IFNONNULL with IFNULL) | |
| 10124 | 206 | Replace a constant (Replace 1 with 0(INT)) | |
| 10123 | 206 | Replace a constant (Replace 1 with 2(INT)) | |
| 10125 | 206 | Replace arithmetic operator (Replace IADD with ISUB) | |
| 10122 | 206 | Remove method call | |
| 10126 | 206(1) | Remove method call | |
| 10127 | 352 | Replace a constant (Replace 2 with 3(INT)) | |
| 10128 | 352 | Replace a constant (Replace 2 with 1(INT)) | |
| 10129 | 352 | Replace a constant (Replace 2 with 0(INT)) | |
| 10130 | 352(1) | Replace a constant (Replace 0 with 1(INT)) | |
| 10131 | 352(1) | Replace a constant (Replace 0 with -1(INT)) | |
| 10132 | 352(2) | Replace a constant (Replace 1 with 2(INT)) | |
| 10133 | 352(2) | Replace a constant (Replace 1 with 0(INT)) | |
| 10137 | 380 | Negate jump condition (Replace IFNE with IFEQ) | |
| 10134 | 380 | Remove method call | |
| 10135 | 380(1) | Remove method call | |
| 10136 | 380(2) | Remove method call | |
| 10138 | 381 | Remove method call | |
| 10139 | 381(1) | Remove method call | |
| 10140 | 395 | Replace a constant (Replace 2 with 3(INT)) | |
| 10141 | 395 | Replace a constant (Replace 2 with 1(INT)) | |
| 10142 | 395 | Replace a constant (Replace 2 with 0(INT)) | |
| 10143 | 410 | Remove method call | |
| 10144 | 412 | Remove method call | |
| 10145 | 414 | Remove method call | |
| 10146 | 414(1) | Remove method call | |
| 10147 | 414(2) | Remove method call | |
| 10148 | 437 | Remove method call | |
| 10149 | 456 | Remove method call | |
| 10150 | 457 | Remove method call | |
| 10152 | 458 | Negate jump condition (Replace IF_ACMPNE with IF_ACMPEQ) | |
| 10151 | 458 | Remove method call | |
| 10153 | 462 | Remove method call | |
| 10154 | 462(1) | Remove method call | |
| 10155 | 486 | Remove method call | |
| 10157 | 487 | Negate jump condition (Replace IF_ICMPNE with IF_ICMPEQ) | |
| 10156 | 487 | Remove method call | |
| 10158 | 490 | Remove method call | |
| 10159 | 491 | Remove method call | |
| 10160 | 491(1) | Remove method call | |
| 10161 | 514 | Remove method call | |
| 10162 | 515 | Negate jump condition (Replace IFNE with IFEQ) | |
| 10163 | 518 | Remove method call | |
| 10164 | 519 | Remove method call | |
| 10165 | 519(1) | Remove method call | |
| 10166 | 540 | Negate jump condition (Replace IFNULL with IFNONNULL) | |
| 10167 | 540(1) | Negate jump condition (Replace IFNE with IFEQ) | |
| 10168 | 543 | Remove method call | |
| 10170 | 544 | Replace a constant (Replace 0 with -1(INT)) | |
| 10169 | 544 | Replace a constant (Replace 0 with 1(INT)) | |
| 10172 | 544 | Negate jump condition (Replace IF_ICMPGE with IF_ICMPLT) | |
| 10171 | 544 | Remove method call | |
| 10173 | 545 | Remove method call | |
| 10174 | 546 | Remove method call | |
| 10175 | 547 | Negate jump condition (Replace IFLT with IFGE) | |
| 10176 | 548 | Remove method call | |
| 10177 | 548(1) | Remove method call | |
| 10178 | 548(2) | Remove method call | |
| 10179 | 548(3) | Remove method call | |
| 10181 | 570 | Replace a constant (Replace 1 with 0(INT)) | |
| 10180 | 570 | Replace a constant (Replace 1 with 2(INT)) | |
| 10182 | 570 | Remove method call | |
| 10183 | 592 | Remove method call | |
| 10184 | 592(1) | Remove method call | |
| 10185 | 612 | Remove method call | |
| 10186 | 612(1) | Remove method call | |
| 10187 | 630 | Replace a constant (Replace -1 with 0(INT)) | |
| 10188 | 630 | Replace a constant (Replace -1 with -2(INT)) | |
| 10189 | 630 | Remove method call | |
| 10190 | 652 | Remove method call | |
| 10191 | 652(1) | Remove method call | |
| 10192 | 652(2) | Remove method call | |
| 10193 | 672 | Remove method call | |
| 10194 | 672(1) | Remove method call | |
| 10195 | 672(2) | Remove method call | |
| 10196 | 683 | Remove method call | |
| 10197 | 683(1) | Remove method call | |
| 10198 | 683(2) | Remove method call | |
| 10199 | 693 | Replace a constant (Replace 0 with 1(INT)) | |
| 10200 | 693 | Replace a constant (Replace 0 with -1(INT)) | |
| 10201 | 693 | Remove method call | |
| 10203 | 702 | Replace a constant (Replace 1 with 0(INT)) | |
| 10202 | 702 | Replace a constant (Replace 1 with 2(INT)) | |
| 10204 | 702 | Remove method call | |
| 10205 | 718 | Remove method call | |
| 10209 | 719 | Replace a constant (Replace 0 with -1(INT)) | |
| 10208 | 719 | Replace a constant (Replace 0 with 1(INT)) | |
| 10206 | 719 | Remove method call | |
| 10207 | 719(1) | Remove method call | |
| 10210 | 719(2) | Remove method call | |
| 10211 | 735 | Remove method call | |
| 10215 | 736 | Replace a constant (Replace 1 with 0(INT)) | |
| 10214 | 736 | Replace a constant (Replace 1 with 2(INT)) | |
| 10212 | 736 | Remove method call | |
| 10213 | 736(1) | Remove method call | |
| 10216 | 736(2) | Remove method call | |
| 10217 | 750 | Remove method call | |
| 10218 | 760 | Replace a constant (Replace 0 with 1(INT)) | |
| 10219 | 760 | Replace a constant (Replace 0 with -1(INT)) | |
| 10221 | 769 | Replace a constant (Replace 1 with 0(INT)) | |
| 10220 | 769 | Replace a constant (Replace 1 with 2(INT)) | |
| 10222 | 781 | Remove method call | |
| 10223 | 781(1) | Remove method call | |
| 10224 | 782 | Remove method call | |
| 10225 | 782(1) | Remove method call | |
| 10227 | 783 | Replace a constant (Replace 1 with 0(INT)) | |
| 10226 | 783 | Replace a constant (Replace 1 with 2(INT)) | |
| 10228 | 783(1) | Replace a constant (Replace 1 with 2(INT)) | |
| 10229 | 783(1) | Replace a constant (Replace 1 with 0(INT)) | |
| 10230 | 783 | Remove method call | |
| 10231 | 783(1) | Remove method call | |
| 10232 | 793 | Negate jump condition (Replace IFNONNULL with IFNULL) | |
| 10233 | 794 | Remove method call | |
| 10234 | 796 | Remove method call | |
| 10235 | 796(1) | Remove method call | |
| 10236 | 807 | Negate jump condition (Replace IFNONNULL with IFNULL) | |
| 10237 | 808 | Remove method call | |
| 10238 | 810 | Remove method call | |
| 10239 | 810(1) | Remove method call | |
| 10240 | 810(2) | Remove method call | |
| 21031 | 850 | Remove method call | |
| 21032 | 877 | Remove method call | |
| 21033 | 896 | Remove method call | |
| 21034 | 897 | Remove method call | |
| 21035 | 897(1) | Remove method call | |
| 21036 | 920 | Remove method call | |
| 21037 | 921 | Remove method call | |
| 21038 | 921(1) | Remove method call | |
| 21039 | 937 | Remove method call | |
| 21040 | 938 | Remove method call | |
| 21041 | 938(1) | Remove method call | |
| 21042 | 954 | Remove method call | |
| 21043 | 955 | Remove method call | |
| 21044 | 955(1) | Remove method call | |
| 21045 | 970 | Remove method call | |


TURBULENCE A film review by Scott Renshaw Copyright 1997 Scott Renshaw
(MGM) Starring: Ray Liotta, Lauren Holly, Hector Elizondo, Rachel Ticotin. Screenplay: Jonathan Brett. Producers: Martin Ransohoff, David Valdes. Director: Robert Butler. MPAA Rating: R (violence, strong profanity, adult themes) Running Time: 103 minutes. Reviewed by Scott Renshaw.
TURBULENCE is an interesting case of the kind of baby steps Hollywood takes when it comes to making women equal players in the movie business. Ten years ago, Sigourney Weaver proved in ALIENS that a woman could carry a large-scale action film; since then, things have gone from bad to worse for women in action films. With TURBULENCE we finally get an entry in the well-worn "terror in a confined space" genre which features a woman as the central protagonist -- not just as a ready-for-kidnapping love interest -- and she can't even get first billing ahead of Ray Liotta. Of course Lauren Holly is hardly a familiar face or name, which begs the question of why she received such a plum role. That is only one of the places TURBULENCE, a thriller with unique and sometimes compelling rhythms, misses its chance to be something special.
Holly stars as Teri Halloran, an airline flight attendant working a New York-to-Los Angeles Christmas eve flight with only a handful of passengers. Ordinarily that would mean a quiet and uneventful flight, except that two of the passengers are prisoners in federal custody, including convicted serial killer Ryan Weaver (Liotta). A charmer who protests that he was framed by an over-zealous cop (Hector Elizondo), Weaver begins to win Teri's trust, and appears to save the day when the other prisoners escapes and kills the federal marshals and the flight crew. With no one left to fly the plane to safety, and a massive storm ahead, Teri seems to be the only chance the surviving passengers have of getting to Los Angeles alive. That chance becomes a lot slimmer when Weaver shows his true colors, and decides that going down in flaming wreckage is more appealing that a long wait on death row.
The opening minutes of TURBULENCE make it clear that scripter Jonathan Brett and director Robert Butler are in full "cut to the chase" mode. Our knowledge of Teri as a character consists of the fact that her fiancee just dumped her, which in turn is infinitely more than we know about any other character on the plane. The five civilian passengers each get ten seconds of exposition before they are trundled off to a closet for the rest of the film, but it is just as well they were out of the way. TURBULENCE works best as a physical and psychological mano-a-mano between Teri and Weaver, with the 747 turning into a careening Winchester Mystery House of mysterious passageways. Butler gives much of the first half of TURBULENCE an effective tension; the atmosphere is surprisingly creepy, with lightning and Christmas tree lights turning the central confrontation between Teri and Weaver into something more unsettling than the pedestrian script could muster on its own.
Ray Liotta is an interesting villain through that scene, insisting on his innocence as he works at getting inside Teri's head. It is a casually seductive portrayal by Liotta, and sets up a scenario where the hero will have to outsmart the intelligent antagonist, since as a woman it is less likely that she will be able to overpower him physically. Unfortunately, we already know from the idiotically revelatory ad campaign not only that Weaver is in fact guilty as charged, but also that he is going to turn into a bug-eyed, tongue-waggling loon. Liotta tramples the mid-air scenery swigging champagne from the bottle, swinging an axe around, tossing off glib quips and generally doing his best audition for the role of the Joker if the BATMAN series decides to revive him and Nicholson is unavailable. So much for a battle of the minds.
It is a strange decision for many reasons, but primarily because the film spends so much time establishing how bright Teri is. Lauren Holly's performance doesn't contribute all that much to that perception; she's feisty enough, but she seems to be going through the motions when the script gives her a shot at Weaver, and it is hard not to be reminded of Julie Haggerty's thin-voiced flight attendant from AIRPLANE! when Holly has to struggle with the auto-pilot. No, Teri's smarts are revealed in a series of scenes in which a British pilot (Ben Cross) talks her through the landing process. Those scenes, far longer and more technical than you might expect, could have anxious action fans fidgeting in their seats, but the simple competence of Cross's tones give them a steady, gripping tempo. Rachel Ticotin is similarly strong in the similarly miniscule role of an air traffic controller, radiating the kind of intelligence the role of Teri really needs. In fact, if TURBULENCE was going to give us a female hero, it could have gone the extra step and given us one as strong as Ticotin. Go one step still further and make Cross the sly, seductive villain, and you really could have had something. TURBULENCE may be a better than average adrenaline shot, but it's still basically business as usual, even with no Arnold or Sly or Jean-Claude.
On the Renshaw scale of 0 to 10 plane figures: 6.
Visit Scott Renshaw's MoviePage http://www-leland.stanford.edu/~srenshaw Subscribe to receive reviews directly via email See details on the MoviePage
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


Quick reference for the ESP8266¶
The Adafruit Feather HUZZAH board (image attribution: Adafruit).
Below is a quick reference for ESP8266-based boards. If it is your first time working with this board please consider reading the following sections first:
Installing MicroPython¶
See the corresponding section of tutorial: Getting started with MicroPython on the ESP8266. It also includes a troubleshooting subsection.
General board control¶
The MicroPython REPL is on UART0 (GPIO1=TX, GPIO3=RX) at baudrate 115200. Tab-completion is useful to find out what methods an object has. Paste mode (ctrl-E) is useful to paste a large slab of Python code into the REPL.
The machine
module:
import machine
machine.freq() # get the current frequency of the CPU
machine.freq(160000000) # set the CPU frequency to 160 MHz
The esp
module:
import esp
esp.osdebug(None) # turn off vendor O/S debugging messages
esp.osdebug(0) # redirect vendor O/S debugging messages to UART(0)
Networking¶
The network
module:
import network
wlan = network.WLAN(network.STA_IF) # create station interface
wlan.active(True) # activate the interface
wlan.scan() # scan for access points
wlan.isconnected() # check if the station is connected to an AP
wlan.connect('essid', 'password') # connect to an AP
wlan.config('mac') # get the interface's MAC address
wlan.ifconfig() # get the interface's IP/netmask/gw/DNS addresses
ap = network.WLAN(network.AP_IF) # create access-point interface
ap.active(True) # activate the interface
ap.config(essid='ESP-AP') # set the ESSID of the access point
A useful function for connecting to your local WiFi network is:
def do_connect():
import network
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
if not wlan.isconnected():
print('connecting to network...')
wlan.connect('essid', 'password')
while not wlan.isconnected():
pass
print('network config:', wlan.ifconfig())
Once the network is established the socket
module can be used
to create and use TCP/UDP sockets as usual.
Delay and timing¶
Use the time
module:
import time
time.sleep(1) # sleep for 1 second
time.sleep_ms(500) # sleep for 500 milliseconds
time.sleep_us(10) # sleep for 10 microseconds
start = time.ticks_ms() # get millisecond counter
delta = time.ticks_diff(time.ticks_ms(), start) # compute time difference
Timers¶
Virtual (RTOS-based) timers are supported. Use the machine.Timer class with timer ID of -1:
from machine import Timer
tim = Timer(-1)
tim.init(period=5000, mode=Timer.ONE_SHOT, callback=lambda t:print(1))
tim.init(period=2000, mode=Timer.PERIODIC, callback=lambda t:print(2))
The period is in milliseconds.
Pins and GPIO¶
Use the machine.Pin class:
from machine import Pin
p0 = Pin(0, Pin.OUT) # create output pin on GPIO0
p0.on() # set pin to "on" (high) level
p0.off() # set pin to "off" (low) level
p0.value(1) # set pin to on/high
p2 = Pin(2, Pin.IN) # create input pin on GPIO2
print(p2.value()) # get value, 0 or 1
p4 = Pin(4, Pin.IN, Pin.PULL_UP) # enable internal pull-up resistor
p5 = Pin(5, Pin.OUT, value=1) # set pin high on creation
Available pins are: 0, 1, 2, 3, 4, 5, 12, 13, 14, 15, 16, which correspond to the actual GPIO pin numbers of ESP8266 chip. Note that many end-user boards use their own adhoc pin numbering (marked e.g. D0, D1, …). As MicroPython supports different boards and modules, physical pin numbering was chosen as the lowest common denominator. For mapping between board logical pins and physical chip pins, consult your board documentation.
Note that Pin(1) and Pin(3) are REPL UART TX and RX respectively.
Also note that Pin(16) is a special pin (used for wakeup from deepsleep
mode) and may be not available for use with higher-level classes like
Neopixel
.
There’s a higher-level abstraction machine.Signal
which can be used to invert a pin. Useful for illuminating active-low LEDs
using on()
or value(1)
.
UART (serial bus)¶
See machine.UART.
from machine import UART
uart = UART(0, baudrate=9600)
uart.write('hello')
uart.read(5) # read up to 5 bytes
Two UARTs are available. UART0 is on Pins 1 (TX) and 3 (RX). UART0 is bidirectional, and by default is used for the REPL. UART1 is on Pins 2 (TX) and 8 (RX) however Pin 8 is used to connect the flash chip, so UART1 is TX only.
When UART0 is attached to the REPL, all incoming chars on UART(0) go straight to stdin so uart.read() will always return None. Use sys.stdin.read() if it’s needed to read characters from the UART(0) while it’s also used for the REPL (or detach, read, then reattach). When detached the UART(0) can be used for other purposes.
If there are no objects in any of the dupterm slots when the REPL is started (on hard or soft reset) then UART(0) is automatically attached. Without this, the only way to recover a board without a REPL would be to completely erase and reflash (which would install the default boot.py which attaches the REPL).
To detach the REPL from UART0, use:
import os
os.dupterm(None, 1)
The REPL is attached by default. If you have detached it, to reattach it use:
import os, machine
uart = machine.UART(0, 115200)
os.dupterm(uart, 1)
PWM (pulse width modulation)¶
PWM can be enabled on all pins except Pin(16). There is a single frequency for all channels, with range between 1 and 1000 (measured in Hz). The duty cycle is between 0 and 1023 inclusive.
Use the machine.PWM
class:
from machine import Pin, PWM
pwm0 = PWM(Pin(0)) # create PWM object from a pin
pwm0.freq() # get current frequency
pwm0.freq(1000) # set frequency
pwm0.duty() # get current duty cycle
pwm0.duty(200) # set duty cycle
pwm0.deinit() # turn off PWM on the pin
pwm2 = PWM(Pin(2), freq=500, duty=512) # create and configure in one go
ADC (analog to digital conversion)¶
ADC is available on a dedicated pin. Note that input voltages on the ADC pin must be between 0v and 1.0v.
Use the machine.ADC class:
from machine import ADC
adc = ADC(0) # create ADC object on ADC pin
adc.read() # read value, 0-1024
Software SPI bus¶
There are two SPI drivers. One is implemented in software (bit-banging) and works on all pins, and is accessed via the machine.SoftSPI class:
from machine import Pin, SoftSPI
# construct an SPI bus on the given pins
# polarity is the idle state of SCK
# phase=0 means sample on the first edge of SCK, phase=1 means the second
spi = SoftSPI(baudrate=100000, polarity=1, phase=0, sck=Pin(0), mosi=Pin(2), miso=Pin(4))
spi.init(baudrate=200000) # set the baudrate
spi.read(10) # read 10 bytes on MISO
spi.read(10, 0xff) # read 10 bytes while outputting 0xff on MOSI
buf = bytearray(50) # create a buffer
spi.readinto(buf) # read into the given buffer (reads 50 bytes in this case)
spi.readinto(buf, 0xff) # read into the given buffer and output 0xff on MOSI
spi.write(b'12345') # write 5 bytes on MOSI
buf = bytearray(4) # create a buffer
spi.write_readinto(b'1234', buf) # write to MOSI and read from MISO into the buffer
spi.write_readinto(buf, buf) # write buf to MOSI and read MISO back into buf
Hardware SPI bus¶
The hardware SPI is faster (up to 80Mhz), but only works on following pins:
MISO
is GPIO12, MOSI
is GPIO13, and SCK
is GPIO14. It has the same
methods as the bitbanging SPI class above, except for the pin parameters for the
constructor and init (as those are fixed):
from machine import Pin, SPI
hspi = SPI(1, baudrate=80000000, polarity=0, phase=0)
(SPI(0)
is used for FlashROM and not available to users.)
I2C bus¶
The I2C driver is implemented in software and works on all pins, and is accessed via the machine.I2C class (which is an alias of machine.SoftI2C):
from machine import Pin, I2C
# construct an I2C bus
i2c = I2C(scl=Pin(5), sda=Pin(4), freq=100000)
i2c.readfrom(0x3a, 4) # read 4 bytes from peripheral device with address 0x3a
i2c.writeto(0x3a, '12') # write '12' to peripheral device with address 0x3a
buf = bytearray(10) # create a buffer with 10 bytes
i2c.writeto(0x3a, buf) # write the given buffer to the peripheral
Real time clock (RTC)¶
See machine.RTC
from machine import RTC
rtc = RTC()
rtc.datetime((2017, 8, 23, 1, 12, 48, 0, 0)) # set a specific date and time
rtc.datetime() # get date and time
# synchronize with ntp
# need to be connected to wifi
import ntptime
ntptime.settime() # set the rtc datetime from the remote server
rtc.datetime() # get the date and time in UTC
Note
Not all methods are implemented: RTC.now()
, RTC.irq(handler=*)
(using a custom handler), RTC.init()
and RTC.deinit()
are
currently not supported.
WDT (Watchdog timer)¶
See machine.WDT.
from machine import WDT
# enable the WDT
wdt = WDT()
wdt.feed()
Deep-sleep mode¶
Connect GPIO16 to the reset pin (RST on HUZZAH). Then the following code can be used to sleep, wake and check the reset cause:
import machine
# configure RTC.ALARM0 to be able to wake the device
rtc = machine.RTC()
rtc.irq(trigger=rtc.ALARM0, wake=machine.DEEPSLEEP)
# check if the device woke from a deep sleep
if machine.reset_cause() == machine.DEEPSLEEP_RESET:
print('woke from a deep sleep')
# set RTC.ALARM0 to fire after 10 seconds (waking the device)
rtc.alarm(rtc.ALARM0, 10000)
# put the device to sleep
machine.deepsleep()
OneWire driver¶
The OneWire driver is implemented in software and works on all pins:
from machine import Pin
import onewire
ow = onewire.OneWire(Pin(12)) # create a OneWire bus on GPIO12
ow.scan() # return a list of devices on the bus
ow.reset() # reset the bus
ow.readbyte() # read a byte
ow.writebyte(0x12) # write a byte on the bus
ow.write('123') # write bytes on the bus
ow.select_rom(b'12345678') # select a specific device by its ROM code
There is a specific driver for DS18S20 and DS18B20 devices:
import time, ds18x20
ds = ds18x20.DS18X20(ow)
roms = ds.scan()
ds.convert_temp()
time.sleep_ms(750)
for rom in roms:
print(ds.read_temp(rom))
Be sure to put a 4.7k pull-up resistor on the data line. Note that
the convert_temp()
method must be called each time you want to
sample the temperature.
NeoPixel driver¶
Use the neopixel
module:
from machine import Pin
from neopixel import NeoPixel
pin = Pin(0, Pin.OUT) # set GPIO0 to output to drive NeoPixels
np = NeoPixel(pin, 8) # create NeoPixel driver on GPIO0 for 8 pixels
np[0] = (255, 255, 255) # set the first pixel to white
np.write() # write data to all pixels
r, g, b = np[0] # get first pixel colour
For low-level driving of a NeoPixel:
import esp
esp.neopixel_write(pin, grb_buf, is800khz)
Warning
By default NeoPixel
is configured to control the more popular 800kHz
units. It is possible to use alternative timing to control other (typically
400kHz) devices by passing timing=0
when constructing the
NeoPixel
object.
APA102 driver¶
Use the apa102
module:
from machine import Pin
from apa102 import APA102
clock = Pin(14, Pin.OUT) # set GPIO14 to output to drive the clock
data = Pin(13, Pin.OUT) # set GPIO13 to output to drive the data
apa = APA102(clock, data, 8) # create APA102 driver on the clock and the data pin for 8 pixels
apa[0] = (255, 255, 255, 31) # set the first pixel to white with a maximum brightness of 31
apa.write() # write data to all pixels
r, g, b, brightness = apa[0] # get first pixel colour
For low-level driving of an APA102:
import esp
esp.apa102_write(clock_pin, data_pin, rgbi_buf)
DHT driver¶
The DHT driver is implemented in software and works on all pins:
import dht
import machine
d = dht.DHT11(machine.Pin(4))
d.measure()
d.temperature() # eg. 23 (°C)
d.humidity() # eg. 41 (% RH)
d = dht.DHT22(machine.Pin(4))
d.measure()
d.temperature() # eg. 23.6 (°C)
d.humidity() # eg. 41.3 (% RH)
SSD1306 driver¶
Driver for SSD1306 monochrome OLED displays. See tutorial Using a SSD1306 OLED display.
from machine import Pin, I2C
import ssd1306
i2c = I2C(scl=Pin(5), sda=Pin(4), freq=100000)
display = ssd1306.SSD1306_I2C(128, 64, i2c)
display.text('Hello World', 0, 0, 1)
display.show()
WebREPL (web browser interactive prompt)¶
WebREPL (REPL over WebSockets, accessible via a web browser) is an experimental feature available in ESP8266 port. Download web client from https://github.com/micropython/webrepl (hosted version available at http://micropython.org/webrepl), and configure it by executing:
import webrepl_setup
and following on-screen instructions. After reboot, it will be available for connection. If you disabled automatic start-up on boot, you may run configured daemon on demand using:
import webrepl
webrepl.start()
The supported way to use WebREPL is by connecting to ESP8266 access point, but the daemon is also started on STA interface if it is active, so if your router is set up and works correctly, you may also use WebREPL while connected to your normal Internet access point (use the ESP8266 AP connection method if you face any issues).
Besides terminal/command prompt access, WebREPL also has provision for file
transfer (both upload and download). Web client has buttons for the
corresponding functions, or you can use command-line client webrepl_cli.py
from the repository above.
See the MicroPython forum for other community-supported alternatives to transfer files to ESP8266.


git-rm - Remove files from the working tree and from the index
git rm [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch] [--quiet] [--] <file>...
Remove files from the index, or from the working tree and the index. git rm will not remove a file from just your working directory. (There is no option to remove a file only from the working tree and yet keep it in the index; use /bin/rm if you want to do that.) The files being removed have to be identical to the tip of the branch, and no updates to their contents can be staged in the index, though that default behavior can be overridden with the -f option. When --cached is given, the staged content has to match either the tip of the branch or the file on disk, allowing the file to be removed from just the index.
<file>...
Files to remove. Fileglobs (e.g. *.c) can be given to remove all matching files. If you want Git to expand file glob characters, you may need to shell-escape them. A leading directory name (e.g. dir to remove dir/file1 and dir/file2) can be given to remove all files in the directory, and recursively all sub-directories, but this requires the -r option to be explicitly given.
-f, --force
Override the up-to-date check.
-n, --dry-run
Don(cqt actually remove any file(s). Instead, just show if they exist in the index and would otherwise be removed by the command.
-r
Allow recursive removal when a leading directory name is given.
--
This option can be used to separate command-line options from the list of files, (useful when filenames might be mistaken for command-line options).
--cached
Use this option to unstage and remove paths only from the index. Working tree files, whether modified or not, will be left alone.
--ignore-unmatch
Exit with a zero status even if no files matched.
-q, --quiet
git rm normally outputs one line (in the form of an rm command) for each file removed. This option suppresses that output.
The <file> list given to the command can be exact pathnames, file glob patterns, or leading directory names. The command removes only the paths that are known to Git. Giving the name of a file that you have not told Git about does not remove that file.
File globbing matches across directory boundaries. Thus, given two directories d and d2, there is a difference between using git rm *(Aqd**(Aq and git rm *(Aqd/**(Aq, as the former will also remove all of directory d2.
There is no option for git rm to remove from the index only the paths that have disappeared from the filesystem. However, depending on the use case, there are several ways that can be done.
If you intend that your next commit should record all modifications of tracked files in the working tree and record all removals of files that have been removed from the working tree with rm (as opposed to git rm), use git commit -a, as it will automatically notice and record all removals. You can also have a similar effect without committing by using git add -u.
When accepting a new code drop for a vendor branch, you probably want to record both the removal of paths and additions of new paths as well as modifications of existing paths.
Typically you would first remove all tracked files from the working tree using this command:
git ls-files -z | xargs -0 rm -f
and then untar the new code in the working tree. Alternately you could rsync the changes into the working tree.
After that, the easiest way to record all removals, additions, and modifications in the working tree is:
git add -A
If all you really want to do is to remove from the index the files that are no longer present in the working tree (perhaps because your working tree is dirty so that you cannot use git commit -a), use the following command:
git diff --name-only --diff-filter=D -z | xargs -0 git rm --cached
Only submodules using a gitfile (which means they were cloned with a Git version 1.7.8 or newer) will be removed from the work tree, as their repository lives inside the .git directory of the superproject. If a submodule (or one of those nested inside it) still uses a .git directory, git rm will fail - no matter if forced or not - to protect the submodule(cqs history. If it exists the submodule.<name> section in the gitmodules(5) file will also be removed and that file will be staged (unless --cached or -n are used).
A submodule is considered up-to-date when the HEAD is the same as recorded in the index, no tracked files are modified and no untracked files that aren(cqt ignored are present in the submodules work tree. Ignored files are deemed expendable and won(cqt stop a submodule(cqs work tree from being removed.
If you only want to remove the local checkout of a submodule from your work tree without committing the removal, use git-submodule(1) deinit instead.
git rm Documentation/e*.txt
Removes all *.txt files from the index that are under the Documentation directory and any of its subdirectories.
Note that the asterisk * is quoted from the shell in this example; this lets Git, and not the shell, expand the pathnames of files and subdirectories under the Documentation/ directory.
git rm -f git-*.sh
Because this example lets the shell expand the asterisk (i.e. you are listing the files explicitly), it does not remove subdir/git-foo.sh.
Each time a superproject update removes a populated submodule (e.g. when switching between commits before and after the removal) a stale submodule checkout will remain in the old location. Removing the old directory is only safe when it uses a gitfile, as otherwise the history of the submodule will be deleted too. This step will be obsolete when recursive submodule update has been implemented.
Part of the git(1) suite


Qpid Dispatch 0.6.0 Release Notes
Dispatch is a lightweight AMQP message router library. More about
Qpid
Dispatch.
For more information about this release, including download links and
documentation, see the release overview.
New features and improvements
- DISPATCH-10 - Add link-cost for route computation
- DISPATCH-57 - Balance deliveries adaptively across all competing consumers in the network
- DISPATCH-144 - Configurable heartbeats for listeners and connectors
- DISPATCH-148 - Strip qpid-dispatch-specific message annotations on ingress/egress
- DISPATCH-159 - Enhance the address prefix used for link routing to support different patterns
- DISPATCH-163 - Add username and password for authentication of connectors
- DISPATCH-164 - Remove connector state-machine from the server module
- DISPATCH-165 - Discriminate between sending and receiving links when matching link-route patterns
- DISPATCH-166 - Use test-controlled SASL configuration for system tests
- DISPATCH-170 - qdrouterd should not require a restart after the destination broker restarts
- DISPATCH-178 - Route proton trace messages to the dispatch router log file instead of console
- DISPATCH-179 - Refactor Router Core
- DISPATCH-180 - Add a system test to test the 'linkRoutePattern' attribute of qdrouterd.conf
- DISPATCH-188 - Dispatch needs a policy mechanism to limit user connections and activity
- DISPATCH-190 - Expose the Protocol Family for the configuration of listeners and connectors
- DISPATCH-193 - Updates to the Container API
- DISPATCH-194 - Move libqpid-dispatch.so out of /lib
- DISPATCH-197 - Provide list of current link routing
- DISPATCH-199 - Add Dockerfiles that launches the dispatch router inside a container for RHEL and Debian based systems
- DISPATCH-200 - Flexible mapping from x.509 certificates to an identity
- DISPATCH-203 - Improve loop-prevention to drop messages before they are improperly forwarded
- DISPATCH-217 - Make the UI more consistant with other hawtio plugins
- DISPATCH-228 - In ctools, add a variant of DEQ_* to allow membership in multiple lists
- DISPATCH-230 - New connection role: route-container
- DISPATCH-232 - Add capability to delete listeners and connectors via the qdmanage DELETE operation
- DISPATCH-242 - Add options to qdstat to display autoLinks and linkRoutes
- DISPATCH-253 - Configurable link-capacity
- DISPATCH-256 - Documentation Updates for 0.6
- DISPATCH-265 - Improvements to Detecting Routers with Duplicate IDs
- DISPATCH-277 - Improve defaults for router configuration
- DISPATCH-286 - Prefix delimiters: allow slashes as well as periods
- DISPATCH-300 - Deprecate the ContainerEntity and move its attributes to RouterEntity
- DISPATCH-303 - Block all remote access to the "console" entity
- DISPATCH-305 - Don't tie inter-router flow credit to unsettled deliveries
- DISPATCH-306 - Deprecate addr and routerId attributes in qdrouter schema and replace them with host and id respectively
- DISPATCH-331 - Allow for a default policy to apply when open.hostname doesn't match an existing policy
Bugs fixed
- DISPATCH-32 - Undeliverable messages should get released.
- DISPATCH-43 - Router control messages delayed by inter-router message traffic
- DISPATCH-47 - qdrouterd doesn't know where its libraries are
- DISPATCH-53 - waypoints are not robust if targets not set up in advance.
- DISPATCH-58 - Router/Broker interaction - Unroutable/released messages are continually resent
- DISPATCH-111 - helloworld example hangs when run against a broker via link-routing
- DISPATCH-126 - Link-route behavior doesn't honor the semantics assigned to the address prefix
- DISPATCH-127 - Messages from waypoints to remote routers are not delivered
- DISPATCH-155 - Allow multiple connectors to the same broker
- DISPATCH-168 - A message sent to $management without a reply-to field causes a crash
- DISPATCH-171 - SSL Domain objects are leaked.
- DISPATCH-172 - QDStat system test never tests SASL EXTERNAL
- DISPATCH-173 - Half-closed connections spin on "writable" until they close
- DISPATCH-174 - Improper use of ref-counted object references in container
- DISPATCH-175 - Router continues to forward messages to the broker even when the broker is not available
- DISPATCH-176 - Messages sent got lost when one of the brokers went down
- DISPATCH-183 - plaintext sasl password being written to the dispatch router log
- DISPATCH-191 - router not replying to detach frame
- DISPATCH-196 - Remove endpoint mode from router documentation
- DISPATCH-198 - Message module doesn't parse AMQP-Value bodies that are strings or symbols
- DISPATCH-207 - When a message body of [ ] is sent from rhea it is rejected as an invalid body
- DISPATCH-208 - Closest semantics forwards improperly in multi-router network
- DISPATCH-215 - The topology diagram initially draws off the bottom of the visible page.
- DISPATCH-218 - Dispatch system tests run very slowly if connected to a VPN
- DISPATCH-219 - System test security configuration for installed/built tests.
- DISPATCH-222 - For Dispatch 0.6 release move up the minimum required version of qpid proton to 0.12.0
- DISPATCH-223 - Unknown connector name is not properly printed in error messages
- DISPATCH-225 - Sending UPDATE log request with relative path crashes router
- DISPATCH-226 - The default role is not applied when creating a connector
- DISPATCH-231 - Router should not issue credit for unavailable targets
- DISPATCH-234 - undeliverable-here set to true for messages from waypoints if there is no receiver
- DISPATCH-237 - Dispatch Router overwrites delivery tag for link-routed deliveries
- DISPATCH-238 - Need more documentation for qdstat output
- DISPATCH-240 - qdstat : leading "/" character effects a wrong showed address
- DISPATCH-241 - Bias "spread" config with leading "/" on address has a "multicast" behavior
- DISPATCH-245 - Various Bugs found by Coverity
- DISPATCH-247 - Policy gets username from transport
- DISPATCH-248 - Policy self test uses python features not supported by RHEL 6 (python 2.6)
- DISPATCH-250 - Router crash when deleting connector
- DISPATCH-254 - Router crash after several management requests
- DISPATCH-259 - qdstat man-page doc is no good
- DISPATCH-261 - Bind error on one port causes bind error on other ports
- DISPATCH-262 - oslo.messaging RPC fanout crashes qdrouterd
- DISPATCH-263 - Router crash when requesting log
- DISPATCH-264 - printf formats for 64-bit quantities need to be 64/32-bit safe
- DISPATCH-267 - Policy does not increment denial statistics
- DISPATCH-268 - Delivery from waypoint queue can stall when messages are released
- DISPATCH-269 - Policy denial logs at wrong level
- DISPATCH-271 - Handle single router
- DISPATCH-272 - Re-enable the connection cross-section popup
- DISPATCH-273 - The entity view is missing information for some entities
- DISPATCH-275 - Prevent javascript alert errors when navigating to console from a bookmark
- DISPATCH-278 - Deleting amqp listener using qdmanage crashes the router
- DISPATCH-279 - Policy crash when application name is null
- DISPATCH-281 - Hostname not sent in open frame on connectors
- DISPATCH-282 - Prevent topology updates when adding a new router node
- DISPATCH-283 - Start the overview page with the Router tree node expanded
- DISPATCH-284 - The management schema no longer exposes a way to associate links with their connections
- DISPATCH-285 - qdmanage returns an empty list when you QUERY for certain entities
- DISPATCH-287 - Policy does not allow configuration for unspecified Open hostname
- DISPATCH-288 - Driver - Wakeup pipe was seen to block on read, deadlocking the driver.
- DISPATCH-289 - Unit tests failing on Solaris
- DISPATCH-290 - Adapt CMakeLists.txt and code so that qpid-dispatch can be compiled on Solaris
- DISPATCH-292 - some router.link attributes should be graphable
- DISPATCH-293 - The $ character can't be used inside a prefix for linkRoute
- DISPATCH-294 - Crash in the core-thread due to an address referencing a link on a closed connection
- DISPATCH-295 - Router aborted on assertion failed after socker closing by client
- DISPATCH-298 - router spinning on shutdown (in qdr_del_connection_ref)
- DISPATCH-299 - After policy rejects a connection queued Begin causes a crash
- DISPATCH-304 - Console PNG images not showing up in documentation
- DISPATCH-309 - Mobile addresses get the wrong distribution when mapped to remote routers
- DISPATCH-310 - Use router.id instead of container.containerName
- DISPATCH-312 - Closest distribution fails to react to loss of a remote destination
- DISPATCH-319 - Discrepancy between origin router's path and other routers' valid-origins
- DISPATCH-320 - SSL enabled connector does not do hostname verification
- DISPATCH-321 - Dispatch does not send out SASL-OUTCOME frame on sasl failure
- DISPATCH-334 - Proton sequence error during backpressure with balanced distribution
- DISPATCH-335 - link routes aren't balanced over remote routers
- DISPATCH-338 - Incorrect default distribution for addresses
- DISPATCH-339 - The change from 'routerId' to 'id' and 'addr' to 'host' configuration option is not backwards compatible
- DISPATCH-340 - Test inter_router_plain_over_ssl fails to find SSL connection
- DISPATCH-342 - qdrouterd.conf doc calls out router.config.{address,linkRoute,autoLink}
- DISPATCH-343 - Router stops accepting connections after load from parallel senders
- DISPATCH-356 - Creating and deleting a listener on already listening port causes router to crash
- DISPATCH-368 - Router in bad state in two inter-connected routers
Tasks
Apache Qpid, Messaging built on AMQP; Copyright © 2015
The Apache Software Foundation; Licensed under
the Apache
License, Version 2.0; Apache Qpid, Qpid, Qpid Proton,
Proton, Apache, the Apache feather logo, and the Apache Qpid
project logo are trademarks of The Apache Software
Foundation; All other marks mentioned may be trademarks or
registered trademarks of their respective owners


i see this in getinfo which doesn't look right "notarized": 0,
"prevMoMheight": 0,
"notarizedhash": "0000000000000000000000000000000000000000000000000000000000000000",
"notarizedtxid": "0000000000000000000000000000000000000000000000000000000000000000",


CSE 5335 Web Data Management and XML
Project 2
A Movie Web Application
Movie title:
Search Results
Movie Details


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.nextpeer.android.Nextpeer
public final class Nextpeer
This class manages the entire Nextpeer session. Please see the following online guides for information on the integration process.
Permissions required:
permission#INTERNET
permission#ACCESS_NETWORK_STATE
Application#onCreate()
, instantiate the Nextpeer
.Activity#onStart()
, call onStart()
.Activity#onStop()
, call reportForfeitForCurrentTournament()
in case isCurrentlyInTournament()
as the user left an on-going tournament.NextpeerListener#onTournamentStart(NextpeerTournamentStartData)
, start your game scene.NextpeerListener#onTournamentEnd(NextpeerTournamentStartData)
, end your game scene and switch back to the main menu scene.reportScoreForCurrentTournament(int)
| Method Summary | |
|---|---|
static void |
changeCurrentPlayerAvatarUrl(java.lang.String avatarUrl)
Changes the user's avatar image URL locally. |
static void |
changeCurrentPlayerName(java.lang.String name)
Changes the user name locally. |
static void |
enableRankingDisplay(boolean enableRankingDisplay)
Call this method to enable or disable the in-game ranking display during a tournament. |
static NextpeerTournamentPlayer |
getCurrentPlayerDetails()
Returns the current player details such as name and image. |
static NextpeerSettings |
getNextpeerSettings()
Get the settings for the Nextpeer instance or null in case Nextpeer is not initialized. |
static java.lang.String |
getNextpeerVersion()
|
static void |
initialize(Context context,
java.lang.String gameKey,
NextpeerListener listener)
Initialize Nextpeer. |
static void |
initialize(Context context,
java.lang.String gameKey,
NextpeerListener listener,
NextpeerSettings settings)
Initialize Nextpeer. |
static boolean |
isCurrentlyInTournament()
Returns true if there is an active tournament. |
static boolean |
isNextpeerInitialized()
Call this method to verify Nextpeer initialization state. |
static boolean |
isNextpeerSupported()
Call this method to verify if the current run time environment supports Nextpeer requirements. |
static void |
launch()
Launches the Nextpeer console. |
static void |
onStart()
Starts a new session. |
static void |
pushDataToOtherPlayers(byte[] data)
This method is used to push a buffer to the other players. |
static void |
registerToSynchronizedEvent(java.lang.String eventName,
int timeoutInMilliseconds)
Register to a synchronized event which will be triggered once all connected players register to such event. |
static void |
reportControlledTournamentOverWithScore(int score)
Call this method when your game manages the current tournament and the player just died (a.k.a. |
static void |
reportForfeitForCurrentTournament()
Call this method when the user wishes to exit the current tournament. |
static void |
reportScoreForCurrentTournament(int score)
Call this method to report the current score for the tournament. |
static void |
requestRecordingControlFastForwardRecording(java.lang.String userId,
int timeDeltaMilliseconds)
This method is used to fast-forward the given recording by a few milliseconds. |
static void |
requestRecordingControlPauseRecording(java.lang.String userId)
This method is used to pause the given recording. |
static void |
requestRecordingControlResumeRecording(java.lang.String userId)
This method is used to resume the given recording. |
static void |
requestRecordingControlRewindRecording(java.lang.String userId,
int timeDeltaMilliseconds)
This method is used to rewind the given recording by a few milliseconds. |
static void |
requestRecordingControlScoreModifier(java.lang.String userId,
int scoreModifier)
This method is used to change the score modifier for the given recording. |
static void |
requestRecordingControlStopRecording(java.lang.String userId)
This method is used to stop the given recording. |
static void |
setNextpeerSettings(NextpeerSettings settings)
Set the settings for the Nextpeer instance. |
static int |
timeLeftForTournament()
Returns the amount of seconds left for the active time-based tournament. |
static void |
unreliablePushDataToOtherPlayers(byte[] data)
This method is used to push a buffer to the other players. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static final void initialize(Context context, java.lang.String gameKey, NextpeerListener listener)
context
- The context used to access resources on behalf of the application. You should pass the
Context#getApplicationContext()
to avoid the potential memory leak incurred by maintaining references to
Activity
instances. Cannot be null.gameKey
- The game key unique for each game generated at www.nextpeer.com. Cannot be null or empty.listener
- An instance derived from NextpeerListener. Cannot be null or empty.settings
- Lets you customize the way Nextpeer acts. null is OK.
java.lang.IllegalArgumentException
- if context
is null.
java.lang.IllegalArgumentException
- if gameKey
is null or empty.
java.lang.IllegalArgumentException
- if listener
is null.public static final void initialize(Context context, java.lang.String gameKey, NextpeerListener listener, NextpeerSettings settings)
context
- The context used to access resources on behalf of the application. You should pass the
Context#getApplicationContext()
to avoid the potential memory leak incurred by maintaining references to
Activity
instances. Cannot be null.gameKey
- The game key unique for each game generated at www.nextpeer.com. Cannot be null or empty.listener
- An instance derived from NextpeerListener
. Cannot be null or empty.settings
- Lets you customize the way Nextpeer acts. null is OK.
java.lang.IllegalArgumentException
- if context
is null.
java.lang.IllegalArgumentException
- if gameKey
is null or empty.
java.lang.IllegalArgumentException
- if listener
is null.public static final java.lang.String getNextpeerVersion()
public static final boolean isNextpeerInitialized()
public static final void onStart()
Activity#onStart()
method.
Warning: Cannot be called before initialize()
.
public static final void launch()
Warning: Cannot be called before initialize()
.
public static final boolean isNextpeerSupported()
Note: Minimum Android OS version supported by the SDK is FROYO (API level 8).
public static final void reportScoreForCurrentTournament(int score)
Warning: Cannot be called before initialize()
and onStart()
.
score
- The current game score to be reported.
java.lang.IllegalArgumentException
- if score
is negative.public static final void reportControlledTournamentOverWithScore(int score)
Note: The method will act only if the current tournament is from a 'GameControlled' tournament type.
Warning: Cannot be called before initialize()
and onStart()
.
score
- The current game score to be reported.
java.lang.IllegalArgumentException
- if score
is negative.public static final void reportForfeitForCurrentTournament()
Warning: Cannot be called before initialize()
and onStart()
.
public static final void pushDataToOtherPlayers(byte[] data)
NextpeerListener::onReceiveTournamentCustomMessage:
method on their listener.
Warning: Cannot be called before initialize()
and onStart()
.
data
- The byte array to send to the other connected players.
java.lang.IllegalArgumentException
- if data
is empty.public static final void unreliablePushDataToOtherPlayers(byte[] data)
NextpeerListener::onReceiveUnreliableTournamentCustomMessage:
method on their listener.
Warning: Cannot be called before initialize()
and onStart()
.
data
- The byte array to send to the other connected players.
java.lang.IllegalArgumentException
- if data
is empty.public static final void requestRecordingControlScoreModifier(java.lang.String userId, int scoreModifier)
Warning: Cannot be called before initialize()
and onStart()
.
userId
- player id for the recording.scoreModifier
- a modifier to be added to the score (may be positive or negative).
java.lang.IllegalArgumentException
- if userId
is empty or null.public static final void requestRecordingControlPauseRecording(java.lang.String userId)
Warning: Cannot be called before initialize()
and onStart()
.
userId
- player id for the recording.
java.lang.IllegalArgumentException
- if userId
is empty or null.public static final void requestRecordingControlResumeRecording(java.lang.String userId)
Warning: Cannot be called before initialize()
and onStart()
.
userId
- player id for the recording.
java.lang.IllegalArgumentException
- if userId
is empty or null.public static final void requestRecordingControlStopRecording(java.lang.String userId)
Warning: Cannot be called before initialize()
and onStart()
.
userId
- player id for the recording.
java.lang.IllegalArgumentException
- if userId
is empty or null.public static final void requestRecordingControlRewindRecording(java.lang.String userId, int timeDeltaMilliseconds)
Warning: Cannot be called before initialize()
and onStart()
.
userId
- player id for the recording.timeDeltaMilliseconds
- delta in milliseconds to rewind the recording by (must be positive).
java.lang.IllegalArgumentException
- if userId
is empty or null.
java.lang.IllegalArgumentException
- if timeDelta
is negative.public static final void requestRecordingControlFastForwardRecording(java.lang.String userId, int timeDeltaMilliseconds)
Warning: Cannot be called before initialize()
and onStart()
.
userId
- player id for the recording.timeDeltaMilliseconds
- delta in milliseconds to fast-forward the recording by (must be positive).
java.lang.IllegalArgumentException
- if userId
is empty or null.
java.lang.IllegalArgumentException
- if timeDelta
is negative.public static final boolean isCurrentlyInTournament()
Warning: Cannot be called before initialize()
and onStart()
.
java.lang.IllegalArgumentException
- if userId
is empty or null.
java.lang.IllegalArgumentException
- if timeDelta
is negative.public static final int timeLeftForTournament()
Note: The method will return 0 if the current tournament is of GameControlled type or in case there is no active tournament.
Warning: Cannot be called before initialize()
and onStart()
.
public static final NextpeerTournamentPlayer getCurrentPlayerDetails()
Note: If the user never opened Nextpeer's dashboard or Nextpeer was not initialized the method will return null.
Warning: Cannot be called before initialize()
and onStart()
.
public static final void enableRankingDisplay(boolean enableRankingDisplay)
Warning: Cannot be called before initialize()
and onStart()
.
enableRankingDisplay
- Should the ranking display be enabled or not.public static final void changeCurrentPlayerName(java.lang.String name)
Warning: Cannot be called before initialize()
and onStart()
.
name
- The new user name. Should not be null or an empty String.public static final void changeCurrentPlayerAvatarUrl(java.lang.String avatarUrl)
Warning: Cannot be called before initialize()
and onStart()
.
avatarUrl
- The new avatar image URL. Should not be null or an empty String.public static final void registerToSynchronizedEvent(java.lang.String eventName, int timeoutInMilliseconds)
NextpeerListener#onReceiveSynchronizedEvent(String, NextpeerSyncEventFire)
when the rest of the connected players will register to this synchronized event.
For example, you can register for a start game synchronized event.
This way, your can be sure that all players will start the game together, without taking into consideration different loading time per device.
Warning: Cannot be called before initialize()
and onStart()
.
In addition cannot be called if the tournament has not started yet. The NextpeerListener::onTournamentStart:
method has not called.
Note: An inherent problem with multiplayer games is that each of the players may have devices of different performance.
One device may be high-end level while the other may be a slow, old device. This means that the loading time of the tournament may differ for each player.
While one device may load a heavy 3D game in one second, the other may load it in 15 seconds.
Such a situation would create a bad experience for the player who had to wait for 15 seconds.
To accommodate this scenario Nextpeer added an option of defining specific points in the game where the game-play will start regardless if all the players finished loading.
Usually, this point would be the starting of the game.
This improves user experience to the majority of players and gives greater flexibility for the developers.
Players who have not loaded the game on time will still play, but they will start after the other players.
Call #registerToSynchronizedEvent()
to register a synchronized event which will trigger the NextpeerListener#onReceiveSynchronizedEvent(String,NextpeerSynchronizedEventFire)
method once all connected players register to such event.
eventName
- The synchronized event name that the clients will register to. Cannot be empty or null. Try to use top down domain. For example, "com.yourcompany.yourgame.syncevent".timeoutInMilliseconds
- The timeout in milliseconds for the synchronized event. Cannot be zero or negative.
java.lang.IllegalArgumentException
- if eventName
is empty or null.
java.lang.IllegalArgumentException
- if timeoutInMilliseconds
is zero or negative.public static final void setNextpeerSettings(NextpeerSettings settings)
Warning: Cannot be called before initialize()
.
settings
- The settings (not null)
java.lang.IllegalArgumentException
- if settings
is null.public static final NextpeerSettings getNextpeerSettings()
Warning: Cannot be called before initialize()
.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |