4.8.1. HOWTO Work with the SIMP Rsync Shares¶
When we added support for multiple environments, the SIMP rsync space in
/var/simp/environments/simp/rsync
became quite complex.
This will guide you through the new rsync layout as well as providing guidance on setting up new rsync shares for your various components.
This is very SIMP-specific and does not preclude you from using rsync however you like. However, if you want multi-environment support, you’ll need to replicate something like what we’ve done for your custom directories.
<IP_ADDRESS>. Why SIMP Uses Rsync¶
Rsync support was introduced in SIMP in the early days due to the fact that the Puppet native file synchronization mechanisms were relatively horrible at syncing large files (too much in memory) and large numbers of files in a directory tree (too many resources and system load).
Rsync neatly solves both of these issues and is present on all SIMP systems by default.
By default, SIMP wraps all rsync connections in an Stunnel connection to provide encrypted connections. Additionally, SIMP adds randomly generated passwords to sensitive shares to prevent unauthorized connections.
You can restrict this as far as necessary in your environment but the defaults should suit most needs.
<IP_ADDRESS>. Standard Capabilities¶
The standard SIMP rsync shares exist at /var/simp/environments/simp/rsync
.
This is an assumed path and changing this path will break some aspects of the
system.
Within this directory, you will find a set of files with the name .shares
.
This file is used by the fact simp_rsync_environments
to indicate that all
directories at the given location should be added as rsync shared directories.
The data structure in the simp_rsync_environments
is based on the lower
cased name of the containing directory. This means that there should
NEVER be two directories with the same name at the same level of the
directory hierarchy. In this case, the last one present alphabetically will
win.
As a concrete example, given the following directory structure:
var
└── simp
└── environments
└── simp
└── rsync
├── Global
│ ├── .shares
│ └── clamav
│ ├── main.cvd
│ ├── daily.cld
│ └── bytecode.cld
├── .rsync.facl
├── README
└── RedHat
├── Global
│ ├── freeradius
│ ├── .shares
│ ├── tftpboot
│ │ └── linux-install
│ │ └── README
│ ├── dhcpd
│ │ ├── dhcpd.conf
│ │ └── LICENSE
│ ├── snmp
│ │ ├── mibs
│ │ └── dlmod
│ └── apache
│ └── www
│ ├── cgi-bin
│ ├── error
│ │ └── include
│ ├── icons
│ │ └── small
│ └── html
├── 6
│ ├── bind_dns
│ │ └── LICENSE
│ └── .shares
└── 7
├── bind_dns
│ └── LICENSE
└── .shares
The following would be returned by the simp_rsync_environments
fact:
{
"simp": {
"id": "simp",
"rsync": {
"id": "rsync",
"global": {
"id": "Global",
"shares": [
"clamav"
]
},
"redhat": {
"id": "RedHat",
"6": {
"id": "6",
"shares": [
"bind_dns"
]
},
"7": {
"id": "7",
"shares": [
"bind_dns"
]
},
"global": {
"id": "Global",
"shares": [
"freeradius",
"tftpboot",
"dhcpd",
"snmp",
"apache"
]
}
}
}
}
}
Breaking this down, the following data is shown:
{
"downcased_directory_name": {
"id": "Original_Directory_Name",
"downcased_subdirectory_name": {
"id": "Original_Subdirectory_Name",
"shares": [
"Directory One",
"directory two"
]
}
}
}
Note
The presence of the .shares
file in the directory tree tells the
simp_rsync_environments
fact that all directories at that level are to
be exposed as shares in the returned data structure.
That said, it is up to your Puppet logic to actually expose them as such!
See the simp::server::rsync_shares
class to see how we do this for the
default rsync shares.
<IP_ADDRESS>. Supporting Additional Environments¶
Generally, in a SIMP environment, you are going to want to start with the directory structure that we have and simply copy the entire data structure to a directory with your custom name.
Warning
Be sure not to copy any sensitive information into the space!
For example, if you wanted to create the standard dev/test/prod structure, and
assuming that production
is already symlinked to simp
:
`bash
cd /var/simp/environments
cp -a simp dev
cp -a simp test
`
After this, you will now have an enhanced simp_rsync_environments
data
structure that holds all of the information for the dev
, test
,
production
, and simp
environments.
You can then manipulate the contents of the different environments to suit your needs.
Note
The contents of the various rsync directories are not under version control by default. While you may add them to a VCS of your choosing (SVN, Git, etc...), there may be some VERY large files present in these directories.
Make sure your system can handle the load before adding rsync content into a VCS!
<IP_ADDRESS>. Disabling Stunnel¶
If you decide to disable stunnel, you will need to specify your rsync server in Hiera, if it is not already specified.
Warning
If you disable stunnel, your data and any rsync access credentials will be passed in the clear!
---
simp_options::rsync::server: <rsync_server_fqdn>
Additionally, you will need to ensure your firewall is open on the rsync port. Include the following on the node acting as the rsync server.
class site::rsync_iptables (
Simplib::Netlist $allow = simplib::lookup('simp_options::trusted_nets'),
Simplib::Port $rsync_port = 873
){
iptables::listen::tcp_stateful { "rsync_shares":
trusted_nets => $allow,
dports => $rsync_port
}
}


Download Epsonnet Config 4 9 3
Configuring A Product Ip Address Using Epsonnet Config Ethernet
Epsonnet Config Download Configure The Network Interface Of Epson Printers
Epsonnet Config Download
Free Download Epsonnet Config
Configuring A Product Ip Address Using Epsonnet Config
Epson Net Config Revfasr
How To Crack Epsonnet Config
Https Download Epson Europe Com Pub Download 6337 Epson633795eu Pdf
Epson Workforce 633 Workforce Series All In Ones Printers Support Epson Us
Configuring Troubleshooting Epson Network Receipt Printers Pcs Help
Using Epsonnet Setup
How To Add A Epsonnet Print Port Youtube
Epson Workforce Wf 3640 Workforce Series All In Ones Printers Support Epson Us
Epson Enable Epos Np Retail Navipartner Learning Portal
How To Configure Your Epson Tm T20 Printer For A Static Ip Humble Till
Epson Netconfig Utility Download Youtube
Https Files Support Epson Com Docid Cpd5 Cpd55000 Pdf
Configuring A Product Ip Address Using Epsonnet Config Wifi
Https Files Support Epson Com Docid Cpd4 Cpd41038 Pdf
Epson Workforce Es 500w Es Series Scanners Support Epson Us
Using Epson S Net Config Software To Program An Ip Address Youtube
Epson Tm U220b
Https Files Support Epson Com Pdf Pos Bulk Tm T20ii Swum En 01 Pdf
Epson Net Config For Mac Viphosts S Blog


Toggle navigation
The Elicitation Game
Questions
Help
Admin
Edit/Create Variable
View Answers
Separated link
One more separated link
Google+ SignIn
Log out


Amazon CloudWatch Alarm MetricDataQuery
The
MetricDataQuery
property type specifies the metric data to return, and
whether this call is just retrieving a batch set of data for one metric, or is performing
a
math expression on metric data.
MetricDataQuery
is a property of the AWS::CloudWatch::Alarm resource type.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Expression" :
String
, "Id" :String
, "Label" :String
, "MetricStat" : MetricStat, "ReturnData" :Boolean
}
YAML
Expression:
String
Id:String
Label:String
MetricStat: MetricStat ReturnData:Boolean
Properties
Expression
-
The math expression to be performed on the returned data, if this structure is performing a math expression. For more information about metric math expressions, see Metric Math Syntax and Functions in the Amazon CloudWatch User Guide.
Within one MetricDataQuery structure, you must specify either
Expression
orMetricStat
, but not both.Required: No
Type: String
Length constraints: Minimum of 1. Maximum of 1024.
Update requires: No interruption
Id
-
A short name used to tie this structure to the results in the response. This name must be unique within a single call to
GetMetricData
. If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscore. The first character must be a lowercase letter.Required: Yes
Type: String
Length constraints: Minimum of 1. Maximum of 255.
Update requires: No interruption
Label
-
A human-readable label for this metric or expression. This is especially useful if this is an expression, so that you know what the value represents. If the metric or expression is shown in a CloudWatch dashboard widget, the label is shown. If
Label
is omitted, CloudWatch generates a default.Required: No
Type: String
Update requires: No interruption
MetricStat
-
The metric to be returned, along with statistics, period, and units. Use this parameter only if this structure is performing a data retrieval and not performing a math expression on the returned data.
Within one MetricDataQuery structure, you must specify either
Expression
orMetricStat
, but not both.Required: No
Type: MetricStat
Update requires: No interruption
ReturnData
-
Indicates whether to return the time stamps and raw data values of this metric. If you are performing this call just to do math expressions and do not also need the raw data returned, you can specify
False
. If you omit this, the default ofTrue
is used.Required: No
Type: Boolean
Update requires: No interruption
See Also
-
MetricDataQuery in the Amazon CloudWatch API Reference


Choose what you'd like to share
No screens or applications are currently available.
Screens
Applications


This is a Page Sub Title
Some content...
Demonstrating EM and STRONG
This text will have more importance (SEO-wise and contextually)
This text has visual importance but has no contextual or SEO importance
This is a very colloquial expression.
This is another section
This is some dummy content


FUN-O-TRONIX:
Event Date : 26/04/2013
Time : 6 pm- 7.30pm
Venue : TT238
Organizer : The Electronics Club(TEC)
Participant Count : 60
Speaker(s) Volunteers : Anshul Gupta , Kadari Harshini , Lavin Khandelwal,
Manali Shah , R.Mukundan , Shriya Agrawal.
Introduction
Fun-O-Tronix was a fun filled competition related to electronics conducted by TEC to show that even electronics can be interesting and to get more and more students interested in electronics. The event was conducted on 26 April 2013 at TT-205 from 1800 hrs to 2000 hrs. It was a team event with each team consisting of 2 members. It consisted of 2 rounds and the winners were declared on the aggregate scores of the 2 rounds.
EVENT DESCRIPTON :-
Round 1 – “ Who am I ”
In this round the participating teams were given a question paper consisting of 15 questions based on identification of basic electronic components on the basis of the clues provided. 10 teams qualified for the second round.
Round 2- “ Coordinated Circuits ”
In this round the two teammates were tied with a rope with two of them facing opposite directions and two tables were placed in front of each of them, one table had a circuit diagram and all associated components, while other had a breadboard. According to the setup only one participant can see the circuit and that person has to pick up a component and hand it over to the other participant explaining him/her where and how is that component supposed to be connected on breadboard. This round tested the component identifying and circuit making skills of the participant. The circuits thus made were evaluated on the basis of number of components correctly evaluated.
RESULTS:-
On the basis of the aggregate scores of the two rounds the team which came first was of Shubham Patel and Saurabh Kothari and the runners up team was of Vishwam Aggarwal and Ayush.
Feedback
The feedback in totality was very appreciating for the club. Participants liked the event and felt that it is one of a kind event and such events should be held more often. They also saw for the first time that electronics and fun are not polar opposites.


