Magick::ImageList.new
[ { optional arguments } ] -> imagelist
Magick::ImageList.new(filename[, filename...]]) [ { optional arguments } ] ->
imagelist
Creates a new imagelist. If one or more image filenames are specified, opens and reads the files, adding a new image for each image in the image
file(s). Sets the scene number to the index of the last image, or
nil
if no filenames are specified.
Zero or more image file names. You can also specify optional arguments to be used when reading the file(s) by setting Image::Info attributes in the optional block.
A new imagelist. The imagelist contains an Image object for each image in the specified files. A file can contain more than one image. For example, new will create an image for each frame in an animated GIF or each layer in a multi-layer Photoshop file.
i = Magick::ImageList.new i = Magick::ImageList.new("Button_A.gif", "Cheetah.jpg")
ilist.delay=n
In conjunction with
ticks_per_second sets the length of time between each image in an animation. The delay=
attribute
assigns the same delay to all the images in the ilist. Use Image#delay= to set different delay values on individual
images.
An integer value representing the number of ticks that must elapse between each image in an animation.
self
ilist.delay = 20 # delay 1/5 of a second between images.
ilist.iterations=n
Sets the number of times an animated image should loop.
The animate method and the ImageMagick animate command does not respect this number. Both will repeat the animation until you stop them. Mozilla (and presumably Netscape) do respect the value..
The number of iterations.
self
ilist.iterations = 10
ilist.length -> integer
Returns the number of images in the imagelist.
i = Magick::ImageList.new("images/Button_A.gif", "images/Button_B.gif") i.length » 2
ilist.scene -> integer
ilist.scene = integer
Get/set the current scene number. The scene number indicates the image to which Image methods are sent.
ilist.scene = 10 ilist.scene » 10
ilist.ticks_per_second = integer
Used in conjunction with delay to establish the elapsed time between frames in an animation. By default the number of ticks per second is 100.
ilist.ticks_per_second = 1000
ImageList
delegates many methods to Array
, so you can manipulate the images in an imagelist using almost all of the methods
defined in Array
. Typically these methods also update the scene number. The scene number will never exceed the number of images in the
list, and if the imagelist contains no images the scene number will be nil
.
Array methods that would normally return an array return an ImageList.
Most array methods keep the current image current. If the method moves the current image to a new position, the method updates the scene number to the new index. If the method deletes the current image, the scene number is set to the last image in the list. The following table lists the methods that do not follow these rules.
| Array method | scene number will be... |
|---|---|
| << | set to index the last image in the list |
| clear | set to nil |
| concat | set to index the last image in the list |
| push | set to index the last image in the list |
| unshift | set to 0 |
Adding anything other than a image to an imagelist has undefined results. Most of the time RMagick will raise an ArgumentError exception. For example,
if you call collect!
on an imagelist you should make sure that the members of the imagelist remain images. If you need to replace images in
an imagelist with non-image objects, convert the imagelist to an array with the to_a
method, then modify the array.
The assoc
, flatten
, flatten!
, join
, pack
, and rassoc
methods are not
defined in the ImageList class.
Add noise to a model image. Append the resulting image to the imagelist in "example". (See the demo.rb
example.)
example = Magick::ImageList.new model = Magick::ImageList.new "model.miff" example << model.add_noise Magick::LaplacisanNoise
ilist <=> other_imagelist -> -1, 0, 1
Compares two imagelists and returns -1, 0, or 1 if the receiver is less than, equal to, or greater than the other imagelist. The comparison between the receiver (a) and the other (b) is performed this way:
n
, if the result of a[n] <=> b[n]
is not 0 then that is the result of
a <=> b. Individual images are compared by comparing their signatures.
a.scene <=> b.scene
is not 0, returns the resulta.length <=> b.length
ImageList
mixes in the Comparable
module.
ilist.animate([delay]) [ { optional arguments } ] -> self
Animate the images to an X Window screen. By default displays to the local screen. You can specify a different screen by assigning the name to the
server_name
attribute in the optional arguments block.
self
ilist.animate ilist.animate { |options| options.server_name = "other:0.0" }
The animate method is not supported on native MS Windows.
AnimateImages
ilist.append(true
or false
) -> image
Append all the images in the imagelist, either vertically or horizontally. If the images are not of the same width, any narrow images will be expanded to fit using the background color.
If true
, rectangular images are stacked top-to-bottom, otherwise left-to-right.
A image composed of all the images in the imagelist.
AppendImages
ilist.average -> image
Averages all the images together. Each image in the image must have the same width and height.
A single image representing the average of all the images in the imagelist.
AverageImages
ilist.clone -> other_imagelist
Same as dup, but the frozen state of the original is propagated to the copy.
A new imagelist
ilist.coalesce -> imagelist
Merges all the images in the imagelist into a new imagelist. Each image in the new imagelist is formed by flattening all the previous images.
The length of time between images in the new image is specified by the delay attribute of the input image. The position of the image on the merged images is specified by the page attribute of the input image.
A new imagelist
This example is an animated GIF created by coalescing 25 small images in a grid. Mouse over the image to start the animation.
flatten_images, optimize_layers
CoalesceImages
destination_list.composite_layers(source_list,
operator=OverCompositeOp
) ->
imagelist
An image from source_list is composited over an image from destination_list until one list is finished. Use the geometry and gravity attributes of the first image in destination_list to position the source images over the destination images. Unlike a normal composite operation, the canvas offset is also included to the composite positioning. If one of the image lists only contains one image, that image is applied to all the images in the other image list, regardless of which list it is. In this case it is the image meta-data of the list which preserved.
The optional operator argument specifies a CompositeOperator to use for the compositing operations.
An imagelist
This example is an animated GIF. Mouse over the image to start the animation.
This method is equivalent to the -layers Composite
option of ImageMagick's convert
command. See the
Layers Composition
section in
Examples of ImageMagick Usage
for more information.
ilist.copy -> other_imagelist
Creates a deep copy of the imagelist. The new imagelist contains a copy of all the images in the original imagelist.
An imagelist
imagelist2 = imagelist1.copy
ilist.cur_image -> image
Retrieves the image indexed by scene. Raises IndexError
if there are no images in the list.
Both the ImageList class and the Image class support the
cur_image
method. Of course, in the Image class, cur_image
simply returns self
. When a method accepts either an
image or a imagelist as an argument, it sends the cur_image
method to the argument to get the current image.
An image
ilist.deconstruct -> imagelist
This method constructs a new imagelist containing images that include only the changed pixels between each image and its successor. The resulting imagelist usually produces a much smaller file.
The deconstruct
method starts by copying the first image in the list to the output imagelist. Then, for each pair of images,
deconstruct
computes the smallest rectangle that encompasses all the changes between the first and second image and stores just the changed
rectangle of the second image, along with the offset of the rectangle relative to the boundary of the first image.
A new imagelist
DeconstructImages
ilist.dup -> other_imagelist
Makes a shallow copy of the receiver. The image elements in the new imagelist are references to the image elements in the original imagelist, not copies.
ilist.display [ { optional arguments } ] -> self
Displays the images in the imagelist to any X Window screen. By default displays to the local screen. You can specify a different screen by assigning
the name to the server_name
attribute in the optional arguments block.
self
The display method is not supported on native MS Windows.
DisplayImages
ilist.flatten_images -> image
Combines all the images in the imagelist into a single image by overlaying each successive image onto the preceding images. If a image has transparent areas, the underlying image will show through. Use the page attribute to specify the position of each image with respect to the preceding images.
This is useful for combining Photoshop layers into a single image.
An image
MergeImageLayers with the FlattenLayer method.
ilist.from_blob(blob[, blob...]) [ { optional arguments } ] -> self
Creates images from the blob (Binary Large Objects) arguments and appends the images to the imagelist.
A blob can be a string containing an image file such as a JPEG or GIF. The string can contain a multi-image file such as an animated GIF or a Photoshop image with multiple layers. A blob can also be one of the strings produced by to_blob. Control how the image(s) are created by setting additional Image::Info attributes in the optional block argument. Useful attributes include scene, number_scenes, and extract.
An image created from the blob argument(s). The
scene
attribute is set to the last image in the imagelist.
require "rmagick" f = File.open('Cheetah.jpg') blob = f.read ilist = Magick::ImageList.new ilist.from_blob(blob) ilist.display
BlobToImageList
ilist .fx(expression [, channel...]) -> image
Applies the specified mathematical expression to the input images. This method corresponds to ImageMagick's -fx operator.
u
and v
symbols refer to the 0th and 1st image in the list. The image reference index (u[2]
for example)
works as expected. The current scene number has no meaning in the context of the fx
method.
The image created by the expression.
# Produce a navy blue image from a black image imgl = Magick::ImageList.new imgl << Magick::Image.new(64, 64) { |options| options.background_color = 'black'} res = imgl.fx('1/2', Magick::BlueChannel)
FxImageChannel
ilist.inspect -> string
Produces a string that describes the images in the imagelist.
The returned string is a concatenation of the strings returned by Image#inspect for all the images in the imagelist.
i = Magick::ImageList.new("images/Button_A.gif", "images/Button_B.gif") » [images/Button_A.gif GIF 127x120+0+0 PseudoClass 256c 8-bit 18136b images/Button_B.gif GIF 127x120+0+0 PseudoClass 256c 8-bit 5157b] scene=1
ilist.montage [ { optional arguments } ] -> imagelist
Creates a composite image by reducing the size of the input images and arranging them in a grid on the background color or texture of your choice. There are many configuration options. For example, you can specify the number of columns and rows, the distance between images, and include a label with each small image (called a tile).
All of montage
's configuration options are specified by assigning values to attributes in a block associated with the method call.
As you can see in the examples below, when you assign a value to a montage attribute you must specify self
as the receiver so that Ruby can
distinguish the method call from an assignment to a local variable.
You may assign a Pixel object to any attribute that accepts a color name.
OverCompositeOp
.
compose
to
UndefinedCompositeOp.
<width>x<height>+<outer bevel width>+<inner bevel width>
. If the argument is a Geometry object, specify the width
and height of the frame with the width
and height
attributes, and specify the outer bevel width and the inner bevel width
with the x
and y
attributes. The values are in pixels. For example, to surround each tile with a frame 20 pixels wide by 20 pixels high and a 4-pixel inner and outer
bevel, use:
options.frame = "20x20+4+4"or
options.frame = Magick::Geometry.new(20,20,4,4)
<tile-width>x<tile-height>+<distance-between-columns>+<distance-between-rows>
. If you use a Geometry object,
specify the tile width and height with the width
and height
attributes, and the distance between rows and distance between
columns by the x
and y
attributes. To create tiles that are 130 pixels wide and 194 pixels tall, with 10 pixels between each column of tiles and 5 between each row, use:
options.geometry = "130x194+10+5"or
options.geometry = Magick::Geometry.new(130, 194, 10, 5)Both the geometry string and the
Geometry
object support flags that specify additional constraints. The default geometry is
"120x120+4+3>".
true
, adds a drop shadow to each tile. The default is false
.options.texture = Magick::Image.read("granite:").first
The default is no texture.
"<columns>x<rows>"
. If the value is a Geometry object, specify the number of columns as the width
attribute and
the number of rows as the height
attribute. montage
always generates all the rows, leaving empty cells if necessary. To
arrange the tiles 4 across and 10 down, use:
options.tile = "4x10"or
options.tile = Magick::Geometry.new(4,10)
The default is "6x4". If there are too many tiles to fit on one composite image, montage
creates multiple composite images.
To add labels to the tiles, assign a "Label" property to each image. The
montage
method will use the value of the property as the label. For example,
img[2]['Label'] = "Mom's Birthday"
See []=.
An imagelist that contains as many images as are required to display all the tiles.
MontageImages
ilist.morph(n) -> imagelist
Transforms a image into another image by inserting
n
in-between images. Requires at least two images. If more images are present, the 2nd image is transformed into the 3rd, the 3rd to the
4th, etc.
The number of in-between images to insert between each pair of images.
An imagelist containing copies of the original images plus the in-between images.
This animated GIF was created by reading the "0", "1", "2" and "3" images, then using morph
to create 8 images between each original image.
Mouse over the image to start the animation.
MorphImages
ilist.mosaic -> image
Composites all the images into a single new image. The location of each image is determined by the value of its page attribute.
An image
MergeImageLayers with the MosaicLayer method.
ilist.new_image(columns, rows[, fill]) [ { optional arguments } ] -> self
Adds a new image to the imagelist. The image can have an optional fill applied to it.
Creates a new image with the specified number of rows and columns. If the optional fill
argument is used, calls the
fill
method to fill the image. Otherwise, the image is filled with the background color.
You can set any Image::Info attributes in an associated block. These attributes supply options to be used when creating the image. For example, you can specify the background color to fill the image with (see the example), the depth, border color, etc.
self
Create a square red image.
ilist = Magick::ImageList.new ilist.new_image(100, 100) { |options| options.background_color = "red" }
ilist.optimize_layers(layer_method) -> imagelist
Optimizes or compares the images in the list. Equivalent to the
-layers
option in ImageMagick's mogrify
command.
The optimize_layers
method corresponds to the -layers
option on ImageMagick's convert
and
mogrify
commands. Anthony Thyssen's excellent
Examples of ImageMagick Usage
site has very detailed
information and examples
of the -layers
option and and the optimization methods .
One of the following ImageLayerMethod enum values:
Some of these values are not supported by older versions of ImageMagick. To see what values are available, enter the following code in irb:
Magick::ImageLayerMethod.values {|v| puts v}
In releases of ImageMagick before 6.3.6, this type was called MagickLayerMethod, so you may need to use this instead:
Magick::MagickLayerMethod.values {|v| puts v}
A new imagelist
deconstruct is an alias for optimize_layers
with the CompareAnyLayer
argument.
coalesce is an alias for optimize_layers
with the CoalesceLayer
argument.
OptimizeImageLayers, CompareImageLayers
ilist.ping(filename[, filename...]) -> self
ilist.ping(file[, file...]) -> self
Reads the image files and creates one or more images that contain all the image attributes but without the pixel data. If all you need is the image
attributes, the ping
method is much faster and consumes less memory than read
.
One or more image file names or open file objects.
self
ilist = Magick::ImageList.new ilist.ping "Button_A.gif" puts "The image has #{i.columns} columns and #{i.rows} rows." » The image has 127 columns and 120 rows.
PingImage
ilist.quantize(nc=256, colorspace=RGBColorspace
, dither=RiemersmaDitherMethod
, tree_depth=0,
measure_error=false
) -> imagelist
Analyzes the colors within a set of reference images and chooses a fixed number of colors to represent the set. The goal of the algorithm is to minimize the difference between the input and output images while minimizing the processing time.
A new imagelist containing quantized copies of the images in the original image.
This example shows the effect of quantizing 3 images to a set of 16 colors in the RGB colorspace. Mouse over the image to see the images before quantizing.
QuantizeImages
ilist.read(filename[, filename...])
[ { optional arguments } ] -> self
ilist.read(file[, file...]) [ { optional arguments } ] ->
self
Reads one or more image files and adds the images to the imagelist. After reading all the files, sets the scene number to the last image in the list.
The image files may be multi-frame (animated or layered) files. In this case read
adds multiple images per file to the imagelist.
One or more filenames or open file objects. You can also specify optional arguments to be used when reading the file(s) by setting Image::Info attributes in the optional block.
self
i = Magick::ImageList.new number = '0' 4.times do i.read "images/Button_" + number + ".gif" number.succ! end
Also see the morph.rb example and the demo.rb example.
ReadImage
You can create images using ImageMagick's built-in formats with the
read
method. See Built-in image formats.
ilist.remap(remap_image=nil, dither=RiemersmaDitherMethod) -> self
Reduce the colors used in the imagelist to the set of colors in remap_image.
self
This example shows the effect of reducing the colors used in the apple, beach scene, and leaf images to the set of colors used in the yellow rose image.
RemapImages (available in ImageMagick 6.4.3-6)
ilist.to_blob [ { optional arguments } ] -> string
Converts the images in the imagelist to a blob. A blob contains data that directly represent a particular image format in memory instead of on disk.
Control the format of the blob by setting Image::Info attributes in an associated block.
The blob in the form of a string
i = Magick::ImageList.new "birthday.png" s = i.to_blob » a string representing the image.
from_blob, Image#to_blob, Image.from_blob
ImageListToBlob
ilist.to_a -> array
Returns an array containing all the images in the list.
An array
ilist.write(filename) [ { optional arguments } ] -> self
ilist.write(file) [ { optional arguments } ] ->
self
If the image format
indicated by the filename supports multiple images per file (animated images), write
writes all the
images in the imagelist to a single file. Otherwise, write
writes each image to a separate file.
Regardless of the original format, write
converts the images to the format specified by the filename.
If the imagelist contains more than one image and the output format does not support multi-frame images, each image is written to a file that has the filename you specify followed by a period (.) and the scene number. You can change this behavior by embedding a %d, %0Nd, %o, %0No, %x, or %0Nx printf format specification in the file name.
A filename or open file object. Indicate the desired image
format either by the suffix (i.e. .jpg
, .png
) or the prefix (ps:
) to the
filename. If the argument is an open file object, you can specify a format for each image in the list by setting its
format attribute. (See the Notes section for Image#write.)
You can also specify optional arguments by setting Image::Info attributes in an associated block.
self, or nil
if the format cannot be determined.
# The PNG format does not support multi-frame files, # so each image is written to a separate file. i = Magick::ImageList.new "animated.gif" p i.length » 3 # contains 3 images i.write "test.png" » test.png.0 » test.png.1 » test.png.2 # ImageMagick's MIFF format does support multi-frame # files, so all 3 images are written to one file. i.write "animated.miff" » animated.miff
WriteImages


This text should be black on non-color devices, red on devices with a low number of colors, and greenish on devices with a high number of colors.


If you submitted a command and it is taking a long time to complete, or you do not want to complete it, quit the process using Ctrl+C.
Make sure the PuTTY terminal window has focus.
Type Ctrl+C to send a break command.
To quickly connect to the same IoT board the next time, save the session settings.
Enter in your serial connection details, including serial line and speed.
Under “Saved Sessions”, enter a descriptive name for your session presets. Then click “Save”.
The next time you want to connect using those presets, double-click on the saved session name.


- eggClassName - Static variable in class org.uclab.mm.icl.hlc.OntologyTools.HLCA
-
Name of the High Level Context class in the Context Ontology.
- emoLabel - Static variable in class org.uclab.mm.icl.llc.AER.vui.AudioEmotionRecognizerV
-
- emoLabel - Static variable in class org.uclab.mm.icl.llc.LLCRecognizer.AudioEmotionRecognizer
-
- emotionClassName - Static variable in class org.uclab.mm.icl.hlc.OntologyTools.HLCA
-
Name of the Emotion class in the Context Ontology.
- endTimeSparqlVar - Static variable in class org.uclab.mm.icl.hlc.OntologyTools.HLCA
-
Name of the variable used in the SPARQL queries to refer to an end time
value
- evaluatePredictiveModel(Classifier, Instances) - Method in class org.uclab.mm.icl.llc.MachineLearningTools.ExtClassification
-
Make Predictive Mdoel for Evaluation by Weka
- EventBasedSegmentation - Class in org.uclab.mm.icl.llc.MachineLearningTools
-
This class segments the audio data, based on the event (when there is no voice, this class filters that void period)
- EventBasedSegmentation() - Constructor for class org.uclab.mm.icl.llc.MachineLearningTools.EventBasedSegmentation
-
- executeWeka(int) - Method in class org.uclab.mm.icl.llc.AR.iar.AR_Reasoning
-
This function executes the Weka to infer the activity and returns the activity label
- ExtClassification - Class in org.uclab.mm.icl.llc.MachineLearningTools
-
This Class build the predictive model by all of classifier from weka library
- ExtClassification(String, int, String[], Classifier) - Constructor for class org.uclab.mm.icl.llc.MachineLearningTools.ExtClassification
-
set training data path, features information, labels and classifier
- extractAngleFeature() - Method in class org.uclab.mm.icl.llc.AR.var.KinectARFeatureExtraction
-
Calculating all angle features between 70 pre-identified joints
These joints are pre-identified based on the feature selection technique to only
calculate the most important features
- extractAngleFeature() - Method in class org.uclab.mm.icl.llc.MachineLearningTools.featureextraction.KincetARFeatureExtraction
-
- extractAngleFeatureInter() - Method in class org.uclab.mm.icl.llc.MachineLearningTools.featureextraction.KincetARFeatureExtraction2
-
- extractDistanceFeature() - Method in class org.uclab.mm.icl.llc.AR.var.KinectARFeatureExtraction
-
Calculating all distance features between 70 pre-identified joints
These joints are pre-identified based on the feature selection technique to only
calculate the most important features
- extractDistanceFeature() - Method in class org.uclab.mm.icl.llc.MachineLearningTools.featureextraction.KincetARFeatureExtraction
-
- extractDistanceFeatureInter() - Method in class org.uclab.mm.icl.llc.MachineLearningTools.featureextraction.KincetARFeatureExtraction2
-
- extractFeature(AudioInputStream) - Method in class org.uclab.mm.icl.llc.AER.jh.AERFeatureExtraction
-
Extract the Audio features
- extractFeature(double[]) - Method in class org.uclab.mm.icl.llc.AER.vui.AERFeatureExtraction
-
- extractFeature(InputType) - Method in class org.uclab.mm.icl.llc.MachineLearningTools.FeatureExtraction
-
- extractFeature(InputType) - Method in class org.uclab.mm.icl.llc.MachineLearningTools.featureextraction.FeatureExtraction
-
- extractFeature(Object) - Method in class org.uclab.mm.icl.llc.MachineLearningTools.featureextraction.KincetARFeatureExtraction2
-
- extractFeature(Object) - Method in class org.uclab.mm.icl.llc.MachineLearningTools.StatisticalFeatureExtraction
-
No Define
- extractFeature(Object) - Method in class org.uclab.mm.icl.llc.MachineLearningTools.TimeDomainFeatureExtraction
-
No Define
- extractFeatures() - Method in class org.uclab.mm.icl.llc.AR.var.KinectARFeatureExtraction4
-
extract features. this function must be called after calling setInputData() function.
- extractFeatures() - Method in class org.uclab.mm.icl.llc.MachineLearningTools.featureextraction.KincetARFeatureExtraction4
-
extract features. this function must be called after calling setInputData() function.


My Codeplex project, Database Schema Reader, has a new version.
I needed to create a SQLite database was a replica of a parent SQL Server database. The existing project could easily read the schema, and the code generation tools could give me the table DDL and the insert SQL. It was just a matter of executing the SQL and creating the database file.
So I created another simple Windows Forms UI. The SqlWriter class needed some tweaks for SQLite support (and I added integration tests).
For fun, I decided to see if it could also support Microsoft's latest version of SQL Server CE 4.0.
SQL Server CE 4.0 is, like SQLite, an in-process database which can be XCOPY deployed. And unlike previous versions, it is easily able to run ASP.Net websites (it's the default database behind WebMatrix). And 4.0 provides the standard ADO GetSchema which my Database Schema Reader uses (3.5 throws a Not Implemented exception).
It has some of the same limitations as SQLite, such as no stored procedures (good riddance), and no output parameters. But it also has additional limitations. In SQLite you can batch together multiple SQL statements in a single line and execute them in one command. You can't in SQL Server CE.
Unlike SQLite's weakly typed and very simple data types, SQL Server CE 4.0 has most of the standard data types as SQL Server Express and full versions. Unfortunately, this was the big problem. If your table is defined with an IDENTITY primary key, you can't insert the data row with the same primary key, and subsequent foreign key relationships are broken. It's a pretty critical limitation for my scenario.
SQL Server CE 4 only supports a subset of SQL Server data types. The one data type it didn't support, which my database (and later versions of Northwind) use, is NVARCHAR(MAX). You have to use the horrible old NTEXT data type. I could have written a DDL provider that translates varchar max to ntext, but I don't think it's worth the effort.
So my SQL Server CE creation program has major limitations, compared to the SQLite version. It's built into CopyToSQLite.exe, and auto-detects if you've installed SQL Server CE, but you have to have a very simple database for it to work.
SQL Server CE 4 also doesn't support the ADO Sync framework which allows you to synchronize a disconnected database to a parent SQL Server database. Even SQL Server 2008 R2 Management Studio doesn't support it (you have to use Visual Studio 2010 with SP1).
The new FETCH /OFFSET syntax for paging, that will be SQL Server 11, is very nice though. I'm looking forward to that.


%inherit file="base.html"/> Backup codes You have just set up multi-factor authentication. Please keep a record of these backup codes, as you will need them if you lose the device you used to set up MFA. <%text> % for code in codes: ${code} % endfor %text>
You have just set up multi-factor authentication. Please keep a record of these backup codes, as you will need them if you lose the device you used to set up MFA.
% for code in codes: ${code} % endfor


--- layout: post title: 'Nokia products for Summer 2004' date: 2004-06-14 00:00:00 category: links ---


huddly-sdk
0.10.1 (2023-06-07)
New Features
crew:
added crew device (
#568
) (
96304276
)
ipUpgrade:
New cpio file format (
#565
) (
2911c3b2
)
0.10.0 (2023-06-01)
Build System / Dependencies
package:
update sdk-interface dep (
87e01f6a
)
New Features
ipAutozoomController:
_setMode added for legacy support (
16e43476
)
usbAdapterCamera:
added support l1 and s1 through usb adapter (
1ac09dfd
)
added smartbase device (
b05b9773
)
Bug Fixes
api.ts:
using newer msgpack library for handling encoding (
58230059
)
0.9.2 (2023-05-12)
New Features
caClient:
added client that communicates with the certificate authority (
924becce
)
0.9.1 (2023-03-03)
Chores
deps:
bump json5 from 1.0.1 to 1.0.2 (
1c487d06
)
bump loader-utils from 1.4.0 to 1.4.2 (
eff582e8
)
Bug Fixes
ipAutozoomControl:
should not need to check az status when using enable/disable (
c427fefd
)
ipUpgrader:
fix bug where upgrader is unable to use new cpio files (
a3cdb88c
)
0.9.0 (2022-11-02)
Build System / Dependencies
deps:
bump sdk-interfaces from 0.2.1 to 0.2.2 (
ac5c80d0
)
New Features
added static function getConnectedCameras (
3e66435a
)
0.8.0 (2022-10-20)
Build System / Dependencies
update @huddly/camera-proto to v1.2.0 (
b9ba1bf3
)
update @huddly/camera-proto to v1.1.5 (
84f05e1c
)
add eslint-plugin-react-hooks to package-lock (
4df9b5f6
)
Chores
deps:
bump protobufjs from 6.11.2 to 6.11.3 (
e900d42c
)
Documentation Changes
updated html files (
53beb474
)
Add known issues section to readme (
2b280fac
)
New Features
autozoom modes (
51d48413
)
Bug Fixes
S1 detections now has correct height coordinates (
eb6544a9
)
bufferStream now correctly implements destroy method (
926b052c
)
Remove protobuf related dependencies (
5fc4a2aa
)
hotfix for dartfish upgrader crashing when verifying upgrade (
306590cd
)
Tests
ipbase:
added tests for getOptionCertificates (
0343e5dc
)
added tests for getOptionCertificates (
8abe2eba
)
0.7.0 (2022-04-04)
Build System / Dependencies
bump cpio-stream (
9baa6d0e
)
Chores
Update @huddly/camera-proto to v1.0.14 (
a5908171
)
fix audit issues with minimist (
21dba5d0
)
Documentation Changes
Document breaking changes with v0.7.0 (
dd172150
)
Fix up wrong memberOf value for IpBaseDevice methods (
da55869e
)
Readme.md:
Document automatic updates of sdk (
3a8617a1
)
New Features
implement #getUpgrader directly on Ace and See controllers (
94a292bb
)
Get upgrader should be called from See or Ace controller (
114f5095
)
Create SeeUpgrader class that extends IpCameraUpgrader (
ff7e6646
)
AceUpgrader now extends IpCameraUpgrader base class (
a4f86672
)
Create a base ip camera upgrader class (
d4612fe4
)
on getDevice error, emit stacktrace (
25e1611d
)
SDK support for S1 Huddly devices (
01b65f0d
)
sdk-interfaces v0.2.0 (
bab56ce6
)
remove all the fileTransfer legacy functions (
86a03bf0
)
Bug Fixes
ace:
add return after reject where missing (
9dd78608
)
Refactors
create IpBaseDevice, Ace & See extend it (
2fb875f0
)
Tests
fix factory ACE failing test (
6fd66152
)
update unit tests after removing legacy code (
6b793014
)
0.6.6 (2022-02-17)
Chores
Build & Test sdk with Node16 (
40345f48
)
package.json:
updated jszip dependency (
f178ed67
)
deps:
bump node-fetch from 2.6.5 to 2.6.7 (
2357c03e
)
Documentation Changes
Readme.md:
Direct users to sdk code sample repo (
f22a72f9
)
Update docs html files (
37707e88
)
Remove code samples from sdk repo (
ac031a96
)
New Features
Slack notify when build fails (master) (
7dda4da1
)
Cron trigger master branch (Mon-Fri @ 0700) (
607c90b0
)
Allow audit check to have a whitelist (
bafbbffe
)
Introduce dependency audit-check (
d7b5fa53
)
Bug Fixes
Vulnerability check bugfix for node16 (
13533872
)
vulnerabilities & remove cz-conventional-changelog (
15cd40f5
)
az-controllere:
Increase timeout for az status call (
70aec20b
)
Other Changes
Init & setMode should be backward-compatible (
4a57e3fd
)
Tests
Install chalk-js for terminal styling (
b00fbf57
)
0.6.5 (2022-01-26)
Chores
use https for forked cpio-stream (works better in CI) (
ec19a005
)
bump @huddly/sdk-interfaces to v0.1.1 (
8aa12a96
)
Documentation Changes
Update the documentation html files (
20c3883d
)
Update jsdocs after interface restructuring (
6dc971f2
)
New Features
Support new autozoom mode 'Plaza' (aka 'Gallery View') on IQ (
5551c9b5
)
switch to github actions from travis (
740f09da
)
Refactor our interfaces to separate repo/npm (
d83fdd6e
)
Refactors
Grpc client init only on Ace.ts (
796a34e8
)
Use Logger and HuddlyHex from sdk-interfaces (
a4a7c48d
)
remove compodoc command on package.json (
1813bfec
)
0.6.4 (2021-12-16)
Chores
update camera-proto version (
15b704a3
)
remove ./node_modules prefix from npm scripts (
71b750ac
)
use pretty-quick for pre-commits (
588b5ea1
)
bump prettier version (includes some new formatting rules) (
1ad4255f
)
Update @huddly/
<EMAIL_ADDRESS>(
0c77290e
)
use escaped double quotes since windows does not like singles (
c9873d05
)
pacakge.json:
remove webpack dependencies (sdk not supported on browsers) (
6fa27d9c
)
Documentation Changes
Commit documentation changes (
77cae6a8
)
Add example docs for Huddly L1 (
3a6aef98
)
Update info on supported node versions for sdk (
5cadd1d7
)
fix link to ICnnControl from main page (
6bb2b39a
)
huddly l1 example readme update (
9053adbd
)
List more interface docs on main page (
a2448476
)
Update docs to sync with latest sdk release (
798cdbec
)
New Features
Detectors can now optionally emit raw detections data (
891a0715
)
cameraSwitchService:
fw upgrade schedule (
fbc6c35c
)
Bug Fixes
ipDetector:
await stop promise on destroy (
70724462
)
added return statement after reject in ace.ts & ipDetector.ts (
ea6b7ace
)
temporary workaround for not emitting dummy rawDetections (
af44c170
)
ipDetector now does not emit duplicate or invalid detections (
6312cc53
)
glob pattern for prettier now correctly matches all ts files in all subdirs (
5208dab3
)
ipdetector.ts:
_stopDetections should invoke setCnnFeature with the correct mode (
34c10eff
)
package.json:
Fix publish-package npm command (
a7270e51
)
pacakge.json:
Use https for npmjs registry (
22b1124f
)
Other Changes
cameraswitchservice.ts:
Send correct type (
ba42e834
)
Refactors
fix improperly formatted files (
14cd2343
)
index.ts:
sdk ERROR event includes device instance (
6eff42cf
)
Tests
cameraswitchservice:
Assert grpc out call type (
54e388d9
)
0.6.3 (2021-10-08)
Chores
resolve audit issues with eslint and mocha (
b113e5fe
)
update example code (
84bfd388
)
package.json:
bump @Huddly/camera-proto -> 1.0.9 (
acdc8af5
)
Bug Fixes
pin down camera-proto & camera-switch-proto (
657e6d23
)
0.6.2 (2021-09-29)
Chores
update @huddly/
<EMAIL_ADDRESS>(
d8ec9435
)
package-lock.json:
fix critical audit dependencies (
d17a3c5d
)
deps:
bump tmpl from 1.0.4 to 1.0.5 in /examples/rest (
0136759c
)
bump tar from 6.1.8 to 6.1.11 (
3602830d
)
Documentation Changes
Canvas documentation and sdk usage example (
59d6c320
)
New Features
canvas:
Enable/Disable enhance mode (
9383fdc0
)
factory supports dartfish/canvas (
e0fbddaa
)
Bug Fixes
IpAutozoomControl:
Add start,stop methods (
5ffb8a6a
)
update product names, pid and vid info (
d3216468
)
Other Changes
Grpc PTZ object from amera should not be used directly (
722095b6
)
Refactors
remove IAutozoomControl (use ICnnControl) (
7fb68634
)
ONE & Canvas update supported features (
0c012247
)
Tests
factory.ts:
add test for ACE device (
f070190b
)
0.6.1 (2021-08-23)
Documentation Changes
Readme:
Remove broken dependency badges (
ac6400ea
)
New Features
Export BASE product id on factory.ts (
506e6b40
)
Export huddly vendor id on factory.ts (
31b5e614
)
Bug Fixes
Update L1 pid from 3E9 to 0x3E9 (
c5c6ffeb
)
webpack bundle with new grpc dependencies (
262751f4
)
Other Changes
Avoid discovery hang for BASE (
66d4230e
)
0.6.0 (2021-08-16)
Chores
bump version for camera-proto and camera-switch-proto (
5915df1d
)
fix audit issues (
75bc4672
)
cleanup of tests for ace device (
3e62fadf
)
bump huddlyproto version to 0.0.3 (
0c1cef17
)
update dependencies to latest wanted (
c4ee23e4
)
upgrade package json & lock for lts 14 (
a3af1730
)
Update dependencies for sdk and the example projects (
4b1b8a7e
)
deps:
[security] bump acorn from 6.4.0 to 6.4.1 (
d7ca906b
)
bump acorn from 6.3.0 to 6.4.1 in /examples/rest (
bf912538
)
bump semver from 6.3.0 to 7.3.2 (
071b640d
)
deps-dev:
bump cz-conventional-changelog from 2.1.0 to 3.1.0 (
ed4add1e
)
bump mocha from 6.2.2 to 7.1.1 (
cd0dd086
)
bump sinon-chai from 3.3.0 to 3.5.0 (
4eda43dc
)
bump eslint-plugin-react from 7.17.0 to 7.19.0 (
04cd5e28
)
bump nyc from 14.1.1 to 15.0.1 (
1b42ffd7
)
bump nock from 11.7.0 to 12.0.3 (
ba855323
)
bump eslint-plugin-import from 2.19.1 to 2.20.2 (
e854dab1
)
bump ts-node from 8.5.4 to 8.8.2 (
d47f7595
)
examples:
Update dependencies to latest releases (
a5cfbe4f
)
Node:
Support for Node 12 LTS (
fa0600b9
)
package.json:
Update dependencies and devDependencies of sdk (
8e07e8f0
)
Continuous Integration
build sdk for lts v14 on travis (
aaf2cccf
)
dont build v8 on travis anymore (
b4d68974
)
Documentation Changes
Describe/Add more options to IDeviceApiOpts (
b38192cc
)
Add jsdocs for the new service classes (
e9c9b368
)
update l1 sdk usage example project (
e814ed01
)
Add jsdocs for AceUpgrader (
b44734d8
)
Added documentation for the detector (
#237
) (
de0bea1d
)
Contribution:
Added description for release process (
7a7399fe
)
CONTRIBUTING.md:
Bumped version of compodoc (
e6ca4ffb
)
New Features
Ace:
Autozoom Control added (
0293627b
)
Initial support for getState (
d678dc3c
)
device info should be assign to the ace object (
276124f1
)
Read and erase app log (
f1e3d930
)
Added interface for uvc-type commands (
d656b4ef
)
support upgrading ace by sending file buffer of cpio file (
c28b9eff
)
allow consumer to set custom logger (
986a72c0
)
Logger supports writing to file (
0024ba53
)
SDK support for Huddly Service (Win) (
3094336d
)
add l1 windows service protofile (
b2375492
)
huddlyproto npm package (
ecdad1ab
)
working fw upgrade for L1/Ace (
fdafc740
)
discovery supports multiple apis (
2f4a2e34
)
build grpc proto files (
8bf2f3ac
)
Ace discovery support and getInfo (
04fc25b4
)
Further abstraction on transport implementation (
dbecd489
)
Injectable device factory so you can create custom or extend iDeviceManager clasess (
41176b91
)
facebasedexposurecontrol:
sdk supports enable/disable face based exposure control (
6a461e0b
)
package.json:
add typescript watcher script (
2e329e8c
)
boxfish, huddlygo:
added current and usb to diagnostics info (
879aefcd
)
Dartfish support:
Added correct dartfish device class (
02ad6696
)
getErrorLog:
Add option for disallowing legacy mode. (
12f730cd
)
detector:
Detector should not be dependent on autozoom with newer camera software (
715a5e43
)
Added options how long to search for device:
Option for setting # of times looking for device (
056c533f
)
Added support for dartfish PID in factory.ts:
Added support for dartfish PID (
e6c03775
)
Examples:
Added an example where a specific camera is targeted (
1c88a341
)
Bug Fixes
ace.ts:
updated proto dep/files to match dependecies (
c4c95db2
)
Suport npm link by adding dev mode on sdk (
6deb38c1
)
remove the Empty() and Chunk() workarounds (
2647e67c
)
generated proto files in correct lib path (
aedd7850
)
empty resolve requires void promise (
2b4554f3
)
prettier:
ignore prettifying generated proto (
a9d83f29
)
update package deps:
update deps (
d968befc
)
api.ts:
getErrorLog recursive call with exact parameters (
09f6d3ad
)
getErrorLog:
Throw exception with error from camera on failure. (
d364036d
)
Don't fall so quickly back to legacy method. Retry once. (
c90c3759
)
examples:
Update sdk examples to use latest sdk version (0.4.0) (
3b462f73
)
Other Changes
Ace->resetSettings promises must run in sequence (
23241007
)
bump camera-proto and lock jszip (
19764d53
)
complete coverage for ace.ts class (
7585c67c
)
Ace->setPanTiltZoom (
4338b1cd
)
Add support for reset settings (
e64799d3
)
fix ace upgrade progress events (
1ab60bcc
)
fix audit issues (lock jszip) (
b11bcf9a
)
add support for PID=0x51 (
5642a2e2
)
Refactors
rename multicastInterfaceAddr to targetInterfaceAddr (
9ff12ef9
)
node8 does not like ().then().catch().finally() (
592fcdcf
)
Ace.ts rewrite setPanTiltZoom function (
9e1b6960
)
use @huddly/camera-proto and @huddly/camera-switch-proto packages (
3defe04a
)
remove @huddly/huddlyproto pkg folder (
0d881be0
)
test command should be run explicilty in travis (
f0bde072
)
use @huddly/huddlyproto package (
a49367f8
)
fix logger interface and implementation (
49c32543
)
update example index.js (
8e857714
)
ace.ts:
rename uptime function (
9d4d0fcb
)
Logger:
static logger class (
dbe83637
)
Tests
unit tests for sdk Logger (
8a25245b
)
unit test service code (
efd93396
)
Unit test AceUpgrader class (
9f33e404
)
0.5.1 (2020-07-06)
New Features
boxfish, huddlygo:
added current and usb to diagnostics info (
879aefcd
)
0.5.0 (2020-05-25)
New Features
Dwarffish support:
added support for dwarffish 0x51 (
f9f6047
)
Clownfish support:
added support for clownfish (
c9d25f0
)
0.4.2 (2020-04-16)
Chores
deps:
[security] bump acorn from 6.4.0 to 6.4.1 (
d7ca906b
)
bump acorn from 6.3.0 to 6.4.1 in /examples/rest (
bf912538
)
bump semver from 6.3.0 to 7.3.2 (
071b640d
)
deps-dev:
bump cz-conventional-changelog from 2.1.0 to 3.1.0 (
ed4add1e
)
bump mocha from 6.2.2 to 7.1.1 (
cd0dd086
)
bump sinon-chai from 3.3.0 to 3.5.0 (
4eda43dc
)
bump eslint-plugin-react from 7.17.0 to 7.19.0 (
04cd5e28
)
bump nyc from 14.1.1 to 15.0.1 (
1b42ffd7
)
bump nock from 11.7.0 to 12.0.3 (
ba855323
)
bump eslint-plugin-import from 2.19.1 to 2.20.2 (
e854dab1
)
bump ts-node from 8.5.4 to 8.8.2 (
d47f7595
)
examples:
Update dependencies to latest releases (
a5cfbe4f
)
Node:
Support for Node 12 LTS (
fa0600b9
)
package.json:
Update dependencies and devDependencies of sdk (
8e07e8f0
)
Documentation Changes
Added documentation for the detector (
#237
) (
de0bea1d
)
Contribution:
Added description for release process (
7a7399fe
)
CONTRIBUTING.md:
Bumped version of compodoc (
e6ca4ffb
)
New Features
Dartfish support:
Added correct dartfish device class (
02ad6696
)
Injectable device factory so you can create custom or extend iDeviceManager clasess (
41176b91
)
getErrorLog:
Add option for disallowing legacy mode. (
12f730cd
)
detector:
Detector should not be dependent on autozoom with newer camera software (
715a5e43
)
Added options how long to search for device:
Option for setting # of times looking for device (
056c533f
)
Added support for dartfish PID in factory.ts:
Added support for dartfish PID (
e6c03775
)
Examples:
Added an example where a specific camera is targeted (
1c88a341
)
Bug Fixes
api.ts:
getErrorLog recursive call with exact parameters (
09f6d3ad
)
getErrorLog:
Throw exception with error from camera on failure. (
d364036d
)
Don't fall so quickly back to legacy method. Retry once. (
c90c3759
)
examples:
Update sdk examples to use latest sdk version (0.4.0) (
3b462f73
)
Other Changes
add support for PID=0x51 (
5642a2e2
)
0.4.1 (2019-11-27)
Documentation Changes
Added documentation for the detector (
#237
) (
de0bea1d
)
Contribution:
Added description for release process (
7a7399fe
)
CONTRIBUTING.md:
Bumped version of compodoc (
e6ca4ffb
)
New Features
Examples:
Added an example where a specific camera is targeted (
1c88a341
)
Bug Fixes
examples:
Update sdk examples to use latest sdk version (0.4.0) (
3b462f73
)
0.4.0 (2019-10-14)
Chores
Changelog:
Creating package.json scripts that generate changelog (
098d3349
)
Dependencies:
Updated project dependencies (
bed7abd2
)
package.json:
Update and audit dependencies (
7f1973eb
)
Documentation Changes
CONTRIBUTING.md:
Proper guidelins on making comitizen formated commits (
14e7d4c5
)
Compodoc documentation generating how to guide (
8e96ad24
)
New Features
Autozoom/Detector:
Add setter method for options class attribute (
a58dfeee
)
DeviceManager:
Get url for latest released firmware for huddly device (
f3c1c63f
)
Detector:
Detections on preview stream is default behavior (
3989f25b
)
Refactoring Detector in AutozoomCtl and Detector classes (
303e5a66
)
Detections without streaming support (
158e0ba0
)
error log:
Implement error log reading without file transfer (
35733b93
)
boxfish.ts:
Added FSBL upgrade to boxfish (
efd0459e
)
Bug Fixes
AutozoomControl:
Enable/Disable needs to query product info (
8d335e93
)
Refactors
Factory.ts:
Remove confusing warning logs on factory class (
b76d74a3
)
AutozoomControl:
Rename AutozoomCtl to AutozoomControl (
dc48a706
)
results matching "
"
No results matching "
"


