 I honestly have tried weed once, without much success, but that is about it. Being into Pink Floyd and all that great Classic Rock, my friend and I decided to try Morning Glory as I have heard music sounds so great when you are high. We read up on it on the Internet, and decided to use the 'Stoner's Method'. We washed the seeds and tried to grind them, but they wouldn't break. So the chewing began. After awhile, the taste started to give me the shakes. We kept drinking kool-aid to help get rid of the flavor. After about 1/2 or more of the 8 packets, I decided that was good for now.
I started to feel so sick, really, really fluish. After lying aorund for a little bit, I started to feel better. Nothing seemed to being happening, and we were kind of upset that we wasted somewhere around $20 for 16 packets. I defenitly had eaten alot more than my friend had, and she was still rolling around about to throw up. Soon, my stomach felt alot better and I was moving all around. Everything felt so much softer and I couldn't stand still. I kept grinding and pushing my hands together and rubbing everything in sight. It was weird, it just felt right. I kept making this really weird face, like I was going to scream of happiness. It felt so good to strech out my face and I could not stop smiling. My friend was the same way, but still really queezy.
After both of us continued to roll around on the floor, and make funny calls to our friends, it started to hit me more. We decided to turn on the black light. This is where it all really started for me. It was so creepy, but really cool at the same time. Suddenly, I just started sobbing. I had no idea why. I was trying to smile, but the tears kept falling. So we turned on the regular lights, and I didn't know where I was. We then proceeded to do this process over and over, then we just left the black lights on. I was definetly getting 'higher and higher' and this point. I felt lifted on a solid rock and just sat there. I was so scared to leave the room. It felt like the room was where I was my entire life, like I didn't know anything else. I was terrified to walk out. I was so comfortable with the lights and the coziness of the room. Everytime I turned to different parts of the room, it looked diffrent. A few times, I started to feel clausterphobic.
Amoungst the fear of forgeting what it was like to feel normal, I started to realy enjoy this other world I was in.  The music was like the narration for what was happening to me. I started crying again because the lyrics were right on. The morning glory made me so emotional it was crazy. Time was all messed up as well. It was going SO SLOW. Wow, what an experience.
My other friend, who realized this was happening, came to pick me up and drive me home. I'm SO GLAD she came because I would have crashed the car, I could barely see straight or control my movements. It was 11:30pm, and we had started to consume the seeds around 8pm. By this point I was having trouble walking and almost fell over a few times. I couldn't really see things right. I went outside to meet her, and the car ride is really hard to remember. I just closed my eyes and felt like I was flying through space. Wow, what a feeling. The car was floating, and so was I still.
I got home, unfortunetly to meet my parents. My face at this point was swelling like a balloon, and my eyes were puffy and started to become dialated. My friend, who drove me home, tried to cover for me. My parents were pretty obilvious. I was so quiet, but when I talked I was yelling without knowing it. My ears felt clogged and my nose did too. Everywhere I looked, things were dragged out, and I started to almost hallucinate. My face was swollen pretty bad now, and all I wanted to do was SLEEP, and throw up. By this point, I was going numb, and I could feel my insides, but they weren't really attached to the rest of me. I needed to vomit so bad, but I couldn't.
Out of fear, my friend helped tell my parents. She soon left, and I was stuck, so high, with my parents. What seemed like hour after hour, I sat by the toliet and stuck my finger down my throat, and threw up around 7 times to get the stuff out of my stomach. My eyes had a green tint, and were bloodshot as well. My mom gave me anti toxiant stuff to get it out of my blood faster. I was crying SO HARD becuase I thought I was going to die, I'm not kidding. I wanted to sleep so bad but I felt like if I did, I would never wake up.  I had to finish throwing up, however, before I went to sleep. I would have passed out right away, but I forced myself with all I had to stay awake. Now, after throwing up a bunch of times, I really started to hallucinate. It was friggin crazy. Barely able to stand up, I went to bed, my mom with me during all of this, and I layed there.
Everyhitng had a film of pattern over it, almost like tie-die. I have to admit it was so neat. When I talked, the film would vibrate to the tone of my voice. Everyitng was moving, and everyhting looked like surrealism. All I wanted to do was draaw everthing. My body felt like shapes, so I could draw exactly how I felt. I kept singing songs in my head, and I could really hear the song.  I almost wanted to enjoy what was happening. I wanted to move around or lay there and listen to music. Unfortunetly, my mom was there and I don't think she would appreciate that. I understand why people do drugs now, if I was artist I would do this quite often. I can't get over how awesome everything looked and felt. I was no longer sick at his point, but still very high. It was going on 4 am at this point. As I was going to sleep all the shadows danced all over the ceiling. It was amazing. I finally forced myself to sleep.
The next morning, this would be yesterday, I was so tierd. I got up and still had a hard time walking. I was really tipsy and still think it was in me or something.    By the evening I finally felt normal again.
It sucked being caught by my parents, but I had to be because I was so scared. Morning Glory can have pestisdes, so I wasn't sure if I was actaully poisioned, but it ended up that I was just coming down, and it sucked. I feel that I was pretty f*cked up, I couldn't walk or talk for godsake. I tried to drink and I couldn't feel it go down, so it went all over my face, and when I tried to throw up my finger couldn't feel anyhthing inside me. I was completey numb and 'distached' from my body. What I was saw was amazing, but I won't ever do this again. It was way too scary and the after effect of all the swelling sucks so bad.  And the music kicked ass, but it wasn't worth it. But I experienced it first hand, and I learned so much. The worst part is that I hurt some people in the process that shouldn't have been involved.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


{% extends 'layouts/layout-cookie-banner.html' %} {% extends 'layouts/layout.html' %} {% block pageTitle %} Create a password {% endblock %} {% block content %}
Your password must have:
We will collect and save your information securely. We will not share your personal information without your consent.
By continuing you confirm that you agree to our privacy notice and terms and conditions.
Errors


PassItOn
Trade
About Us
Contact Us
Search
Search
Browse Categories
Kitchen
Living Room
Bedroom
Bathroom
Search
Location
Dublin
Galway
Cork
Limerick


{% extends "base.html" %}
{% load core_tags %}
{% block content %}
{% filter restructuredtext %}
Hello
-----
Thanks for checking out Pydoc.
This is a new ambitious project from the folks behind Read the Docs.
**This is currently in Beta!**
There is a lot of work that still needs to be done,
especially around the documentation UX and parsing.
You can read more information in our `About <{% url 'about' %}>`_ page.
You can check out our listing of current projects that we're building here:
{% endfilter %}
{% for release in view.projects %}
{% filter restructuredtext %}
* `{{ release.release_name }} `_
{% endfilter %}
{% endfor %}
{% endblock content %}


Can we create a check box to Notify by email when a reply has been posted.
Such forums as Arduino, Sparkfun, Adafruit to name a few have this handy function.
Archived Forum |
|
Notifications of replies to postsSubmitted by platypus on Tue, 02/07/2013 - 14:49Can we create a check box to Notify by email when a reply has been posted. Such forums as Arduino, Sparkfun, Adafruit to name a few have this handy function. » |
Re: Notifications of replies to posts
This option already exists. See "Subscribe" links. But to my knowledge, it does not work correctly.
Re: Notifications of replies to posts
Yes, it needs to be under this comment box, otherwise anyone who is interested and doing multiple posts will eventually be lost.
Re: Notifications of replies to posts
I can't seem to find this option to 'subscribe' anywhere. Am I blind?! I am not getting email notifications about forum replies which would be very handy. Any tips?
Re: Notifications of replies to posts
You'll find it under "My account", but as far as I'm aware, it has not worked correctly for some time.
Re: Notifications of replies to posts
...not worked for me either...
neither does alerts about items in the moderation queue awaiting approval, private messages, etc.
Paul
Re: Notifications of replies to posts
Is there anyway this feature can be fixed? I think it would promote far more activity on the forums as currently unless you check back every day you have no idea if a thread you are involved in has had any activity.
I know myself I sometimes get busy and forget to check back, and then come across answers to questions I posted days ago. Email notifications would alert me to these answers and ensure a more active thread IMHO.
Unfortunately I have no idea about forum software so I can't offer any 'solutions' but I think fixing this would vastly improve the speed of 'conversations', i.e. responses etc.
Re: Notifications of replies to posts
Ben,
Agreed, I can't understand why it hasn't been fixed...
Paul
Re: Notifications of replies to posts
has not worked for me either, its a PITA.....
Re: Notifications of replies to posts
I wonder if Trystan has seen this thread? Maybe he has, and it's either too difficult or he can't fix it. I seem to remember that he tried a while ago and got nowhere.
Re: Notifications of replies to posts
Il try and take a look at this again. There where problems with the emails getting stuck and then people getting a flood of notification emails. I agree it would be useful to get working.
Trystan
Re: Notifications of replies to posts
just bumping this up as its still a pain not getting mails...


Next:
Pipes
Up:
R4RAF
Previous:
Utility Functions
More Details About Plotting
This chapter includes additional details about the plot functions available in Ranadu.
Subsections
Pipes
Multi-Frame Plots
Multiple plotWAC( ) plots:
Panels and Facets in ggplotWAC( ):
Plotting the density of events
Error bars and box-and-whisker plots
The skew-T thermodynamic diagram
Aerosol- and hydrometeor-size distributions


Why is this result not controversial? Republicans do exist in Massachusetts and regularly receive between 30 and 40 percent of the vote in statewide elections (President, Governor, Senate). Proportional representation would give Republicans 3 of the 9 congressional districts; however, even though the possible number of valid districting plans exceeds the number of particles in the universe, it is impossible to come up a plan that yields even one Republican district! [4.12.35] This is simply due to the geography and the fact that there are no large Republican enclaves within the state. Due to the natural distribution of their voters, they do not form a majority in any region of Massachusetts, leading to their prolonged lack of representation in Congress.
in-context


The Diffie-Hellman Demonstration is an interactive visualization of the Diffie-Hellman key exchange protocol.
Bit by bit you can accomplish every single step of the procedure on your own.
In doing so you constantly have the opportunity to obtain context-sensitive help by pressing F1 if you have any operational problem with the dialog.


