None
This object has no members.
IP address for static configuration
Format: free
Max length: 64
SDK attribute: address
Advertisement Criteria for Traffic Flow
Allowed values: BFD, CONTROL_SESSION, OPERATIONAL_LINK
SDK attribute: advertisementCriteria
UUID of BGP Neighbor associated to the Uplink which will be used for Bootstrap. This is mandatory if a secondaryAddress is defined.
Format: free
SDK attribute: associatedBGPNeighborID
The display name of the Underlay instance associated with this uplink connection.
Format: free
SDK attribute: associatedUnderlayName
UUID of the underlay associated to the uplink.
Format: free
SDK attribute: assocUnderlayID
Make this uplink an auxiliary one that will only come up when all other uplinks are disconnected or can't perform their role.
Default value: false
SDK attribute: auxiliaryLink
DNS server address
Format: free
SDK attribute: DNSAddress
Download rate limit for this uplink in Mbits/sec.
Default value: 8
Min value: 1
Max value: 10000
SDK attribute: downloadRateLimit
IP address of the gateway bound to the port
Format: free
SDK attribute: gateway
The way the interface is connected via the NSG. This value depends on if the interface internal or external to the NSG.
Allowed values: AUTOMATIC, EMBEDDED, PCI_EXPRESS, USB_ETHERNET, USB_MODEM
Default value: AUTOMATIC
SDK attribute: interfaceConnectionType
Specify how to connect to the network. Possible values: Dynamic (DHCP), Static (static configuration is required), PPPoE (pppoe configuration required), LTE (LTE configuration required). Default: Dynamic
Allowed values: Dynamic, LTE, PPPoE, Static
Default value: Dynamic
SDK attribute: mode
Subnet mask
Format: free
SDK attribute: netmask
PPPoE password.
Format: free
SDK attribute: password
Physical port name this uplink belongs to
Format: free
SDK attribute: portName
To allow prioritisation of traffic, the NSG network ports must be configured with an uplink type or tag value which will be used in the identification of packets being forwarded. That identification is at the base of the selection of which network port will serve in sending packets to the outside world. The default value is PRIMARY. Possible values are PRIMARY, SECONDARY, TERTIARY, UNKNOWN,
Allowed values: NONE, PRIMARY, SECONDARY, TERTIARY, UNKNOWN
Default value: PRIMARY
SDK attribute: role
Role order: Primary 1, Primary 2, Secondary 3. Note: Order will be calculated when all uplink connections fetched for gateway
Format: free
SDK attribute: roleOrder
Secondary IP Address (Control IP Address) for Loopback.
Format: free
Max length: 64
SDK attribute: secondaryAddress
ID that unqiuely identifies the uplink.
Format: free
Min length: 1
Max length: 65535
SDK attribute: uplinkID
PPPoE username
Format: free
SDK attribute: username
The tag of the uplink's parent VLAN
Format: free
SDK attribute: vlanId


Type WeatherObj
Namespace WorldWeatherOnline.SkiWeatherResponse
collection of weathers for location
Properties
Public properties
List<Weather> bottom get; set;
weather at bottom level
int chanceofsnow get; set;
Chance of snow in a day (%)
DateTime date get; set;
Local forecast date
List<HourlyObj> hourly get; set;
Hourly weather conditions.
List<Weather> mid get; set;
weather at mid level
List<Weather> top get; set;
Weather at top level
float totalSnowfall_cm get; set;
Total snowfall amount in cm


Tarzan A review by Stephen Sills
Disney's recent animated efforts have become nearly identical in plot and indistinguishable in theme. They all follow the same basic formula: rich, gun-toting white guys = bad; cute animals, strong-willed women, and weird freaks = good. Let it be known that the company's most recent foray into the animated market, "Tarzan," is no exception. It's certianly a typical Disney movie, although it's probably one of their better efforts in recent years. Despite its problems (and they are certianly legion), "Tarzan" manages, ultimately, to be a passably entertaining time at the movies.
The film opens with a brief sequence that sets up the backstory. With the accompaniment of a mind-numbingly annoying, quasi-African song blaring over the soundtrack, we see Tarzan's parents barely escape a harrowing shipwreck with their newborn son and make their way to a tropical island. Once there, they build a "Swiss Family Robinson"-esque hut. The parts of the sequence dealing with Tarzan's parents are intercut with shots of Tarzan's future family, the gorillas, leading their daily life. During one of the gorilla-related moments, we see a baby gorilla get killed and his mother's reaction. By the end of the sequence, Tarzan's parents are also dead, having been killed by an evil tiger that looks suspiciously like Kahn from "The Jungle Book."
The mother gorilla, Kala (voice of Glenn Close), discovers the hut. While scouring through it, she finds baby Tarzan hidden under a blanket. Still grief-stricken over the loss of her child, she views Tarzan as a potential replacement.
The leader of her Tribe, Kerchak (voice of Lance Henriksen), thinks otherwise. He views Tarzan as a threat, and orders Kala to leave him in the jungle to let him fend for himself. Kala's strong maternal instincts ultimately prevail, however, and Kerchak reluctantly decides to let Tarzan stay.
We are then "treated" to yet another annoying musical sequence, scored with what sounds like the same song from earlier in the movie. The sequence culminates with baby Tarzan growing into boyhood. The movie lingers in that stage of Tarzan's life for a while, showing us the inevitable conflicts that a boy child would have when raised among gorillas. Tarzan is viewed as different and strange by his playmates (a clumsy, obvious stab at racism that is typical of Disney). Kerchak still views Tarzan as an outsider, and is suspicious of his every move. His status isn't helped any by a botched attempt to impress his friends by stealing a hair from an elephant. The plan backfires when he causes a stampede that nearly wipes out the entire tribe.
Finally, after another sequence scored with what sounds like the same song, Tarzan grows into adulthood. He is generally accepted now, although Kerchak still doesn't like him much. His relatively care-free existence is challenged when he discovers a small group of humans trudging through the jungle. The group consists of Professor Porter (voice of Nigel Howthorne), a kindly old gentleman who only wants to study the gorillas, his beautiful daughter, Jane (voice of Minnie Driver), who wants to do the same, and their guide, Clayton (voice of Brian Blessed), this movie's obligatory gun-toting, and hence evil, white male. Having never seen the female of his species, Tarzan obviously finds himself attracted to Jane.
Tarzan studies them from a distance until Jane finds herself being chased through the jungle by a band of monkeys. Tarzan swoops down via a vine and rescues her, taking her on a wild ride though the trees. Shaken up by the experience, Jane returns to the small group's camp and tells her companions about her adventure. Inevitably, they dismisss her experience, citing Tarzan as merely a fantasy. They change their respective minds, however, when Tarzan shows up at their camp.
As Tarzan spends more and more time with his fellow humans, he finds himself to be increasingly attracted to Jane, and the human lifestyle in general. He must decide between his love for Jane and the only family that he has known throughout his entire life up to that point.
The themes in "Tarzan" are certianly not new to Disney movies. As aforementioned, all of the politically correct stereotypes are there, and Tarzan's delimma is reminiscent of "The Jungle Book" and "Pocahontas." These movies have become continual repititions of the same themes under different contexts. Furthermore, the film's climax seems incredibly contrived and serves merly to satisfy a Disney convention.
I was also a bit disturbed by the erotic overtones in this movie.  The attraction between Tarzan and Jane was very erotic, far more so than most Disney movies. One scene in particular, where Tarzan studies Jane, went a bit too far in my opinioin. Since Tarzan can barely communicate with Jane, the only possible attraction is physical. Tarzan is even referred to as Jane's "fantasy" at one point.
Still, "Tarzan" has a couple of very good points, the most notable of which is the knock-out animation. Much like "A Bug's Life," this movie looks so good that it's worth watching along those lines (I was actually more visually entrhalled during "Tarzan" than I was during "The Phantom Menace"). The story, while contrived and inherintly politically correct, works and is entertaining when looked at within the light of a children's movie. Despite my mostly negative sounding review, I have to admit that "Tarzan" is leaps and bounds ahead of Disney's last animated effort, "Mulan." It's certianly not up to par with the likes or "Peter Pan" or "Robin Hood," but it's still mildly entertaining, enough so to garner a limited recommendation from me.
*** out of ****
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Reporter Class
The jUnit reporter can produce a jUnit compatible file with the results of your testrun, this reporter enables you to use daleks testresults within a CI environment like Jenkins.
The reporter can be installed with the following command:
$ npm install dalek-reporter-junit --save-dev
The file will follow the jUnit XML format:
<?xml version="1.0" encoding="utf-8"?>
<resource name="DalekJSTest">
<testsuite start="1375125067" name="Click - DalekJS guinea pig [Phantomjs]" end="1375125067" totalTests="1">
<testcase start="1375125067" name="Can click a select option (OK, jQuery style, no message)" end="1375125067" result="pass">
<variation start="1375125067" name="val" end="1375125067">
<severity>pass</severity>
<description><![CDATA[David is the favourite]]></description>
<resource>DalekJSTest</resource>
</variation>
<variation start="1375125067" name="val" end="1375125067">
<severity>pass</severity>
<description><![CDATA[Matt is now my favourite, bow ties are cool]]></description>
<resource>DalekJSTest</resource>
</variation>
</testcase>
</testsuite>
</resource>
By default the file will be written to report/dalek.xml
,
you can change this by adding a config option to the your Dalekfile
"junit-reporter": {
"dest": "your/folder/your_file.xml"
}
If you would like to use the reporter (in addition to the std. console reporter), you can start dalek with a special command line argument
$ dalek your_test.js -r console,junit
or you can add it to your Dalekfile
"reporter": ["console", "junit"]
Constructor
Reporter
()
Item Index
Methods
_checkNodeAttributes
-
testIdx
-
testCount
-
variationCount
Helper method to check if attributes should be set to an empty object literal
Parameters:
-
testIdx
StringId of the test node
-
testCount
StringId of the child node
-
variationCount
StringId of the testCount child node
_recursiveMakeDirSync
-
path
Helper method to generate deeper nested directory structures
Parameters:
-
path
StringPAth to create
assertion
-
data
Generates XML skeleton for an assertion
Parameters:
-
data
ObjectEvent data
runBrowser
-
browser
Stores the current browser name
Parameters:
-
browser
StringBrowser name
runnerFinished
-
data
Finishes XML and writes file to the file system
Parameters:
-
data
ObjectEvent data
startListening
()
chainable
Connects to all the event listeners
testFinished
-
data
Finishes XML skeleton for a testcase
Parameters:
-
data
ObjectEvent data
testStarted
-
data
Generates XML skeleton for a testcase
Parameters:
-
data
ObjectEvent data
testsuiteFinished
()
chainable
Finishes XML skeleton for testsuites
testsuiteStarted
-
name
Generates XML skeleton for testsuites
Parameters:
-
name
StringTestsuite name