Mysterious Wizard:
You found the diary! You're tracking Nidrah.
Going further may be difficult, you're following a dangerous man. If you insist, you'll need the key.
"Key?"


How did the 'process over product' concept affect the way you tackled the site redesign and rebuild?
Having that intention in mind during this part of the sprint acutally helped me to focus on first setting up all the sections first then playing around later with the getting the details right. I found this process much eaiser to go through knowing that I don't need to have it perfect, it also helped me move through the task a lot quicker knowing that I style and such can be tweaked once each part is up in its place.
What did you think about meditation before reading chapter 2?
Each part of that chapter I feel like I knew, and not just as a concept, but from personal experience. Meditation is powerful tool that ultimalty brings awareness to oneself and I beleive that awarenes is the key to living a happy and enjoyable life, regardless of who you are and what you are doing in life.
What new things have you learnt about meditation?
I learnt quite a lot about the science of meditation, how the brain works and this chapter really touched on the factual aspects of meditation and mindfulness, which I think is a great way for someone who might understand it to be more of a superstious belief system rather than a study based on facts.
Did any of the suggested meditation techniques stand out to you?
Yes all of them. I'm excited that this book exists for the mainstream.
Any other musings?
I'm still in shock that this is part of our reading material. I never thought I would find this to be a part of a web development course.


