f.flush()
image = scipy.misc.imread(f.name)
// Workaround for black-and-white images
if image.ndim == 2:
image = np.tile(image[:, :, None], (1, 1, 3))
return np.float32(image / 255.0)
def save_np_image(image, output_file):
Saves an image to disk.
A 3-D numpy array of shape [image_size, image_size, 3] and dtype float32,
with values in [0, 1].
return np.float32(load_np_image_uint8(image_file) / 255.0)
def load_np_image_uint8(image_file):
Loads an image as a numpy array.


Lattice functions for drawing folded empirical cumulative distribution plots, or mountain plots. A mountain plot is similar to an empirical CDF plot, except that the curve increases from 0 to 0.5, then decreases from 0.5 to 1 using an inverted scale at the right side.
| Version: | 1.2 |
| Imports: | lattice, stats |
| Suggests: | knitr, latticeExtra, testthat |
| Published: | 2017-07-13 |
| Author: | Kevin Wright [aut, cre] |
| Maintainer: | Kevin Wright <kw.stat at gmail.com> |
| BugReports: | https://github.com/kwstat/mountainplot/issues |
| License: | GPL-3 |
| URL: | https://github.com/kwstat/mountainplot |
| NeedsCompilation: | no |
| CRAN checks: | mountainplot results |
| Reference manual: | mountainplot.pdf |
| Vignettes: |
Introduction to the mountainplot package |
| Package source: | mountainplot_1.2.tar.gz |
| Windows binaries: | r-devel: mountainplot_1.2.zip, r-release: mountainplot_1.2.zip, r-oldrel: mountainplot_1.2.zip |
| OS X binaries: | r-release: mountainplot_1.2.tgz, r-oldrel: mountainplot_1.2.tgz |
| Old sources: | mountainplot archive |
Please use the canonical form https://CRAN.R-project.org/package=mountainplot to link to this page.


