In my blog last week I introduced the concept of Classes in Ruby. Classes are objects that we can create instances of and run methods on. This week I'm going to introduce the concept of inheritance and composition and how they relate to classes.
Inheritance is a relationship between two classes in Ruby. When we say a class inherits from another class we are saying the class acquires the methods and behaviors defined in its parent class.
In the example below Salmon inherits from Fish since salmon is a type of fish. The "is a" relationship is a good way to think about how inheritance works.
Notice the symbol '<' designates Salmon as a subclass of Fish. Salmon will now share the characteristics of the Fish class such as: lives_in_water, has_gills, and cold_blooded.
Composition is another way we can allow classes to share attributes and methods without using inheritance. Ruby uses the concepts of 'modules' to achieve this.
Notice in the example below the use of the 'Other' module. In the Salmon class we throw in "include Other" to give the Salmon class access to that module. We are then able to successfully call the swim method on an instance of Salmon.
How do you choose between using inheritance and using composition? The main goal is to avoid duplicating code. Choose whichever strategy is least complex and avoids duplication. As long as either strategy achieves this, it is rather subjective when to use inheritance or composition.


SwitchButton Custom Element is a widget with behavior similar to the CheckBox Custom Element. It has two states - checked and unchecked (on/off). The user can switch between the different states using mouse clicks or by drag and drop of the thumb.
Ringtone
Marimba
New Mail
Sent Mail
Calendar Alerts
Lock Sounds
Keyboard Clicks
Events:


CHAPTER 9C
ETHNIC STUDIES
REPEALED. L 1977, c 14, §2.
Cross References
Ethnohistory studies, see §9-3(11).


You should use Barebones if you're embarking on a smaller project or just don't feel like you need all the utility of larger frameworks. Barebones only styles a handful of standard HTML elements and CSS Grid, but that's often more than enough to get started.
In fact, while this looks like the original Skeleton site, it's made using Barebones, allowing lighter html and more flexible CSS. Barebones also includes support for legacy Skeleton sites without changes.
Use Barebones and want to lay yourself bare? Let others know!
TweetCSS Variables allow Barebones to maintain it's independence on additional tools such as CSS preprocessors SCSS or Less, while gaining centralized management of global values. This allows for much easier theming and rebranding.
The default theme maintains the color choices from Skeleton, although a few very similar colors were consolidated. Colors are based from a theme hue, which defines the normal
text color. Additional richer
and softer
text colors are then defined.
The choice of those keywords is to prevent confusion with light vs dark themes. For example. in a light background theme, softer
would mean a lighter color than normal
, ie less contrast with the background, but if the base hue is dark, softer
would be darker to decrease the contrast.
/* default theme: light background, dark text, blue accent */
--theme-hue: 0; /* white */
--accent-hue: 194; /* blue */
--text-color-richer: hsl(var(--theme-hue), 0%, 5%); /* #0d0d0d */
--text-color-normal: hsl(var(--theme-hue), 0%, 13%); /* #222222 text color; button:hover:focus color */
--text-color-softer: hsl(var(--theme-hue), 0%, 33%); /* #555555 button color; button:hover border */
--accent-color: hsl(var(--accent-hue), 86%, 57%); /* #33C3F0 link; button-primary bg+border; textarea,select:focus border */
--accent-color-hover: hsl(var(--accent-hue), 76%, 49%); /* #1EAEDB link hover; button-primary:hover:focus bg+border */
--border-color: hsl(var(--theme-hue), 0%, 73%); /* #bbbbbb button border */
--border-color-softer: hsl(var(--theme-hue), 0%, 82%); /* #d1d1d1 textarea,select,code,td,hr border */
--background-color: white; /* transparent body background; textarea,select background */
--background-color-softer: hsl(var(--theme-hue), 0%, 95%);
--code-background: hsl(var(--theme-hue), 0%, 95%); /* #f1f1f1 code background*/
--button-primary-color: white;
A dark theme is included in Barebones inside a prefers-color-scheme: dark
media selector. This is a new selector not widely supported by browers yet, but demonstrates a second theme.
You can use the buttons below to switch between these themes
Barebones replaces the fixed 12-column grid with CSS Grid: a more flexible and powerful foundation supported natively in CSS. If you've ever fought a Flexbox layout to do what you want, you'll probably find CSS Grid a lot easier to work with as it was designed specifically for laying out in two dimensions.
Barebones only includes a few basic layouts, but note the Fifths wouldn't be easy with the 12-column layout.
Halves
Halves
Thirds
Thirds
Thirds
Thirds
Thirds
Thirds
There's a lot of possibilities with CSS Grid and great resources available without repeating a how-to guide here.
Type is all set with the rems
, so font-sizes and spacial relationships can be responsively sized based on a single
font-size property. Out of the box, Barebones never changes the
font-size, but it's there in case you need it for your project. All measurements are still base 10 though so, an

with 5.0rem
font-size just means 50px
.
The typography base is Raleway served by Google, set at 16rem (16px) over a 1.6 line height (24px). Other type basics like anchors, strong, emphasis, and underline are all obviously included.
Headings create a family of distinct sizes each with specific letter-spacing
, line-height
, and margins
.

50rem

42rem

36rem

30rem

24rem

15rem
Heading
Heading
Heading
Heading
Heading
Heading
The base type is 15px over 1.6 line height (24px)
Bolded
Italicized
Colored
Underlined
Buttons come in two basic flavors in Barebones. The standard <button>
element is plain, whereas the .button-primary
button is vibrant and prominent. Button styles are applied to a number of appropriate form elements, but can also be arbitrarily attached to anchors with a .button
class.
Anchor button
Anchor button
Forms are a huge pain, but hopefully these styles make it a bit easier. All inputs, select, and buttons are normalized for a common height cross-browser so inputs can be stacked or placed alongside each other.
- Item 1
-
Item 2
- Item 2.1
- Item 2.2
- Item 3
One change from Skeleton is that font-size does not decrease with nested lists, instead using the --text-color-softer
variable for nested list color. This allows deeper nesting without readability problems.
Code styling is kept basic – just wrap anything in a
and it will appear like this
. For blocks of code, wrap a
with a

.
.some-class {
background-color: red;
}
.some-class {
background-color: red;
}
Be sure to use properly formed table markup with

and

when building a table
.
| Name | Age | Sex | Location |
|---|---|---|---|
| Dave Gamache | 26 | Male | San Francisco |
| Dwayne Johnson | 42 | Male | Hayward |
Name
Age
Sex
Location
Dave Gamache
26
Male
San Francisco
Dwayne Johnson
42
Male
Hayward
Barebones uses media queries to serve its scalable grid, but also has a list of queries for convenience of styling your site across devices. The queries are mobile-first, meaning they target min-width
. It means all styles outside of a query apply to all devices, then larger devices are targeted for enhancement. This prevents small devices from having to parse tons of unused CSS.
Barebones makes some changes to Skeleten's default break points, based on personal experience and some really good rational. The sizes for the queries are currently:
With the upcoming env() variables in CSS, Barebones will be updated to make media queries top level variables to easily change breakpoints as desired.
/* Mobile first queries */
/* Larger than mobile (default point when grid becomes active) */
@media (min-width: 600px) {}
/* Larger than phablet */
@media (min-width: 900px) {}
/* Larger than tablet */
@media (min-width: 1200px) {}
Barebones has a number of small utility classes that act as easy-to-use helpers. Sometimes it's better to use a utility class than create a whole new class just to float an element.
/* Utility Classes */
/* Make element full width */
.u-full-width {
width: 100%;
box-sizing: border-box; }
/* Make sure elements don't run outside containers (great for images in columns) */
.u-max-full-width {
max-width: 100%;
box-sizing: border-box; }
/* Float either direction */
.u-pull-right {
float: right; }
.u-pull-left {
float: left; }
/* Override default content alignment */
.u-align-left {
text-align: left; }
.u-align-right {
text-align: right; }
/* Clear a float */
.u-cf {
content: "";
display: table;
clear: both; }
If you have a site originally build with Skeleton and want to migrate to Barebones without breaking everything at once, we'll help you keep those skeletons hidden in the closet. Simply include the skeleton-legacy.css
file to provide backwards compatibility for all classes removed from Barebones.
The legacy classes, which mostly applied to grids, have been updated to use Barebone's CSS Variables and CSS Grid system so any overall changes will still be applied across the entire site. See below for a demo using the html from the original Skeleton site styled with Barebones and legacy css.
Links to resources for some of the newer features used in Barebones and some of the up and coming standards with included support:
CSS Variables
CSS Grid
Up and Coming Standards


The HTML style attribute is used to add styles to an element, such as color, font, size, and
more.
Setting the style of an HTML element, can be done with the style attribute.
The HTML style attribute has the following syntax:
The property is a CSS property. The value is a CSS value.
This will set the background color for a page to powderblue:
This will set background color for two different elements:
I am Red
I am Blue
I am Big
The HTML Style Attribute
Setting the style of an HTML element, can be done with the style attribute.
The HTML style attribute has the following syntax:
<tagname style="property:value;">
Background Color
The CSS background-color property defines the background color for an HTML element.This will set the background color for a page to powderblue:

This is a heading

This is a paragraph.

This is a heading

This is a paragraph.

Text Color
The CSS color property defines the text color for an HTML element:

This is a heading

This is a paragraph.

Fonts
The CSS font-family property defines the font to be used for an HTML element:

This is a heading

This is a paragraph.

Text Size
The CSS font-size property defines the text size for an HTML element:

This is a heading

This is a paragraph.

Text Alignment
The CSS text-align property defines the horizontal text alignment for an HTML element:

Centered Heading

Centered paragraph.

Chapter Summary
- Use the style attribute for styling HTML elements
- Use background-color for background color
- Use color for text colors
- Use font-family for text fonts
- Use font-size for text sizes
- Use text-align for text alignment