Hi, I’m Atulya! I'm pursuing the ECE Major with an Additional Major in Robotics. My experience includes Machine Learning (10-401), Natural Language Processing (11-411), Computer Vision (16-385), Embedded Systems (18-349), Parallel Computing Architecture and Programming (15418) and a few other related courses. My interests outside academics include cricket, Formula One and chess.
Hi! I’m Andres, I am an ECE major who is interested in robotics. I’ve taken Fundamental Signal Processing (18491), Introduction to Embedded Systems (18349), Parallel Computing and Architecture (15418) along with robotics related courses such as Computer Vision and Kinematics. I also enjoy long walks by the beach.
Hello I'm Felix. I'm an ECE major who is not doing robotics. My areas of interest lie in digital design and verification, as well as computer architecture. I've taken Intro to Embedded Systems (18349), Intro to Machine Learning (10601), Logic Design and Verification (18341), and Intro to Computer Architecture (18447). I like to spend my free time building computers and wrenching on my car, which usually involves me fixing things until they are more broken.


Show Local Weather
local weather app
Local weather App
Metric/Imperial
date
Show local weather, by Akap
Azmon
.


The Mesh Particle Emitter emits particles around a mesh. Particles are spawned from the surface of the mesh, which can be necessary when you want to make your particles interact in a complex way with objects.
| Property: | Function: |
|---|---|
| Emit | If enabled, the emitter will emit particles. |
| Min Size | The minimum size each particle can be at the time when it is spawned. |
| Max Size | The maximum size each particle can be at the time when it is spawned. |
| Min Energy | The minimum lifetime of each particle, measured in seconds. |
| Max Energy | The maximum lifetime of each particle, measured in seconds. |
| Min Emission | The minimum number of particles that will be spawned every second. |
| Max Emission | The maximum number of particles that will be spawned every second. |
| World Velocity | The starting speed of particles in world space, along X, Y, and Z. |
| Local Velocity | The starting speed of particles along X, Y, and Z, measured in the object’s orientation. |
| Rnd Velocity | A random speed along X, Y, and Z that is added to the velocity. |
| Emitter Velocity Scale | The amount of the emitter’s speed that the particles inherit. |
| Tangent Velocity | The starting speed of particles along X, Y, and Z, across the Emitter’s surface. |
| Angular Velocity | The angular velocity of new particles in degrees per second. |
| Rnd Angular Velocity | A random angular velocity modifier for new particles. |
| Rnd Rotation | If enabled, the particles will be spawned with random rotations. |
| Simulate In World Space | If enabled, the particles don’t move when the emitter moves. If false, when you move the emitter, the particles follow it around. |
| One Shot | If enabled, the particle numbers specified by min & max emission is spawned all at once. If disabled, the particles are generated in a long stream. |
| Interpolate Triangles | If enabled, particles are spawned all over the mesh’s surface. If disabled, particles are only spawned from the mesh’s vertrices. |
| Systematic | If enabled, particles are spawned in the order of the vertices defined in the mesh. Although you seldom have direct control over vertex order in meshes, most 3D modelling applications have a very systematic setup when using primitives. It is important that the mesh contains no faces in order for this to work. |
| Min Normal Velocity | Minimum amount that particles are thrown away from the mesh. |
| Max Normal Velocity | Maximum amount that particles are thrown away from the mesh. |
Mesh Particle Emitters (MPEs) are used when you want more precise control over the spawn position & directions than the simpler Ellipsoid Particle Emitter gives you. They can be used for making advanced effects.
MPEs work by emitting particles at the vertices of the attached mesh. Therefore, the areas of your mesh that are more dense with polygons will be more dense with particle emission.
Particle Emitters work in conjunction with Particle Animators and Particle Renderers to create, manipulate, and display Particle Systems. All three Components must be present on an object before the particles will behave correctly. When particles are being emitted, all different velocities are added together to create the final velocity.
Spawning properties like Size, Energy, Emission, and Velocity will give your particle system distinct personality when trying to achieve different effects. Having a small Size could simulate fireflies or stars in the sky. A large Size could simulate dust clouds in a musky old building.
Energy and Emission will control how long your particles remain onscreen and how many particles can appear at any one time. For example, a rocket might have high Emission to simulate density of smoke, and high Energy to simulate the slow dispersion of smoke into the air.
Velocity will control how your particles move. You might want to change your Velocity in scripting to achieve interesting effects, or if you want to simulate a constant effect like wind, set your X and Z Velocity to make your particles blow away.
If this is disabled, the position of each individual particle will always translate relative to the Position of the emitter. When the emitter moves, the particles will move along with it. If you have Simulate in World Space enabled, particles will not be affected by the translation of the emitter. For example, if you have a fireball that is spurting flames that rise, the flames will be spawned and float up in space as the fireball gets further away. If Simulate in World Space is disabled, those same flames will move across the screen along with the fireball.
This property will only apply if Simulate in World Space is enabled.
If this property is set to 1, the particles will inherit the exact translation of the emitter at the time they are spawned. If it is set to 2, the particles will inherit double the emitter’s translation when they are spawned. 3 is triple the translation, etc.
One Shot emitters will create all particles within the Emission property all at once, and cease to emit particles over time. Here are some examples of different particle system uses with One Shot Enabled or Disabled:
Enabled:
Disabled:
Enabling your emitter to Interpolate Triangles will allow particles to be spawned between the mesh’s vertices. This option is off by default, so particles will only be spawned at the vertices.
Enabling this option will spawn particles on and in-between vertices, essentially all over the mesh’s surface (seen below).
It bears repeating that even with Interpolate Triangles enabled, particles will still be denser in areas of your mesh that are more dense with polygons.
 The vertex order is set by your 3D modeling application.