Before Change
"/api/node_info").json()
break
except requests.exceptions.ConnectionError:
if time.time() > start_time + 30:
raise Exception(
"Timed out while waiting for dashboard to start.")
assert node_info["error"] is None
assert node_info["result"] is not None
assert isinstance(node_info["timestamp"], float)
After Change
with open(
"{}/logs/dashboard.out".format(
addresses["session_dir"]), "r") as f:
out_log = f.read()
with open(
"{}/logs/dashboard.err".format(
addresses["session_dir"]), "r") as f:
error_log = f.read()


pass
def delete(self):
raise NotImplementedError("")
This involves purge => unbind => delete for the queue
and subsequent closing of our connection.
self._logger.info("Deleting RMQ %s",
str(self._queue))
with self._rmq_lock:
self._channel.queue_purge(self._queue, callback=self.on_purge_ok)


Mushrooms - P. cubensis & Unknown
[Erowid Note: The authors report suspicions that their mushroom chocolate has been adulterated. While this is possible, readers should be aware that the authors may simply have had an idiosyncratic response. There is no way to know if the mushroom chocolate in the report below was adulterated or not. The authors assertion that the adulterant was ketamine is unlikely, since oral ketamine has a quicker onset and shorter duration than described here.]
Mushrooms are extremely scarce in my region, so after having gone shroom-free for over a year, I was eager when the opportunity came about to purchase some. I was told by the dealer (a generally well-reputed chemist) that what I was being sold was a chocolate containing a five-gram extract of psilocybe cubensis. I was assured that they contained nothing else.
My husband and I split the five-gram chocolate in half, and I took my half about an hour before he took his, just after consuming an 8-ounce cup of coffee. The trip took a bit longer to set in than I expected, so I went for a walk. At about 45 minutes after my dose, I suddenly felt very short of breath and got back to my house as quickly as I could, just after my husband had already eaten his half of the chocolate.
My mind began racing with types of confusion that I wasn't accustomed to having with mushrooms. I felt simultaneously panicked and apathetic. I knew that something had gone very wrong, but the thoughts racing through my mind were like fast-paced reassurances.    I chain-smoked tobacco (something I rarely do), trying to keep myself grounded, and told myself it would be over soon, but on some level I was disturbed by my lack of panic. I remember thinking that I may have unknowingly poisoned myself and my husband, but I felt so strangely detached that this didn't bother me.
Typical mushroom hallucinations began at about 1.25 hours after the dose, but they were superimposed with an atypical fogginess. Everything seemed broken, artificial, and toxic. The bright colors I generally associated with mushrooms were not reassuring, but frightening. I felt like I was looking at a reflection of an old psilocybin trip, but not at a trip in itself. I was continuing to fight off an overpowering sense of nausea and apathetic dispair. I could see that my husband was beginning to struggle, too, at about this time. I told him sadly that I thought I had made a mistake in taking the chocolates and that I should have warned him that they were bad.
All the while, the voices in my mind were expressing peculiarly disturbing tautologies. The wall is blue because it's a blue wall. My hair is brown because it's brown.  I took bad drugs because I'm a drug user. I was unsettled by these thoughts, but felt drained and empty. I continued to sit, curled in a fetal position near my husband, who was also looking drained and disturbed, waiting for the trip to be over.
At about 2.5 hours into my trip (1.5 hours into his), my husband's shortness of breath became much more severe. It occured to me that he may have been on the brink of a severe allergic reaction to whatever we took, but I was still feeling so alarmingly apathetic that I couldn't bring myself to be panicked about this. His face started turning blue, so I handed him a bottle of B vitamins and a glass of water to slow, or hopefully stop, the trip. I took several of the vitamins myself in an attempt to regain my sense of emotional and intellectual presence.
I still couldn't bring myself to be worried, so I just watched him take the vitamins and massage his throat in an attempt to clear his passages. I felt like a child watching an adult and not fully understanding the gravity of a dangerous situation. I took my husband's hand and asked him if I needed to call an ambulance, and he told me through difficult breaths that he thought he'd be okay and that I shouldn't call anyone unless he stopped breathing. I felt guilty and disgusted with myself because I still couldn't conjur any real worry, even though I was aware that my husband's life may have been in danger.
My husband is epileptic, and I don't normally see his seizures as a reason to panic, although I help him out as needed. However, I still felt so empty that I I felt no emotion at all when he began convulsing a few minutes later (about 3 hours into my trip, 2 hours into his). I watched him with curiosity and a strange morbid fascination, knowing that I should be upset. I'm normally so intuitively tied to him that I can't keep my emotional slate blank while watching him struggle, but I still felt no emotional reaction to his convulsions, or to anything else.
His eyes seemed to be bulging from their sockets like frog eyes, and I could tell that he was unable to see me. I remember thinking, still with no emotional reaction, that he could be dying. I forced myself to remember how to call 911 and kept my phone closeby. I sat quietly and pensively, still chain-smoking uncharacteristically, waiting for him to feel better and trying to remember how long his seizures usually lasted. I attempted to check his pulse at one point (something I almost always do when he has seizures), but my sense of time and counting were severely morphed. I tried to count beats: one, fourteen, nine, twenty-two, eighty...? I felt--or rather tried to feel-- like I had done something terribly wrong by taking whatever drug I had taken. I knew I should be worried.
Eventually, at about 3 hours into my husband's trip and 4 hours into mine, the convulsions and shortness of breath stopped and the B-vitamins caught up to both of us. Although I slowly regained my stability over the next several hours, I kept a lingering feeling of emotional apathy that I did not want to have.  Over the next several days, we talked to some people who had bought the same batch of chocolates, and found out that they contained an unknown amount of ketamine and likely other substances, as well. Everyone we spoke to about the chocolates had a terrible experience with them.
For me, the trip was unpleasant in its lack of meaning and emotion, but for my husband, it could have been lethal. I hope that chemists, shamans, and dealers can all learn from this incident.
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.