.md2 File Format Specification
INTRO
This page will try and give some sort of technical documentation on the Quake2 model format (.md2).
These specs can be used freely for whatever you want. I only ask that people send me corrections, suggestions, etc.
Quake2 models are stored in files with the .md2 extension. This is a custom format used only by Quake2 and (probably) Quake2 mission packs. md2 files can be generated from various other file formats by tools provided freely by id, in original and modified form. A single md2 file contains the model's geometry, frame information, skin filename(s), and texture coordinates. The file is little-endian (intel byte ordering).
HEADER
The header comes right at the start of the file. The information in the header is needed to load different parts of the model.
typedef struct
{
int magic;
int version;
int skinWidth;
int skinHeight;
int frameSize;
int numSkins;
int numVertices;
int numTexCoords;
int numTriangles;
int numGlCommands;
int numFrames;
int offsetSkins;
int offsetTexCoords;
int offsetTriangles;
int offsetFrames;
int offsetGlCommands;
int offsetEnd;
} model_t;
int magic: A "magic number" used to identify the file. The magic number is 844121161 in decimal (0x32504449 in hexadecimal). The magic number is equal to the int "IDP2" (id polygon 2), which is formed by ('I' + ('D' << 8) + ('P' << 16) + ('2' << 24)).
int version: Version number of the file. Always 8.
int skinWidth: Width of the skin(s) in pixels.
int skinHeight: Height of the skin(s) in pixels.
int frameSize: Size of each frame in bytes.
int numSkins: Number of skins associated with this model.
int numVertices: Number of vertices in each frame.
int numTexCoords: Number of texture coordinates (not necessarily the same as the number of vertices).
int numTriangles: Number of triangles in each frame.
int numGlCommands: Number of dwords (4 bytes) in the gl command list.
int numFrames: Number of frames.
int offsetSkins: Offset, in bytes from the start of the file, to the list of skin names.
int offsetTexCoords: Offset, in bytes from the start of the file, to the list of texture coordinates.
int offsetTriangles: Offset, in bytes from the start of the file, to the list of triangles.
int offsetFrames: Offset, in bytes from the start of the file, to the list of frames.
int offsetGlCommands: Offset, in bytes from the start of the file, to the gl command list.
int offsetEnd: Offset, in bytes from the start of the file, to the end (size of the file).
FRAMES
Each frame contains the positions in 3D space for each vertex of each triangle that makes up the model. Quake 2 (and Quake) models contain only triangles.
typdef struct
{
byte vertex[3];
byte lightNormalIndex;
} triangleVertex_t;
byte vertex[3]: The three bytes represent the x, y, and z coordinates of this vertex. This is not the "real" vertex coordinate. This is a scaled version of the coordinate, scaled so that each of the three numbers fit within one byte. To scale the vertex back to the "real" coordinate, you need to first multiply each of the bytes by their respective float scale in the frame_t structure, and then add the respective float translation< /a>, also in the frame_t structure. This will give you the vertex coordinate relative to the model's origin, which is at the origin, (0, 0, 0).
byte lightNormalIndex: This is an index into a table of normals kept by Quake2. To get the table, you need to download this zip file (1.7 MB), released by id, that has the source code to all of the tools they used for quake2.
typedef struct
{
float scale[3];
float translate[3];
char name[16];
triangleVertex_t vertices[1];
} frame_t;
frame_t is a variable sized structure, however all frame_t structures within the same file will have the same size (numVertices in the header)
float scale[3]: This is a scale used by the vertex member of the triangleVertex_t structure.
float translate[3]: This is a translation used by the vertex member of the triangleVertex_t structure.
char name[16]: This is a name for the frame.
triangleVertex_t vertices[1]: An array of numVertices triangleVertex_t structures.
TRIANGLES
Quake 2 models are made up of only triangles. At offsetTriangles in the file is an array of triangle_t structures. The array has numTriangles structures in it.
typedef struct
{
short vertexIndices[3];
short textureIndices[3];
} triangle_t;
short vertexIndices: These three shorts are indices into the array of vertices in each frames. In other words, the number of triangles in a md2 file is fixed, and each triangle is always made of the same three indices into each frame's array of vertices. So, in each frame, the triangles themselves stay intact, their vertices are just moved around.
short textureIndices: These three shorts are indices into the array of texture coordinates.
SKINS
There is an array of numSkins skin names stored at offsetSkins into the file. Each skin name is a char[64]. The name is really a path to the skin, relative to the base game directory (baseq2 f or "standard" Quake2). The skin files are regular pcx files.
typedef struct
{
short s, t;
} textureCoordinate_t;
short s, t: These two shorts are used to map a vertex onto a skin. The horizontal axis position is given by s, and the vertical axis position is given by t. The range for s is greater than or equal to 0 and less than skinWidth<
/a> (0 <= s < skinWidth
). The range for t is greater than or equal to 0 and less than skinHeight (0 <= s < skinHeight
). N
ote that the ranges are different than in the s and t members of the glCommandVertex structure.
GL COMMANDS
At offsetGlCommands bytes into the file, there is the gl command list, which is made up of a series of numGlCommands int's and float's, organized into groups. Each group starts with an int. If it is positive, it is followed by that many glCommandVertex_t structures, which form a triangle strip. If it is negative, it is followed by -x glCommandVertex_t structures, which fo rm a triangle fan. A 0 indicates the end of the list. The list is an optimized way of issuing commands when rendering with OpenGl.
typedef struct
{
float s, t;
int vertexIndex;
} glCommandVertex_t;
float s, t: These two floats are used to map a vertex onto a skin. The horizontal axis position is given by s, and the vertical axis position is given by t. The range for s and for t is 0.0 to 1.0. Note that the ranges are different than in the textureCoordinate_t structure. They are stored as floats here because that's the way Quake2 passes them to OpenGl.
int vertexIndex: Index into the array of vertices stored in each frame.
MAXIMUMS
Quake2 has some pre-defined limits, so that dynamic memory does not need to be used. You can use these to your advantage to speed up loading if you want.
Quake and Quake2 are trademarks of id Software.
All trademarks used are properties of their respective owners.


{% extends 'base.html' %} {% block content %}
This is a modified jumbotron that occupies the entire horizontal space of its parent.
Some quick example text to build on the card title and make up the bulk of the card's content.


ProSuits is a place where you can buy top if the line formal apparel. All of our merchandise is hand-made and inspected to insure you get the great quality we are known for. Our clothing is designed by a team of very talented and experienced clothing designers.


NAME OF THE CANDIDATE:
Browse
Roll No
Kanpur
School Name
Kvs
Email Address
<EMAIL_ADDRESS>Contact No.
8960620407
Log Out


Toggle navigation
My Name come here
Portfolio
ContactMe
About
Sathish Babu R
6+ years of experience in .Net and Java Software Development.
Go is my recent favorite language.


Shub-Internet
`Prev `__
S
`Next `__
--------------
**Shub-Internet**: /shuhb´ in´t@r·net/, n.
[MUD: from H. P. Lovecraft's evil fictional deity Shub-Niggurath, the
Black Goat with a Thousand Young] The harsh personification of the
Internet: Beast of a Thousand Processes, Eater of Characters, Avatar of
Line Noise, and Imp of Call Waiting; the hideous multi-tendriled entity
formed of all the manifold connections of the net. A sect of MUDders
worships Shub-Internet, sacrificing objects and praying for good
connections. To no avail — its purpose is malign and evil, and it is the
cause of all network slowdown. Often heard as in “Freela casts a tac
nuke at Shub-Internet for slowing her down.” (A forged response often
follows along the lines of: “Shub-Internet gulps down the tac nuke and
burps happily.”) Also cursed by users of the Web, FTP and telnet when
the network lags. The dread name of Shub-Internet is seldom spoken
aloud, as it is said that repeating it three times will cause the being
to wake, deep within its lair beneath the Pentagon. Compare `*Random
Number God* <../R/Random-Number-God.html>`__.
[January 1996: It develops that one of the computer administrators in
the basement of the Pentagon read this entry and fell over laughing. As
a result, you too can now poke Shub-Internet by
`*ping* <../P/ping.html>`__\ ing ``shub-internet.ims.disa.mil``. Compare
`*kremvax* <../K/kremvax.html>`__. —ESR]
[April 1999: shub-internet.ims.disa.mil is no more, alas. But
Shub-Internet lives, and even has a `home
page `__. —ESR]
--------------
+---------------------------+----------------------------+------------------------+
| `Prev `__ | `Up <../S.html>`__ | `Next `__ |
+---------------------------+----------------------------+------------------------+
| shriek | `Home <../index.html>`__ | SIG |
+---------------------------+----------------------------+------------------------+


I liked:the course design, vibrant graphics, the, uh, "physics", the SFX I didn't like:the lack of music during gameplay, you can't save your custom tracks
Excitebike is another one of those Nintendo-made games commonly
associated with the NES. It was one of the first motorcross racing
games way back in the day, and it's still a fun game, even over twenty
years later.
So, you know, it's bike racing, so the premise is straightforward:
race. You can either play in Mode A or Mode B; in A you just kinda race
by yourself, but Mode B is an actual race. In either one however, your
ultimate goal is to beat the clock. You gotta finish in the top three
to progress thru the game's five tracks. This isn't too difficult,
although it's not so easy that you'll get it on your first try. Mode B
presents more difficulty, and thus I prefer this mode. Why race alone
anyways?
The tracks are split into four lanes which you switch between using the
D-Pad. You've got your throttle on the A button, and a Turbo on the B
button. Using Turbo for too long causes your engine to overheat however.
The tracks are also filled with plenty of obstacles, such as missing
pieces of track, pits, small barricades, and ramps. The ramps are the
biggest part of the game. While in midair you have to balance yourself
out so you land on both wheels and keep your speed up. Pulling back on
your bike (ie left on the D-Pad) is also one way I've found to gain
speed as you come off a ramp.
You can also interfere with other racers by getting in front of them,
causing them to fall off their bike. This can happen to you as well
though, and the AI makes sure of it. Speaking of AI, it works pretty
well in this game. It's a simple game, so it doesn't call for much
really, but it tries to trick you here and there. For example,
sometimes the track thins out to just two lanes. When you close in on
another biker, they may start swerving up and down the two lanes,
keeping both sides covered. Then again, the racing AI just likes to
swerve all over the place anyway.
On nice bonus to the Excitebike package is a track editor. The game
gives you the twenty-some pieces and piece combos seen in the main
game's five tracks. It's pretty cool that there was an actual level
editor in this game, but you can't save your designs (which is
understandable anyway - although the Famicom Disk version did have a
save-to-disk feature).
Graphics and sound wise, the game is great. The visuals look clean, and
the tracks look clean as well. Music is there, although there's no BGM
music during actual gameplay, just the roar of engines (which is still
plenty passable).
The game's an easy find on eBay and in some game stores, so if you have
an NES and you don't have this game, you should have this game.