All Classes
-
All Classes Interface Summary Class Summary Enum Summary Class Description AbstractSuggestionsBuilder A base class toBuildTimeReporter.SuggestionsBuilder
s that abstracts the walking of the differences and lets the subclasses only implement simple methods to output the suggestions in the given format.Analyzer ApiBreakageHintingReporter ApiChangeLevel BuildTimeReporter Build-time reporter is aReporter
extension for Revapi that is used by theCheckMojo
to output the found problems and also to provide the suggestions to the user how to ignore the problems if deemed ok.BuildTimeReporter.SuggestionsBuilder A suggestion builder is an object that theBuildTimeReporter
uses to render suggestions for ignoring the found problems.CheckForkMojo CheckMojo Runs the API check of old and new artifacts using the specified configuration of extensions declared as dependencies of the plugin.ConfigurationFile A complex type for capturing the "analysisConfigurationFiles" elements.ConvertToXmlConfigMojo This is a helper goal to convert the old JSON Revapi configuration inside the POM files into the new XML based format.ConvertToXmlConfigMojo.SilentReporter FailSeverity HelpMojo Display help information on revapi-maven-plugin.
Callmvn revapi:help -Ddetail=true -Dgoal=<goal-name>
to display parameter details.JsonSuggestionsBuilder A helper toBuildTimeReporter
that outputs the ignore suggestions in JSON format.PromotedDependency PropertyValueResolver This serves no other purpose but to make available the standard value sources for interpolating the properties in the Revapi configuration files.ReportAggregateMojo Uses the configuration supplied at the top level aggregator project to run analysis on all sub-projects.ReportForkMojo ReportMojo ReportTimeReporter ReportTimeReporter.DifferenceReport UpdateReleasePropertiesMojo UpdateVersionsMojo ValidateConfigurationMojo ValidateConfigurationMojo.ValidateReporter XmlSuggestionsBuilder A helper toBuildTimeReporter
that outputs the ignore suggestions in XML format.