Normal Velocity controls the speed at which particles are emitted along the normal from where they are spawned.
For example, create a Mesh Particle System, use a cube mesh as the emitter, enable Interpolate Triangles, and set Normal Velocity Min and Max to 1. You will now see the particles emit from the faces of the cube in a straight line.


Awesome
Masonite
Finder helps you discover new
Masonite
related projects.
Fetching Repos
Name
Description
License
Stars
URL
Updated At (ISO-8601)
Total Repositories Found


Autofocus
First [autofocus]
Second [autofocus]
Outer #frame link to frames/form.html
Inner #frame link to frames/form.html
#drives-frame link to frames/form.html


{% extends 'base.html' %} {% block title %}MailSafe works!{% endblock %} {% block content %}
Your Django-nonrel installation is working fine. Now go and finish building MailSafe. :)
If you'd like to learn more about using Django-nonrel take a look at the documentation. You may also want to follow the project on GitHub or subscribe to its google group so you don't miss any new features and improvements.
If you're new to Django you should take a look at the Django documentation and the Django book. You'll also find djangosnippets very useful.
If you have an existing Django project that you'd like to use with a non-relational back-end or would simply like to learn what are the differences between the normal Django and its non-relational version take a look at: porting.
If you search for reusable apps that work with Django-nonrel here's a list to get you started:
Finally, take a look at the apps listed on Django Packages. Many simple Django apps (e.g., django-registration) should work unmodified. If you want to use django-debug-toolbar you need to disable the SQLDebugPanel in your settings.
{% endblock %}