Dummy text starts here...Waters dry whose third. Face good own image form be is likeness fourth given gathered so give saw own. Third good, days can't moved brought female to creeping void.
Dummy text starts here...Waters dry whose third. Face good own image form be is likeness fourth given gathered so give saw own. Third good, days can't moved brought female to creeping void.
Dummy text starts here...Waters dry whose third. Face good own image form be is likeness fourth given gathered so give saw own. Third good, days can't moved brought female to creeping void.


HEALTHY INDOORS - DASHBOARD
Reading ID:
TEMPERATURE
°C
HUMIDITY
%
PRESSURE
hPa
GAS RESISTANCE
Ω
INDEX of AIR QUALITY
static INDEX of AIR QUALITY
CO
2
EQUIVALENT
ppm
BREATH VOC EQUIVALENT
ppm


--- layout: post status: publish published: true title: Ruby Quiz Metaprogramming Challenge author: display_name: Geoff Lane login: admin email<EMAIL_ADDRESS>url: http://www.zorched.net author_login: admin author_email<EMAIL_ADDRESS>author_url: http://www.zorched.net date: '2006-02-19 18:33:33 -0500' date_gmt: '2006-02-20 00:33:33 -0500' categories: - Code - Ruby tags: [] comments: [] ---
Check out the Ruby Quiz run by James Edward Gray II. It's a weekly 'quiz' that runs on the ruby-talk mailing list each week. I think this is a great idea for any language, but especially emerging languages full of interesting features like Ruby.
This week's quiz was a meta-programming challenge called metakoans. This was a really great quiz highlighting a less common, but incredibly powerful feature available in Ruby (which borrowed much of this from Lisp).


Chase
Intern
Welcome to the HTML Portfolio Project
Learn more
Intro paragraph about me! Blah blah blah The end
Learn more about skills
I got skilllzzzzzz
HTML
good at this
good at that
good at the other thing
Contact me
where to find me:
Just click it


Australia win first Test against Pakistan in Brisbane
Australia by an innings and five runs against Pakistan in the first test at the Gabba.
by AFPAustralia beat Pakistan by an innings and five runs in the first Test in Brisbane to go 1-0 up in the two match series on Sunday.
After trailing the hosts by 340 runs on the first innings, Pakistan were bowled out for 335 late on the fourth day.
Babar Azam made 104 and Mohammad Rizwan 95 for the visitors, while Josh Hazlewood took 4-63 to be the pick of the Australian bowlers.
The second Test begins in Adelaide on November 29.


I live in a days but got for Monday.
Most wonderful show is keeping up with the jones is welcome to episode one ninety two of keeping up with the jones is where this week we're going to talk about a heart of stone,
but first it's good to see you miss is Jones thank you I've missed sitting opposite you.
It's been a while it's been a while I know and as a result we have a big catch up to do we do we don't have an episode last week.
No, because we weren't here to record it.
That's correct.
We went to Florida, sunny Florida, with all of the staff from the school of supernatural life,
to say thank you to them for all their hard work last year.
Yes, it was so fun.
It was five days of glorious rest.
Rest.
Well, two of those days was driving.
Well, yes, but I mean, we got there around four or five in the afternoon on Friday.
Plenty of time to go swimming with dolphins.
if there was dolphins dolphins in my mind great okay yeah and then we had three days of just being
there being at the beach hanging out together having fun eating food i brought my drone things
you did i got lots of beautiful drone photography beautiful footage or drone videography something
like that um we came class passed the fact that all of our students actually graduated we did
with graduation.
This is what happens when you have a podcast in a couple of weeks.
Nearly 100 students between year one and year two.
Congratulations guys, we love you.
We love you so much.
I miss you already.
I realized on Thursday, this past Thursday, I was like, I just missed them.
And you know, every class I think I fall in love with, and it takes me a while to adjust.
So I'm adjusting.
In other news, we went to see the new Avengers movie.
We did.
Which we refuse to discuss for at least a month.
Yes.
who wants to see is it the opportunity to see it and then we will discuss.
Yes, I guess we can as long as we say, "Hey, we're discussing this movie in case they haven't seen it yet."
Right, well you have a month people.
You have a month.
 How does that work?
Well, I don't fully understand it yet but we're four or five days in.
You sure it's not witchcraft?
I'm pretty sure it's called the ketogenic diet and essentially you are trying to eat
70 to 80% fat, 20 to 30% protein and 5 to 10% carbs.
And then you can have like green leafy vegetables, you know, kale and what are other ones, broccoli,
you know that kind of stuff.
I don't know.
I've been out four days and I've neither eaten broccoli or kale, but I haven't eaten lots
of butter.
Butter.
Mm.
We're also doing the bulletproof coffee in the morning.
Yeah.
So this is where you take coffee.
You add grass fed butter to it and some sort of oil and then blend it.
And I remember lots of people have said to me over the years, "Oh, it's so good.
You'll love it."
No.
You don't love it.
I don't understand.
Because I'm making their Bulletproof Hot Chocolate, and I think it's delicious, and we should
add it adds intermittent fasting.
So the last thing you eat is about 6 p.m.
And then we don't eat again until like 1 p.m. the following day.
Yes.
But you have a cup of Bulletproof Coffee, or in my case, Bulletproof Hot Chocolate first
in the morning, and it keeps you feeling full all day.
It does keep you feeling full.
It's just not nice tasting coffee.
I don't understand how that is.
Is it just that your coffee sucks?
Because adding the butter and this oil,
all it does is make it frothy and creamy.
An oily.
I can't taste the oil in it at all.
I can taste the oil.
Not tasty, but it's the filmy aftertaste.
Oh, I'm a sucker for it.
Yuck.
And then the Grey Center this morning,
Jeff Dollar, our fearless leader,
began to roll out some exciting things.
If you like Grey Center,
if you know what Grey Center is,
the church that we attend. And if you're somebody who is interested in what's happening at Grace
and everything, I would really encourage you to watch this week's service to see what Jeff is
talking about, see if it strikes a passion in your heart. It actually kicks off, I think, four weeks
of messages, which coincide with our source conference. So if you're coming for the source
conference, you may wish to watch this as like an added extra as well.
Yeah, it should be very good. Also, there was the grand opening of Mojo's taco shop this
week. So good. It's in the factory. If you haven't been, we highly recommend it. It's
really, really good.
Yeah, it's absolutely delicious. We've been feasting from the taco truck. And now they've
got an actual store, which we're very excited about.
Yeah. Well, our topic this week comes actually from a listeners question. This listener wants
to stay anonymous. So I was about to say your name, but I haven't. They write in and they
They said, "Hello, I have listened to Yall's podcast for a while now and have also been
listening to Grace Enner's sermons on Sunday and I absolutely love both.
I was recently listening to the Grace Enner podcast with the Esso Self-student testimonies
from outreach and I heard a lot about the heart of stone teaching.
I've read the verse in the Bible about how God will turn your heart of stone into a
heart of flesh, but I haven't heard any teaching about it.
Could Yall elaborate on what it is about and maybe point me in the right direction to learn
a little bit more.
Thanks.
Well, I'm so glad that you asked Anonymous
because that's exactly what we're gonna talk about tonight,
which is the heart of stone.
- Yeah.
So the heart of stone sort of simply put
is a defense mechanism.
- Ooh, is that a good thing or a bad thing?
- Well, it's not a good thing,
but it feels like a necessary thing often when we do it.
So it's, usually it will trace back to a memory
or a set of specific memories
where we actually shut down our hearts because of the amount of pain that we're feeling.
And we just sort of shut down all emotion in order to survive whatever the event is at the time.
And what we end up doing is creating something called a heart of stone,
which is just a deadening of emotions really. Yes. And it becomes somewhat like if you have a
picture of you building up a stone wall around you so that pain can get through that's kind of
of what happens. It's this defense mechanism that you build where you just harden your heart
so you don't feel pain anymore. It's really effective at keeping pain out.
Yes, it is effective, but at some point that pain will resurface.
Yeah, pain has a habit of doing that.
Yeah. It's usually a temporary fix that helps you get out of a certain situation,
but if we don't actually realize we're doing it, we don't realize, "Oh my gosh, I'm shutting down
my heart right now. I'm actually not even allowing the Lord to minister to me. I'm not getting help
with this. Then you can end up years down the road. And all of a sudden things are exploding
around you as bombs go off in your heart. And you have no idea that this actually dates back to
years before when to survive an event, we shut down our hearts.
The other funny thing is, I mean, this is not funny, but the other interesting thing about
about heart stone is while it is effective at keeping pain out, it's also keeping inadvertently
the love of God out. Yes.
Because the same area where your heart is alive and can feel how ease and pain is the
same area where your heart can feel loved and cared for. So people with hearts of stone,
it depends on the culture you come from, but people with hearts of stone are often really
applauded because they can just power through. They're not swayed by all these feelings.
They can just get things done. They may be even annoyed at other people having feelings.
They tend to have a very low need for need. They make great pastors because they can just
shut down and power through. Now, I say all that with a bit of a tongue in cheek, but
I remember being in revival meetings where everybody else is getting touched by the Lord.
And I'm like, what's wrong with me?
Why can't I feel the presence of God?