>Auto-generated "Collapse-to Level" buttons (2 and 3)
>Customize category colors by level
>Customize expand/collapse button colors
>Touch to right of expanded items to see full detail of selected row
>Standard Sencha Touch Disclose icon overridden with IPhone style icon.
>Implements example of pulling list down to refresh data (PullRefresh). In this example we are initially loading selective expanded nodes based on what project items are not done (Note: I don't save changes to done in this example)
See Ex #2 and #3 to compare different layouts


ABOUT ME 關於我
我來自香港，現就讀在國立臺灣大學圖書資訊系三年級，學習資訊之蒐集、組織、分析與整理。 我是一個樂觀友善的人，面對困難也有強大的抗壓能力，任何任務我都會盡力做到最好。 期待認識屏幕前的您，並開展與您的合作。
I come from Hong Kong. Now study Libraries and Information Science Year T in National Taiwan University. I learned how to collect, organize, analysis and conclute the information. I am an optimistic and friendly person. I have a highly stress resistant
to help me face the problem in my work and I will do my best in each mission. Hope to meet and work with you as soon as possible.


Browse The Laws
Vote On Bills
Submit A Bill
About
Today we elect congressmen and women every few
years. These people alone may change what laws
are in place. Our representative democracy was
designed long ago by wise people. Unfortunately,
they did not have the Internet back then.
Like all politicians, we promise change. However,
we do not promise to change this law or that law -
we decidedly do not have stances on most political
issues. Instead, we promise to change the way
laws get made.
We will host an online database of the statutes
currently in effect. If you are a registered
voter, you will have the following abilities:
- assign someone as your congressperson, giving them your vote
- directly vote on bills
- change any laws, and submit your bill for approval
As soon as any submitted change gets votes from
2/3 of the registered population, it is
immediately signed into law. We will soon begin
to build a rough draft of that website right here.
After election, we will initialize the website so
that current members of congress carry the votes
of their constituents. Then you can all log in
and do whatever you want.
The website itself is open source at https://github.com/jeffersoncarpenter/thelawsinwisconsin


Welcome to Sweets Complete
You are logged in as: %name%
LOGIN
|
RECENT
|
HISTORY
Choose Product(s) to Purchase:
Title
Price
Qty
Row 1 Data 1
Row 2 Data 2
Row 3 Data 3
%message%


The Class Selector
Hello
This paragraph is.
Hello World
This paragraph is not affected by the style.
Hello World
This paragraph is not affected by the style.


Actions....... 1
Actions
Contents. 1
Actions.... 2
Macromedia Flash (SWF) 3 Action Model........ 2
Macromedia Flash (SWF) 4 Action Model........ 5
Stack Operations 6
Arithmetic Operators 7
Numerical Comparison................. 8
Logical Operators 9
String Manipulation............. 10
Type Conversion............... 12
Control Flow...... 14
Variables 15
Movie Control. 15
Utilities 19
Macromedia Flash (SWF) 5 Action Model...... 20
ScriptObject Actions. 21
Type Actions. 28
Math Actions. 29
Stack Operator Actions. 30
Actions are an essential part of an interactive Macromedia Flash movie. Actions allow a movie to react to events such as mouse movements of mouse clicks. Macromedia Flash (SWF) version 3 (and earlier) supports a simple action model. Macromedia Flash (SWF) version 4 supports a greatly enhanced action model including an expression evaluator, variables, and conditional branching and looping. Macromedia Flash (SWF) version 5 adds a JavaScript-style object model, data types and functions.
The Macromedia Flash (SWF) version 3 action model consists of eleven simple instructions for the Macromedia Flash Player:
Play – start playing at the current frame.
Stop – stop playing at the current frame.
NextFrame – go to the next frame
PreviousFrame – go to the previous frame
GotoFrame – go to the specified frame
GotoLabel – go to the frame with the specified label
WaitForFrame – wait for the specified frame
GetURL – get the specified URL.
StopSounds – stop all sounds playing
ToggleQuality – toggle the display between high and low quality.
SetTarget – change the context of subsequent actions to a named object.
An action (or list of actions) can be triggered by a button state transition, or by a DoAction tag. The action is not executed immediately, but is added to a list of actions to be processed. The list is executed on a ShowFrame tag, or after the button state has changed. An action can cause other actions to be triggered, in which case, the action is added to the list of actions to be processed. Actions are processed until the action list is empty.
By default, timeline actions such as Stop, Play and GoToFrame apply to movie that contains them. However, the SetTarget action (called ‘Tell Target’ in the Macromedia Flash user-interface) can be used to send an action command to another movie or sprite (see DefineSprite)
There are 127 possible actions of which 91 are currently defined.
The DoAction flag tells the Macromedia Flash player to perform a list of actions when the current frame is complete. The actions are performed when the ShowFrame tag is encountered.
(See class FCTDoAction in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
Header |
RECORDHEADER |
Tag ID = 12 |
|
Actions |
ACTIONRECORD[zero or more] |
List of actions to perform -
see below |
|
ActionEndFlag |
UI8 = 0 |
Always set to 0 |
An action record consists of a 1-byte action code. If the high bit of the action code is set, then there is a 16-bit length that describes the amount of data used by the action. If the high bit is clear, the action has no data.
(See class FActionRecord in the Macromedia Flash File Format (SWF) SDK)
|
ACTIONRECORD |
|
|
|
|
Field |
Type |
Comment |
|
|
ActionCode |
code = UI8 |
An action code as specified
below |
|
|
Length |
If code >= 0x80 UI16 |
The number of bytes (after
this) in the ACTIONRECORD. |
|
Instructs the player to go to the specified frame in the current movie.
(See class FActionGotoFrame in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionGotoFrame |
UI8 |
Action = 0x81 |
|
Length |
UI16 |
Always 2 |
|
Frame |
WORD |
Frame index |
Instructs the player to get the URL specified by UrlString. The URL can be of any type, including an HTML file, an image or another SWF movie. If the movie is playing in a browser, the URL will be displayed in the frame specified by TargetString. The special target names “_level0” and “_level1” are used to load another SWF movie into levels 0 and 1 respectively.
(See class FActionGetURL in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionGetURL |
UI8 |
Action = 0x83 |
|
Length |
UI16 |
Combined length of strings |
|
UrlString |
STRING |
Target URL string |
|
TargetString |
STRING |
Target string |
(See class FActionNextFrame in the Macromedia Flash File Format (SWF) SDK)
|
Type |
Comment |
|
|
ActionNextFrame |
UI8 |
Action = 0x04 |
(See class FActionPrevFrame in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionPrevFrame |
UI8 |
Action = 0x05 |
Instructs the player to start playing at the current frame.
(See class FActionPlay in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionPlay |
UI8 |
Action = 0x06 |
Instructs the player to stop playing the movie at the current frame.
(See class FActionStop in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionStop |
UI8 |
Action = 0x07 |
Toggle the display between high and low quality.
(See class FActionToggleQuality in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionToggleQualty |
UI8 |
Action = 0x08 |
Instructs the player to stop playing all sounds.
(See class FActionStopSounds in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionStopSounds |
UI8 |
Action = 0x09 |
Instructs the player to wait until the specified frame, otherwise skip the specified number of actions.
(See class FActionWaitForFrame in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionWaitForFrame |
UI8 |
Action = 0x8A |
|
Length |
UI16 |
Always 3 |
|
Frame |
WORD |
Frame to wait for |
|
SkipCount |
BYTE |
Number of actions to skip
if frame is not loaded |
Instructs the player to change the context of subsequent actions, so they apply to a named object (TargetName) rather than the current movie.
For example, the SetTarget action can be used to control the timeline of a sprite object. The following sequence of actions sends a sprite called “spinner” to the first frame in its timeline:
1. SetTarget “spinner”
2. GotoFrame zero
3. SetTarget “” (empty string)
4. End of actions. (Action code = 0)
All actions following SetTarget “spinner” apply to the spinner object until SetTarget “”, which sets the action context back to the current movie. For a complete discussion of target names see DefineSprite.
(See class FActionSetTarget in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionSetTarget |
UI8 |
Action = 0x8B |
|
Length |
U16 |
Length of record |
|
TargetName |
STRING |
Target of action target |
Instructs the player to go to frame associated with the specified label. A label can be attached to a frame with the FrameLabel tag.
(See class FActionGoToLabel in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionGoToLabel |
UI8 |
Action = 0x8C |
|
Length |
U16 |
Length of record |
|
Label |
STRING |
Frame label |
Macromedia Flash (SWF) version 4 supports a greatly enhanced action model including an expression evaluator, variables, conditional branching and looping.
The Macromedia Flash Player 4 incorporates a stack machine that interprets and executes Macromedia Flash (SWF) 4 actions. The key Macromedia Flash (SWF) 4 action is ActionPush. This action is used to push parameters on to the stack. Unlike Macromedia Flash (SWF) 3 actions, Macromedia Flash (SWF) 4 actions do not have parameters embedded in the tag, rather they push parameters onto the stack, and pop results off the stack.
The expression evaluator is also stack based. Arithmetic operators include ActionAdd, ActionSubtract, ActionMuliply and ActionDivide. The Flash authoring tool converts expressions to a series of stack operations. For example, the expression 1+x*3 is represented as the following action sequence:
ActionPush “x”
ActionGetVariable
ActionPush “3”
ActionMultiply
ActionPush “1”
ActionAdd
The result of this expression is on the stack. Note that all values on the stack, including numeric values, are stored as strings. In the example above, the numeric values 3 and 1, are pushed on the stack as the strings “3” and “1”.
The current point of execution of the player is called the Program Counter or ‘PC’. The value of the PC is defined as the address of the action following the action currently being executed. Control Flow actions such as ActionJump, change the value of the PC. These actions are similar to ‘branch’ instructions in assembler, or ‘go to’ instructions in other languages. For example, ActionJump tells the Macromedia Flash Player to ‘jump’ to a new position in the action sequence. The new PC is specified as an offset from the current PC. There can be both positive and negative offsets, so the player can jump forward and backward in the action sequence.
Below is an overview of Macromedia Flash (SWF) 4 actions:
Arithmetic Operators
|
|||
|
|
|||
|
|
|
|
|
Numerical Comparison
|
|||
|
|
|
||
Logical Operators
|
|||
|
|
|||
String Manipulation
|
|||
|
|
|
||
Stack
Operations
|
|||
|
|
|
||
Type Conversion
|
|||
|
|
|||
|
|
|
Control
Flow
|
|||
|
|
|||
Variables
|
|||
|
|
|
||
Movie Control
|
|||
|
|
|
|
|
Utilities
|
|||
|
|
|
Pushes a value to the stack
(See class FActionPush in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionPush |
UI8 |
Action = 0x96 |
|
Type |
BYTE |
0 = string literal |
|
String |
IF Type = 0, STRING
|
Null terminated
string |
|
Float |
IF Type = 1, FLOAT |
32-bit
single-precision little-endian fp value |
ActionPush pushes a value on to the stack. The Type field specifies the type of the value to be pushed. If Type = 0, the value to be pushed is specified as a STRING. If Type = 1, the value to be pushed is specified as a 32-bit IEEE single-precision little-endian floating-point value.
Most data types are pushed on the stack as STRINGs, including
numerical values. The numerical value
3.7, is stored as “3.7. The True
value is stored as "1" and False as "0". The NewLine
value is stored as "\n".
PropertyIds are pushed as FLOATs. PropertyIds are used by ActionGetProperty and ActionSetProperty to access the properties of named objects.
Pop a value from the stack
(See class FActionPop in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionPop |
UI8 |
Action = 0x17 |
1. Pops a value off the stack and discards the value.
Add two numbers
(See class FActionAdd in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionAdd |
UI8 |
Action = 0x0A |
1. Pops value A off the stack.
2. Pops value B off the stack.
3. A and B are converted to floating-point; non-numeric values evaluate to 0.
4. The numbers are added.
5. Pushes the result, A+B, to the stack.
Subtract two numbers
(See class FActionSubtract in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionSubtract |
UI8 |
Action = 0x0B |
1. Pops value A off the stack.
2. Pops value B off the stack.
3. A and B are converted to floating-point; non-numeric values evaluate to 0.
4. A is subtracted from B.
5. Pushes the result, B-A, to the stack.
Multiply two numbers
(See class FActionMultiply in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionMultiply |
UI8 |
Action = 0x0C |
1. Pops value A off the stack.
2. Pops value B off the stack.
3. A and B are converted to floating-point; non-numeric values evaluate to 0.
4. The numbers are multiplied.
5. Pushes the result, A*B, to the stack.
Divide two numbers
(See class FActionDivide in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionDivide |
UI8 |
Action = 0x0D |
1. Pops value A off the stack.
2. Pops value B off the stack.
3. A and B are converted to floating-point; non-numeric values evaluate to 0.
4. B is divided by A.
5. Pushes the result, B/A, to the stack.
6. If A is zero, the result is the string #ERROR#.
Note: When playing a Flash 5 .SWF, NaN, Infinity or –Infinity is pushed to the stack instead of #ERROR#.
Tests two numbers for equality
(See class FActionEquals in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionEquals |
UI8 |
Action = 0x0E |
1. Pops value A off the stack.
2. Pops value B off the stack.
3. A and B are converted to floating-point; non-numeric values evaluate to 0.
4. The numbers are compared for equality.
5. If the numbers are equal, a 1 (TRUE) is pushed to the stack.
6. Otherwise, a 0 is pushed to the stack.
Note: When playing a Macromedia
Flash 5 .SWF, true is pushed to
the stack instead of 1, and false is pushed to the stack instead of 0.
Tests if a number is less than another number.
(See class FActionLess in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionLess |
UI8 |
Action = 0x0F |
1. Pops value A off the stack.
2. Pops value B off the stack.
3. A and B are converted to floating-point; non-numeric values evaluate to 0.
4.
If B < A, a 1 is pushed to the stack; otherwise, a 0 is
pushed to the stack.
Note: When playing a
Flash 5 .SWF,
true is pushed to the stack instead of 1, and false is pushed to the stack
instead of 0.
Performs a logical AND of two numbers.
(See class FActionAnd in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionAnd |
UI8 |
Action = 0x10 |
1. Pops value A off the stack.
2. Pops value B off the stack.
3. A and B are converted to floating-point; non-numeric values evaluate to 0.
4. If both numbers are nonzero, a 1 is pushed to the stack; otherwise, a 0 is pushed to the stack.
Note: When playing a Macromedia Flash 5 .SWF, true is pushed to the stack instead of 1, and false is pushed to the stack instead of 0.
Performs a logical OR of two numbers.
(See class FActionOr in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionOr |
UI8 |
Action = 0x11 |
1. Pops value A off the stack.
2. Pops value B off the stack.
3. A and B are converted to floating-point; non-numeric values evaluate to 0.
4. If either numbers is nonzero, a 1 is pushed to the stack; otherwise, a 0 is pushed to the stack.
Note: When playing a Macromedia Flash 5 .SWF, true is pushed to the stack instead of 1, and false is pushed to the stack instead of 0.
Performs a logical NOT of a number. Note that in Macromedia Flash 5 .SWF files, the ActionNot action converts its
argument to a boolean, and pushes a result of type boolean. In Macromedia Flash 4 .SWF files, the argument and result are numbers.
(See class FActionNot in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionNot |
UI8 |
Action = 0x12 |
|
Result |
boolean |
|
1. Pops a value off the stack.
2. The value is converted to floating-point; non-numeric values evaluate to 0.
3. If the value is zero, a 1 is pushed on the stack.
4. If the value is nonzero, a 0 is pushed on the stack.
Note: When playing a Macromedia Flash 5 .SWF, true is pushed to the stack instead of 1, and false is pushed to the stack instead of 0.
Tests two strings for equality
(See class FActionStringEquals in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionStringEquals |
UI8 |
Action = 0x13 |
1. Pops value A off the stack.
2. Pops value B off the stack.
3. A and B are compared as strings. The comparison is case-sensitive.
4. If the strings are equal, a 1 (TRUE) is pushed to the stack.
5. Otherwise, a 0 is pushed to the stack.
Note: When playing a Macromedia Flash 5 .SWF, true is pushed to the stack instead of 1, and false is pushed to the stack instead of 0.
Computes the length of a string.
(See class FActionStringLength in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionStringLength |
UI8 |
Action = 0x14 |
1. Pops a string off the stack.
2. The length of the string is calculated and pushed to the stack.
Concatenates two strings
(See class FActionStringAdd in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionStringAdd |
UI8 |
Action = 0x21 |
1. Pops value A off the stack.
2. Pops value B off the stack.
3. The concatenation BA is pushed to the stack.
Extracts a substring from a string
(See class FActionStringExtract in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionStringExtract |
UI8 |
Action = 0x15 |
1. Pops number count off the stack.
2. Pops number index off the stack.
3. Pops string string off the stack.
4. The substring of string starting at the index’th character and count characters in length is pushed to the stack.
5. If either index or count do not evaluate to integers, the result is the empty string.
Test if a string is less than another string
(See class FActionStringLess in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionStringLess |
UI8 |
Action = 0x29 |
1. Pops value A off the stack.
2. Pops value B off the stack.
3. If B < A using a byte-by-byte comparison, a 1 is pushed to the stack; otherwise, a 0 is pushed to the stack.
Note: When playing a Macromedia
Flash 5 .SWF, true is pushed to
the stack instead of 1, and false is pushed to the stack instead of 0.
Computes the length of a string, multi-byte aware.
(See class FActionMBStringLength in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionMBStringLength |
UI8 |
Action = 0x31 |
1. Pops a string off the stack.
2. The length of the string in characters is calculated and pushed to the stack.
3. This is a multi-byte aware version of ActionStringLength. On systems with double-byte support, a double-byte character is counted as a single character.
Extracts a substring from a string, multi-byte aware
(See class FActionMBStringExtract in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionMBStringExtract |
UI8 |
Action = 0x35 |
1. Pops number count off the stack.
2. Pops number index off the stack.
3. Pops string string off the stack.
4. The substring of string starting at the index’th character and count characters in length is pushed to the stack.
5. If either index or count do not evaluate to integers, the result is the empty string.
6. This is a multi-byte aware version of ActionStringExtract. index and count are treated as character indices, counting double-byte characters as single characters.
Convert to integer
(See class FActionToInteger in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionToInteger
|
UI8 |
Action = 0x18 |
1. Pops a value off the stack.
2. The value is converted to a number.
3. Next, any digits after the decimal point are discarded, resulting in an integer.
4. The resulting integer is pushed to the stack.
Convert character code to ASCII
(See class FActionCharToAscii in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionCharToAscii |
UI8 |
Action = 0x32 |
1. Pops value off the stack.
2. The first character of value is converted to a numeric ASCII character code.
3. The resulting character code is pushed to the stack.
Convert ASCII to character code
(See class FActionAsciiToChar in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionAsciiToChar |
UI8 |
Action = 0x33 |
1. Pops value off the stack.
2. The value is converted from a number to the corresponding ASCII character..
3. The resulting character is pushed to the stack.
Convert character code to ASCII, multi-byte aware
(See class FActionMBCharToAscii in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionMBCharToAscii |
UI8 |
Action = 0x36 |
1. Pops value off the stack.
2. The first character of value is converted to a numeric character code. If the first character of value is a double-byte character, a 16-bit value is constructed with the first byte as the high order byte and the second byte as the low order byte.
3. The resulting character code is pushed to the stack.
Convert ASCII to character code, multi-byte aware
(See class FActionMBAsciiToChar in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionMBAsciiToChar |
UI8 |
Action = 0x37 |
1. Pops value off the stack.
2. The value is converted from a number to the corresponding character. If the character is a 16-bit value (>= 256), a double-byte character is constructed with the first byte containing the high-order byte, and the second byte containing the low-order byte.
3. The resulting character is pushed to the stack.
Unconditional branch
(See class FActionJump in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionJump |
UI8 |
Action = 0x99 |
|
WORD |
|
1. BranchOffset bytes are added to the instruction pointer in the execution stream.
2. The offsets is a signed quantity, enabling branches from –32,768 bytes to 32,767 bytes.
3. An offset of 0 points to the action directly after the ActionJump action.
Conditional Test and Branch
(See class FActionIf in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionIf |
UI8 |
Action = 0x9A |
|
BranchOffset |
WORD |
|
1. Pops Condition, a number, off the stack.
2. Tests if Condition is nonzero: If Condition is nonzero, BranchOffset bytes are added to the instruction pointer in the execution stream.
Note: When playing a Macromedia Flash 5 .SWF, Condition is converted
to a boolean and compared to true, not 0.
The offset is a signed quantity, enabling branches from –32768 bytes to 32767 bytes. An offset of 0 points to the action directly after the ActionIf action.
Call a subroutine
(See class FActionCall in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionCall |
UI8 |
Action = 0x9E |
1. Pops a value off the stack.
2. This value should be either a string matching a frame label, or a number indicating a frame number.
3. The value may be prefixed by a target string identifying the movie clip that contains the frame being called.
4. If the frame is successfully located, the actions in the target frame are executed. After the actions in the target frame are executed, execution resumes at the instruction after the ActionCall instruction.
5. If the frame cannot be found, nothing happens.
6. NOTE: This action's tag (0x9E) has the high bit set, which will waste a few bytes in SWF file size. This is a bug.
Gets a variable’s value
(See class FActionGetVariable in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionGetVariable
|
UI8 |
Action = 0x1C |
1. Pops name off the stack, which is a string naming the variable to get.
2. Pushes the value of the variable to the stack.
A variable in another execution context may be referenced by prefixing the variable name with the target path and a colon. For example: /A/B:FOO references variable FOO in movie clip with target path /A/B.
Sets a variable
(See class FActionSetVariable in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionSetVariable |
UI8 |
Action = 0x1D |
1. Pops value off the stack.
2. Pops name off the stack, which is a string naming the variable to set.
3. Sets the variable name in the current execution context to value.
A variable in another execution context may be referenced by prefixing the variable name with the target path and a colon. For example: /A/B:FOO references variable FOO in movie clip with target path /A/B.
(See class FActionGetURL2 in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionGetURL2 |
UI8 |
Action = 0x9A |
|
Method |
BYTE |
0 = None |
1. Pops window off the stack. window specifies the target window, which may be an empty string to indicate the current window.
2. Pops url off the stack. url which specifies the URL to be retrieved.
3. Method specifies the method to use for the HTTP request.
o A value of 0 indicates that this is not a form request, so the movie clip’s variables should not be encoded and submitted.
o A value of 1 specifies a HTTP GET request.
o A value of 2 specifies a HTTP POST request.
o If method is 1 (GET) or 2 (POST), the variables in the current movie clip are submitted to the URL using the standard x-www-urlencoded encoding and the HTTP request method specified by method.
Go to frame, stack-based.
(See class FActionGotoFrame2 in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionGotoFrame2 |
UI8 |
Action = 0x9F |
|
Play flag |
BYTE |
|
1. Pops frame off the stack.
2. If frame is a number, the next frame of the movie to be displayed will be the frame’th frame in the current movie clip.
3. If frame is a string, frame is treated as a frame label. If the specified label exists in the current movie clip, the labeled frame will become the current frame. Otherwise, the action is ignored.
4. Either a frame or a number may be prefixed by a target path, e.g. /MovieClip:3 or /MovieClip:FrameLabel
5. If the Play flag is set, the action goes to the specified frame and begins playing the enclosing movie clip. Otherwise, the action goes to the specified frame and stops.
Set current context, stack-based
(See class FActionSetTarget2 in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionSetTarget2 |
UI8 |
Action = 0x20 |
1. Pops target off the stack and makes it the current active context.
2. This action behaves exactly like the original ActionSetTarget from Macromedia Flash 3, but is stack-based to enable the target path to be the result of expression evaluation.
Gets a movie property
(See class FActionGetProperty in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionGetProperty |
UI8 |
Action = 0x22 |
1. Pops index off the stack.
2. Pops target off the stack.
3. Retrieves the value of the property enumerated as index from the movie clip with target path target and pushes the value to the stack.
The Property index values are as follows:
|
Property |
Value |
|
_X |
0 |
|
_Y |
1 |
|
_xscale |
2 |
|
_yscale |
3 |
|
_currentframe |
4 |
|
_totalframes |
5 |
|
_alpha |
6 |
|
_visible |
7 |
|
_width |
8 |
|
_height |
9 |
|
_rotation |
10 |
|
_target |
11 |
|
_framesloaded |
12 |
|
_name |
13 |
|
_droptarget |
14 |
|
_url |
15 |
|
_highquality |
16 |
|
_focusrect |
17 |
|
_soundbuftime |
18 |
|
_quality* |
19 |
|
_xmouse* |
20 |
|
_ymouse* |
21 |
*_quality, _xmouse and _ymouse are only available in Macromedia Flash 5 .SWF’s.
Sets a movie property
(See class FActionSetProperty in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionSetProperty |
UI8 |
Action = 0x23 |
1. Pops value off the stack.
2. Pops index off the stack.
3. Pops target off the stack.
4. Sets the property enumerated as index in the movie clip with target path target to the value value.
Clones a sprite
(See class FActionCloneSprite in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionCloneSprite |
UI8 |
Action = 0x24 |
1. Pops depth off the stack.
2. Pops target off the stack.
3. Pops source off the stack.
4. Duplicates movie clip source, giving the new instance the name target, at z-order depth depth.
Removes a clone sprite
(See class FActionRemoveSprite in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionRemoveSprite |
UI8 |
Action = 0x25 |
1. Pops target off the stack.
2. Removes the clone movie clip identified by target path target.
Starts dragging a movie clip
(See class FActionStartDrag in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionStartDrag |
UI8 |
Action = 0x27 |
1. Pops target off the stack. target identifies the movie clip to be dragged.
2. Pops lockcenter off the stack. If lockcenter evaluates to a nonzero value, the center of the dragged movie clip is locked to the mouse position. Otherwise, the movie clip moves relatively to the mouse position when the drag started.
3. Pops constrain off the stack.
4. If constrain evaluates to a nonzero value:
1. Pops y2 off the stack.
2. Pops x2 off the stack.
3. Pops y1 off the stack.
4. Pops x1 off the stack.
Ends drag operation
(See class FActionEndDrag in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionEndDrag |
UI8 |
Action = 0x28 |
1. Ends the drag operation in progress, if any.
Wait for a frame to be loaded, stack-based
(See class FActionWaitForFrame2 in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionWaitForFrame2 |
UI8 |
Action = 0x8D |
|
SkipCount |
BYTE |
|
1. Pops frame off the stack.
2. If the frame identified by frame has been loaded, SkipCount actions following the current one are skipped.
3. frame is evaluated in the same way as the Goto Frame 2 action.
Sends debugging output string
(See class FActionTrace in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionTrace |
UI8 |
Action = 0x26 |
1. Pops value off the stack.
2. In the Test Movie mode of the Macromedia Flash editor, appends value to the output window if the debugging level is not set to None.
3. In the Player, nothing happens.
Reports milliseconds since player started
(See class FActionGetTime in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionGetTime |
UI8 |
Action = 0x34 |
1. Calculates the number of milliseconds since the Player was started (an integer).
2. This number is pushed to the stack.
Calculates a random number
(See class FActionRandomNumber in the Macromedia Flash File Format (SWF) SDK)
|
Field |
Type |
Comment |
|
ActionGetTime |
UI8 |
Action = 0x30 |
1. Pops maximum off the stack.
2. Calculates a random number, an integer in the range 0 ... (maximum-1)
3. This random number is pushed to the stack.
Macromedia Flash (SWF) version 5 is similar to version 4. New actions greatly expand ActionScript functionality. There are also new type conversion, math and stack operator actions.
Below is an overview of Macromedia (SWF) 5 actions:
ScriptObject Actions
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
Type Actions |
|||
|
|
|||
Math
Actions
|
|||
|
|
|||
Stack Operator Actions |
|||
|
|
|||
|
|
|||
|
|
|||
|
|
Executes a
function. The function may be an ActionScript
built-in function (such as parseInt), a user-defined ActionScript function, or a native
function. Executes native and
author-defined function calls.
See also, ActionNewObject.
1.
Gets Pops the function name (String) from the
stack.
2.
Gets Pops numArgs (int) from the stack..
3. Pops the arguments off the stack.
4. Invokes the function, passing it the arguments.
5.
The
return value of the function invocation is pushed to the stack. Note, if there is no appropriate return
value (i.e: the function does not have
a “return” statement), a “push undefined” is generated by the compiler and is pushed to the stack. The “undefined” return value should be popped off the stack.:
For all of the call actions (ActionCallMethod, ActionNewMethod, ActionNewObject, and ActionCallFunction) and initialization actions (ActionInitObject and ActionInitArray), please note that the arguments of the function are pushed onto the stack in reverse order, with the rightmost argument first and the leftmost argument last. The arguments are subsequently popped off in order (first
to
last).
Pops the arguments off
the stack.
Invokes the function, passing it the
arguments. The return value of the
function invocation is pushed to the stack.3. Sees if the function
is an author-defined function object.
If so, it is retrieved.
4. If the
function is not an author-defined function object, is it a native
function?
a. If so,
it invokes the native function using the args and then cleans up the memory.
b. If not, it creates the function in memory
from the function definition.
i. Makes a
new ActionList with a ScriptAtom arguments list.
ii. Assigns the ActionList to an ActionContext
with ConstantPool references.
iii. Sets the
"this" pointer.
5. Fills out the parameters (any unspecified
parameters should be undefined)
6. If the
container of the function is a movie clip, ActionCallFunction switches to its
thread.
7.
PushAction pushes the ActionList to the stack for execution.
8. Unused
arguments are discarded.
9. Saves
the position in old action list.
|
Field |
Type |
Comment |
|
ActionCallFunction |
UI8 |
Action = 0x3D |
Parses numparams, [param name1, … ,
param name n] and codesize. Pushes the function actions to the stack.
Pushes a method (function) call on to the stack. Similar to ActionNewMethod.
If the named method exists, ActionCallMethod:
1. Pops the name of the method from the stack. If the method name is blank or undefined, the object is taken to be a function object that should be invoked, rather than the container object of a method. For example, if CallMethod is invoked with object obj and method name blank, it's equivalent to using the syntax:
obj();
If a method’s name is foo, it's equivalent to:
obj.foo();
2. Pops the ScriptObject, object, from the stack.
3. Pops the number of arguments, args, from the stack.
4.
Pops
the arguments off the stack.
5.
Executes the method call with the specified
arguments.
6.
P, and pushes
the return value of the method or function to the stack. Note, if there is no appropriate return
value (i.e: the function does not have
a “return” statement), a “push undefined” is generated by the compiler and is pushed to the stack. The “undefined” return value should be popped off the stack.:
For all of the call actions (ActionCallMethod, ActionNewMethod, ActionNewObject, and ActionCallFunction) and initialization actions (ActionInitObject and ActionInitArray), please note that the arguments of the function are pushed onto the stack in reverse order, with the rightmost argument first and the leftmost argument last. The arguments are subsequently popped off in order (first
to last).
Gets
the ScriptObject and argument data.
a.Pushes
the resulting ActionList (ScriptObject and data) to the stack.
1.Saves
the position of the old action list.
|
Field |
Type |
Comment |
|
ActionCallMethod |
UI8 |
Action = 0x52 |
Creates a new constant pool in the ActionContext. Replaces the old constant pool if it already exists in the ActionContext.
|
Field |
Type |
Comment |
|
ActionConstantPool |
UI8 |
Action = 0x88 |
|
constant pool |
STRING |
|
Parses a constant pool from the tag.
Defines a function with a given name and body size.
1. Parses the name of the function (name) from the action tag.
2. Skips the parameters in the tag.
3. Parses the code size from the tag. After the DefineFunction tag, the next codeSize bytes of action data are considered to be the body of the function.
4. Gets the code for the function.
5. Usage 1. Pushes an “anonymous” function on stack that will not persist. This function is a function literal that is declared in an expression instead of a statement. An “anonymous” function may be used to define a function, return its value, and assign it to a variable in one expression, as in the ActionScript, “area = (function () {return Math.PI * radius *radius;})(5);”.
OR
Usage 2. Sets a thread variable that will persist within a named thread, with a given functionName, and a given function definition. This is the more conventional function definition. For example in ActionScript:
function Circle(radius) {
this.radius
= radius;
this.area
= Math.PI * radius * radius;
}
|
Field |
Type |
Comment |
|
ActionDefineFunction |
UI8 |
Action = 0x9B |
|
FunctionName |
STRING |
name of function, empty if anonymous |
|
NumParams |
WORD |
# of parameters |
|
param 1 |
STRING
|
parameter name 1 |
|
param 2 |
STRING
|
parameter name 2 |
|
... |
|
|
|
param N |
STRING
|
parameter name N |
|
codeSize |
WORD
|
# of bytes of code that follow |
Parses (in order) functionName, numParams, [param1, param2, … , param N] and then code size.
Defines a local variable and sets its value. If the variable already exists, the value is resetset to the newly specified
value.
|
Field |
Type |
Comment |
|
ActionDefineLocal |
UI8 |
Action = 0x3C |
Pops value off the stack.
Pops name off the stack.Pops
name and value
off the stack.
Defines a local variable without setting its value. If the variable already exists, nothing happens. The initial value of the local variable will be the undefined value.
|
Field |
Type |
Comment |
|
ActionDefineLocal2 |
UI8 |
Action = 0x41 |
Pops name off the stack.
Deletes a
named property from a ScriptObject.
Pops the name of the property to delete. Pops the object to delete the property from.Deletes
an object or variable, “name”, from a ScriptObject.
|
Field |
Type |
Comment |
|
ActionDelete |
UI8 |
Action = 0x3A |
Pops the Name of the property off the stack. Pops object off of the stack.
Deletes the variables of a thread or a player,
“name”.
|
Field |
Type |
Comment |
|
ActionDelete2 |
UI8 |
Action = 0x3B |
Pops maximum variablethe Name of the thread or player off the stack.
Pushes an object and all of its children from a thread on to the stack.
1.
Pops
Gets the name of the “root” object off of the stack.
2.
Pushes a null terminator a value of type null on
the stack to flag the end of the enumeration.Pushes the thread
root object on the stack.
3.
Pushes the rest of the root object’s children objects and
variables on the stack recursively.
|
Field |
Type |
Comment |
|
ActionEnumerate |
UI8 |
Action = 0x46 |
Pops name of the object off of the stack. Pushes the object along and its children on to the stack.
Similar to ActionEquals, but
ActionEquals2 knows about types. If
arg1 and arg2 are the same type, ActionEquals2 returns whether they are
equivalent or not (“==”). In
the case that the arg1 and arg2 are MovieClips, the movie strings are
compared. In cases where arg1 and arg2
are not the same type, “false” is pushed to the stack. The abstract equality comparison algorithm
from ECMA-262 Section 11.9.3 is applied.
|
Field |
Type |
Comment |
|
ActionEquals2 |
UI8 |
Action = 0x49 |
MIKE:
PLEASE STATE THE ORDER THINGS ARE POPPED OFF THE STACK EXPLICITLY. DON’T COMBINE IT IN A SENTENCE LIKE THIS. THIS COMBINING OF POPS IN A SENTENCE OCCURS
FREQUENTLY IN THIS DOCUMENT.
Pops
arg1 and arg2
off of the stack. Pops arg1 off the stack.
Pops arg2 off the stack. Pushes the return value to the stack.
Retrieves a named property from an object, and pushes the value of the property onto the stack.
For example, if “obj” is an object, and it is assigned a property, “foo”, as follows:
obj.foo = 3;
then ActionGetMember with object set to ”obj” and name set to “foo” will push “3” on to the stack. If the specified property does not exist, “undefined” is pushed to the stack.
Note that the object parameter may not actually be an “object” type. If the object parameter is a primitive type such as number, boolean or string, it is converted automatically to a temporary wrapper object of class Number, Boolean or String. Thus, methods of wrapper objects may be invoked on values of primitive types. For example:
var
x = "Hello";
trace (x.length);
will correctly print “5”. In this case, the variable, “x”, contains the primitive string, "Hello". When “x.length” is retrieved, a temporary wrapper object for “x” is created using the type, String, which has a “length” property.
|
Field |
Type |
Comment |
|
ActionGetMember |
UI8 |
Action = 0x4E |
Pops the name of the member function. and Pops the
ScriptObject object
off of the stack. Pushes the value of the property on to the stack.
Initializes an array in a ScriptObject. Similar to ActionInitObject.
The newly created object is pushed to the stack. The stack is the only existing reference to the newly
created object. A subsequent SetVariable or SetMember action may store the newly created object in a variable.
1. Gets the number of arguments (“elements”) from the stack.
2. If there are arguments, ActionInitArray initializes an array object with the right number of elements.
3. Initializes the array as a ScriptObject.
4. Sets the object type to “Array”.
5.
Populates the array with strings initial elements by
popping the values
integer element value arguments off of
the stack.
For all of the call actions (ActionCallMethod, ActionNewMethod, ActionNewObject, and ActionCallFunction) and initialization actions (ActionInitObject and ActionInitArray), please note that the arguments of the function are pushed onto the stack in reverse order, with the rightmost argument first and the leftmost argument last. The arguments are subsequently popped off in order (first
to last).
|
Field |
Type |
Comment |
|
ActionInitArray |
UI8 |
Action = 0x42 |
Pops elems and then [arg1, arg2,…,argn] off the stack.
Initializes an Object in a ScriptObject. Similar to ActionInitArray.
The newly created object is pushed to the stack. The stack is the only existing reference to the newly
created object. A subsequent SetVariable or SetMember action may store the newly created object in a variable.
1.
Pops
Gets the number of arguments initial properties from
the stack.
2.
Initializes the object as a ScriptObject.
3.
Sets the object type to “Object”.
4.
Pops each initial property off the stack. For each initial property, the value of the
property is popped off the stack, then the name of the property is popped off
the stack. The name of the property is converted
to a string. The value may be of any
type.:
For all of the call actions (ActionCallMethod, ActionNewMethod, ActionNewObject, and ActionCallFunction) and initialization actions (ActionInitObject and ActionInitArray), please note that the arguments of the function are pushed onto the stack in reverse order, with the rightmost argument first and the leftmost argument last. The arguments are subsequently popped off in order (first
to last). If
there are argumeSets the object type to “Object”.
Pops
the arguments off the stack. Pops each initial property off the stack. For each initial property, the value of the
property is popped off the stack, then the name of the property is popped off
the stack. The name of the property is
converted to a string. The value may be of any type.
|
Field |
Type |
Comment |
|
ActionInitObject |
UI8 |
Action = 0x42 |
Pops elems off of the stack. Popsand
[arg1,
arg2,…,argnvalue1, name1, …, valueN, nameN] off
the stack.
Invokes a constructor function to create a new
object. A new object is constructed and passed to
the constructor function as the value of the this keyword. Arguments may be specified to the
constructor function. The return value
from the constructor function is discarded.
The newly constructed object is pushed to the stack. Pushes a new method
(function) call on to the stack. Similar
to ActionCallMethod and ActionNewObject..
If the named method is new, ActionNewMethod:
1.
Pops the name of the method from the stack.ScriptObject,
object, from the stack.
2.
Pops the number of arguments, args, from the stack.ScriptObject from the
stack. If the name of the method is blank, the
ScriptObject is treated as a function object which is invoked as the
constructor function. If the method
name is not blank, the named method of the ScriptObject is invoked.
3.
Pops the name of the method from the stack.number of arguments
from the stack.
4. Executes the method call.
5.
Pushes
the newly constructed object to the stack. Note, if there is no appropriate return value (i.e: the function does not have a “return”
statement), a “push undefined” is generated by the compiler and is pushed to the stack. The “undefined” return value should be popped off the stack.:
For all of the call actions (ActionCallMethod, ActionNewMethod, ActionNewObject, and ActionCallFunction) and initialization actions (ActionInitObject and ActionInitArray), please note that the arguments of the function are pushed onto the stack in reverse order, with the rightmost argument first and the leftmost argument last. The arguments are subsequently popped off in order (first
to
last). :
a.Creates
the ScriptObject and argument data.
a.Pushes
the resulting ActionList (ScriptObject and data) to the stack.
1.Saves
the position of the old action list.
|
Field |
Type |
Comment |
|
ActionNewMethod |
UI8 |
Action = 0x53 |
Parses numparams, [param name1, … ,
param name n] and codesize. Pushes the function actions to the stack.
Invokes a constructor
function. A new object is created and
passed to the constructor function as the this keyword. In addition, arguments may optionally be
specified to the constructor function on the stack. The return value of the constructor function is discarded. The newly constructed object is pushed to
the stack.Creates native and author-defined objects. See also, ActionCallFunction. Similar to ActionCallFunction and ActionNewMethod.
1. Pops the object name (STRING) from the stack.
2. Pops numArgs (int) from the stack.
3. Pop the arguments off the stack.
4.
Invokes
the named object as a constructor function, passing it the
specified arguments and a newly constructed object as the this keyword.
The return value of the constructor function is discarded.
5.
The newly constructed object is pushed to the
stack.:
For all of the call actions (ActionCallMethod, ActionNewMethod, ActionNewObject, and ActionCallFunction) and initialization actions (ActionInitObject and ActionInitArray), please note that the arguments of the function are pushed onto the stack in reverse order, with the rightmost argument first and the leftmost argument last. The arguments are subsequently popped off in order (first
to last).
3. Creates
a new ScriptObject.
4. Looks
up the "prototype" property of the function object. If present, ActionNewObject sets the
__proto__ property of the new object to this value.
5. Sets
the "constructor" property to reference the constructor function.
6. Is it a
native function object?
a. If so,
the native function object is invoked using the arguments and then cleaned up
the memory.
b. If not, ActionNewObject creates it.
i. Makes a new ActionList with a ScriptAtom
arguments list.
ii. Assigns the ActionList to an ActionContext
with ConstantPool references.
iii. Sets the
"this" pointer.
iv. Creates the new
object.
7. Fills
out the parameters (any unspecified parameters should be undefined).
8. If the
container of the function is a movie clip, switch to its thread.
9. Uses
PushAction to push the object to the stack for execution.
10. Discards unused arguments.
11. Pushes the container's location to the stack.
12. Saves the position in the old action list.
|
Field |
Type |
Comment |
|
ActionNewObject |
UI8 |
Action = 0x40 |
Parses numparams, [param name1, … ,
param name n] and codesize. Pushes the function actions to the stack.
Sets a property of an object. If the property does not already exist, it is created. Any existing value in the property is overwritten.
|
Field |
Type |
Comment |
|
ActionSetMember |
UI8 |
Action = 0x4F |
Pops the new value off the stack. ,Pops the object name off the stack., and Pops the object
off of the stack.
If the object in the stack is a “movieclip”, then the object’s “target path”
is pushed on the stack in dot notationto be returned. If the object is not a movie clip, the
result is the "undefined" type rather than the movie clip target
path.Note, in a Flash 5 .swf file, target paths may be
specified in either dot notation or slash notation in tags like
sactionSetProperty and sactionSetVariable.
In a Flash 4 .swf file, target paths must be in slash notation, even
when played in the Flash 5 Player.
|
Field |
Type |
Comment |
|
ActionTargetPath |
UI8 |
Action = 0x45 |
Pops the object off the stack. Pushes the target path on to the stack.
Defines a “With” block of script.
1. Parses the size (body length) of the With block from the sactionWith tag.
2. Checks to see if the depth of calls exceeds 8 (kMaxWithDepth). Note, that if the With depth has exceeded kMaxWithDepth, the body of the With is skipped rather than executed.
3. Parses the object involved with the With from the sactionWith tag.
4. Adds the With block to the ActionContext for this ScriptThread.
|
Field |
Type |
Comment |
|
ActionWith |
UI8 |
Action = 0x94 |
|
Size |
UI16 |
|
|
withblock |
STRING |
|
Pops the object involved with the With . and pParses the size and then the
withblock from the sactionWith tag.
Converts the object on the top of the stack into a number, and pushes the number back to the stack.
Note that for the “object” type, the valueOf method is invoked to convert the “object” to a “number” type for ActionToNumber. Conversions between primitive types such as string->number are built-in.
|
Field |
Type |
Comment |
|
ActionToNumber |
UI8 |
Action = 0x4A |
Pops the object off of the stack. Pushes the number on to the stack.
Converts the object on the top of the stack into a string, and pushes the string back to the stack.
Note that for “object” type, the toString method is invoked to convert the “object” to “sting” type for ActionToString.
|
Field |
Type |
Comment |
|
ActionToString |
UI8 |
Action = 0x4B |
Pops the object off of the stack. Pushes the string on to the stack.
Pushes the “TypeOf” value to the stack. The possible types are:
"number"
"boolean"
"string"
"object"
"movieclip"
"null"
"undefined"
"function"
|
Field |
Type |
Comment |
|
ActionTypeOf |
UI8 |
Action = 0x44 |
Pops value to evaluate
determine
the type of off the stack.
Pushes a string with the type
of the object on to the stack.
Pops arg1 off the stack. Pops arg2 off the stack. Adds arguments arg1
and arg2, and pushes the result to the stack.
This action is similar to ActionAdd, but performs the addition
differently according to the data types of the arguments. The addition operator algorithm in ECMA-262
Section 11.6.1 is used. If string
concatenation is applied, the concatenated string is arg2 followed by arg1.
This
is similar to ActionAdd,
but it knows about types. Strings are
concatenated. Numbers are added.
|
Field |
Type |
Comment |
|
ActionAdd2 |
UI8 |
Action = 0x47 |
Pops arg1 off
of the stack. andPops arg2 off of the stack and . pPushes the result on to the stack.
Calculates whether arg1 is less
than arg2 and . pPushes a boolean return value to the stack. This action is similar to ActionLess, but
performs the comparison differently according to the data types of the arguments. The abstract relational comparison algorithm
in ECMA-262 Section 11.8.5 is used.This is similar to ActionLess, but it knows about
types.
If arg1 and arg2 are numbers, ActionLess2 evaluates
“arg1 < arg2” and pushes a Boolean return value to the stack. If arg1 and arg2 are strings, actionLess2
also evaluates “arg1 < arg2” with the C++ function, “strcmp”. If arg1 and arg2 are of some other data
types, ActionLess does not push anything to the stack.
|
Field |
Type |
Comment |
|
ActionLess2 |
UI8 |
Action = 0x48 |
Pops arg1 and then
arg2 off of the stack. Pushes the return value on to the stack.
Calculates x modulo y. If y is 0, then NaN (0x7FC00000) is pushed to the stack.
|
Field |
Type |
Comment |
|
ActionModulo |
UI8 |
Action = 0x3F |
Pops x and then y
off the stack and . pPushes the value x % y on to the stack.
PPops two numbers off of the
stack and performs a bitwise “And”.
Pushes an S32 number to the stack.
The arguments are converted to 32-bit unsigned integers prior to performing the bitwise operation. The result is a SIGNED 32-bit integer.
|
Field |
Type |
Comment |
|
ActionBitAnd |
UI8 |
Action = 0x60 |
Pops arg1 and then arg2 off of the stack. Pushes the result to the stack.
Pops
the shift count “arg” and then “value” off of the stackPops the value and
shift count arguments from the stack.
The value argument is converted to 32-bit signed integer and only the least significant 5 bits are used as the shift count. The bits in the value “arg” are shifted to the left by the shift count. ActionBitLShift pushes an S32 number to the stack.
|
Field |
Type |
Comment |
|
ActionBitLShift |
UI8 |
Action = 0x63 |
Pops shift count arg value and then shift count arg value off of the stack. Pushes the result to the stack.
SAME ERROR IN ORDERING
OF ARGUMENTS AS ACTIONBITRSHIFT, SEE THAT ONE.
Pops two numbers off of the stack and performs a bitwise “Or”. Pushes an S32 number to the stack.
The arguments are converted to 32-bit unsigned integers prior to performing the bitwise operation. The result is a SIGNED 32-bit integer.
|
Field |
Type |
Comment |
|
ActionBitOr |
UI8 |
Action = 0x61 |
Pops arg1 and then arg2 off of the stack. Pushes the result to the stack.
Pops the shift count from the stack. Pops the value from the stack. Pops
the value and shift count arguments from the stack. The value argument is converted to a 32-bit signed
integer and only the least significant 5 bits are used as the shift count.
The bits in the value “arg” are shifted to the right by the shift count. ActionBitRShift pushes an S32 number to the stack.
|
Field |
Type |
Comment |
|
ActionBitRShift |
UI8 |
Action = 0x64 |
Pops shift count from the stack. Pops the value to shift from the
stack. value and shift count arg
off of the stack. Pushes
the result to the stack.
Pops the value and shift count arguments from the stack. The value argument is converted to 32-bit signed integer and only the least significant 5 bits are used as the shift count.
The bits in the value “arg” are shifted to the right by the shift count. ActionBitURShift pushes a UI32 number to the stack.
|
Field |
Type |
Comment |
|
ActionBitURShift |
UI8 |
Action = 0x65 |
Pops shift count from the stack.
Pops the value to shift from the
stack. Pushes the result to the stack.Pops value and shift count arg off
of the stack. Pushes the result to
the stack.
SAME ERROR IN ORDERING
OF ARGUMENTS AS ACTIONBITRSHIFT, SEE THAT ONE.
Pops two numbers off of the stack and performs a bitwise “Xor”. Pushes an S32 number to the stack.
The arguments are converted to 32-bit unsigned integers prior to performing the bitwise operation. The result is a SIGNED 32-bit integer.
|
Field |
Type |
Comment |
|
ActionBitXor |
UI8 |
Action = 0x62 |
Pops arg1 and arg2 off of the stack. Pushes the result to the stack.
Pops a number value from the stack, converts it to number
type, decrements it by 1, and pushes it back to the stack.
|
Field |
Type |
Comment |
|
ActionDecrement |
UI8 |
Action = 0x51 |
Pops the number off of the stack. Pushes the result on to the stack.
Pops a number from value from the
stack, converts
it to number type, increments it by 1, and pushes it back to the stack.
|
Field |
Type |
Comment |
|
ActionIncrement |
UI8 |
Action = 0x50 |
Pops the number off of the stack. Pushes the result on to the stack.
Pushes a duplicate of top of stack (the current return value) to the stack.
|
Field |
Type |
Comment |
|
ActionPushDuplicate |
UI8 |
Action = 0x4C |
Pushes a duplicate of the current return value on to the stack.
Forces the return item to be pushed off the stack and returned (or at least discarded if a return is not appropriate).
|
Field |
Type |
Comment |
|
ActionReturn |
UI8 |
Action = 0x3E |
Pops value off the stack.
Swaps the top two ScriptAtoms on the stack.
|
Field |
Type |
Comment |
|
ActionStackSwap |
UI8 |
Action = 0x4D |
Pops Item1 and then
Item2 off of the stack. Pushes Item2 and Item1 on to the stack.
Reads the next object from the stack (without popping it) and stores it in one of 4 registers.
|
Field |
Type |
Comment |
|
ActionStoreRegister |
UI8 |
Action = 0x87 |
|
register number |
BYTE |
|
Parses register number from the StoreRegister tag.


Glue42 chat provider app gives us all we need for clients to \"hook\" to it and have a working chat solution


Landing Page
Special Projects
This story is part of a series of specially designed stories that represents some of the best journalism The Post has to offer. Check out the rest of the special projects here.
Carl Fonticella | FOR THE POST
From left to right, senior forward Mike Palasics (#28), head coach Sean Hogan, senior defender Jake Faiella (#17) and senior foward Drew Crandall (#15) pose for a portrait together. The three are the only seniors on the team, and the first seniors Hogan will have overseen since their freshman year.
10.05.17
Time is a curious thing. It can fly by or go too slow, and, in most cases, having more time is desired but can’t be fulfilled.
Time is something that seniors Drew Crandall, Jake Faiella and Mike Palasics, along with coach Sean Hogan have put in together over the course of the last four years. Time together is also something they're running out of.
From the first day the group walked in the door, the combination is one Hogan will remember for a long time.
“In terms of continuity, I’m proud of them," Hogan said. "They’re Bobcats through and through.”
It was four years ago that the Bobcats announced Hogan as their next head coach. From the get-go, Hogan has established his program within the confines of Bird Arena. His foundations are his three seniors.
It only seemed like yesterday Crandall, Faiella and Palasics were lacing up their skates and stepping out onto the slushed August ice at Bird, what they call home.
“We come here every day because we love to play. We aren’t here on scholarships like anybody else — we come here and put it on the line.”senior defender Jake Faiella
Faiella and Crandall were recruited, while Palasics originally came to Ohio to try his hand at ROTC. Eventually, Palasics' love for the game took over after he earned a spot due to a spectacular tryout.
The three have been together on and off the ice for the last three years — they live together, go to practice together, go to the library together and go out together.
They make jokes at one another’s expense — mostly at the 24-year-old Faiella, who is nicknamed “the father.”
“If you have a good relationship off the ice, then it’s obviously going to transfer on the ice,” Crandall said.
Faiella and Palasics have worked wonders together on the penalty kill and, with Crandall as a solid third- and fourth-liner, the senior trio has cemented an on-ice chemistry that has fueled success for Ohio.
That chemistry added with experience, has created a timeless leadership role for the three. Faiella, the team’s captain, and Palasics, an alternate captain, have led the team through the good times and the bad — only now they have the patches on their jerseys to signify their role.
“Faiella has always been a leader; he leads by example and by voice,” goalie Jimmy Thomas said. “It’s nice with a small group because you always know who to look up to for advice. Mikey P is always a good vocal leader, as well as Hazel and Faiella — they always say little pick ups that make the guys buy into the system and make everyone happy.”
As the team’s captain, Faiella’s leadership has always been apparent.
“Jake’s been a leader since day one,” Hogan said.
With the Bobcats, the four have made deep postseason runs both in the Central States Collegiate Hockey League and, most notably, last year in the American Collegiate Hockey Association, where they finished as national runners-up.
They haven’t won a championship — at least not yet. But with a record of 85-24-10, when it’s all said and done, there won’t be any reason to hang their heads.
“We come here every day because we love to play,” Faiella said. “We aren’t here on scholarships like anybody else — we come here and put it on the line.”
For Hogan and his seniors, it’s been a fast four years. Blowout wins, heartbroken losses and all of the other statistics will be referenced upon as history moves forward.
But those are just numbers.
What really will be remembered are the times spent in Bird, running the same drill over and over again. The satisfaction of sweeping a team. The long road trips.
How, in their first year, Hogan mixed up former captain Matt Hartman’s name with Palasics’ and sent the Hartman family a Christmas card addressed to Mike. How Hogan asked Palasics how many ribs he had eaten while he was still eating. And lastly, how Hogan had told them that their time at Ohio would be the best four years of their lives.
In the blink of an eye, you can say to yourself, “where did the time go?”
For Crandall, Faiella and Palasics, they know exactly where the time went.
Landing Page
This story is part of a series of specially designed stories that represents some of the best journalism The Post has to offer. Check out the rest of the special projects here.


--- layout: archive title: Zulip Chat Archive permalink: /stream/113489-new-members/topic/(2.20*.20k.20.2B.201).20.2F.202.20.3D.20k.html ---
Given a natural number k
, is there a quick way to show (2 * k + 1) / 2 = k
in Lean? Perhaps I've simply not looked hard enough, but I've browsed through the mathlib docs for lemmas on /
and div2
and none of them seem to directly imply my desired result.
I believe there is a proof that div2 (bit1 k) = k
Oh, I see it now. I definitely haven't been looking hard enough :upside_down:
alternatively, you can use the method used in that proof, via nat.add_mul_div_left
and reflexivity to prove 1 / 2 = 0
import tactic.omega example (n : ℕ) : (2 * n + 1) / 2 = n := nat.div_eq_of_lt_le (by omega) (by omega)
Last updated: Apr 24 2020 at 19:02 UTC


To calculate the relative risk (RR) for the generalized additive model.
| Version: | 0.4.0 |
| Imports: | mgcv, graphics, stats, boot |
| Published: | 2018-03-19 |
| Author: | Zhicheng Du,Wangjian Zhang, Yuantao Hao |
| Maintainer: | Zhicheng Du <dgdzc at hotmail.com> |
| License: | GPL-3 |
| NeedsCompilation: | no |
| CRAN checks: | gamRR results |
| Reference manual: | gamRR.pdf |
| Package source: | gamRR_0.4.0.tar.gz |
| Windows binaries: | r-devel: gamRR_0.4.0.zip, r-release: gamRR_0.4.0.zip, r-oldrel: gamRR_0.4.0.zip |
| OS X binaries: | r-release: gamRR_0.4.0.tgz, r-oldrel: gamRR_0.4.0.tgz |
| Old sources: | gamRR archive |
Please use the canonical form https://CRAN.R-project.org/package=gamRR to link to this page.


7 August 2006
The Ministry of Public Health in Thailand has confirmed the country’s 24th case of human infection with the H5N1 avian influenza virus. The case, which was fatal, occurred in a 27-year-old man from the central province of Uthai Thani. He developed symptoms on 24 July, was hospitalized on 30 July, and died on 3 August.
Investigation of his source of infection revealed contact with household chickens, which began dying around one week prior to symptom onset.
This is the country’s second case of H5N1 infection, and second fatality, within the past two weeks. Confirmation of these cases follows an 8-month period in which no human cases were reported in the country.
Recent outbreaks in poultry have been officially reported in two provinces, Phichit and Nakhon Phanom, located in the northern and north-eastern parts of the country.


redirecting you to secure site
https://daedalusuva.github.io/public/
...follow the link if you are not automatically sent there :)


A free-to-attend unconference in the heart of the historic city of Canterbury
BarCamp Canterbury is a free-to-attend unconference.
The content of BarCamp Canterbury is provided by the attendees.
Based in the historic city of Canterbury in the heart of Kent.
Generously donated by the University of Kent: School of Computing
Possibly November 2020.
BarCamp Canterbury is an unconference that is completely free-to-attend and based loosely around the theme of technology.
As an unconference, the content of BarCamp Canterbury is provided by you, the attendees! Meet with like-minded people, share your ideas and engage in discussions.

Previous events which welcomed over 150 delegates from all around the UK (and further afield).
See snippets from previous events:
So you have decided that BarCamp sounds awesome, and you want to attend? Check out this check list of things you should do.
On the day we will share a link to the session grid. If you'd like to give a talk, you simply add the details of the talk to the grid. It's as easy as that!
Need ideas for the topic of your talk?
Talks can be about just about anything. Although talks tend to be tech-related, there's no strict requirement for them to be. Attendees don't have to give a talk, although we do encourage everyone to get involved in some way.
Talk slots are 30mins
All eventrooms will have whiteboards and projectors with VGA or HDMI connectivity
Are you ... a wizard? 🧙
Last year we had talks about home automation, car meachanice, automating stage lighting, building digital badges, science of creating vegan cheese, biohacking, and more ...
Our theme was loosely based on 'The Fifth Element' with digital interactive badges and intriguing team based puzzles
Do you have any unloved/unwanted gadgets, cables, tools, boards, tech, bits, stuff?
Donate any working bits that someone else could use in an upcoming projects.

After the main event there will be a social gathering nearby. More details will be announced closer to the date.
Thanks to our generous sponsors and supporters, lunch and snacks will be provided!
(As this is a free event we may not be able to provide food for all dietary requirements)
If you would like to sponsor BarCamp Canterbury, please read the additional sponsorship details and email us.
Parking on camps can be free at weekends. Carpark 9 is the closest to Woolf College
We would like to thank our supporters who have helped to make BarCamp Possible.
BarCamp supporters have contributed time, money or wares to help support this event.


In Unity, precomputed lighting is calculated in the background either as an automatic process or when manually initiated. In either case, it is possible to continue working in the editor while these processes run behind the scenes.
When the precompute process is running, a blue progress bar will appear in the bottom right of the Editor. There are different stages which need to be completed depending on whether Baked GI or Precomputed Realtime GI is enabled. Information on the current process is shown on-top of the progress bar.
Progress bar showing the current state of Unity’s precompute.
In the example above, we can see that we are at task 5 of 11 which is, ‘Clustering’ and there are 6 jobs remaining before that task is complete and the precompute moves on to task 6. The various stages are listed below:
Precomputed Realtime GI
Probes
Baked GI
Only static geometry is considered by Unity’s precomputed lighting solutions. To begin the lighting precompute process we need at least one GameObject marked as ‘static’ in our scene. This can either be done individually, or by shift-selecting multiple GameObjects from the hierarchy panel.
From the Inspector panel, the Static checkbox can be selected (Inspector > Static). This will set all of the GameObject’s ‘static options’, or ‘flags’, including navigation and batching, to be static, which may not be desirable. For Precomputed Realtime GI, only ‘Lightmap Static’ needs to be checked.
For more fine-grained control, individual static options can be set from the drop-down list accessible to the right of the Static checkbox in the Inspector panel. Additionally, objects can also be set to Static in the Object area of the lighting window.
If you set your Scene to Auto Generate (menu: Window > Lighting > Settings > Scene > Auto Generate), Unity’s lighting precompute begins automatically, and updates automatically when any static geometry in your Scene changes. If you do not enable Auto Generate, you must start the lighting precompute manually.
If you have checked Auto Generate in the bottom of Unity’s Lighting panel (menu: Window > Lighting > Settings > Scene > Auto Generate), this precompute begins automatically as a background process whenever the static geometry within your Scene changes.
However, if you have not enabled Auto Generate, you must manually start the lighting precompute process by clicking the ‘Build’ button next to it. This begins the precompute in much the same way, and gives you control over when this process starts.
Auto Generate can be useful when working on smaller or less complex Scenes, because it quickly produces accurate lighting results while you move or editing static GameObjects in your Scene. However, when working on large or complex Scenes, you might prefer to switch to the manual option, so that your computer is not running a high CPU usage and repeatedly re-starting the lighting precompute each time you modify your Scene.
When you manually initiate a precompute, all aspects of your Scene lighting are evaluated and computed. To recalculate and bake just the Reflection Probes by themselves, click the drop-down menu attached to the Generate Lighting button (menu: Window > Lighting > Settings > Scene > Generate Lighting) and select Bake Reflection Probes.
NOTE: When using Auto Generate mode, Unity stores your lighting data in a temporary cache with a limited size. This means that when you exceed the cache’s size, Unity deletes old lighting data. A problem might occur when building your project if some of your Scenes rely on auto-generated lighting data that has been deleted. In this case, your Scenes might not have the correct lighting in the built project. Therefore, before building your game, you should uncheck Auto Generate, and generate the lighting data manually for all your Scenes. Unity then saves your lighting data as Asset files in your project folder, which means you have the data saved as part of your project and included in your build.
Unity enables both Baked GI and Realtime GI by default. Baked GI is all precomputed; Realtime GI carries out some precomputation when indirect lighting is used. With both enabled, you then use each individual Light in your Scene to control which GI system it should use (in the Light component, use the Mode setting to do this). See documentation on the Lighting window and Global Illumination to learn more.
The most flexible way to use the lighting system is to use Baked GI and Realtime GI together. However, this is also the most performance-heavy option. To make your game less resource-intensive, you can choose to disable Realtime GI or Baked GI. Note that doing this this reduces the flexibility and functionality of your lighting system.
To manually enable or disable Global Illumination, open the Lighting window (Window > Lighting > Settings > Scene). Tick Realtime Global Illumination to enable Realtime GI, and tick Baked Global Illumination to enable Baked GI. Untick these checkboxes to disable the respective GI system. If any Lights are set to the mode you have disabled, they are are overridden and set to the active GI system.
To set properties for each individual Light, select it in the Scene or Hierarchy window, then edit the settings on the Light component in the Inspector window.
The default Mode for each light is Dynamic. This means that the Light contributes direct lighting to your Scene, and Unity’s Realtime GI handles indirect lighting.
If you set the Light’s Mode to Static, then that Light only contributes lighting to Unity’s Baked GI system. Both direct and indirect lighting from those Lights are baked into light maps, and cannot be changed during gameplay.
If you set the Light’s Mode to Stationary, GameObjects marked as Static still include this light in their Baked GI light maps. However, unlike Lights marked as Static, Stationary Lights still contribute real-time lighting, based on the stationary bake mode in the Lighting window (menu: Window > Lighting > Settings). This is useful if you are using light maps in a static environment, but you still want a good integration between dynamic and light map static geometry.
See documentation on Lighting Modes for more details.
In either Baked GI or Precomputed Realtime GI, Unity caches (stores) data about your scene lighting in the ‘GI Cache’, and will try to reuse this data whenever possible to save time during precompute. The number and nature of the changes you have made to your scene will determine how much of this data can be reused, if at all.
This cache is stored outside of your Unity project and can be cleared using (Preference > GI Cache > Clear Cache). Clearing this means that all stages of the precompute will need to be recalculated from the beginning and this can therefore be time consuming. However in some cases, where perhaps you need to reduce disk usage, this may be helpful.
Level-of-detail is taken into consideration when Unity generates baked lightmaps. Direct lighting is computed using the actual surfaces of all LODs. Lower LOD levels use light probes to fetch indirect lighting. The resulting lighting is baked into lightmap.
This means that you should place light probes around your LODs to capture indirect lighting. The object will not use lightprobes at runtime if you use fully baked GI.
2017–06–08 Page published with limited editorial review - Leave page feedback
Light Modes added in 5.6


{{> mini/header}}
We are delighted to have here, if you are already registered please click the login button.


{% extends "base.html" %} {% load staticfiles %} {% block title %}Directory Information{% endblock %} {% block body_content %} {% include 'fragments/user_info.html' %}
Use this page to update your PSU employee directory entry. Your entry will appear in the public PSU directory. You can change this information at any time after your account has been created.


{{offer.offerText}}
Thank you for responding to the offer. You {{offer.status}} the offer.
Thank you for accepting the offer! Your hiring manager will reach out to you shortly regarding moving forward.
We're sorry that you didn't think that the offer was a good fit. You can always email us feedback on our recruitment process, and feel reach out about future employment at Blackwood Consulting.


The problem with Pulsar is that it was originally designed to work with a SXROM configuration in order to be able to use 32KB SRAM/NVRAM. However, currently Nestopia is the only NES emulator that supports this configuration. Further to that, and even more troubling, is that even PowerPak development cartridge doesn't properly support 32KB NVRAM.
However, I do have a PowerPak mapper update given to me by Brian Parker (PowerPak creator) that fixes the problem. As of yet though this mapper update isn't part of the 'official' PowerPak mappers but Brian assures me that it will be sometime soon.
Until that happens Brian has given me permission to distribute the mapper update with Pulsar so you'll find it in the release ZIP file in the 'PowerPak' folder. I'd recommend backing up the old version of the mapper file.
Update To Supported Emulator List
It was brought to my attention that the latest development builds of Nintendulator also supports 32KB SRAM.
What You'll Need
- A NES emulator or an actual NES - either will do though as I said, until there is PowerPak support for SXROM+32KBNVRAM, you'll only be able to run Pulsar32 using Nestopia
- A control pad, if you're using NES hardware
- A knowledge of existing trackers, especially LSDJ, will help enormously
- An understanding of hexadecimal numbers
- An understanding of the audio capabilities and limitations of the NES
What You'll Get
Check the 'readme.txt' file included in the release for a list of files.
Useful Links
Nestopia NES Emulator
Nestopia is available for Windows and OSX.
Nintendulator
Nintendulator - please be sure to use the latest 'unstable' build for Pulsar.
PowerPak NES Dev Cart
PowerPak carts are available from Retro USB
NESDEV Wiki - Audio Overview
A simplified version of blargg's authoratative NES APU (Audio Processing Unit) documentation can be found here


Polive
Home
Login
Categories
arrow_drop_down
Realtime polling.
assessment
Embedded video support
videocam
Live video
thumbs_up_down
Easy to work with
Start voting now.
Create Debate
Debate Name:
Video Link:
Create!
send


This scenario shows how to add a hero image. Hero image refers to an image in a section which bleeds from edge to edge of the screen.


My opinions hopefully will at least start a... discussion, rant, riot etc
Most frontend devs...
We can do better right?


--- date: 2012-01-11T00:00:00Z published: true title: Need to combine a bunch of PDF files in pure ruby? url: /2012/01/11/need-to-combine-a-bunch-of-pdf-files-in-pure-ruby-/ ---
Found a great set of gems:
PDF Merger (also requires RJB, and iText)
Once you've got your JRE installed and iText installed - install the gems:
gem install pdf-merger
gem install rjb
Then this code is as simple as it gets:
That's it - works well on OS X - haven't tried it elsewhere yet.


|
|
|
| Passenger Address : |
|
|
|
|
| Amount (ETH) : | |
| Flight number: | |
| Address: | |
| Timestamp: |
|
| Passenger Address : |
| Airline address: |
|
| Fund(ETH): |
|


Ensure directories exist before writing to them.
var to = require('to2');
var from = require('from2');
var mkdirpStream = require('fs-mkdirp-stream');
from.obj([{ dirname: '/path/to/my/', path: '/path/to/my/file.js' }])
.pipe(mkdirpStream.obj(function(obj, callback) {
// callback can take 3 arguments (err, dirname, mode)
callback(null, obj.dirname);
}))
.pipe(to.obj(function(obj) {
// This will be called once the directory exists
// obj === { dirname: '/path/to/my/', path: '/path/to/my/file.js' }
}));
mkdirpStream(resolver)
Takes a resolver
function or string and returns a through2
stream.
If the resolver
is a function, it will be called once per chunk with the signature (chunk, callback)
. The callback(error, dirpath, mode)
must be called with the dirpath
to be created as the 2nd parameter or an error
as the 1st parameter; optionally with a mode
as the 3rd parameter.
If the resolver
is a string, it will be created/ensured for each chunk (e.g. if it were deleted between chunks, it would be recreated). When using a string, a custom mode
can't be used.
mkdirpStream.obj(resolver)
The same as the top-level API but for object streams. See the example to see the benefit of object streams with this module.
MIT
Contains a custom implementation of mkdirp
originally based on https://github.com/substack/node-mkdirp (Licensed MIT/X11 - Copyright 2010 James Halliday) with heavy modification to better support custom modes.