|
PaPrg
1.0
|
#include <portaudio.h>
Data Fields | |
| PaDeviceIndex | device |
| int | channelCount |
| PaSampleFormat | sampleFormat |
| PaTime | suggestedLatency |
| void * | hostApiSpecificStreamInfo |
Parameters for one direction (input or output) of a stream.
| int channelCount |
The number of channels of sound to be delivered to the stream callback or accessed by Pa_ReadStream() or Pa_WriteStream(). It can range from 1 to the value of maxInputChannels in the PaDeviceInfo record for the device specified by the device parameter.
| PaDeviceIndex device |
A valid device index in the range 0 to (Pa_GetDeviceCount()-1) specifying the device to be used or the special constant paUseHostApiSpecificDeviceSpecification which indicates that the actual device(s) to use are specified in hostApiSpecificStreamInfo. This field must not be set to paNoDevice.
| void* hostApiSpecificStreamInfo |
An optional pointer to a host api specific data structure containing additional information for device setup and/or stream processing. hostApiSpecificStreamInfo is never required for correct operation, if not used it should be set to NULL.
| PaSampleFormat sampleFormat |
The sample format of the buffer provided to the stream callback, a_ReadStream() or Pa_WriteStream(). It may be any of the formats described by the PaSampleFormat enumeration.
| PaTime suggestedLatency |
The desired latency in seconds. Where practical, implementations should configure their latency based on these parameters, otherwise they may choose the closest viable latency instead. Unless the suggested latency is greater than the absolute upper limit for the device implementations should round the suggestedLatency up to the next practical value - ie to provide an equal or higher latency than suggestedLatency wherever possible. Actual latency values for an open stream may be retrieved using the inputLatency and outputLatency fields of the PaStreamInfo structure returned by Pa_GetStreamInfo().