--- layout: post title: site enhancement tags: [] status: publish type: post published: true meta: {} ---
Got round to applying Todd Dominey’s Flash Slide Show to display some of the photos I have taken over the last fours years. Using the technique mentioned on asterisk *. Yep it’s quite unobtrusive and besides I was getting bored of the one image.


RecordRTC Audio+Video Recording & Uploading to PHP Server Video Audio Screen into WebM Mp4 WAV Ogg Start Recording Save To Disk Open New Tab Upload To Server


LTS (Long-Term Support) releases are chosen every 12 weeks from the stream of regular releases as the stable release for that time period.
A new release is produced weekly to deliver bug fixes and features to users and plugin developers.
Changelog | Past Releases


PERLTIE
Section: Perl Programmers Reference Guide (1)Updated: 2009-05-06
Index Return to Main Contents
NAME
perltie - how to hide an object class in a simple variableSYNOPSIS
tie VARIABLE, CLASSNAME, LIST $object = tied VARIABLE untie VARIABLE
DESCRIPTION
Prior to release 5.0 of Perl, a programmer could use dbmopen() to connect an on-disk database in the standard Unix dbm(3x) format magically to a %HASH in their program. However, their Perl was either built with one particular dbm library or another, but not both, and you couldn't extend this mechanism to other packages or types of variables.Now you can.
The tie() function binds a variable to a class (package) that will provide the implementation for access methods for that variable. Once this magic has been performed, accessing a tied variable automatically triggers method calls in the proper class. The complexity of the class is hidden behind magic methods calls. The method names are in ALL CAPS, which is a convention that Perl uses to indicate that they're called implicitly rather than explicitly---just like the BEGIN() and END() functions.
In the tie() call, "VARIABLE" is the name of the variable to be enchanted. "CLASSNAME" is the name of a class implementing objects of the correct type. Any additional arguments in the "LIST" are passed to the appropriate constructor method for that class---meaning TIESCALAR(), TIEARRAY(), TIEHASH(), or TIEHANDLE(). (Typically these are arguments such as might be passed to the dbminit() function of C.) The object returned by the ``new'' method is also returned by the tie() function, which would be useful if you wanted to access other methods in "CLASSNAME". (You don't actually have to return a reference to a right ``type'' (e.g., HASH or "CLASSNAME") so long as it's a properly blessed object.) You can also retrieve a reference to the underlying object using the tied() function.
Unlike dbmopen(), the tie() function will not "use" or "require" a module for you---you need to do that explicitly yourself.
Tying Scalars
A class implementing a tied scalar should define the following methods: TIESCALAR, FETCH, STORE, and possibly UNTIE and/or DESTROY.Let's look at each in turn, using as an example a tie class for scalars that allows the user to do something like:
tie $his_speed, 'Nice', getppid(); tie $my_speed, 'Nice', $$;
And now whenever either of those variables is accessed, its current system priority is retrieved and returned. If those variables are set, then the process's priority is changed!
We'll use Jarkko Hietaniemi<EMAIL_ADDRESS>BSD::Resource class (not included) to access the PRIO_PROCESS, PRIO_MIN, and PRIO_MAX constants from your system, as well as the getpriority() and setpriority() system calls. Here's the preamble of the class.
package Nice; use Carp; use BSD::Resource; use strict; $Nice::DEBUG = 0 unless defined $Nice::DEBUG;
- TIESCALAR classname, LIST
-
This is the constructor for the class. That means it is
expected to return a blessed reference to a new scalar
(probably anonymous) that it's creating. For example:
sub TIESCALAR { my $class = shift; my $pid = shift || $$; # 0 means me if ($pid !~ /^\d+$/) { carp "Nice::Tie::Scalar got non-numeric pid $pid" if $^W; return undef; } unless (kill 0, $pid) { # EPERM or ERSCH, no doubt carp "Nice::Tie::Scalar got bad pid $pid: $!" if $^W; return undef; } return bless \$pid, $class; }
This tie class has chosen to return an error rather than raising an exception if its constructor should fail. While this is how dbmopen() works, other classes may well not wish to be so forgiving. It checks the global variable $^W to see whether to emit a bit of noise anyway.
- FETCH this
-
This method will be triggered every time the tied variable is accessed
(read). It takes no arguments beyond its self reference, which is the
object representing the scalar we're dealing with. Because in this case
we're using just a SCALAR ref for the tied scalar object, a simple $$self
allows the method to get at the real value stored there. In our example
below, that real value is the process ID to which we've tied our variable.
sub FETCH { my $self = shift; confess "wrong type" unless ref $self; croak "usage error" if @_; my $nicety; local($!) = 0; $nicety = getpriority(PRIO_PROCESS, $$self); if ($!) { croak "getpriority failed: $!" } return $nicety; }
This time we've decided to blow up (raise an exception) if the renice fails---there's no place for us to return an error otherwise, and it's probably the right thing to do.
- STORE this, value
-
This method will be triggered every time the tied variable is set
(assigned). Beyond its self reference, it also expects one (and only one)
argument---the new value the user is trying to assign. Don't worry about
returning a value from STORE --- the semantic of assignment returning the
assigned value is implemented with FETCH.
sub STORE { my $self = shift; confess "wrong type" unless ref $self; my $new_nicety = shift; croak "usage error" if @_; if ($new_nicety < PRIO_MIN) { carp sprintf "WARNING: priority %d less than minimum system priority %d", $new_nicety, PRIO_MIN if $^W; $new_nicety = PRIO_MIN; } if ($new_nicety > PRIO_MAX) { carp sprintf "WARNING: priority %d greater than maximum system priority %d", $new_nicety, PRIO_MAX if $^W; $new_nicety = PRIO_MAX; } unless (defined setpriority(PRIO_PROCESS, $$self, $new_nicety)) { confess "setpriority failed: $!"; } }
- UNTIE this
- This method will be triggered when the "untie" occurs. This can be useful if the class needs to know when no further calls will be made. (Except DESTROY of course.) See "The "untie" Gotcha" below for more details.
- DESTROY this
-
This method will be triggered when the tied variable needs to be destructed.
 We'll use a DESTROY method here for debugging purposes only.
sub DESTROY { my $self = shift; confess "wrong type" unless ref $self; carp "[ Nice::DESTROY pid $$self ]" if $Nice::DEBUG; }
That's about all there is to it. Actually, it's more than all there is to it, because we've done a few nice things here for the sake of completeness, robustness, and general aesthetics. Simpler TIESCALAR classes are certainly possible.
Tying Arrays
A class implementing a tied ordinary array should define the following methods: TIEARRAY, FETCH, STORE, FETCHSIZE, STORESIZE and perhaps UNTIE and/or DESTROY.FETCHSIZE and STORESIZE are used to provide $#array and equivalent "scalar(@array)" access.
The methods POP, PUSH, SHIFT, UNSHIFT, SPLICE, DELETE, and EXISTS are required if the perl operator with the corresponding (but lowercase) name is to operate on the tied array. The Tie::Array class can be used as a base class to implement the first five of these in terms of the basic methods above. The default implementations of DELETE and EXISTS in Tie::Array simply "croak".
In addition EXTEND will be called when perl would have pre-extended allocation in a real array.
For this discussion, we'll implement an array whose elements are a fixed size at creation. If you try to create an element larger than the fixed size, you'll take an exception. For example:
use FixedElem_Array; tie @array, 'FixedElem_Array', 3; $array[0] = 'cat'; # ok. $array[1] = 'dogs'; # exception, length('dogs') > 3.
The preamble code for the class is as follows:
package FixedElem_Array; use Carp; use strict;
- TIEARRAY classname, LIST
-
This is the constructor for the class. That means it is expected to
return a blessed reference through which the new array (probably an
anonymous ARRAY ref) will be accessed.
In our example, just to show you that you don't really have to return an ARRAY reference, we'll choose a HASH reference to represent our object. A HASH works out well as a generic record type: the "{ELEMSIZE}" field will store the maximum element size allowed, and the "{ARRAY}" field will hold the true ARRAY ref. If someone outside the class tries to dereference the object returned (doubtless thinking it an ARRAY ref), they'll blow up. This just goes to show you that you should respect an object's privacy.
sub TIEARRAY { my $class = shift; my $elemsize = shift; if ( @_ || $elemsize =~ /\D/ ) { croak "usage: tie ARRAY, '" . __PACKAGE__ . "', elem_size"; } return bless { ELEMSIZE => $elemsize, ARRAY => [], }, $class; }
- FETCH this, index
-
This method will be triggered every time an individual element the tied array
is accessed (read). It takes one argument beyond its self reference: the
index whose value we're trying to fetch.
sub FETCH { my $self = shift; my $index = shift; return $self->{ARRAY}->[$index]; }
If a negative array index is used to read from an array, the index will be translated to a positive one internally by calling FETCHSIZE before being passed to FETCH. You may disable this feature by assigning a true value to the variable $NEGATIVE_INDICES in the tied array class.
As you may have noticed, the name of the FETCH method (et al.) is the same for all accesses, even though the constructors differ in names (TIESCALAR vs TIEARRAY). While in theory you could have the same class servicing several tied types, in practice this becomes cumbersome, and it's easiest to keep them at simply one tie type per class.
- STORE this, index, value
-
This method will be triggered every time an element in the tied array is set
(written). It takes two arguments beyond its self reference: the index at
which we're trying to store something and the value we're trying to put
there.
In our example, "undef" is really "$self->{ELEMSIZE}" number of spaces so we have a little more work to do here:
sub STORE { my $self = shift; my( $index, $value ) = @_; if ( length $value > $self->{ELEMSIZE} ) { croak "length of $value is greater than $self->{ELEMSIZE}"; } # fill in the blanks $self->EXTEND( $index ) if $index > $self->FETCHSIZE(); # right justify to keep element size for smaller elements $self->{ARRAY}->[$index] = sprintf "%$self->{ELEMSIZE}s", $value; }
Negative indexes are treated the same as with FETCH.
- FETCHSIZE this
-
Returns the total number of items in the tied array associated with
object this. (Equivalent to "scalar(@array)"). For example:
sub FETCHSIZE { my $self = shift; return scalar @{$self->{ARRAY}}; }
- STORESIZE this, count
-
Sets the total number of items in the tied array associated with
object this to be count. If this makes the array larger then
class's mapping of "undef" should be returned for new positions.
If the array becomes smaller then entries beyond count should be
deleted.
In our example, 'undef' is really an element containing "$self->{ELEMSIZE}" number of spaces. Observe:
sub STORESIZE { my $self = shift; my $count = shift; if ( $count > $self->FETCHSIZE() ) { foreach ( $count - $self->FETCHSIZE() .. $count ) { $self->STORE( $_, '' ); } } elsif ( $count < $self->FETCHSIZE() ) { foreach ( 0 .. $self->FETCHSIZE() - $count - 2 ) { $self->POP(); } } }
- EXTEND this, count
-
Informative call that array is likely to grow to have count entries.
Can be used to optimize allocation. This method need do nothing.
In our example, we want to make sure there are no blank ("undef") entries, so "EXTEND" will make use of "STORESIZE" to fill elements as needed:
sub EXTEND { my $self = shift; my $count = shift; $self->STORESIZE( $count ); }
- EXISTS this, key
-
Verify that the element at index key exists in the tied array this.
In our example, we will determine that if an element consists of "$self->{ELEMSIZE}" spaces only, it does not exist:
sub EXISTS { my $self = shift; my $index = shift; return 0 if ! defined $self->{ARRAY}->[$index] || $self->{ARRAY}->[$index] eq ' ' x $self->{ELEMSIZE}; return 1; }
- DELETE this, key
-
Delete the element at index key from the tied array this.
In our example, a deleted item is "$self->{ELEMSIZE}" spaces:
sub DELETE { my $self = shift; my $index = shift; return $self->STORE( $index, '' ); }
- CLEAR this
-
Clear (remove, delete, ...) all values from the tied array associated with
object this. For example:
sub CLEAR { my $self = shift; return $self->{ARRAY} = []; }
- PUSH this, LIST
-
Append elements of LIST to the array. For example:
sub PUSH { my $self = shift; my @list = @_; my $last = $self->FETCHSIZE(); $self->STORE( $last + $_, $list[$_] ) foreach 0 .. $#list; return $self->FETCHSIZE(); }
- POP this
-
Remove last element of the array and return it. For example:
sub POP { my $self = shift; return pop @{$self->{ARRAY}}; }
- SHIFT this
-
Remove the first element of the array (shifting other elements down)
and return it. For example:
sub SHIFT { my $self = shift; return shift @{$self->{ARRAY}}; }
- UNSHIFT this, LIST
-
Insert LIST elements at the beginning of the array, moving existing elements
up to make room. For example:
sub UNSHIFT { my $self = shift; my @list = @_; my $size = scalar( @list ); # make room for our list @{$self->{ARRAY}}[ $size .. $#{$self->{ARRAY}} + $size ] = @{$self->{ARRAY}}; $self->STORE( $_, $list[$_] ) foreach 0 .. $#list; }
- SPLICE this, offset, length, LIST
-
Perform the equivalent of "splice" on the array.
offset is optional and defaults to zero, negative values count back from the end of the array.
length is optional and defaults to rest of the array.
LIST may be empty.
Returns a list of the original length elements at offset.
In our example, we'll use a little shortcut if there is a LIST:
sub SPLICE { my $self = shift; my $offset = shift || 0; my $length = shift || $self->FETCHSIZE() - $offset; my @list = (); if ( @_ ) { tie @list, __PACKAGE__, $self->{ELEMSIZE}; @list = @_; } return splice @{$self->{ARRAY}}, $offset, $length, @list; }
- UNTIE this
- Will be called when "untie" happens. (See "The "untie" Gotcha" below.)
- DESTROY this
- This method will be triggered when the tied variable needs to be destructed. As with the scalar tie class, this is almost never needed in a language that does its own garbage collection, so this time we'll just leave it out.
Tying Hashes
Hashes were the first Perl data type to be tied (see dbmopen()). A class implementing a tied hash should define the following methods: TIEHASH is the constructor. FETCH and STORE access the key and value pairs. EXISTS reports whether a key is present in the hash, and DELETE deletes one. CLEAR empties the hash by deleting all the key and value pairs. FIRSTKEY and NEXTKEY implement the keys() and each() functions to iterate over all the keys. SCALAR is triggered when the tied hash is evaluated in scalar context. UNTIE is called when "untie" happens, and DESTROY is called when the tied variable is garbage collected.If this seems like a lot, then feel free to inherit from merely the standard Tie::StdHash module for most of your methods, redefining only the interesting ones. See Tie::Hash for details.
Remember that Perl distinguishes between a key not existing in the hash, and the key existing in the hash but having a corresponding value of "undef". The two possibilities can be tested with the "exists()" and "defined()" functions.
Here's an example of a somewhat interesting tied hash class: it gives you a hash representing a particular user's dot files. You index into the hash with the name of the file (minus the dot) and you get back that dot file's contents. For example:
use DotFiles; tie %dot, 'DotFiles'; if ( $dot{profile} =~ /MANPATH/ || $dot{login} =~ /MANPATH/ || $dot{cshrc} =~ /MANPATH/ ) { print "you seem to set your MANPATH\n"; }
Or here's another sample of using our tied class:
tie %him, 'DotFiles', 'daemon'; foreach $f ( keys %him ) { printf "daemon dot file %s is size %d\n", $f, length $him{$f}; }
In our tied hash DotFiles example, we use a regular hash for the object containing several important fields, of which only the "{LIST}" field will be what the user thinks of as the real hash.
- USER
- whose dot files this object represents
- HOME
- where those dot files live
- CLOBBER
- whether we should try to change or remove those dot files
- LIST
- the hash of dot file names and content mappings
Here's the start of Dotfiles.pm:
package DotFiles; use Carp; sub whowasi { (caller(1))[3] . '()' } my $DEBUG = 0; sub debug { $DEBUG = @_ ? shift : 1 }
For our example, we want to be able to emit debugging info to help in tracing during development. We keep also one convenience function around internally to help print out warnings; whowasi() returns the function name that calls it.
Here are the methods for the DotFiles tied hash.
- TIEHASH classname, LIST
-
This is the constructor for the class. That means it is expected to
return a blessed reference through which the new object (probably but not
necessarily an anonymous hash) will be accessed.
Here's the constructor:
sub TIEHASH { my $self = shift; my $user = shift || $>; my $dotdir = shift || ''; croak "usage: @{[&whowasi]} [USER [DOTDIR]]" if @_; $user = getpwuid($user) if $user =~ /^\d+$/; my $dir = (getpwnam($user))[7] || croak "@{[&whowasi]}: no user $user"; $dir .= "/$dotdir" if $dotdir; my $node = { USER => $user, HOME => $dir, LIST => {}, CLOBBER => 0, }; opendir(DIR, $dir) || croak "@{[&whowasi]}: can't opendir $dir: $!"; foreach $dot ( grep /^\./ && -f "$dir/$_", readdir(DIR)) { $dot =~ s/^\.//; $node->{LIST}{$dot} = undef; } closedir DIR; return bless $node, $self; }
It's probably worth mentioning that if you're going to filetest the return values out of a readdir, you'd better prepend the directory in question. Otherwise, because we didn't chdir() there, it would have been testing the wrong file.
- FETCH this, key
-
This method will be triggered every time an element in the tied hash is
accessed (read). It takes one argument beyond its self reference: the key
whose value we're trying to fetch.
Here's the fetch for our DotFiles example.
sub FETCH { carp &whowasi if $DEBUG; my $self = shift; my $dot = shift; my $dir = $self->{HOME}; my $file = "$dir/.$dot"; unless (exists $self->{LIST}->{$dot} || -f $file) { carp "@{[&whowasi]}: no $dot file" if $DEBUG; return undef; } if (defined $self->{LIST}->{$dot}) { return $self->{LIST}->{$dot}; } else { return $self->{LIST}->{$dot} = `cat $dir/.$dot`; } }
It was easy to write by having it call the Unix cat(1) command, but it would probably be more portable to open the file manually (and somewhat more efficient). Of course, because dot files are a Unixy concept, we're not that concerned.
- STORE this, key, value
-
This method will be triggered every time an element in the tied hash is set
(written). It takes two arguments beyond its self reference: the index at
which we're trying to store something, and the value we're trying to put
there.
Here in our DotFiles example, we'll be careful not to let them try to overwrite the file unless they've called the clobber() method on the original object reference returned by tie().
sub STORE { carp &whowasi if $DEBUG; my $self = shift; my $dot = shift; my $value = shift; my $file = $self->{HOME} . "/.$dot"; my $user = $self->{USER}; croak "@{[&whowasi]}: $file not clobberable" unless $self->{CLOBBER}; open(F, "> $file") || croak "can't open $file: $!"; print F $value; close(F); }
If they wanted to clobber something, they might say:
$ob = tie %daemon_dots, 'daemon'; $ob->clobber(1); $daemon_dots{signature} = "A true daemon\n";
Another way to lay hands on a reference to the underlying object is to use the tied() function, so they might alternately have set clobber using:
tie %daemon_dots, 'daemon'; tied(%daemon_dots)->clobber(1);
The clobber method is simply:
sub clobber { my $self = shift; $self->{CLOBBER} = @_ ? shift : 1; }
- DELETE this, key
-
This method is triggered when we remove an element from the hash,
typically by using the delete() function. Again, we'll
be careful to check whether they really want to clobber files.
sub DELETE { carp &whowasi if $DEBUG; my $self = shift; my $dot = shift; my $file = $self->{HOME} . "/.$dot"; croak "@{[&whowasi]}: won't remove file $file" unless $self->{CLOBBER}; delete $self->{LIST}->{$dot}; my $success = unlink($file); carp "@{[&whowasi]}: can't unlink $file: $!" unless $success; $success; }
The value returned by DELETE becomes the return value of the call to delete(). If you want to emulate the normal behavior of delete(), you should return whatever FETCH would have returned for this key. In this example, we have chosen instead to return a value which tells the caller whether the file was successfully deleted.
- CLEAR this
-
This method is triggered when the whole hash is to be cleared, usually by
assigning the empty list to it.
In our example, that would remove all the user's dot files! It's such a dangerous thing that they'll have to set CLOBBER to something higher than 1 to make it happen.
sub CLEAR { carp &whowasi if $DEBUG; my $self = shift; croak "@{[&whowasi]}: won't remove all dot files for $self->{USER}" unless $self->{CLOBBER} > 1; my $dot; foreach $dot ( keys %{$self->{LIST}}) { $self->DELETE($dot); } }
- EXISTS this, key
-
This method is triggered when the user uses the exists() function
on a particular hash. In our example, we'll look at the "{LIST}"
hash element for this:
sub EXISTS { carp &whowasi if $DEBUG; my $self = shift; my $dot = shift; return exists $self->{LIST}->{$dot}; }
- FIRSTKEY this
-
This method will be triggered when the user is going
to iterate through the hash, such as via a keys() or each()
call.
sub FIRSTKEY { carp &whowasi if $DEBUG; my $self = shift; my $a = keys %{$self->{LIST}}; # reset each() iterator each %{$self->{LIST}} }
- NEXTKEY this, lastkey
-
This method gets triggered during a keys() or each() iteration. It has a
second argument which is the last key that had been accessed. This is
useful if you're carrying about ordering or calling the iterator from more
than one sequence, or not really storing things in a hash anywhere.
For our example, we're using a real hash so we'll do just the simple thing, but we'll have to go through the LIST field indirectly.
sub NEXTKEY { carp &whowasi if $DEBUG; my $self = shift; return each %{ $self->{LIST} } }
- SCALAR this
-
This is called when the hash is evaluated in scalar context. In order
to mimic the behaviour of untied hashes, this method should return a
false value when the tied hash is considered empty. If this method does
not exist, perl will make some educated guesses and return true when
the hash is inside an iteration. If this isn't the case, FIRSTKEY is
called, and the result will be a false value if FIRSTKEY returns the empty
list, true otherwise.
However, you should not blindly rely on perl always doing the right thing. Particularly, perl will mistakenly return true when you clear the hash by repeatedly calling DELETE until it is empty. You are therefore advised to supply your own SCALAR method when you want to be absolutely sure that your hash behaves nicely in scalar context.
In our example we can just call "scalar" on the underlying hash referenced by "$self->{LIST}":
sub SCALAR { carp &whowasi if $DEBUG; my $self = shift; return scalar %{ $self->{LIST} } }
- UNTIE this
- This is called when "untie" occurs. See "The "untie" Gotcha" below.
- DESTROY this
-
This method is triggered when a tied hash is about to go out of
scope. You don't really need it unless you're trying to add debugging
or have auxiliary state to clean up. Here's a very simple function:
sub DESTROY { carp &whowasi if $DEBUG; }
Note that functions such as keys() and values() may return huge lists when used on large objects, like DBM files. You may prefer to use the each() function to iterate over such. Example:
# print out history file offsets use NDBM_File; tie(%HIST, 'NDBM_File', '/usr/lib/news/history', 1, 0); while (($key,$val) = each %HIST) { print $key, ' = ', unpack('L',$val), "\n"; } untie(%HIST);
Tying FileHandles
This is partially implemented now.A class implementing a tied filehandle should define the following methods: TIEHANDLE, at least one of PRINT, PRINTF, WRITE, READLINE, GETC, READ, and possibly CLOSE, UNTIE and DESTROY. The class can also provide: BINMODE, OPEN, EOF, FILENO, SEEK, TELL - if the corresponding perl operators are used on the handle.
When STDERR is tied, its PRINT method will be called to issue warnings and error messages. This feature is temporarily disabled during the call, which means you can use "warn()" inside PRINT without starting a recursive loop. And just like "__WARN__" and "__DIE__" handlers, STDERR's PRINT method may be called to report parser errors, so the caveats mentioned under ``%SIG'' in perlvar apply.
All of this is especially useful when perl is embedded in some other program, where output to STDOUT and STDERR may have to be redirected in some special way. See nvi and the Apache module for examples.
In our example we're going to create a shouting handle.
package Shout;
- TIEHANDLE classname, LIST
-
This is the constructor for the class. That means it is expected to
return a blessed reference of some sort. The reference can be used to
hold some internal information.
sub TIEHANDLE { print "<shout>\n"; my $i; bless \$i, shift }
- WRITE this, LIST
-
This method will be called when the handle is written to via the
"syswrite" function.
sub WRITE { $r = shift; my($buf,$len,$offset) = @_; print "WRITE called, \$buf=$buf, \$len=$len, \$offset=$offset"; }
- PRINT this, LIST
-
This method will be triggered every time the tied handle is printed to
with the "print()" or "say()" functions. Beyond its self reference
it also expects the list that was passed to the print function.
sub PRINT { $r = shift; $$r++; print join($,,map(uc($_),@_)),$\ }
"say()" acts just like "print()" except $\ will be localized to "\n" so you need do nothing special to handle "say()" in "PRINT()".
- PRINTF this, LIST
-
This method will be triggered every time the tied handle is printed to
with the "printf()" function.
Beyond its self reference it also expects the format and list that was
passed to the printf function.
sub PRINTF { shift; my $fmt = shift; print sprintf($fmt, @_); }
- READ this, LIST
-
This method will be called when the handle is read from via the "read"
or "sysread" functions.
sub READ { my $self = shift; my $bufref = \$_[0]; my(undef,$len,$offset) = @_; print "READ called, \$buf=$bufref, \$len=$len, \$offset=$offset"; # add to $$bufref, set $len to number of characters read $len; }
- READLINE this
-
This method will be called when the handle is read from via <HANDLE>.
The method should return undef when there is no more data.
sub READLINE { $r = shift; "READLINE called $$r times\n"; }
- GETC this
-
This method will be called when the "getc" function is called.
sub GETC { print "Don't GETC, Get Perl"; return "a"; }
- CLOSE this
-
This method will be called when the handle is closed via the "close"
function.
sub CLOSE { print "CLOSE called.\n" }
- UNTIE this
- As with the other types of ties, this method will be called when "untie" happens. It may be appropriate to ``auto CLOSE'' when this occurs. See "The "untie" Gotcha" below.
- DESTROY this
-
As with the other types of ties, this method will be called when the
tied handle is about to be destroyed. This is useful for debugging and
possibly cleaning up.
sub DESTROY { print "</shout>\n" }
Here's how to use our little example:
tie(*FOO,'Shout'); print FOO "hello\n"; $a = 4; $b = 6; print FOO $a, " plus ", $b, " equals ", $a + $b, "\n"; print <FOO>;
UNTIE this
You can define for all tie types an UNTIE method that will be called at untie(). See "The "untie" Gotcha" below.The untie Gotcha
If you intend making use of the object returned from either tie() or tied(), and if the tie's target class defines a destructor, there is a subtle gotcha you must guard against.As setup, consider this (admittedly rather contrived) example of a tie; all it does is use a file to keep a log of the values assigned to a scalar.
package Remember; use strict; use warnings; use IO::File; sub TIESCALAR { my $class = shift; my $filename = shift; my $handle = IO::File->new( "> $filename" ) or die "Cannot open $filename: $!\n"; print $handle "The Start\n"; bless {FH => $handle, Value => 0}, $class; } sub FETCH { my $self = shift; return $self->{Value}; } sub STORE { my $self = shift; my $value = shift; my $handle = $self->{FH}; print $handle "$value\n"; $self->{Value} = $value; } sub DESTROY { my $self = shift; my $handle = $self->{FH}; print $handle "The End\n"; close $handle; } 1;
Here is an example that makes use of this tie:
use strict; use Remember; my $fred; tie $fred, 'Remember', 'myfile.txt'; $fred = 1; $fred = 4; $fred = 5; untie $fred; system "cat myfile.txt";
This is the output when it is executed:
The Start 1 4 5 The End
So far so good. Those of you who have been paying attention will have spotted that the tied object hasn't been used so far. So lets add an extra method to the Remember class to allow comments to be included in the file --- say, something like this:
sub comment { my $self = shift; my $text = shift; my $handle = $self->{FH}; print $handle $text, "\n"; }
And here is the previous example modified to use the "comment" method (which requires the tied object):
use strict; use Remember; my ($fred, $x); $x = tie $fred, 'Remember', 'myfile.txt'; $fred = 1; $fred = 4; comment $x "changing..."; $fred = 5; untie $fred; system "cat myfile.txt";
When this code is executed there is no output. Here's why:
When a variable is tied, it is associated with the object which is the return value of the TIESCALAR, TIEARRAY, or TIEHASH function. This object normally has only one reference, namely, the implicit reference from the tied variable. When untie() is called, that reference is destroyed. Then, as in the first example above, the object's destructor (DESTROY) is called, which is normal for objects that have no more valid references; and thus the file is closed.
In the second example, however, we have stored another reference to the tied object in $x. That means that when untie() gets called there will still be a valid reference to the object in existence, so the destructor is not called at that time, and thus the file is not closed. The reason there is no output is because the file buffers have not been flushed to disk.
Now that you know what the problem is, what can you do to avoid it? Prior to the introduction of the optional UNTIE method the only way was the good old "-w" flag. Which will spot any instances where you call untie() and there are still valid references to the tied object. If the second script above this near the top "use warnings 'untie'" or was run with the "-w" flag, Perl prints this warning message:
untie attempted while 1 inner references still exist
To get the script to work properly and silence the warning make sure there are no valid references to the tied object before untie() is called:
undef $x; untie $fred;
Now that UNTIE exists the class designer can decide which parts of the class functionality are really associated with "untie" and which with the object being destroyed. What makes sense for a given class depends on whether the inner references are being kept so that non-tie-related methods can be called on the object. But in most cases it probably makes sense to move the functionality that would have been in DESTROY to the UNTIE method.
If the UNTIE method exists then the warning above does not occur. Instead the UNTIE method is passed the count of ``extra'' references and can issue its own warning if appropriate. e.g. to replicate the no UNTIE case this method can be used:
sub UNTIE { my ($obj,$count) = @_; carp "untie attempted while $count inner references still exist" if $count; }
SEE ALSO
See DB_File or Config for some interesting tie() implementations. A good starting point for many tie() implementations is with one of the modules Tie::Scalar, Tie::Array, Tie::Hash, or Tie::Handle.BUGS
The bucket usage information provided by "scalar(%hash)" is not available. What this means is that using %tied_hash in boolean context doesn't work right (currently this always tests false, regardless of whether the hash is empty or hash elements).Localizing tied arrays or hashes does not work. After exiting the scope the arrays or the hashes are not restored.
Counting the number of entries in a hash via "scalar(keys(%hash))" or "scalar(values(%hash)") is inefficient since it needs to iterate through all the entries with FIRSTKEY/NEXTKEY.
Tied hash/array slices cause multiple FETCH/STORE pairs, there are no tie methods for slice operations.
You cannot easily tie a multilevel data structure (such as a hash of hashes) to a dbm file. The first problem is that all but GDBM and Berkeley DB have size limitations, but beyond that, you also have problems with how references are to be represented on disk. One module that does attempt to address this need is DBM::Deep. Check your nearest CPAN site as described in perlmodlib for source code. Note that despite its name, DBM::Deep does not use dbm. Another earlier attempt at solving the problem is MLDBM, which is also available on the CPAN, but which has some fairly serious limitations.
Tied filehandles are still incomplete. sysopen(), truncate(), flock(), fcntl(), stat() and -X can't currently be trapped.
AUTHOR
Tom ChristiansenTIEHANDLE by Sven Verdoolaege<EMAIL_ADDRESS>and Doug MacEachern<EMAIL_ADDRESS>UNTIE by Nick Ing-Simmons<EMAIL_ADDRESS>SCALAR by Tassilo von Parseval<EMAIL_ADDRESS>Tying Arrays by Casey West<EMAIL_ADDRESS>Index
This document was created by man2html, using the manual pages.
Time: 05:29:08 GMT, December 24, 2015


Our goal is to provide a single source of service from initial concept through project completion.
Conserv Group assists its clients by providing fully integrated professional services associated with design, permitting, and construction management. We have the unique ability to serve our clients in a consulting, as well as a project management capacity. Our goal is to provide a single source of service from initial concept through project completion.
Our in-house services include:
- Property Searches
- Architecture
- Permitting Assistance
- Construction Management
Since we are involved early on and throughout the process, our professional staff also coordinates and oversees other affiliated professionals to provide services such as:
- Financing
- Engineering
- Peer Reviews
How You Benefit
Site Selection
ConServ’s Design and Project Planning team can assist with evaluating a potential new location from an architectural, site engineering and permitting standpoint, as well as assess potential construction budgets to renovate, build new, or retrofit an existing building prior to making your decision.
Cost Control
Since ConServ Group has both architecture and estimating professionals under one roof, we are able to fully integrate information about cost into the design process in its early stages. This enables the client to ensure practical design within a manageable budget.
Fast-Track Permitting
ConServ Group has experience and relationships with town officials in the markets we serve. Our conceptual design process is geared toward getting you through permitting. Since we are your advocate through the duration of the project, we are motivated to assist our clients through permitting as quickly as possible in order to move toward completion.
Time Management
Our experience completing successful projects allows you to focus on your core business with minimal disruptions while you find comfort that your project is being managed properly day-to-day. Furthermore having one single point of contact for the entire project allows for a streamlined, efficient communication process. Most notable issues are discussed via weekly job meetings for maximum efficiency regarding decision-making.


|
| Local Properties | Local Methods | |
| Managed Object Types | Data Object Types | All Properties | All Methods |
Properties
| Name | Type | Description |
|---|---|---|
| config | HostAutoStartManagerConfig |
|
Methods
| Methods defined in this Managed Object |
|---|
| AutoStartPowerOff, AutoStartPowerOn, ReconfigureAutostart |
See the description of the (@link vim.host.AutoStartManager.AutoPowerInfo) data object type for more information on Auto power-off behavior.
Parameters
| Name | Type | Description |
|---|---|---|
| _this | ManagedObjectReference | A reference to the HostAutoStartManager used to make the method call. |
Return Value
| Type | Description |
|---|---|
| None |
Faults
| Type | Description |
|---|---|
| RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
| Type | |
|---|---|
| None |
See the description of the (@link vim.host.AutoStartManager.AutoPowerInfo) data object type for more information on Auto power-on behavior.
Parameters
| Name | Type | Description |
|---|---|---|
| _this | ManagedObjectReference | A reference to the HostAutoStartManager used to make the method call. |
Return Value
| Type | Description |
|---|---|
| None |
Faults
| Type | Description |
|---|---|
| RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
| Type | |
|---|---|
| None |
If systemDefaults are included, only values that are specified in the specification are changed.
For the spec.powerInfo array, each element is interpreted as an incremental change and the changes are processed sequentially. It is not an error to remove a non-existing virtual machine. If both startAction and stopAction are set to none, then the virtual machine is removed from the configuration.
A virtual machine's position in the order can be changed either by assigning the virtual machine a different position in the order or removing the machine from the order. When a virtual machine's position changes, all other virtual machines' positions may be affected as they move to new positions relative to each other.
Parameters
| Name | Type | Description |
|---|---|---|
| _this | ManagedObjectReference | A reference to the HostAutoStartManager used to make the method call. |
| spec | HostAutoStartManagerConfig |
List of changes to defaults and auto-start/auto-stop order.
|
Return Value
| Type | Description |
|---|---|
| None |
Faults
| Type | Description |
|---|---|
| RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
| Type | |
|---|---|
| None |
| Top of page | Local Properties | Local Methods | |
| Managed Object Types | Data Object Types | All Properties | All Methods |