Great Introduction to JUnit
How to add shortcut keys for java code in eclipse – Stack Overflow
Say I type "sout", the intellisense should expand it to "System.out.println()". Is there a way to adding such templates?
Source: How to add shortcut keys for java code in eclipse – Stack Overflow
Reverse a String: 4 potential approaches
This is probably one of the most common Java programming interview question and there are at least 4 different approaches that can be taken to tackle it. We will illustrate them by presenting some examples in Java.
1) Use the built-in StringBuffer reverse() method:
public class ReverseStringBuffer
{
 public static void main(String args[])
 {
 String originalString = "MyAwesomeString";
 String reversedString = new StringBuffer(originalString).reverse().toString();
 System.out.println("This is the original String " + originalString +
 "n" + "This is the reversed String " + reversedString);
 }
}
2) Use the built-in StringBuilder reverse() method:
public class ReverseStringBuilder
{
 public static void main(String args[])
 {
 String anotherOriginalString = "AmazingString";
 StringBuilder anotherReversedString =
 new StringBuilder(anotherOriginalString).reverse();
 System.out.println("This is the original String " + anotherOriginalString +
 "n" + "This is the reversed String " + anotherReversedString);
 }
}
3) Convert a String into a Char array and loop through each character.
public class ReverseStringCharArray
{
 public static void main(String args[])
 {
 String myString = "ThisIsMyAwesomeString";
 char[] stringToChar = myString.toCharArray();
 System.out.println(stringToChar.length);
 for(int i = stringToChar.length - 1; i >= 0; i--)
 {
 System.out.print(stringToChar[i]);
 }
A similar implementation can be re-written as an utility:

public class ReverseStringCharArray
{
 public static void main(String args[])
 {
 String term = "HappyString";
 //Here we are calling the reverse utility method
 String reversedTerm= reverse(term);
 System.out.println("This is the original String " + term +
 "n" + "This is the reversed String " + reversedTerm);
 }
 public static String reverse(String sourceTerm)
 {
 if(sourceTerm == null || sourceTerm.isEmpty())
 {
 return sourceTerm;
 }
 String reversedString = "";
 for(int i = source.length() -1; i>= 0; i--)
 {
 reversedString = reversedString + source.charAt(i);
 System.out.println("This prints the reversed string " +
 reversedString + " n " +
 " whereas this prints the individual character " + source.charAt(i));
 }
 return reversedString;
 }
}
4) Use recursion to reverse the entered String. This method returns the reverse of the string passed in by appending the first character (sourceTern.charAt(0)) to the remainder of the String itself (str.substring(1)). If the String is less or equal to 1 character, then the recursion is halted.
public class ReverseStringRecursiveMethod
{
 public static void main(String args[])
 {
 String term = "AnotherString";
 //prints the result of the call to the recursive method
 System.out.println(recursiveMethod(term));
 }
 public static String recursiveMethod(String sourceTerm)
 {
 if ( (null == sourceTerm) || (sourceTerm.length() <= 1) )
 {
 return sourceTerm;
 }

 return recursiveMethod(sourceTerm.substring(1)) + sourceTern.charAt(0);
 }
}
Keyboard Shortcuts – RStudio Support
Print this and have it in front of your when using RStudio. It is priceless! Source: Keyboard Shortcuts – RStudio Support
Introduction to Predictive Analytics – YouTube
Follow
Get every new post delivered to your Inbox.
Join 73 other followers
%d bloggers like this:


Homologous bladder augmentation in dog with the bladder acellular matrix graft
Dr E.A. Tanagho, Department of Urology, U-575, University of California, San Francisco, California 94143 0738, USA.
Objective To determine the functional potential and antigenicity of the homologous bladder acellular matrix graft (BAMG) in a dog model.
Materials and methods Seven mongrel dogs underwent partial cystectomy (20–50%) and grafting with an equal-sized BAMG; two control animals underwent partial cystectomy (40%) only. The dogs were killed after 30 (one), 120 (one) and 210 days (five dogs). Blood samples were obtained before and at 1, 2, 4, 7, 14, 30, 90 and 210 days after surgery. The dogs underwent cystography, intravenous pyelography and ultrasonography before and after surgery, and on the day they were killed, with cystoscopy carried out just before death. The grafted tissue was assessed using routine and immunohistochemical techniques.
Results All the dogs survived surgery; a complete blood cell count, chemical panel and white blood cell count showed no significant difference between the experimental and control animals. Cystography, cystoscopy and ultrasonography revealed no pathological changes in the upper urinary tract. After 7 months, the mean bladder capacity in the augmented dogs was significantly higher (P = 0.035) than in the controls (264 vs 172 mL). Histological evaluation showed an invasion of all bladder wall components during the first month; at 7 months, the morphological examination showed essentially complete regeneration.
Conclusion In this dog model, the potential of the BAMG as a bladder augmentation graft was confirmed, having minimal antigenicity with maximal acceptance. The reconstructed bladder matched the morphological and functional properties of the normal bladder.


Martin Kutter > SOAP-Transport-JABBER-0.713 > SOAP::Transport::JABBER
Annotate this POD
View/Report Bugs
Module Version: 0.713 Source
SOAP::Transport::JABBER ^
This class provides a Jabber-based transport backend for SOAP::Lite.
This class uses the Net::Jabber classes to abstract the Jabber protocol away from the direct notice of the application. Besides maintaining any needed objects internally, the package also uses a separate class as a proxy between communication layers, SOAP::Transport::JABBER::Query. The Jabber support provides both client and server classes.
Inherits from: SOAP::Client, Net::Jabber::Client. This class provides localized implementations for both the new and send_receive methods, neither of which are changed in terms of interface. The only difference is that the send_receive method doesn't directly use the action hash key on the input it receives. In addition to these two basic methods, the server class overrides the endpoint method it would otherwise inherit from SOAP::Client:
In the general sense, this still acts as a basic accessor method, with the same get value/set value behavior used consistently through the SOAP::Lite module. The difference between this version and most others is that when the endpoint is initially set or is changed, the client object makes the connection to the Jabber endpoint, sending the proper authentication credentials and setting up the conversation mechanism using the SOAP::Transport::JABBER::Query class as a delegate. It then calls the superclass endpoint method to ensure that all other related elements are taken care of.
Inherits from: SOAP::Server.
The server class provided for Jabber support defines a slightly different interface to the constructor. The server manages the Jabber communication by means of an internal Net::Jabber::Client instance. In a fashion similar to that used by SOAP::Transport::HTTP::Daemon, the server class catches methods that are meant for the Jabber client and treats them as if the class inherits directly from that class, without actually doing so. In doing so, the handle method is implemented as a frontend to the Process method of the Jabber client class. The difference in the interface to the constructor is:
new(URI, optional server key/value options)
 $srv = SOAP::Transport::JABBER::Server-> new($uri);
The constructor for the class expects that the first argument will be a Jabber-style URI, followed by the standard set of optional key/value pairs of method names and their parameters. All the method/parameter pairs are delegated to the superclass constructor; only the Jabber URI is handled locally. It's used to set up the Net::Jabber::Client instance that manages the actual communications.
This module is currently unmaintained, so if you find a bug, it's yours - you probably have to fix it yourself. You could also become maintainer - just send an email to
Paul Kulchenko (
Randy J. Ray (
Byrne Reese (
Martin Kutter (
syntax highlighting:


text:
Measurement of Young's Modulus and Stress Analysis of a Magnetic Thin Film
- YANAI Hidetoshi, KISHINE Nobuyuki, KOMABA Yukari, MURAKAMI Yukitaka
- JSME international journal. Ser. 1, Solid mechanics, strength of materials SCOPUS
- 日本機械学会 in 1996
- Cited Count
In order to evaluate the mechanical properties of a very thin film, this paper proposes a convenient method for separately determining Young's moduli of two thin films of a magnetic recording medium. Furthermore, the particular stress distribution inside a magnetic recording film (two bonded thin films) is analyzed. The internal stress in the medium is not uniform when the medium is subjected to unidirectional tension. The analysis shows that the difference in Poisson's ratio on two thin films causes flexure of the two bonded films under tension, as well as shearing stress at the interface between the magnetic layer and the substrate. Since the shearing stress may cause fatigue damage of the tape edge, detailed FEM analysis on its distribution is carried out.
If you register references through the customer center, the reference information will be registered as soon as possible.

source: m-a-p/FineFineWeb


need to understand what exactly happens when you click the big execution button.
Frontend click -> Backend verifies and deploys executions -> (based on environments) orborus deploys a new worker -> worker finds actions to execute -> your app is executed.
 1. A workflow is executed
 2. The backend verifies whether you can execute and deploys to environment
 3. Orborus is listening to environment and deploys worker if it's the correct one
 4. Worker deploys actions if they have the right environment
 5. App executes and returns data back to the execution
As previously stated, a lot can go wrong. Here's the most common issues:
 - Networking (firewalls / proxies)
 - Badly formed apps.
 - Bad environment
General debugging
This part is mean to describe how to go about finding the issue you're having with executions. In most cases, you should start from the top of the list previously described in the following way:
 1. Find out what environment your action(s) are running under by clicking the App and seeing "Environment" dropdown. In this case (and default) is "Shuffle". Environments can be specified / changed under the path /admin Check execution 3
 2. Check if the workflow executed at all by finding the execution line in the shuffle-backend container. Take note that it mentions environment "Shuffle", as found in the previous step.
docker logs -f shuffle-backend
Check execution 1
 1. If it executed, check whether Orborus is running, before checking it's logs for "Container \<container_id> is created. The container_id is the worker it has deployed. Take not of the environment again at the end of the line. If you don't see this line, it's most likely because it's running in the wrong environment.
Check if shuffle-orborus is running
docker ps # Check if shuffle-orborus is running
Find whether it was deployed or not
docker logs -f shuffle-orborus # Get logs from shuffle-orborus
Check execution 2
Check environment of running shuffle-orborus container.
docker inspect shuffle-orborus | grep -i "ENV"
Expected env result where "Shuffle" corresponds to the environment Check execution 4
 1. Check whether the worker executed your app. Remember that we found \<container_id> previously by checking the logs of shuffle-orborus? Now we need that one. Workers are and will always be verbose, specifically for the reason of potential debugging.
Find logs from a docker container
docker logs -f CONTAINER_ID
Check execution 5
As can be seen in the image above, is shows the exact execution order it takes. It starts by finding the parents, before executing the child process after it's finished. Take note of the specific apps being executed as well. It says "Time to execute \<app_id> with app \<app_name:app_version>. This indicates the app THAT WILL be executed. The following lines saying "Container \<container_id> is the container created with this app.
 1. App debugging in itself might be the trickiest. There are a lot of factors like branches, bad workflow building etc that might come into play. This builds on the same concept as the worker, where you pass the container ID it specified.
Get the app logs
docker logs -f CONTAINER_ID # The CONTAINER_ID found in the previous worker logs
As you will notice, app logs can be quite verbose (optional in a later build). In essence, if you see "RUNNING NORMAL EXECUTION" in the end, there's a 99.9% chance that it worked, otherwise some issue might have occurred.
Please notify me if you need help debugging app executions ASAP, as I've done a lot of it, but it's more tricky than the other steps.
FAQ
Q: What is multiline? how is that represented when filling out the values?
A: Multiline means the field will be larger and easier to use in the UI. E.g. you can use newlines.
Q: Are there different schema types other than string?
A: The only schema type is currently string, but we'll migrate to at least have number, list, bool and object later. You can put whatever there - it's not used.
Q: How do the options function? does defining it automatically prevent user input? or can there be both?
A: The first option is always chosen (at least that's the point). Make an empty entry if it should be blank by default
Q: Would it be possible to alter the yaml format to be able to group actions into sections? this could also provide a way to section stuff in the UI presentation so it's not one giant list of actions
A: Yep, categorization will come. Not possible right now, but if you add a field like "category" to each action, we could incorporate that right away in the backend
Q: What are the possible return schema types?
A: Return schema: You can return it pretty much however you want and we'll make it into a string. Follows same as #2: We'll start using specific casting later
Q: What's the difference in using the UI app + action creation process vs manually creating the files?
A: UI App creator can only make Rest API's with specific actions. It generates the python code and api.yaml in the backend / docker image
Q: In app creation UI, what's a query?
A: Query = parameter = whatever is at the end of urls after ?: _URL_
Q: In app creation UI, what are the extra configuration items used for? examples? also, middle input box has example text cut off partway through.
A: Extra config was added recently (last 2 weeks) and was added to make it possible to e.g. add headers to all actions at once, as well as extra "required" parameters. It's not finished - this is just the start stage. If you add a name in there, it will be required to fill out as authentication mechanism from the user
Q: In app creation UI, in the "New action" popup, what are queries?
A: Fixed the links for new releases! The documentation is generally not very good for the app creator yet (lots todo here: _URL_
Q: How does Shuffle handle refresh tokens?
A: We don't yet (June 2021). The best way around this is to refresh every time.


Community Build Documentation
Discussion about the ZDoom community builds
Moderators: Enjay, Dev Builds Team
Dev Builds Team
Dev Builds Team
Posts: 2
Joined: Fri Jul 03, 2009 15:09
Community Build Documentation
Post by Dev Builds Team » Fri Jul 03, 2009 3:30
Since the stuff in the community builds is not in the wiki, it only makes sense that things used in the community build should be documented. Without further ado...
DECORATE functions:
A_RadiusPull(int force = 128, int distance = -1, bool affectsource = true)
A_Delay(int delay)
MAPINFO skill stuff:
MonsterHealth = float (relative to 1.0, which equals full health. <1.0 is a scale of less health, and >1.0 is a scale of more health)
FriendlyHealth = float
NoPain (If present, disables pain state for monsters)
New or modified actors:
More invisibility modes are available, including "Stencil", "Additive" and "Opaque".
A very powerful type of powerups, see this thread for more information.
An actor that gives a random inventory item when picked up. It can be used in two ways, one is consistent with the RandomSpawner method (a list of DropItems), the other is consistent with Skulltag's own RandomPowerup item and use the following restricted function to make it change what item it gives:
A_RandomPowerupFrame(class "InventoryItem")
DECORATE property:
Activation: modifies how the actor runs its special when triggered through the BUMPSPECIAL or USESPECIAL flags. The properties are cumulative and flaglike (can be prefixed with + to add them or - to remove them). (In the following, "thing" refers to the actor with a special and either or both of BUMPSPECIAL and USESPECIAL, "trigger" refers to the actor that bumped or used the thing.)
* ThingActs: the thing is the activator of the special, rather than the trigger. (Default behavior is the trigger is the activator.)
* ThingTargets: the thing changes its target to the trigger.
* TriggerTargets: the trigger changes its target to the thing.
* MonsterTrigger: the trigger can be a monster (default behavior is only players can be triggers).
* MissileTrigger: the trigger can be a missile (default behavior is only players can be triggers).
This property, combined with special ACS_Execute or its variants and SetActivatorToTarget, can offer an impressive flexibility for scripting effects.
Return to "Community Builds"


text:
What does CBC mean in Music?
This page is about the meanings of the acronym/abbreviation/shorthand CBC in the Community field in general and in the Music terminology in particular.
Find a translation for CBC in other languages:
Select another language:
What does CBC mean?
- complete blood count, CBC, blood profile(noun)
- counting the number of white and red blood cells and the number of platelets in 1 cubic millimeter of blood

source: openbmb/Ultra-FineWeb


text:
Redemption - Reflection by Canon Myles
Read Canon Myles' reflection for Tuesday, 6 April, 2021
It is all too easy not to encounter 'Redemption' when you visit Liverpool Cathedral. What on earth am I writing about? 'Redemption' is a work of art which has been in the Chapel of the Holy Spirit for the last 25 years. It was planned originally only to be there for twelve months, but happily it is still with us. It has a fascinating history.
It is the work of two very different artists who in the course of their work, struck up a most unlikely friendship. Arthur Dooley is known for his sculpture, including the Black Christ on the Methodist Church on Princes Road and St Mary del Quay in Liverpool Parish Church. He lived an eventful and colourful life, and was once described by Nicholas Frayling as a 'rough, tough, large adopted scouser.'
Ann McTavish came to Liverpool to study at Liverpool School of Art and became one of the world's most talented embroiderers, who produced work on an epic scale.
The two became firm friends, and Arthur became convinced that they should produce a religious work together, using metal, stone and textiles. Ann took a considerable amount of persuasion, but eventually agreed. The theme was to be either a Resurrection or Crucifixion figure of Jesus combined with the veil of the Temple being rent in two at the moment of the Crucifixion. It was to be called 'Redemption.' By 1993, Ann had begun work on the veil of the Temple.
On Christmas Eve, 1993, they attended Evensong together at Liverpool Cathedral and agreed to meet up early in the new year to take forward their planned collaboration. Sadly, this was not to be, for Arthur died in the first week of January 1994. Ann was deeply saddened by the death of her friend, and her thoughts were that the project must now be abandoned, as Arthur had not created his figure of Christ before he died.
She and Arthur's mother went on a tour to see Arthur's work, and at the Swedish Church on Park Road, there were two pieces by him. One of them was the figure which now forms part of 'Redemption,' and it was clear to Ann that this would enable her to complete this joint project. A short service was held in the Chapel of the Holy Spirit in January 1996 on the second anniversary of Arthur's funeral.
'Redemption' remains there after 25 years, still proclaiming the power and joy of the Risen Christ, and with the good news that the barriers between God and humanity have been torn down. When the curtain was divided, Mark tells us that the Roman Centurion – a gentile pagan – declared 'Truly, this man was the Son of God.' The Easter hope is now open to us all.
When you are next in the Cathedral, which we hope and pray will be soon, take a moment to visit the Chapel of the Holy Spirit, remember both Arthur and Ann, and, with their help, ponder our world's redemption.
Happy Easter to everyone!
While you're here:
Why not prepare for next Sunday's worship? Our preparation sheet for adults and for children can be accessed by clicking on the Resources tab of this website: _URL_


d20 LogoSystem Reference Document v3.5
Psionic Classes
pictpictAlignment: Any.
Hit Die: d4.
Class Skills
The psion's class skills (and the key ability for each skill) are Concentration* (Con), Craft (Int), Knowledge (all skills, taken individually)* (Int), Profession (Wis), and Psicraft* (Int). In addition, a psion gains access to additional class skills based on his discipline:
Seer (Clairsentience): Gather Information (Cha), Listen (Wis), and Spot (Wis).
Shaper (Metacreativity): Bluff (Cha), Disguise (Cha), and Use Psionic Device* (Cha).
Kineticist (Psychokinesis): Autohypnosis* (Wis), Disable Device (Dex), and Intimidate (Cha).
Egoist (Psychometabolism): Autohypnosis* (Wis), Balance (Dex) and Heal (Wis).
Nomad (Psychoportation): Climb (Str), Jump (Str), Ride (Dex), Survival (Wis), and Swim (Str).
Telepath (Telepathy): Bluff (Cha), Diplomacy (Cha), Gather Information (Cha), and Sense Motive (Wis).
*New skill or expanded use of existing skill.
Skill Points at Each Additional Level: 2 + Int modifier.
Table: The Psion
Attack Bonus
SpecialPower Points/Day
Powers KnownMaximum Power Level Known
1st+0+0+0+2Bonus feat, discipline
5th+2+1+1+4Bonus feat
10th+5+3+3+7Bonus feat
15th+7/+2+5+5+9Bonus feat
20th+10/+5+6+6+12Bonus feat
Class Features
All the following are class features of the psion.
Choose the powers known from the psion power list, or from the list of powers of your chosen discipline. You cannot choose powers from restricted discipline lists other than your own discipline list. You can choose powers from disciplines other than your own if they are not on a restricted discipline list. (Exception: The feats Expanded Knowledge and Epic Expanded Knowledge do allow a psion to learn powers from the lists of other disciplines or even other classes.) A psion can manifest any power that has a power point cost equal to or lower than his manifester level.
The Difficulty Class for saving throws against psion powers is 10 + the power's level + the psion's Intelligence modifier. Maximum Power Level Known: A psion begins play with the ability to learn 1st-level powers. As he attains higher levels, a psion may gain the ability to master more complex powers.
A psicrystal is a fragment of a psionic character's personality, brought into physical form and a semblance of life (via the Psicrystal Affinity feat). A psicrystal appears as a crystalline construct about the size of a human hand.
Because it is an extension of its creator's personality, a character's psicrystal is in some ways a part of him. That's why, for example, a psionic character can manifest a personal range power on his psicrystal even though normally he can manifest such a power only on himself.
A psicrystal is treated as a construct for the purposes of all effects that depend on its type.
A psicrystal grants special abilities to its owner, as shown on the Psicrystal Special Abilities table below. In addition, a psicrystal has a personality (being a fragment of the owner's personality), which gives its owner a bonus on certain types of checks or saving throws, as given on the Psicrystal Personalities table below. These special abilities and bonuses apply only when the owner and the psicrystal are within 1 mile of each other.
Psicrystal abilities are based on the owner's levels in psionic classes. Levels from other classes do not count toward the owner's level for purposes of psicrystal abilities.
A psicrystal can speak one language of its owner's choice (so long as it is a language the owner knows). A psicrystal can understand all other languages known by its owner, but cannot speak them. This is a supernatural ability.
Psicrystal Basics: Use the statistics for a psicrystal, but make the following changes.
Saving Throws: A psicrystal uses its owner's base saving throw bonuses and ability modifiers on saves, though it doesn't enjoy any other bonuses its owner might have (from magic items or feats, for example).
Abilities: When its self-propulsion ability is not activated, a psicrystal has no Strength score and no Dexterity score.
Skills: A psicrystal has the same skill ranks as its owner, except that it has a minimum of 4 ranks each in Spot, Listen, Move Silently, and Search. (Even if its owner has no ranks in these skills, a psicrystal has 4 ranks in each.) A psicrystal uses its own ability modifiers on skill checks.
Psicrystal Special Abilities
Owner LevelNatural
Armor Adj.
Int Adj.
Alertness, improved evasion, personality, self-propulsion, share powers, sighted, telepathic link
Deliver touch powers
Telepathic speech
Power resistance
Sight link
Channel power
Psicrystal Ability Descriptions: All psicrystals have special abilities (or impart abilities to their owners) depending on the level of the owner, as shown on the table above. The abilities on the table are cumulative.
Natural Armor Adj. (Ex): This number noted here is an improvement to the psicrystal's natural armor bonus (normally 0). It represents a psicrystal's preternatural durability.
Intelligence Adj. (Ex): Add this value to the psicrystal's Intelligence score. Psicrystals are as smart as people (though not necessarily as smart as smart people).
Alertness (Ex): The presence of a psicrystal sharpens its master's senses. While a psicrystal is within arm's reach (adjacent to or in the same square as its owner), its owner gains the Alertness feat.
Improved Evasion (Ex): If a psicrystal is subjected to an attack that normally allows a Reflex saving throw for half damage, it takes no damage if it makes a successful saving throw and half damage even if the saving throw fails.
Personality (Ex): Every psicrystal has a personality. See Psicrystal Personality, below.
Self-Propulsion (Su): As a standard action, its owner can will a psicrystal to form spidery, ectoplasmic legs that grant the psicrystal a land speed of 30 feet and a climb speed of 20 feet. The legs fade into nothingness after one day (or sooner, if the owner desires).
Share Powers (Su): At the owner's option, he can have any power (but not any psi-like ability) he manifests on himself also affect his psicrystal. The psicrystal must be within 5 feet of him at the time of the manifestation to receive the benefit. If the power has a duration other than instantaneous, it stops affecting the psicrystal if it moves farther than 5 feet away, and will not affect the psicrystal again, even if it returns to its owner before the duration expires.
Additionally, the owner can manifest a power with a target of "You" on his psicrystal (as a touch range power) instead of on himself. The owner and psicrystal cannot share powers if the powers normally do not affect creatures of the psicrystal's type (construct).
Sighted (Ex): Although it has no physical sensory organs, a psicrystal can telepathically sense its environment as well as a creature with normal vision and hearing. Darkness (even supernatural darkness) is irrelevant, as are areas of supernatural silence, though a psicrystal still can't discern invisible or ethereal beings. A psicrystal's sighted range is 40 feet.
Telepathic Link (Su): The owner has a telepathic link with his psicrystal out to a distance of up to 1 mile. The owner cannot see through the psicrystal's senses, but the two of them can communicate telepathically as if the psicrystal were the target of a mindlink power manifested by the owner. For instance, a psicrystal placed in a distant room could relay the activities occurring in that room.
Because of the telepathic link between a psicrystal and its owner, the owner has the same connection to an item or place that the psicrystal does. For instance, if his psicrystal has seen a room, the owner can teleport into that room as if he has seen it too.
Deliver Touch Powers (Su): If the owner is 3rd level or higher, his psicrystal can deliver touch powers for him. If the owner and psicrystal are in contact at the time the owner manifests a touch power, he can designate his psicrystal as the "toucher." The psicrystal can then deliver the touch power just as the owner could. As usual, if the owner manifests another power before the touch is delivered, the touch power dissipates.
Telepathic Speech (Ex): If the owner is 5th level or higher, the psicrystal


text:
COVID-19 Response: For Nonprofits
An update to our nonprofit partners on our response to COVID-19:
Updated January 19, 2021
The Hartford Foundation's COVID-19 Response Fund has made more than 230 grants, distributing more than $9.6 million, since the start of the pandemic. The fund initially focused on basic human needs as a result of health and economic impacts of the pandemic, and then transitioned to supporting a wide variety of nonprofits to provide services safely, including personal protective equipment (PPE), cleaning costs, technology and minor building enhancements.
Throughout 2021, the COVID-19 Response Fund will make investments on a rolling basis. Examples of potential grant areas include:
- Vaccine education, outreach and distribution to reach residents who may be hesitant to get vaccinated.
- Systemic approaches to help students catch up on lost learning with a focus on reducing inequities.
Our grantmaking through the COVID-19 Response Fund will be focused on collaborative and systemic efforts. Check this page periodically for updates as the work progresses. We welcome your feedback and ideas at any point; we know it is paramount to remain flexible and responsive to the changing needs of the community.
In considering grants, the Foundation will take into account the following criteria:
- Priority level of the disparity addressed and target population expected to benefit.
- Strength of collaboration and coordination with existing nonprofit, state and local pandemic responses.
- Ability of the proposed strategy to leverage other resources.
- Cultural competency and agency governance diversity (board and staff leadership) that is representative of beneficiaries of the proposed efforts.
- Level of impact on residents of the Greater Hartford region.
The Foundation is proactively working with public entities, nonprofits and other stakeholders to make targeted investments addressing the disparities created or exacerbated by the COVID-19 pandemic. This work is also taking place within our outcome areas.
Thank you for all of the incredible work your organization has contributed to this year.


Set based vs row by row (procedural code)
By | January 25, 2017
I was reading a blog about how to write procedural code today ( link below) and wanted to take a moment to explore another approach just to provide a more complete reference. To provide some context I am explaining the business case here.
A hospital wants to identify people whose heights have changed over time in order to detect if the person is who they say they are. Since the height of a person doesn't change after a certain age the approach is used to detect identity theft. The requirement is that we compare the heights logged during different visit and flag any patients where they have different heights logged.
The code to create the dummy data is mentioned below and was taken from the link mentioned earlier.
SET NOCOUNT ON;

CREATE TABLE Dates
(ID INT, VisitDate DATETIME);

--populate table with 20 visit dates
DECLARE @i INT, @startdate DATETIME;
SET @i = 1;
SET @startdate = GETDATE();

WHILE @i <= 20
BEGIN
 INSERT Dates
 (ID, VisitDate)
 VALUES (@i, @startdate);

 SET @startdate = DATEADD(dd,7, @startdate);
 SET @i = @i+1;
END

CREATE TABLE PatientHeight
(PatientID INT NOT NULL
,Height INT);

-- populate table with 1000 patientids with heights between 59 and 74 inches
SET @i = 1;

WHILE @i <= 10000
BEGIN
 INSERT PatientHeight
 (PatientID, Height)
 VALUES (@i, @i % 16 + 59);

 SET @i = @i+1;
END

ALTER TABLE PatientHeight ADD CONSTRAINT PK_PatientHeight
 PRIMARY KEY(PatientID);

-- cartesian join produces 200,000 PatientVisit records

SELECT
 ISNULL(PatientID, -1) AS PatientID,
 ISNULL(VisitDate, '_PHONE_') AS VisitDate,
 Height
INTO PatientVisit
FROM PatientHeight
CROSS JOIN Dates;

ALTER TABLE PatientVisit ADD CONSTRAINT PK_PatientVisit
 PRIMARY KEY(PatientID, VisitDate);

-- create changes of height
SET @i = 3;

WHILE @i < 10000
BEGIN
 UPDATE pv
 SET Height = Height +2
 FROM PatientVisit pv
 WHERE PatientID = @i
 AND pv.VisitDate =
 (SELECT TOP 1 VisitDate
 FROM Dates
 WHERE id = ABS(CHECKSUM(@i)) % 19);

SET @i = @i + 7;
END

/*
-- return AdventureWorks to its previous state when you are finished
-- with this example.

DROP TABLE Dates;
DROP TABLE PatientHeight;
DROP TABLE PatientVisit;
*/
The first approach uses a cursor to iterate row by row and identify if there has been a change in height. The second approach uses a ranking function to perform a self-join based on patient id to identify any change. Both these approaches are detailed below as well to save the reader time.
CUROSR BASED APPROACH
-- CURSOR BASED APPROACH
CREATE TABLE #Changes
( PatientID INT
, VisitDate DATETIME
, BeginHeight SMALLINT
, CurrentHeight SMALLINT);

DECLARE @PatientID INT
, @CurrentID INT
, @BeginHeight SMALLINT
, @CurrentHeight SMALLINT
, @VisitDate DATETIME;

SET @PatientID = 0;

DECLARE Patient_cur CURSOR FAST_FORWARD FOR
SELECT PatientID
, VisitDate
, Height
FROM PatientVisit
ORDER BY PatientID
,VisitDate;

OPEN Patient_cur;

FETCH NEXT FROM Patient_cur INTO @CurrentID, @VisitDate, @CurrentHeight;

WHILE @@FETCH_STATUS = 0
BEGIN
-- first record for this patient
IF @PatientID <> @CurrentID
BEGIN
 SET @PatientID = @CurrentID;
 SET @BeginHeight = @CurrentHeight;
END

IF @BeginHeight <> @CurrentHeight
BEGIN
INSERT #Changes ( PatientID
, VisitDate
, BeginHeight
, CurrentHeight)
VALUES
(@PatientID
, @VisitDate
, @BeginHeight
, @CurrentHeight);

SET @BeginHeight = @CurrentHeight;

END

FETCH NEXT FROM Patient_cur INTO @CurrentID, @VisitDate, @CurrentHeight;

END

CLOSE Patient_cur;
DEALLOCATE Patient_cur;

SELECT * FROM #Changes

DROP TABLE #Changes
GO
SET BASED APPROACH
-- RANKING FUNCTION BASED APPROACH

WITH PV_RN AS
(
 SELECT ROW_NUMBER() OVER (ORDER BY PatientID, VisitDate) AS ROWID, *
 FROM PatientVisit
)
SELECT t1.PatientID
,t2.VisitDate AS DateChanged
,t1.Height AS HeightChangedFrom
,t2.Height AS HeightChangedTo
FROM PV_RN t1
JOIN PV_RN t2 ON t2.ROWID = t1.ROWID + 1
 WHERE t1.patientid = t2.patientid
 AND t1.Height <> t2.Height
ORDER BY t1.PatientID, t2.VisitDate;
There is however a third option which I believe would be much simpler and is also much faster has been listed below. Here we use the math operator STDEV which calculates a standard deviation for the heights that were captured. When the height hasn't changed STDEV will return a value of zero else a non-zero number which can be used to identify patient's with different heights.
THIRD APPROACH
-- MATH OPERATOR BASED APPROACH
-- HAS THE ADVANTAGE OF PROVIDING A MARGIN FOR ERROR FOR MEASUREMENTS AS WELL

SELECT PatientID , MIN(Height) ,MAX(Height) FROM PatientVisit WHERE PatientID in (
SELECT patientid
FROM PatientVisit
GROUP BY PatientID
HAVING STDEV(height) > 0)
GROUP BY PatientID
Hope this approach helps clarify what we are doing with set based approach since recently I have noticed that ranking functions and CTEs seem to be the go to approach for most developers when they think set based logic.
Reference
_URL_


text:
- Dostoevsky Day
J.L.Runeberg's Home (Museum), Porvoo
F.M.Dostoevsky Museum, Saint Petersburg
Exhibition Dostoevsky-200. Color as You Please. The Dostoevsky Bicentennial
at the Runeberg Museum in Porvoo
February 5 – 28, 2022
On February 5, Finland celebrates Runeberg Day in honor of the national poet Johan Ludvig Runeberg, author of the words to the country's national anthem, Vårt Land / Maamme ("Our Land"). The Runeberg Museum is located in the city of Porvoo in the house where the poet lived with his wife, Fredrika, also a writer. One of Finland's oldest literature museums, it preserves the atmosphere of the 1860s, the era when Fyodor Dostoevsky created his most significant works.
On Runeberg Day the exhibition Dostoevsky-200. Color as You Please. The Dostoevsky Bicentennial opened at the Runeberg Museum in Porvoo, organized in collaboration with the Dostoevsky Museum.
The exhibition is divided into two parts. A biographical part presents the most important episodes from Dostoevsky's life and work using digital copies of 19th-century lithographs, woodblock prints, and photographs from the Dostoevsky Museum's and the Literary museum of the Institute of Russian Literature, Russian Academy of Sciences, collections.
An interactive part — Coloring Dostoevsky — allows visitors to color in Dostoevsky's outfits and those of his characters based on given quotations. Visitors will learn not only about the fashions of the time, but also about Dostoevsky's personal habits and his heroes' tastes. The playful aspect of the exhibition allows us to look at the writer's works a bit more freely, and the opportunity to engage with the texts as co-creators shifts the angle from which we view them.
Authors of the project: Vera Biron (Russia). Cooperation partner, Susanna Widgeskog (Finland)
The part "F.M.Dostoevsky. Life and Work": Arkady Opochansky
The part "Coloring Dostoevsky": Igor Knyazev, Nika Velegzhaninova
Adress of the Runeberg Museum: Porvoo, Aleksanterinkatu 3
Runeberg Museum website: _URL_


You have searched the English word "Frugal " meaning in Hindi "मितव्ययी" mitavyayi. Frugal meaning has been search 2369 (two thousand three hundred and sixty-nine) times till 2/27/2017. You can also find Frugal meaning and Translation in Urdu, Arabic, Hindi, Spanish, French and other languages.
 English Hindi Roman
Frugal मितव्ययी mitavyayi
Definition & Synonyms
- Frugal
 1. (n.) Obtained by, or appropriate to, economy; as, a frugal fortune.
 2. (n.) Economical in the use or appropriation of resources; not wasteful or lavish; wise in the expenditure or application of force, materials, time, etc.; characterized by frugality; sparing; economical; saving; as, a frugal housekeeper; frugal of time.
Economical, Scotch, Sparing, Stinting,


Request Customer Contact Information for Use in Your Skill
To use this feature, you query the Alexa Customer Profile API. The Alexa Customer Profile API obtains information from the active default Alexa profile, which might or might not represent who is speaking to Alexa. To ask for consent to access the contact information of the recognized speaker, use the Person Profile API. For details, see Request Recognized Speaker Contact Information for Use in Your Skill.
For details on how to request device address information, see Enhance Your Skill With Address Information. For a sample code demo, see Customer Profile Demo.
Before you begin
 - Your skill must not be a child-directed skill. For details on child-directed skills, see Child-Directed Alexa skills.
Any of the requested information, such as customer name, email address, or phone number, might not be available to your skill when requested. As such, your skill code should handle missing information gracefully.
How to request customer contact information
 1. Configure your skill in the developer console to indicate that the skill requires customer contact information. When the customer enables the skill, the customer is prompted, in the Alexa app, to consent to provide the contact information. If the customer chooses to not grant these permissions when enabling your skill, you may request this information, when needed, during invocation by using a permissions card. Ensure your skill handles the situation gracefully if the customer refuses to grant permission to access this information.
 2. Obtain the apiAccessToken from the LaunchRequest that Alexa sends your skill when a customer invokes the skill. Don't store the apiAccessToken, because it expires. Instead, obtain the apiAccessToken fresh from each subsequent request.
Configure the skill to request customer permissions
 1. Edit your skill in the developer console.
 - Customer Name > Full Name
 - Customer Name > Given Name (the customer's first name)
 - Customer Email Address
 - Customer Phone Number
If you use SMAPI or the Alexa Skills Kit Command Line Interface (ASK CLI) instead of the developer console to manage your skill, edit the skill manifest to request the desired permissions.
Get the API access token
The apiAccessToken is nested in the System object, which is nested in the context object. To see the full body of the request, see Request Format.
 "context": {
 "System": {
 "apiAccessToken": "AxThk...",
 "apiEndpoint": "",
Thus: accessToken = this.event.context.System.apiAccessToken
Authorization: Bearer AxThk...6fnLok
New CardAskForPermissionsConsentCard
Sample response with permissions card
The permissions values can be as shown in the following table:
Full Namealexa::profile:name:read
Given Name (First Name)alexa::profile:given_name:read
Email Addressalexa::profile:email:read
Phone Numberalexa::profile:mobile_number:read
The following is a sample response for a card with a request for name and phone number.
 "version": "1.0",
 "response": {
 "card": {
 "type": "AskForPermissionsConsent",
 "permissions": [
Use Skill Permission Accepted events in your skill
Use Skill Permission Accepted events in your skill so that your skill is notified when the customer has granted permissions to the skill.
Test the API as you develop your skill
To test what happens when a customer has provided permissions to your skill, make sure that you have granted the contact permissions for your skill in the Alexa app. When you open the skill ("Alexa, open skill_name"), Alexa sends a LaunchRequest to your skill. If the customer has granted the permissions, you can obtain the apiAccessToken from the request.
To test what happens when a customer hasn't provided permissions to your skill, make sure you have not granted, or that you have revoked, contact permissions for your skill in the Alexa app. When you open the skill ("Alexa, open skill_name"), Alexa sends a LaunchRequest to your skill. This request contains the apiAccessToken value, but the apiAccessToken doesn't specify the correct permissions. If your skill passes this token to the Alexa Customer Profile API, the API returns a 403 Forbidden response code.
Sample message to prompt customer to grant permissions through permissions card
Fallback message when customer contact information is not available
When your skill requests the customer's contact information, and the customer grants it, this information might still be unavailable, such as if a customer hasn't provided phone number to Amazon. If the requested customer information is unavailable, the API returns a 204 (no content) response.
Sample message if resource_name is unavailable
Suggested best practices when customer contact information is unavailable
As a skill developer, you can determine the appropriate response when the customer hasn't set up contact information.
For a good customer experience, ensure that you consider the skill workflow for all the scenarios in which you fail to get the desired information.
Base URIs and geographic location of the skill
 "version": "1.0",
 "session": {},
 "context": {
 "System": {
 "application": {
 "user": {},
 "apiAccessToken": "AxThk...",
 "apiEndpoint": ""
 "request": {}
The examples in this document use the US endpoint
Get customer contact information
Full Name/v2/accounts/~current/settings/
Email Address/v2/accounts/~current/settings/
Request example
Accept: application/json
Authorization: Bearer MQEWY...6fnLok
Accept: application/json
Authorization: Bearer MQEWY...6fnLok
Request headers
Header Description Type Required
Response example
X-Amzn-RequestId: xxxx-xxx-xxx
Content-Type: application/json
 "countryCode" : "+1",
 "phoneNumber" : "_PHONE_"
The following is a list of return types (all JSON values).
Full Name"string"
Given Name"string"
Email Address"string"
Response headers
Header Description
Content-Type application/json
Possible responses
Response Description
200 OK Successfully retrieved the requested information.
204 No Content The query did not return any results.
401 Unauthorized The authentication token is malformed or invalid.
403 Unauthorized The authentication token doesn't have access to the resource.
500 Internal Error An unexpected error occurred.


Lotus-Notes-oriented questions on StackOverflow are infrequent enough that the single lotus-notes tag should encompass all Lotus Notes language topics, including LotusScript, the Notes formula language, the Notes C/C++ API, and the COM and Java interfaces. As such, it is better to use that tag, lotus-notes, rather than this one, lotusscript.
It is appropriate to also include specific language tags when asking questions about communicating with Lotus Notes from those languages, for example using.NET or VBA to send an email, or to pull data from SQL into Notes.
history | show excerpt | excerpt history


5 Replies Latest reply: Oct 30, 2007 12:19 PM by 807592 RSS
 Image edge detection
 Not strictly Java, but any Java code would be fine as an answer.
 How do you move from using an edge detection kernel which highlights edges within an image, to being able to store within a program values for where a circle is within the image? Or a line if that's simpler.
 Thanks for any suggestions.
 - 1. Re: Image edge detection
 There are several posible approaches. It gets trickier depending on how ambiguous the image is likely to be.
 One I've used recently is to scan a 4 x 4 box over the image classifying each box into states like "top left corner", "left vertical side", "edge crossing" etc. and hooking them up into polygons accordingly. Or you could have a small window actually follow an edge arround the picture.
 Inevitably though you're going to wind up with polygons or paths which you will then probably have to further classify.
 - 2. Re: Image edge detection
 Thanks, I suppose it'd help to say then that it would be an iris - so I'm looking for the pupil outer edge, the iris outer edge and enough width of the upper and lower eyelid to extend across the iris should they cover the iris in part.
 - 3. Re: Image edge detection
 for finding circles/ elipses you may want to consider performing a Circle Hough transform (either
 in the real or frequency domain). This is a very robust algorithm that can handle partial occlusions.
 Its a bit slow though. (Basically it can be implemented as a convolution). Better performance is
 often obtained if yourun an edge enchancement filter (a high pass filter) over your image before
 performing the circle hough transform.
 The result of the Hough transform is an image in which the largest values correspond to the
 centre points of circles that match your template/pattern and their mangatude is proportional to
 the size of the circle that was matched.
 - 4. Re: Image edge detection
 I've been working on cleaning up the image before looking for the circles and testing it against an applet (mark someone's... it's easy enough to find in a google).
 It's great for what I want, but now I'd like to move past this stage which means I need code to incorporate into my own app. I don't really want to use the code from the applet - it doesn't start with a buffered image, it uses a mediatracker which requires a component and as I understand it that means I can't use it in a console app... etc and basically his code is too bloated for me to understand and slim down.
 Can you (anyone) offer me a simple implementation of a circle Hough transform starting with a BufferedImage? I'm really after something that's specifically just the HT so I can get my head around the basic concepts before I start optimising it.
 Very grateful for any help, thanks!
 - 5. Re: Image edge detection
 Hey. I saw your posts about adge detection and detecting objects in an image back in 2004. I am working in a similar project were i have to detect the pupil and the iris from an image. Did you have any progress with your project. Did you aquired any useful knowledge that you could tell me?


System Administration Guide: Basic Administration
Turning Off Power to All Devices
You need to turn off power to all system devices when you do the following:
Turn the power off for system devices, including the CPU, the monitor, and external devices such as disks, tapes, and printers.
Before you turn off power to all system devices, you should shut down the system cleanly, as described in the preceding sections.
ProcedureHow to Turn Off Power to All Devices
 1. Select one of the following methods to shut down the system:
 2. Turn off the power to all devices after the system is shutdown. If necessary, also unplug the power cables.
 3. After power can be restored, use the following steps to turn on the system and devices.
 1. Plug in the power cables.
 2. Turn on the monitor.
 3. Turn on disk drives, tape drives, and printers.
 4. Turn on the CPU.
 The system is brought to run level 3.


text:
CATIA Systems Engineering integrates complex product behaviour into the product definition, enabling a lifelike experience which predicts real world performance.
With CATIA Systems Engineering, system architects, product engineers, designers and technical experts define both technical and business aspects. The RFLP approach (Requirements, Functional, Logical and Physical Design) upholds a full traceability during product development and product introduction. This helps shortening the gap between requirements analysis and the choice of the right solution.
CATIA Systems DBM Binary Export
Generate a standalone executable from your systems model for verification and validation on a MS-Windows platform.
The integration of complex embedded systems requires a seamless collaboration across multiple disciplines. To validate the numerous components driving the controls logic in everything from vehicles, aircrafts, specialized machine tools to nuclear power plants, companies need to rely on a solid and open process for overall systems integration and simulation.
To simulate and validate the different parts of the model, CATIA Systems Dynamic Behavior Model (DBM) Binary Export enables users to export their code for use in external test environments. Systems architects or engineers can automatically generate reliable binary code from DBM model components and can then leverage this code to check its behavior in various simulation contexts, as often as necessary and with minimum cost.
- Automatically generate reliable and traceable binary code
Generation of standalone executable Dynamic Link Libraries (DLL's) modules from a DBM model.DLL's that can be used either as a standalone executable that can be used with other tools, or integrated within a Simulink simulation environment. (Note: co-requisite on Simulink interface).


text:
Page 1 of 1
Emule 0.50A Process Response Packet Failed
Posted 09 June 2011 - 12:07 PM
hello, we are doing some research work in eMule-kad and have recorded all the packets including incoming and outcoming packets in a official eMule 0.50a client. In our log we find an interesting phenomenon where a specific contact use another udp port to reply our client's request(for example KADEMLIA2_REQ). So in function CSearch::ProcessResponse(…), we cant find the corresponding contact that we have made a request to, and cant process this KADEMLIA2_RES packet correctly. We have investigated some network configure conditions, for example Cone NAT and Symmetric NAT. But these trial don't make any sense and we cant explain it. Finally we just consider it is probable that there are two NAT device in the specific contact's network environment，one for incoming packet and another for outcoming packet. As a countermeasure, for a specific response we firstly judge it by its ip and udp port, if failed, we only use ip. We have confirmed that there are scarcely two contacts having the same ip in a Search object.
Page 1 of 1


A guide to RTC programming
RTC programming flow
RTC programming flow
OpenRTM-aist is a framework to support the easy development of RT-Components (RTCs), modularising existing source code and libraries or newly developed software. The following figure shows the RT-Component development flow.
ComponentDevelFlow.png
RT-Component development flow.
Usually, a component developer embeds existing library functions, class libraries, etc. to create a component using the framework. Through this, they create an RT-Component using existing resources, allowing considerable software reuse. RT-Components can be deployed into a network and used as distributed objects.
As shown in the figure above, RT-Components created in using the RT-Component framework can be realised as two kinds of binary files. A stand-alone RT-Component is an executable binary. A loadable module RT-Component is a dynamically-loadable shared library. RT-Components can be created, distributed and executed in these two ways.
The basics of RTC programming
There are some differences between standard programming and programming RT-Components.
Program without a main function
Unlike common programs, there is no "main" function in an RT-Component. An RT-Component is implemented as a class that inherits from a special base class.
The logic of an RT-Component is implemented in known member functions that override the same members of the base class. For example, the initialisation logic is implemented in the onInitialize member function, while the termination logic is implemented in the onFinalize member function.
 ReturnCode_t MyComponent::onInitialize()
 {
 // Initialization code.
 }
 ReturnCode_t MyComponent::onFinalize()
 {
 // Finalization code.
 }
In order to understand when these functions will be executed, it is necessary to understand the life cycle of an RT-Component.
Component lifecycle
The set of states an RT-Component travels through from creation to destruction is called its life cycle. The folowing three basic states exist:
 - Created
 - Alive
 - End
The "Alive" state has several internal states, discussed later.
As mentioned above, a component is implemented as a class. This makes instantiating a component the same as instantiating a class. RT-Components are typically created by a manager (the RTC manager), and the manager is responsible for the component's life cycle.
Specifically, the manager calls the onInitialize function after creating the instance of an RT-Component. When an RT-Component has finished, the manager calls the onFinalize function. Thus, an RT-Component is programmed by describing the logic for every necessary call-back (called component actions) assigned to the states in the life cycle of RT-Component.
Execution context
Usually when a program is executed, an operating system process is created for that program to execute in. A robot program has a processing loop executed by that operating system process. This processes sensor data or controls actuators. The logic for performing such processing or controlling is called the "core logic" in an RT-Component.
After creation, an RT-Component enters the Alive state. A thread is then assigned and it begins to execute the component. This thread is called the execution context. In actuality, the execution context is not a thread but an object with its own execution cycle and state. When an RT-Component is created, it is assigned to an execution context, which then exectutes the RT-Component's core logic. This causes the RT-Component to carry out its purpose - such as controlling a robot.
State transitions of an RTC
As mentioned above, an RT-Component has states and logic, called component actions, assigned to the states and transitions. The following figure shows the state transition diagram of an RT-Component.
RTCStateMachine040.png
The state machine of an RT-Component.
Created and Alive are states of an RT-Component. The Alive state has sub-states.
Stopped and running states
Let's begin with the upper part of the state machine, with the Stopped and Running states in the Alive state.
RTCStateMachineStartStop.png
Stopped state and running state of an RTC.
These states indicate whether the execution context thread is stopped or running.
When an execution context in the stopped state receives a start event, it executes the onStartup state action of the RTCs and enters the running state. When a running execution context receives a stop event, it executes the onShutdown state action of the RTCs and enters the stopped state.
The core logic is executed in the running state, and no actions are executed in the stopped state.
Active/Inactive states
The lower part of the alive state is the core logic states active, inactive and error.
An RT-Component is in the inactive state immediatly after creation. When it is activated, the onActivate state action will be called and the component will enter the active state. During the active state, the onExecute state action is repeatedly called. Usually, the main logic of an RTC is implemented in onExecute. For example, typical robot processing tasks such as reading data from sensors and controlling motors based on the data received from other components will be described in onExecute callback function.
An RTC remains in the active state until it becomes inactive or an error occurs. When it is inactived, onDeactivate is called, and it moves to the inactive state. When an error occurs in the core logic, onAborting is called and the RTC enters the error state.
When an RTC changes to the error status, it remains in the error state until an external reset is performed. onError is continuously called during the error state in place of onExecute. onReset is called when a reset is performed. If onReset is succesful in restoring the component, the RTC shifts back to the inactive state, from where it can be activated again. If onReset fails, the RTC remains in the error state.
RTCStateMachineActiveInactive.png
Inactive, Active and Error states.
Summary of Actions
An RT-Component developer must consider which logic to implement in each state. Un-used states do not require functions to be implemented. Only those functions being used should be overridden.
The table below gives the function and role of each state action.
onInitialize Initialisation. It is called only once when the component life cycle is initialised.
onActivated Called once each time the component transitions to the active state.
onExecute Called while in the active state depending on the execution context used.
onDeactivated Called once each time the component transitions to the inactive state from the active state.
onAborting Called once whenever entering the onError state.
onReset Called once each time the component is reset from the error state to the inactive state.
onError Called while in the error state.
onFinalize Called once at the end of the component's life cycle.
onStateUpdate Called every time after onExecute.
onRateChanged Called when the rate of execution changes.
onStartup Called when the execution context starts.
onShutdown Called when the execution context stops.
Data Port (Basic)
What is a data port?
A data port is a port for continuous data exchange between RTCs. A data port that sends data to other RTCs is called an OutPort, and a data port which receives from other RTCs is called an InPort. OutPort and InPort together are termed data ports.
dataport_en.png
Data port (InPort and OutPort)
RTCs can be written in a various progamming languages and distributed across a network or all run locally, or even within the same process. Communication between data ports can be carried out transparently no matter where or how the other end of the connection is implemented.
An RTC can have any number of data ports. For example, making an RTC that obtains output from a sensor requires at least one OutPort to provide the data.
On the other hand, if you make a motor component that drives a motor according to the given reference torque, this component must have at least one InPort to receive reference torque data. If you make a controller component by using these components, it must have an InPort to receive sensor data, and an InPort to receive reference data and an OutPort to output torque data respectively.
dataport_example_en.png
An example of data ports of a sensor, a controller and a motor.
Let's look at a simple example of InPort and OutPort ports in actual code. Each object functions as follows.
 - encoderDevice: An object to control hardware (e.g. a counter borad) to
 get the current angle from an encoder.
 - encoderData: A variable to hold data of an encoder. We assume that
 this variable has a field called "data" to hold encoder data.
 - encoderDataOut: An OutPort object. This object is associated with the
 encoderData object.
 // An example of a encoder component
 encoderData.data = encoderDevice.read(); // getting current value from counter
 encoderDataOut.write(); // Data output from the OutPort
On the first line, the current value of the encoder is read using the read() function of the device object. The received value is written into encoderData.data


Take the 2-minute tour ×
Consider a desalination process where you enter sea water and receive fresh water and brine (or maybe pure salt).
How do I compute the least amount of energy per mass? I think this has something to do with the entropy of the different mixtures, mostly dependent on the salt concentration in the brine. Is this correct? How to calculate?
share|improve this question
add comment
1 Answer
up vote 2 down vote accepted
Assuming that the process is done at constant temperature and pressure, what you want is the Gibbs free energy difference. The reaction could be taken to be 1 mole of water in brine on one side and one mole of pure water on the other side.
The result should be a positive number since the process is not spontaneous. However the value of $\Delta G$ will be the minimum non-mechanical work necessary for the process.
To understand this read up on the Gibbs free energy.
share|improve this answer
add comment
Your Answer


A triptych made from corroded metal
and molten plastic
The process of introspection invokes the inward reflection of thoughts, emotions, beliefs and perceptions. Searching within for the finer details and examining what they mean can lead to a deeper understanding of one's own mental state. Considered a source of knowledge, it has been a subject of philosophical discussion for thousands of years. However, it is acknowledged that not all of mentality is available to be discovered by introspection. The intricate details in the piece come from the degradation of material that creates the colour.
With Hindsight | Losing Perspective | Gaining Insight


Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 39.2Mb
PDF (A4) - 39.3Mb
PDF (RPM) - 38.5Mb
HTML Download (TGZ) - 10.9Mb
HTML Download (Zip) - 11.0Mb
HTML Download (RPM) - 9.6Mb
Man Pages (TGZ) - 223.4Kb
Man Pages (Zip) - 332.3Kb
Info (Gzip) - 3.6Mb
Info (Zip) - 3.6Mb
Excerpts from this Manual
MySQL 5.7 Reference Manual / ... / Functions That Modify JSON Values
12.17.4 Functions That Modify JSON Values
The functions in this section modify JSON values and return the result.
 - JSON_APPEND(json_doc, path, val[, path, val] ...)
 Appends values to the end of the indicated arrays within a JSON document and returns the result. This function was renamed to JSON_ARRAY_APPEND() in MySQL 5.7.9; the alias JSON_APPEND() is now deprecated in MySQL 5.7, and is removed in MySQL 8.0.
 - JSON_ARRAY_APPEND(json_doc, path, val[, path, val] ...)
 Appends values to the end of the indicated arrays within a JSON document and returns the result. Returns NULL if any argument is NULL. An error occurs if the json_doc argument is not a valid JSON document or any path argument is not a valid path expression or contains a * or ** wildcard.
 The path-value pairs are evaluated left to right. The document produced by evaluating one pair becomes the new value against which the next pair is evaluated.
 If a path selects a scalar or object value, that value is autowrapped within an array and the new value is added to that array. Pairs for which the path does not identify any value in the JSON document are ignored.
 mysql> SET @j = '["a", ["b", "c"], "d"]';
 mysql> SELECT JSON_ARRAY_APPEND(@j, '$[1]', 1);
 +----------------------------------+
 | JSON_ARRAY_APPEND(@j, '$[1]', 1) |
 +----------------------------------+
 | ["a", ["b", "c", 1], "d"] |
 +----------------------------------+
 mysql> SELECT JSON_ARRAY_APPEND(@j, '$[0]', 2);
 +----------------------------------+
 | JSON_ARRAY_APPEND(@j, '$[0]', 2) |
 +----------------------------------+
 | [["a", 2], ["b", "c"], "d"] |
 +----------------------------------+
 mysql> SELECT JSON_ARRAY_APPEND(@j, '$[1][0]', 3);
 +-------------------------------------+
 | JSON_ARRAY_APPEND(@j, '$[1][0]', 3) |
 +-------------------------------------+
 | ["a", [["b", 3], "c"], "d"] |
 +-------------------------------------+

 mysql> SET @j = '{"a": 1, "b": [2, 3], "c": 4}';
 mysql> SELECT JSON_ARRAY_APPEND(@j, '$.b', 'x');
 +------------------------------------+
 | JSON_ARRAY_APPEND(@j, '$.b', 'x') |
 +------------------------------------+
 | {"a": 1, "b": [2, 3, "x"], "c": 4} |
 +------------------------------------+
 mysql> SELECT JSON_ARRAY_APPEND(@j, '$.c', 'y');
 +--------------------------------------+
 | JSON_ARRAY_APPEND(@j, '$.c', 'y') |
 +--------------------------------------+
 | {"a": 1, "b": [2, 3], "c": [4, "y"]} |
 +--------------------------------------+

 mysql> SET @j = '{"a": 1}';
 mysql> SELECT JSON_ARRAY_APPEND(@j, '$', 'z');
 +---------------------------------+
 | JSON_ARRAY_APPEND(@j, '$', 'z') |
 +---------------------------------+
 | [{"a": 1}, "z"] |
 +---------------------------------+
 - JSON_ARRAY_INSERT(json_doc, path, val[, path, val] ...)
 Updates a JSON document, inserting into an array within the document and returning the modified document. Returns NULL if any argument is NULL. An error occurs if the json_doc argument is not a valid JSON document or any path argument is not a valid path expression or contains a * or ** wildcard or does not end with an array element identifier.
 The path-value pairs are evaluated left to right. The document produced by evaluating one pair becomes the new value against which the next pair is evaluated.
 Pairs for which the path does not identify any array in the JSON document are ignored. If a path identifies an array element, the corresponding value is inserted at that element position, shifting any following values to the right. If a path identifies an array position past the end of an array, the value is inserted at the end of the array.
 mysql> SET @j = '["a", {"b": [1, 2]}, [3, 4]]';
 mysql> SELECT JSON_ARRAY_INSERT(@j, '$[1]', 'x');
 +------------------------------------+
 | JSON_ARRAY_INSERT(@j, '$[1]', 'x') |
 +------------------


text:
View to Lunga
, across Scotland's "Grey Dog" tidal race.
Tidal race (or tidal rapid) is a natural occurrence whereby a fast moving tide passes through a constriction resulting in the formation of waves, eddies and hazardous currents. The constriction can be a passage where the sides narrow, for example the Gulf of Corryvreckan and the Saltstraumen maelstrom, or an underwater obstruction (a reef or rising seabed), such as is found at the Portland Race.
In extreme cases, such as Skookumchuck Narrows in British Columbia, through which tides can travel at more than 17 knots, very large whirlpools develop, which can be extremely hazardous to navigation.
Notable tidal races


text:
Failla leads Ohio State Discovery Theme – Foods for Health
Food plays a critical role in our health. Mark Failla, faculty emeritus of human nutrition, is interim faculty lead with Ohio State's Discovery Theme focused on the science of using food and nutrition to promote health and prevent disease.
Under the initiative, Failla helps select new faculty, including Rachel Kopec ('12 PhD) an assistant professor of human nutrition. Kopec uses metabolomics technology to understand how different individuals metabolize nutrients and other compounds in foods. Knowledge of these differences will help personalize diets and find novel foods that promote wellness or decrease risk and severity of disease.
Failla also played a critical role in planning the Inaugural Conference on Personalized Food and Nutritional Metabolomics for Health, which was jointly held with the 14th Annual Mass Spectrometry Symposium at Ohio State in May. The event further enhanced collaborative efforts among academic research teams and stimulated the development of strategic partnerships with the food and health industries.
Learn more at Discovery.osu.edu.


text:
Have your say on bylaw changes
Auckland Council wants to make sure that Aucklanders can enjoy our region's public places, while keeping safe.
The council is proposing changes to the Public Safety and Nuisance Bylaw to minimise nuisance and safety risks to people when using public places.
The bylaw includes a wide range of issues that Aucklanders encounter daily: from using a drone, activities on a park or a beach, set netting, graffiti and car window washing.
The proposed changes won't alter the council's levels of service to safety and nuisance complaints, but will ensure that the most appropriate legislation is used, and that the bylaw is easier to understand.
"Many Aucklanders may not be aware of this bylaw, but it is wide-ranging and covers many activities that people interact with every day," says Councillor Linda Cooper, Chair of the Regulatory Committee.
"We have recently checked how well the rules in the bylaw are working and identified some improvements."
"The proposed changes aim to remove any unnecessary aspects of the bylaw and streamline regulation, so we don't have multiple rules for one issue. They also help to make the bylaw easier to use and understand."
"We encourage people to have their say, so that we can put in place these changes to make sure the bylaw stays fit for purpose in future," she says.
Some parts of the bylaw are proposed to be revoked or removed (as they are dealt with better by other legislation or Auckland Council bylaws), and other parts are proposed to be amended to improve their effectiveness.
The main proposed changes include:
- clarifying expected behavior and restrictions on people using public places
- prohibiting people from leaving or storing construction materials, shipping containers, consumer goods, and boats in public places
- clarifying how the council sets controls and gives approval for activities on public places
- clarifying which public places the bylaw applies to and enabling organisations in control of those places to approve bylaw exceptions.
Regulation would be streamlined by:
- using national legislation rather than bylaws for car window washing, mind-altering substances, graffiti, noise, fish offal, and street naming and numbering
- moving issues about animals, signage, stormwater and vehicles to existing council bylaws.
Request to government to ban the public sale of fireworks
The council intends to ask the government to ban the sale of fireworks to the general public and wants Aucklanders' views on whether or not they support a ban. Public firework displays would still be allowed. Aucklanders are also able to provide their views on this as part of the bylaw consultation process.
Have your say now
You now have an opportunity to tell us your views. This consultation is seeking public feedback from now until 5 December.
Have your say events are also being held across the region over the next month.
Make a submission and find out more at the Auckland Council website.
What are bylaws and why do we review them?
- Bylaws are rules made by local councils that affect the way we live, work and play.
- As a statutory requirement, bylaws are reviewed every five to 10 years. This process involves public consultations to make sure our bylaws are useful and reflect what Aucklanders need.
- Some of these bylaws are no longer needed as other legislation has become operative.


text:
We've been scratching our heads over how to tackle this for some time, and are no more illuminated than when we started. I hope you can help. Our task is thus: how to draw a lake with a solid outer perimeter line and no lines between internal wetlands, shoals and shallows? 'Tis a relatively straightforward process with Arcinfo coverages and Regions, but alas, that is no longer a viable option for us, the datasets we use now are too large and the lack coverage editing ability in Arcmap crucial. Can cartographic representation solve our dilemma? Is it possible to create something like the below without resorting to creating (and managing) duplicating, or triplicating, geometries whose sole purpose is better looking maps?
With a feature class: Boundary between river and lake is visible. Keeping them as distinct polygons in one feature class allows a name attribute (the river and laker differ). Elsewhere the heavy line implies a sharp boundary between lake and shallows/intermittent lake, however the actual edge is indeterminate, fluctuating with seasons and high-low water cycles. The line should be implied rather than drawn.
With regions: One geometry, multiple attribute tables, multiple representations.
- Outer perimeter (ordinary high water mark) is cleanly delineated
- No apparent division between lake and river, but they still know which is which
- Shallow/intermittent waters are symbolized appropriately, with river shallows distinguished from lake shallows.
EDIT, 2001-Apr-18 - see this page for a map package simulation of what we're trying to achieve and the source arcinfo region coverage from which it is built.

source: HuggingFaceFW/fineweb-edu


The Direct and Ecological Costs of an Ant-Plant Symbiosis
DSpace/Manakin Repository
The Direct and Ecological Costs of an Ant-Plant Symbiosis
Citable link to this page
Title: The Direct and Ecological Costs of an Ant-Plant Symbiosis
Author: Frederickson, Megan E.; Ravenscraft, Alison; Miller, Gabriel; Hernández, Lina M. Arcila; Booth, Gregory; Pierce, Naomi Ellen
Note: Order does not necessarily reflect citation order of authors.
Citation: Frederickson, Megan E., Alison Ravenscraft, Gabirel A. Miller, Lina M. Arcila Hernández, Gregory Booth, and Naomi E. Pierce. 2012. The direct and ecological costs of an ant-plant symbiosis. The American Naturalist 179(6): 768-778.
Full Text & Related Files:
Abstract: How strong is selection for cheating in mutualisms? The answer depends on the type and magnitude of the costs of the mutualism. Here we investigated the direct and ecological costs of plant defense by ants in the association between Cordia nodosa, a myrmecophytic plant, and Allomerus octoarticulatus, a phytoecious ant. Cordia nodosa trees produce food and housing to reward ants that protect them against herbivores. For nearly 1 year, we manipulated the presence of A. octoarticulatus ants and most insect herbivores on C. nodosa in a full-factorial experiment. Ants increased plant growth when herbivores were present but decreased plant growth when herbivores were absent, indicating that hosting ants can be costly to plants. However, we did not detect a cost to ant colonies of defending host plants against herbivores. Although this asymmetry in costs suggests that the plants may be under stronger selection than the ants to cheat by withholding investment in their partner, the costs to C. nodosa are probably at least partly ecological, arising because ants tend scale insects on their host plants. We argue that ecological costs should favor resistance or traits other than cheating and thus that neither partner may face much temptation to cheat.
Published Version: doi:10.1086/665654
Downloads of this work:
Show full Dublin Core record
This item appears in the following Collection(s)
Search DASH
Advanced Search


text:
by definition. The q-Pochhammer symbol is a major building block in the construction of q-analogs; for instance, in the theory of basic hypergeometric series, it plays the role that the ordinary Pochhammer symbol plays in the theory of generalized hypergeometric series.
Unlike the ordinary Pochhammer symbol, the q-Pochhammer symbol can be extended to an infinite product:
A q-series is a series in which the coefficients are functions of q, typically depending on q via q-Pochhammer symbols.
The finite product can be expressed in terms of the infinite product:
which extends the definition to negative integers n. Thus, for nonnegative n, one has
The q-Pochhammer symbol is the subject of a number of q-series identities, particularly the infinite series expansions
which are both special cases of the q-binomial theorem:
The q-Pochhammer symbol is closely related to the enumerative combinatorics of partitions. The coefficient of in
is the number of partitions of m into at most n parts.
Since, by conjugation of partitions, this is the same as the number of partitions of m into parts of size at most n, by identification of generating series we obtain the identity:
as in the above section.
We also have that the coefficient of in
is the number of partitions of m into n or n-1 distinct parts.
By removing a triangular partition with n − 1 parts from such a partition, we are left with an arbitrary partition with at most n parts. This gives a weight-preserving bijection between the set of partitions into n or n − 1 distinct parts and the set of pairs consisting of a triangular partition having n − 1 parts and a partition with at most n parts. By identifying generating series, this leads to the identity:
also described in the above section.
The q-binomial theorem itself can also be handled by a slightly more involved combinatorial argument of a similar flavour.
Multiple arguments convention
Since identities involving q-Pochhammer symbols so frequently involve products of many symbols, the standard convention is to write a product as a single symbol of multiple arguments:
Relationship to other q-functions
we define the q-analog of n, also known as the q-bracket or q-number of n to be
From this one can define the q-analog of the factorial, the q-factorial, as
Again, one recovers the usual factorial by taking the limit as q approaches 1. This can be interpreted as the number of flags in an n-dimensional vector space over the field with q elements, and taking the limit as q goes to 1 yields the interpretation of an ordering on a set as a flag in a vector space over the field with one element.
A product of negative integer q-brackets can be expressed in terms of the q-factorial as:
From the q-factorials, one can move on to define the q-binomial coefficients, also known as Gaussian coefficients, Gaussian polynomials, or Gaussian binomial coefficients:
One can check that
This converges to the usual Gamma function as q approaches 1 from inside the unit disc.. Note that
for any x and
for non-negative integer values of n. Alternatively, this may be taken as an extension of the q-factorial function to the real number system.
- George Gasper and Mizan Rahman, Basic Hypergeometric Series, 2nd Edition, (2004), Encyclopedia of Mathematics and Its Applications, 96, Cambridge University Press, Cambridge. ISBN 0-521-83357-4.
- Roelof Koekoek and Rene F. Swarttouw, The Askey scheme of orthogonal polynomials and its q-analogues, section 0.2.
- Exton, H. (1983), q-Hypergeometric Functions and Applications, New York: Halstead Press, Chichester: Ellis Horwood, 1983, ISBN _PHONE_, ISBN _PHONE_, ISBN 978-_PHONE_


text:
"Racconto Plurale, a modular&multimedia bookshelf dedicated to Canone Letterario Europeo, Â«an essential selection of books and authors, with the aim of creating a formative tool for future young Europeans,â¦Â» in an emotional and aesthetical dialogue between paper support and technological ones.
Books, seemingly outranked by technologic evolution that prefers digital formats, actually continue to stand for memory and culture. Design by Sara Bergando, in collaboration with Mobili in Stile Loro and Marchea, Racconto Plurale aims to collect literary cultural essence of European Union and host stories from the most important authors of continental tradition, in an emotional and aesthetical dialogue between paper support and technological ones, in a space thought to hold and interact multimedia devices. Carrie out during the project âCasa Europa â Euro decennial seen from veneto craftsmenâ through different material and processing, the project would be an expression of their pluralism thanks to itâs flexible and widely customizable structure. Starting from the original circular configuration named âCasaEuropaâ, which reminds metaphorically culture continuity and physically recalls a coin made of 17 parts â the number of countries in the Eurozone -, the modular structure allows different solutions and various combinations.
Using two materials, wood and iron, symbolizes properly the two opposite suggestions: emotional/analog books, rational/digital multimedia. Raw materials and surface processing are environmental friendly thanks to âDesign for Disassemblyâ approach.
The connexions which culture creates between different readers generations and different countries are the most important value among those communicated by this product. Racconto plurale would be an expression of their pluralism, thanks to itâs flexible and continuous structure. The bookshelf wants to keep a strong connections between books and ebook-readers, as between tradition and innovation, as craft and design, besides a constant interaction between opposite spheres."


text:
An excerpt from _URL_ archives copyright © 2000 - 2013
Origins Available: German, Italian
Where did the Italian Albini family come from? What is the Italian Albini family crest and coat of arms? When did the Albini family first arrive in the United States? Where did the various branches of the family go? What is the Albini family history?The surname Albini is an Italian patronymic surname; that is, it was a name created from the first name of the father. Albini is derived from a "pale" or "pure" person, and is a variant of the Latin personal name Albinus which was originally derived from the Latin albus, which means white.
Italian surnames come in far more variations than the names of most other nationalities. Regional traditions and dialects are a decisive factor in this characteristic. For example, northern names tend to end in "o", while southern in "i". Also important, but not unique to Italy, was the fact that before dictionaries and the printing press most scribes simply spelled words according to their sounds. The predictable result was an enormous number of spelling variations. The recorded spellings of Albini include Albigni, Albini, Albindo, Albinati, Albinelli, Albinetti, Albino, Albinoni, Albinotti and many more.
First found in the tiny town of Sestola, just south of Bologna. In 1629 the Albinelli family was registered here. This same year the family moved to Modena and were immediately made nobility. They were also made citizens of the city of Ferrara, nearby. Also in this year, Giambattista Albinelli was made a Cappuccinian monk in Modena.
This web page shows only a small excerpt of our Albini research. More information is included under the topic Early Albini History in all our PDF Extended History products.
Another 99 words(7 lines of text) are included under the topic Early Albini Notables in all our PDF Extended History products.
Amongst the settlers in North America with this distinguished name Albini were
Albini Settlers in the United States in the 19th Century
Albini Settlers in the United States in the 20th Century
The Albini Family Crest was acquired from the Houseofnames.com archives. The Albini Family Crest was drawn according to heraldic standards based on published blazons. We generally include the oldest published family crest once associated with each surname.
This page was last modified on 3 October 2011 at 11:06.
houseofnames.com is an internet property owned by Swyrich Corporation.


The American Heart Association Recognizes
 Baptist Grove as a Fit-Friendly Church
 The American Heart Association has recognized Baptist Grove as a fit-friendly church and has awarded the church Gold Status Certification.
 The American Heart Association's Fit-Friendly certification program recognizes
 employers and clergy who go above and beyond when it comes to their member's health. A Fit-friendly church reaches gold and platinum level status by
 implementing various activities and programs to encourage physical activity,
 choices in vending machines, promote annual member health risk assessments and other online tools.
 Gold-level churches must meet the following criteria:
 1. Offer members physical activity options at the church
 2. Increase healthy eating options at the church
 3. Promote a wellness culture in the church


text:
Published in: Journal of Business Venturing, 33: 333-350.
Cited as: Bacq, S., & Alt, E. 2018. Feeling capable and valued: A prosocial perspective on the link between empathy and social entrepreneurial intentions. Journal of Business Venturing, 33: 333-350.
Empathy is a key trait distinguishing social entrepreneurs from traditional entrepreneurs, and an important antecedent of social entrepreneurial (SE) intentions. Yet, little research explains the mechanisms through which empathy motivates SE intentions. We argue that studying the link between the prosocial trait of empathy and the prosocial outcome of SE intentions requires a prosocial lens that traditional entrepreneurial intent theories cannot offer. Building on prosocial motives research, we propose that empathy explains SE intentions through two complementary mechanisms: self-efficacy (an agentic mechanism), and social worth (a communal mechanism). We find support for our hypotheses in a study of 281 university students.
Visit the journal website to see access options for this document.
Recommendations from this resource
Future research should:
1) consider multiple facets of empathy other than the affective one (i.e., cognitive), and mechanisms other than agency (i.e., communion), in addressing the important question of how empathic individuals form intentions to engage in social entrepreneurship.
2) explore different settings in which individuals get to interact with and feel valued by potential beneficiaries, not only in terms of the geographical setting but also in terms of the length of interaction with potential beneficiaries, as well as contrasting individual work to teamwork. An experimental design may suit that type of research objective.
3) elaborate on the development of SE intentions in light of recent work indicating a generational decline in empathy among North American university students.
4) extend this work to the field of social entrepreneurship by examining the role of SE self-efficacy in enabling social worth.
5) explore social worth as a fertile construct for the development of future metrics of non-economic outcomes and phenomena not easily monetized.
6) investigate the effect of negative emotions that emerge from responsivity to the negative experiences of others on SE intentions.
7) also look at the role of emotions, such as situational empathy, in predicting SE intentions. Does situational empathy vary after exposure to concepts, stories, and knowledge related to social entrepreneurship, thereby raising SE intentions? Is this effect contingent on the type of course—lecture vs. experiential—or on the context—on-campus vs. field-based?


How To Make a "Falling Sand" Style Water Simulation
Have you ever wondered how all those "falling sand" games work under the hood? If so, read on. Today I will discuss one of the possible ways how you could implement the "falling" part of the game – sand particles falling under the effects of gravity, water (or other liquids) flowing down a hillside, and so on. Source code and a live demo are also available. This tutorial is along the same vein as my previous fluid simulation post that dealt with pseudo-compressible fluids and pressure, but the specific algorithm is much simpler (and probably quite a bit faster, too).
Side-note : No, I haven't been completely consumed by an inexorable desire to build fun graphical toys instead of practically useful software, why do you ask? 🙂 In fact, there'll be some WordPress-related announcements later this week…
Learning To Fly Fall
Falling water movementWhile I can't claim intimate familiarity with the algorithms the aforementioned games use to simulate fire or explosions, it's pretty easy to come up with a way to implement falling sand/flowing water. First, you need to figure out under what conditions something can fall/flow downwards. For a basic simulation this could be just a small set of very simple rules :
 - For each entity that is affected by gravity
 - If there's an empty space below it, move it down.
 - If there's an empty space down and to the left, move it down and to the left.
 - If there's an empty space down and to the right, move it down and to the right.
Next, you need to decide how to represent the simulation world and all the objects (like immovable walls, moving water particles et cetera) that it contains. One of the most common solutions is to use a two-dimensional array where each array element is an numeric ID of the material contained in that map tile. For example, 0 = air (or an empty square), 1 = wall, 2 = water, and so on.
Map array
In most falling sand games each array element would correspond to a single pixel on the game's screen. However, in my example application I used 20×20 pixel tiles instead to make the underlying simulation behaviour easier to see.
If possible, use byte or char as the array element datatype. Using int's might seem more straightforward, but it would also take up at least four times more memory and hurt performance. It's also a good idea to make the array just a bit bigger than the actual map dimensions and create a single-tile "buffer zone" around the map so that you can avoid checking for boundary conditions during the simulation.
Finally, during the simulation step we just loop over the entire array and apply the simple rules I mentioned above to each tile that contains material that should be affected by gravity.
Getting It Right
Now that's just silly.If you go ahead and implement the above algorithm as written, you will get a simulation that kind-of works, but quickly grinds to a halt on big maps and sometimes behaves in unexpected ways. For example, you might see sand tiles that seem to "teleport" to the bottom of the map instead of falling gradually and water that always flows left after hitting a free-standing ground tile (even though there's a perfectly suitable channel available on the right side). Lets see what we can do about that.
Keeping track of updated tiles
The "teleportation" behaviour can happen if our simulation algorithm doesn't keep track of which tiles it has already moved around during the current simulation step. For example, first it loops over the top row of the map, finds a water tile A and moves it downwards one row. Then it loops over the second row, finds the tile A, moves it again, goes to the third row, moves the same water tile again… and so on, until the water tile A hits a solid tile or falls off the map.
To prevent this bug we need to somehow remember which tiles have been updated already. Since I wanted to keep the memory use low, I used the most-significant bit of each map array element to indicate whether that tile was last updated on an even-numbered simulation step (0) or an odd-numbered step (1). Then, at the start of each step, the algorithm calculates what the flag should be for tiles updated in that step :
update_mask = byte ( ( simulationFrameCount & (long)1 ) << 7 );
//this basically takes the modulo of frame-count / 2 and shifts the result 7 places to the left
…then sets the msb of each tile it updates to that value and automatically skips tiles that have it already set to that value.
Pseudo-random movement
When a falling particle hits a free-standing fixed tile on a 2D map it has two choices – it can either move down and left, or down and right. In the naive algorithm I discussed above it will always try to move left first, leading to weirdness. Obviously we want it to choose at random, but on a big map generating a new random number for each tile would be slow. Instead, lets use the same approach as for the "teleportation" problem and move it either diagonally left if the current simulation step is even-numbered and or diagonally right if it's odd-numbered. This can still introduce some artifacts in the simulation behaviour, but they're rarer and and significantly less noticeable.
Speaking of optimization, we don't really need to update each gravity-enabled tile every time. Many of them will eventually end up in a situation where they can't move anywhere (e.g. water at the bottom of a puddle or sand resting on a flat surface), so it would be nice if we could quickly skip them and not waste our time trying to apply the simulation rules to these static tiles. This would help performance quite a bit.
The way I implemented is with the help with another bit-flag. If the simulation algorithm discovers that it can't move a tile in any direction, it will set the tile's "static" bit-flag. It will also skip any tiles that have the "static" bit-flag set.
There's some additional book-keeping we need to do to make this work as intended. When an empty space is created somewhere in the map (e.g. by a water tile moving down) we need to re-activate any gravity-enabled tiles that are directly above the newly created hole, so that they can fall/flow down into that space.
Possible Improvements
The result is a pretty basic and plain simulation that is useful to explain the basic principle, but it wouldn't really qualify as a full game. Here are some ideas you could use to improve it :
 - Make water flow horizontally if there's another water tile on top of it. Consider adding a simple pressure model [link to my prev. article].
 - Implement fluid density. This one is easy – if the current tile is more dense than the tile below it, swap them.
 - Add tile generators, e.g. a faucet that creates a water tile below itself on each simulation step (included in my demo application).
 - To improve performance, use a quadtree to keep track of which regions of the map have interacting tiles and quickly skip inactive regions.
 - Explore the source code of existing games and look for interesting ideas. Some open-source examples : wxSand, SDL Sand.
Live Demo & Source
Like my previous fluid simulation app, this one was also written in Processing. In addition to a working implementation of the algorithm discussed above it also lets you draw and erase water/ground/faucet tiles using your mouse, pan around the map with the WASD keys, zoom in/out with the mouse wheel and more. However, be warned that the map rendering code is not very optimized so the simulation will degenerate into a slideshow if you zoom all the way out, regardless of how fast your system is.
Related posts :
16 Responses to "How To Make a "Falling Sand" Style Water Simulation"
 1. Ross Shannon says:
 Good tutorial, thanks. I don't understand the problem with particles teleporting downwards though — it seems to be that the only reasonable way to program this is to do the simulation updates bottom-to-top. Otherwise, if you update top-to-bottom, when you update the game state array, any particles that have another particle above them will be overwritten by the top particle falling into their position?
 2. White Shadow says:
 You are correct, updating bottom-to-top is a good approach. I didn't mention it in the post, but that's exactly what my demo app does.
 However, that alone wouldn't be enough to prevent "teleportation" in a more complex simulation. For example, if you added a rule like "if this fluid particle has another fluid particle above it, move this one sideways" (i.e. a very basic pressure factor), you'd get particles teleporting left or right depending on the direction of your X loop. So tracking which particles have been updated still makes sense.
 3. Henk says:
 Neat tutorial, I followed it on a bored friday evening :). I implemented the teleporting thing using a simple 'updated' boolean 2d array that sets fields to true if they've been updated during that round, but that's mainly because I'm not much of a bit twiddler.
 Haven't got the water going horizontal right yet though. It'd probably become either very complex, or need to be rewritten if I ever add other materials.
 4. Grant says:
 There is a very easy fix for the "teleporting" problem. Before the main loop (updating every tile), copy the entire


text:
Try the following:
- Lift your finger, and then tap the tap sensor rather firmly.
- If you do not put the headset's units on both of your ears, you can't adjust the volume, even if you tap the tap sensors.
- If the tap sensors are disabled, you can't adjust the volume. Use the following procedure to reactivate the tap sensors.
- Put the headset's units on both of your ears.
- If the Bluetooth® function is on, hold down the button on the left (L) unit for 2 seconds to turn off the Bluetooth function.
- Hold down the button on the right (R) unit for 4 seconds.
- You can also reactivate the tap sensors when the headset's units are set in the charging case.