And that's why you can't feel the love of God.
And here you are with your thing that you tried to perfect.
So how do you know if you've got a horse, Don?
Well, there's actually a heart of stone checklist.
It's funny you should say that because I've just pulled it up on my laptop.
You did?
Well, it's just the cheeriest list ever.
I think we should read it.
It's like one of those things of, um, you may have a heartstone.
If right.
I remember the first time I heard the checklist.
Why I remember the first time I heard the, uh, the teaching.
And I was like, Oh, those poor people with hearts of stone, you know, never,
never assuming it would be me.
Right.
Until we read the checklist.
And I was like, Oh no, well, I'm the poor people.
When I read the checklist, I was like, no, isn't this like a really mature
person. This can't be somebody that has a heart of stone. This sounds like a good type of person.
Yes, we want that. We want that person.
So people with a heart of stone often keep people at a distance, protect themselves,
keep up a good front, but have trouble being real, are unable to show their emotions,
are used to keeping it all together, have the role of the strong one. Keeping it all together
is otherwise known as performing or stiff upper lip for all our British listeners.
Yes, lovely.
Find it difficult to ask for help.
Now, isn't that just the trait of every man?
Whoa, judgment.
Oh, I just realized, you said help and I meant directions.
You know how they say men don't ask for directions.
The reason we don't need to ask for directions is we're the ones using our GPS.
You're the one that refuses to use Siri.
I digress.
People with a heart of stone often can minister to others, but can't be
ministered to. How about this one? Wish other people could keep it all together
like they do? Yes, I have had several events in my life where I have been to
movies. Tell the one about Titanic. So I went to go and see Titanic with our
youth group. So this is, I mean, how long ago did Titanic come out? I don't even know
long time ago. At one point in the movie, I looked down, there's like 18 people in our
row and everybody's crying. I yelled down the row and it was a full theater. "Get it together,
would you? It's a movie!"  It's a movie." I did.
I said I was stuck up.
Lastly, people with a heart stone find it difficult to receive love. They look down on those who
express emotions as being weak or immature and then have difficulty with intimacy but may not
realize it. Often because intimacy isn't something that's desired or isn't aware of need if you've
spent years shucking down your heart. Yeah. Well, because intimacy would be something that would
would then crack open that pain so you can't long for intimacy and keep a heart of stone.
Right. Would you like a couple of testimonies?
Sure.
So I remember that there was a new boy in our school when I was in primary school,
which is elementary school for North American listeners. There was a new boy that joined our
school. His name was Scott McGookin. There's a good Scottish name for you.
Scott McGookin. Can you say that with a Scottish accent?
It just did. Scott McGookin.
Well, no, it sounds still kind of American.
Oh, give it your best Scottish accent.
No, because then I'll sound like you.
What are you talking about?
The Gukin.
That's how you say it.
That's exactly what I'm trying to avoid.
Okay, I'll translate for all of the Scottish people that are listening.
It may be the last time you listened, but I'll translate for you.
Okay.
So I remember a new boy.
Right.
Scott the Gukin joined the school and as was one to do, I've been taught that you must be Jesus to everyone.
And I had this huge heart compassion in this poor boy. He doesn't know anybody.
And if I was in his shoes, I'd want a friend. So I'll be his friend.
We haven't talked about the victim triangle yet.
Next week.

Yes.
And so I was like, oh, I'll be his friend.
And then that will make him happy.
And I remember thinking, how many people is this?
I remember thinking, if I tell him something super secret, then he'll feel like he's really
trusted and our friendship bond will grow.
I remember thinking that at a very early age.
How old are you at this point?
I don't know, like maybe like seven or eight.
So the trouble is when you're seven or eight, you don't really have anything that requires
tremendous trust.
So I made up something.
I told him a made-up secret.
This gives you a huge insight into seven year old Alan.
There's already lots of control and manipulation going on.

Like that this is the secret.

You have sweet little ears.
I know, but I just thought this would be really vulnerable of me.
We're forming a bond.
He's really trusted.
This is like his first day of school.
Yeah.
So I tell him, Scott, I'm gonna tell you something I've never told Henry before.

And rather than Scott going, man, I feel so bonded with this band of brothers.
He used that information against me to leverage new friends.

So they all started calling me big ears.
And I went home really upset.
Not, not that people were calling me big ears, but that he used my magnificent
friendship technique against me.
So, so thanks for laughing at my core page.
I appreciate it.
I'm sorry.
But basically what that wrote on my heart was it's not worth risking connection because
you'll only be rejected.
Right.
So I'm just not going to open my heart anymore.
Screw that guy.
He's dead to me.
Right.
And so what happened, the fruit of that is over the years until I heard this
teaching was I failed to make friendships with any depth because I thought you're
just waiting to screw me over. I know how this works. You and Scott and McGookin are in it together.
So that was my heart of stone. I'm just going to, you know, when I meet people, I'm just going to
keep them at arms length. I'm good. This far, you may come and know more. And I certainly will not
open my heart in vulnerability. So have you forgiven him or do you want me to lead you through prayer?
I forgive. I forgive. Scott McGookin. No, this was one of the things I prayed through in Toronto,
And I was like, oh my gosh, that's that's crazy.
Do you have one?
- Well, I have a thing where I didn't realize
it was a heart of stone at the time,
but I was, I've told this story on the podcast before,
but it was after my first husband had left.
It was after my first husband had left.

So probably eight years after he'd left.
And I was on this beach in Prince Edward Island,
which was beautiful.
And I was having a time with the Lord.
And the Lord showed me this wall
that I had built around my life.
And he said, when you know, he said,
when your first husband left,
I mean, he called him by name,
'cause he knew his name,
but I'm not saying him the podcast, obviously.
He said, when your first husband left,
he said, "You built a wall."
so hard and so fast because you just didn't think you could survive another loss.
And he said, the problem is you've kept all of us out. And he showed me myself in the turret
of a castle. -Wow. Surrounded by stones.
-Surrounded by stones. But I didn't leave myself a door or a window or anything to get out.
And I built it up and it was way, way above my head. There was no way of getting out of this thing.
And so the Lord showed me that.
And I, I knew it at that point.
I was like, Oh, wow.
I've, I've formed a heart of stone.
So, um, you know, the Lord in his kindness, of course, also shows you the way out of those things.
Right.
He's so good.
Yeah.
Imagine if you hadn't repented of building that heart of stone and then I met you.
Well, I literally met you for the first time a week later.
I know, but that's what I'm saying.
Imagine you hadn't.
Yeah.
I wouldn't have blinded to this glory.
right, the body of a Greek god and you know all that. I mean, I would have, I would have
missed it all.
I'm glad you prayed through that. I remember being a little boy and I remember coming home
from I guess preschool was probably nursery, nursery in Scotland preschool in North America.
 Remember, is that actually
what's called the emperor's new clothes?
Was this just an excuse so that everybody runs around naked?
I wasn't homeschooled in Canada.
And so I had to draw something from this book, you know, where the emperor is naked,
but he's so arrogant and vain that everyone's telling him he looks amazing in the suit.
You know the story? You're familiar with that? Yes.
Yeah. So I draw, I draw basically a picture of the king on his big parade,
and I was very impressed because I draw him naked.
I run home as little kids I want to do to show my mommy and daddy.
And when I showed my dad the picture, he pointed to my correctly anatomically
drawn king. It's not all you're thinking. And my dad pointed to the nipples that I had
drawn, I'd drawn two little nipples on this king. And my dad, just in Jovial Jessett, well,
what are those? But I misinterpreted what he was asking. I interpreted it as I'd done
something wrong, felt tremendous shame. And I remember kind of leaving the room, my face
flush and going to my room. And I remember coaching myself, you never show anybody your
achievements again. Never let anybody see your achievements. And that was my heart of stone
developing in that little thing where I'd learned a lesson, I'm closing down my heart,
I no longer want to be seen for any achievements in case I'm rejected.
Yeah.
And that's really difficult because when you grow up and God has a heart to actually honor you and
display you to the world for His glory, you're dying inside because you don't want anybody to
see what you've done for fear of rejection. So that was another fun thing that has been
dealt with over the years. So now I get to enjoy being me. I now get to enjoy being
celebrated. Now I get to enjoy being loved, which I couldn't do before. It's just this
barrier.
Yeah. I think sometimes too, you'll have a heart of stone in a certain area. So you
You might not be seeing evidence of a heart of stone in every area of your life.
You might have some really healthy relationships.
You might have something that is going really well, but then there's spots where you just
hit this toughness.
Right.
It's that your heart is stony rather than completely turned to stone.

