Non-Document Root Scrollers
Non document root scrollers is a proposed feature that would allow an author to endow an arbitrary scrolling element with the same specialness currently assigned to the documentElement.
The Problem
Applications are typically composed of multiple views between which a user can transition. Traditionally, a web app would transition between its views by navigating to a new page. This causes a round trip to the server and a jarring experience for the user. To improve performance and allow for pleasing transitions, the author may wish to keep multiple views within the DOM, removing the need to navigate to a new document.
Authors can do this today by making each view out of a viewport-sized, scrollable
 element. This is the intuitive solution and allows the author to animate transitions between these views and manage them as independent components.
On the other hand, browsers have given essential UX features exclusively to one special element: the documentElement (). Here are some examples of how  is special:
- URL-bar Hiding - To maximize the user's screen real-estate, the browser's URL-bar is hidden when the documentElement element is scrolled down.
- Overscroll Affordance - To let the user know the page content is fully scrolled, further scrolls generate a "glow" or "rubber-banding" effect. In Chrome, this only occurs on the documentElement.
- Pull-to-Refresh - To allow the user to quickly refresh the page, scrolling the documentElement up beyond the content top activates a refresh action in Chrome. Chrome disables this effect when the documentElement isn't scrollable.
- Spacebar to Scroll - Many browsers use the spacebar as a shortcut to scroll down by a page. This often only works for the documentElement.
- Tapping top of browser chrome - iOS Safari has this to allow the user to quickly scroll back to the top of the page but it targets only the documentElement.
Thus, authors have a choice: use the intuitive method and lose all these essential UX features, or swap the content of each view in and out of the documentElement. The latter turns out to be surprisingly difficult to implement in a portable way for all the reasons listed in the MiniApp example. To summarize, swapping content within a single scroller is complicated since the scroll offset is shared between two conceptual views; it requires tricks to keep the content of multiple views overlaid and we have to manually keep track of each view's scroll offset. Likewise, animating transitions becomes tricky since the animation must be timed carefully with the content swap. Simple behaviors which emerge naturally from using separate
s become difficult and complicated to implement when forced to share the special documentElement.
Proposed Solution
We need to provide authors some way to make the intuitive "each view is a div" solution workable. This means giving an arbitrary scroller the same powers as the documentElement; anointing it the root scroller. Lets make the documentElement less special. The web is the only UI framework that gives special powers to one, and only one, special scrolling element.
I propose an explicit mechanism to allow the author to specify which element should be treated as the root scroller and, importantly, when. This will go some way to explaining how the page interacts with browser UI and give authors a some ways to control those interactions.
Why not a heuristic?
One alternate proposal is to apply these "root scroller" semantics to any scroller that exactly fills the viewport. This avoids introducing a new API. While this may work for some situations, it doesn't enable all the kinds of use cases we want to support. In the example below, we overlay one viewport-sized scroller over another and cross-fade between the two. It's less clear which scroller we should designate in this case.
Using a heuristic would make it difficult to spec out all the edge cases and make interop between browsers more difficult. It also means authors couldn't feature detect. It's also less future friendly as we may wish to (in a future version of the API) allow non-fullscreen root scrollers.
Proposed API
- Add a
rootScroller
attribute ondocument
.
var myScrollerDiv = document.getElementById('myScrollerDiv');
document.rootScroller = myScrollerDiv;
If the set element is a valid(*) scroller, scrolling it should perform all the same actions as the browser performs for document scrolling. E.g. hiding the URL bar, showing overscroll effects, pull-to-refresh, gesture effects, etc. If
no element is set as the document.rootScroller
, the browser defaults to using the document.scrollingElement
and
behavior is unchanged from today.
(*) For some - yet undetermined - definition of valid. Chrome's experimental implementation requires the element to be scrollable and exactly fill the viewport.
<iframes>
When a page sets an  element as the root scroller, e.g:

The browser uses whichever element the document in the iframe set as the document.rootScroller (remember, if none
is set it defaults to the document.scrollingElement
). This nesting works recursively; the iframe could itself set
a child iframe as rootScroller. In this way, the root-most document can delegate root scroller responsibilities to
child documents.
Example
Here's a common application on the web: a (potentially-infinite) stream of items that lets you open one up when you click on it. Since the stream is infinite, navigating to a new page when you open an item means lots of work to recreate the stream when the user navigates back. What if we could keep the item-view in the DOM all along? Here's an example of how we'd do that with this proposal:


Hagia Sophia
The Hagia Sophia was a former Eastern Orthodox cathedral before it was converted into a mosque by Mehmed the Conqueror, and then to a religious museum in 1935, located in Istanbul, Turkey. It is one of the most prominent examples of Byzantine architecture and Ottoman decoration. Emperor Justinian began to build this church in 532 AD, and it took about five years to build it officially opened in 537 AD, and Justinian did not want to build a church in the fashionable style of his time, but always tended to new innovation. He commissioned the architects Isodore al-Melisi and Anthemius Tralini to build this monumental religious edifice. The attention was directed towards the beautification of the building and a large ornamentation from the inside. Justinian used to gather the possibilities of the empire to decorate and decorate the building. Of the plaster and painted above geometric decorations and Arabic calligraphy, but many of these layers fell and the ancient scenes appeared below.
Taj Mahal
It is a magnificent mausoleum, an elegant white marble architecture found in a hill in the strings of Brads in India. It was built by King Shah Jahan of the Mughal Emperor (1630 - 1648) to include the remains of his wife Mumtaz Mahal, the third wife known as Mumtaz Mahal. The word Taj Mahal is distorted from the princess's name, Mumtaz Mahal. His design was developed by the well-known engineer Issa Shirazi and Amanullah Khan Shirazi. The white alabaster from Jidhabur was built on a terrace covered with white alabaster, and at each corner of the terrace was a harmonious minaret with a height of 37 m. The circles are surrounded by three balconies, and in the center of the terrace, the mausoleum rises in the form of a quadrant. Its height is 22.5 m. Each of the four facades of the building has a high entrance, covered by a knot, beneath the large dome above the center of the building, the mausoleum of the princess, and next to her husband's mausoleum, both decorated with inscriptions. One of the most beautiful models of Islamic architecture, it is widely known as "the jewel of Islamic art in India and one of the world's timeless masterpieces". The Taj Mahal is considered by many of the finest examples of Mughal architecture, a style that combines Persian, Turkish, Ottoman and Indian architectural styles.
Jerusalem
The area of Palestine, including Jerusalem, is the landing site of the monotheistic religions. 1. Al-Aqsa Mosque: One of the largest mosques in the world and one of the three mosques to which Muslims are traveling, and is also the first two kisses in Islam. Located inside the Old City of Jerusalem in Palestine. It is the entire area surrounded by the wall and the name of everything that is inside the wall of the Aqsa Mosque located in the far southeast corner of the walled old town. Covering an area of approximately 144,000 square meters, it includes the Dome of the Rock, the Tribal Mosque, the Marwani Chapel and several other landmarks of up to 200 monuments. Al-Aqsa Mosque is located on a small plateau called the "Moriya Plateau", the rock is the highest point in it, located in its heart. Jews also sanctify the same place. They call the Temple Mount yards the Temple Mount relative to the Temple of the Prophet Solomon, and many extremist Jewish organizations try to invoke this argument to build the Temple according to their belief. 2. Alqiama charch: The Church of the Holy Sepulcher is a church within the walls of the Old City of Jerusalem. The church was built above Golgotha or Golgotha, the place of the rock on which Jesus is believed to be crucified. It is considered the holiest and most important Christian church in the Christian world. The Church of the Holy Sepulcher was named after Jesus' resurrection from the dead on the third day of the events that led to his death on the cross. The Eastern Orthodox Church and the Eastern Orthodox Catholic Church share.
Makkah
It is a holy city for Muslims, with the Grand Mosque, and the Kaaba, which is the kiss of Muslims in their prayers. Located west of Saudi Arabia, away from Medina about 400 kilometers in the south-west direction. Mecca has an area of 850 km², of which 88 km² is inhabited, and the central area surrounding the Grand Mosque is about 6 km², and the height of Mecca is about 277 meters above sea level. At the beginning it was a small village located in a dry valley surrounded by mountains on each side, then people began to come and settle in the era of the Prophet Abraham and the Prophet Ismail, after the Prophet Abraham left his wife Hajar and his son Ismail in this dry desert valley, in compliance with By God's order, they stayed in the valley until the well of Zamzam exploded. Mecca is home to many Islamic holy landmarks, most notably the Grand Mosque, the holiest place in the earth for Muslims, because it includes the Holy Kaaba kissing Muslims in prayer, as it is one of the three mosques to which the traveler, according to the Prophet Muhammad: Travelers are only three mosques of this mosque, the Grand Mosque and the Al Aqsa Mosque.
Wadi Rum - Jordan
Wadi Rum is a protected area covering 720 square kilometers of dramatic desert wilderness in the south of Jordan. Huge mountains of sandstone and granite emerge, sheer-sided, from wide sandy valleys to reach heights of 1700 meters and more.
Mount Everest
Its peak is on the border of Nepal and China. It is above the Death Zone where the air is too thin for a human being to live, so usually compressed gas tanks with different gas mixes for different altitudes are used when climbing. The Death Zone refers to the parts of Mount Everest that are above 7,600 metres (24,900 ft) above sea level.
Cape Town, South Africa
Perched on the southern tip of Africa, Cape Town has been named as one of the most beautiful cities on earth. Table Mountain, with its near vertical cliffs, flanked by Devil’s Peak and Lion’s Head on either side, is an ecological marvel – there is more floral diversity here than in the entire United Kingdom.
Aqua Club Dolphin-Istanbul
Aqua Park has a variety of recreational facilities that enable you to spend a perfect time with children and relax on the sun loungers and drink a favorite cocktail, as well as swimming pools and pitfalls and a range of cafes and restaurants where you will spend great times, in addition to green spaces A water park for young and old and the Dolphin Park to showcase the famous dolphin dances. Meet with visitors, and live in it. Famous dolphin dances.
Petra
Famously known as the ‘Rose City’ because of its stunning architecture carved out in pink sandstone, Petra has been enthralling travellers even before it was declared a World Heritage Site in 1985. Believed to have been established in 312 B.C, Petra ishome to over 800 ancient structures including buildings, tombs, baths and temples. The water conduit systems of this ancient archeological city will leave you amazed.
Great Wall of China
The First Emperor of China started the Qin Dynasty. The Xiongnu tribes in the north of China were his enemies. The land in some parts of China is easy to cross, so Qin Shi Huang started building the Great Wall to make it more difficult for the Xiongnu to invade China.Other dynasties in China had worked more on the wall and made it longer. The Han, Sui, Northern and Jin Dynasties all repaired, rebuilt or expanded the Great Wall. During the Ming Dynasty, major rebuilding work took place. Sections of the wall were built with bricks and stone instead of earth
pyramids
They’re over 3,000 years old, and we still don’t have a good idea as to how they were built or how the Egyptians made them so precise .The three pyramids align to the stars and the solstices and contain tons of chambers that still haven’t been (andcannot be) opened.The largest one, called the Great Pyramid, was built by the Pharaoh Khufu and has limited access to it. The Pyramids are truly a marvel of human engineering that was fit for kings
Rome
The famed Eternal City is home to few iconic pieces of architecture that include Pantheon, Forum, Arch of Constantine, Circus Maximus; and the list goes on. We bet that a trip to Rome is incomplete without a walk along the lanes around the Barouque and Renaissance buildings there
Dubai
The most famous of the seven Emirates in the United Arab Emirates (UAE), Dubai is a world-class destination. The story of ‘modern’ Dubai is relatively short. The Emirate has been established for thousands of years, yet within the last few decades, Dubai has transformed itself into the ambitious, dynamic Emirate we experience today. In 1894, the introduction of full tax exemption invited traders around the world to take advantage of the Emirate’s unique benefits. In the 1940’s and 50’s, Dubai prospered in the gold trade, providing a strong economy for its 40,000 population. This was just the start as the mid 1960’s unveiled the discovery of oil and Dubai’s economy went into overdrive, leading to an influx of foreign workers. In 1973, Dubai joined the other Emirates to adopt a single, uniform currency: the UAE dirham. In the late 70s, the Jebel Ali Free Zone was created, comprising the world’s largest port and providing foreign countries and businesses unrestricted import and export. As oil prices increased, Dubai focused closely on developing free-trade and tourism. In 2000, the Dubai
Malaysia
To know Malaysia is to love Malaysia - a bubbling, bustling melting-pot of races and religions where Malays, Indians, Chinese and many other ethnic groups live together in peace and harmony. Our multiculturalism has made Malaysia a gastronomical paradise and home to hundreds of colourful festivals. It's no wonder that we love celebrating and socialising. As a people, Malaysians are very relaxed, warm and friendly. Geographically, Malaysia is almost as diverse as its culture. 11 states and 2 federal territories (Kuala Lumpur and Putrajaya) form Peninsular Malaysia which is separated by the South China Sea from East Malaysia which includes the 2 states (Sabah and Sarawak on the island of Borneo) and a third federal territory, the island of Labuan. One of Malaysia's key attractions is its extreme contrasts which further add to this theme of ‘diversity’. Towering skyscrapers look down upon wooden houses built on stilts while five-star hotels sit just metres away from ancient reefs. Rugged mountains reach dramatically for the sky while their rainforest-clad slopes sweep down to floodplains teeming with forest life. Cool highland hideaways roll down to warm, sandy beaches and rich, humid mangroves. For the perfect holiday full of surprises, the time is now, the place is Malaysia.
>Norway
The main attractions of Norway are the varied landscapes that extend across the Arctic Circle. It is famous for its fjord-indented coastline and its mountains, ski resorts, lakes and woods. Popular tourist destinations in Norway include Oslo, Ålesund, Bergen, Stavanger, Trondheim and Tromsø. Much of the nature of Norway remains unspoiled, and thus attracts numerous hikers and skiers. The fjords, mountains and waterfalls in Western and Northern Norway attract several hundred thousand foreign tourists each year. In the cities, cultural idiosyncrasies such as the Holmenkollen ski jump attract many visitors, as well as science abilities and cultural learnings and things such as Bryggen in Bergen and the Vigeland Sculpture Park in Oslo, and they do not know about it.
Turkey
Turkey is a modern country with a captivating blend of antiquity and contemporary and East and West. Get interesting information about Turkey and read up on our history, culture and art, nature and geography, traditional culinary culture, real Turkish lifestyle and more. All you need to know about Turkey and beyond.