| Can my component use multiple constructors |
Yes.
You should perhaps code multiple constructors for a component:
class MyComp { private ThreadPool theThreadPool; public MyComp(ThreadPool threadpool) { theThreadPool = threadpool; } public MyComp() { theThreadPool = new DefaultThreadPool(); } // other methods. }
| How does PicoContainer decide what constructor to use |
PicoContainer will instantiate a given component using the "greediest" satisfiable constructor. By greedy, we mean the constructor that takes the most parameters. By satisfiable, we mean constructors where all arguments can be satisfied by other registered components.
If you register a component with no satisfiable constructors, or two or more ambiguous "largest" constructors, a RuntimeException will be thrown when you ask for the component instance.
We recommend, for the sake of predictablility, that PicoContainer compatible components use only one constructor (see Good Citizen), although this is by no means a requirement.
| How does PicoContainer compare to EJB containers |
Oh blimey, it is rather different. EJB has loads of things you must extend, implement, provide and throw. It is also not an IoC design. It is close in that components are managed by a container, but the cumbersome and static nature of the JNDI lookups ensure that it is not actually IoC. PicoContainer is not a superset of EJB though, as it provides no remoting capability (but NanoContainer will). At least the PicoContainer compatible components hosted in this project do not.
| How does PicoContainer decide what constructor to use |
PicoContainer will instantiate a given component using the "greediest" satisfiable constructor. By greedy, we mean the constructor that takes the most parameters. By satisfiable, we mean constructors where all arguments can be satisfied by other registered components.
If you register a component with no satisfiable constructors, or two or more ambiguous "largest" constructors, a RuntimeException will be thrown when you ask for the component instance.
We recommend, for the sake of predictablility, that PicoContainer compatible components use only one constructor (see Good Citizen), although this is by no means a requirement.
| How to use primitive types in constructors |
PicoContainer will look for the greediest constructor of your component. But if your component's constructor depends on primitive types you may set the values explicitly.
public interface ThreadPool { void setSize(int); } public class MyComp { private ThreadPool threadPool; public MyComp(ThreadPool pool, int size) { threadPool = pool; threadPool.setSize(size); } }
In this case you can set the parameters at registration time:
DefaultPicoContainer pico = new DefaultPicoContainer(); pico.addComponent(ThreadPool.class, DefaultThreadPool.class); pico.addComponent(MyComp.class, MyComp.class, new Parameters[] { new ComponentParameter(), new ConstantParameter(new Integer(5)); }) MyComp myComp = (MyComp)pico.getInstance(MyComp.class);
Use ConstantParameter to set constant values and the ComponentParameter to let Pico resolve the dependency.
| When should I use PicoContainer |
We recommend using PicoContainer when your application consists of many different classes (components) that are related to each other. Instantiating and lacing/connecting a lot of objects can be difficult task.
| Why Another IoC Framework |
After a long period of watching Inversion of Control frameworks, and for some of us avoiding them because of their cumbersome nature, we got together to write what we believe is the simplest possible IoC design. One, perhaps, that considers the so-designed component as more important that the container.
When we set out to do this in 2003, there was nothing equivalent to PicoContainer (xContainer orginally). XWork, that underpinned WebWork2 was a general/embeddable Setter Dependency Injection framework, but not well known. The Spring Framework started in the same timescale, and we were talking to its authors before Martin Fowlers Dependency Injection article. Later we discovered that HiveMind (now at Apache) also was in the same space.
| Why Constructor Injection |
Constructor Injection is hard to swallow for people who have been living with Interface Lookup or Setter Injection for long. We think it's like TDD. Once you get the grasp of it, you don't go back. Here are some benefits with this type of IoC:


{include file="public/ico"}
{include file="public/css-link"} {include file="public/js-link"}
{include file="public/header"}
点击进入下一话
{include file="public/footer"}


OK lets have play
THIS IS A REAL 'HACK IT TOGETHER' page, ...It's meant to be that way. I will get more sophisicated as I go along.
My company is basically moving over from one 'language' (coding that is) to another. I have no problem with that in fact I welcome it. It is exactly what I need to future proof myself in the work place. I am quite capable of reaching the required standard. The preparatory and practice coding will make certain of this. I just need no less than 4 weeks to do it.
...
| Task | ... | Description | Notes |
|---|---|---|---|
|
Education and Tools
|
... | ... | |
| AngularJS TWO Apps (1) | TWO Apps | Two Angular Apps in the same page (angular.bootstrap) | angular.bootstrap(document.getElementById("App2"), ['namesList']); needed to be 'after' the second App |
| Bit of CSS |
Hover over numbers 1.
2.
3.
4.
|
12.
DEMO - changed 14
Hover Me - 15
Some content More Content |
OK DIV Button Sample - 0123-4? |
| Filter (Local data - ng-view) 16 | ... |
This some filtering code, which I cannot get it working on a page hosted on GitHub, but it does work when served from my site. Also, had to upgrade Chrome to stop Chrome from Stopping local Angular Apps had to install local server (MAMP) to work this one out. |
|
| Angular JS View Demo | ... | Slider 1 | ... |
| Angular JS Button | ... | ... | ... |
| Typescript Class | ... | ... | ... |
| NPT1_Controller; OO controller Objects | ... | ... | Page population, Page responsivity and behaviour, paging, data search behaviour, |
| Typescript DIV button | ... | ... | ... |
| NPT1_Controller; OO controller Objects | ... | ... | Page population, Page responsivity and behaviour, paging, data search behaviour, |
| Local Component Presentation | ... | ... | Look and Feel |
| Local Component Data (vs Stub Mongo Collection) | ... | ... | Offline Mongo Collection, data aquisition and failure handling, component population, paging, search, |
| Actual Mongo Collection aquisition | ... | ... | Online data aquisition and failure handling using node; I might need a bit of a chat about actually getting data out of the online database. I had a bit of trouble with this. |
| Final Review and Changes | ... | ... | |
| TESTING | ... | ... | I would really need to do this with help from Netplay. Automated testing will be proprietary to Netplay and it is pointless me inventing my own |
Cool Tools
Please feel free to contact me at (e-mail)


Topmail was set up in 2006 to provide secure webmail and has since become an innovator in the Email Security Industry.
Topmail was designed specifically for those who take security and privacy seriously
The aim initially was to provide a completely spam free and highly secure webmail service, focusing on serving local markets and later to expanding globally.
Unlike competitor email services, Topmail has been designed by security experts, making it the most secure email in the world. Topmail benefits from over 25 years of Security industry expertise and support, making it a global leader in email security.
Topmail is committed to continuous improvement of its services and maintaining itself as the most spam-free, private and secure email provider around the world. By preventing spam, Topmail protects its users from nuisance mail, viruses and phishing scams. With the choice of additional encryption, Topmail also ensures your mail is private by encoding the contents of your messages transforming it so that it is unreadable to anyone who cannot access the key needed to unlock the message. Topmail does not scan emails to target ads, privacy is a key feature of the service.
Topmail is a global service offering secure email and encrypted email with local domains also in Ireland, the UK, United States, South Africa, New Zealand and India.
About Topmail’s Anti-Virus Infrastructure:
Topmail is unique in that it has its own dedicated, custom built Anti-Spam / Anti-Virus infrastructure. Updated constantly and subject to 24 x 7 x 365 global monitoring and support it provides a complete security blanket against all incoming viruses.
Unlike other providers Topmail scans and rejects virus laden emails long before they reach our email servers, instead of scanning attachments only when you download them-after they have arrived in your Inbox. This makes Topmail’s systems more secure and ensures no matter what you can never be exposed to a virus through your Topmail account.
- This secure managed email filtering service continuously monitors email traffic immediately blocking spam, and any emails containing viruses.
- Filtering takes place on multiple levels, with layers of security and a vast range of checks carried out on all inbound and outbound emails
- A wide range of techniques continuously build our knowledge base of new and emerging spam threats
- Emails, where illicit content is detected, are quarantined.
- The secure email service operates at internet level, eliminating threats before inbound emails reach our email servers and before outbound emails reach your family, friends, customers or business colleagues.
- With the option of encryption email, this ensures your mail is private and protects it from prying eyes.
Company Profile
Topmail is owned by Topmail Limited an industry leading, cutting edge provider of security for email with operations in Ireland, UK, Canada and South Africa, employing over 1,500 people.
For secure, private email services, sign up today.


Hanzo Hasashi a.k.a Scorpion
- The new Shirai Ryu are worthy. It's heart, not blood, that makes them warriors.
You now, I am the best shinobi that you could ever heard about, like Hattori Hanzo once. And I am a pretty nice guy. So, if you a good buddy, we will be friends, I believe. But, if you do either your business against EarthRealm or with Quan Chi, for example... I have for you just three words: Oops! I mean:
-
-
-
From beginning
I'm formerly one of the finest warriors of the Japanese Shirai Ryu ninja clan, until I was slain by Bi-Han, a member of the Lin Kuei (a rival clan of Chinese assassins) who worked under the name "Sub-Zero". I became a "hellspawn" revenant residing in Hell, later called the Netherrealm, who sought vengeance against those responsible for the destruction of my clan and the murder of my family, including my wife Harumi and my son Satoshi. Although essentially neutral in allegiance, I join forces with anyone who can assist in my plans of revenge. I was once manipulated by the sorcerer Quan Chi, whom I promised my life to in exchange for my impressive kombat abilities in order to defeat Sub-Zero.
-
Mortal Kombat (1992)
My first role, oh Gods! I am described as only having enmity towards Sub-Zero, which was attributed to rivalries between our opposing ninja clans.  This was further explored in a tie-in comic book written and illustrated by MK co-creator John Tobias and published by Midway. In a one-page scene, set aboard a junk en route to Mortal Kombat tournament host Shang Tsung's private island, I shock Sub-Zero with my unexpected return exactly two years after my death, declaring that my "demons" had allowed me to return and avenge me demise. After Shokan Prince Goro's defeat at the hands of eventual champion Liu Kang, Shang Tsung's army launched an attack, forcing me to team up with Sub-Zero, the thunder god Raiden, and other tournament survivors to hold them back before he killed his rival and disappeared.
-
Mortal Kombat II (1993)
I discover that Sub-Zero has somehow returned, and I planned to compete in the second Mortal Kombat tournament held in the otherworldly dimension of Outworld and hosted by the realm's emperor Shao Kahn. I track his nemesis down but notice, in the process, Sub-Zero sparing the life of an opponent in battle. I realize that this is not Bi-Han, but instead his younger brother, Kuai Liang, who had taken on his brother's codename in his memory and was tasked with completing his failed mission of assassinating Shang Tsung. As a result, I vowed to serve as the new Sub-Zero's guardian in atonement for killing his older brother.
-
Mortal Kombat: Shaolin Monks (2005)
In this spin-off, set during the events of Mortal Kombat II, I am a boss character who attempts to kill the game's playable protagonists Liu Kang and Kung Lao. I appeared in both masked and unmasked forms, with the latter being named "Inferno Scorpion". The planned co-op game, Mortal Kombat: Fire & Ice, which would have starred me and Sub-Zero as the protagonists, was canceled when Paradox Development, the developers of Shaolin Monks, "couldn't do it in time and under budget."
-
Ultimate Mortal Kombat 3 (1995)
I did not take a part of Mortal Kombat 3, because, you now, I just needed to take a little break, so much work we all had those days. But I returned in the 1995 upgrade Ultimate Mortal Kombat 3 when Shao Kahn tried to conquer the Netherrealm after his invasion of Earth, and enlisted the ninja in his forces. My allegiance to the Kahn quickly dissolved when I discover, in a continuance of my MKII storyline, that Sub-Zero was one of Earth's chosen warriors, with whom I sided in our final showdown with Shao Kahn.
-
Mortal Kombat Mythologies: Sub-Zero (1997)
I am featured therein as an unplayable boss character, appearing twice throughout the game. Despite playing a minor role, my background was officially expanded in a feature on the game's official website, where my real name and that of my clan were revealed, while my yellow outfit was described as an apparent mockery of the Lin Kuei after former Lin Kuei member Takeda developed ninjutsu before leaving the clan and forming the rival Shirai Ryu. I am enlisted by Quan Chi to find a map hidden in a Shaolin temple, a task the sorcerer also gave to Sub-Zero in order to engage the two rival ninjas in combat. If the player performs a killer move on me, I will reappear as another boss later in the game.
-
Mortal Kombat 4 (1997)
Quan Chi tricked me into believing that Sub-Zero was involved in the deaths of my family and clan, resulting in the specter allying with me. In my ending, I emerge victorious over Sub-Zero, but Quan Chi reveals his involvement in killing mine clan and family. When the sorcerer attempts to banish me, I grab the former at the last minute, sending us both to the Netherrealm. A variation of this ending was seen in Sub-Zero's conclusion, when Sub-Zero stands over a fallen me before being knocked down by Quan Chi, who again reveals his scheme and claims us both ninjas were pawns for the fallen Elder God Shinnok, which results in me killing Quan Chi and declaring Sub-Zero free of his curse.
-
Mortal Kombat: Deadly Alliance (2002)
My MK4 ending is carried over into Mortal Kombat: Deadly Alliance (2002), where I relentlessly hunt down Quan Chi, only to be attacked by the Oni Drahmin and Moloch, whom the sorcerer had hired as protection and to help free him from the Netherrealm. In my non-canonical ending, I am killed when Drahmin and Moloch hurl me into a Soulnado, a magical tornado consisting of tormented souls trapped between Earthrealm and Outworld.
-
Mortal Kombat: Deception (2004)
In mine biography in Mortal Kombat: Deception however, I am depicted as having escaped as well. I meet the Elder Gods, which, coupled with my witnessing Raiden's death and the emergence of Onaga, the Dragon King, cause me to accept a new role as the Elder Gods' servant while working to prevent Onaga's merging of the realms.
-
Mortal Kombat: Armageddon (2006)
In the Konquest mode of Mortal Kombat: Armageddon (2006), I cut a deal with the Elder Gods to serve them in exchange for the resurrection of the Shirai Ryu and my wife and son. However, they resurrect them as undead beings. Enraged, I seek to destroy the Elder Gods' chance of preventing Armageddon by taking the elemental Blaze's power, but the Edenian demigod Taven defeats me and I am later killed by Sub-Zero in a battle royal amongst the series characters in the game's opening sequence.
-
-
-
Mortal Kombat (2011)
In the 2011 Mortal Kombat reboot, an alternative-timeline retelling of the first three titles, I reprise my role from the first game in seeking vengeance against the elder Sub-Zero, Bi-Han. This time though, I serve Quan Chi from the start, unaware that the sorcerer is the mastermind behind the murder of my family and clan. Raiden, attempting to alter the timeline in hopes of averting Armageddon, talks to me into sparing Sub-Zero's life in exchange for reviving the Shirai Ryu. I agree, and when I defeat Sub-Zero in the Netherrealm, I refuse to kill him. However, Quan Chi convinces me otherwise by showing me a graphic vision of Sub-Zero murdering my wife and child. Despite Sub-Zero protests, I promptly incinerate him. I reappear on the tournament grounds holding Sub-Zero's skull and spinal column. Later in the game, the younger Sub-Zero Kuai Liang seeks revenge for his brother's death by demanding a fight with me in Shao Kahn's arena, which Quan Chi grants. I immediately recognize the new Sub-Zero as the original's younger brother, and while I am defeated, Kuai Liang is apprehended by my clan before I finish the revenant off. I am last seen when I fight and lose to Raiden in the Netherrealm before disappearing. In my non-canonical arcade ending, the Shirai Ryu appear before me as ghostly apparitions who reveal the truth about their murder and aid me in killing Quan Chi for his deception. In Sub-Zero's ending, I learn the truth about his and mine families and offers the specter a chance to join him in his quest for vengeance. I accept, joining Sub-Zero to form our own Deadly Alliance.
-
Mortal Kombat X (2015)
In Mortal Kombat X, which takes place two years after the previous game, I was sent to attack the Special Forces alongside a revenant version of Kuai Liang. Due to the efforts of Raiden and his allies however, they were restored to their human forms and freed from Quan Chi's control. Over the course of the following two decades, the newly restored me as Hanzo Hasashi reformed the Shirai Ryu, trained Kenshi's son Takeda Takahashi, and made amends with the young Sub-Zero after I revealed Quan Chi was responsible for the murder of my family and clan. When the Special Forces captured Quan Chi, a revenge-minded I subdued them and released the sorcerer so I could challenge him to a final fight before I killed him. Concurrently, Quan Chi's associate D'Vorah appeared so she could have the sorcerer free Shinnok from his amulet. I decapitated Quan Chi, but not before he could finish reciting a spell to successfully free the fallen Elder God, who immediately incapacitated everyone in the surrounding area.
-
Mortal Kombat 11 (2019)
In Mortal Kombat 11, I continue to lead the Shirai Ryu in protecting Earthrealm as its Grandmaster a further two years after MKX and Shinnok's defeat. When the keeper of time Kronika caused a time anomaly in an attempt to erase Raiden from history, she brought a past version of me to the present so she could recruit him to her fold with the promise of resurrecting my clan and family. Meanwhile, I worked with Sub-Zero to foil Lin Kuei clansman turned cyber ninja Sektor and his plans to build a Cyber Lin Kuei army. They were successful, despite facing opposition from Bi-Han, who had been resurrected as the revenant Noob Saibot, and learning that Sektor played a role in murdering mine clan and family. After Kronika's forces compromise or destroy most of their bases, I agrees to house my Earthrealm allies at the Shirai Ryu's Fire Gardens. To help locate Kronika's Keep, I suggest forging an alliance with Kharon, a ferryman who transports unfortunate souls to the Netherrealm who Sub-Zero and I met while we were revenants. I succeed in recruiting Kharon and convincing my younger self to turn away from Kronika, but I am killed by D'Vorah.  Younger me keeps his word and joins the allied forces of Earthrealm and Outworld to stop Kronika. In my non-canonical arcade ending, the younger me fails to keep his promise to his future self, and kills Kronika so he can restart history to ensure his loved ones' survival. When he discovers that otherworldly forces conspire to make sure the tragedy always repeats itself, he undergoes a quest for revenge against them.
-
-
-
- Mortal Kombat (1995)
- Mortal Kombat: Annihilation (1997)
- Mortal Kombat: The Journey Begins (1995)
- Mortal Kombat: Rebirth (2010)
- Mortal Kombat: Legacy (2011, 2013)
- Mortal Kombat Legends: Scorpion's Revenge (2020)
- Mortal Kombat (2021) (coming soon)
My fight styles 🤜
HAPKIDO (MK:DA, MK:TE, MK:D, MK:U, MK:A)PI GUA (MK:DA, MK:TE)
MOI FAH (MK:D, MK:U)
NINJUTSU (MK9, MKX, MK11)
My weapons 🔪
KUNAI (always)AXE (UMK3, MKT)
LONG SWORD (MK4, MKG)
NINJA SWORD (MK:DA, MK:TE)
MUGAI RYU (MK:D, MK:U, MK:A, MK 2011, MKX, MK Mobile, MK11)
TANTO (MK11, MK Mobile)
MY FATALITIES, BRUTALITIES, etc. 🔥
Calm down, it's violent content, I cannot show you it there!
My hobbys ⚽
mastering my ninja skills • SACRIFICE MY ENEMIES • travelling through the Realms • cooking (check oun my cookin' channel )I like 👍
Japan food • American food • ok, just like a tasty meal • throwing weapon • yellow color • cats (everybody loves them) • SACRIFICE MY ENEMIES • teddy bears • warm climate • picnicsI don't like 👎
Quan Chi • modern TW shows • Quan Chi (really hate this guy) • when someone lies to me • blunt knives • rains • Sub-Zero (in the past, we are friends now)


Bear Sighting API
Current time:
(Refresh page for updated sightings)
Current Bear Sightings
Bear Type
Notes
Zip Code
# of Bears
Date of Sighting
Unique ID
Add New Bear Sighting
Bear Type
Notes
Zip Code
# of Bears
Date of Sighting
Submit


Lorem Ipsum available but the majority have suffered alteration in some form, by injected humour randomised words.
Lorem Ipsum available but the majoty suffered alteration in some form, by humour randomised words.
Lorem Ipsum available, but the majority have suffered alteration in some form.
Lorem Ipsum available, but the majority have suffered alteration in some.
Lorem Ipsum available, but the majority have suffered alteration in some.
Lorem Ipsum available, but the majority have suffered alteration in some.
Lorem Ipsum available but the majoty suffered alteration in some form, by humour randomised words.
Lorem Ipsum available, but the majority have suffered alteration in some form.
Lorem Ipsum available, but the majority have suffered alteration in some form.
Lorem Ipsum available, but the majo rity have suffered alteration in some words which look.
Lorem Ipsum available, but the majo rity have suffered alteration in some words which look.
Lorem Ipsum available, but the majo rity have suffered alteration in some words which look.


{% extends "base.html" %} {% block title %}Internal Server Error{% endblock %} {% block content %}
Sorry about this, can't complete your request.
Please try again later or try something different.


There is currently a huge amount of homeless students with a disprorportionate amount who are people of color, LGBTQ, and people coming from dysfunctional homes.
Many of these students suffer from traumatic experiences, lack of community support, and social obstacles.
Nonetheless, against all odds, these individuals have chosen to follow their dreams and join the college community. Just that amount of guts is commendable and inspiring!
Imagine that: following a dream; attempt to heal your trauma; gain community support; tackle your obstacles: when everyone around you thought you would fail through education!
Unfortunately, these same intrepid, modern-day pioneers towards self-worth have an extremely difficult time during this transitional period:
Lack of good advice keeps them from holding down a job, paying for rent, and making end's meet.
Moreover, lack of support from a community and family compounds their anxiety, depression and senes of hopelessness.
Sadly, financial aid does not help these homeless students at the root of the problem; they only provide topical remedies: band-aids that are inadequate at best, counterproductive at worst.
By establishing this Homeless Student Fund, we hope to address the issues and problems which financial aid is unwilling to address and thereby solve the problem at the source.
How can you help out? We're so glad you're interested in helping out!
There is Hope
You can help out in the following ways
Donate any amount of money.
If you cannot donate money, volunteer through this website by emailing us your willingness to do so.
If you cannot volunteer for any reason, join us to brainstorm solutions to the current Homelessness Situation Amongst the Student Community.
Donate Money
Please click on this icon
below at the bottom right side of the page if you wish to make a Homeless Student Donation. You will be rewarded with a Thank You Gift!
Volunteer Your Time
There are many ways you can volunteer your time. Many members of the community are willing to donate towards the fund in exhange for some yardwork, simple errands, and home improvement projects.
If you are an artist, you can help create works of art to help bring awareness and donations towards the fund.
If you're a skilled administrator with experience in nonprofit organizing, you can help develop particular solutions to this problem.
Please click on this icon
below at the bottom of the page if you wish to volunteer your time.
Share Your Insights
Joins us through Zoom sessions, Discord sessions, or local Fundraisers to contribute your thoughts and ideas; if they lead to solutions we can't come up with, they will be much appreciated.
Please click on this icon
below at the bottom of the page if you wish to join a Discord server to help solve this Homeless Student Problem.
Are You a Homeless Student?
Please email us and share your experiences. If financial aid doesn't have a solution for you, we might. If we don't have a solution for you, we can provide community support.
Announcements
Social Media links that are not working will be up and running soon. Please stand by!
We greatly appreciate and love all our Donors: Enjoy your own customized pages by clicking on your name below!
More links will be added, including information on incorporating this nonprofit, gaining 501(c)(3) status, and art as therapy for Students in Dire Straits!


--- title: Performance image: --- {{page.title}} {% include list-posts.html posts=site.tags.performance %}


[PART VI. GENERAL PROVISIONS]
[§92-71] Political subdivision of the State; applicability. The provisions contained in this chapter shall apply to all political subdivisions of the State. Provided, however, in the event that any political subdivision of the State shall provide by charter, ordinance or otherwise, more stringent requirements relating to mandating the openness of meetings, the more stringent provisions of said charter, ordinance, or otherwise, shall apply. [L 1976, c 212, §5]
Attorney General Opinions
Interpretation of "board" as excluding county council would be inconsistent with this section. Att. Gen. Op. 86-5.


Prologue: Prerequisites¶
Your computer needs the following tools installed and working to participate. Visit each page to verify you are prepared. Installation instructions are provided.
Warning
You will likely need administrator privileges on your computer. Be sure you have them before you begin.


Limited Number of Loot Boxes !
The button will automatically disapear once we run out of boxes
- Each Golden Loot Box contains a combination of 2 out of 3 items, Hat, Necklace, T-shirt, including a Tracking number active once the box is shipped.
- Golden Loot Boxes Giveaway through this Portal are available for US, UK, Australia and Canada only.
- Golden Loot Box items are available to purchase separately for their original value via this Link Here.
- You must Pay shiping and handling fees
- All Golden loot boxes will be shiped at the end of the giveaway


Data flow
During exportation a graph of entities will be constructed inside the
database. For this three tables are required:
For each entity in the graph the primary-key and
the type (as table
name) is stored. The birthday of an entity is the day of the
insertion into the graph.
The graph will be constructed day after day (step-by-step) starting at
day 1:
The progression set of a day is the set of all
tables from
which entities are inserted at that day. The progession set of day 1 is
the subject set. The process stops if the progression set of a day is
empty.
Algorithm
1. insert subject
into graph
2.
progression-set := { subject }
3. while progression-set
!= {}
1. progression-of-today
:= {}
2. for all
(restricted) associations A
between tables T1 and T2, if
T1 or T2 in progression-set:
1. if T2 (T1) depends
on T1 (T2):
add
dependencies from T2(T 1)-entities born yesterday
to the entities
they are associated with according to A
2. insert
all entities of T1 (T2), which are associated according to A with an entity of T2 (T1) born yesterday
3. if at least one entity of T1 (T2) is
inserted then progression-of-today :=
progression-of-today + {
T1 (T2) }
3. progression-set
:= progression-of-today
Example
Subject = { A1, A2
}
| day |
progression
set |
entities |
dependencies |
| 1 |
A |
A1, A2 |
|
| 2 |
B, C |
+ B1, B2, C3, C4 |
A2->C3, A2->C4 |
| 3 |
B, C |
+ C1, C2, B3, B5 |
+ B1->C1, B1->C2 |
| 4 |
B |
+ B6 |
no change |
| 5 |
|
no change |
no change |
Line 1, insert subject
INSERT INTO Entity(PK, birthday, type)
SELECT
<subject>.PK, 1, '<subject>'
FROM
<subject>
WHERE (<condition> AND 103
NOT EXISTS (SELECT * FROM Entity WHERE <subject>.PK=Entity.PK)
[fetch first <limit> rows only]
Line 3.2.1, adding dependencies
INSERT INTO
Dependency(from_PK, to_PK)
SELECT
<T2>.PK, <T1>.PK
FROM Entity
E1, Entity E2,
<T2> JOIN <T1> ON <join-condition>
WHERE
E1.type='<T1>' AND E2.type='<T2>'
AND E1.PK=<T1>.PK
AND E2.PK=<T2>.PK
Line 3.2.2, adding referenced entities
INSERT INTO
Entity(PK, birthday, type)
SELECT
DISTINCT <T2>.PK, <today>, '<T2>'
FROM
<T1> JOIN <T2> ON <join-condition>,
Entity
WHERE
<T1>.PK=Entity.PK AND Entity.birthday = <yesterday>
AND NOT EXISTS
(SELECT * FROM Entity WHERE <T2>.PK=Entity.PK)
|


Each year Kent Food Bank distributes approximately 6,000 lbs of food. We are a non-profit organization that run on volunteer support with funding from grants, individual doners, and some money from the city of Kent.
Every contribution makes a difference.
Clothing Bank Accepts donations on M, T, W and F from 9 am – 2 pm of gently used men’s, women’s, children’s clothing along with small household items at
Amazon donates 0.5% of the prie of your elighble AmazonSmile purchases to the charitable organization of your choice. Support your charitable organization by starting your shopping at smile.amazon.com
Sign up for the Community Rewards program by linking your Fred Meyer Rewards Card to Kent Food Bank at: FredMeyer.com/communityrewards. You can search for us by name, Kent Food Bank or by our NPO # 83698


_Basket
public struct _Basket<P: Product> : ExpressibleByArrayLiteral, MutableCollection
The Basket Type
-
The total of the products before tax (if not preadded) and shipping.
item.price - item.discount
Note
Will be converted automatically. Call
.floatValue
or.integerValue
or.nonConvertedDecimal
to show the nonconverted valuelet money: Money = 145.24 print(money) // prints "$160.60" print(money.floatValue) // prints "145.24"
Declaration
Swift
public var subtotal: Money
-
The type of the elements of an array literal.
Declaration
Swift
public typealias Element = P
-
A type that represents a position in the collection.
Declaration
Swift
public typealias Index = Array<P>.Index
-
The subtotal and adding shipping. The shipping is run through
ShippingManager
, the location is managed thoughCLGeocoder
‘sreverseGeocodeLocation
method.Warning
Due to threads and async the shipping price may not have been calculated before this propertry is called, in that case shipping is set to 0.shippingCalculated
is fired so observing for this andreloading the table view will keep everything updated
Note
Will be converted automatically. Call the
.floatValue
or.integerValue
properties for non converted valueslet money: Money = 145.24 print(money) // prints "$160.60" print(money.floatValue) // prints "145.24"
Declaration
Swift
public var total: Money
-
The total discount
Note
Will be converted automatically. Call
.floatValue
or.integerValue
or.nonConvertedDecimal
to show the nonconverted valuelet money: Money = 145.24 print(money) // prints "$160.60" print(money.floatValue) // prints "145.24"
Declaration
Swift
public var discount: Money
-
A formatted date for when the basket was last updated. Ovrride dataFromat (bellow) to change the format of the date
public var dateFormat: String
Declaration
Swift
public var lastUpdated: String
-
Items are the number of ‘items’ in the basket, where as
count
is the quantity of the basket.Declaration
Swift
public var items: Int
-
The number of elements in the collection.
Declaration
Swift
public var count: Int
-
The position of the first element in a nonempty collection.
Declaration
Swift
public var startIndex: Index
-
The collection’s “past the end” position—that is, the position one greater than the last valid subscript argument.
Declaration
Swift
public var endIndex: Index
-
Undocumented
Declaration
Swift
public struct _Basket<P: Product> : ExpressibleByArrayLiteral, MutableCollection
-
Initialize with an array literal.
Declaration
Swift
public init(arrayLiteral indexes: Element...)
-
Initialize with an array of elements.
Declaration
Swift
public init(indexes: [Element])
-
Initialize with a single element.
Declaration
Swift
public init(index: Element)
-
Undocumented
Declaration
Swift
public struct _Basket<P: Product> : ExpressibleByArrayLiteral, MutableCollection
-
Append a single element to
self
.Declaration
Swift
public mutating func append(_ product: Element)
-
Append an
Basket
toself
.Declaration
Swift
public mutating func append(_ other: _Basket)
-
Append an array of elements to
self
.Declaration
Swift
public mutating func append(_ other: [Element])
-
Return a new
Basket
containing the elements in self and the elements inother
Declaration
Swift
public func appending(_ other: _Basket) -> _Basket
-
Return a new
Basket
containing the elements in self and the elements inother
.Declaration
Swift
public func makeIterator() -> IndexingIterator<_Basket>
-
Used when the developer wants to work with the table/collection views:
func numberOfSections(in collectionView: UICollectionView) -> Int { return basket.numberOfBaskets }
Declaration
Swift
public func numberOfBaskets() -> Int
Return Value
The number of baskets, set to 1
-
Method to work with:
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return basket.numberOfProductsInBasket() }
Declaration
Swift
public func numberOfProductsInBasket() -> Int
Return Value
Returns the count of the current basket
-
Method to mainly work with HWCollectionView but can be used by others, see example:
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = <DEQUEUE CELL> cell.object = basket.product(at: IndexPath) return cell }
Declaration
Swift
public func product(at indexPath: IndexPath) -> Element
Parameters
indexPath
The current
indexPath
for the cellReturn Value
The cell for that index path
-
Returns a Boolean value indicating whether two values are equal.
Declaration
Swift
public static func ==(lhs: _Basket, rhs: _Basket) -> Bool
Parameters
lhs
A value to compare.
rhs
A value to compare.
-
<#Description#>
Declaration
Swift
public static func +=(lhs: inout _Basket, rhs: _Basket)
Parameters
lhs
<#lhs description#>
rhs
<#rhs description#>
-
A textual representation of this instance.
Declaration
Swift
public var description: String
-
A textual representation of this instance, suitable for debugging.
Declaration
Swift
public var debugDescription: String
-
The custom mirror for this instance.
Declaration
Swift
public var customMirror: Mirror
-
<#Description#>
Declaration
Swift
public init(json: JSON)
Parameters
json
<#json description#>
-
Undocumented
Declaration
Swift
public struct _Basket<P: Product> : ExpressibleByArrayLiteral, MutableCollection
-
Undocumented
Declaration
Swift
public struct _Basket<P: Product> : ExpressibleByArrayLiteral, MutableCollection


We specialize with overall family health making sure the family stays in good condition to continue with their day to day activities
Our team is comprised of experienced doctors, nurses and lab technicians who strive to provide quality affordable healthcare services
We specialized in caring for expectant mothers right from initial pregnancy testing to pre & post-natal care and baby delivery and immunizations
We specialized in caring for expectant mothers right from initial pregnancy testing to pre & post-natal care and baby delivery and immunizations
We conduct free Checkups every first Saturday of the month. Blood pressure, blood sugar levels and baby monitoring.
painting the new waiting room, Laboratory and chapel
Installing window pane for the Laboratory
Some of the medication available in the medicine cabinet
Staff member sorting out the medication


Doing literature research can be a pain if you can’t access the sources you need. You type in dozens of keywords to retrieve relevant articles from electronic journal databases, only to conclude, the article that you really want to have, is unavailable to you. Your university simply does not have a subscription to that journal. How to bypass this agonising restriction?
- Well, obviously, you could just go ahead and cite the abstract (by the way, check APA Style for how to do that!). Not the best advice to follow, though – what if they used a funny method to get the data? What if there are some controversies to your study? Better to read the whole thing, just to be sure.
Your other options are:
- Google it. Google the title in quotation marks. You end up with a bunch of other articles that cite it, but if you get lucky, the authors have uploaded the article to their home page or someone else has made it openly accessible. Also, tons of books are available online in Google books for example.
- Write to the authors. Seriously. Most scientists will be most flattered you’re interested in their work. They may even suggest you some further reading.
- Ask your friends’ help. Know anyone from another university? Maybe they do have access to the journal?
- Just switch your location, some universities provide access to databases based on your IP address.
- Order it from another library. Many libraries offer a service to exchange articles and books they have bought. This may cost you some, though, but it may be worth it.
- Ask your university library to subscribe to the journal or buy the copy of the book. It probably won’t help your situation as soon as you would like, but if there will be plenty of similar requests, they just might do something about it!


Welcome to the DoV console! Type 'help' to see a list of available commands, or 'help [command]' for information about a specific command.
Submit


Turn HTML into a link that is the site.
/render
endpoint to render the base64 encoded HTML in an iframe.
To make tiny websites where the URL effectively is the website. The strings produced can be pasted into a URL bar directly. This is great if you're sharing content that doesn't merit hosting, for example an ephemeral HTML report.
A problem arises when someone is on their phone since most messaging apps won't recognize the string as a URL. We address that by providing a /render
endpoint that takes a context
attribute. This endpoint returns an iframe with the base64 string as the value for the src
attribute. The link can be shared and, given it's a valid url, can be opened on mobile devices.
Browsers can render base64 encoded content. Base64 encoding is often used for images or svgs in css since the image can be encoded in the css file reducing the need for additional requests [1].
HTML can be similarly encoded. Check the source for the /api
endpoint for the code. It simply:
data:text/html;base64,
prefix./render
endpoint as the content
param and that endpoint will return an iframe with content
as the src
.
I often want to send very small pieces of information to a co-worker, some of which is best displayed in tables. I have some python scripts that pull data and generate these neat tables which I prefer to print to the terminal (shout out to tabulate). But, if I need to share this information, HTML is a much better format. The tabulate library has an HTML output option, but I don't want to set up hosting for such ephemeral information. It's easy to pipe the HTML to a script that bas64 encodes it and adds the 'data:text/html;base64,'
prefix. The resulting string can then be opened in the browser.
However! This is not the case on mobile. The string isn't recognized as a URL and the workarounds are just too many steps (open in Firefox Focus or copy and paste into a mobile Browser). But if I pass the base64 string as a query parameter to an endpoint that simply returns it as the src in an iframe (as suggested in this SO Answer), we're in business. I can now send these one-offs (that dont' require persistence) to folks on mobile devices and they can open them like any other link.


After a lengthy design process and preliminary foundations in Julia 0.5, Julia 0.6 includes new facilities for writing code in the “vectorized” style (familiar from Matlab, Numpy, R, etcetera) while avoiding the overhead that this style of programming usually imposes: multiple vectorized operations can now be “fused” into a single loop, without allocating any extraneous temporary arrays.
This is best illustrated with an example (in which we get
order-of-magnitude savings in memory and time, as demonstrated below). Suppose we have
a function f(x) = 3x^2 + 5x + 2
that evaluates a polynomial,
and we want to evaluate f(2x^2 + 6x^3 - sqrt(x))
for a whole array X
,
storing the result in-place in X
. You can now do:
X .= f.(2 .* X.^2 .+ 6 .* X.^3 .- sqrt.(X))
or, equivalently:
@. X = f(2X^2 + 6X^3 - sqrt(X))
and the whole computation will be fused into a single loop, operating in-place, with performance comparable to the hand-written “devectorized” loop:
for i in eachindex(X)
x = X[i]
X[i] = f(2x^2 + 6x^3 - sqrt(x))
end
(Of course, like all Julia code, to get good performance both of these snippets should be executed inside some function, not in global scope.) To see the details of a variety of performance experiments with this example code, follow along in the attached IJulia/Jupyter notebook: we find that the
X .= ...
code has performance within 10% of the hand-devectorized loop (which itself is within 5% of the
speed of C code),
except for very small arrays where there is a modest overhead (e.g. 50% overhead for a length-1 array X
).
In this blog post, we delve into some of the details of this new development, in order to answer questions that often arise when this feature is presented:
What is the overhead of traditional “vectorized” code? Isn’t vectorized code supposed to be fast already?
Why are all these dots necessary? Couldn’t Julia just optimize “ordinary” vector code?
Is this something unique to Julia, or can other languages do the same thing?
The short answers are:
Ordinary vectorized code is fast, but not as fast as a hand-written loop (assuming loops are efficiently compiled, as in Julia) because each vectorized operation generates a new temporary array and executes a separate loop, leading to a lot of overhead when multiple vectorized operations are combined.
The dots allow Julia to recognize the “vectorized” nature of the
operations at a syntactic level (before e.g. the type of x
is known),
and hence the loop fusion is a syntactic guarantee, not a
compiler optimization that may or may not occur for carefully written code. They also allow the caller to “vectorize” any function, rather than relying on the function author. (The @.
macro lets you add dots to every operation in an expression, improving readability for expressions with lots of dots.)
Other languages have implemented loop fusion for vectorized operations, but typically for only a small set of types and operations/functions that are known to the compiler or vectorization library. Julia’s ability to do it generically, even for user-defined array types and functions/operators, is unusual and relies in part on the syntax choices above and on its ability to efficiently compile higher-order functions.
Finally, we’ll review why, since these dots actually correspond to
broadcast
operations, they can combine arrays and scalars, or combine containers
of different shapes and kinds, and we’ll compare broadcast
and map
. Moreover, Julia 0.6 expanded and
clarified the notion of a “scalar” for broadcast
, so that it is not limited to numerical operations: you can use broadcast
and fusing “dot calls” for many other
tasks (e.g. string processing).
To explore this question (also discussed in this blog post), let’s begin by rewriting the code above in a more traditional vectorized style, without so many dots, such as you might use in Julia 0.4 or in other languages (most famously Matlab, Python/Numpy, or R).
X = f(2 * X.^2 + 6 * X.^3 - sqrt(X))
Of course, this assumes that the functions sqrt
and f
are “vectorized,”
i.e. that they accept vector arguments X
and compute the
function elementwise. This is true of sqrt
in Julia 0.4, but it
means that we have to rewrite our function f
from above in a vectorized style, as
e.g. f(x) = 3x.^2 + 5x + 2
(changing f
to use the elementwise operator .^
because
vector^scalar
is not defined). (If we were using Julia 0.4 and cared a lot about efficiency,
we might have instead used the @vectorize_1arg f Number
macro to generate
more specialized elementwise code.)
As an aside, this example illustrates an annoyance with the vectorized style:
you have to decide in advance whether a given function f(x)
will also be applied elementwise to arrays, and either
write it specially or define a corresponding elementwise method.
(Our function f
accepts any x
type, and in Matlab or R there is no distinction between
a scalar and a 1-element array. However, even if a function accepts an array argument x
,
that doesn’t mean it will work elementwise
for an array unless you write the function with that in mind.)
For library functions like sqrt
, this means that the library authors
have to guess at which functions should have vectorized methods, and users
have to guess at what vaguely defined subset of library functions work
for vectors.
One possible solution is to vectorize every function automatically. The
language Chapel
does this: every function f(x...)
implicitly
defines a function f(x::Array...)
that evaluates map(f, x...)
(Chamberlain et al, 2011).
This could be implemented in Julia as well via
function-call overloading (Bezanson, 2015: chapter 4),
but we chose to go in a different direction.
Instead, starting in Julia 0.5, any function f(x)
can be applied elementwise
to an array X
with the “dot call” syntax f.(X)
.
Thus, the caller decides which functions to vectorize. In Julia 0.6,
“traditionally” vectorized library functions like sqrt(X)
are deprecated in
favor of sqrt.(X)
, and dot operators
like x .+ y
are now equivalent to
dot calls (+).(x,y)
. Unlike Chapel’s implicit vectorization, Julia’s
f.(x...)
syntax corresponds to broadcast(f, x...)
rather than map
,
allowing you to combine arrays and scalars or arrays of different shapes/dimensions. (broadcast
and map
are compared at the end of this post; each
has its own unique capabilities.)
From the standpoint of the programmer, this adds a certain amount of
clarity because it indicates explicitly when an elementwise operation
is occuring. From the standpoint of the compiler, dot-call syntax
enables the syntactic loop fusion optimization described in more detail
below, which we think is an overwhelming advantage of this style.
In many dynamically typed languages popular for interactive technical computing
(Matlab, Python, R, etc.), vectorization is seen as a key (often the key)
performance optimization. It allows your code to take advantage of highly
optimized (perhaps even parallelized) library routines for basic operations like
scalar*array
or sqrt(array)
. Those functions, in turn, are usually
implemented in a low-level language like C or Fortran. Writing your own
“devectorized” loops, in contrast, is too slow, unless you are willing to drop
down to a low-level language yourself, because the semantics of those dynamic
languages make it hard to compile them to efficient code in general.
Thanks to Julia’s design, a properly written devectorized loop in Julia
has performance within a few percent of C or Fortran, so there is no necessity
of vectorizing; this is explicitly demonstrated for the devectorized
loop above in the accompanying notebook. However, vectorization may still be convenient for some problems.
And vectorized operations like scalar*array
or sqrt(array)
are still fast in Julia
(calling optimized library routines, albeit ones written in Julia itself).
Furthermore, if your problem involves a function that does not have a pre-written,
highly optimized, vectorized library routine in Julia, and that does not
decompose easily into existing vectorized building blocks like scalar*array
, then
you can write your own building block without dropping down to a low-level language.
(If all the performance-critical code you will ever need already existed in the
form of optimized library routines, programming would be a lot easier!)
There is a tension between two general principles in computing: on the one hand, re-using highly optimized code is good for performance; on the other other hand, optimized code that is specialized for your problem can usually beat general-purpose functions. This is illustrated nicely by the traditional vectorized version of our code above:
f(x) = 3x.^2 + 5x + 2
X = f(2 * X.^2 + 6 * X.^3 - sqrt(X))
Each of the operations like X.^2
and 5*X
individually
calls highly optimized functions, but their combination
leaves a lot of performance on the table when X
is an array. To see that,
you have to realize that this code is equivalent to:
tmp1 = X.^2
tmp2 = 2*tmp1
tmp3 = X.^3
tmp4 = 6 * tmp3
tmp5 = tmp2 + tmp4
tmp6 = sqrt(X)
tmp7 = tmp5 - tmp6
X = f(tmp7)
That is, each of these vectorized operations allocates a separate temporary array, and is a separate library call with its own inner loop. Both of these properties are bad for performance.
First, eight arrays are allocated (tmp1
through tmp7
, plus another
for the result of f(tmp7)
, and another four are allocated
internally by f(tmp7)
for the same reasons, for 12 arrays in all.
The resulting X = ...
expression does not update X
in-place, but
rather makes the variable X
“point” to a new array returned by f(tmp7)
,
discarding the old array X
. All of these extra arrays are eventually
deallocated by Julia’s garbage collector, but in the meantime it wastes
a lot of memory (an order of magnitude!)
By itself, allocating/freeing memory can take a significant amount of time
compared to our other computations. This is especially true if X
is very small
so that the allocation overhead matters (in our benchmark notebook, we pay
a 10× cost for a 6-element array and a 6× cost for a 36-element array), or if
X
is very large so that the memory churn matters (see below for numbers).
Furthermore, you pay a different performance price from the fact that you have
12 loops (12 passes over memory) compared to one, in part because of the loss of
memory locality.
In particular, reading or writing data in main computer memory (RAM) is much slower than performing scalar arithmetic operations like +
and *
, so computer hardware stores recently used data in a cache: a small amount
of much faster memory. Furthermore, there is a hierarchy of smaller,
faster caches, culminating in the register memory
of the CPU itself. This means that, for good performance, you should
load each datum x = X[i]
once (so that it goes into cache, or into a register for small enough types), and
then perform several operations like f(2x^2 + 6x^3 - sqrt(x))
on x
while you still have fast access to it, before loading the next datum;
this is called “temporal locality.” The traditional vectorized code
discards this potential locality: each X[i]
is loaded once for a
single small operation like 2*X[i]
, writing the result out to a temporary
array before immediately reading the next X[i]
.
In typical performance benchmarks (see notebook), therefore, the traditional
vectorized code X = f(2 * X.^2 + 6 * X.^3 - sqrt(X))
turns out to be about
10× slower than the devectorized or fused-vectorized versions of the same code
at the beginning of this article for X = zeros(10^6)
. Even if we
pre-allocate all of the temporary arrays (completely eliminating the allocation
cost), our benchmarks show that performing a separate loop for each operation
still is about 4–5× slower for a million-element X
. This is not unique to
Julia! Vectorized code is suboptimal in any language unless the
language’s compiler can automatically fuse all of these loops (even ones that
appear inside function calls), which rarely happens for the reasons described
below.
You might look at an expression like 2 * X.^2 + 6 * X.^3 - sqrt(X)
and
think that it is “obvious” that it could be combined into a single loop
over X
. Why can’t Julia’s compiler be smart enough to recognize this?
The thing that you need to realize is that, in Julia, there is nothing
particularly special about +
or sqrt
— they are arbitrary functions
and could do anything. X + Y
could send an email or open
a plotting window, for all the compiler knows. To figure out that it
could fuse e.g. 2*X + Y
into a single loop, allocating a single
array for the result, the compiler would need to:
Deduce the types of X
and Y
and figure out what *
and +
functions
to call. (Julia already does this, at least when type inference succeeds.)
Look inside of those functions, realize that they are elementwise loops over X
and Y
, and realize that they are pure
(e.g. 2*X
has no side-effects like modifying Y
).
Analyze expressions like X[i]
(which are calls to a function getindex(X, i)
that is “just another function” to the compiler), to detect that they
are memory reads/writes and determine what data dependencies they imply
(e.g. to figure out that 2*X
allocates a temporary array that can be eliminated).
The second and third steps pose an enormous challenge: looking at an arbitrary function and “understanding” it at this level turns out to be a very hard problem for a computer. If fusion is viewed as a compiler optimization, then the compiler is only free to fuse if it can prove that fusion won’t change the results, which requires the detection of purity and other data-dependency analyses.
In contrast, when the Julia compiler sees an expression like 2 .* X .+ Y
,
it knows just from the syntax (the “spelling”) that these are elementwise
operations, and Julia guarantees that the code will always fuse into a single
loop, freeing it from the need to prove purity. This is what we
term syntactic loop fusion, described in more detail below.
One approach that may occur to you, and which has been implemented in a
variety of languages (e.g. Kennedy & McKinley, 1993;
Lewis et al., 1998;
Chakravarty & Keller, 2001;
Manjikian & Abdelrahman, 2002;
Sarkar, 2010;
Prasad et al., 2011;
Wu et al., 2012), is to only
perform loop fusion for a few “built-in” types and operations that the
compiler can be designed to recognize. The same idea has also been
implemented as libraries (e.g. template libraries in C++:
Veldhuizen, 1995) or
domain-specific
languages (DSLs)
as extensions of existing languages; in Python, for example, loop fusion for a small
set of vector operations and array/scalar types can be found in the
Theano,
PyOP2, and Numba
software. Likewise, in Julia we could
potentially build the compiler to recognize that it can fuse
*
, +
, .^
, and similar operations for the built-in Array
type,
(and perhaps only for a few scalar types).
This has, in fact, already been implemented in Julia as a macro-based DSL (you add @vec
or @acc
decorators to a vectorized expression) in the Devectorize
and ParallelAccelerator
packages.
However, even though Julia will certainly implement additional compiler
optimizations as time passes, one of the key principles of Julia’s design
is to “build in” as little as possible into the core language, implementing
as much as possible of Julia in Julia itself (Bezanson, 2015).
Put another way, the same optimizations should be just as available to user-defined
types and functions as to the “built-in” functions of Julia’s standard library
(Base
). You should be able to define your own array types
(e.g. via the StaticArrays
package or PETSc arrays)
and functions (such as our f
above), and have them be capable of fusing vectorized operations.
Moreover, a difficulty with fancy compiler optimizations is that, as a programmer, you are often unsure whether they will occur. You have to learn to avoid coding styles that accidentally prevent the compiler from recognizing the fusion opportunity (e.g. because you called a “non-built-in” function), you need to learn to use additional compiler-diagnostic tools to identify which optimizations are taking place, and you need to continually check these diagnostics as new versions of the compiler and language are released. With vectorized code, losing a fusion optimization may mean wasting an order of magnitude in memory and time, so you have to worry much more than you would for a typical compiler micro-optimization.
In contrast, Julia’s approach is quite simple and general: the caller
indicates, by adding dots, which function calls and operators are
intended to be applied elementwise (specifically, as broadcast
calls).
The compiler notices these dots at parse time (or technically
at “lowering” time, but in any case long before it knows
the types of the variables etc.), and transforms them into calls to
broadcast
. Moreover, it guarantees that nested “dot calls” will
always be fused into a single broadcast call, i.e. a single loop.
Put another way, f.(g.(x .+ 1))
is treated by Julia as merely
syntactic sugar for
broadcast(x -> f(g(x + 1)), x)
. An assignment y .= f.(g.(x .+ 1))
is treated as sugar for the in-place operation
broadcast!(x -> f(g(x + 1)), y, x)
. The compiler need not prove
that this produces the same result as a corresponding non-fused operation,
because the fusion is a mandatory transformation defined as part
of the language, rather than an optional optimization.
Arbitrary user-defined functions f(x)
work with this mechanism,
as do arbitrary user-defined collection types for x
, as long as you
define broadcast
methods for your collection. (The default
broadcast
already works for any subtype of AbstractArray
.)
Moreover, dotted operators are now available for not just
the familiar ASCII operators like .+
, but for any
character that Julia parses as a binary operator. This includes
a wide array of Unicode symbols like ⊗
, ∪
, and ⨳
, most
of which are undefined by default. So, for example, if you
define ⊗(x,y) = kron(x,y)
for the Kronecker product,
you can immediately do [A, B] .⊗ [C, D]
to compute the
“elementwise” operation [A ⊗ C, B ⊗ D]
, because x .⊗ y
is sugar for broadcast(⊗, x, y)
.
Note that “side-by-side” binary operations are actually equivalent
to nested calls, and hence they fuse for dotted operations. For
example 3 .* x .+ y
is equivalent to (+).((*).(3, x), y)
, and
hence it fuses into broadcast((x,y) -> 3*x+y, x, y)
. Note
also that the fusion stops only when a “non-dot” call is encountered,
e.g. sqrt.(abs.(sort!(x.^2)))
fuses the sqrt
and abs
operations
into a single loop, but x.^2
occurs in a separate loop (producing
a temporary array) because of the intervening non-dot function call
sort!(...)
.
For the sake of completeness, we should mention some other possibilities that would partly address the problems of vectorization. For example, functions could be specially annotated to declare that they are pure, one could specially annotate container types with array-like semantics, etcetera, to help the compiler recognize the possibility of fusion. But this imposes a lot of requirements on library authors, and once again it requires them to identify in advance which functions are likely to be applied to vectors (and hence be worth the additional analysis and annotation effort).
Another approach that has been suggested is to define updating operators
like x += y
to be equivalent to calls to a special function,
like x = plusequals!(x, y)
, that can be defined as an in-place operation, rather
than x += y
being a synonym for x = x + y
as in Julia today.
(NumPy does this.)
By itself, this can be used to avoid temporary arrays in some simple cases by breaking them into a sequence of in-place updates, but
it doesn’t handle more complex expressions, is limited to a few
operations like +
, and doesn’t address the cache inefficiency of
multiple loops. (In Julia 0.6, you can do x .+= y
and it is
equivalent to x .= x .+ y
, which does a single fused loop in-place,
but this syntax now extends to arbitrary combinations of arbitrary functions.)
Obviously, Julia’s approach of syntactic loop fusion relies partly on the
fact that, as a young language, we are still relatively free to
redefine core syntactic elements like f.(x)
and x .+ y
. But
suppose you were willing to add this or similar syntax to an
existing language, like Python or Go, or create a DSL add-on on top of those
languages as discussed above; would you then be able to
implement the same fusing semantics efficiently?
There is a catch: 2 .* x .+ x .^ 2
is sugar for
broadcast(x -> 2*x + x^2, x)
in Julia, but for this to be
fast we need the higher-order function
broadcast
to be very fast as well. First, this
requires that arbitrary user-defined scalar (non-vectorized!) functions like
x -> 2*x + x^2
be compiled to fast code, which is often a challenge
in high-level dynamic languages. Second, it ideally requires that
higher-order functions like broadcast
be able to inline
the function argument x -> 2*x + x^2
, and this facility is even
less common. (It wasn’t available in Julia until version 0.5.)
Also, the ability of broadcast
to combine arrays and scalars or
arrays of different shapes (see below) turns out to be subtle to
implement efficiently without losing generality. The current
implementation relies on a metaprogramming feature that Julia provides
called generated
functions
in order to get compile-time specialization on the number and types of
the arguments. An alternative solution to the inlining and
specialization issues would be to build the broadcast
function into
the compiler, but then you might lose the ability of broadcast
to be
overloadable for user-defined containers, nor could users write their
own higher-order functions with similar functionality.
In particular, consider
a naive implementation of broadcast
(only for one-argument functions):
function naivebroadcast(f, x)
y = similar(x)
for i in eachindex(x)
y[i] = f(x[i])
end
return y
end
In Julia, as in other languages, f
must be some kind of function
pointer or function
object. Normally, a call
f(x[i])
to a function object f
must figure out where the actual machine
code for the function is (in Julia,
this involves dispatching on the type of x[i]
; in object-oriented languages,
it might involve dispatching on the type of f
), push the argument x[i]
etcetera to f
via a register and/or a call stack,
jump to the machine instructions to execute them, jump back to
the caller naivebroadcast
, and extract the return value.
That is, calling a function argument f
involves some overhead beyond
the cost of the computations inside f
.
If f(x)
is expensive enough, then the overhead of the function call may be negligible,
but for a cheap function like f(x) = 2*x + x^2
the overhead can be very
significant: with Julia 0.4, the overhead is roughly a factor of two compared
to a hand-written loop that evaluates z = x[i]; y[i] = 2*z + z^2
. Since lots
of vectorized code in practice evaluates relatively cheap functions like this,
it would be a big problem for a generic vectorization method based on broadcast
. (The function call also inhibits SIMD optimization
by the compiler, which prevents computations in f(x)
from
being applied simultaneously to several x[i]
elements.)
However, in Julia 0.5, every function has its own type. And, in Julia,
whenever you call a function like naivebroadcast(f, x)
, a specialized version
of naivebroadcast
is compiled for typeof(f)
and typeof(x)
. Since
the compiled code is specific to typeof(f)
, i.e. to the specific function
being passed, the Julia compiler is free to inline f(x)
into the generated code
if it wants to, and all of the function-call overhead can disappear.
Julia is neither the first nor the only language that can inline
higher-order functions; e.g. it is reportedly possible in Haskell and in
the Kotlin language.
Nevertheless, it seems to be a rare feature, especially in imperative languages. Fast
higher-order functions are a key ingredient of Julia that allows
a function like broadcast
to be written in Julia itself (and
hence be extensible to user-defined containers), rather than having
to be built in to the compiler (and probably limited to “built-in” container types).
Dot calls correspond to the broadcast
function in Julia. Broadcasting
is a powerful concept (also found, for example, in NumPy and
Matlab) in which
the concept of “elementwise” operations is extended to encompass combining
arrays of different shapes or arrays and scalars. Moreover, this is
not limited to arrays of numbers, and starting in Julia 0.6 a
“scalar” in a broadcast
context can be an object of an arbitrary type.
You may have noticed that the examples above included expressions like
6 .* X.^3
that combine an array (X
) with scalars (6
and 3
).
Conceptually, in X.^3
the scalar 3
is “expanded” (or “broadcasted”)
to match the size of X
, as if it became an array [3,3,3,...]
,
before performing ^
elementwise. In practice of course, no array
of 3
s is ever explicitly constructed.
More generally, if you combine two arrays of different dimensions or shapes,
any “singleton” (length 1) or missing dimension of one array is “broadcasted”
across that dimension of the other array. For example, A .+ [1,2,3]
adds [1,2,3]
to each column of a 3×n matrix A
. Another typical
example is to combine a row vector (or a 1×n array) and a column vector to make a matrix
(2d array):
julia> [1 2 3] .+ [10,20,30]
3×3 Array{Int64,2}:
11 12 13
21 22 23
31 32 33
(If x
is a row vector, and y
is a column vector, then A = x .+ y
makes
a matrix with A[i,j] = x[j] + y[i]
.)
Although other languages have also implemented similar broadcast
semantics,
Julia is unusual in being able to support such operations for arbitrary user-defined
functions and types with performance comparable to hand-written C loops, even though
its broadcast
function is written entirely in Julia with no special support
from the compiler. This not only requires efficient compilation and
higher-order inlining as mentioned above, but also the ability
to efficiently iterate over arrays of arbitrary dimensionalities determined
at compile-time for each caller.
Although the examples above were all for numeric computations, in fact
neither the broadcast
function nor the dot-call fusion syntax is limited
to numeric data. For example:
julia> s = ["The QUICK Brown", "fox jumped", "over the LAZY dog."];
julia> s .= replace.(lowercase.(s), r"\s+", "-")
3-element Array{String,1}:
"the-quick-brown"
"fox-jumped"
"over-the-lazy-dog."
Here, we take an array s
of strings, we convert each string to
lower case, and then we replace any sequence of whitespace (the regular expression
r"\s+"
) with a hyphen "-"
. Since these two dot calls are nested,
they are fused into a single loop over s
and are written in-place in s
thanks to the s .= ...
(temporary strings are allocated in this process,
but not temporary arrays of strings). Furthermore, notice that the
arguments r"\s+"
and "-"
are treated as “scalars” and are “broadcasted”
to every element of s
.
The general rule (starting in Julia 0.6) is that, in broadcast
, arguments of any type are
treated as scalars by default. The main exceptions are arrays (subtypes of
AbstractArray
) and tuples, which are treated as containers and are iterated
over. (If you define your own container type that is not a subtype of
AbstractArray
, you can tell broadcast
to treat it as a container to
be iterated over by overloading Base.Broadcast.containertype
and a
couple of other functions.)
Since the dot-call syntax corresponds to broadcast
, and broadcast
is just an
ordinary Julia function to which you can add your own methods (as opposed to
some kind of privileged compiler built-in), many possibilities open up. Not
only can you extend fusing dot calls to your own data structures (e.g.
DistributedArrays
extends broadcast
to work for arrays
distributed across multiple
computers), but you can apply the same syntax to data types that are hardly
“containers” at all.
For example, the ApproxFun
package defines an object called a Fun
that represents a numerical
approximation of a user-defined function (essentially, a Fun
is a fancy
polynomial fit). By defining broadcast
methods for
Fun
, you can
now take an f::Fun
and do, for example, exp.(f.^2 .+ f.^3)
and it will
translate to broadcast(y -> exp(y^2 + y^3), f)
. This broadcast
call, in
turn, will evaluate exp(y^2 + y^3)
for y = f(x)
at cleverly selected x
points, construct a polynomial fit, and return a new Fun
object representing
the fit. (Conceptually, this replaces elementwise operations on containers
with pointwise operations on functions.) In contrast, ApproxFun also allows
you to compute the same result using exp(f^2 + f^3)
, but in this case it will go
through the fitting process four times (constructing four Fun
objects), once
for each operation like f^2
, and is more than an order of magnitude slower
due to this lack of fusion.
Finally, it is instructive to compare broadcast
with map
, since map
also
applies a function elementwise to one or more arrays. (The dot-call
syntax invokes broadcast
, not map
.) The basic differences are:
broadcast
handles only containers with “shapes” M×N×⋯ (i.e., a size
and dimensionality), whereas map
handles “shapeless” containers like Set
or iterators of
unknown length like eachline(file)
.
map
requires all arguments to have the same length (and
hence cannot combine arrays and scalars) and (for array containers) the same shape, whereas broadcast
does
not (it can “expand” smaller containers to match larger ones).
map
treats all arguments as containers by default, and in particular
expects its arguments to act as iterators.
In contrast, broadcast
treats its arguments as scalars by default (i.e., as 0-dimensional arrays
of one element), except for a few types like AbstractArray
and Tuple
that are explicitly declared to be broadcast containers.
Sometimes, of course, their behavior coincides, e.g. map(sqrt, [1,2,3])
and
sqrt.([1,2,3])
give the same result. But, in general, neither map
nor broadcast
generalizes the other — each has things they can do that
the other cannot.


Christian Jerthy M. Orano
Front-end web developer
About | Skills | Experience | Education | Contact
ABOUT ME
About


Index
inaccurate sensor, placement of, 137
inconsistent state, speculation leading to, 144
inference mind games, 54–64
Information Gain mind game, 10–11
Information Theory, 29–30
“in-or-outs” in Using Your Marbles, 31
inserts in a dynamic programming matrix, 151
invisible hand of the free market, 15
irrationality, attributed to omission bias, 21


Text Utils
Search
ERROR..!
Somthing went Wrong. Please select one/more Option.
Go Back to Home page
HOME


AWS Cloud Map ServiceDiscovery Service HealthCheckCustomConfig
The
HealthCheckCustomConfig
property type specifies information about an optional custom health check.
HealthCheckCustomConfig
is a property of the AWS::ServiceDiscovery::Service resource.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "FailureThreshold" :
Double
}
YAML
FailureThreshold:
Double
Properties
FailureThreshold
-
The number of 30-second intervals that you want service discovery to wait after receiving an
UpdateInstanceCustomHealthStatus
request before it changes the health status of a service instance. For example, suppose you specify a value of 2 forFailureTheshold
, and then your application sends anUpdateInstanceCustomHealthStatus
request. Service discovery waits for approximately 60 seconds (2 x 30) before changing the status of the service instance based on that request.Sending a second or subsequent
UpdateInstanceCustomHealthStatus
request with the same value beforeFailureThreshold
x 30 seconds has passed doesn't accelerate the change. Service discovery still waitsFailureThreshold
x 30 seconds after the first request to make the change.Minimum value of 1. Maximum value of 10.
Required: No
Type: Double
Update requires: No interruption
See Also
-
HealthCheckCustomConfig in the AWS Cloud Map API Reference


We can create a new Vue instance with:
You don't have to register every component globally. You can make a component available only in the scope of another instance/component by registering it with components
DOM template parsing caveats
Most of the options that can be passed into the Vue constructor can be used in a component, with one special case: data must be a function.
It's good to understand why the rules exist though
Since all three component instance share the same data object, incrementing one counter increments them all.
A prop is a custom attribute for passing infomation from parent component. A child component needs to explicitly declare the props it expects to receive using the props option
HTML attribute are case-insensitive, so when using non-string template, camelCased prop names need to use their kebab-case equivalents
Similar to binding a normal attribute to an expression, we can also use v-bind for dynamically binding props to data on the parent.


ScholarX is an exclusive 6-month program aimed at providing mentoring support to a selected pool of high Potential undergraduate students based in Sri Lanka ideally by a Sri Lankan expat currently engaged with one of the world’s top universities or Fortune 500 companies. It’s our free premium mentoring platform by Sri Lankans for Sri Lankans working towards creating a culture of knowledge and expertise sharing without the limitation of geographical borders.
| Application opens | 1 March, 2020 |
| Application closes | 4 April, 2020 |
| Winners announced | 21 April, 2020 - 30 April, 2020 |
| Mentor-mentee bonding period | 1 May, 2020 - 8 May, 2020 |
| Official start date of ScholarX | 14 May, 2020 |
| Mid Evaluation | 14 August, 2020 |
| End of program | 14 November, 2020 |
| Graduation | 20 November, 2020 |
| Name | University | Mentor | |
|---|---|---|---|


Documentation
Currently viewing documentation for version 5.x.
Currently viewing documentation for version 5.x.
There are some caveats to using Bootbox dialogs in place of native dialogs. Please see the Known Limitations section to learn more.
A simple alert dialog with a single button. Pressing the ESC key or clicking the close button dismisses the dialog.
This is the simplest usage of Bootbox, requiring only the text of the message you wish to show.
bootbox.alert("Your message here…")
Your message can also contain HTML.
bootbox.alert("Your message here…")
If you have code that should not be evaluated until the user has dismissed the alert (see Bootbox Limitations below), call it within the callback function:
bootbox.alert("Your message here…", function(){ /* your callback code */ })
Alerts can be customized, using the options described below. Here's an example
of a small alert, using size
:
bootbox.alert({
size: "small",
title: "Your Title",
message: "Your message here…",
callback: function(){ /* your callback code */ }
})
Requires Bootstrap 3.1.0 or newer.
A confirm dialog with a cancel and a confirm button. Pressing the ESC key or clicking close () dismisses the dialog and invokes the callback as if the user had clicked the Cancel button.
Confirm dialogs require a callback function.
The simplest method of using the confirm()
dialog requires the text of the message you wish
to show and a callback to handle the user's selection. The callback function is passed a value of true
or false, depending on which button the user pressed.
bootbox.confirm("Are you sure?", function(result){ /* your callback code */ })
All Bootstrap modals, unlike native alerts, confirms, or prompts, are non-blocking.
Keep that in mind when using the confirm()
dialog, as it is not a drop-in replacement for native confirm dialogs.
Any code that depends on the user's selection must be placed in the callback function.
Confirm dialogs can be customized, using the options described below. Here's
an example of a small confirm, using size
:
bootbox.confirm({
size: "small",
message: "Are you sure?",
callback: function(result){ /* result is a boolean; true = OK, false = Cancel*/ }
})
Requires Bootstrap 3.1.0 or newer.
A dialog which prompts for user input. Pressing the ESC key or clicking close () dismisses the dialog and invokes the callback as if the user had clicked the Cancel button.
Prompt dialogs require a callback function.
The simplest usage of the prompt()
dialog requires the text of the message you wish to show
and a callback to handle the user's input. The value entered will be null if the user cancelled
or dismissed the dialog; otherwise it is passed the value of the text input.
bootbox.prompt("What is your name?", function(result){ /* your callback code */ })
All Bootstrap modals, unlike native alerts, confirms, or prompts, are non-blocking.
Keep that in mind when using the prompt()
dialog, as it is not a drop-in replacement for native prompt dialogs.
Any code that depends on the user's input must be placed in the callback function.
Prompt dialogs can also be customized, using the options described below. Here's
an example of a small prompt, using size
:
bootbox.prompt({
size: "small",
title: "What is your name?",
callback: function(result){ /* result = String containing user input if OK clicked or null if Cancel clicked */ }
})
Requires Bootstrap 3.1.0 or newer.
Prompt requires the title
option (when using the options object). You may use the message
option, but the prompt result will not include any form values from your message.
Prompt dialogs are (by default) single-line text inputs. You can modify the type of prompt Bootbox generates using the prompt-only options below.
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| value | String | Number | Array |
You can set the initial value of the prompt using the
To pre-select more than one value (when using the checkbox type), use an array for the |
||||||||||||||||||||||||
| inputType |
String |
Changes the type of input generated for the prompt dialog. Valid values, with their class selectors:
Additionally, checkbox and radiobuttons are wrapped in a parent element,
Date input type and browser support
At the time this is written, every major browser which supports the YYYY = four-digit year MM = two-digit month (01=January, etc.) DD = two-digit day of month (01 through 31) |
||||||||||||||||||||||||
| inputOptions | Array |
If you specify
|
||||||||||||||||||||||||
| min, max | String | Number | Date string | Time string |
The
For
For
For |
||||||||||||||||||||||||
| step | String | Number |
The
Can be the string value
Warning: For most browsers, date inputs are buggy in their implementation of See the MDN article for more information. |
||||||||||||||||||||||||
| maxlength | Number |
Set the
Valid for
Default: |
||||||||||||||||||||||||
| pattern | String |
Set the
Can be added for any input type, but generally only used for
Default: |
||||||||||||||||||||||||
| placeholder | String |
Set the
There is no real limit on the amount of text you may use for your placeholder, but
keep in mind that the placeholder disappears when the input either has focus (depending on
the browser) or has a value. Use the
Valid for
If specified for
Default: |
||||||||||||||||||||||||
| required | Boolean |
Set the
Valid for
Default: |
Please see the Examples page for more examples of prompt dialogs.
A completely customisable dialog method which takes a single argument - an options object.
Custom dialogs do not close automatically when the ESC key is pressed; you must implement
this behavior yourself using the onEscape
option.
The minimum required to create a custom dialog is the message
option, which will create
a non-dismissable dialog (useful as a "loading" overlay).
bootbox.dialog({
message: '
 Loading...
'
})
As noted above, the only required option for a custom dialog is message
. Also,
custom dialogs
do not utilize a global callback;
each button you add should have it's own callback function. Here's
an example with many of the options utilized:
bootbox.dialog({
title: 'Custom Dialog Example',
message: '
This dialog demonstrates many of the options available when using the Bootbox library
',
size: 'large',
onEscape: true,
backdrop: true,
buttons: {
fee: {
label: 'Fee',
className: 'btn-primary',
callback: function(){
}
},
fi: {
label: 'Fi',
className: 'btn-info',
callback: function(){
}
},
fo: {
label: 'Fo',
className: 'btn-success',
callback: function(){
}
},
fum: {
label: 'Fum',
className: 'btn-danger',
callback: function(){
}
}
}
})
Please see the Examples page for more examples of custom dialogs.
Bootbox dialogs can be configured using the options below.
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| message | String | Element |
Text (or markup) displayed in the dialog. Required for alert, confirm, and custom dialogs |
||||||
| title | String | Element |
Adds a header to the dialog and places this text (or markup) in an Required for prompt |
||||||
| callback | Function |
Required for confirm and prompt Not called for custom dialogs An alert callback should not supply an argument; it will be ignored if it does:
Confirm and prompt callbacks must supply an argument for the result; for confirm,
it will be a
or
For any callback, if you do not want the dialog to close when the callback completes, add
Default: |
||||||
| onEscape | Boolean | Function |
Allows the user to dismiss the dialog by hitting ESC, which will invoke this function. Options:
Default: |
||||||
| show | Boolean |
Whether the dialog should be shown immediately. Default: |
||||||
| backdrop | Boolean |
Whether the dialog should be have a backdrop or not. Also determines whether clicking on the backdrop dismisses the modal. Options:
Default:
* When this value is set to |
||||||
| closeButton | Boolean |
Whether the dialog should have a close button () or not. Default: |
||||||
| animate | Boolean |
Animate the dialog in and out (requires a browser which supports CSS animations). Default: |
||||||
| className | String |
An additional class to apply to the dialog wrapper. Default: |
||||||
| size | String |
Adds the relevant Bootstrap modal size class to the dialog wrapper. Valid values are
Requires Bootstrap 3.1.0 or newer. Default: |
||||||
| locale | String |
Sets the locale to use per dialog — this option does not override the default locale. Other dialogs will still use the default locale. The locale settings are used to translate the three standard button labels: OK, CONFIRM, CANCEL See the note on locales below. |
||||||
| Object |
Buttons are defined as JavaScript objects. The minimum shortform requirement to define a button is:
The complete definition of a button object is:
Options:
Each of the available button options can be overridden to use custom content (text or HTML) and CSS styles. For example:
You cannot override the callbacks for the alert, confirm, and prompt dialog's buttons. |
|||||||
| swapButtonOrder | Boolean |
Flips the order in which the buttons are rendered, from cancel/confirm to confirm/cancel. Default: |
||||||
| centerVertical | Boolean |
If Requires Bootstrap 4.1.0 or newer. Default: |
The following locales are available:
| Key | Name | Key | Name |
|---|---|---|---|
ar |
Arabic | az |
Azerbaijani |
bg_BG |
Bulgarian | br |
Portuguese - Brazil |
cs |
Czech | da |
Danish |
de |
German | el |
Greek |
en |
English | es |
Spanish / Español |
et |
Estonian | eu |
Basque |
fa |
Farsi / Persian | fi |
Finnish |
fr |
French / Français | he |
Hebrew |
hr |
Croatian | hu |
Hungarian |
id |
Indonesian | it |
Italian |
ja |
Japanese | ko |
Korean |
lt |
Lithuanian | lv |
Latvian |
nl |
Dutch | no |
Norwegian |
pl |
Polish | pt |
Portuguese |
ru |
Russian | sk |
Slovak |
sl |
Slovenian | sq |
Albanian |
sv |
Swedish | th |
Thai |
tr |
Turkish | uk |
Ukrainian |
zh_CN |
Chinese (People's Republic of China) | zh_TW |
Chinese (Taiwan / Republic of China) |
To use any locale other than en, you must do one of the following:
bootbox.all.js
or bootbox.all.min.js
file, which includes all locales.
bootbox.locales.js
or bootbox.locales.min.js
after bootbox.js
.
fr.js
to use the French locale, for example), found in the src/locales
directory.
The Bootbox object returned from each of the dialog functions is a jQuery object. As such, you can chain most jQuery functions
onto the result of a Bootbox dialog. Here's an example showing how to handle Bootstrap's shown.bs.modal
event, using .on():
var dialog = bootbox.dialog({
/* Your options... */
});
dialog.on('shown.bs.modal', function(e){
// Do something with the dialog just after it has been shown to the user...
});
If you set the show
option to false
, you can also use Bootstrap's
modal() function to show and hide your
dialog manually:
var dialog = bootbox.dialog({
show: false,
/* Your options... */
});
dialog.modal('show');
dialog.modal('hide');
The following functions can be called on an instance of a Bootbox object.
Allows the user to supply a function to be called when the dialog gets initialized.
var dialog = bootbox.dialog({
/* Your options... */
});
dialog.init(function(){
// Do something with the dialog...
});
init
can be called on any of the wrapper functions, as they all return a Bootbox/jQuery object.
The following functions can be called statically.
This method allows the user to set many of the default options shown in the dialog example. Many of these options are also applied to the basic wrapper methods and can be overridden whenever the wrapper methods are invoked with a single options argument:
Allows the user to select a locale rather than using setDefaults("locale", ...)
.
The locale settings are used to translate the three standard button labels: OK, CONFIRM, CANCEL
Default: en
Allows the user to add a custom translation for each of the built-in command buttons. The values
object should be in this format:
{
OK : '',
CANCEL : '',
CONFIRM : ''
}
Allows the user to remove a locale from the available locale settings.
Allows the user to get a locale object from the available locale settings. If name
is empty,
all locales will be returned.
Hide all currently active Bootbox dialogs. Individual dialogs can be closed as per normal Bootstrap dialogs:
dialog.modal('hide')
Using Bootbox has some caveats, as noted below.
All Bootstrap modals (and therefore Bootbox modals), unlike native alerts, confirms, or prompts, are asynchronous; meaning, the events which Bootstrap generates are non-blocking events. Because of this limitation, code that should not be evaluated until a user has dismissed your dialog must be called within the callback function of the dialog.
This is a limitation of the Bootstrap modal plugin, as noted in the official Bootstrap documentation. While it is functionally possible to trigger multiple modals, custom CSS and/or JavaScript code is required for each layer of modal to display properly.
The value(s) returned by a Bootbox prompt are not sanitized in any way.


#include <CFrameBuffer.h>
Public Member Functions | |
| CFrameBuffer (CWindow *Window) | |
| ~CFrameBuffer () | |
| void | AttachColorTexture (SharedPointer< ITexture2D > Texture, uint const Attachment) |
| void | AttachDepthTexture (SharedPointer< ITexture2D > Texture) |
| void | AttachDepthBuffer (SharedPointer< IDepthBuffer > DepthBuffer) |
| bool | CheckCorrectness () |
| virtual void | Bind () |
| Public Member Functions inherited from ion::Graphics::IFrameBuffer | |
| virtual | ~IFrameBuffer () |
| Public Member Functions inherited from ion::Graphics::IRenderTarget | |
| virtual | ~IRenderTarget () |
| Public Member Functions inherited from ion::Graphics::GL::CRenderTarget | |
| CRenderTarget (CWindow *Window) | |
| void | ClearColor () |
| void | ClearDepth () |
| void | ClearColorAndDepth () |
| void | SetClearColor (color4f const &Color) |
| virtual CImage * | ReadImage () |
| virtual IRenderTarget * | GetCurrentlyBound () |
| virtual void | SetViewport (vec2i const &Min, vec2i const &Max) |
| virtual void | ClearViewport () |
Public Attributes | |
| uint | Handle = 0 |
| vec2i | Size |
| Public Attributes inherited from ion::Graphics::GL::CRenderTarget | |
| CWindow * | Window = nullptr |
| color4f | Color |
| vec2i | ViewportMin |
| vec2i | ViewportMax |
| bool | SpecifiedViewport = false |
Additional Inherited Members | |
| Static Public Attributes inherited from ion::Graphics::GL::CRenderTarget | |
| static CRenderTarget * | CurrentlyBound = nullptr |
| ion::Graphics::GL::CFrameBuffer::CFrameBuffer | ( | CWindow * | Window | ) |
| ion::Graphics::GL::CFrameBuffer::~CFrameBuffer | ( | ) |
|
virtual |
Implements ion::Graphics::IFrameBuffer.
|
virtual |
Implements ion::Graphics::IFrameBuffer.
|
virtual |
Implements ion::Graphics::IFrameBuffer.
|
virtual |
Reimplemented from ion::Graphics::GL::CRenderTarget.
|
virtual |
Implements ion::Graphics::IFrameBuffer.
| uint ion::Graphics::GL::CFrameBuffer::Handle = 0 |
| vec2i ion::Graphics::GL::CFrameBuffer::Size |
Generated on Sun May 6 2018 for ionEngine v0.4.5