The second is like it, love your neighbors yourself.
You've got a couple of problems there.
If not all of your heart is online,
you can't actually love the Lord your God with all of it.
If the stony parts of it, if the area is where like,
you know what, Lord, I'm just gonna manage this part of my heart.
It's secure.
I've got some barbed wire around this bad boy.
I'm good.
Lord, like, actually that's a part I wanna be able to love.
And if that is a stony heart, you can't love yourself well,
which means everybody around you suffers.
And then there's the really famous verse
that our anonymous listener was referring to,
Ezekiel 36 verse 26 is this,
it's a promise, I will give you a new heart
and put a new spirit within you.
I will remove from you your heart of stone
and give you a heart of flesh.
And so the promise is life in the Holy Spirit
is a soft, tender, lush heart,
this heart of flesh that can feel the love of God,
that can feel the love of other people
and is never designed to be hardened,
But unfortunately, when we face pain or when we face crisis,
because the heart is a slow learner,
rather than bringing that pain to the Lord,
is it Lord?
I have an AOE that that's stung.
We tend to harden our heart and keep people out,
which is not the liquid going for the season.
- And what's so wonderful about that verse is he says,
"I will take your heart of stone
"and I will give you art of flesh."
- Right.
- So it's literally just being able to go, okay, Father,
I recognize when, you know, Alan read that list
or you may have heard this teaching before,
I recognize that I have a heart of stone
or I have stony parts of my heart
where I am my sole protector of that area.
And your promise is that you'll give me a heart of flesh.
And so I'm giving you permission to begin that process.
And, you know, sometimes it's in an instant
and sometimes he wants to talk to you about some stuff
and unravel some stuff that your heart has believed
your heart is learned. But he promises to do it.  It's not that
there's no way out. There's absolutely a way out. It's asking the father to come in.
Right. So what do you do? If you're recognizing, "Oh, I have some of the fruits of a stony
What does somebody who's listening to this do to actually access the heart of flesh that
the Lord's already given them?
Well I think you start by just saying, "Okay Lord, I acknowledge that it's there."
And start to have a conversation with God about why it's there.
Lord, could you show me when this started forming?
Because usually it's when you're fairly young.
Right.
Well not always.
In both our examples we give when we're older.
Yeah.
And just start to have a discussion about, okay, Lord, like, you know, in the midst of that situation, who can you forgive?
Where did you take control in IE decide you were going to protect your own heart and then and then reverse that decision, right?
So Father recognize that I tried to take control in this moment and protect my heart because it was just so painful.
But I'd actually like to give this to you and trust that you're going to bring healing that you will protect my heart.
you know that you can work through this situation and it might be that he highlights several situations to you it might just be one.
But you just invite the Holy Spirit into the process and have a discussion with him about what he wants to talk to you about that area.
Yeah and usually it goes by identifying that you have a heartstone asking the Lord for revelation from where you got it.
And it was usually a hurt. So you repent of making that choice to harden your heart.
Typically you have to forgive the person that hurt you. And then usually it's just saying,
okay, Lord, I'm going to choose to take down this stony area of my heart. And then the fun begins
because you get to walk out in life and asking the Holy Spirit to teach you a new pattern,
not where you retreat or pull away, but where you actually keep being vulnerable and staying
connected in relationships, even if they get a little bit rocky.
Yeah. I also think sometimes it's helpful and I don't think all the time, but sometimes
I ask the Lord, can you show me what this robbed for me? Because I think sometimes we
don't realize that the way that we chose to live life after a hurtful episode actually
has created an entire scenario that didn't need to be there. And so if we can actually
have the courage to say, Father, would you show me what this having a heart of son in
this area has robbed from me, then you can actually do a little work with the Lord on
that too.
It's a great motivator.
Yeah.
It also says in the scriptures, if you catch a thief, he has to pay you sevenfold.
Yeah.
So there is something about seeing what was stolen from you and going, "Hey, I want that
back."
And that's another way to get abundance in your life.
Yeah.
So there you go.
That's our brief introduction to a heart of stone.
I hope that was helpful, anonymous question-asker.
If you have any more questions about that, please feel free to ask us by going to alananagio.com/ask.
Given that we're on a roll of answering questions, Rebecca wrote in and she asked us this.
Well, first of all, I love this.
She's an Alan A.J.
You're my clean up dishes and car ride companion.
So thank you.
So funny because that's exactly when I listen to podcasts when I'm doing the dishes or when
I'm in the car on my own because you don't like the podcasts I listen to.
No, because you listen to people with nasley voices who you listen to it on like a speed
that is not natural.
It's not natural.
Okay.
Enough, enough with the Scottish accent.
So Rebecca asked this question.
She said three years ago, God gave me a picture of my husband, who was then a teacher doing
something completely different, told me it would be three years.
And I started hearing and seeing the word Nashville everywhere.
I kept that quiet and stewarded it until the Lord eventually released me to tell my husband
about it.
This year, my husband had no peace about renewing his teaching contract and we find ourselves
on a new adventure as he moves on to something new.
The funny thing, we're at three years.
These last few months, the Lord has spoken to him about the same things that God spoke
to me about three years ago.
My question is this, why does God seem to communicate things to me first?
I've heard it said, "It's so the woman can keep peace in the home for the children,
but I'm not sure about this."
That's not it.
Can you give insight into God's timing of telling one partner first?
Thanks for your weekly encouragement.
I love listening to the banter, wisdom and teaching you guys share, keep it up.
So we have a very similar dynamic in our marriage that more often than God tends to tell you
things before He tends to tell me that there have been rare occasions when that's been
the opposite.
But the question still stands.
Why is it that God tells one partner of the relationship before another?
Gosh, I don't even know if I know that.
I would say maybe it depends on whose heart would be most open to hearing it at that time.
Right.
So I would say in most of the ones where I've heard first, I'm probably also asking first,
where you in those seasons were more sort of bogged down isn't the right word,
but focused on what needed to happen today. Does that make sense?
Yeah, and I think also sometimes you've needed more time to process so you get a head start on it.
Oh, I need way more time to process. If God says go, you'll just be like, "Go, yeah!"
And I'm like, "Wait, what?" You know, so...
So he's kind to your kind of play and gives you a couple of years head start to process
That's it.
And adjust your heart.
But sometimes it's the reverse.
Like God had told you about moving house
way before he told me.
- Yeah.
- And I think part of that was
so you could pray and just intercede.
- Yeah.
- And but what I loved is you never put pressure on me.
You never told me,
I've been thinking about this forever.
- No.
- So that when the Lord, but if you think about it,
I mean the Lord just told me one night as I was going to bed.
I mean, to this day I assume it was the Lord.
It was like, now is a good time to sell your house.
Imagine if you hadn't had that warning.
And as I wake up in the morning, "Hey, last night as I went to bed, I think the Lord told me we shouldn't sell our house.
So I'm going to put it in the market."
So in his kindness, he tells you in advance.
Yes.
I think sometimes it's about confirmation too.
So Rebecca, imagine the Lord hadn't told you that.
And one day your husband comes home and just says, "Ah, I think I'm going to just ditch this whole teaching thing.
You know the whole thing I went to school for and is my professional trade."
And this seems a bit random, but I think I'm moving to Nashville.
Like it's nice that you got a heads up on that so that you could prepare your heart
for that moving.
I don't know if there's a.
So there's probably like hundreds of different reasons why God would do that.
But you can't just say that women are awesome and that's why.
Well, the thing is women are awesome.
But I'm not sure that's not always the women that here first.
I was just being funny.
No, but women are also not.
So that's the point that needs to be reinforced.
Well, I think what I love about our relationship is we are both leading
are marriage together, both leading our family. Sometimes you get the revelation,
sometimes I get the revelation, but whatever we do, we don't move until both of us have peace
about it. So I guess what we're saying, Rebecca, is we don't really know, but we love your story
because we can relate to it hugely. And it sounds like you were really wise that you
didn't. I've seen horrible manipulation in marriages where people are like, but I heard the Lord say,
and I'm like, yeah, you may well have, but let every matter be established by two or three witnesses.
Yeah, so just write it down date it write it down in your journal and then leave it alone good
Yeah, all right anything in our closing thoughts a G. Jones. Well, I did have the thought of
I'm not sure if we have mentioned in the last couple weeks that the school
Applications to the school would be closing on June 15th
The phone we have not said that yeah
So if you are praying about or thinking about joining us for the School of Supernatural Life,
either year one or coming back and doing year two with us,
your applications need to be complete, including all of your references and everything by June 15th.
And every year we get people who are like, "Oh, I missed the deadline. Please don't be one of those people."
Yeah, because then you have to wait till next year.
Right. So June 15th is your deadline. It's fast approaching. If you're thinking about doing it,
now is a great time to pray, ask the Lord for some confirmations and take a step out and start
the application process. We also have our source conference coming up in a couple of weeks.

This is the conference for you were super excited about all of the speakers at the conference are members of grace and other experts in their field.
And it's going to be very short workshop style with plenty of opportunity to ask questions we'd love you to come join us and if you do if you're an out of town guest please come up and say hi to a jn I would love it when we get to meet people.
and it's so fun. Yeah, it's great. So please don't be shy. Come up. We're very friendly. Usually.
We like to think we are. We hope we are. It depends on our last eight.
But that's probably true. But you can find more information about that at grace center dot us
slash source. And as always, we'll put everything we've talked about this week in the show notes.
Hey, I just thought of something great. If you're coming up to meet us for the first time and
and you're not sure if we're hungry, just come bringing a snack.
But make sure it's a ketogenic snack.
Okay.
So high and fat, moderate protein, really low corporate grades.
Never mind.
Just come and say hi.
Yeah.
All right.
Thank you so much for listening.
It's great to be back.
We'll be back same time, same place next week.


The ITERATION record stores the Iteration option from the Options dialog box, Calculation tab.
Record Data
|
Offset |
Field Name |
Size |
Contents |
|
4 |
fIter |
2 |
=1 if the Iteration option is on |