You should at least add one bundle for your application.
php vendor/bin/zeus help zeus:create-bundle
P.S. While you're at it, you might want to delete this page, too


Hi there Teaching with TRACS instructors,
Plain User1, one of the students in your upcoming "Teaching with TRACS" class on Wednesday, July 1, 2037, Noon - 2:00PM, has requested special accommodations for his/her needs:
A brandy snifter filled with brown M&Ms.
If you have any questions about this request, you can reach Plain User1 at pu12345@dev.nul.


The default behaviour of the application is to use password based authentication with login passwords stored (encrypted and salted) within the person database table. This is implemented by a Composite. Users self-register with the application and the users Email address is verified as part of the sign-up process. This is chosen as the default mechanism because it is the most flexible, anybody with an email account and a web-browser is capable of using this configuration. However the application can also be configured to use different authentication mechanisms, depending on your requirements:
This is the default configuration. Password based authentication is supported if the person table contains a composite registered under the PasswordAuthComposite type. The default is to register a DatabasePasswordComposite that stores an encrypted and salted password in database fields of the person table. The following parameters allow fine-tuning of the password configuration.
Property password.salt_length length of password salt used.
Property password.hash password hash algorithm. This should be one of MD5,SHA1,SHA256,SHA384,SHA512. Provided the Alg field exists in the person table (to store the hash algorithm used when the password was set) you can change this parameter without breaking existing entries. You may however have to change the length of the password field in the database.
Property hash-name.allowed Set this to true/false so enable/disable the use of a particular password algorithm. The default algorithm is always allowed. If a non-default algorithm is allowed users whose password were stored using that algorithm will still be able to login using their old password. They will be updated to the new default the next time they change their password.
Property max_password_fails number of consecutive password fails before the account is locked and the user has to change their password.
Property notify_password_fails number of consecutive password fails before failed attempts are logged as errors.
Property service.feature.password.check_complexity enable complexity checking of user supplied passwords.
password.min_length minimum password length (not counting repeated letters or letters consecutive in the alphabet)
password.min_diff_char minimum number of different characters that should occur within the password this should give better password entropy than requiring characters from particular sets like digits because all characters are treated equally.
password.min_digits minimum number of digits needed in a password.
password.min_special minimum number of non alpha-numeric characters needed in a password.
If all of your users already have existing web-credentials (for example a campus/federated Single-Sign-On system) you may want to configure the application to use this external authentication system instead of internal passwords. These changes should ideally be performed when setting up the system for the first time rather than being applied to an existing application instance.
Configure apache level authentication to use the existing web-credentials. This is usually done using a Location statement within the apache configuration. The exact syntax depends on the version of httpd and the SSO system you are using. It is not necessary to protect every application URL (In fact you probably want different authentication for URLs accessed via scripts. The minimum set of URLs to protect are:
/login.jsp
/RegisterServlet
/ (Not strictly required but this is the default URL that users will usually visit first)
Edit the person.composites property to remove the DatabasePasswordComposite and replace it with AppUserNameFinder.WebName. If you are making this change to an existing database that was originally created for password based authentication, you will also have to use the table edit forms to drop the Password related database fields and add the WebName field. You will also have to edit any existing users (With the Developer role active) to set the WebName field to the REMOTE_USER string for that user.
Set the property service.feature.allow_external_auth=on. With this feature enabled the application will try to match any REMOTE_USER identity generated by Apache to WebName values in the person table and automatically log-in if a match is found.
The default behaviour is if the REMOTE_USER name does not correspond to the WebName field for any existing database record then the user will be presented with a sign-up form and a record will be created for them. If you don't want users to self-register the first time they visit the application you will have to set service.feature.allow_signup=off in which case you will have to manually create each user (using the Create person form or an automated data upload) before they can log-in to the application.
It is also possible to install a custom AppUserNameFinder that can query some external directory (such as a LDAP server) and automatically create the record based on information from the directory. However (at the time of writing) there is not a generic configurable plug-in that does this only custom solutions for particular cases. If you require this get in touch with the application developers.
You can also use an external SSO system as a secondary login system in addition to a password mechanism. Every application user will still have a password as in the default configuration but (if they have an identity in the SSO system) they have the option of binding this identity to their application account and using this as an alternative login mechanism. You don't need to know users identities in advance to do this because the SSO identities are captured when the user links their identity to the application.
Configure apache level authentication to use the existing web-credentials. Pick a top-level URL the application to protect that is specific to this for example /Campus-sso
Edit the application web.xml file to bind a RemoteAuthServlet to this location.
<servlet>
<description>Allows access from campus logins</description>
<servlet-name>SSOServlet</servlet-name>
<servlet-class>uk.ac.ed.epcc.webapp.servlet.RemoteAuthServlet</servlet-class>
</servlet>
<servlet>
<servlet-mapping>
<servlet-name>SSOServlet</servlet-name>
<url-pattern>/Campus-sso</url-pattern>
</servlet-mapping>
Add AppUserNameFinder.WebName to the person.composites list. If you are adding this to an existing application you will also have to create the WebName database field in the person table via the table admin forms.
Set property service.feature.web_login=on
Set property service.web_login.url=/Campus-sso
Set property service.web_login.login-text=Login using Campus SSO. This is the text that appears on the login page form.
Set property service.web_login.update-text=Register Campus SSO identity. This is the text that appears on the form where users can link their identities to the application.
If you need a choice of secondary methods you can configure more than one RemoteAuthServlet instances to handle different authentication mechanisms. Each mechanism corresponds do a different naming “realm”.
The service.web_login configuration parameters become comma separated lists of values one for each mechanism.
The additional servlets needs to be configured with an init-parameter remote_auth.realm to change the realm from the default WebName realm.
Additional composites need to be added to implement the new realms e.g.
Define the property class.Realm2=FieldnameFinder and add the composite Realm2 to person.composites. The REMOTE_USER value for this realm will be stored in field Realm2 in the person table.
If you need a third realm use SecondaryNameFinder rather than FieldNameFinder. This works exactly the same as the FieldNameFinder but registers under a different type allowing it to co-exist with the FieldNameFinder and the default WebNameFinder.
It is also possible to perform password authentication directly against an LDAP server rather than storing the passwords in the internal database. This is done using a custom PasswordAuthComposite that verifies the users password against an external LDAP (and creates the corresponding database entry if one does not already exist). However (at the time of writing) there is not a generic configurable plug-in that does this only custom solutions for particular cases. If you require this get in touch with the application developers.


Run your docker
This is a happyDocker! Which makes you happy?
container info
{{status}}
id
{{id}}
name
{{name}}
Add another Container!
Input
{% csrf_token %}
command
Valid first name is required.
Try it!
output
{{statusCMD}}
{{output}}
All Container
{{allContainer}}
{% csrf_token %}
Stop Container:
Input container name
{{statusStop}}
Valid first name is required.
Stop it!


--- layout: post title: no title date: '2014-09-25T07:30:40+02:00' categories: - Sketches - Character picture_url: https://film-Storyboards.tumblr.com/post/98383317753 ---


Oscar Pons - Coder
I could describe myself as a curious technology lover, with a wide knowledge of computer related topics, from programming, robotics, 3D printing, android and bots to web design and a little bit of pentesting. Now currently focusing on artificial inteligence, althought I already touched some libraries such as AIMA to create a 2D game level generator and solver, or the Unity AI libraries.
I have a background of computer engineering from which I switch to this degree after realizing my true passion, thing that made me widen my skills to photo edition, 3D modelling and animating among others.
PROJECT CONTRIBUTION
Respect to The Witcher: Ties of destiny, I mainly was in charge of the User Interface and the usability of the engine, in short, the user experience while playing and having information on the screen and the user experience while using the engine itself, in this case, our own team. Also I did tasks of general bugfixing and QA, including the windows installer of the game.
For the UI we developed a robust system with easy to use and intuitive features. We created the basic elements our game will need such as images, buttons, progress bars, texts and a circular progress bar. The elements can be placed in a canvas for better organization and managing and also can be placed as in game UI, meaning you can place them anywhere on the 3D space ensuring a better experience with fully interactable UI. Moreover the UI have an anchor system so you can attach them to a particular spot to ensure the positioning of it and, also, any image, button or progressbar can have a spritesheet animation.
Also I developed some other features of the engine such as the hierarchy, multiple gameobject edition, including reparenting and easing the engine users life with component managing, copy and paste components, transformating all selected gameobjects with both guizmo and inspector, among other features. Finally I created a minimap but due the incoming gold date and the lack of proper time to playtest it, it was not put in the final game.
- UI Animations: Easy to use and with a few clicks you have an animation based on the spritesheet, ready to be played and controlled by scripts.
- UI 2D/3D: Place anywhere your images extending the player experience further than 2D world.
- Engine easing: Gameobjects edition.
- Engine features: Hierarchy and usability.
- Text: Include and implement freefont library for text and letting the user have as many fonts as it is needed.
- Minimap:Level independent minimap (discarded due to short time to final delivery).


Just hit shift + command + e
Here's text content in the light dom
Here's text content in the light dom


Olu is a developer at the BBC and loves Javascript, SCSS and Bee and Puppycat.
They’ve spoken at non-binary in tech about finding your community.
In their spare time, they consume more memes than is advisable, read (but not enough) and try to make cosmetics.
You know how I've been saying 'team' and 'we'?
If you'd like to get involved, hit me up on Twitter, or send an email.


Putting aria-live on the root
Insert
Putting aria-live on the children
Insert
Putting aria-live on the children with dialog
Insert
aria-live is already set on the container
Insert
aria-live set on root as it is first added to the dom
Insert


module.exports = function(text, options) {
// TODO: use options to allow sensistive case for example or word length restriction or excepted words
options = options || {};
// Will contains each word and its number of occurrences
let result = {};
Eif (null !== text) {
// Remove punctuations
const punctuationLess = text.replace(/[.,\/#!$%\^&\*;:{}=\-_`~()]/g,"");
// this can't be like this, because does'nt work with languages like hebrew or arab!
// const myCleanedText = text.replace(/[^A-Za-z0-9_]/g," ");
// Split text into an array of words
const wordsArray = punctuationLess.split(" ");
// Parse each word of the array
wordsArray.forEach(function(word){
// Remove uppercase letters
word = word.toLowerCase();
// Check word's length: we don't want to take care of small words
Eif(word.length > 2) {
// The loop checks this word for the first time
Eif(!result[word]) {
result[word] = 1;
}
else {
// The word exists in our result object, so we increments its counter
result[word]++;
}
}
});
}
// Return the object containing each occurrence of word and its counter
return result;
};
//TODO : add method on instance: get number of differents words for example, or string length, or stats like only the most used word, the less used word, the longest word, the smaller word
|


Select whether your system is a Sender of C-CDA's or Receiver of C-CDA's.
Sender
Reciever
Select ONC 2015 Edition S&CC objective or other C-CDA IG conformance criteria from the list below.
Select the scenario file that you used to generate the C-CDA, if you are testing a C-CDA generated without using any of the scenario files in the drop down, select "No scenario File".
Select a severity level. Selecting 'INFO' processes all available result types (info, errors, and warnings). Selecting 'WARNING' processes info and warnings only. Selecting 'ERROR' processes errors only and is the most performant (runs the fastest) but provides the lowest level of detail. Selecting 'INFO' is the least performant (runs the slowest) but provides the highest level of detail and is the default option.
Upload generated C-CDA file to validate.
Select
Validate {{validationModel.file.name}}
Submit
Validation Result
Original C-CDA
Close Results


Mathematically, bifurcations in time-independent and periodically forced systems are equivalent 20. However, transitions that are triggered by changes in periodic forcing have not been explicitly included in the concept of climate tipping points which usually build on the simple paradigm of stable equilibria (and their loss of stability at a tipping point) 1, 21. This stands in contrast to the fact that the climate system is interspersed with a number of internal and external oscillations that may cause such transitions on a vast range of time scales. This seems plausible because hardly any oscillation remains the same over time. For example, the seasonal cycle of solar insolation varies due to the Earth’s precession, which in turn is modulated by eccentricity. Similarly, the diurnal insolation cycle depends on the seasons, the Earth’s orbital parameters and its rotation rate. Moreover, modes of internal climate variability often have a distinct range of frequencies, and affect ecosystems and other components of the climate system. Besides these naturally occurring phenomena, the human interference with the climate system is another reason why such oscillations might change. For example, a human impact on the amplitude and frequency of ENSO can be expected 22. Even the amplitude and timing of the annual cycle can change in many variables when the balance of climate feedbacks shifts under increased greenhouse gas concentrations, for example associated with changes in Arctic cloud cover, or the loss of sea ice 23. Figure 3 gives a non-exhaustive overview of (quasi-) periodic oscillations and the nonlinear systems they affect. The possibility of tipping points induced by quasi-periodic drivers emerges from a large body of literature on these systems, but is hardly discussed in such process-based studies or in review articles on tipping points.
Oscillations in the Earth system that can modulate their amplitude or period, and potentially multistable systems affected by such change. Forcings that are not truly periodic but that have modes of variability on specific time scales are shown in italic font.
Starting our overview with small scales, tipping point phenomena have a long tradition in the nonlinear world of fluid dynamics 24, 25. For example, it has lately been found that the structure of the nocturnal atmospheric boundary layer over land can show two alternative regimes 26, 27. The question which regime will be established can crucially depend on the conditions during the evening 28. On a much larger scale, marine boundary layer clouds show distinct regimes in observations and multiple equilibria in specific models 29, 30. It therefore seems rewarding to study how the diurnal cycle of solar insolation 31, 32 or the annual cycle of sea surface temperatures can affect the long-term structure of the lower atmosphere.
Particularly important for the lives of many people are the abrupt shifts in monsoon systems occurring within the seasonal and orbital cycles. Similarly, the current loss of summer sea ice reminds us that sea ice is nonlinear system that is subject to a marked seasonal cycle. Moreover, multiple equilibria are supposed to exist in several marine and terrestrial ecosystems including lakes 33, marine sea-grass ecosystems 34, tropical forests, and drylands 35. In terrestrial ecosystems, rainfall is often the most important environmental driver, and the longevity and severance of droughts has long-term consequences. We will discuss the cases of monsoons, sea ice and terrestrial ecosystems in more detail below.
Finally, an iconic example of a tipping point is the Atlantic Meridional Overturning Circulation (AMOC) which can show multiple states in models of different complexity 2, 36. Probably related to the AMOC are the quasi-regular Dansgaard-Oeschger events which have been argued to be caused by a regular driver 37. A subject where the role of periodic drivers has been discussed explicitly are glacial-interglacial cycles. In particular, it has been shown that they can conceptually be understood as forced shifts in a multi-stable landscape 38. Due to the inertia of the cryosphere and lithosphere, the climate is not in equilibrium with the orbital forcing. Small insolation differences from one orbital cycle to the next can thus cause very different climates 39, 40. Such a conceptual view can also be beneficial for understanding other components of the Earth system and can inspire research questions. We will illustrate this by focusing on three example cases.


Feedback System
StudentHome Page
Calendar
List of Presentations
Profile
History
Feedback
View Feedback
Log out
Account Details
Firstname
Lastname
Student Id:
Email
Change Password
Current Password:
Current Password is required.
New Password:
New Password is required.
Confirm Password:
Confirm Password is required.
{{errorMessage}}
{{successMessage}}


PAR: Place And Route Diamond (64-bit) <IP_ADDRESS>.2. Copyright (c) 1991-1994 by NeoCAD Inc. All rights reserved. Copyright (c) 1995 AT&T Corp. All rights reserved. Copyright (c) 1995-2001 Lucent Technologies Inc. All rights reserved. Copyright (c) 2001 Agere Systems All rights reserved. Copyright (c) 2002-2017 Lattice Semiconductor Corporation, All rights reserved. Sat Jan 19 00:45:02 2019 C:/lscc/diamond/3.10_x64/ispfpga\bin\nt64\par -f TFP410_impl1.p2t TFP410_impl1_map.ncd TFP410_impl1.dir TFP410_impl1.prf -gui -msgset D:/31_WS/Lattice/HDMI_TFP410/promote.xml Preference file: TFP410_impl1.prf. Cost Table Summary Level/ Number Worst Timing Worst Timing Run NCD Cost [ncd] Unrouted Slack Score Slack(hold) Score(hold) Time Status ---------- -------- ----- ------ ----------- ----------- ---- ------ 5_1 * 0 13.236 0 0.304 0 53 Success * : Design saved. Total (real) run time for 1-seed: 54 secs par done! Lattice Place and Route Report for Design "TFP410_impl1_map.ncd" Sat Jan 19 00:45:02 2019 Best Par Run PAR: Place And Route Diamond (64-bit) <IP_ADDRESS>.2. Command Line: par -w -l 5 -i 6 -t 1 -c 0 -e 0 -gui -msgset D:/31_WS/Lattice/HDMI_TFP410/promote.xml -exp parUseNBR=1:parCDP=0:parCDR=0:parPathBased=OFF TFP410_impl1_map.ncd TFP410_impl1.dir/5_1.ncd TFP410_impl1.prf Preference file: TFP410_impl1.prf. Placement level-cost: 5-1. Routing Iterations: 6 Loading design for application par from file TFP410_impl1_map.ncd. Design name: top NCD version: 3.3 Vendor: LATTICE Device: LCMXO3LF-6900C Package: CABGA256 Performance: 5 Loading device for application par from file 'xo3c6900.nph' in environment: C:/lscc/diamond/3.10_x64/ispfpga. Package Status: Final Version 1.16. Performance Hardware Data Status: Final Version 37.4. License checked out. Ignore Preference Error(s): True Device utilization summary: PIO (prelim) 16+4(JTAG)/336 6% used 16+4(JTAG)/207 10% bonded SLICE 347/3432 10% used GSR 1/1 100% used OSC 1/1 100% used PLL 1/2 50% used Number of Signals: 1002 Number of Connections: 2133 Pin Constraint Summary: 16 out of 16 pins locked (100% locked).  Starting Placer Phase 0. ......... Finished Placer Phase 0. REAL time: 4 secs Starting Placer Phase 1. ...................... Placer score = 98516. Finished Placer Phase 1. REAL time: 41 secs Starting Placer Phase 2. . Placer score = 97479 Finished Placer Phase 2. REAL time: 42 secs Clock Report Global Clock Resources: CLK_PIN : 0 out of 8 (0%) PLL : 1 out of 2 (50%) DCM : 0 out of 2 (0%) DCC : 0 out of 8 (0%) Quadrants All (TL, TR, BL, BR) - Global Clocks: PRIMARY "out_vga_ck_c" from CLKOP on comp "clk/PLLInst_0" on PLL site "LPLL", clk load = 152 SECONDARY "mode_bit" from Q0 on comp "SLICE_225" on site "R14C20B", clk load = 0, ce load = 4, sr load = 45 SECONDARY "u_vga_core/out_vga_ck_c_enable_53" from Q0 on comp "u_vga_core/SLICE_278" on site "R14C20C", clk load = 0, ce load = 24, sr load = 4 SECONDARY "u_vga_core/u0_vid_new_frame" from Q0 on comp "u_vga_core/SLICE_302" on site "R14C20D", clk load = 0, ce load = 16, sr load = 5 SECONDARY "u_vga_core/u0_vga_timing/h_rollover" from Q0 on comp "u_vga_core/u0_vga_timing/SLICE_299" on site "R14C18A", clk load = 0, ce load = 10, sr load = 0 PRIMARY : 1 out of 8 (12%) SECONDARY: 4 out of 8 (50%) Edge Clocks: No edge clock selected. I/O Usage Summary (final): 16 + 4(JTAG) out of 336 (6.0%) PIO sites used. 16 + 4(JTAG) out of 207 (9.7%) bonded PIO sites used. Number of PIO comps: 16; differential: 0. Number of Vref pins used: 0. I/O Bank Usage Summary: +----------+---------------+------------+-----------+ | I/O Bank | Usage | Bank Vccio | Bank Vref | +----------+---------------+------------+-----------+ | 0 | 8 / 51 ( 15%) | 3.3V | - | | 1 | 8 / 52 ( 15%) | 3.3V | - | | 2 | 0 / 52 ( 0%) | - | - | | 3 | 0 / 16 ( 0%) | - | - | | 4 | 0 / 16 ( 0%) | - | - | | 5 | 0 / 20 ( 0%) | - | - | +----------+---------------+------------+-----------+ Total placer CPU time: 40 secs Dumping design to file TFP410_impl1.dir/5_1.ncd. 0 connections routed; 2133 unrouted. Starting router resource preassignment WARNING - par: The following clock signals will be routed by using generic routing resource and may suffer from excessive delay and/or skew. Signal=clk_13_3m loads=1 clock_loads=1 Completed router resource preassignment. Real time: 46 secs Start NBR router at 00:45:48 01/19/19 ***************************************************************** Info: NBR allows conflicts(one node used by more than one signal) in the earlier iterations. In each iteration, it tries to solve the conflicts while keeping the critical connections routed as short as possible. The routing process is said to be completed when no conflicts exist and all connections are routed. Note: NBR uses a different method to calculate timing slacks. The worst slack and total negative slack may not be the same as that in TRCE report. You should always run TRCE to verify your design. ***************************************************************** Start NBR special constraint process at 00:45:49 01/19/19 Start NBR section for initial routing at 00:45:49 01/19/19 Level 4, iteration 1 55(0.01%) conflicts; 0(0.00%) untouched conn; 0 (nbr) score; Estimated worst slack/total negative slack<setup>: 13.272ns/0.000ns; real time: 48 secs Info: Initial congestion level at 75% usage is 0 Info: Initial congestion area at 75% usage is 0 (0.00%) Start NBR section for normal routing at 00:45:50 01/19/19 Level 4, iteration 1 22(0.01%) conflicts; 0(0.00%) untouched conn; 0 (nbr) score; Estimated worst slack/total negative slack<setup>: 13.236ns/0.000ns; real time: 49 secs Level 4, iteration 2 8(0.00%) conflicts; 0(0.00%) untouched conn; 0 (nbr) score; Estimated worst slack/total negative slack<setup>: 13.236ns/0.000ns; real time: 49 secs Level 4, iteration 3 5(0.00%) conflicts; 0(0.00%) untouched conn; 0 (nbr) score; Estimated worst slack/total negative slack<setup>: 13.236ns/0.000ns; real time: 49 secs Level 4, iteration 4 1(0.00%) conflict; 0(0.00%) untouched conn; 0 (nbr) score; Estimated worst slack/total negative slack<setup>: 13.236ns/0.000ns; real time: 49 secs Level 4, iteration 5 0(0.00%) conflict; 0(0.00%) untouched conn; 0 (nbr) score; Estimated worst slack/total negative slack<setup>: 13.236ns/0.000ns; real time: 49 secs Start NBR section for setup/hold timing optimization with effort level 3 at 00:45:51 01/19/19 Start NBR section for re-routing at 00:45:52 01/19/19 Level 4, iteration 1 0(0.00%) conflict; 0(0.00%) untouched conn; 0 (nbr) score; Estimated worst slack/total negative slack<setup>: 13.236ns/0.000ns; real time: 50 secs Start NBR section for post-routing at 00:45:52 01/19/19 End NBR router with 0 unrouted connection NBR Summary ----------- Number of unrouted connections : 0 (0.00%) Number of connections with timing violations : 0 (0.00%) Estimated worst slack<setup> : 13.236ns Timing score<setup> : 0 ----------- Notes: The timing info is calculated for SETUP only and all PAR_ADJs are ignored. WARNING - par: The following clock signals will be routed by using generic routing resource and may suffer from excessive delay and/or skew. Signal=clk_13_3m loads=1 clock_loads=1 Total CPU time 51 secs Total REAL time: 53 secs Completely routed. End of route. 2133 routed (100.00%); 0 unrouted. Hold time timing score: 0, hold timing errors: 0 Timing score: 0 Dumping design to file TFP410_impl1.dir/5_1.ncd. All signals are completely routed. PAR_SUMMARY::Run status = Success PAR_SUMMARY::Number of unrouted conns = 0 PAR_SUMMARY::Worst slack<setup/<ns>> = 13.236 PAR_SUMMARY::Timing score<setup/<ns>> = 0.000 PAR_SUMMARY::Worst slack<hold /<ns>> = 0.304 PAR_SUMMARY::Timing score<hold /<ns>> = 0.000 PAR_SUMMARY::Number of errors = 0 Total CPU time to completion: 51 secs Total REAL time to completion: 54 secs par done! Copyright (c) 1991-1994 by NeoCAD Inc. All rights reserved. Copyright (c) 1995 AT&T Corp. All rights reserved. Copyright (c) 1995-2001 Lucent Technologies Inc. All rights reserved. Copyright (c) 2001 Agere Systems All rights reserved. Copyright (c) 2002-2017 Lattice Semiconductor Corporation, All rights reserved.


Ronaldo Facing Two-Year Ban?
by SL InternationalJuventus superstar Cristiano Ronaldo could be facing a massive two-year ban as a result of his furious reaction to being substituted this past weekend.
Read: Frustrated CR7 Storms Off Pitch, Leaves Stadium? Sarri Responds
Ronaldo was infuriated after being substituted by manager Maurizio Sarri in the 55th minute of the Bianconeri's win over AC Milan on Sunday, and reportedly left the stadium before the match had even ended.
According to former AS Roma forward Antonio Cassano, the Portugal international's reaction could earn him a serious ban from Italian authorities.
The 37-year-old was speaking on Italian television show Tiki-Taka, as reported by AS, when he revealed that players were required to hang around after the game in case they were called for anti-doping tests.
Choose the left midfielder for SA’s Real Madrid Dream Team & win a replica shirt!
"Did he leave before the end of the game?" Cassano asked.
"You can't do that because there is an anti-doping control."
Cassano drew on his own experience in the matter after he had previously been summoned back after leaving a derby match against Lazio during his own playing career, and revealed that the consequences for failing to do so would have been massive.
"I had to go back to the stadium urgently to avoid a two-year ban," he added.
Click through the gallery below to see 10 footballers who have received international bans!
Ronaldo's reaction is the latest in a string of incidents that have led to reports of a rift between him and Sarri.


esbuild rules for Bazel
The esbuild rules runs the esbuild bundler tool with Bazel. esbuild is an extremely fast JavaScript bundler written in Go, its current benchmarks show it can be 320x faster that other bundlers
Installation
Add the @bazel/esbuild
npm packages to your devDependencies
in package.json
.
npm install --save-dev @bazel/esbuild
or using yarn
yarn add -D @bazel/esbuild
Add an http_archive
fetching the esbuild binary for each platform that you need to support.
_ESBUILD_VERSION = "0.12.1" # reminder: update SHAs below when changing this value
http_archive(
name = "esbuild_darwin",
urls = [
"https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-%s.tgz" % _ESBUILD_VERSION,
],
strip_prefix = "package",
build_file_content = """exports_files(["bin/esbuild"])""",
sha256 = "efb34692bfa34db61139eb8e46cd6cf767a42048f41c8108267279aaf58a948f",
)
http_archive(
name = "esbuild_windows",
urls = [
"https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-%s.tgz" % _ESBUILD_VERSION,
],
strip_prefix = "package",
build_file_content = """exports_files(["esbuild.exe"])""",
sha256 = "10439647b11c7fd1d9647fd98d022fe2188b4877d2d0b4acbe857f4e764b17a9",
)
http_archive(
name = "esbuild_linux",
urls = [
"https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-%s.tgz" % _ESBUILD_VERSION,
],
strip_prefix = "package",
build_file_content = """exports_files(["bin/esbuild"])""",
sha256 = "de8409b90ec3c018ffd899b49ed5fc462c61b8c702ea0f9da013e0e1cd71549a",
)
These can then be referenced on the tool
attribute of the esbuild
rule.
esbuild(
name = "bundle",
...
tool = select({
"@bazel_tools//src/conditions:darwin": "@esbuild_darwin//:bin/esbuild",
"@bazel_tools//src/conditions:windows": "@esbuild_windows//:esbuild.exe",
"@bazel_tools//src/conditions:linux_x86_64": "@esbuild_linux//:bin/esbuild",
}),
)
It might be useful to wrap this locally in a macro for better reuseability, see packages/esbuild/test/tests.bzl
for an example.
The esbuild
rule can take a JS or TS dependency tree and bundle it to a single file, or split across multiple files, outputting a directory.
load("@npm//@bazel/esbuild:index.bzl", "esbuild")
load("@npm//@bazel/typescript:index.bzl", "ts_library")
ts_library(
name = "lib",
srcs = ["a.ts"],
)
esbuild(
name = "bundle",
entry_point = "a.ts",
deps = [":lib"],
)
The above will create three output files, bundle.js
, bundle.js.map
and bundle_metadata.json
which contains the bundle metadata to aid in debugging and resoloution tracing.
To create a code split bundle, set splitting = True
on the esbuild
rule.
load("@npm//@bazel/esbuild:index.bzl", "esbuild")
load("@npm//@bazel/typescript:index.bzl", "ts_library")
ts_library(
name = "lib",
srcs = ["a.ts"],
deps = [
"@npm//foo",
],
)
esbuild(
name = "bundle",
entry_point = "a.ts",
deps = [":lib"],
splitting = True,
)
This will create an output directory containing all the code split chunks, along with their sourcemaps files
esbuild
USAGE
esbuild(name, args, define, deps, entry_point, entry_points, external, format, launcher, link_workspace_root, max_threads, minify, output, output_css, output_dir, output_map, platform, sourcemap, sources_content, srcs, target, tool)
Runs the esbuild bundler under Bazel
For further information about esbuild, see https://esbuild.github.io/
ATTRIBUTES
name
(Name, mandatory): A unique name for this target.
args
(List of strings): A list of extra arguments that are included in the call to esbuild. $(location …) can be used to resolve the path to a Bazel target.
Defaults to []
define
(List of strings): A list of global identifier replacements. Example:
esbuild(
name = "bundle",
define = [
"process.env.NODE_ENV=\"production\""
],
)
See https://esbuild.github.io/api/#define for more details
Defaults to []
deps
(List of labels): A list of direct dependencies that are required to build the bundle
Defaults to []
entry_point
(Label): The bundle’s entry point (e.g. your main.js or app.js or index.js)
This is a shortcut for the entry_points
attribute with a single entry.
Specify either this attribute or entry_point
, but not both.
Defaults to None
entry_points
(List of labels): The bundle’s entry points (e.g. your main.js or app.js or index.js)
Specify either this attribute or entry_point
, but not both.
Defaults to []
external
(List of strings): A list of module names that are treated as external and not included in the resulting bundle
See https://esbuild.github.io/api/#external for more details
Defaults to []
format
(String): The output format of the bundle, defaults to iife when platform is browser and cjs when platform is node. If performing code splitting or multiple entry_points are specified, defaults to esm.
See https://esbuild.github.io/api/#format for more details
Defaults to ""
launcher
(Label, mandatory): Internal use only
link_workspace_root
(Boolean): Link the workspace root to the bin_dir to support absolute requires like ‘my_wksp/path/to/file’. If source files need to be required then they can be copied to the bin_dir with copy_to_bin.
Defaults to False
max_threads
(Integer): Sets the GOMAXPROCS
variable to limit the number of threads that esbuild can run with.
This can be useful if running many esbuild rule invocations in parallel, which has the potential to cause slowdown.
For general use, leave this attribute unset.
Defaults to 0
minify
(Boolean): Minifies the bundle with the built in minification. Removes whitespace, shortens identifieres and uses equivalent but shorter syntax.
Sets all –minify-* flags
See https://esbuild.github.io/api/#minify for more details
Defaults to False
output
(Label): Name of the output file when bundling
output_css
(Label): Declare a .css file will be output next to output bundle.
If your JS code contains import statements that import .css files, esbuild will place the content in a file next to the main output file, which you’ll need to declare. If your output file is named ‘foo.js’, you should set this to ‘foo.css’.
output_dir
(Boolean): If true, esbuild produces an output directory containing all the output files from code splitting for multiple entry points
See https://esbuild.github.io/api/#splitting and https://esbuild.github.io/api/#entry-points for more details
Defaults to False
output_map
(Label): Name of the output source map when bundling
platform
(String): The platform to bundle for.
See https://esbuild.github.io/api/#platform for more details
Defaults to "browser"
sourcemap
(String): Defines where sourcemaps are output and how they are included in the bundle. By default, a separate .js.map
file is generated and referenced by the bundle. If ‘external’, a separate .js.map
file is generated but not referenced by the bundle. If ‘inline’, a sourcemap is generated and its contents are inlined into the bundle (and no external sourcemap file is created). If ‘both’, a sourcemap is inlined and a .js.map
file is created.
See https://esbuild.github.io/api/#sourcemap for more details
Defaults to ""
sources_content
(Boolean): If False, omits the sourcesContent
field from generated source maps
See https://esbuild.github.io/api/#sources-content for more details
Defaults to False
srcs
(List of labels): Source files to be made available to esbuild
Defaults to []
target
(String): Environment target (e.g. es2017, chrome58, firefox57, safari11, edge16, node10, esnext). Default es2015.
See https://esbuild.github.io/api/#target for more details
Defaults to "es2015"
tool
(Label, mandatory): An executable for the esbuild binary


“Satiṁ upaṭṭhapetvāna,
bhikkhunī bhāvitindriyā;
Paṭivijjhi padaṁ santaṁ,
saṅkhārūpasamaṁ sukhaṁ”.
“As a nun with developed faculties,
having established mindfulness,
I penetrated that peaceful state,
the blissful stilling of conditions.”
“Kaṁ nu uddissa muṇḍāsi,
samaṇī viya dissasi;
Na ca rocesi pāsaṇḍe,
kimidaṁ carasi momuhā”.
“In whose name did you shave your head?
You look like an ascetic,
but you don’t believe in any creed.
Why do you live as if lost?”
“Ito bahiddhā pāsaṇḍā,
diṭṭhiyo upanissitā;
Na te dhammaṁ vijānanti,
na te dhammassa kovidā.
“Followers of other creeds
rely on their views.
They don’t understand the Dhamma,
for they’re no experts in the Dhamma.
Atthi sakyakule jāto,
buddho appaṭipuggalo;
So me dhammamadesesi,
diṭṭhīnaṁ samatikkamaṁ.
But there is one born in the Sakyan clan,
the unrivaled Buddha;
he taught me the Dhamma
for going beyond views.
Dukkhaṁ dukkhasamuppādaṁ,
Dukkhassa ca atikkamaṁ;
Ariyaṁ caṭṭhaṅgikaṁ maggaṁ,
Dukkhūpasamagāminaṁ.
Suffering, suffering’s origin,
suffering’s transcendence,
and the noble eightfold path
that leads to the stilling of suffering.
Tassāhaṁ vacanaṁ sutvā,
vihariṁ sāsane ratā;
Tisso vijjā anuppattā,
kataṁ buddhassa sāsanaṁ.
After hearing his words,
I happily did his bidding.
I’ve attained the three knowledges
and fulfilled the Buddha’s instructions.
Sabbattha vihatā nandī,
tamokhandho padālito;
Evaṁ jānāhi pāpima,
nihato tvamasi antaka”.
Relishing is destroyed in every respect,
and the mass of darkness is shattered.
So know this, Wicked One:
you’re beaten, terminator!”
… Cālā therī ….


{% include 'header.html' %}
{% include 'menu.html' %}
{% include 'project/sidebar.html' %}
Add new host
Host:
Description:
Add
{% if errors is defined and errors %}
There were some errors with host
{% for error in errors %}
{{ error }}
{% endfor %}
{% endif %}
{% include 'footer.html' %}


 From time to time ThoughtWorks (Go CD's primary sponsor) will send out updates. This will include information such as...
The volume will be extremely low, focusing on information we believe will be a real value to people using Go CD.


@* * Copyright 2010-2017 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import controllers.Application.scaladocsPageUrl @userGuidePage("Asynchronous testing") {
ScalaTest supports asynchronous non-blocking testing. Given a Future
returned by the code you are testing, you need not block until the Future
completes before performing assertions against its value. You can instead map those assertions onto the Future
and return the resulting Future[Assertion]
to ScalaTest. The test will complete asynchronously, when the Future[Assertion]
completes.
The followings are the asynchronous style traits supported:
AsyncFeatureSpec
AsyncFlatSpec
AsyncFreeSpec
AsyncFunSpec
AsyncFunSuite
AsyncWordSpec
The asynchronous style traits follow the style of their synchronous cousins. For example, here's an AsyncFlatSpec
:
package org.scalatest.examples.asyncflatspec import org.scalatest.AsyncFlatSpec import scala.concurrent.Future class AddSpec extends AsyncFlatSpec { def addSoon(addends: Int*): Future[Int] = Future { addends.sum } behavior of "addSoon" it should "eventually compute a sum of passed Ints" in { val futureSum: Future[Int] = addSoon(1, 2) // You can map assertions onto a Future, then return // the resulting Future[Assertion] to ScalaTest: futureSum map { sum => assert(sum == 3) } } def addNow(addends: Int*): Int = addends.sum "addNow" should "immediately compute a sum of passed Ints" in { val sum: Int = addNow(1, 2) // You can also write synchronous tests. The body // must have result type Assertion: assert(sum == 3) } }
Running the above AddSpec
in the Scala interpreter would yield:
addSoon
- should eventually compute a sum of passed Ints
- should immediately compute a sum of passed Ints
Starting with version 3.0.0, ScalaTest assertions and matchers have result type Assertion
. The result type of the first test in the example above, therefore, is Future[Assertion]
.
For clarity, here's the relevant code in a REPL session:
scala> import org.scalatest._ import org.scalatest._ scala> import Assertions._ import Assertions._ scala> import scala.concurrent.Future import scala.concurrent.Future scala> import scala.concurrent.ExecutionContext import scala.concurrent.ExecutionContext scala> implicit val executionContext = ExecutionContext.Implicits.global executionContext: scala.concurrent.ExecutionContextExecutor = scala.concurrent.impl.ExecutionContextImpl@@26141c5b scala> def addSoon(addends: Int*): Future[Int] = Future { addends.sum } addSoon: (addends: Int*)scala.concurrent.Future[Int] scala> val futureSum: Future[Int] = addSoon(1, 2) futureSum: scala.concurrent.Future[Int] = scala.concurrent.impl.Promise$DefaultPromise@@721f47b2 scala> futureSum map { sum => assert(sum == 3) } res0: scala.concurrent.Future[org.scalatest.Assertion] = scala.concurrent.impl.Promise$DefaultPromise@@3955cfcb
The second test has result type Assertion
:
scala> def addNow(addends: Int*): Int = addends.sum addNow: (addends: Int*)Int scala> val sum: Int = addNow(1, 2) sum: Int = 3 scala> assert(sum == 3) res1: org.scalatest.Assertion = Succeeded
When AddSpec
is constructed, the second test will be implicitly converted to Future[Assertion]
and registered. The implicit conversion is from Assertion
to Future[Assertion]
,
so you must end synchronous tests in some ScalaTest assertion or matcher expression. If a test would not otherwise end in type Assertion
, you can place succeed
at the end of
the test. succeed
, a field in trait Assertions
, returns the Succeeded
singleton:
scala> succeed res2: org.scalatest.Assertion = Succeeded
Thus placing succeed
at the end of a test body will satisfy the type checker:
"addNow" should "immediately compute a sum of passed Ints" in { val sum: Int = addNow(1, 2) assert(sum == 3) println("hi") // println has result type Unit succeed // succeed has result type Assertion }
Asynchronous style traits extend AsyncTestSuite
, which provides an implicit scala.concurrent.ExecutionContext
named executionContext
. This execution context is
used by asynchronous style traits to transform the Future[Assertion]
s returned by each test into the FutureOutcome
returned by the test function passed to withFixture
.
This ExecutionContext
is also intended to be used in the tests, including when you map assertions onto futures.
On both the JVM and Scala.js, the default execution context provided by ScalaTest's asynchronous testing styles confines execution to a single thread per test. On JavaScript,
where single-threaded execution is the only possibility, the default execution context is scala.scalajs.concurrent.JSExecutionContext.Implicits.queue
. On the JVM,
the default execution context is a serial execution context provided by ScalaTest itself.
When ScalaTest's serial execution context is called upon to execute a task, that task is recorded in a queue for later execution. For example, one task that will be placed in this
queue is the task that transforms the Future[Assertion]
returned by an asynchronous test body to the FutureOutcome
returned from the test function. Other
tasks that will be queued are any transformations of, or callbacks registered on, Future
s that occur in your test body, including any assertions you map onto Future
s.
Once the test body returns, the thread that executed the test body will execute the tasks in that queue one after another, in the order they were enqueued.
ScalaTest provides its serial execution context as the default on the JVM for three reasons. First, most often running both tests and suites in parallel does not give a significant
performance boost compared to just running suites in parallel. Thus parallel execution of Future
transformations within individual tests is not generally needed for
performance reasons.
Second, if multiple threads are operating in the same suite concurrently, you'll need to make sure access to any mutable fixture objects by multiple threads is synchronized. Although
access to mutable state along the same linear chain of Future
transformations need not be synchronized, this does not hold true for callbacks, and in general it is easy to
make a mistake. Simply put: synchronizing access to shared mutable state is difficult and error prone. Because ScalaTest's default execution context on the JVM confines execution of
Future
transformations and call backs to a single thread, you need not (by default) worry about synchronizing access to mutable state in your asynchronous-style tests.
Third, asynchronous-style tests need not be complete when the test body returns, because the test body returns a Future[Assertion]
. This Future[Assertion]
will
often represent a test that has not yet completed. As a result, when using a more traditional execution context backed by a thread-pool, you could potentially start many more tests executing
concurrently than there are threads in the thread pool. The more concurrently execute tests you have competing for threads from the same limited thread pool, the more likely it will be that
tests will intermitently fail due to timeouts.
Using ScalaTest's serial execution context on the JVM will ensure the same thread that produced the Future[Assertion]
returned from a test body is also used to execute any tasks
given to the execution context while executing the test body—and that thread will not be allowed to do anything else until the test completes. If the serial execution context's task queue
ever becomes empty while the Future[Assertion]
returned by that test's body has not yet completed, the thread will block until another task for that test is enqueued. Although
it may seem counter-intuitive, this blocking behavior means the total number of tests allowed to run concurrently will be limited to the total number of threads executing suites. This fact
means you can tune the thread pool such that maximum performance is reached while avoiding (or at least, reducing the likelihood of) tests that fail due to timeouts because of thread competition.
This thread confinement strategy does mean, however, that when you are using the default execution context on the JVM, you must be sure to never block in the test body waiting for a task to be
completed by the execution context. If you block, your test will never complete. This kind of problem will be obvious, because the test will consistently hang every time you run it. (If a test
is hanging, and you're not sure which one it is, enable slowpoke notifications.) If you really do want to block in your tests, you may wish to just use a traditional style traits with
ScalaFutures
instead. Alternatively, you could override the executionContext
and use a traditional ExecutionContext
backed by a thread pool. This will
enable you to block in an asynchronous-style test on the JVM, but you'll need to worry about synchronizing access to shared mutable state.
To use a different execution context, just override executionContext
. For example, if you prefer to use the runNow
execution context on Scala.js instead of the default queue,
you would write:
// on Scala.js implicit override def executionContext = scala.scalajs.concurrent.JSExecutionContext.Implicits.runNow
If you prefer on the JVM to use the global execution context, which is backed by a thread pool, instead of ScalaTest's default serial execution contex, which confines execution to a single thread, you would write:
// on the JVM (and also compiles on Scala.js, giving // you the queue execution context) implicit override def executionContext = scala.concurrent.ExecutionContext.Implicits.global
By default (unless you mix in ParallelTestExecution
), tests in an asynchronous style traits will be executed one after another, i.e., serially. This is true whether those
tests return Assertion
or Future[Assertion]
, no matter what threads are involved. This default behavior allows you to re-use a shared fixture, such as an external
database that needs to be cleaned after each test, in multiple tests in async-style suites. This is implemented by registering each test, other than the first test, to run as a continuation
after the previous test completes.
If you want the tests of an asynchronous style trait to be executed in parallel, you must mix in ParallelTestExecution
and enable parallel execution of tests in your build.
You enable parallel execution in Runner
with the -P
command line argument. In the ScalaTest Maven Plugin, set parallel
to true
. In sbt,
parallel execution is the default, but to be explicit you can write:
parallelExecution in Test := true // the default in sbt
On the JVM, if both ParallelTestExecution
is mixed in and parallel execution is enabled in the build, tests in an async-style suite will be started in parallel, using threads
from the Distributor
, and allowed to complete in parallel, using threads from the executionContext
. If you are using ScalaTest's serial execution context, the JVM
default, asynchronous tests will run in parallel very much like traditional style trait's tests run in parallel: 1) Because ParallelTestExecution
extends OneInstancePerTest
,
each test will run in its own instance of the test class, you need not worry about synchronizing access to mutable instance state shared by different tests in the same suite. 2) Because the serial
execution context will confine the execution of each test to the single thread that executes the test body, you need not worry about synchronizing access to shared mutable state accessed by
transformations and callbacks of Future
s inside the test.
If ParallelTestExecution
is mixed in but parallel execution of suites is not enabled, asynchronous tests on the JVM will be started sequentially, by the single thread that invoked run,
but without waiting for one test to complete before the next test is started. As a result, asynchronous tests will be allowed to complete in parallel, using threads from the executionContext
.
If you are using the serial execution context, however, you'll see the same behavior you see when parallel execution is disabled and a traditional suite that mixes in ParallelTestExecution
is
executed: the tests will run sequentially. If you use an execution context backed by a thread-pool, such as global, however, even though tests will be started sequentially by one thread, they will be
allowed to run concurrently using threads from the execution context's thread pool.
The latter behavior is essentially what you'll see on Scala.js when you execute a suite that mixes in ParallelTestExecution
. Because only one thread exists when running under JavaScript, you
can't "enable parallel execution of suites." However, it may still be useful to run tests in parallel on Scala.js, because tests can invoke API calls that are truly asynchronous by calling into external
APIs that take advantage of non-JavaScript threads. Thus on Scala.js, ParallelTestExecution
allows asynchronous tests to run in parallel, even though they must be started sequentially. This
may give you better performance when you are using API calls in your Scala.js tests that are truly asynchronous.
If you need to test for expected exceptions in the context of futures, you can use the recoverToSucceededIf
and recoverToExceptionIf
methods of trait RecoverMethods
.
Because this trait is mixed into supertrait AsyncTestSuite
, both of these methods are available by default in an asynchronous style traits.
If you just want to ensure that a future fails with a particular exception type, and do not need to inspect the exception further, use recoverToSucceededIf
:
recoverToSucceededIf[IllegalStateException] { // Result type: Future[Assertion] emptyStackActor ? Peek }
The recoverToSucceededIf
method performs a job similar to assertThrows
, except in the context of a future. It transforms a Future
of any type into a Future[Assertion]
that succeeds only if the original future fails with the specified exception. Here's an example in the REPL:
scala> import org.scalatest.RecoverMethods._ import org.scalatest.RecoverMethods._ scala> import scala.concurrent.Future import scala.concurrent.Future scala> import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.ExecutionContext.Implicits.global scala> recoverToSucceededIf[IllegalStateException] { | Future { throw new IllegalStateException } | } res0: scala.concurrent.Future[org.scalatest.Assertion] = ... scala> res0.value res1: Option[scala.util.Try[org.scalatest.Assertion]] = Some(Success(Succeeded))
Otherwise it fails with an error message similar to those given by assertThrows
:
scala> recoverToSucceededIf[IllegalStateException] { | Future { throw new RuntimeException } | } res2: scala.concurrent.Future[org.scalatest.Assertion] = ... scala> res2.value res3: Option[scala.util.Try[org.scalatest.Assertion]] = Some(Failure(org.scalatest.exceptions.TestFailedException: Expected exception java.lang.IllegalStateException to be thrown, but java.lang.RuntimeException was thrown)) scala> recoverToSucceededIf[IllegalStateException] { | Future { 42 } | } res4: scala.concurrent.Future[org.scalatest.Assertion] = ... scala> res4.value res5: Option[scala.util.Try[org.scalatest.Assertion]] = Some(Failure(org.scalatest.exceptions.TestFailedException: Expected exception java.lang.IllegalStateException to be thrown, but no exception was thrown))
The recoverToExceptionIf
method differs from the recoverToSucceededIf
in its behavior when the assertion succeeds: recoverToSucceededIf
yields a
Future[Assertion]
, whereas recoverToExceptionIf
yields a Future[T]
, where T
is the expected exception type.
recoverToExceptionIf[IllegalStateException] { // Result type: Future[IllegalStateException] emptyStackActor ? Peek }
In other words, recoverToExceptionIf
is to intercept
as recovertToSucceededIf
is to assertThrows
. The first one allows you to perform
further assertions on the expected exception. The second one gives you a result type that will satisfy the type checker at the end of the test body. Here's an example showing recoverToExceptionIf
in the REPL:
scala> val futureEx = | recoverToExceptionIf[IllegalStateException] { | Future { throw new IllegalStateException("hello") } | } futureEx: scala.concurrent.Future[IllegalStateException] = ... scala> futureEx.value res6: Option[scala.util.Try[IllegalStateException]] = Some(Success(java.lang.IllegalStateException: hello)) scala> futureEx map { ex => assert(ex.getMessage == "world") } res7: scala.concurrent.Future[org.scalatest.Assertion] = ... scala> res7.value res8: Option[scala.util.Try[org.scalatest.Assertion]] = Some(Failure(org.scalatest.exceptions.TestFailedException: "[hello]" did not equal "[world]"))
withFixture
You'll use NoArgAsyncTest
and OneArgAsyncTest
for asynchronous style traits, the following is the default implementation for withFixture
:
// Default implementation in trait AsyncTestSuite protected def withFixture(test: NoArgAsyncTest): FutureOutcome = { test() }
You can, therefore, override withFixture
to perform setup before invoking the test function, and/or perform cleanup after the test completes. The recommended way to ensure
cleanup is performed after a test completes is to use the complete-lastly syntax, defined in supertrait CompleteLastly
. The complete-lastly syntax will ensure that cleanup
will occur whether future-producing code completes abruptly by throwing an exception, or returns normally yielding a future. In the latter case, complete-lastly will register the cleanup
code to execute asynchronously when the future completes.
The withFixture
method is designed to be stacked, and to enable this, you should always call the super implementation of withFixture
, and let it invoke the test
function rather than invoking the test function directly. In other words, instead of writing “test()
”, you should write “super.withFixture(test)
”, like this:
// Your implementation override def withFixture(test: NoArgAsyncTest) = { // Perform setup here complete { super.withFixture(test) // Invoke the test function } lastly { // Perform cleanup here } }
If you have no cleanup to perform, you can write withFixture like this instead:
// Your implementation override def withFixture(test: NoArgAsyncTest) = { // Perform setup here super.withFixture(test) // Invoke the test function }
If you want to perform an action only for certain outcomes, you'll need to register code performing that action as a callback on the Future
using one of Future
's
registration methods: onComplete
, onSuccess
, or onFailure
. Note that if a test fails, that will be treated as a scala.util.Success
(org.scalatest.Failed
). So if you want to perform an action if a test fails, for example, you'd register the callback using onSuccess
.
Here's an example in which withFixture(NoArgAsyncTest)
is used to take a snapshot of the working directory if a test fails, and send that information to the standard output stream:
package org.scalatest.examples.asyncflatspec.noargasynctest import java.io.File import org.scalatest._ import scala.concurrent.Future class ExampleSpec extends AsyncFlatSpec { override def withFixture(test: NoArgAsyncTest) = { super.withFixture(test) onFailedThen { _ => val currDir = new File(".") val fileNames = currDir.list() info("Dir snapshot: " + fileNames.mkString(", ")) } } def addSoon(addends: Int*): Future[Int] = Future { addends.sum } "This test" should "succeed" in { addSoon(1, 1) map { sum => assert(sum == 2) } } it should "fail" in { addSoon(1, 1) map { sum => assert(sum == 3) } } }
Running this version of ExampleSpec
in the interpreter in a directory with two files, hello.txt and world.txt would give the following output:
scala> org.scalatest.run(new ExampleSpec) ExampleSpec: This test - should succeed - should fail *** FAILED *** 2 did not equal 3 (:33)
Note that the NoArgAsyncTest
passed to withFixture
, in addition to an apply method that executes the test, also includes the test name and the config map passed to
runTest
. Thus you can also use the test name and configuration objects in your withFixture
implementation.
Lastly, if you want to transform the outcome in some way in withFixture
, you'll need to use either the map
or transform
methods of Future
, like this:
// Your implementation override def withFixture(test: NoArgAsyncTest) = { // Perform setup here val futureOutcome = super.withFixture(test) // Invoke the test function futureOutcome change { outcome => // transform the outcome into a new outcome here } }
Note that a NoArgAsyncTest
's apply method will return a scala.util.Failure
only if the test completes abruptly with a "test-fatal" exception (such as OutOfMemoryError
)
that should cause the suite to abort rather than the test to fail. Thus usually you would use map
to transform future outcomes, not transform, so that such test-fatal exceptions pass through unchanged.
The suite will abort asynchronously with any exception returned from NoArgAsyncTest
's apply method in a scala.util.Failure
.
If all or most tests need the same fixture, you can avoid some of the boilerplate of the loan-fixture method approach by using a fixture.AsyncTestSuite
and overriding
withFixture
(OneArgAsyncTest
). Each test in a fixture.AsyncTestSuite
takes a fixture as a parameter, allowing you to pass the fixture into the test.
You must indicate the type of the fixture parameter by specifying FixtureParam
, and implement a withFixture
method that takes a OneArgAsyncTest
.
This withFixture
method is responsible for invoking the one-arg async test function, so you can perform fixture set up before invoking and passing the fixture into the test
function, and ensure clean up is performed after the test completes.
To enable the stacking of traits that define withFixture
(NoArgAsyncTest
), it is a good idea to let withFixture
(NoArgAsyncTest
) invoke the
test function instead of invoking the test function directly. To do so, you'll need to convert the OneArgAsyncTest
to a NoArgAsyncTest
. You can do that by passing
the fixture object to the toNoArgAsyncTest
method of OneArgAsyncTest
. In other words, instead of writing “test(theFixture)
”, you'd delegate responsibility
for invoking the test function to the withFixture(NoArgAsyncTest)
method of the same instance by writing:
withFixture(test.toNoArgAsyncTest(theFixture))
Here's a complete example:
package org.scalatest.examples.asyncflatspec.oneargasynctest import org.scalatest._ import scala.concurrent.Future import scala.concurrent.ExecutionContext // Defining actor messages sealed abstract class StringOp case object Clear extends StringOp case class Append(value: String) extends StringOp case object GetValue class StringActor { // Simulating an actor private final val sb = new StringBuilder def !(op: StringOp): Unit = synchronized { op match { case Append(value) => sb.append(value) case Clear => sb.clear() } } def ?(get: GetValue.type)(implicit c: ExecutionContext): Future[String] = Future { synchronized { sb.toString } } } class ExampleSpec extends fixture.AsyncFlatSpec { type FixtureParam = StringActor def withFixture(test: OneArgAsyncTest): FutureOutcome = { val actor = new StringActor complete { actor ! Append("ScalaTest is ") // set up the fixture withFixture(test.toNoArgAsyncTest(actor)) } lastly { actor ! Clear // ensure the fixture will be cleaned up } } "Testing" should "be easy" in { actor => actor ! Append("easy!") val futureString = actor ? GetValue futureString map { s => assert(s == "ScalaTest is easy!") } } it should "be fun" in { actor => actor ! Append("fun!") val futureString = actor ? GetValue futureString map { s => assert(s == "ScalaTest is fun!") } } }
Next, learn about using ScalaTest with Scala-js.


Mix and match from our various collections, such as “Cleaning,” “Around the House,” and “Extra Mobility”
Pick which day of the month you'd like to recieve your TVCrate
It's that easy!
Thanks to this wonderful service, I don't have any more issues around the house! The grandchildren are amazed to see the collection of products I've have in stock inside my home. Their eyes pop out of their heads they're so surprised!
Thank you TVCrate I love all the stuff I've gotten in the mail it has all been very helpful and I don't know what I would do without your services it is very helpful and it helps get me throgh my days I don't know how to end this email so thanks again thank you very much
Wow! What a great idea! I can't imagine going back to life without TVCrate! I look forward to my new box every month!
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Tecum optime, deinde etiam cum mediocri amico. Ea possunt paria non esse. An nisi populari fama? Zenonis est, inquam, hoc Stoici. (Make sure to replace this once we get our fourth review -AJ)
$20 per month
$35 per month
$50 per month
Managing your subscription is painless! You can easily skip a month* or cancel** at any time.


public static class Processing.PImage
extends java.awt.image.BufferedImage
PImage
is the Image Class for JProcessing
.
PImage
is A Subclass of BufferedImage
. Besides the Ability to Store Image Files,
PImage
in JProcessing
also offers Methods to Load and Save Images from Hard Drive
as well as to Edit and Resize Images.
The Dimension of a PImage
can be Obtained by Variable width
and height
.
However, their Value will be Updating through a Image TileObserver
, thus not being Thread-safe.
A short Delay is Expected from the Change of Size of a PImage
to the change of
width
and height
value of that same PImage
.
In Processing IDE, the pixels[]
Array can be Accessed even before Calling loadPixels()
,
Although if done so pixels[]
Array will not Hold any Data from the Original Image. But in
JProcessing
However, This will Not be Possible. Calling loadPixels()
will be Mandatory
before Accessing the pixels[]
Array, otherwise Array pixels[]
will Not be Initialized.
This is a Known Issue of JProcessing
. The Reason of Intentionally leaving it Unfixed is due to the fact that
the Usage of pixels[]
Array in Processing Code Programming is considerably Rare. Pre-allocating Space for
pixels[]
Array will effectively Double the Memory Usage of every PImage
. It is quite
Inefficient and Resource Consuming.
Another Known Issue being the .resize()
Method will Not change the actual Size of the PImage
directly.
Instead, the Resized Image will be Returned.
Image Loading and Real-time Processing can be Slow especially when dealing with High-resolution Images. It is Advised
that if Possible, all such Methods should be Done in Processing.setup()
or Asynchronously. Avoid using them
in Processing.draw()
where the Method will be Invoked Repeatedly by every Frame.
.requestImage(path)
and .save(path)
Methods will Utilize Multi-threading to Load and Save Image.
Each time they are Invoked a new Thread will be started to Process their operations.
Note that Although the Instructions on the Processing Website Forbids the Construction of PImage
Class
using Syntax new PImage(w,h)
, such Method is totally Allowed in JProcessing
and will
have the same result of Calling Method createImage(w,h)
.
Todo: Improve Real-time Image Processing Performance (with Multi-threading) and Optimize current Multi-thread Efficiency
Todo: Add additional Image Processing Functions such as filter()
and blend()
BufferedImage
,
PImage in Processing IDE| Modifier and Type | Field and Description |
|---|---|
short |
height
Height of the
PImage (Read-Only) |
Processing.color[] |
pixels
A color map of every pixel on the PImage, initialized and updated by calling
loadPixels() . |
short |
width
Width of the
PImage (Read-Only) |
TYPE_3BYTE_BGR, TYPE_4BYTE_ABGR, TYPE_4BYTE_ABGR_PRE, TYPE_BYTE_BINARY, TYPE_BYTE_GRAY, TYPE_BYTE_INDEXED, TYPE_CUSTOM, TYPE_INT_ARGB, TYPE_INT_ARGB_PRE, TYPE_INT_BGR, TYPE_INT_RGB, TYPE_USHORT_555_RGB, TYPE_USHORT_565_RGB, TYPE_USHORT_GRAY
| Constructor and Description |
|---|
PImage(int w,
int h)
Create a new
PImage with type ARGB and
dimensions specified by w and h . |
PImage(int w,
int h,
short type)
Create a new
PImage with type specified by type and
dimensions specified by w and h . |
| Modifier and Type | Method and Description |
|---|---|
void |
copy(java.awt.image.BufferedImage source,
int x,
int y,
int w,
int h,
int dx,
int dy,
int dw,
int dh) |
void |
copy(int x,
int y,
int w,
int h,
int dx,
int dy,
int dw,
int dh) |
Processing.color |
get(int x,
int y) |
Processing.PImage |
get(int x,
int y,
int w,
int h) |
void |
loadPixels() |
Processing.PImage |
mask(java.awt.image.BufferedImage img) |
Processing.PImage |
mask(int[] mask) |
Processing.PImage |
resize(int w,
int h)
Resize the
PImage . |
void |
save(@NotNull java.lang.String path) |
void |
set(int x,
int y,
java.awt.Color c) |
Processing.PImage |
tint(java.awt.Color c) |
<value extends java.lang.Number> |
tint(java.awt.Color c,
value a) |
<value extends java.lang.Number> |
tint(value c) |
<value extends java.lang.Number> |
tint(value c,
value a) |
<value extends java.lang.Number> |
tint(value r,
value g,
value b) |
<value extends java.lang.Number> |
tint(value r,
value g,
value b,
value a) |
void |
updatePixels() |
addTileObserver, coerceData, copyData, createGraphics, getAlphaRaster, getColorModel, getData, getData, getGraphics, getHeight, getHeight, getMinTileX, getMinTileY, getMinX, getMinY, getNumXTiles, getNumYTiles, getProperty, getProperty, getPropertyNames, getRaster, getRGB, getRGB, getSampleModel, getSource, getSources, getSubimage, getTile, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getTransparency, getType, getWidth, getWidth, getWritableTile, getWritableTileIndices, hasTileWriters, isAlphaPremultiplied, isTileWritable, releaseWritableTile, removeTileObserver, setData, setRGB, setRGB, toString
public short width
PImage
(Read-Only)public short height
PImage
(Read-Only)public Processing.color[] pixels
loadPixels()
.
Accessing the array before running loadPixels()
will cause NullPointerException
.
public PImage(int w, int h)
PImage
with type ARGB
and
dimensions specified by w
and h
.
This constructor works exactly the same as method createImage(w,h)
.
w
- width of the imageh
- Height of the imagepublic PImage(int w, int h, short type)
PImage
with type specified by type
and
dimensions specified by w
and h
.
This constructor works exactly the same as method createImage(w,h,type)
.
w
- width of the imageh
- Height of the imagetype
- Format of the ImageShould be one of the followings:Processing.RGB
,Processing.ARGB
,Processing.ALPHA
public void loadPixels()
public void updatePixels()
public Processing.PImage resize(int w, int h)
PImage
.
Different from Processing IDE, the dimension of the original PImage
will be unaffected.
w
- new width of the PImage
h
- new height of the PImage
PImage
public Processing.color get(int x, int y)
public Processing.PImage get(int x, int y, int w, int h)
public void set(int x, int y, java.awt.Color c)
public Processing.PImage mask(java.awt.image.BufferedImage img)
public Processing.PImage mask(int[] mask)
public Processing.PImage tint(java.awt.Color c)
public <value extends java.lang.Number> Processing.PImage tint(java.awt.Color c, value a)
public <value extends java.lang.Number> Processing.PImage tint(value c)
public <value extends java.lang.Number> Processing.PImage tint(value c, value a)
public <value extends java.lang.Number> Processing.PImage tint(value r, value g, value b)
public <value extends java.lang.Number> Processing.PImage tint(value r, value g, value b, value a)
public void copy(int x, int y, int w, int h, int dx, int dy, int dw, int dh)
public void copy(java.awt.image.BufferedImage source, int x, int y, int w, int h, int dx, int dy, int dw, int dh)
public void save(@NotNull @NotNull java.lang.String path)


--- layout: page title: About header-img: "img/about-bg.png" ---
I am a 34 year old previous business owner, award winning documentarian, and goal achiever. None of this got me to the financial place I want to be, but were they building blocks? Follow along as I talk about my journey with FlatIron's online bootcamp and realize my dream.