Methods
-
$(either, parent) → {Array}
-
queryselector wrapper BOOK Listing 2-9, pp. 31-32
Parameters:
Name Type Description either
String | Parent a string selecting a DOM element, or the DOM element itself
parent
DOMElement (optional) if present, the starting point for running querySelector(). Otherwise, document.querySelector() is used
- Source:
Returns:
the recovered element
- Type
- Array
-
add(clsName)
-
add a class to a DOM element
Parameters:
Name Type Description clsName
String the name of the class to add to a DOMElemnt
- Source:
-
addChild(a)
-
add a child ScreenObject to an parent Object
Parameters:
Name Type Description a
Object child object, either Point, Line, Rect, Circle, Polygon
- Source:
-
addClassList()
-
add .classList if it is not present to specified DOM elements
- Source:
-
addEvent(elm, evt, callback, useCapture)
-
cross-browser addEventListener implemented here instead of polyfill
Parameters:
Name Type Description elm
DOMElement the HTML DOM element to bind event to
evt
EventType the type of event (a String)
callback
function the callback function
useCapture
Boolean (if true, capture in capturing phase (default is false, use bubbling phase)
- Source:
-
addFns(program)
-
add common methods to convert a geometry primitive , (Point, Line, Rect, Circle) into a ScreenObject (ScreenPoint, ScreenLine, ScreenCircle, ScreenPoly, ScreenImage, ScreenSprite). Methods are typically called as from the object, rather than globally from this library, which keeps 'this' working correctly. Use the JS .apply for methods calling each other in the object context
Parameters:
Name Type Description program
Object object
- Source:
-
addToDisplayList(obj, layer)
-
add an object to the visual display list
Parameters:
Name Type Description obj
Point | Line | Rect | Circle | Polygon | ScreenSprite the object to draw
layer
LAYERS (optional) the layer to draw in
- Source:
-
addToUpdateList(obj, panel) → {Boolean}
-
add an object to the visual display list
Parameters:
Name Type Description obj
Point | Line | Rect | Circle | Polygon | ScreenSprite the object to draw
panel
PANELS (optional) the panel where the object is drawn by display
- Source:
Returns:
if added, return true, else false
- Type
- Boolean
-
bind(elm, evt, callback)
-
bind an event to a DOM element
Parameters:
Name Type Description elm
DOMElement | String a DOM object, or an id for an element
evt
EventType type of event
callback
function callback to execute when event raised
- Source:
-
buildingSelected(pt) → {Building|false}
-
stats for a selected Point (e.g. from a mouseclick)
Parameters:
Name Type Description pt
Point the point of the user selection (mouse, touch)
- Source:
Returns:
if selected, return a reference to the Building, otherwise false
- Type
- Building | false
-
buildWorld()
-
build the world structure, adding visible items to the elefart.screens displayList
- Source:
-
canRun() → {Boolean}
-
determine if the web browser can run the app use feature detection, with device detection on as necessary Required features
- HTML5 Canvas API
- HTML5 Canvas Text API
- Source:
Returns:
if can run, return true, else false
- Type
- Boolean
-
canvasToPNG()
-
convert HTML5 canvas bitmap to PNG image
- Source:
-
centerRectInRect(centerRect) → {Boolean}
-
center a rect so it is inside, or surrounds an other Rect
Parameters:
Name Type Description centerRect
Rect the Rect to center the first rect onto, Subce ' our geometric objects are extensions of Rect, most can be used as a Rect object, so centerRect may actually be an ScreenObject.
- Source:
Returns:
if centered, return true, else false
- Type
- Boolean
-
centerX(obj)
-
center an Rect-type object inside this object along the x axis.
Parameters:
Name Type Description obj
ScreenObject the object to be centered along its x axis
- Source:
-
centerY(obj)
-
center an Rect-type object inside this object along the y axis.
Parameters:
Name Type Description obj
ScreenObject the object to be centered along its x axis
- Source:
-
changeDisplayList()
-
move an object from oneDisplayList to another
- Source:
-
checkIfInLayer(obj, layer) → {Number|false}
-
check if an object is in a specific layer in the display list
Parameters:
Name Type Description obj
Object the object to check
layer
LAYERS the LAYERS enum to check
- Source:
Returns:
if found, return the index, else false
- Type
- Number | false
-
checkIfInList(obj) → {Object|false}
-
check if an object is already in the drawing list if present, return its position in the array
Parameters:
Name Type Description obj
Object the object to draw
- Source:
Returns:
if found, return its layer and index in layer otherwise return false
- Type
- Object | false
-
clampVal(min, max) → {Number}
-
clamp a value between a minimum and maximum value, including the mininum and maximum values.
Parameters:
Name Type Description min
Number minimum value
max
Number maximum Value
- Source:
Returns:
the clamped value
- Type
- Number
-
clone(incoming) → {Object}
-
clone a JS object, requires JSON
Parameters:
Name Type Description incoming
Object object
- Source:
Returns:
the copied object
- Type
- Object
-
contains(clsName)
-
check if a DOMElement contains a class attribute
Parameters:
Name Type Description clsName
String the name of the class to check for
- Source:
-
CSSBreak()
-
tests in (mostly) cross-compatible way for screen size, https://gist.github.com/nzakas/08602e7d2ee448be834c
- Source:
-
cubicIn(t) → {Number}
-
compute easing animation with cubic calculation.
Parameters:
Name Type Description t
Number an interval number between 0 (start) and 1 (end) of the animation
- Source:
Returns:
the adjusted easing in value
- Type
- Number
-
cubicOut(t) → {Number}
-
compute easing out animation with cubic calculation.
Parameters:
Name Type Description t
Number an interval number between 0 (start) and 1 (end) of the animation
- Source:
Returns:
the adjusted easing out value
- Type
- Number
-
DisplayList()
-
create a new DisplayList
- Source:
-
drawBackground()
-
draw the background for a game in an underlying canvas layer
- some building layers including the Sky and Walls
- additional background objects
- Source:
-
drawCircle(ctx, the)
-
draw a circle with a specific stroke and fill
Parameters:
Name Type Description ctx
CanvasContext current drawing context
the
ScreenObject ScreenObject (type ScreenCircle) to draw
- Source:
-
drawCloud(ctx, the)
-
draw a ScreenCloud object
Parameters:
Name Type Description ctx
CanvasContext the current drawing context
the
ScreenObject ScreenObject to draw
- Source:
-
drawControls()
-
draw the controls for the display
- Source:
-
drawFail()
-
if we can't run HTML5 canvas, put up an error and exit screen for the user
- Source:
-
drawForeground()
-
draw the foreground for the display, including Elevators, ElevatorShafts, People
- Source:
-
drawImage(ctx, the)
-
draw an image at a specific location in the canvas
Parameters:
Name Type Description ctx
CanvasContext the current drawing context
the
ScreenObject ScreenObject (type ScreenImage) to draw
- Source:
-
drawLayer(ctx, layer)
-
draw a layer into one of the canvas panels, after completely clearing the overall canvas panel Rect onscreen. layers are drawn bottom to top.
Parameters:
Name Type Description ctx
the image context
layer
Array.<Object> a layer with objects to be drawn
- Source:
-
drawLine(ctx, obj)
-
draw a line with a stroke (no fill)
Parameters:
Name Type Description ctx
CanvasContext the current drawing context
obj
ScreenObject the ScreenObject (type ScreenLine) to draw
- Source:
-
drawPoint(ctx, the)
-
draw a Point as a tiny Circle
Parameters:
Name Type Description ctx
CanvasContext the current drawing context
the
ScreenObject ScreenObject (type ScreenPoint) to draw
- Source:
-
drawPolygon(ctx, obj)
-
draw a closed Polygon
Parameters:
Name Type Description ctx
CanvasContext the canvas context to use
obj
ScreenObject the ScreenObject (type ScreenPoly} to draw
- Source:
-
drawRect(ctx, the)
-
draw a square rectangle with stroke and fill. ScreenRects are drawn with this method if their borderRadius == 0.
Parameters:
Name Type Description ctx
CanvasContext the current drawing context
the
ScreenObject ScreenObject (ScreenRect) to draw
- Source:
-
drawRects(ctx, obj)
-
draw square Rects, rounded Rects, Box Rects (one side open)
Parameters:
Name Type Description ctx
CanvasContext the current drawing context
obj
ScreenObject the ScreenObject (type ScreenLine) to draw
- Source:
-
drawRoundedBox(ctx, the)
-
draw a rounded-corner Rect with one side missing.
Parameters:
Name Type Description ctx
CanvasContext current drawing context
the
ScreenObject ScreenObject (type ScreenRect) to draw
- Source:
-
drawRoundedRect(ctx, the)
-
since rounded rects aren't part of the HTML5 spec, create one as a polygon with arcs forming the rounded corners. ScreenRect is drawn with this method if obj.borderRadius > 0.
Parameters:
Name Type Description ctx
CanvasContext current drawing context
the
ScreenObject ScreenObject (type ScreenRect) to draw
- Source:
-
drawText(ctx, the)
-
draw text into the Canvas
Parameters:
Name Type Description ctx
CanvasContext current drawing context
the
ScreenObject ScreenObject (type ScreenSprite) to draw
- Source:
-
eraseDrawLayer(ctx, layer)
-
draw a layer without erasing the whole canvas, just erase individual objects with their 'dirty' bit set, and redraw. Provides a crude draw region clipping function (can't use with layers that have overlapping objects) to improve performance for dynamic (non-image) objects.
Parameters:
Name Type Description ctx
the image context
layer
Array.<Object> a layer with objects to be drawn
- Source:
-
eraseForeground()
-
erase any foreground objects with dirty bits set
- Source:
-
eraseObject(ctx, the)
-
set the current DrawingContext to erase the object instead of drawing it. Generic, works for all ScreenObjects.
Parameters:
Name Type Description ctx
CanvasContext the current drawing context
the
ScreenObject screenObject to erase
- Source:
-
findChild(childId, recurse, res) → {Object|false}
-
find a ScreenObject child by its id
Parameters:
Name Type Description childId
Number the id of the object
recurse
Boolean if true, recurse through all descendant child objects, else just the local children to this ScreenObject.
res
Object | undefined a carry-through object to handle recursion (internally applied by function)
- Source:
Returns:
if OK, return an object, else false
- Type
- Object | false
-
fixScreen()
-
initial fixes of Android and iOS so they behave more like native apps and less like a browser window HTML5 Games BOOK: Listing 3-26, p. 71
- Source:
-
floorInQueue(floor) → {Number}
-
find a BuildingFloor by its floorNumber or with the BuildingFloor object itself
Parameters:
Name Type Description floor
ElevatorFloor | Number the ElevatorFloor, or its floorNumber.
- Source:
Returns:
if the ElevatorFloor is in the elevatorQueue, return its index in the queue, else return NO_FLOOR constant.
- Type
- Number
-
gameLoop()
-
regular updates (e.g. screen redraws)
- Source:
-
getBackgroundCanvas()
-
get a reference to the foreground canvas
- Source:
-
getBackgroundTexture(material) → {CanvasGradient}
-
create and/or get a specific background gradient. Gradients are identified by their MATERIALS naming.
Parameters:
Name Type Description material
MATERIALS the gradient to use
- Source:
Returns:
the CanvasGradient reference
- Type
- CanvasGradient
-
getBottom() → {Number}
-
get the bottom (y value) of the object's enclosing Rect
- Source:
Returns:
the bottom of the enclosing Rect
- Type
- Number
-
getBuilding() → {Building|false}
-
return the Building object
- Source:
Returns:
- Type
- Building | false
-
getByClassName()
-
wrapper for Sizzle providing equivalent functionality to getElementsByClassName for non-supporting browsers
- Source:
-
getCenter() → {Point|false}
-
get the center of an ScreenObject
- Source:
Returns:
the center point, or false
- Type
- Point | false
-
getChildByType(type, recurse, index, val) → {Array.<ScreenObject>}
-
given a type, find objects in the building, with optional recursive action.
Parameters:
Name Type Description type
String the type
recurse
Boolean (optional) if true, recurse through all children
index
Number | String (optional) object property name
val
Number | String (optional) value in property of Building object
- Source:
Returns:
if found, get the object(s) in an array
- Type
- Array.<ScreenObject>
-
getCircleLineIntersectionPoint(pointA, pointB, circle, circle) → {Array.<Point>}
-
given a line an a circle, return intersections. Used to compute rounding of corners in polygon by finding the 'shrink' point the line needs to go to to accomodate the arc
Parameters:
Name Type Description pointA
Point starting Point of line
pointB
Point ending point of line
circle
Point center
circle
Number radius
- Source:
Returns:
returns one or two Points for the intersection of a Line with the circle.
- Type
- Array.<Point>
-
getControlCanvas()
-
get a reference to the control canvas
- Source:
-
getControlTexture(material) → {CanvasGradient}
-
create and/or get a specific background gradient. Gradients are identified by their MATERIALS naming.
Parameters:
Name Type Description material
MATERIALS the gradient to use
- Source:
Returns:
the CanvasGradient reference
- Type
- CanvasGradient
-
getCSSBreakpoint() → {String|false}
-
read the current CSS breakpoint from the CSS. Allows JS to respond to events in CSS (e.g., responsive design changes). The function returns the value inserted in the before: pseudo-query in the CSS file, typically named screen or device breakpoints ('cellphone', 'tablet', 'desktop') CSS code: body:before { content: 'iphone'; display: none; } this should be added to each breakpoint. this function will read the content: value
- Source:
Returns:
if there is a new breakpoint, return its name as defined in the body:before element (invisible), otherwise return false if we are in the same CSS breakpoint.
- Type
- String | false
-
getCSSvalues(breakPt) → {Object|false}
-
get the CSS values from an incoming JSON string. Expect the following format: {"name":"smartphone","floors":"5","shafts":"4"}. NOTE: the incoming CSS string (from elefart.display.getCSSBreakpoint()) may have appended quotes, which are removed by a regular expression
Parameters:
Name Type Description breakPt
String the JSON string
- Source:
Returns:
if a valid JSON string, return the object, else false
- Type
- Object | false
-
getElement(el) → {DOMElement|false}
-
return an element, either itself or by its id string
Parameters:
Name Type Description el
DOMElement | String either a DOM element or an id="xxx" string
- Source:
Returns:
if found, return element, else false
- Type
- DOMElement | false
-
getEnclosingRect(pts) → {Rect}
-
type POLYGON specific. Find the rect which encloses the set of points
Parameters:
Name Type Description pts
Array.<Point> an array Points
- Source:
Returns:
- Type
- Rect
-
getFilteredImage(img, the, varArgs) → {HTMLImageElement}
-
get a filtered image as a new JS image object
Parameters:
Name Type Description img
HTMLImageElement the image object
the
function filtering function
varArgs
Array additional arguments for the filter, if needed
- Source:
Returns:
image with its pixel data filtered
- Type
- HTMLImageElement
-
getForegroundCanvas()
-
get a reference to the foreground canvas
- Source:
-
getForegroundTexture(material) → {CanvasGradient}
-
create and/or get a specific background gradient. Gradients are identified by their MATERIALS naming.
Parameters:
Name Type Description material
MATERIALS the gradient to use
- Source:
Returns:
the CanvasGradient reference
- Type
- CanvasGradient
-
getFPS() → {Number}
-
get the smoothed (10 values) framerate of the application NOTE: for speed, uses 'hack' rounding instead of Math.round
- Source:
Returns:
frames per second, measured in last gameLoop
- Type
- Number
-
getGameRect() → {DOMRect}
-
get the current dimensions of the game NOTE: have to fire it when the screen size changes!
- Source:
Returns:
a DOMRect {left:0, top:0, right:0, bottom:0, width:0, height:0}
- Type
- DOMRect
-
getHeight() → {Number}
-
get the height of the object's enclosing Rect
- Source:
Returns:
the height of the enclosing Rect
- Type
- Number
-
getId()
-
get a unique Id for ScreenObjects
- Source:
-
getInitedArray(n, default) → {Array.<defaultValue>}
-
create an array of defined length, and fill with default values
Parameters:
Name Type Description n
Number length of array
default
* the value to put into each element of the array
- Source:
Returns:
an Array, initialized to the right length and default values
- Type
- Array.<defaultValue>
-
getLeft() → {Number}
-
get the left (s value) of the object's enclosing Rect
- Source:
Returns:
the left of the enclosing Rect
- Type
- Number
-
getLocalPlayer actively ask the Building for the current local Player()
-
- Source:
-
getPanel get the panel a particular DisplayList is assigned to()
-
- Source:
-
getRandomArrVal(arr) → {Object|false}
-
returns a random element from an array.
Parameters:
Name Type Description arr
Array the array to sample from
- Source:
Returns:
the object stored at the array position
- Type
- Object | false
-
getRandomInt(min, max) → {Number}
-
returns a random int between min (inclusive) and max (inclusive).
Parameters:
Name Type Description min
Number lower bound (included in returned values)
max
Number upper bound (included in returned values)
- Source:
Returns:
a random integer >= min <= max
- Type
- Number
-
getRandomPoints(r, num) → {Array.<Point>}
-
returns one or more random Points within an enclosing Rect bounds.
Parameters:
Name Type Description r
Rect the Rect where the Points should be generated
num
Number the number of Points to generate.
- Source:
Returns:
an array of random Points in the enclosing Rect
- Type
- Array.<Point>
-
getRGB(the) → {Array|false}
-
get the RGB values form an RGB or #rrggbb or #rgb color
Parameters:
Name Type Description the
String RGB string
- Source:
Returns:
an array with the r = array[0], g = array[1], b = array[2], or false if the string can't be parsed
- Type
- Array | false
-
getRGBAFromRGB(rgb, opacity) → {String}
-
Parameters:
Name Type Description rgb
String | Array either an Array with r, g, b values, or an rgb()
opacity
Number the opacity to set the string at
- Source:
Returns:
an rgba() string with the opacity
- Type
- String
-
getRight() → {Number}
-
get the right (x value) of the object's enclosing Rect
- Source:
Returns:
the right of the enclosing Rect
- Type
- Number
-
getShaftByCoord(x) → {ScreenObject|false}
-
get an elevator shaft by its x coordinate
Parameters:
Name Type Description x
Number the x coordinate, absolute
- Source:
Returns:
- Type
- ScreenObject | false
-
getTop() → {Number}
-
get the top (y value) of the object's enclosing Rect
- Source:
Returns:
the top of the object's enclosing Rect
- Type
- Number
-
getWidth() → {Number|false}
-
get the width of the object's enclosing Rect
- Source:
Returns:
the width of the enclosng Rect, else false
- Type
- Number | false
-
getWorld() → {World|false}
-
return the World object
- Source:
Returns:
- Type
- World | false
-
getX() → {Number}
-
get the x coordinate of any ScreenObject
- Source:
Returns:
the x coordinate of the top-left of the ScreenObject's enclosing Rect
- Type
- Number
-
getY() → {Number|false}
-
get the y coordinate of any ScreenObject
- Source:
Returns:
the y coordinate of the top-left of the ScreenObject's enclosing Rect
- Type
- Number | false
-
handleKeypress(keyCode)
-
branch program execution based on the key pressed by a user.
Parameters:
Name Type Description keyCode
Number the keycode returned by the event handler.
- Source:
-
handleResize()
-
handling a change in the window size. Elefart.display has a function that, when the window is resized, checks if it has changed the css breakpoint listed in the css file. If so, it returns a name for the breakpoint, encoded in the body:before invisible body:before element set up in the css for each breakpoint as JSON, e.g., '{"name":"featurephone1","floors":"3","shafts":"3"}' NOTE: the listed test strings in the switch() statement below MUST match those in the CSS file for this function to work
- Source:
-
handleTouchPoint(touchPoint)
-
branch program execution based on a user swipe or touch on a touch-sensitive screen.
Parameters:
Name Type Description touchPoint
Object a JS objec with the x and y coordinates of the touch.
- Source:
-
init about-screen()
-
initialize help files for the game.
- Source:
-
init building()
-
initialize the building used in the game.
- Source:
-
init controller()
-
initialize the controller, including event handlers. Requires access to elefart.dom.
- Source:
-
init dashboard()
-
initialize user controls for the game on the canvas.
- Source:
-
init display()
-
initialize the HTML5 canvas display.
- Source:
-
init dom()
-
initialize the DOM interface for the game.
- Source:
-
init elefart()
-
initialize the entire game app
- Source:
-
init exit-screen()
-
initialize the exit dialog for the game.
- Source:
-
init factory()
-
initialize the display object used by the game to draw to HTML5 canvas.
- Source:
-
init game-screen()
-
initialize the game screen
- Source:
-
init install-screen()
-
initialize the installation screen for iOS and other platforms so that an icon can be copied to a desktop.
- Source:
-
init join-screen()
-
initialize the multi-user version of the game
- Source:
-
init menu-screen()
-
get elefart.screens['screen-menu']
- Source:
-
init scores-screen()
-
initialize elefart.screens['screen-scores']
- Source:
-
init splash-screen()
-
bind mouseclick to elefart.screens['screen-splash']
- Source:
-
initUpdateList()
-
initialize the update list for the application
- Source:
-
intersectRect() → {Rect}
-
determine if an object intersets a Rect at all MUCH SIMPLER than generalized collision detection
- Source:
Returns:
-
if intersect, return a Rect with the collision sides listed with a 1, non-colliding sides = 0
- Type
- Rect
-
if collided, return true, else false
- Type
- Boolean
-
isArray(object) → {Boolean}
-
confirm an object is an Array
Parameters:
Name Type Description object
Object to test
- Source:
Returns:
if an Array, return true, else false
- Type
- Boolean
-
isCanvasGradient(object) → {Boolean}
-
confirm an object is an HTML5 Canvas gradient object
Parameters:
Name Type Description object
Object to test
- Source:
Returns:
if HTML5CanvasGradient return true, else false
- Type
- Boolean
-
isElementVisible(elm) → {Boolean}
-
confirm an element is visible onscreen
Parameters:
Name Type Description elm
DOMElement the DOM element we are testing
- Source:
Returns:
if visible, return true, else false
- Type
- Boolean
-
isFunction(object) → {Boolean}
-
confirm an object is a Function
Parameters:
Name Type Description object
Object to test
- Source:
Returns:
if an Function, return true, else false
- Type
- Boolean
-
isImage(object) → {Boolean}
-
confirm an object is a JS Image
Parameters:
Name Type Description object
Object to test
- Source:
Returns:
if a Image, return true, else false
- Type
- Boolean
-
isNumber(obj) → {Boolean}
-
confirm an object is a Mumber
Parameters:
Name Type Description obj
Object the object to test
- Source:
Returns:
if a number, return true, else false
- Type
- Boolean
-
isRGB(str) → {Boolean}
-
confirm a string is valid rgb or #rrggbb or #rgb color, or an HTML5 CanvasContext gradient.
Parameters:
Name Type Description str
String the color string
- Source:
Returns:
if valid color, return true, else false
- Type
- Boolean
-
isString(object) → {Boolean}
-
confirm an object is a String
Parameters:
Name Type Description object
Object to test
- Source:
Returns:
if a String, return true, else false
- Type
- Boolean
-
mobileParams()
-
test for the mobile device and OS being used. Creates an object which the device type listing. This requies some user-agent sniffing, and should be compliemented by feature detection in the browser.
- Source:
-
move(dx, dy, recurse) → {Boolean}
-
move an object, optionally move children
Parameters:
Name Type Description dx
Number change in x position
dy
Number change in y position
recurse
Boolean if true, move children the same distance
- Source:
Returns:
if moved, return true, else false
- Type
- Boolean
-
movePointAlongLine(pt1, pt2, radius) → {Point}
-
use this to "back points" down or up a line so a rounded connector can be drawn
Parameters:
Name Type Description pt1
Point start of line
pt2
Point end of line
radius
Number how far to move back down line
- Source:
Returns:
new Point, backed down line
- Type
- Point
-
moveTo(x, y, recurse) → {Boolean}
-
move an object to a specific coordinate
Parameters:
Name Type Description x
Number new x position
y
Number new y position
recurse
Boolean if true, move children the same distance
- Source:
Returns:
if moved, return true, else false
- Type
- Boolean
-
pointInside(pt) → {Boolean}
-
determine if a point is inside or outside Rect
Parameters:
Name Type Description pt
Point the point to test
- Source:
Returns:
if not in rect, false, else true
- Type
- Boolean
-
preload()
-
start game images loading before other JS libraries and initialization. Ensures that images are immediately available when the game starts.
- Source:
-
ptInside(pt, rect) → {Boolean}
-
non "this" test for Point inside Rect, use when "this" would cause problems in scope
Parameters:
Name Type Description pt
Point the Point
rect
Rect the Rect
- Source:
Returns:
if Point inside Rect, return true, else false
- Type
- Boolean
-
readout(the)
-
Parameters:
Name Type Description the
Object JS object
- Source:
-
rectCenterOnPoint(centerPt, recurse) → {Boolean}
-
center a Rect on a Point
Parameters:
Name Type Description centerPt
Point the point to use
recurse
Boolean if true, center children as well, otherwise just move the chidren with their newly centered parent
- Source:
Returns:
if centered, return true, else false
- Type
- Boolean
-
rectInRect(rect) → {Boolean}
-
determine if this object is completely inside rect2
Parameters:
Name Type Description rect
Rect the outer rect
- Source:
Returns:
if inside, return true, else false
- Type
- Boolean
-
remove(clsName)
-
remove a class
Parameters:
Name Type Description clsName
String the class to remove from a DOMElement
- Source:
-
remove(elm, evt, callback)
-
remove event listener or listeners
Parameters:
Name Type Description elm
DOMElement | String a DOM object, or an id for an element
evt
EventType type of event
callback
function callback to execute when event raised
- Source:
-
removeChild(child) → {Object|false}
-
remove a child ScreenObject by its id, also removing it from the displayList (elefart-display) and updateList (elefart-controller).
Parameters:
Name Type Description child
Number | ScreenObject the id of the object, or the actual object. If the object is passed, the method checks for an Id value and proceeds.
- Source:
Returns:
if ok, return the removed child, else false
- Type
- Object | false
-
removeEvent(elm, evt, callback, useCapture)
-
remove an event
Parameters:
Name Type Description elm
DOMElement the HTML DOM element to remove event from
evt
EventType the type of event (a String)
callback
function the callback function
useCapture
Boolean (if true, capture in capturing phase (default is false, use bubbling phase)
- Source:
-
removeFloorFromQueue(a) → {BuildingFloor|null}
-
remove an ElevatorFloor from the Elevator elevatorQueue
Parameters:
Name Type Description a
BuildingFloor | Number BuildingFloor, or its floor number
- Source:
Returns:
the BuildingFloor number, or nothing
- Type
- BuildingFloor | null
-
removeFromDisplayList(obj, layer)
-
remove an object from drawing display list
Parameters:
Name Type Description obj
Point | Line | Rect | Circle | Polygon | ScreenSprite the object to draw
layer
LAYERS (optional) the display list layer to draw in (optional)
- Source:
-
removeFromLists()
-
allows a ScreenObject to remove itself from all Lists (elefart.display and elefart.controller update lists)
- Source:
-
removeFromUpdateList(obj, panel) → {Boolean}
-
remove an object from drawing display list. By default, it is non-recursive.
Parameters:
Name Type Description obj
Point | Line | Rect | Circle | Polygon | ScreenSprite the object to draw
panel
PANELS (optional) the display list panel to draw in (optional)
- Source:
Returns:
if removed, else false;
- Type
- Boolean
-
removeGameHandlers(gameCanvas)
-
remove the game event handlers to improve efficiency
Parameters:
Name Type Description gameCanvas
Canvas the HTML5 Canvas object
- Source:
-
run about-screen()
-
show help files for the game.
- Source:
-
run building()
-
activate the building for display and updating in the game.
- Source:
-
run controller()
-
run the controller, starting event handlers for the active game canvas.
- Source:
-
run dashboard()
-
enable user controls during the active game.
- Source:
-
run display()
-
turn on the game canvas so it can be drawn to.
- Source:
-
run dom()
-
activate the DOM interface for the game.
- Source:
-
run elefart()
-
run the Elefart application
- Source:
-
run exit-screen()
-
show the exit dialog for the game.
- Source:
-
run factory()
-
begin drawing the active game, drawing current state into HTML5 canvas
- Source:
-
run game-screen()
-
show the correct screen in the active game.
- Source:
-
run install-screen()
-
show the install screen for adding the game icon to the desktop.
- Source:
-
run join-screen()
-
show the form allowing remote users to join the game.
- Source:
-
run menu-screen()
-
set up elefart.screens['screen-menu'] to show options in the game.
- Source:
-
run scores-screen()
-
set up elefart.screens['screen-scores'] for display
- Source:
-
run splash-screen()
-
show the splash screen captured by elefart.screens['screen-splash']
- Source:
-
scale(scaleX, scaleY, recurse) → {Boolean}
-
floating-point scale an ScreenObject's size, while while returnng integer values
Parameters:
Name Type Description scaleX
Number the x scale value. 1.0 = no change
scaleY
Number the y scale value. 1.0 = no change
recurse
Boolean if true, scale child objects
- Source:
Returns:
if set, return true, else false
- Type
- Boolean
-
screenParams(os) → {Boolean|UNKNOWN}
-
determine if in standalone mode. HTML5 Games Listing 3-19, p. 65 IE pinning
Parameters:
Name Type Description os
Enum - Source:
Returns:
if true or false, return, else return UNKNOWN (-1)
- Type
- Boolean | UNKNOWN
-
ScreenPoly(a, strokeWidth, strokeStyle, fillStyle, layer, src, callback, closed) → {ScreenPoly|false}
-
Parameters:
Name Type Description a
Array.<Point> set of Point objects with x and y coordinates for the sides of the Polygon.
strokeWidth
Number the width of the stroke around the ScreenRect
strokeStyle
COLORS | CanvasGradient the color (rgb or hex) for the stroke, written as a string, e.g. 'rgb(4,3,3)' or #ddccdd, or an HTML5 Canvas gradient object
fillStyle
COLORS | CanvasGradient the color (rgb or hex) for the stroke, written as a string, e.g. 'rgb(4,3,3)' or #ddccdd, or an HTML5 Canvas gradient object
layer
Number the layer for elefart.display to draw the object into.
src
HTMLImageElement (optional) if present, add a reference to a JS image object to draw over the ScreenRect fill
callback
function (optional) function for callback
closed
Boolean (optional) if true, close the polygon, else false
- Source:
Returns:
if ok, return ScreenPoly object, else false
- Type
- ScreenPoly | false
-
setBorderRadius(borderRadius) → {Boolean}
-
set rounded Rect, in current version all cornder has the same rounding
Parameters:
Name Type Description borderRadius
Number the border radious
- Source:
Returns:
if success, return true, else false
- Type
- Boolean
-
setDimensions(breakPt)
-
(re) set the dimensions of the building using CSS media breakpoints defined in css file called by Elefart.controller.handleResize(). If the user resizes the screen and a new CSS breakpoint is crossed, the entire building redraws to adjust. The dimensions of key elements (e.g. elevators and shafts) are changed in the DISPLAY {} lists of this object. Redefines occur in:
- DIMENSIONS[BUILDING_TYPES.ELEVATOR_SHAFT]
- DIMENSIONS[BUILDING_TYPES.BUILDING_FLOOR] NOTE: dimensions are set for min-width and max-width CSS breakpoints. The setFloors() function adjusts for very elongated portrait displays (e.g. Kindle Fire).
Parameters:
Name Type Description breakPt
String | false a string matching a string added to the body:before element in the CSS file, e.g. body:before { content: 'iphone'; display: none; }
- Source:
-
setDimensions(width, height) → {Boolean}
-
set width and height of a ScreenObject. Internal variables are NOT private, but should be set using setters attached to ScreenObject
Parameters:
Name Type Description width
Number new width
height
Number new height
- Source:
Returns:
if set, return true, else false
- Type
- Boolean
-
setFill(color, blendColor) → {Boolean}
-
set the fill color for a ScreenObject
Parameters:
Name Type Description color
String the rgb() or #rrggbb or #rgb color or CanvasGradient
blendColor
String (optional) the rgb(), rgba(), #rrggbb or #rgb or CanvasGradient
- Source:
Returns:
if ok, return true, else false
- Type
- Boolean
-
setFilter(filter) → {Boolean}
-
set a filter on an ScreenObject image, if it exists
Parameters:
Name Type Description filter
function the filtering function (expects pixel data)
- Source:
Returns:
if ok, return true, else false
- Type
- Boolean
-
setFloors()
-
adjusts for portraits with narrow width and big height (e.g. Kindle). CSS sets a standard width and height in the setDimensions() function, but if the display is very long, this routine adds a few floors
- Source:
-
setGameHandlers(gameCanvas)
-
set the event handlers for the active game HTML5 canvas
Parameters:
Name Type Description gameCanvas
Canvas the HTML5 Canvas object
- Source:
-
setGameRect()
-
set the size of the overall game via the enclosng DOM element the HTML5 Canvas object is attached to.
- Source:
-
setGradient(grad) → {Boolean}
-
set an HTML5 canvas gradient object for a ScreenObject
Parameters:
Name Type Description grad
CanvasGradient gradient from canvas.getContext()
- Source:
Returns:
if ok, return true, else false
- Type
- Boolean
-
setImage(src, callback, scaleToRect, opacity) → {Boolean}
-
replace background fill with image pixels in a Screen Object. Includes a callback for images that are dynamically loaded
Parameters:
Name Type Description src
String the file path to the image. If an existing JS Image object is passed, it is used as is.
callback
function function after the image is loaded
scaleToRect
Boolean if true, scale the image to the defined Rect object inside this object
opacity
Number (optional) if present, draw the image at a different opacity than its parent object
- Source:
Returns:
if ok, return true, else false
- Type
- Boolean
-
setLayer(layer) → {Boolean}
-
set the layer in which the ScreenObject is drawn by elefart.display
Parameters:
Name Type Description layer
LAYERS the layer to draw in. Layers are defined in elefart.display.LAYERS
- Source:
Returns:
if ok, return true, else false
- Type
- Boolean
-
setLocalPlayer() → {Boolean}
-
set the local Player when the World re-inits, necessary since otherwise we retain a link to the earlier World (the "localPlayer" reference keeps the entire earlier World from going out of scope). Called by building.buildWorld().
- Source:
Returns:
if ok, return true, else, false
- Type
- Boolean
-
setOpacity(opacity, (optional), (optiona)) → {Boolean}
-
set the opacity of a ScreenObject
Parameters:
Name Type Description opacity
Number the opacity of the object
(optional)
Number imageOpacity the opacity of an image fill, if present
(optiona)
Number if a blend color is present, its opacity
- Source:
Returns:
if ok, return true, else false
- Type
- Boolean
-
setSpriteCoords(coordsObj) → {Boolean}
-
given an image, set coordinates for timelines (rows) and individual image subframes to draw (columns) in an JS Image creates a coordinate object with: -rows: rows in sprite -cols: columns in sprite -currRow: the current row in the sprite being drawn -currCol: the current column in teh sprite being drawn -cellWidth: the width of a sprite frame in pixels -cellHeight: the height of a sprite frame in pixels -getCellRect: function returning a Rect with coordinates for canvas drawing -nextCellRect: function returning the next frame in the animation
Parameters:
Name Type Description coordsObj
Object a coordinate object with row and column data
- { rows:Number, cols:Number } defining individual frames of a Sprite
- Source:
Returns:
if coordinates OK, return true, else false
- Type
- Boolean
-
setStroke(width, color) → {Boolean}
-
set the stroke around an ScreenObject
Parameters:
Name Type Description width
Number the width of the stroke in pixels
color
String (optional) rgb() or #rrggbb or #rgb color string
- Source:
Returns:
if ok, return true, else false
- Type
- Boolean
-
setText(font, text) → {Boolean}
-
set the text font, size and characters.
Parameters:
Name Type Description font
String a string containing HTML5 canvas-compatible text descriptor, e.g., "12pt Georgia". ScreenRect is expanded based on length of text (no word wrap or scrolling)
text
String the text to display
- Source:
Returns:
if ok, return true, else false
- Type
- Boolean
-
shaftFloorSelected(pt) → {Object}
-
stats for a selected Point (e.g. from a mouseclick)
Parameters:
Name Type Description pt
Point the point of the user selection (mouse, touch)
- Source:
Returns:
object containing shaft and floor selected, or false for one or both.
- Type
- Object
-
showError(msg, fnFlag) → {String}
-
show the error, try to trace caller function
Parameters:
Name Type Description msg
String the error message to display
fnFlag
Boolean if true, display the calling function
- Source:
Returns:
error string, which may have the caller function name attached
- Type
- String
-
showScreenById(elm) → {DOMElement|false}
-
show application screens, assumes HTML has a class="screen" which defines the main screens of the application
Parameters:
Name Type Description elm
DOMElement | String a DOM element, or its id string
- Source:
Returns:
if changed, return the visible screen, else false
- Type
- DOMElement | false
-
shrink(pixels, recurse) → {Boolean}
-
Parameters:
Name Type Description pixels
Number the number of pixels to take off each side of the Rect.
recurse
Boolean if true, shrink children
- Source:
Returns:
if shrink ok, return true, else false
- Type
- Boolean
-
skewShape(obj, center, topSkew, rightSkew, bottomSkew, leftSkew) → {Array.<Point>}
-
skew a shape via an upper or lower bias. A straight line becomes a curve, with the peak of the curve at its central Point.
Parameters:
Name Type Description obj
ScreenObject the points (forming a shape) to skew
center
Point the assigned center of the points. Skew happens in a circular ring around the center point. This allows complex shapes to skew in one area.
topSkew
Number skew, as a percent (0-1.0) of the top quadrant of a circle
rightSkew
Number skew, as a percent (0-1.0) of the top quadrant of a circle
bottomSkew
Number skew, as a percent (0-1.0) of the top quadrant of a circle
leftSkew
Number skew, as a percent (0-1.0) of the top quadrant of a circle
- Source:
Returns:
returns modified Points
- Type
- Array.<Point>
-
SpriteCoords()
-
create a new SpriteCoords object by the 'new' operator instead of return
- Source:
-
textToPNG(text, fillStyle, font, font, boxSize) → {Image}
-
convert text styled in a specific way to a small bitmap, and return as JS Image() object. NOTE: use non-typographic type alignment (draw from top to bottom, like our other graphic objects).
Parameters:
Name Type Description text
String fillStyle
String color of fill
font
Number typeface
font
Number size
boxSize
Number the size of the shaded box around the text
- Source:
Returns:
PNG image with the input text rendered
- Type
- Image
-
toggle(clsName)
-
toggle a class as present or absent in the DOMElement
Parameters:
Name Type Description clsName
String the class name to add to or remove from a DOMElement
- Source:
-
toInt(num) → {Integer}
-
convert a Number to an integer
Parameters:
Name Type Description num
Number - Source:
Returns:
number with float removed
- Type
- Integer
Type Definitions
-
COLORS
-
basic HTML5 Canvas rgb() colors for default objects
Type:
- String
- Source:
-
LAYERS
-
Enum giving specific names to the list of drawing layers used by displayList.
Type:
- String
- Source:
-
PANELS
-
Enum giving which canvas (foreground, background, controls) we draw to
Type:
- String
- Source:
-
SIDES
-
top, right, bottom, left for Rect
Type:
- Number
- Source:
-
TYPES
-
basic geometry shapes used to create ScreenObjects
Type:
- String
- Source:


--- layout: index ---
Switchboard listens across all connected email accounts for new messages to arrive.
When a new message arrives, Switchboard sends out a notification to all listening workers.
Automatic routing
Sort different types of emails (i.e. bills/receipts/tickets) in specific folders.
Extracting key information
Push specific travel/event/contact details to your calendars and productivity apps.
Avoid undesired emails
Unsubscribe and delete messages from unwanted senders.
Switchboard is totally open source - developers can extend Switchboard or use the API to create additional workers specific to their product.
Processes run in the cloud. Switchboard can help you avoid mobile OS backgrounding restrictions and heavy battery consumption, freeing up local memory and leaving you in control of the service.
Switchboard was built by engineers for engineers. We’ve included full documentation, tutorials and examples are provided on how to create and easily tie in workers.


same here too... maybe someone is testing a bit before the real stress test begins
my prices are like this
curl --url "http://<IP_ADDRESS>:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"setprice\",\"base\":\"RICK\",\"rel\":\"MORTY\",\"price\":2,\"volume\":1000}"
curl --url "http://<IP_ADDRESS>:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"setprice\",\"base\":\"MORTY\",\"rel\":\"RICK\",\"price\":2,\"volume\":1000}"
i think it is best to have the same price on all mm-nodes, that way the load will spread evenly across all mm-nodes


Gambling or “playing games of chance for money”, this is something that takes place all the time, all over the United States. In America gambling is not seen as something that is taboo or particularly evil although gambling addictions can be very detrimental to a person’s health and their economic status. In America there is even a wide variety of gambling from cards to board game to sports or even the lottery, something for every interest. However, in other places of the world like the Middle East gambling is forbidden or severely restricted. In the United Arab Empire (UAE) gambling is forbidden and there are very harsh punishments not only for the people running the gambling operations but also for the people who participate in them, the penalties can range from large fines as wells a lengthy duration in prison.
The reasons behind the banning of gambling is that the Middle East and its governments have close ties to the Islamic religion. Islam forbids gambling and views it as a sin. The Fourteenth Greater Sin to be more exact, “O you who believe! Intoxicants and (Maesir) games of chance and divining (azlam) by arrows are only an uncleanness, the Shaitan’s work; shun it therefore that you may be successful.” (Surah al-Mā’ida 5:90). Because of the governments close relationship with the faith they strive to fallow the faiths rules one of which is to not participate in gambling thus causing its ban. This is to respect Islamic beliefs and to not offend their god.
The UAE has also recently passed laws against gambling online. There can no longer be any sites that allow gambling to take place, to be ran or managed and, for any winnings/profits of gambling to be run through any website. There are similar punishments for those who try to gamble online as those who do it in person. This ban on online gambling applies to all games that have any sort of chance in it.
So, while we may see gambling as a hobby, and for some a professional career here in America it can be viewed quite differently in other areas of the world. So, if you plan on taking a trip to the Middle East and gambling is a big thing in your life you should make sure to get it out of your system before going there, as you will have a hard time doing it while you are there and if you are able to, it could get you into a load of trouble.


Click on the arrows/palette icon to place blocks of code.
Press the play icon to run or the replay button to restart.
You can rearrange the blocks of code by dragging it. The trash can removes its block.
Thanks to Google Fonts for Comfortaa and Material icons, Google Search for HTML help, etc. etc.
Click on 'help' again to close
Made by Sean
Help


Department of Motor Vehicles
Register your vehicle or renew registration
General Information:<PHONE_NUMBER> Hearing Impaired:<PHONE_NUMBER> Fax<PHONE_NUMBER>


By clicking on the "Create account" button below, you certify that you have read and agree to our terms of use and privacy policy.
Already have an account? Sign In.


Donate
Thank you for your support!
You can also donate to koalyptus.crypto
blockchain domain.
Check the list of supported wallets and applications: https://unstoppabledomains.com.
Thank you for your support!
You can also donate to koalyptus.crypto
blockchain domain.
Check the list of supported wallets and applications: https://unstoppabledomains.com.


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.quartz.Trigger org.quartz.SimpleTrigger com.nepxion.util.scheduler.quartz.QuartzJobTrigger
public class QuartzJobTrigger
| Field Summary |
|---|
| Fields inherited from class org.quartz.SimpleTrigger |
|---|
MISFIRE_INSTRUCTION_FIRE_NOW, MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT, MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT, MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT, MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT, REPEAT_INDEFINITELY |
| Fields inherited from class org.quartz.Trigger |
|---|
DEFAULT_PRIORITY, INSTRUCTION_DELETE_TRIGGER, INSTRUCTION_NOOP, INSTRUCTION_RE_EXECUTE_JOB, INSTRUCTION_SET_ALL_JOB_TRIGGERS_COMPLETE, INSTRUCTION_SET_ALL_JOB_TRIGGERS_ERROR, INSTRUCTION_SET_TRIGGER_COMPLETE, INSTRUCTION_SET_TRIGGER_ERROR, MISFIRE_INSTRUCTION_SMART_POLICY, STATE_BLOCKED, STATE_COMPLETE, STATE_ERROR, STATE_NONE, STATE_NORMAL, STATE_PAUSED |
| Constructor Summary | |
|---|---|
QuartzJobTrigger()
Constructs with the default. |
|
QuartzJobTrigger(String name)
Constructs with the specified initial name. |
|
QuartzJobTrigger(String name,
Date startTime)
Constructs with the specified initial name and start time. |
|
QuartzJobTrigger(String name,
Date startTime,
Date endTime,
int[] repeatInterval)
Constructs with the specified initial name, start time, end time and repeat interval. |
|
QuartzJobTrigger(String name,
Date startTime,
Date endTime,
int repeatCount,
int[] repeatInterval)
Constructs with the specified initial name, start time, end time, repeat count and repeat interval. |
|
QuartzJobTrigger(String name,
Date startTime,
Date endTime,
int repeatCount,
long repeatInterval)
Constructs with the specified initial name, start time, end time, repeat count and repeat interval. |
|
QuartzJobTrigger(String name,
Date startTime,
Date endTime,
long repeatInterval)
Constructs with the specified initial name, start time, end time and repeat interval. |
|
QuartzJobTrigger(String name,
int[] repeatInterval)
Constructs with the specified initial name and repeat interval. |
|
QuartzJobTrigger(String name,
int repeatCount,
int[] repeatInterval)
Constructs with the specified initial name, repeat count and repeat interval. |
|
QuartzJobTrigger(String name,
int repeatCount,
long repeatInterval)
Constructs with the specified initial name, repeat count and repeat interval. |
|
QuartzJobTrigger(String name,
long repeatInterval)
Constructs with the specified initial name and repeat interval. |
|
QuartzJobTrigger(String name,
String group)
Constructs with the specified initial name and group. |
|
QuartzJobTrigger(String name,
String group,
Date startTime)
Constructs with the specified initial name, group and start time. |
|
QuartzJobTrigger(String name,
String group,
Date startTime,
Date endTime,
int[] repeatInterval)
Constructs with the specified initial name, group, start time, end time, repeat interval. |
|
QuartzJobTrigger(String name,
String group,
Date startTime,
Date endTime,
int repeatCount,
int[] repeatInterval)
Constructs with the specified initial name, group, start time, end time, repeat count and repeat interval. |
|
QuartzJobTrigger(String name,
String group,
Date startTime,
Date endTime,
int repeatCount,
long repeatInterval)
Constructs with the specified initial name, group, start time, end time, repeat count and repeat interval. |
|
QuartzJobTrigger(String name,
String group,
Date startTime,
Date endTime,
long repeatInterval)
Constructs with the specified initial name, group, start time, end time and repeat interval. |
|
QuartzJobTrigger(String name,
String group,
int[] repeatInterval)
Constructs with the specified initial name, group and repeat interval. |
|
QuartzJobTrigger(String name,
String group,
int repeatCount,
int[] repeatInterval)
Constructs with the specified initial name, group, repeat count and repeat interval. |
|
QuartzJobTrigger(String name,
String group,
int repeatCount,
long repeatInterval)
Constructs with the specified initial name, group, repeat count and repeat interval. |
|
QuartzJobTrigger(String name,
String group,
long repeatInterval)
Constructs with the specified initial name, group and repeat interval. |
|
QuartzJobTrigger(String name,
String group,
String jobName,
String jobGroup,
Date startTime,
Date endTime,
int[] repeatInterval)
Constructs with the specified initial name, group, job name, job group, start time, end time and repeat interval. |
|
QuartzJobTrigger(String name,
String group,
String jobName,
String jobGroup,
Date startTime,
Date endTime,
int repeatCount,
int[] repeatInterval)
Constructs with the specified initial name, group, job name, job group, start time, end time, repeat count and repeat interval. |
|
QuartzJobTrigger(String name,
String group,
String jobName,
String jobGroup,
Date startTime,
Date endTime,
int repeatCount,
long repeatInterval)
Constructs with the specified initial name, group, job name, job group, start time, end time, repeat count and repeat interval. |
|
QuartzJobTrigger(String name,
String group,
String jobName,
String jobGroup,
Date startTime,
Date endTime,
long repeatInterval)
Constructs with the specified initial name, group, job name, job group, start time, end time and repeat interval. |
| Method Summary | |
|---|---|
void |
setRepeatInterval(int[] repeatInterval)
Sets the repeat interval for the the scheduler timer. |
| Methods inherited from class org.quartz.SimpleTrigger |
|---|
computeFirstFireTime, computeNumTimesFiredBetween, executionComplete, getEndTime, getFinalFireTime, getFireTimeAfter, getFireTimeBefore, getNextFireTime, getPreviousFireTime, getRepeatCount, getRepeatInterval, getStartTime, getTimesTriggered, hasAdditionalProperties, mayFireAgain, setEndTime, setNextFireTime, setPreviousFireTime, setRepeatCount, setRepeatInterval, setStartTime, setTimesTriggered, triggered, updateAfterMisfire, updateWithNewCalendar, validate |
| Methods inherited from class org.quartz.Trigger |
|---|
addTriggerListener, clearAllTriggerListeners, clone, compareTo, equals, getCalendarName, getDescription, getFireInstanceId, getFullJobName, getFullName, getGroup, getJobDataMap, getJobGroup, getJobName, getKey, getMisfireInstruction, getName, getPriority, getTriggerListenerNames, hashCode, isVolatile, removeTriggerListener, setCalendarName, setDescription, setFireInstanceId, setGroup, setJobDataMap, setJobGroup, setJobName, setMisfireInstruction, setName, setPriority, setVolatility, toString |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public QuartzJobTrigger()
public QuartzJobTrigger(String name)
name
- the name stringpublic QuartzJobTrigger(String name, String group)
name
- the name stringgroup
- the group stringpublic QuartzJobTrigger(String name, long repeatInterval)
name
- the name stringrepeatInterval
- the scheduler timer repeat interval. The scheduler timer will be activated every the repeat intervalpublic QuartzJobTrigger(String name, int repeatCount, long repeatInterval)
name
- the name stringrepeatCount
- the scheduler timer repeat count. The scheduler timer will stop if the it arrives the repeat count, but it arrives the end time first, it will also stoprepeatInterval
- the scheduler timer repeat interval. The scheduler timer will be activated every the repeat intervalpublic QuartzJobTrigger(String name, int[] repeatInterval)
name
- the name stringrepeatInterval
- the scheduler timer repeat interval and it must be [day, hour, minute, second, milliSecond]. The scheduler timer will be activated every the repeat intervalpublic QuartzJobTrigger(String name, int repeatCount, int[] repeatInterval)
name
- the name stringrepeatCount
- the scheduler timer repeat count. The scheduler timer will stop if the it arrives the repeat count, but it arrives the end time first, it will also stoprepeatInterval
- the scheduler timer repeat interval and it must be [day, hour, minute, second, milliSecond]. The scheduler timer will be activated every the repeat intervalpublic QuartzJobTrigger(String name, String group, long repeatInterval)
name
- the name stringgroup
- the group stringrepeatInterval
- the scheduler timer repeat interval. The scheduler timer will be activated every the repeat intervalpublic QuartzJobTrigger(String name, String group, int repeatCount, long repeatInterval)
name
- the name stringgroup
- the group stringrepeatCount
- the scheduler timer repeat count. The scheduler timer will stop if the it arrives the repeat count, but it arrives the end time first, it will also stoprepeatInterval
- the scheduler timer repeat interval. The scheduler timer will be activated every the repeat intervalpublic QuartzJobTrigger(String name, String group, int[] repeatInterval)
name
- the name stringgroup
- the group stringrepeatInterval
- the scheduler timer repeat interval and it must be [day, hour, minute, second, milliSecond]. The scheduler timer will be activated every the repeat intervalpublic QuartzJobTrigger(String name, String group, int repeatCount, int[] repeatInterval)
name
- the name stringgroup
- the group stringrepeatCount
- the scheduler timer repeat count. The scheduler timer will stop if the it arrives the repeat count, but it arrives the end time first, it will also stoprepeatInterval
- the scheduler timer repeat interval and it must be [day, hour, minute, second, milliSecond]. The scheduler timer will be activated every the repeat intervalpublic QuartzJobTrigger(String name, Date startTime)
name
- the name stringstartTime
- the scheduler timer start time. If null, the scheduler timer will start at the currently timepublic QuartzJobTrigger(String name, String group, Date startTime)
name
- the name stringgroup
- the group stringpublic QuartzJobTrigger(String name, Date startTime, Date endTime, long repeatInterval)
name
- the name stringstartTime
- the scheduler timer start time. If null, the scheduler timer will start at the currently timeendTime
- the scheduler timer end time. If null, the scheduler timer will always run unless it is interruptedrepeatInterval
- the scheduler timer repeat interval. The scheduler timer will be activated every the repeat intervalpublic QuartzJobTrigger(String name, Date startTime, Date endTime, int repeatCount, long repeatInterval)
name
- the name stringstartTime
- the scheduler timer start time. If null, the scheduler timer will start at the currently timeendTime
- the scheduler timer end time. If null, the scheduler timer will always run unless it is interruptedrepeatCount
- the scheduler timer repeat count. The scheduler timer will stop if the it arrives the repeat count, but it arrives the end time first, it will also stoprepeatInterval
- the scheduler timer repeat interval. The scheduler timer will be activated every the repeat intervalpublic QuartzJobTrigger(String name, Date startTime, Date endTime, int[] repeatInterval)
name
- the name stringstartTime
- the scheduler timer start time. If null, the scheduler timer will start at the currently timeendTime
- the scheduler timer end time. If null, the scheduler timer will always run unless it is interruptedrepeatInterval
- the scheduler timer repeat interval and it must be [day, hour, minute, second, milliSecond]. The scheduler timer will be activated every the repeat intervalpublic QuartzJobTrigger(String name, Date startTime, Date endTime, int repeatCount, int[] repeatInterval)
name
- the name stringstartTime
- the scheduler timer start time. If null, the scheduler timer will start at the currently timeendTime
- the scheduler timer end time. If null, the scheduler timer will always run unless it is interruptedrepeatCount
- the scheduler timer repeat count. The scheduler timer will stop if the it arrives the repeat count, but it arrives the end time first, it will also stoprepeatInterval
- the scheduler timer repeat interval and it must be [day, hour, minute, second, milliSecond]. The scheduler timer will be activated every the repeat intervalpublic QuartzJobTrigger(String name, String group, Date startTime, Date endTime, long repeatInterval)
name
- the name stringgroup
- the group stringstartTime
- the scheduler timer start time. If null, the scheduler timer will start at the currently timeendTime
- the scheduler timer end time. If null, the scheduler timer will always run unless it is interruptedrepeatInterval
- the scheduler timer repeat interval. The scheduler timer will be activated every the repeat intervalpublic QuartzJobTrigger(String name, String group, Date startTime, Date endTime, int repeatCount, long repeatInterval)
name
- the name stringgroup
- the group stringstartTime
- the scheduler timer start time. If null, the scheduler timer will start at the currently timeendTime
- the scheduler timer end time. If null, the scheduler timer will always run unless it is interruptedrepeatCount
- the scheduler timer repeat count. The scheduler timer will stop if the it arrives the repeat count, but it arrives the end time first, it will also stoprepeatInterval
- the scheduler timer repeat interval. The scheduler timer will be activated every the repeat intervalpublic QuartzJobTrigger(String name, String group, Date startTime, Date endTime, int[] repeatInterval)
name
- the name stringgroup
- the group stringstartTime
- the scheduler timer start time. If null, the scheduler timer will start at the currently timeendTime
- the scheduler timer end time. If null, the scheduler timer will always run unless it is interruptedrepeatInterval
- the scheduler timer repeat interval and it must be [day, hour, minute, second, milliSecond]. The scheduler timer will be activated every the repeat intervalpublic QuartzJobTrigger(String name, String group, Date startTime, Date endTime, int repeatCount, int[] repeatInterval)
name
- the name stringgroup
- the group stringstartTime
- the scheduler timer start time. If null, the scheduler timer will start at the currently timeendTime
- the scheduler timer end time. If null, the scheduler timer will always run unless it is interruptedrepeatCount
- the scheduler timer repeat count. The scheduler timer will stop if the it arrives the repeat count, but it arrives the end time first, it will also stoprepeatInterval
- the scheduler timer repeat interval and it must be [day, hour, minute, second, milliSecond]. The scheduler timer will be activated every the repeat intervalpublic QuartzJobTrigger(String name, String group, String jobName, String jobGroup, Date startTime, Date endTime, long repeatInterval)
name
- the name stringgroup
- the group stringjobName
- the job name stringjobGroup
- the job group namestartTime
- the scheduler timer start time. If null, the scheduler timer will start at the currently timeendTime
- the scheduler timer end time. If null, the scheduler timer will always run unless it is interruptedrepeatInterval
- the scheduler timer repeat interval. The scheduler timer will be activated every the repeat intervalpublic QuartzJobTrigger(String name, String group, String jobName, String jobGroup, Date startTime, Date endTime, int repeatCount, long repeatInterval)
name
- the name stringgroup
- the group stringjobName
- the job name stringjobGroup
- the job group stringstartTime
- the scheduler timer start time. If null, the scheduler timer will start at the currently timeendTime
- the scheduler timer end time. If null, the scheduler timer will always run unless it is interruptedrepeatCount
- the scheduler timer repeat count. The scheduler timer will stop if the it arrives the repeat count, but it arrives the end time first, it will also stoprepeatInterval
- the scheduler timer repeat interval. The scheduler timer will be activated every the repeat intervalpublic QuartzJobTrigger(String name, String group, String jobName, String jobGroup, Date startTime, Date endTime, int[] repeatInterval)
name
- the name stringgroup
- the group stringjobName
- the job name stringjobGroup
- the job group stringstartTime
- the scheduler timer start time. If null, the scheduler timer will start at the currently timeendTime
- the scheduler timer end time. If null, the scheduler timer will always run unless it is interruptedrepeatInterval
- the scheduler timer repeat interval and it must be [day, hour, minute, second, milliSecond]. The scheduler timer will be activated every the repeat intervalpublic QuartzJobTrigger(String name, String group, String jobName, String jobGroup, Date startTime, Date endTime, int repeatCount, int[] repeatInterval)
name
- the name stringgroup
- the group stringjobName
- the job name stringjobGroup
- the job group stringstartTime
- the scheduler timer start time. If null, the scheduler timer will start at the currently timeendTime
- the scheduler timer end time. If null, the scheduler timer will always run unless it is interruptedrepeatCount
- the scheduler timer repeat count. The scheduler timer will stop if the it arrives the repeat count, but it arrives the end time first, it will also stoprepeatInterval
- the scheduler timer repeat interval and it must be [day, hour, minute, second, milliSecond]. The scheduler timer will be activated every the repeat interval| Method Detail |
|---|
public void setRepeatInterval(int[] repeatInterval)
repeatInterval
- the scheduler timer repeat interval and it must be [day, hour, minute, second, milliSecond]
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


{{$ctrl.questions[$ctrl.currentQuestion].question}}
You have answered {{$ctrl.answeredCorrectly}} of {{$ctrl.questions.length}} questions correctly
Show Evaluation
{{answer}}
{{answer}}
Question {{$ctrl.currentQuestion+1}}/{{$ctrl.questions.length}}
Show Results
Previous
Repeat
Finish
Next


I think my blog could do with a bit of focus for my next entry, so I decided to pick a more technical topic and hone in on something that was giving me trouble. I’ve found Ember to be very challenging, but what’s something more specific I’d like to understand better? Hmm, I thought to myself, I wonder how authentication usually goes down in Ember. That might be worth exploring.
The first thing I came across was a library called Ember Simple Auth, which allows you to do just what I wanted - implement a lightweight authentication system within your already existing Ember app.
“That’s cool” you say, “but how does it work?” Well, Skip, I’m glad you asked. There are 4 key building blocks that come with Ember Simple Auth, once you install the library. You can also go clone a repo that contains a dummy app for easy reference with all the needed functionality already built-out, which is pretty thoughtful, and the dummy app includes an example for Facebook integration as well.
So the building blocks roll out thusly: the session itself, a session store, authenticators, and authorizers.
“What do those things do?” you ask, staring at me wide-eyed.
Pretty simple, the session is as we generally understand it and is the main interface to the library. The session in the context of Ember Simple Auth contains all the methods for authenticating the session.
The session store makes sure that the session state of the current user is persistent, so that nothing gets screwed up if you hard (or soft) refresh the page. It also provides the functionality of synchronizing the session across multiple tabs and pages, so that a user is logged in no matter where they are in their browser or on the site.
Authenticators also authenticate the session, but they can support multiple ways of doing so, such as through Facebook, against the site’s own server, etc.
Authorizers take the data that is stored in a current session and generate more authorization data, which gets used in outgoing requests such as Ember Data requests, like what we saw with the Ember dynamic segments lab, for instance.
So, to install just run:
ember install ember-simple-auth
inside your app.
Once you do that, the usage is (on the surface) fairly simple. You can add this code to the application controller (app/controllers/application.js):
1 2 3 4 5 6 7 |
|
Once we do that, we can set up some conditional logic in our template (i.e. application.hbs) to query the isAuthenticated
property, like so:
(handlebars code snippet for logic in the template)
Since we have that, we need to configure the action for invalidateSession
back where we started in our application controller. This action will be responsible for invalidating the session and logging the user out:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
To actually authenticate the session, we can extend one of the authenticators that the library comes with, for example OmniAuth. This gets configured when we add a file to app/authenticators
:
1 2 3 4 |
|
Then we build a login form…
And then the actual authentication of the login will be handled in a login controller, here:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
At this point, we pretty much just need to decide which routes are restricted to users only, so we go to any routes that only a user should be able to access and add the AuthenticatedRouteMixin
to that route’s .js file:
1 2 3 4 5 |
|
We would need to do this for any route that is not accessible to non-logged in users. This code will then make it so the app redirects the user to a login page whenever they attempt to access the route with an unauthenticated session.
I’ll leave this blog post as a to be continued and plan to implement this in my own Ember app a little later this week, and write a follow up post about that. There is a lot more information on the library’s github page, and much more that you can do such as with authorizing outgoing API requests with an authorizer. To be continued!


Henning's
Small Project DAPP
Contract balance
Account A balance
Account B balance
Transact
Amount
From Account
To Account A
To Account B
Get balances
Send funds to contract
ETH to USD


Base class for Component-Entity design pattern implementation driven by typesBasic Usage: Derive your entity class from IEntity<T> where T is the base class of your Entity class. More...
#include <IEntity.h>
Public Member Functions | |
| template<typename T > | |
| T * | AddComponent (T *Component) |
| Add a component to this entity. More... | |
| template<typename T > | |
| pair< typename std::multimap< Type, TComponent * >::iterator, typename std::multimap< Type, TComponent * >::iterator > | GetComponents () |
| Get an iterator range of all components of a given type Note: Does not return elemtns of a type derived from T. More... | |
| template<typename T > | |
| size_t | GetComponentCount () const |
| Get the number of components of a given type Note: Does not count elements of a type derived from T. More... | |
| template<typename T > | |
| size_t | ExpectSingleComponent (T *&Component) |
| template<typename T > | |
| T * | RequireSingleComponent () |
Protected Attributes | |
| std::multimap< Type, TComponent * > | Components |
Base class for Component-Entity design pattern implementation driven by types
Basic Usage: Derive your entity class from IEntity<T> where T is the base class of your Entity class.
|
inline |
Add a component to this entity.
| Component | The component to add |
| T | The actual type of the component added (assumed derived from TComponent) |
|
inline |
|
inline |
Get the number of components of a given type Note: Does not count elements of a type derived from T.
| T | Type of matched components |
|
inline |
Get an iterator range of all components of a given type Note: Does not return elemtns of a type derived from T.
| T | Type of matched components |
|
inline |
|
protected |
Generated on Sun May 6 2018 for ionEngine v0.4.5


Control a Spotify desktop client from any web browser.
Go to the following URL on your device:
and enter the following number:
Drag and drop a playlist on the sidebar icon or here to play it with Kontroll


Garden Weddings · Murrieta, CA We warmly welcome you to The Marquess A private five acre Garden Wedding Estate north of San Diego County and the wineries in Temecula Valley Wine Country to host a beautiful wedding ceremony and celebration. So exclusive, that only one wedding takes place at a time...Yours! An hour's drive from LA... (Garden Weddings Murrieta)
Reviews · Garden Weddings · Los Angeles, CA Oxford House is a wedding venue in Los Angeles, California. The house is a 1923 classic colonial just outside the heart of Hollywood. The house was a passion project for interior designer, Jennifer Lehr. She wants guests to feel at home and taken care of. It is a private home with the services of a... (Garden Weddings Los Angeles)
21 Reviews · Garden Weddings · Indianapolis, IN The Willows is a wedding venue located in Indianapolis, also serving couples from the Lafayette and Terre Haute areas. This conveniently located venue offers easy access from all areas of the city, and the perfect facility to host your next event. The Willows specializes in wedding ceremonies and... (Garden Weddings Indianapolis)
4 Reviews · Garden Weddings · Edinboro, PA Goodell Gardens & Homestead is a botanical garden and arboretum located in beautiful Edinboro, Pennsylvania. We offer a full schedule of educational and cultural events in addition to offering the Gardens for private rentals on select dates. (Garden Weddings Edinboro) Guests 100 to 250
10 Reviews · Garden Weddings · Withee, WI Munson Bridge Winery is centrally located in Wisconsin's heartland. We offer the perfect setting for your dream Barn Wedding. Our professional staff works hard to make the wedding of your dreams come to life. Our unique facility can accommodate groups of up to 250 outside and in our tent area... (Garden Weddings Withee)
Guests 10 to 250


Before Change
result = tf.concat([result, output],
0) if "result" in locals() else output
return [result]
@classmethod
def version_10(cls, node, **kwargs):
return cls._common(node, **kwargs)
After Change
// are defined before use in the "for loop" before it will perform any auto
// convertion of the python code. Therefore need to define "result" as a
// Variable here and send it in as a parameter to "create_nodes"
result = tf.Variable([[0, 0, 0]],
dtype=tf.int64,
shape=tf.TensorShape([None, 3]))
return [
create_nodes(boxes, scores, max_output_boxes_per_class, iou_threshold,
score_threshold, result)
]


Tmux session shortcuts
Tmux is awesome. But the session management commands are way too long for my
liking. Listing all sessions is tmux list-sessions
, attaching to a session
mysession
is tmux attach -t mysession
, etc.
So I created a few functions and aliases, which can be found here.
The general idea is, all commands start with mx
, which is basically a
shortcut for ‘tMuX’. So mxl
is to ‘l'ist tmux sessions, mxa
is to ‘a'ttach
to a tmux session, etc.
List all running tmux sessions
r@rushi:~$ mxl
0: 4 windows (created Sun Jan 10 17:14:11 2016) [89x23] (attached)
You can see one tmux session. Let's create another tmux session with name
dev
.
mx dev
List all sessions now
r@rushi:~$ mxl
0: 4 windows (created Sun Jan 10 17:14:11 2016) [89x23] (attached)
dev: 1 windows (created Sun Jan 10 17:59:30 2016) [89x23] (attached)
To attach to session with name dev
:
mxa dev
You can also omit session name, and it will attach to the last session you attached to.
If there was no session with name dev2
, and you type this:
mxa dev2
It will automatically create a session for you and attach you to it.
To detach:
mxd
I find this mxd
to be easier to type than both CTRL`+`d
and tmux detach
.
Installation
You just need to copy the content in the above referenced link to ~/.bashrc
file and from a new terminal session things will be ready for you to use :)


1 Samuel 15:2
Thus saith the LORD of hosts, I remember that which Amalek did to Israel, how he laid wait for him in the way, when he came up from Egypt.


Space Exploration
Hello my name is astronaut . I am on my way to planet . I will be gone for days. I am very about the trip but i will miss my . I have heard that the atmosphere there is . Luckily my packed me a jacket to keep me . When I land on the planet I will for joy. I am to walk on another planet. I could not be more for this trip.