| 1 | /* | |
| 2 | * Licensed to the Apache Software Foundation (ASF) under one | |
| 3 | * or more contributor license agreements. See the NOTICE file | |
| 4 | * distributed with this work for additional information | |
| 5 | * regarding copyright ownership. The ASF licenses this file | |
| 6 | * to you under the Apache License, Version 2.0 (the | |
| 7 | * "License"); you may not use this file except in compliance | |
| 8 | * with the License. You may obtain a copy of the License at | |
| 9 | * | |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 11 | * | |
| 12 | * Unless required by applicable law or agreed to in writing, | |
| 13 | * software distributed under the License is distributed on an | |
| 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| 15 | * KIND, either express or implied. See the License for the | |
| 16 | * specific language governing permissions and limitations | |
| 17 | * under the License. | |
| 18 | */ | |
| 19 | package org.apache.myfaces.shared.util; | |
| 20 | ||
| 21 | /** A PriorityQueue maintains a partial ordering of its elements such that the | |
| 22 | * least element can always be found in constant time. Put()'s and pop()'s | |
| 23 | * require log(size) time. | |
| 24 | * | |
| 25 | *
NOTE: This class will pre-allocate a full array of | |
| 26 | * length maxSize+1 if instantiated via the | |
| 27 | * {@link #PriorityQueue(int,boolean)} constructor with | |
| 28 | * prepopulate set to true. | |
| 29 | * | |
| 30 | * lucene.internal | |
| 31 | * see org.apache.lucene.util.PriorityQueue | |
| 32 | */ | |
| 33 | public abstract class PriorityQueue<T> | |
| 34 | { | |
| 35 | private int size; | |
| 36 | private final int maxSize; | |
| 37 | private final T[] heap; | |
| 38 | ||
| 39 | public PriorityQueue(int maxSize) | |
| 40 | { | |
| 41 | this(maxSize, true); | |
| 42 | } | |
| 43 | ||
| 44 | @SuppressWarnings("unchecked") | |
| 45 | public PriorityQueue(int maxSize, boolean prepopulate) | |
| 46 | { | |
| 47 | size = 0; | |
| 48 | int heapSize; | |
| 49 |
1
1. <init> : negated conditional → NO_COVERAGE |
if (0 == maxSize) |
| 50 | { | |
| 51 | // We allocate 1 extra to avoid if statement in top() | |
| 52 | heapSize = 2; | |
| 53 | } | |
| 54 | else | |
| 55 | { | |
| 56 |
1
1. <init> : negated conditional → NO_COVERAGE |
if (maxSize == Integer.MAX_VALUE) |
| 57 | { | |
| 58 | // Don't wrap heapSize to -1, in this case, which | |
| 59 | // causes a confusing NegativeArraySizeException. | |
| 60 | // Note that very likely this will simply then hit | |
| 61 | // an OOME, but at least that's more indicative to | |
| 62 | // caller that this values is too big. We don't +1 | |
| 63 | // in this case, but it's very unlikely in practice | |
| 64 | // one will actually insert this many objects into | |
| 65 | // the PQ: | |
| 66 | heapSize = Integer.MAX_VALUE; | |
| 67 | } | |
| 68 | else | |
| 69 | { | |
| 70 | // NOTE: we add +1 because all access to heap is | |
| 71 | // 1-based not 0-based. heap[0] is unused. | |
| 72 |
1
1. <init> : Replaced integer addition with subtraction → NO_COVERAGE |
heapSize = maxSize + 1; |
| 73 | } | |
| 74 | } | |
| 75 | heap = (T[]) new Object[heapSize]; // T is unbounded type, so this unchecked cast works always | |
| 76 | this.maxSize = maxSize; | |
| 77 | ||
| 78 |
1
1. <init> : negated conditional → NO_COVERAGE |
if (prepopulate) |
| 79 | { | |
| 80 | // If sentinel objects are supported, populate the queue with them | |
| 81 | T sentinel = getSentinelObject(); | |
| 82 |
1
1. <init> : negated conditional → NO_COVERAGE |
if (sentinel != null) |
| 83 | { | |
| 84 | heap[1] = sentinel; | |
| 85 |
2
1. <init> : changed conditional boundary → NO_COVERAGE 2. <init> : negated conditional → NO_COVERAGE |
for (int i = 2; i < heap.length; i++) |
| 86 | { | |
| 87 | heap[i] = getSentinelObject(); | |
| 88 | } | |
| 89 | size = maxSize; | |
| 90 | } | |
| 91 | } | |
| 92 | } | |
| 93 | ||
| 94 | /** Determines the ordering of objects in this priority queue. Subclasses | |
| 95 | * must define this one method. | |
| 96 | * @return true iff parameter <tt>a</tt> is less than parameter <tt>b</tt>. | |
| 97 | */ | |
| 98 | protected abstract boolean lessThan(T a, T b); | |
| 99 | ||
| 100 | /** | |
| 101 | * This method can be overridden by extending classes to return a sentinel | |
| 102 | * object which will be used by the {@link PriorityQueue#PriorityQueue(int,boolean)} | |
| 103 | * constructor to fill the queue, so that the code which uses that queue can always | |
| 104 | * assume it's full and only change the top without attempting to insert any new | |
| 105 | * object.
 | |
| 106 | * | |
| 107 | * Those sentinel values should always compare worse than any non-sentinel | |
| 108 | * value (i.e., {@link #lessThan} should always favor the | |
| 109 | * non-sentinel values).
 | |
| 110 | * | |
| 111 | * By default, this method returns false, which means the queue will not be | |
| 112 | * filled with sentinel values. Otherwise, the value returned will be used to | |
| 113 | * pre-populate the queue. Adds sentinel values to the queue.
 | |
| 114 | * | |
| 115 | * If this method is extended to return a non-null value, then the following | |
| 116 | * usage pattern is recommended: | |
| 117 | * | |
| 118 | *  | |
| 119 | * // extends getSentinelObject() to return a non-null value. | |
| 120 | * PriorityQueue<MyObject> pq = new MyQueue<MyObject>(numHits); | |
| 121 | * // save the 'top' element, which is guaranteed to not be null. | |
| 122 | * MyObject pqTop = pq.top(); | |
| 123 | * <...> | |
| 124 | * // now in order to add a new element, which is 'better' than top (after | |
| 125 | * // you've verified it is better), it is as simple as: | |
| 126 | * pqTop.change(). | |
| 127 | * pqTop = pq.updateTop(); | |
| 128 | *  | |
| 129 | * | |
| 130 | * NOTE: if this method returns a non-null value, it will be called by | |
| 131 | * the {@link PriorityQueue#PriorityQueue(int,boolean)} constructor | |
| 132 | * {@link #size()} times, relying on a new object to be returned and will not | |
| 133 | * check if it's null again. Therefore you should ensure any call to this | |
| 134 | * method creates a new instance and behaves consistently, e.g., it cannot | |
| 135 | * return null if it previously returned non-null. | |
| 136 | * | |
| 137 | * @return the sentinel object to use to pre-populate the queue, or null if | |
| 138 | * sentinel objects are not supported. | |
| 139 | */ | |
| 140 | protected T getSentinelObject() | |
| 141 | { | |
| 142 | return null; | |
| 143 | } | |
| 144 | ||
| 145 | /** | |
| 146 | * Adds an Object to a PriorityQueue in log(size) time. If one tries to add | |
| 147 | * more objects than maxSize from initialize an | |
| 148 | * {@link ArrayIndexOutOfBoundsException} is thrown. | |
| 149 | * | |
| 150 | * @return the new 'top' element in the queue. | |
| 151 | */ | |
| 152 | public final T add(T element) | |
| 153 | { | |
| 154 |
1
1. add : Replaced integer addition with subtraction → NO_COVERAGE |
size++; |
| 155 | heap[size] = element; | |
| 156 |
1
1. add : removed call to org/apache/myfaces/shared/util/PriorityQueue::upHeap → NO_COVERAGE |
upHeap(); |
| 157 |
1
1. add : replaced return value with null for org/apache/myfaces/shared/util/PriorityQueue::add → NO_COVERAGE |
return heap[1]; |
| 158 | } | |
| 159 | ||
| 160 | /** | |
| 161 | * Adds an Object to a PriorityQueue in log(size) time. | |
| 162 | * It returns the object (if any) that was | |
| 163 | * dropped off the heap because it was full. This can be | |
| 164 | * the given parameter (in case it is smaller than the | |
| 165 | * full heap's minimum, and couldn't be added), or another | |
| 166 | * object that was previously the smallest value in the | |
| 167 | * heap and now has been replaced by a larger one, or null | |
| 168 | * if the queue wasn't yet full with maxSize elements. | |
| 169 | */ | |
| 170 | public T insertWithOverflow(T element) | |
| 171 | { | |
| 172 |
2
1. insertWithOverflow : changed conditional boundary → NO_COVERAGE 2. insertWithOverflow : negated conditional → NO_COVERAGE |
if (size < maxSize) |
| 173 | { | |
| 174 | add(element); | |
| 175 | return null; | |
| 176 | } | |
| 177 |
3
1. insertWithOverflow : changed conditional boundary → NO_COVERAGE 2. insertWithOverflow : negated conditional → NO_COVERAGE 3. insertWithOverflow : negated conditional → NO_COVERAGE |
else if (size > 0 && !lessThan(element, heap[1])) |
| 178 | { | |
| 179 | T ret = heap[1]; | |
| 180 | heap[1] = element; | |
| 181 | updateTop(); | |
| 182 |
1
1. insertWithOverflow : replaced return value with null for org/apache/myfaces/shared/util/PriorityQueue::insertWithOverflow → NO_COVERAGE |
return ret; |
| 183 | } | |
| 184 | else | |
| 185 | { | |
| 186 |
1
1. insertWithOverflow : replaced return value with null for org/apache/myfaces/shared/util/PriorityQueue::insertWithOverflow → NO_COVERAGE |
return element; |
| 187 | } | |
| 188 | } | |
| 189 | ||
| 190 | /** Returns the least element of the PriorityQueue in constant time. */ | |
| 191 | public final T top() | |
| 192 | { | |
| 193 | // We don't need to check size here: if maxSize is 0, | |
| 194 | // then heap is length 2 array with both entries null. | |
| 195 | // If size is 0 then heap[1] is already null. | |
| 196 |
1
1. top : replaced return value with null for org/apache/myfaces/shared/util/PriorityQueue::top → NO_COVERAGE |
return heap[1]; |
| 197 | } | |
| 198 | ||
| 199 | /** Removes and returns the least element of the PriorityQueue in log(size) | |
| 200 | time. */ | |
| 201 | public final T pop() | |
| 202 | { | |
| 203 |
2
1. pop : changed conditional boundary → NO_COVERAGE 2. pop : negated conditional → NO_COVERAGE |
if (size > 0) |
| 204 | { | |
| 205 | T result = heap[1]; // save first value | |
| 206 | heap[1] = heap[size]; // move last to first | |
| 207 | heap[size] = null; // permit GC of objects | |
| 208 |
1
1. pop : Replaced integer subtraction with addition → NO_COVERAGE |
size--; |
| 209 |
1
1. pop : removed call to org/apache/myfaces/shared/util/PriorityQueue::downHeap → NO_COVERAGE |
downHeap(); // adjust heap |
| 210 |
1
1. pop : replaced return value with null for org/apache/myfaces/shared/util/PriorityQueue::pop → NO_COVERAGE |
return result; |
| 211 | } | |
| 212 | else | |
| 213 | { | |
| 214 | return null; | |
| 215 | } | |
| 216 | } | |
| 217 | ||
| 218 | /** | |
| 219 | * Should be called when the Object at top changes values. Still log(n) worst | |
| 220 | * case, but it's at least twice as fast to | |
| 221 | * | |
| 222 | *
 | |
| 223 | * pq.top().change(); | |
| 224 | * pq.updateTop(); | |
| 225 | *
 | |
| 226 | * | |
| 227 | * instead of | |
| 228 | * | |
| 229 | *
 | |
| 230 | * o = pq.pop(); | |
| 231 | * o.change(); | |
| 232 | * pq.push(o); | |
| 233 | *
 | |
| 234 | * | |
| 235 | * @return the new 'top' element. | |
| 236 | */ | |
| 237 | public final T updateTop() | |
| 238 | { | |
| 239 |
1
1. updateTop : removed call to org/apache/myfaces/shared/util/PriorityQueue::downHeap → NO_COVERAGE |
downHeap(); |
| 240 |
1
1. updateTop : replaced return value with null for org/apache/myfaces/shared/util/PriorityQueue::updateTop → NO_COVERAGE |
return heap[1]; |
| 241 | } | |
| 242 | ||
| 243 | /** Returns the number of elements currently stored in the PriorityQueue. */ | |
| 244 | public final int size() | |
| 245 | { | |
| 246 |
1
1. size : replaced int return with 0 for org/apache/myfaces/shared/util/PriorityQueue::size → NO_COVERAGE |
return size; |
| 247 | } | |
| 248 | ||
| 249 | /** Removes all entries from the PriorityQueue. */ | |
| 250 | public final void clear() | |
| 251 | { | |
| 252 |
3
1. clear : changed conditional boundary → NO_COVERAGE 2. clear : Changed increment from 1 to -1 → NO_COVERAGE 3. clear : negated conditional → NO_COVERAGE |
for (int i = 0; i <= size; i++) |
| 253 | { | |
| 254 | heap[i] = null; | |
| 255 | } | |
| 256 | size = 0; | |
| 257 | } | |
| 258 | ||
| 259 | private final void upHeap() | |
| 260 | { | |
| 261 | int i = size; | |
| 262 | T node = heap[i]; // save bottom node | |
| 263 |
1
1. upHeap : Replaced Unsigned Shift Right with Shift Left → NO_COVERAGE |
int j = i >>> 1; |
| 264 |
3
1. upHeap : changed conditional boundary → NO_COVERAGE 2. upHeap : negated conditional → NO_COVERAGE 3. upHeap : negated conditional → NO_COVERAGE |
while (j > 0 && lessThan(node, heap[j])) |
| 265 | { | |
| 266 | heap[i] = heap[j]; // shift parents down | |
| 267 | i = j; | |
| 268 |
1
1. upHeap : Replaced Unsigned Shift Right with Shift Left → NO_COVERAGE |
j = j >>> 1; |
| 269 | } | |
| 270 | heap[i] = node; // install saved node | |
| 271 | } | |
| 272 | ||
| 273 | private final void downHeap() | |
| 274 | { | |
| 275 | int i = 1; | |
| 276 | T node = heap[i]; // save top node | |
| 277 |
1
1. downHeap : Replaced Shift Left with Shift Right → NO_COVERAGE |
int j = i << 1; // find smaller child |
| 278 |
1
1. downHeap : Replaced integer addition with subtraction → NO_COVERAGE |
int k = j + 1; |
| 279 |
3
1. downHeap : changed conditional boundary → NO_COVERAGE 2. downHeap : negated conditional → NO_COVERAGE 3. downHeap : negated conditional → NO_COVERAGE |
if (k <= size && lessThan(heap[k], heap[j])) |
| 280 | { | |
| 281 | j = k; | |
| 282 | } | |
| 283 |
3
1. downHeap : changed conditional boundary → NO_COVERAGE 2. downHeap : negated conditional → NO_COVERAGE 3. downHeap : negated conditional → NO_COVERAGE |
while (j <= size && lessThan(heap[j], node)) |
| 284 | { | |
| 285 | heap[i] = heap[j]; // shift up child | |
| 286 | i = j; | |
| 287 |
1
1. downHeap : Replaced Shift Left with Shift Right → NO_COVERAGE |
j = i << 1; |
| 288 |
1
1. downHeap : Replaced integer addition with subtraction → NO_COVERAGE |
k = j + 1; |
| 289 |
3
1. downHeap : changed conditional boundary → NO_COVERAGE 2. downHeap : negated conditional → NO_COVERAGE 3. downHeap : negated conditional → NO_COVERAGE |
if (k <= size && lessThan(heap[k], heap[j])) |
| 290 | { | |
| 291 | j = k; | |
| 292 | } | |
| 293 | } | |
| 294 | heap[i] = node; // install saved node | |
| 295 | } | |
| 296 | ||
| 297 | /** This method returns the internal heap array as Object[]. | |
| 298 | * lucene.internal | |
| 299 | */ | |
| 300 | protected final Object[] getHeapArray() | |
| 301 | { | |
| 302 |
1
1. getHeapArray : replaced return value with null for org/apache/myfaces/shared/util/PriorityQueue::getHeapArray → NO_COVERAGE |
return (Object[]) heap; |
| 303 | } | |
| 304 | } | |
Mutations | ||
| 49 |
1.1 |
|
| 56 |
1.1 |
|
| 72 |
1.1 |
|
| 78 |
1.1 |
|
| 82 |
1.1 |
|
| 85 |
1.1 2.2 |
|
| 154 |
1.1 |
|
| 156 |
1.1 |
|
| 157 |
1.1 |
|
| 172 |
1.1 2.2 |
|
| 177 |
1.1 2.2 3.3 |
|
| 182 |
1.1 |
|
| 186 |
1.1 |
|
| 196 |
1.1 |
|
| 203 |
1.1 2.2 |
|
| 208 |
1.1 |
|
| 209 |
1.1 |
|
| 210 |
1.1 |
|
| 239 |
1.1 |
|
| 240 |
1.1 |
|
| 246 |
1.1 |
|
| 252 |
1.1 2.2 3.3 |
|
| 263 |
1.1 |
|
| 264 |
1.1 2.2 3.3 |
|
| 268 |
1.1 |
|
| 277 |
1.1 |
|
| 278 |
1.1 |
|
| 279 |
1.1 2.2 3.3 |
|
| 283 |
1.1 2.2 3.3 |
|
| 287 |
1.1 |
|
| 288 |
1.1 |
|
| 289 |
1.1 2.2 3.3 |
|
| 302 |
1.1 |