"When Chronicle of a Disappearance won a prize at Venice, I was careful not to say that I was Palestinian; I was afraid people would applaud more loudly if I did." -Elia Suleiman
In a recent article for Cahiers du Cinema, Frederic Strauss, described Palestininan filmmakers as filmmaker-ambassadors. Implicit in this description is the added burden, for these artists, of representing an entire people as opposed to simply their own views or ideas on a given subject matter. One of the remarkable qualities of Elia Suleiman's first film, Chronicle of a Disappearance is that it eleagantly balances both these tendancies. The film uses an elliptical and occasionally opaque structure to relate the tale of a Palestinian filmmaker named Elia Suleiman who has returned to Palestine. The expected ambivalence, confusion, amusement, despair and elation that comes with this journey are all conveyed in the film. This is seen through a number of episodes that are presented, almost as a simple travelogue, except that a carefully controlled style and a number of associative devices are used to elevate this material in masterful ways.
Suleiman achieves considerable economy of means by keeping his production modes relatively simple: non-professional actors, natural lighting, location shooting. However, his actual use of these tools is by no means simple. It would have perhaps been tempting to offer a more straight forward narrative, in the vein of recent 'social realism' such as (Sandrine Veysset's) Will There be Snow For Christmas, an accomplished film in it's own right. Instead, however, Suleiman uses an episodic structure marked by a number of careful repetitions and variations. A car repeatedly comes to a halt outside of a cafe and the drivers have an altercation or exchange of some kind; the 'Holy Land Souvenir Shop' is repeatedly framed in long-shot, with usually one key element of motion either being introduced or withdrawn from the frame etc.. While specific interpretations will vary, it is the overall technique: the juxtaposing of seemingly similiar yet disparate scenes as to tease out inquiries that is telling. These are moments in time...a people that has perhaps grown eerily accustomed to being marginalized by an annexing culture that denys them both their history and their future. In a recent interview Suleiman asserted that, "...a principle reason for [outsiders] wanting peace today, is to deny the existence of Palestinans before 1948; to not have to deal with this problem."
One of the most notable aspects of the film is Suleiman's restrained use of the camera. For the most part scenes are framed from a single static position. But this is not the arbitraray static camera that has come to plague so many, fiscally challenged and aesthetically bankrupt Americain Independant filmmakers. This is not the 'Look-ma-no-cuts' style of Jim Mackay (Girlstown) or Neil Labutte (In The Compny of Men). Suleiman employs Bressonian rigour in choosing the composition, angle and particularly the articulation between his shots. The result is a considerable density despite the spare means described earlier. This 'persistence' of the camera alludes to a feeling of the need to document. A need to describe and represent in the absence of an official history for Palestinians. The insistence of a certain computer journal to perpetually record the words "The next day", as if this in itself were enough, reinforces this notion.
The film is at its best when it betrays the comic sensibility of its director. The opening monologue of a woman sitting on a couch indulging in neighbourhood gossip, the meeting of two friends who shake hands, offer each other cigarettes and light them exactly mirroring each others gestures, the bufoonery of Israeli police as they raid a woman's house and fail to see her despite an obvious presence (more concerned with being policemen than with recognizing their foe.) all provide humorous counterpoints to the more serious undertones of the film. Suleiman has provided an exceptionally well realized work that we can only hope will spearhead continued efforts from Palestinian filmmakers in Palestine and around the world.
-- -Omar Odeh http://www.geocities.com/Hollywood/Theater/3920
--
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Bounding box (bb) annotations struct, evaluation and sampling routines. bbGt gives access to two types of routines: (1) Data structure for storing bb image annotations. (2) Routines for evaluating the Pascal criteria for object detection. The bb annotation stores bb for objects of interest with additional information per object, such as occlusion information. The underlying data structure is simply a Matlab stuct array, one struct per object. This annotation format is an alternative to the annotation format used for the PASCAL object challenges (in addition routines for loading PASCAL format data are provided, see bbLoad()). Each object struct has the following fields: lbl - a string label describing object type (eg: 'pedestrian') bb - [l t w h]: bb indicating predicted object extent occ - 0/1 value indicating if bb is occluded bbv - [l t w h]: bb indicating visible region (may be [0 0 0 0]) ign - 0/1 value indicating bb was marked as ignore ang - [0-360] orientation of bb in degrees Note: although orientation (angle) is stored for each bb, for now it is not being used during evaluation or sampling. bbGt contains a number of utility functions, accessed using: outputs = bbGt( 'action', inputs ); The list of functions and help for each is given below. Also, help on individual subfunctions can be accessed by: "help bbGt>action". %% (1) Data structure for storing bb image annotations. Create annotation of n empty objects. objs = bbGt( 'create', [n] ); Save bb annotation to text file. objs = bbGt( 'bbSave', objs, fName ) Load bb annotation from text file and filter. [objs,bbs] = bbGt( 'bbLoad', fName, [pLoad] ) Get object property 'name' (in a standard array). vals = bbGt( 'get', objs, name ) Set object property 'name' (with a standard array). objs = bbGt( 'set', objs, name, vals ) Draw an ellipse for each labeled object. hs = draw( objs, pDraw ) %% (2) Routines for evaluating the Pascal criteria for object detection. Get all corresponding files in given directories. [fs,fs0] = bbGt('getFiles', dirs, [f0], [f1] ) Copy corresponding files into given directories. fs = bbGt( 'copyFiles', fs, dirs ) Load all ground truth and detection bbs in given directories. [gt0,dt0] = bbGt( 'loadAll', gtDir, [dtDir], [pLoad] ) Evaluates detections against ground truth data. [gt,dt] = bbGt( 'evalRes', gt0, dt0, [thr], [mul] ) Display evaluation results for given image. [hs,hImg] = bbGt( 'showRes' I, gt, dt, varargin ) Compute ROC or PR based on outputs of evalRes on multiple images. [xs,ys,ref] = bbGt( 'compRoc', gt, dt, roc, ref ) Extract true or false positives or negatives for visualization. [Is,scores,imgIds] = bbGt( 'cropRes', gt, dt, imFs, varargin ) Computes (modified) overlap area between pairs of bbs. oa = bbGt( 'compOas', dt, gt, [ig] ) Optimized version of compOas for a single pair of bbs. oa = bbGt( 'compOa', dt, gt, ig ) USAGE varargout = bbGt( action, varargin ); INPUTS action - string specifying action varargin - depends on action, see above OUTPUTS varargout - depends on action, see above EXAMPLE See also bbApply, bbLabeler, bbGt>create, bbGt>bbSave, bbGt>bbLoad, bbGt>get, bbGt>set, bbGt>draw, bbGt>getFiles, bbGt>copyFiles, bbGt>loadAll, bbGt>evalRes, bbGt>showRes, bbGt>compRoc, bbGt>cropRes, bbGt>compOas, bbGt>compOa Piotr's Computer Vision Matlab Toolbox Version 3.26 Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] Licensed under the Simplified BSD License [see external/bsd.txt]


Last week's cirriculum from Dev Bootcamp featured a brief introduction to the concept of class, laying the foundation for understanding Ruby as an object-oriented language. This week we dug deeper into writing our own classes by defining states of objects in a class and methods that those objects can use. In this post, I'll define what a class is and give a walkthrough on writing one.
In Ruby, everything is an object with particular states and a set of methods that can be performed. Objects that belong to the same class have similar states and can use the same methods. For example, there's the class Array. Any object that belongs to Array is an ordered, integer-indexed collection, and, thus, can use methods that are defined within the class, such as #rotate, #shuffle, and many others. If you visit the Ruby-Doc online, you'll see a list of methods that are defined within the class Array.
So far, I've mentioned that objects have states, but it's time to define what a state is. A state is essentially a defining attribute of an object, such as an id, quantity, etc. These states are things that an object can return when called by a particular method (like calling the first index position from an array object). Within a class, the states of objects are defined by instance variables. Let's start writing a class to see how instance variables get defined. I want to write a class called Songs_on_the_Radio. For objects that belong to this class, I want to know their title and the year they were released.
class Songs_on_the_Radio
def initialize (song_title, year)
@song = song_title
@year = year
end
end
In our class, we used the initialize method to set up an object's state, which requires the parameters song_title and year. We then set the instance variables @song and @year equal to song_title and year respectively.
Now, let's say someone is listening to the radio with us, and they're only in the mood to listen to music that was released in 2015. When a song from 2015 comes on, they express that they like the song and ask you to turn it up, while any time an older song comes on, they'll request that you change the station. We can set up a method to give either response and also include the song title in the response:
class Songs_on_the_Radio
def initialize (song_title, year)
@song = song_title
@year = year
end
def play
(@year == 2015) ? (return "The song #{@song} is hot right now. Turn it up!") : (return "The song #{@song} is old, dude. Change the station.")
end
end
We've now defined a method #play under the class Songs_on_the_Radio, which can be used by any objects belonging to the class. Let's create some objects in the class and see the response we get.
song = Songs_on_the_Radio.new("Informer", 1993)
p song.play
"The song Informer is old, dude. Change the station."
song_two = Songs_on_the_Radio.new("Teach Me", 2015)
p song_two.play
"The song Teach Me is hot right now. Turn it up!"
If you wanted, you could set up more parameters for the initialize method and more instance variables, such as artist, album, etc. While this is a relatively simple class, it illustrates how to write a class, create methods for a class, and create objects of a class, allowing you to define how specific kinds of data get handled. Furthermore, while the modeling is simplistic, there are real-world applications to predictive analytics.


Dear {{USER}},
Thank you for choosing Infosys DevOps Platform.
Your request has been submitted. The Release Number {{RELEASE}} for the application {{APPLICATION}} and pipeline {{PIPELINE}} has been {{METHOD}} successfully:
Please click here view Infosys Dashboard
Please click here visit Infosys DevOps Platform Portal.
Have a good day!!!
Regards,
IDP Team


Below You can play your mod files without the need of installing any software on your computer. Click here if you're interested for the source code of this player.
At the bottom of this page you can download examples of mod files extracted from Team R2R (Reverse 2 Revolutionize) KeyGens and drag & drop them on the player
If You are not sure about how to use this player, please visit the instructions page to watch the video tutorials.


---
layout: post
title: How did Berlusconi spend $47 million in a year? "Like a drunken sailor"
date: '2011-06-04T19:53:29-07:00'
tags:
tumblr_url: http://alexhwilliams.tumblr.com/post/6198609644/how-did-berlusconi-spend-47-million-in-a-year-like-a
---
How did Berlusconi spend $47 million in a year? "Like a drunken sailor"
$140,000 for a personal DJ?
Though that’s probably an insult to drunken sailors everywhere.


|
Rendu
An OpenGL rendering engine for experimentations
|
This camera can be controlled through the inputs received from the user. More...
#include <ControllableCamera.hpp>
Public Types | |
| enum | Mode : uint { FPS = 0, TurnTable, Joystick } |
| The interaction mode of the controllable camera. | |
Public Member Functions | |
| ControllableCamera () | |
| Constructor. | |
| void | pose (const glm::vec3 &position, const glm::vec3 ¢er, const glm::vec3 &up) override |
| void | reset () |
| Reset the position of the camera. | |
| void | update () |
| Update once-per-frame parameters. | |
| void | physics (double frameTime) |
| float & | speed () |
| Mode & | mode () |
| Public Member Functions inherited from Camera | |
| Camera () | |
| Constructor. | |
| virtual void | projection (float ratio, float fov, float near, float far) |
| void | frustum (float near, float far) |
| void | ratio (float ratio) |
| void | fov (float fov) |
| void | pixelShifts (glm::vec3 &corner, glm::vec3 &dx, glm::vec3 &dy) const |
| float | fov () const |
| float | ratio () const |
| const glm::mat4 & | view () const |
| const glm::mat4 & | projection () const |
| const glm::vec3 & | position () const |
| const glm::vec3 & | up () const |
| const glm::vec3 & | center () const |
| const glm::vec2 & | clippingPlanes () const |
| void | apply (const Camera &camera) |
| void | decode (const KeyValues ¶ms) |
| KeyValues | encode () const |
| virtual | ~Camera ()=default |
| Camera (const Camera &)=default | |
| Camera & | operator= (const Camera &)=default |
| Camera (Camera &&)=default | |
| Camera & | operator= (Camera &&)=default |
Private Member Functions | |
| void | updateUsingJoystick (double frameTime) |
| void | updateUsingKeyboard (double frameTime) |
| void | updateUsingTurnTable (double frameTime) |
Private Attributes | |
| float | _speed = 1.2f |
| Camera speed. | |
| float | _angularSpeed = 4.0f |
| Camera angular speed. | |
| glm::vec2 | _angles = glm::vec2(glm::half_pi<float>(), 0.0f) |
| Orientation angles. | |
| float | _radius = 1.0f |
| Turntable radius. | |
| Mode | _mode = Mode::TurnTable |
| The current interaction mode. | |
Additional Inherited Members | |
| Protected Member Functions inherited from Camera | |
| void | updateProjection () |
| Update the projection matrix using the camera parameters. | |
| void | updateView () |
| Update the view matrix using the camera position and orientation. | |
| Protected Attributes inherited from Camera | |
| glm::mat4 | _view = glm::mat4(1.0f) |
| The view matrix. | |
| glm::mat4 | _projection = glm::mat4(1.0f) |
| The projection matrix. | |
| glm::vec3 | _eye = glm::vec3(0.0, 0.0, 1.0) |
| The camera position. | |
| glm::vec3 | _center = glm::vec3(0.0, 0.0, 0.0) |
| The camera center (look-at point) | |
| glm::vec3 | _up = glm::vec3(0.0, 1.0, 0.0) |
| The camera up vector. | |
| glm::vec3 | _right = glm::vec3(1.0, 0.0, 0.0) |
| The camera right vector. | |
| glm::vec2 | _clippingPlanes = glm::vec2(0.01f, 100.0f) |
| The near and far plane distances. | |
| float | _fov = 1.3f |
| The vertical field of view, in radians. | |
| float | _ratio = 1.0f |
| The aspect ratio. | |
This camera can be controlled through the inputs received from the user.
It support turntable, fps and josytick based navigation methods, and handles their synchronization.
Inherits Camera.
|
inline |
Obtain the mode the camera is currently using.
| void ControllableCamera::physics | ( | double | frameTime | ) |
Update the camera position and orientation.
| frameTime | the time elapsed since the last frame, in seconds. |
|
overridevirtual |
Update all view parameters
| position | the camera position |
| center | the camera center of interest |
| up | the camera vertical orientation |
Reimplemented from Camera.
|
inline |
Access the speed parameter.
|
private |
Update the camera state based on joystick inputs.
| frameTime | the time elapsed since the last frame, in seconds. |
|
private |
Update the camera state based on keyboard inputs, as a FPS camera.
| frameTime | the time elapsed since the last frame, in seconds. |
|
private |
Update the camera state based on keyboard inputs, as a turntable.
| frameTime | the time elapsed since the last frame, in seconds. |


Preparation time
30 mins to 1 hour
Cooking time
10 to 30 mins
Serves
Serves 2
Poach the chicken breasts in boiling water with a stock cube and half a lemon for ten minutes. Leave in the hot stock until ready to serve.
Meanwhile soften the red onion and two chopped cloves of garlic together in a little olive oil.
Add the tomatoes and cook for six or seven minutes.
When the tomatoes are warmed through, add another glug of olive oil, seasoning, and a small handful of shredded basil.
Make the marinade. Place the thyme, sage, the last clove of garlic and a few basil leaves into a blender with the juice of a lemon and equal amounts of olive oil. Pulse for a few seconds.
Just before serving, slice the hot chicken into five or six pieces, without cutting all the way through. Drain the poaching liquor and place the semi-sliced chicken back into the dry pan.
Pour the lemon and herb marinade over the chicken and make sure it coats the chicken evenly. Heat through.
To serve, spoon the tomato sauce on the bottom of a dish, finish slicing the chicken and place on top. Drizzle over the remaining marinade and sprinkle on some chopped basil.


MY name is Sarah Darwish ,I have Jordanian nationality , I finished my degree as Industrial engineer from Hasheimte University At the beginning of the year 2021 AD , I was born in February of 1998, i worked as safety engineer in (KHCC) king Hussein Cancer Centre , and in MS pharma company .
I got a six-month scholarship in the field of carpentry and interior design from GIZ and i Registered with the programming scholarship from ASAC through my belief that programming and coding is the future itself , During these days, I reached the level 201 of this scholarship .
- Leon the professional
- The body
- Gone girl
- The call
- Room
- Get out
- Searching
- Prisoners
- Se7en
- Hush
- Safety Engineer at (KHCC) king Hussein Cancer Centre
- Safety Engineer at MS pharma
- Code Fellows Academy from Abdul Aziz Al-Ghurair School Of Advanced Computing
- Bachelor`s in Industrial Engineering from The Hashemite university
- High School Certificate from Sukaina bint alhussein high school


Humanitarian Tracker
Design and Partnership Lead
My work redesigning this data mining and machine learning tech nonprofit's led to an 85% increase in digital engagement.
Design and Partnership Lead
My work redesigning this data mining and machine learning tech nonprofit's led to an 85% increase in digital engagement.
Digital Kiosk
In response to the refugee crisis, this concept is a design for behavior change amongst locals who are open to helping their community but feel under-informed about the people they can help and how to do so.


|
JNIPort for Dolphin Smalltalk |
|
|
Back to Goodies |
JNIPort PlayersThese two sections introduce the main players in the community of JNIPort objects and try to explain something of how they interact. This presentation is about the objects, which is in contrast to the alternative presentation as a breakdown into the three layers of the software. Here I mostly ignore anything below layer two, since it's only used in the implementation of these concepts. I also ignore the distinction between layers two and three; the topmost layer just provides ways of automating what layer two does without materially changing the cast of objects. Another approach to understanding the basic concepts of JNIPort is this overview of the classes involved.
Please note: this description has become slightly out of date. It is still
accurate as far as it goes, but it should be updated to discuss the JVM's role as a
The JVM Object
The central actor in JNIPort is the is the JVM object, an instance of class
For a user of JNIPort, the main function of the JVM is that it knows how to find the objects representing Java classes — the “class statics”, of which more below. It also coordinates the class registry, the class index, and the callback registry, these are important parts of the implementation of JNIPort; but are (to varying degrees) less relevant to JNIPort users.
JNIPort is designed to allow several JVMs to exist at once, since that is the way the JNI
API is structured. In practice, there is little need for this (in fact, the current
crop of Java implementations don't support having more than one in the lifetime of a process).
It is possible to use JNIPort as if the JMV were a Singleton, and the
Class StaticsThere is a great deal of truth in the observation that “in Java, classes are not objects”. The “static” fields and methods of a Java class are not associated with any object, they float in a sort of global space with the Java class serving only to delimit a namespace and define accessibility. Of course, for Smalltalk, that Just Won't Do…
JNIPort represents Java classes and interfaces by class statics. These objects
(instances of subclasses of
In addition, they can be specialised to a particular Java class, so they may also:
More strictly, the 1-to-1 relationship is that within the context of a JVM (since
each JVM has its own collection of class statics) there is a class static for each
known Java class, interface, or type. For instance
Each class static is paired with a Java instance wrapping a reference to a
Whenever a new Java class becomes known to JNIPort, it is assigned a corresponding new class static. JNIPort can become aware of classes in several ways, including:
The known class statics are held in the class registry, where they normally stay for the lifetime of the JVM, although there are exceptions during bootstrapping. A later version of JNIPort will provide some means of “retiring” class statics that are no longer needed or used (thus allowing the Java class itself to be garbage collected), but this version has no public API for doing so. Class statics are specialised by subclassing. You can create a subclass of JavaStatic and arrange that some Java class, and all its subclasses, will have class statics that are instances of your subclass. This is set up by the class registry during bootstrapping. These specialised subclasses are the class-side wrapper classes, and they are where the wrapper methods live; you can also add whatever helper methods you want or need. You can create wrapper classes by hand, although it's tedious (as I know — I hand-wrote many of the wrapper classes supplied as part of JNIPort), or you can generate them automatically with the help of the wrapper generation wizard, or you can have them generated dynamically by using ghost classes. Class statics have another vital role that is internal to JNIPort: they know how to wrap references to Java objects in Java Instances of the right kind. Each class static knows a Smalltalk class to use to wrap references to instances of its Java class, its instance class. The instance class is normally the same as the instance class for the Java superclass, but that can be changed during bootstrapping, and when ghost classes are used. This is discussed in the section about the lifecycle of an instance, below. One particular class static corresponds to the Java classjava.lang.Class , and that object has a special role to play
in the mechanism of JNIPort. This is described in the section about the
lifecycle of a class static, below.
Java Instances
JNIPort represents references to Java objects by instances of (subclasses of)
It is important to realise that these wrap references to Java objects,
and that there can be more than one reference to the same object. The
In some cases, it is desirable or necessary to ensure that references are unique. JNIPort includes a facility for making a reference to a Java object canonical; and when this is used, any subsequent references to that object will be mapped to the canonical instance. This is available on a per-instance or per-class basis. It is not the default for most classes, since the “interning” is expensive and it is not normally needed. Internally to JNIPort, instance wrappers have the important role of managing the lifetime of the object reference.  Some of the code refers to this, and the rest of the mechanism of setting up wrapper objects, as managed objects. For the user of JNIPort, the important thing about these objects is that they act as proxies for the underlying object:
In addition, they can be specialised to a particular Java class, so they may also:
As with class statics, proxies are specialised by subclassing.
In this case the custom instance-side wrapper classes are subclasses of
It might be worth explaining that instances can be either local or global; this is a JNI concept. JNI has two different kinds of references to objects, and they are used and managed in slightly different ways. Local references ought to be more efficient, but need to be managed more carefully. It is possible that a future version of JNIPort will not use local references at all. In any case, for user code, there should be no difference between local and global. Other PlayersThere are some other notable objects in the JNIPort community. These are mostly concerned with the implementation of JNIPort, but they are intended to be visible to the JNIPort user. The Class RegistryThere is one class registry for each JVM object. It holds the list of class statics that JNIPort knows about. Its role is mostly to ensure that every Java class and type is wrapped in exactly one class static (for more details see the class lifecycle section, below). However it is also able to provide lists of all the known classes, all known subclasses of some superclass, and so on. The Class Index
There is one class index for each JVM object. It holds the mapping from the
names of classes and types (represented as Symbols, in fact) to the corresponding
class statics. Classes may appear under more than one name (because of the weird JNI
naming rules, which are not relevant here — fortunately); also not all known classes
will appear in the index, only those that have been looked-up by name. The index is
effectively a cache to allow (Design note: The class index is actually a minor player, but it has a nasty habit of trying to vanish and get its role absorbed into that of some other object — which it then complicates unnecessarily. So I've dragged it out into the light of day as a public player to try to stem the evil tendency.) The Callback RegistryThere is one callback registry for each JVM object that supports callbacks. It holds references to the objects that “tag” callbacks (see the section on callbacks), and is responsible for dispatching the incoming callback requests or notifications to the correct handler for each tag. The Ghost Class MakerThere may be one ghost class maker for each JVM object. If there is, then its role is to wait for new Java classes to be registered and then drive the creation of corresponding new ghost classes. This is discussed a bit more under class lifecycle, below. The ghost class maker is really only a public object because it has to be configured. The PlayThis section is about the interactions between the main objects described in the first section. This is almost all about the implementation of JNIPort — user-defined objects have no special role — but an overview of how the system works may be helpful. The Lifecycle of an InstanceThe process starts with a raw JNI reference to some Java object; it may have been returned from a Java method call, for instance. Before JNIPort can do anything with the reference it must be wrapped in a Smalltalk object. The process normally starts with the JVM object… The JVM object's role in life to put other objects in touch with each other. In this case the raw JNI reference needs to find a class static that will generate a wrapper/proxy for it. The JVM object starts by using low-level JNI features to get a reference to the Java object's class. This will answer a raw JNI pointer to a class object, and the JVM will find a corresponding class static for it as described in the next section. The JVM will then ask the newly discovered class static to wrap the original raw JNI reference. The class static may have canonical instances, if so then it must first check to see if it already has a proxy for the same Java object. It checks its object registry (essentially just a weak set), if it has one, to see if there is a match. If so then it releases the raw JNI pointer immediately, and returns the pre-existing proxy to the caller. Otherwise it creates a new proxy object. This will be an instance of the class static's “instance class”, it will hold the raw JNI reference and know that it belongs to this class static. If the particular class static is supposed make all instances canonical, then it enters the new instance in its object registry. Finally it returns the new instance to the JVM. An optimisation to this process is possible when the correct class static is known (with certainty) before the raw reference is created. In such cases there is no need to ask the JVM to wrap the reference, the class static can be asked directly (which saves an expensive class lookup). Some cases where this optimisation can be applied are:
The first three cases are easy to code for and JNIPort applies them wherever possible. The last two cases need significantly more messy code, so JNIPort only uses those optimisations in ghost methods. This process (of looking up a class static then creating a wrapper object) may sound slow, and in fact it is. On my P3 650Mz laptop, JNIPort can wrap a maximum of between 10K and 20K object references per second, depending on which of the optimisations are applicable. The Lifecycle of a Class Static
The previous sub-section and this one are quite closely intertwined; the lifecycle
of an instance is strongly affected by its “onwing” class static, but
the class static is paired with an instance of
The lifecycle of a class static starts when the JVM object is asked to find a wrapper
for a raw JNI reference to an instance of
We'll call the specific class static for
If the class registry does not find a pre-existing wrapper, then the Class
class static creates an instance of the correct proxy class for
So far this hardly differs from the normal processing for wrapping an instance of any class with canonical instances (there are some differences in the code, but those are mostly about efficiency, e.g. not using Mutexes unnecessarily). What is different in this case is that the Class class static also creates a new class static and pairs it with the new class object before registering it.
To create the new class static, the Class class static must first choose a
Smalltalk class for it (I'm sorry if this is getting confusing — it goes
with the territory, like the “metaclass knot” in Smalltalk). To
do this it tries to find the most applicable subclass of
You may notice that these rules seem to imply that every normal class will be
given the same kind of class static (and you may also notice that Java's
primitive types aren't handled at all by the rules). The answer is that
special arrangements are made during bootstrapping
to ensure that selected Java classes are given the “right” class statics.
For instance the class static for The new class static and the new class object are now married together and initialised. They will stay associated for the rest of the lifetime of this JVM, and any future references to the Java class will be mapped into the existing class static. The class is now considered to be registered.
The instance class of the new class static is set to be the same as that for the Java
superclass.
This seems to imply that the same kind of proxy is used for all Java references.
The answer is roughly the same as for class static classes: the instance
class can be changed during bootstrapping. For instance, during bootstrapping
the class static for One final flourish is worth mentioning: if ghost classes are in use, then at this point the ghost class maker will be informed that a new class has been registered. Before the class static is returned to the JVM (remember, this all started with the JVM being asked to wrap a JNI reference?), the ghost class maker will convert it into a ghost class. Details are here but, briefly, it will:
The configuration controls exactly which classes are converted into ghosts and which members of those classes are exposed via ghost methods. BootstrappingJNIPort, being fairly complicated internally, has a correspondingly elaborate startup sequence. Most of it is routine, even dull, and is in any case is not relevant to JNIPort users. One aspect of it, however, is relevant: the process of bootstrapping. This process initialises the class registry and sets up the mechanism for wrapping Java classes and objects.
I call it “bootstrapping” because that mechanism is managed largely
by the class static for
The second phase is where custom subclasses of
Each subclass of
By the time bootstrapping is finished, each Java class that has a custom wrapper class (on class or instance side) will have a class static in the registry, and that static will reflect the intended wrappers. The class static and instance class should now be stable for the rest of the life of the owning JVM. The exceptions are when ghost classes are used (in which case the ghost classes will be installed later using much the same mechanism) or when you manually register a new wrapper class (say, by using the wrapper generation wizard).
You may notice that instance wrappers and class-side wrappers are
installed independently — a Java class may have an instance wrapper, or
a class wrapper, or both, and if it has both then the two do not need to know
about each other. Also there is no requirement that the class hierarchy of the
wrapper classes follows the Java class hierarchy, though it would be confusing
if the two were too far out of synch. For instance, the JNIPort wrappers for
|
Copyright © Chris Uppal, 2003-2005
Java, JNI (probably), JVM (possibly), and God knows what else, are trademarks of Sun Microsystems, Inc.


size body Chile largest Fig climate analoga intertidal temperature beach zone beaches change species coastal California surf responses sizes data Table latitude marine sandy patterns SST collected life variation analyses crab female {border-style coast effects females male (e.g. Chilean Emerita Library; Online Wiley ecosystem px;} #ffffff;} characteristics ecosystems populations temperatures Dugan analoga, fecundity important relationships significant Mar function ovigerous sand sea-surface Body grain water biomass braziliensis crabs global potential December USA ]). crustaceans hirsuticauda history males sediment southern <. California, Ecol Publishing Sci. crab, ecological latitudinal range variability Climate Excirolana Group; Jaramillo National Nature Schoeman Science different environmental hemispheres maturity mean model population predicted regression response settlement study used using (SST) Californian Elsevier; Hubbard Pacific associated changes face food growth macroscale observed ocean reproductive results samples similar warming (see American Beach Chile, Sciences change. conservation ecosystems. impacts px; shifts slope tuberculata, {font-family Biol. Data Ecol. Sandy Science. Science; Springer; Table). ]), coasts communities community comparisons consequences distributed estimated feeding font-size hippid hirsuticauda, implications index isopod level measured relationship size, smallest strongly swash taxa values < (California). ./science. Advancement Association Coast Foundation Global Lett. Nat Results Size South [], additional better braziliensis, correlated double; eastern features hemisphere increase insights morphodynamic northern parameter particularly sea significantly slopes sorting studied talitrid tuberculata (XLSX) (body Bergmann’s Biol Brown Chang. Chile. Chlorophyll Click Dean´s Defeo Estuar Geographic Glob Information LINK Largest Life Nature. Orchestoidea Phi Rule Shelf Universidad University abundance affect altered amphipod amphitropical border-color border-width cirolanid coast: crabs, crustacean diversity evidence field file. geographic greater included including increased influence invertebrates length lowest provide provided ranges ranging solid; space-for-time species. strong studies support terrestrial time trophic use wave {font-style {font-weight —February —January (Stimpson) .°C Acad America Austral Biología Burrows Clim Coastal Contreras Duarte Exp Financial Geographical Intertidal Mayr OCE- Poloczanska Project Res. Santa adult analysis animals aquatic attributes available bold contemporary courier; defined distribution ecologically ecosystems, em; evident extracted gradients height highly illustrate include individual isopods likely line low macro-scale maximum mechanisms minimum output period possible potentially predictions predictors pt;} rates regions result role scales scavenging size: spanning species, specimens stages steeper stronger structure surface thermal velocity widely


Introduction
I showed a simple hardware simulation using python’s MyHDL package in my last post. This package has become something of a workbench for me since I discovered it. I’ve basically been simulating any digital circuit at the RTL (Register Transfer Level) that I can think of just for fun and I want to share some of those in this post while discussing some of the details.
Basic building blocks
As I mentioned earlier, my last post discussed using MyHDL to simulate hardware in python and demonstrated a notorious yet simple combinational circuit: the 1-bit full adder. However, most, if not all, electronic devices are composed of both Combinational Logic and Sequential Logic.
The difference between Combinational and Sequential circuits
The main point of contrast between these two types of circuits is what their output is a function of. A combinational circuit will have an output based on its input. A sequential circuit however is always in a state (unless it is metastable) and its output depends on how it was designed. Sequential circuits construct finite-state machines which fall into two categories: Moore and Mealy. A Moore machine’s output depends solely on its current state. A Mealy machine’s output depends on its current state and inputs.
Another point of contrast between these two types of circuits is their timing.
Combinational timing
The output of a combinational circuit will change based on its inputs. This change takes place after some time \(t_{pd}\) which is the propagation delay of the circuit. The propagation delay of the signal is the longest path in terms of time that a signal must take. This time will depend on how long it takes for each gate in the path to change its output once its input has changed. For example, let us revisit the wikipedia article on the 1-bit full adder here: https://en.wikipedia.org/wiki/Adder_(electronics). Here they assume that the XOR gates both take 3 delays to change their output, which means it will take 2*3 delays before the sum bit \(S\) will change once any of the inputs \(A, B, C_{in}\) change. For the sake of simplicity and clarity, let us further assume these delays are of 1 nanosecond (ns). The other output of the circuit \(C_{out}\) (the carry-out bit) only takes 2 delays according to this article. What this means is that \(C_{out}\) will change quicker than \(S\) and that the inputs must be held on the circuit long enough for \(S\) to change. With that said, it should come as no surprise that \(t_{pd}\) of this circuit would be 6ns. Now these assumptions are not true for EVERY 1-bit full adder. One could implement this circuit with logic gates that have different delays which would make \(t_{pd}\) different. The one thing that is never different is the fact that you will always have to wait for the signal that takes the most time to travel through your circuit.
A real example
Let’s take a look at a datasheet for a real 4-bit full adder here: http://www.ti.com/lit/ds/symlink/cd74hc283.pdf. The table for propagation delays begins at the bottom of page 3. You can see that the propagation delays are broken up into two categories: HC types and HCT types. These categories represent two different chips which obviously have two different implementations judging by the propagation delays. The path for 1-bit addition is listed as \(A_{n}, B_{n}\) to \(S_{n}\), which at 4.5V is 42ns HC types and 49ns for HCT types. Now we need to worry about the carry bit. Let’s assume we were using just bit 0. We already know that \(A_{0}, B_{0}\) to \(S_{0}\) at 4.5V has a max propagation delay of 42ns HC types and 49ns for HCT types. But what about the \(C_{in}\) to \(S_{0}\)? According to the datasheet, it is 32ns for HC types and 31ns for HCT types. Since \(A_{0}, B_{0}\) to \(S_{0}\) \(>\) \(C_{in}\) to \(S_{0}\) in both cases, the longest path is \(A_{0}, B_{0}\) to \(S_{0}\) so \(t_{pd}\) would be the time it takes for our signal to travel that path.
Sequential timing
The state of a sequential circuit always changes with a clock pulse called the clock. The clock simply outputs a signal that turns “On” then “Off” over and over. The amount of time that it remains on and then off is determined by its period. The figure below shows a clock that has a frequency of 50 MHz (period = \(\frac{1}{50*10^6} = 20ns\)). The change of state for a sequential circuit can occur on the positive (rising) or negative (falling) edge of the clock. There is still propagation delay present in sequential circuits but it manifests itself in a different way. Instead of worrying about the longest path of your input signal, you must worry about the time it takes for the output to change once an input has been applied and the clock edge has occurred. This is called the clock to output time. Other important timing parameters you have to worry about are the setup time and hold time. These represent the amount of time you should hold an input prior to a clock edge and and the amount of time you should hold an input after a clock edge (respectively).
A real example
Let’s take a look at the timing parameters for for a real D type flip flop (i’ll talk more about this later) here: http://www.ti.com/lit/ds/symlink/cd74hc74.pdf. Timing parameters that we should care about start at the bottom of page 4. Again, these parameters are broken up into two categories: HC types and HCT types. This is for the same reason as last time: they are different implementations of the same thing. If you look closely, you can see that the HC types offer a range of voltages for operation including a low power option (2V) while the HCT types can only operate at 4.5V. The setup time and hold time for both types are the same at 4.5V (12ns and 3ns respectively). Their clock to output time is also the same at 4.5V (max of 35ns).
The Flip Flop
The most basic element of a sequential circuit is always a flip flop. There are a few different types of flip flops: T, JK, and D. The most used of these is easily the D Flip Flop. One look at the flip flops available from Digi-Key – the fourth largest electronic component distributor in North America – confirms this fact. At the time of me writing this article, there were 2,372 different types of flip flops available. 2,219 were D flip flops, 152 were JK flip flops, and sadly only 1 was a T flip flop. See for yourself here: http://www.digikey.com/short/341mvp. Needless to say, I will not be wasting time on discussing JK or T flip flops in detail.
D Flip Flops
The D flip flop takes the input applied to it on some clock edge and makes it the next output. The T flip flop only changes its output when the input is high, and the JK flip flop (which has two inputs J,K) changes based on specific encodings of the inputs (for instance, J=1 and K=0 will make the output 1 while J=0 and K=1 will reset the flip flop). The simplicity of the D flip flop is probably what makes it the most used type of flip flop.
The input of a D flip flop is usually called \(D\) and the output is usually called \(Q\). The truth table for a D flip flop is:
| \(Clock\) | \(D\) | \(Q_{next}\) |
|---|---|---|
| Edge | 0 | 0 |
| Edge | 1 | 1 |
| No Edge | X | Q |
As I said earlier, the edge of the clock is irrelevant because it can happen on the rising or the falling edge and it doesn’t change the truth table. Notice that the last entry in the truth table tells us that \(Q\) doesn’t change when there is no clock edge.
Below is an example of how to implement and simulate a positive edge triggered D flip flop with MyHDL. In this example I will declare two sets of signals: one with delays and one without delays. The delays will be for simulating the clock to output time and setup time. I will use the timing parameters from our real D flip flop example for these. Lastly, I will make it such that the simulation will change the input to the flip flop on the rising edge of the clock.
from myhdl import *
def dff(q, d, clk):
"""
Postive edge triggered D-Flip Flop Module
:param input d: input to flip flop
:param input clk: clock signal
:param output q: output of flip flop
"""
@always(clk.posedge)
def logic():
# changes to d on the rising edge
q.next = d
return logic
def dff_testbench():
"""
Testbench for D flip flop
"""
""" declare signals """
# clock signal
clk = Signal(bool(0))
# d flip flop input and output with delays
d = Signal(bool(0), delay=12)
q = Signal(bool(0), delay=35)
# d flip flop input and output with no delays
d_nd = Signal(bool(0))
q_nd = Signal(bool(0))
# instantiate D flip flop with delays
dff_delay_inst = dff(q, d, clk)
dff_nodelay_inst = dff(q_nd, d_nd, clk)
@always(delay(50))
def clkgen():
""" clock generator """
clk.next = not clk
@always(clk.posedge)
def stimulus():
""" change input """
d.next = not d
d_nd.next = not d_nd
return instances()
def simulate(timesteps):
tb = traceSignals(dff_testbench)
sim = Simulation(tb)
sim.run(timesteps)
simulate(500)
<class 'myhdl._SuspendSimulation'>: Simulated 500 timesteps
Results
Notice that the delays are actually neglible and don’t impact the outcome of the simulation. That is to say, when \(D\) goes high on the first rising clock edge, \(Q\) stays low until the next rising clock edge where it then changes because \(D\) is high and this happens regardless of the delay. Therefore, my simulations will not have delays on the D flip flop inputs and outputs going forward.
What if the D Flip Flop was triggered on the negative edge? The results would simply be shifted further to the right on the timing diagram. I encourage you to modify the simulation and see this for yourself.
Hierarchy
There is a beautiful yet ugly approach to hardware development that shrouds this topic in obscurity: Abstraction. Elements like transistors, resistors, capacitors, etc. are used to construct digital circuits. If we wanted to simulate something like those, then we’d use a program like LTSpice. Once the behavior of the components that make up something like an AND gate are known, the next step is to abstract them away into a black box. This is where I believe people can get confused and/or lost. Combinational and sequential circuitry represents the lowest level of Hardware Description Languages. Combinational and sequential circuits are used to build modules that can then be used to then build other modules and so on. This structure represents the concept of a hierarchy but I like to think about it like a Matryoshka_doll. In MyHDL, “hierarchy can be modeled by defining the instances in a higher-level function, and returning them. This pattern can be repeated for an arbitrary number of hierarchical levels”\(^{[1]}\). This was done previously in the D flip flop example but now I will add another level to it in the example below.
Shift Register
As an example of building hierarchy, we can chain together some D flip flops and make what is called a Shift Register. These devices are mainly used for converting between serial and parallel data. Serial data is data that is sent one bit at a time while parallel data is data sent many bits at a time. A Serial Peripherial Interface Bus is one such instance where converting between these two types of data is needed.
In particular, I will composed a 4-bit wide Serial In, Serial Out (SISO) Shift Regiser similar to the one depicted below. When a 1 is placed on the input of this device, it will take 4 clock periods for it to emerge on the output and the simulation results will confirm this.
from myhdl import *
def dff(q, d, clk):
"""
Postive edge triggered D-Flip Flop Module
:param input d: input to flip flop
:param input clk: clock signal
:param output q: output of flip flop
"""
@always(clk.posedge)
def logic():
# changes to d on the rising edge
q.next = d
return logic
def shift_register(bit_out, bit_in, clk):
"""
Serial-in, Serial-out (SISO) shift register
:param input bit_in: input to SISO
:param input clk: clock signal
:param output bit_out: output of SISO
"""
# internal signals that chain togeter DFFs
q0, q1, q2 = [Signal(bool(0)) for i in range(3)]
# instantiate D flip flops
d0_inst = dff(q0, bit_in, clk)
d1_inst = dff(q1, q0, clk)
d2_inst = dff(q2, q1, clk)
d3_inst = dff(bit_out, q2, clk)
return instances()
def sr_testbench():
clk = Signal(bool(0))
din, dout = [Signal(bool(0)) for i in range(2)]
sr_inst = shift_register(dout, din, clk)
@always(delay(10))
def clkgen():
clk.next = not clk
@always(clk.posedge)
def stimulus():
din.next = not din
return instances()
def simulate(timesteps):
tb = traceSignals(sr_testbench)
sim = Simulation(tb)
sim.run(timesteps)
simulate(500)
<class 'myhdl._SuspendSimulation'>: Simulated 500 timesteps
Results
As expected, the simulation shows that it takes 4 clock cycles for a bit to propagate to the output of the circuit.
More advanced examples
This section contains some more advanced examples that I have laid the foundation for but will leave largely unexplained.
Linear Feedback Shift Registers (LFSR)
A linear feedback shift register are a particular type of shift register that is commonly used for generating random numbers. Here’s a really neat ipython notebook on the subject from one of the gentlmen at XESS Corp: https://github.com/xesscorp/CAT-Board/blob/master/tests/RNG_with_MyHDL.ipynb.
Below is an example of the implementation depicted in MyHDL.
"""
4-bit Fibonaccio Linear Feedback Shift Register
programmed using MyHDL library
Programmed by William Harrington
Website: wrh2.github.io
"""
from myhdl import *
def xor(y, a, b):
"""
XOR function
:param input a: first operand
:param input b: second operand
:param output y: a XOR b
"""
@always_comb
def logic():
y.next = a ^ b
return logic
def dff(q, d, clk):
"""
D-Flip Flop Module
:param input d: input to flip flop
:param input clk: clock signal
:param output q: output of flip flop
"""
@always(clk.posedge)
def logic():
# changes to d on the rising edge
q.next = d
return logic
def LFSR(out, clk):
"""
4-bit Linear Feedback Shift Register
:param input clk: clock signal
:param input seed: starting value, defaults to 0xF
"""
""" internal signals declaration """
d = Signal(bool(0))
q0, q1, q2, q3 = [Signal(bool(1)) for i in range(4)]
count = Signal(concat(q0, q1, q2, q3))
""" module instantiation """
d0 = dff(q0, d, clk)
d1 = dff(q1, q0, clk)
d2 = dff(q2, q1, clk)
d3 = dff(q3, q2, clk)
y1 = xor(d, q3, q2)
@always(count)
def output():
out.next = count
@always_comb
def current():
"""
This function creates bus from outputs of
the D flip flops for easy viewing in a
waveform viewer
"""
count.next = concat(q0, q1, q2, q3)
return instances()
def LFSR_testbench():
"""
Testbench for linear feedback shift register
"""
clk = Signal(bool(0))
out = Signal(0)
# instantiate linear feedback shift register
lfsr_inst = LFSR(out, clk)
""" clock generator """
@always(delay(10))
def clkgen():
clk.next = not clk
@instance
def output_monitor():
print "t(ns)\t output"
print "--------------"
while True:
yield out
print "%d\t %s" % (now(), bin(out))
return instances()
def simulate(timesteps):
tb = traceSignals(LFSR_testbench)
sim = Simulation(tb)
sim.run(timesteps)
simulate(300)
t(ns) output
--------------
10 111
30 11
50 1
70 1000
90 100
110 10
130 1001
150 1100
170 110
190 1011
210 101
230 1010
250 1101
270 1110
290 1111
<class 'myhdl._SuspendSimulation'>: Simulated 300 timesteps
Asynchronous Circuits
The circuits so far have all been synchronous which means that they use the same clock signal. The examples below are asycnrhonous counters.
4-bit Asynchronous Up Counter
"""
4-bit up counter. Count from 0x0 to 0xF.
Programmed by William Harrington
Website: wrh2.github.io
"""
from myhdl import *
def dff(q, nq, d, clk):
"""
D-Flip Flop Module
:param input d: input to flip flop
:param input clk: clock signal
:param output q: output of flip flop
:param output nq: inverse of output
"""
@always(clk.posedge)
def logic():
q.next = d
nq.next = not d
return logic
def up_counter(out, clk):
"""
4-bit up counter using D-Flip Flops
:param input clk: clock signal
"""
""" internal signals """
q0, q1, q2, q3 = [Signal(bool(0)) for i in range(4)]
nq0, nq1, nq2, nq3 = [Signal(bool(0)) for i in range(4)]
count = Signal(concat(q3, q2, q1, q0))
""" chaining of d-flip flops """
d0 = dff(q0, nq0, nq0, clk)
d1 = dff(q1, nq1, nq1, nq0)
d2 = dff(q2, nq2, nq2, nq1)
d3 = dff(q3, nq3, nq3, nq2)
""" makes bus from output of each d-flip flop """
""" this is just for easy viewing of the count """
@always_comb
def keep_count():
count.next = concat(q3, q2, q1, q0)
@always(count)
def output():
out.next = count
return instances()
def up_counter_testbench():
clk = Signal(bool(0))
out = Signal(0)
up_inst = up_counter(out, clk)
@always(delay(10))
def clkgen():
clk.next = not clk
@instance
def output_monitor():
print "t(ns)\t output"
print "--------------"
while True:
yield clk.posedge
print "%d\t %s" % (now(), bin(out))
return instances()
def simulate(timesteps):
tb = traceSignals(up_counter_testbench)
sim = Simulation(tb)
sim.run(timesteps)
simulate(350)
t(ns) output
--------------
10 0
30 0
50 1
70 10
90 11
110 100
130 101
150 110
170 111
190 1000
210 1001
230 1010
250 1011
270 1100
290 1101
310 1110
330 1111
350 0
<class 'myhdl._SuspendSimulation'>: Simulated 350 timesteps
4-bit Asynchronous Down Counter
"""
4-bit down counter. Counts down from 0xF to 0x0.
Programmed by William Harrington
Website: wrh2.github.io
"""
from myhdl import *
def dff(q, nq, d, clk):
"""
D-Flip Flop Module
:param input d: input to flip flop
:param input clk: clock signal
:param output q: output of flip flop
:param output nq: inverse of output
"""
@always(clk.posedge)
def logic():
q.next = d
nq.next = not d
return logic
def down_counter(out, clk):
"""4-bit down counter using D-Flip Flops
:param input clk: clock signal
"""
""" internal signals """
q0, q1, q2, q3 = [Signal(bool(1)) for i in range(4)]
nq0, nq1, nq2, nq3 = [Signal(bool(0)) for i in range(4)]
count = Signal(concat(q3, q2, q1, q0))
""" chaining of d-flip flops """
d0 = dff(q0, nq0, nq0, clk)
d1 = dff(q1, nq1, nq1, q0)
d2 = dff(q2, nq2, nq2, q1)
d3 = dff(q3, nq3, nq3, q2)
""" makes bus from output of each d-flip flop """
""" this is just for easy viewing of the count """
@always_comb
def keep_count():
count.next = concat(q3, q2, q1, q0)
@always(count)
def output():
out.next = count
return instances()
def down_counter_testbench():
# clock signal
clk = Signal(bool(0))
out = Signal(0xF)
# instantiate down counter
down_inst = down_counter(out, clk)
""" clock signal generator """
@always(delay(10))
def clkgen():
clk.next = not clk
@instance
def output_monitor():
print "t(ns)\t output"
print "--------------"
while True:
yield clk.posedge
print "%d\t %s" % (now(), bin(out))
return instances()
def simulate(timesteps):
tb = traceSignals(down_counter_testbench)
sim = Simulation(tb)
sim.run(timesteps)
simulate(320)
t(ns) output
--------------
10 1111
30 1110
50 1101
70 1100
90 1011
110 1010
130 1001
150 1000
170 111
190 110
210 101
230 100
250 11
270 10
290 1
310 0
<class 'myhdl._SuspendSimulation'>: Simulated 320 timesteps
References
- http://docs.myhdl.org/en/stable/manual/intro.html#parameters-and-hierarchy
- Serial-in, Serial-out diagram from https://www.ee.usyd.edu.au/tutorials/digital_tutorial/part2/register02.html
- LFSR diagram from https://casper.berkeley.edu/wiki/Variable_Correlation_Digital_Noise_Source_for_FPGA


V@rSITy Care
Home
About Us
Contact Us
Past Events
Gallery
Upcoming Events
Collaborations
Members
Faculty
Dr. Neeru Bhagat
President
Palak Nath
Shruti Mandaokar
Managing Teams
Devesh Maheshwari
Sneha R Prasad
TY Core Team
Chetna Singh
Divyadarshi Acharya
Mahek Jain
Neelima Chinta
Rehan Yadav
Srishti Gupta
Yukti Bagrodia
SY Core Team
Harshvardhan Shinde
Hitanshu Samantaray
Nevil Tanna
Ruchira Lokhande
S Easwaran
Shwati Tiwari
Kenil Patwa
Web Developers
Yukti Bagrodia
Srishti Gupta
Rahul Mansharamani
Pratyush Jain
Ayush Saini
Achyut Shukla
S Easwaran
Website Content Manager
Shwati Tiwari
Vedant Deshmukh
V@rSITy Care
We at SIT care


buzz
bird
Whoops, that didn't work! Try again maybe?
username
password
service
twitter
identi.ca
version
1alpha2
© 2009
Mike Desjardins


You must request access to this administrative site by email .
Authentication is a one time process, after which your IDIR will be enabled for future logins. If this is your first time logging into the Natural Resources Public Transparency Interface (NRPTI), you will need to send an email to CLR Help to complete your authentication and gain access to the site.


@ConsumerType
public interface JobExecutor
A job executor registers itself with the PROPERTY_TOPICS
service registration
property. The value of this property defines which topics an executor is able to process.
Each string value of this property is either
For example, the value org/apache/sling/jobs/*
matches the topics
org/apache/sling/jobs/a
and org/apache/sling/jobs/b
but neither
org/apache/sling/jobs
nor org/apache/sling/jobs/subcategory/a
. A value of
org/apache/sling/jobs/**
matches the same topics but also all sub topics
like org/apache/sling/jobs/subcategory/a
or org/apache/sling/jobs/subcategory/a/c/d
.
If there is more than one job consumer or executor registered for a job topic, the selection is as follows:
If the executor decides to process the job asynchronously, the processing must finish within the current lifetime of the job executor. If the executor (or the instance of the executor) dies, the job processing will mark this processing as failed and reschedule.
| Modifier and Type | Field and Description |
|---|---|
static String |
PROPERTY_TOPICS
Service registration property defining the jobs this executor is able to process.
|
| Modifier and Type | Method and Description |
|---|---|
JobExecutionResult |
process(Job job,
JobExecutionContext context)
Execute the job.
|
static final String PROPERTY_TOPICS
JobExecutionResult process(Job job, JobExecutionContext context)
JobExecutionContext.result().succeeded()
If the job has not been processed completely, but might be rescheduled "failed" should be returned.
This result can be generated by calling JobExecutionContext.result().failed()
.
If the job processing failed and should not be rescheduled, "cancelled" should be returned.
This result can be generated by calling JobExecutionContext.result().cancelled()
.
If the executor decides to process the job asynchronously it should return null
and notify the job manager by using the JobExecutionContext.asyncProcessingFinished(JobExecutionResult)
method of the processing result.
If the processing fails with throwing an exception/throwable, the process will not be rescheduled
and treated like the method would have returned a "cancelled" result.
Additional information can be added to the result by using the builder pattern available
from JobExecutionContext.result()
.job
- The jobcontext
- The execution context.null
for asynchronous processing.Copyright © 2017 The Apache Software Foundation. All rights reserved.


Web Master
To deliver information on the people,ideas, and technologies changing
the world to our
community of affluent business decision makers
To be a smart web master of all times!
Full Stack Web Development
System engineering
Blockchain
Artificial intelligence
Client Server Architecture
The website is to used to manage Library where a
user can order books or call for
reservation
HTML5
CSS3
The Website is an emergency control system of local cases
and if someone gets sick with no medic or facility around
HTML5
CSS3


I have worked on the above Projects that exhibit my acquired skills over time in programming. With continous learning, grit and determinations, the combination of hard and soft skils acquired over this period of time will be sharper and position me well to take on even more complex and challenging tasks.The projects are part of my journey as an upcoming software developer


Starting a plume simulation¶
Tracking and/or mapping of chemical plumes is one of the use-cases often addressed when regarding guidances strategies for AUVs. It presents also a challenge when setting up a simulation in order to design the desired algorithm since the setup of the real experiment can present various types of challenges and can hardly be repeated under the same conditions.
For this objective, the algorithm presented in [12] for both the dynamics of plume particles and the particle concentration sensor have been implemented in the uuv_plume_simulation. For a detailed explanation on the implementation of a passive scalar turbulent plume, please refer to [12] and the ROS implementation for the particle generation here.
To run this ROS node, be sure to clone the package in your catkin workspace as follows
cd ~/catkin_ws/src
git clone https://github.com/uuvsimulator/uuv_plume_simulator.git
and build it
cd ~/catkin_ws
catkin build
source devel/setup.bash
To run the plume generator ROS node, call the demo launch file
roslaunch uuv_plume_simulator start_plume_example.launch
One script is already available to setup an example of a turbulent plume model in the package and can be initialized by calling
rosrun uuv_plume_simulator set_demo_turbulent_plume
If no current is active in the Gazebo world, the particles will accumulate around the plume source. To start a current velocity model, run the script
rosrun uuv_plume_simulator set_current_vel
By changing the current, it is possible to steer the plume. To measure the particle concentration using the algorithm described in [12], the vehicle must have a sensor unit from the chemical particle concentration available in the uuv_sensor_ros_plugins. A number of URDF snippets to initialize this sensor in the URDF robot description can be found in the sensor package. One example of implementation is already presented in the description of the RexROV 2 vehicle in the declaration of its sensor units as shown below
<!-- Mount chemical particle concentration sensor -->
<xacro:default_chemical_concentration_sensor_macro
namespace="${namespace}"
parent_link="${namespace}/base_link"
inertial_reference_frame="${inertial_reference_frame}">
<origin xyz="0 0 0" rpy="0 0 0"/>
</xacro:default_chemical_concentration_sensor_macro>
A sample of the output in rviz and rqt can be seen below. Feel free to check the sample plume script and the URDF sensor snippets to see the input arguments that can be changed to modify both the plume and concentration sensor settings.


I first submitted a report to the alt.drug.psychedlic Usenet forum about five years ago. Erowid and a few other groups picked up my story, and I must admit that I feel a bit famous in a anonymous way.
Since first trying 5-Meo-DMT in the spring of 1996, I have used it a number of more times, and have given it to others.
I am a health care provider and have been studying for a post doctorate degree in neurosciences, and for this reason I feel like it is necessary to relate my observations of this drug.
As anyone who has ever tried 5-MeO-DMT knows, this is not a 'recreational' drug. On many occasions I have seen people react very poorly to the drug, with vomiting, convulsions, and feelings of impending doom.
On two occasions I had to physically hold down the user to prevent them from tearing out their own eyeballs. These individuals had no recollection of this reaction after 'coming down' from the drug.
What is my point you might ask? People are responsible for their own actions, and need to be reponsible when taking these drugs. With the advent of the internet and the massive exchange of information that is occuring people are finding out about a whole score of 'strange, and exotic' chemicals. These chemicals are becoming more available to everyday people. This has many implications for peoples safety and mental health.
In traditional societies there is a much different understanding about reality, and the nature of conciousness. In many cases only the 'shaman' or 'apprentices' are allowed access to these chemicals. Today we find them being used in a variety of different ways that may not be best suited for the drugs properties.
The reason why I am writing this is because a dear friend of mine decided to try 5-MEO and had a **very bad** experience. Since the episode he has been plagued with panic attacks.
There has been recent studies to show that psychdelics cause profound changes in frontal cortex brain activity. The frontal cortex plays a large role in activation of the basal ganglia, which in turn gates the thalamus, preventing increased cortical activity. My hypothesis is that in certain individuals who do not have 'healthy' frontal brain activity, that the barrage of neurotransmitters produced by the entheogenic substance, can in effect, cause the frontal cortex to 'blow out'. In this scenario the basal ganglia loses its activation and the entire cortex moves closer to threshold. When this happens regions of the midbrain would recieve increase activity (specifically the locus ceruleus). When this occurs there may be 'spikes' of biogenic amines from time to time, in affect, leading to 'panic attacks'.
I would be interested in hearing any stories or account of panic attacks after the use of these drugs. I think we owe it to the entire drug community to take these drugs very seriously, and know, that although...they may be for everyone....they ARE NOT for everyone.
To see my friend, who is one of the most peaceful, loving beings I have ever met, confronted with the terror that a panic disorder can bring woke me up to the larger picture with regard to these drugs.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


This is the yacht harbour for Tallinn and lies about 2 miles from the city centre.
Position 59°28'N, 24°49'E.
After passing the outer breakwaters, proceed to the end of the inner breakwater, which is left to starboard. The customs quay is situated behind the inner breakwater.
Passport control is by the front light beacon of Pirita's leading line (red concrete tower with three white balconies).
Clearance can be done at the Olympic Yacht Marina (TOP).
If planning to visit the Russian Federation, Clearance can be obtained at the Tallin-12 Customs office at Pirita.
Last updated July 2014.
Beware of the heavy traffic, fast ships, ferries and fishing vessels in the Gulf of Tallinn.
Both TOP and KJK marinas have visitors' berths.
There are several restaurants and stores, post office, currency exchange, and a pharmacy within a few hundred metres of the port.
Last updated July 2014.
The Estonian Sea Academy is located in the territory of Pirita Harbour, where the cadets complete their marine training. Here are also the Estonian Yachting Union, the supervising organisation of the Estonian yacht clubs; Association Keep the Estonian Sea Tidy and the Estonian Sea Tourism Association, which organises training courses for skippers of small vessels. Also The Tallinn Yacht Club, yacht club Baltsail and other smaller organisations can be found here.


| PDK Templates |
332 |
89 |
cdenneen |
Add global_variables key for GitLab CI to set defaults that can be overridden by jobs |
> I'm fine with not using YAML anchors as the rendering and reading is already complex enough.
>
> Please do add the new key to the README, potentially nabbing the description from .gitlab-ci.yml (and verifying that it actually works similarly).
There is no key. There is already a global_variables key the problem is any custom job setting a variables block will override all global_variables so this allows them to carry forward.
|
cdenneen |
44 |
2 |
false |
false |


(function(){ var BEFOREREQUEST = "beforerequest", REQUESTCOMPLETE = "requestcomplete", REQUESTEXCEPTION = "requestexception", LOAD = 'load', POST = 'POST', GET = 'GET', WINDOW = window; /** * @class Ext.data.Connection * @extends Ext.util.Observable *The class encapsulates a connection to the page's originating domain, allowing requests to be made * either to a configured URL, or to a URL specified at request time.
*Requests made by this class are asynchronous, and will return immediately. No data from * the server will be available to the statement immediately following the {@link #request} call. * To process returned data, use a * success callback * in the request options object, * or an {@link #requestcomplete event listener}.
*File Uploads
File uploads are not performed using normal "Ajax" techniques, that * is they are not performed using XMLHttpRequests. Instead the form is submitted in the standard * manner with the DOM <form> element temporarily modified to have its * target set to refer * to a dynamically generated, hidden <iframe> which is inserted into the document * but removed after the return data has been gathered. *The server response is parsed by the browser to create the document for the IFRAME. If the * server is using JSON to send the return object, then the * Content-Type header * must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.
*Characters which are significant to an HTML parser must be sent as HTML entities, so encode * "<" as "<", "&" as "&" etc.
*The response text is retrieved from the document, and a fake XMLHttpRequest object * is created containing a responseText property in order to conform to the * requirements of event handlers and callbacks.
*Be aware that file upload packets are sent with the content type multipart/form * and some server technologies (notably JEE) may require some custom processing in order to * retrieve parameter names and parameter values from the packet content.
* @constructor * @param {Object} config a configuration object. */ Ext.data.Connection = function(config){ Ext.apply(this, config); this.addEvents( /** * @event beforerequest * Fires before a network request is made to retrieve a data object. * @param {Connection} conn This Connection object. * @param {Object} options The options config object passed to the {@link #request} method. */ BEFOREREQUEST, /** * @event requestcomplete * Fires if the request was successfully completed. * @param {Connection} conn This Connection object. * @param {Object} response The XHR object containing the response data. * See The XMLHttpRequest Object * for details. * @param {Object} options The options config object passed to the {@link #request} method. */ REQUESTCOMPLETE, /** * @event requestexception * Fires if an error HTTP status was returned from the server. * See HTTP Status Code Definitions * for details of HTTP status codes. * @param {Connection} conn This Connection object. * @param {Object} response The XHR object containing the response data. * See The XMLHttpRequest Object * for details. * @param {Object} options The options config object passed to the {@link #request} method. */ REQUESTEXCEPTION ); Ext.data.Connection.superclass.constructor.call(this); }; // private function handleResponse(response){ this.transId = false; var options = response.argument.options; response.argument = options ? options.argument : null; this.fireEvent(REQUESTCOMPLETE, this, response, options); if(options.success) options.success.call(options.scope, response, options); if(options.callback) options.callback.call(options.scope, options, true, response); } // private function handleFailure(response, e){ this.transId = false; var options = response.argument.options; response.argument = options ? options.argument : null; this.fireEvent(REQUESTEXCEPTION, this, response, options, e); if(options.failure) options.failure.call(options.scope, response, options); if(options.callback) options.callback.call(options.scope, options, false, response); } Ext.extend(Ext.data.Connection, Ext.util.Observable, { /** * @cfg {String} url (Optional) The default URL to be used for requests to the server. (defaults to undefined) */ /** * @cfg {Object} extraParams (Optional) An object containing properties which are used as * extra parameters to each request made by this object. (defaults to undefined) */ /** * @cfg {Object} defaultHeaders (Optional) An object containing request headers which are added * to each request made by this object. (defaults to undefined) */ /** * @cfg {String} method (Optional) The default HTTP method to be used for requests. * (defaults to undefined; if not set, but {@link #request} params are present, POST will be used; * otherwise, GET will be used.) */ /** * @cfg {Number} timeout (Optional) The timeout in milliseconds to be used for requests. (defaults to 30000) */ timeout : 30000, /** * @cfg {Boolean} autoAbort (Optional) Whether this request should abort any pending requests. (defaults to false) * @type Boolean */ autoAbort:false, /** * @cfg {Boolean} disableCaching (Optional) True to add a unique cache-buster param to GET requests. (defaults to true) * @type Boolean */ disableCaching: true, /** * @cfg {String} disableCachingParam (Optional) Change the parameter which is sent went disabling caching * through a cache buster. Defaults to '_dc' * @type String */ disableCachingParam: '_dc', /** *Sends an HTTP request to a remote server.
*Important: Ajax server requests are asynchronous, and this call will * return before the response has been received. Process any returned data * in a callback function.
*To execute a callback function in the correct scope, use the scope option.
* @param {Object} options An object which may contain the following properties:
True if the form object is a file upload (will be set automatically if the form was * configured with enctype "multipart/form-data").
*File uploads are not performed using normal "Ajax" techniques, that is they are not * performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the * DOM <form> element temporarily modified to have its * target set to refer * to a dynamically generated, hidden <iframe> which is inserted into the document * but removed after the return data has been gathered.
*The server response is parsed by the browser to create the document for the IFRAME. If the * server is using JSON to send the return object, then the * Content-Type header * must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.
*The response text is retrieved from the document, and a fake XMLHttpRequest object * is created containing a responseText property in order to conform to the * requirements of event handlers and callbacks.
*Be aware that file upload packets are sent with the content type multipart/form * and some server technologies (notably JEE) may require some custom processing in order to * retrieve parameter names and parameter values from the packet content.
*The options object may also contain any other property which might be needed to perform * postprocessing in a callback because it is passed to callback functions.
* @return {Number} transactionId The id of the server transaction. This may be used * to cancel the request. */ request : function(o){ var me = this; if(me.fireEvent(BEFOREREQUEST, me, o)){ if (o.el) { if(!Ext.isEmpty(o.indicatorText)){ me.indicatorText = '
// Basic request
Ext.Ajax.request({
url: 'foo.php',
success: someFn,
failure: otherFn,
headers: {
'my-header': 'foo'
},
params: { foo: 'bar' }
});
// Simple ajax form submission
Ext.Ajax.request({
form: 'some-form',
params: 'foo=bar'
});
// Default headers to pass in every request
Ext.Ajax.defaultHeaders = {
'Powered-By': 'Ext'
};
// Global Ajax events can be handled on every request!
Ext.Ajax.on('beforerequest', this.showSpinner, this);
* @singleton
*/
Ext.Ajax = new Ext.data.Connection({
/**
* @cfg {String} url @hide
*/
/**
* @cfg {Object} extraParams @hide
*/
/**
* @cfg {Object} defaultHeaders @hide
*/
/**
* @cfg {String} method (Optional) @hide
*/
/**
* @cfg {Number} timeout (Optional) @hide
*/
/**
* @cfg {Boolean} autoAbort (Optional) @hide
*/
/**
* @cfg {Boolean} disableCaching (Optional) @hide
*/
/**
* @property disableCaching
* True to add a unique cache-buster param to GET requests. (defaults to true)
* @type Boolean
*/
/**
* @property url
* The default URL to be used for requests to the server. (defaults to undefined)
* @type String
*/
/**
* @property extraParams
* An object containing properties which are used as
* extra parameters to each request made by this object. (defaults to undefined)
* @type Object
*/
/**
* @property defaultHeaders
* An object containing request headers which are added to each request made by this object. (defaults to undefined)
* @type Object
*/
/**
* @property method
* The default HTTP method to be used for requests. Note that this is case-sensitive and should be all caps (defaults
* to undefined; if not set but parms are present will use "POST," otherwise "GET.")
* @type String
*/
/**
* @property timeout
* The timeout in milliseconds to be used for requests. (defaults to 30000)
* @type Number
*/
/**
* @property autoAbort
* Whether a new request should abort any pending requests. (defaults to false)
* @type Boolean
*/
autoAbort : false,
/**
* Serialize the passed form into a url encoded string
* @param {String/HTMLElement} form
* @return {String}
*/
serializeForm : function(form){
return Ext.lib.Ajax.serializeForm(form);
}
});


Node style SHA
on pure JavaScript.
```js var shajs = require(‘sha.js’)
console.log(shajs(‘sha256’).update(‘42’).digest(‘hex’)) // => 73475cb40a568e8da8a045ced110137e159f890ac4da883b6b17dc651b3a8049 console.log(new shajs.sha256().update(‘42’).digest(‘hex’)) // => 73475cb40a568e8da8a045ced110137e159f890ac4da883b6b17dc651b3a8049
var sha256stream = shajs(‘sha256’) sha256stream.end(‘42’) console.log(sha256stream.read().toString(‘hex’)) // => 73475cb40a568e8da8a045ced110137e159f890ac4da883b6b17dc651b3a8049 ```
sha.js
currently implements:
Note, this doesn’t actually implement a stream, but wrapping this in a stream is trivial. It does update incrementally, so you can hash things larger than RAM, as it uses a constant amount of memory (except when using base64 or utf8 encoding, see code comments).
This work is derived from Paul Johnston’s A JavaScript implementation of the Secure Hash Algorithm.


I’ve been dabbling a little bit every day with this project and I’ve made some big changes since day 1.
First, with some help from Brandon Rhodes on StackOverflow, I got the function to print the altitude/azmiuth data for a planet when you run the script. This is still hardcoded for South Bend, but that’s where I live, so it makes sense. Down the line, I’ll make this a variable a user can use to set their locality.
Next, I found a python module to pull the current date and time when requesting the planet’s location. Since the Earth moved, it didn’t make sense to display the position based on date alone. Now, it will read that information from the computer and give more accurate results. Because I did this during the day, I used the sun as my object so I could check it’s position in my program vs other databases and calculators online. And this is where my brain started to hurt.
If you’re not familiar with astronomy (and I’m still learning) you can display position in a few different ways. The easiest (most popular?) way to describe position is using altitude and azimuth coordinates. The altitude is the angle of the object above the horizon and the azimuth is it’s angular distance around the horizon. So, if it’s position is 30o, 270o, it would be 30 degrees above the horizon looking due west.
You can also use celestial coordinates, right ascension and declination. RA is the angular distance from the celestial equator. In other words, if you stand on the equator and look up, you’re looking at RA = 0. The declination, on the other hand, is the direction north or south of the celestial plane. To me, this is much harder to conceptualize in my brain, which is why I prefer alt/az descriptors.
So, back to the code. I got it to print alt/az data, which was awesome. So, to make sure it was working correctly, I checked it against some other tools, and that’s when I ran into problems.
</p>
So, I went back to the code and changed it to print out the RA/Dec instead of alt/az to see what would happen.
Which was better.
I need to find some way to improve my alt/az calculations. I don’t know if it’s my location data or if there need to be adjustments to conversions, but I’m getting funny answers. For now, I’ll keep it in RA/Dec because the entire point of this program down the line is to pass this data to a telescope, so it doesn’t matter which one is easier for the user to look at. We’ll see.
If you want to see the current code, here’s the current dev code base. If you’re a python coder, feel free to fork and contribute.
Written on October 10th, 2013 by Brian Bennett Categorized in: Projects
Leave a comment