Towards declarative touch interactions
This page outlines Slalom, a system with prototype implementation for concisely describing and implementing a class of touch interactions. Various examples demonstrate Slalom's versatility.
Slalom grew out of my previous article on how to use physics simulations to build touch-driven user interfaces. When writing that, I observed that I was writing much of the same code across the examples and that this repetitive, often inflexible code plagues most touch device engineering.
Most touch interactions on today's tablets and smartphones are implemented by writing new code to handle every touch movement, which computes various transforms and updates the application's view tree or the browser's document object model (DOM). The coder needs a reasonable understanding of Newtonian physics to create something that feels good or natural to use. As a result, most apps use only the few touch interactions provided by the operating system: scroll and tap.
Many touch interactions involve the user's dragging a visual object such as a panel, a photo, an icon, a window or any other structural element of the user interface (and the object's moving synchronously under the touch point) and imparting momentum to that object, such that when released the object keeps moving with some momentum. The touch handler that you write will impose some constraints on how and where an object can move, such as constricting it to a single axis and clamping the distance it can travel. If you're implementing a complex interaction, then every time you iterate your idea and want to change something, you have to rewrite a lot of manual, very detailed code.
What if we came up with a system where we just specify how something moves and what the constraints are?
Slalom
Slalom combines the Cassowary linear constraints solver with a minimal physics engine to solve a class of touch interactions declaratively. It has the following components:
- Linear Constraints are used to place objects relative to each other and to restrict how they can move. Slalom uses the Cassowary linear constraint solver which has found a niche in 2D-layout recently (it's the solver used by Apple's AutoLayout and Grid Style Sheets). If we think of a touch interaction as a slot-car game, then the linear constraints let us define the track on which the slot-cars will travel.
For example, this is how we'd use linear constraints to position an image that is wider than its parent view, whose size is often the size of the screen (in essence, you're making a small viewport onto a large photo, showing just a part of the image):
scaledPhotoWidth = (parentHeight / photoHeight) * photoWidth
photo.y = 0
photo.bottom = parentHeight
photo.right = photo.x + scaledPhotoWidth
Note that we did not constrain the photo's x-coordinate. We want that to be unconstrained (or weakly constrained, using Cassowary's constraint priorities) so that we can manipulate the photo.
The image doesn't move when you drag it because we haven't yet set up a manipulator...
- A Manipulator listens for touch events and updates a Cassowary variable in response. The manipulator knows how to use the momentum to create an animation when a touch gesture ends. In our slot-car metaphor, the manipulator is both the hand-held car controller (with accelerator) and car.
To make our image draggable, we would create a manipulator for it like this:
Drag the photo left and right
// Drags in x on the parentElement will change the photo's x coordinate.
context.addManipulator(new Manipulator(photo.x, parentElement, 'x'))
With the above addition, you can drag the image. By default, a manipulator puts momentum into a friction simulation, which is why, after you release the photo, it keeps moving while slowing down.
Notice that you can scroll the photo too far to either side, however, beyond the edges of the viewport. To fix this, we need motion constraints...
- Motion Constraints place limits on how far an object can move or where it can stop. Motion constraints are similar to linear constraints, except they're enforced by physics simulations (typically springs) so that when a variable being controlled by a manipulator violates a motion constraint the object bounces or undertracks the finger. Motion constraints would be like a rubberband stretched across our slot-car track or like a speed bump on the track.
We can add motion constraints to our image example like this:
Drag the photo left and right and release it
// Prevent the photo's left edge from going right of the parent's left edge:
// photo.x <= 0
context.addMotionConstraint(new MotionConstraint(photo.x, '<=', 0))
// Prevent the photo's right edge from going to the left of the parent's right edge:
// photo.right >= parentWidth
context.addMotionConstraint(new MotionConstraint(photo.right, '>=', parentWidth))
I haven't yet written a parser for either the linear constraints or the motion constraints; that's why a motion constraint looks like a JavaScript call and not like an equation.
Check out the source code for this example on GitHub.
Now you can drag and flick the image without its vanishing into the distance.
The above Slalom example describes full-momentum scrolling with just one manipulator and two motion constraints. It handles all of the tricky edge cases, such as when the user starts dragging while the photo is already bouncing on one of the edges, or when the user imparts momentum while in the overdrag. In systems where there are multiple manipulators, Slalom identifies the correct manipulator that is causing a motion constraint violation and applies feedback to it.
More examples
Here are some more examples with links to the source. All require significantly less code and the code is cleaner using Slalom than when using the imperative alternative.
Vertical scrolling lists
Drag these lists vertically
Linear constraints
The list items are 40 pixels tall:
panel[i].bottom = panel[i].y + 40
The list items are stacked vertically in a column, with a 10-pixel gap:
panel[i].y = panel[i-1].bottom + 10
Motion constraints
The first list item can't have a vertical position more than 0 pixels from the origin:
panel[first].y <= 0 spring
The last list item's bottom position can't be higher than the parent height:
panel[last].bottom >= parentHeight spring
Variation (list on right)
In the list variation on the right, we just prevent the boxes from leaving the parent by imposing extra linear constraints:
panel[i] >= panel[i-1].y + 3
panel[i] <= panel[i+1].y - 3
panel[first].y >= 0
panel[last].bottom <= parentHeight
Now our panels stack with a padding of 3 pixels, and the first and last panels don't leave the parent.
Check out the source code for this example on GitHub.
Twitter for iPad
The next example reproduces the old Twitter for iPad panels interface. The second variant introduces some of the non-default properties of motion constraints.
Drag the panels horizontally and release to impart velocity
Notice how these panels animate to be either open or closed
Linear constraints
The left edge of each panel can't go past the left edge of the panel that came before, plus 10 pixels.
panel[i].x > panel[i-1].x + 10
The left edge of each panel can't go past the right edge of the panel that came before.
panel[i].x < panel[i-1].right
Motion constraints
The first panel's left edge is constrained to the left edge, which is 0 pixels. This is a springy motion constraint. Here the motion constraint applies a spring, but you could easily make a motion constraint that makes the panel rebound or that completely stops the motion.
panel[first].left = 0 spring
Variation (lower example)
The second variation adds a motion constraint on the gap between two cards: either the gap is 10 pixels or it's the full panel width, 250 pixels. We also specify that the motion constraint shouldn't be enforced while dragging (overdragCoefficient: 0) and that this motion constraint's animation should keep running even when the constraint is satisfied, which is handy when using underdamped springs. This is the "captive" option.
First, define the gap using a linear constraint:
gap = panel[i].x - panel[i-1].x
Then add a motion constraint on the gap using the "or" operator:
gap = 10px || 250px spring {overdragCoefficient: 0, captive: true}
Check out the source code for this example on GitHub.
Animation using gravity
A manipulator doesn't have to use a friction simulation for the animation it creates after you let go of a drag. Here's an example using gravity instead:
Motion constraints
We only have one motion constraint here, which is that the bottom of the box can't go outside the parent. It's enforced by a slightly underdamped spring (the default) giving our heavy box a soft landing:
box.bottom >= parentHeight spring
Check out the source code for this example on GitHub.
Photo viewer
Another really useful operator for motion constraints is modulo, "%". Here we use a motion constraint that isn't enforced during dragging to ensure that our photo viewer animates to show only one photo. This actually uses a variation of modulo called "adjacent modulo" to prevent the user from flying past many photos with one big high-velocity flick.
Drag the photos horizontally
Motion constraints
We have three motion constraints in this system. The first and last photos can't go away from the edge of the parent (otherwise you could scroll to before the first photo or to after the last photo):
photo[first].x <= 0 spring
photo[last].x >= parentWidth spring
Also, the scroll position must be a multiple of the photo width (plus padding):
scrollPosition %= parentWidth + padding { overdragCoefficient: 0, captive: true }
The scroll position is a variable that's added to every photo's x coordinate.
Check out the source code for this example on GitHub.
Scaling like Facebook Paper
In Slalom, we're not limited to just translating objects. If we add a manipulator to the y-coordinate of a box and constrain the bottom of the box, then we can grow and shrink the box. Notice that we're expressing motion constraints on variables that are somehow related to scale but aren't the scale variable. We can do this because Slalom discovers the relationship between two variables by inspecting the Cassowary simplex tableau—this is a huge advantage over a numerical constraint solver where it would be harder to find how two variables relate to each other.
Currently the manipulator consumes all drag events. If it passed on unused drag deltas then we could add a second manipulator to translate the box horizontally, creating something like Facebook's Paper UI.
Drag the image upwards to grow it
We manipulate the box's y-coordinate variable for vertical drags.
Linear constraints
Constrain the aspect ratio of the box (aspect = parentWidth / parentHeight):
box.width = box.height * aspect
Relate the height to the scale:
box.height = scale * parentHeight
Pin the box to the bottom of the screen:
box.bottom = parentHeight
Center the box horizontally:
(box.x + box.width/2) = parentWidth / 2
Motion constraints
The box's width must be greater than 150 pixels. We're really expressing a constraint on the minimum scale, but because we can get the coefficients out of Cassowary, we can write this in terms of the box's width.
box.width >= 150 spring
The box's top mustn't go above the top of the screen. Again, this is really a scale constraint (the scale can't be more than 1.0), but we're expressing it in terms of box.y because that's more natural.
box.y >= 0 spring
Check out the source code for this example on GitHub.
Note that we could tweak the constraints further. For instance, we could make the box go off the bottom when it gets too small instead of shrinking further. So we have a lot of flexibility with this kind of system.
Also note that there's slip! If you drag from the middle of the box, you'll see that the part of the image you grabbed slips out from under your finger. That's because the manipulator is just operating on the box's y coordinate. If we wanted to avoid slip then we'd have to create a new variable when the finger goes down, relate it to y (that is, fingery = box.y - 123 * scale, based on the current scale and finger start position) and then manipulate fingery instead of box.y. This isn't very hard, but the current manipulator code doesn't support it.
iOS notification and control centers
This next example is an implementation of the iOS notification center and control center UIs. The notification center is actually very interesting because it uses a different physical model when coming down (positive gravity) than when going up (anti-gravity). It looks weird if it slows down while going upwards. I was able to do this by creating a custom motion constraint operator that changed its physics model depending on the end point. (For the purposes of this paper, I opted not to implement the arrow buttons within the UIs but it should be straightforward to do so, either outside Slalom or by extending Slalom.)
Drag down from top to show notification drawer; drag up from bottom to show control center
iOS application switcher
This example demonstrates a way to make the iOS application switcher using Slalom. There are two manipulators: one which controls the first app's x-coordinate, and one which controls the first icon's x-coordinate. The icons are offset by half the scroll offset of the apps, so dragging the icons (small squares at bottom) moves the apps (large rectangles at top) twice as fast. Even though we have two manipulators, we still need only two motion constraints.
The real iOS app switcher applies some non-linear translation to the icons (based on velocity?) which I am unable to represent with linear constraints.
Drag horizontally on the "apps" or "icons"
Windows overscroll
In Windows 7, Microsoft implemented touch overscroll by translating the whole window rather than just the content. We can use linear constraints to make this happen too, and we need only one motion constraint (the window should stay where it is) to bounce things back.
Drag the image vertically to scroll
Google Maps details transition
This example implements the complex transitions that occur when the user drags upward within a Google Maps location view. The linear constraints are fairly straightforward, while the motion constraints that prevent the UI's stopping half-way open reflect the complexity of the transitions. The motion constraint is predicated on multiple variables, so I wrote a custom operator to handle it; I'd like to be able to express this more elegantly though, possibly with some kind of a Range type.
Drag upwards on the blue info bar to see more information
Future directions
We can use Slalom to describe a wide variety of touch interactions. There's a lot left to do, however, some involving further research:
- Non-linear constraints are needed for some interfaces (one example is the Chrome for Android tab switcher—the tabs move less when they're at the top) and these can't be expressed with Cassowary. For simple "external" variables with no dependencies it would suffice to provide a non-linear mapping function (and inverse function).
- Manipulators recognize only one gesture currently. I plan to extend the Manipulator class or subdivide it so that it's possible to manipulate multiple variables with one gesture. This would allow the above scaling example to become more like Facebook Paper.
- Various parts of Slalom need better explanation, including the captive flag on the Motion Constraints class.
- Currently there are no state or conditional constraints. To tackle more ambitious interactions, we need a notion of state that enables and modifies constraints, similar to how class names can be used to change CSS properties. Grid Style Sheets handle some of this and manage to avoid feedback loops.
- Currently there is no transition support. Often you want to use a tap to change some value (for example, the iOS notification panel and control center should hide when you tap the arrow buttons). It's also common to want to transition from a resting position to where a touch point (which is moving) will be.
- Slalom could be ported to one of the mobile platforms to ensure it integrates well.
- A parser could be written for linear and motion constraints, once their syntax is defined. I want to do a native port first to identify any syntax or parser changes needed to support integration with a traditional toolkit.
About the author
Ralph Thomas is a critically constrained individual who has spent the past 15 years focused on user interface implementation. A "full-stack" client engineer, Ralph has written high-performance mobile UIs from kernel input drivers, through OpenGL ES-based 2D graphics engines, physics engines and user interface toolkits, up to full applications built on those foundations. Ralph has also contributed performance enhancements to the WebKit project. Follow Ralph on
Twitter or send him
email.


@torproject @HermesCenter @SecureDrop @GlobaLeaks @Mexleaks Hey guys, if you support human privacy, then you might be interested in 2 revolutionary projects: @MyHushTeam just shipped decentralized private messaging lists, and @PirateChain shipped fully private cryptocurren...


Welcome to le pizza
tasty and spicy
Home
ContactUs
MENU Le PIZZA
le pizza our menu consist of small larger and extra large pizzas with variety of topings
our topings include;
peperoni
chickenticka
bacon
onion
beef
cheese
Size
Small
Medium
Large
Crust
Crispy
Stuffed
Glutten free
Toppings
Hawaiian
Exrta c>heese
Pepperoni
Number of pizza(s)
RESET
PLACE ORDER
le pizza 2021


Use the list below to specify special annotations. Interfaces annotated with one of these annotations will be ignored by this inspection.
Use the checkbox below to ignore interfaces that only declare constant fields. Such interfaces my still be usable even without implementations.