Applied Cryptography Engineering
If you’re reading this, you’re probably a red-blooded American programmer with a simmering interest in cryptography. And my guess is your interest came from Bruce Schneier’s Applied Cryptography.
Applied Cryptography is a deservedly famous book that lies somewhere between survey, pop-sci advocacy, and almanac. It taught two generations of software developers everything they know about crypto. It’s literate, readable, and ambitious. What’s not to love?
Just this: as an instruction manual, Applied Cryptography is dreadful. Even Schneier seems to concede the point. This article was written with several goals: to hurry along the process of getting Applied Cryptography off the go-to stack of developer references, to point out the right book to replace it with, and to spell out what you else you need to know even after reading that replacement. Finally, I wrote this as a sort of open letter to Schneier and his co-authors.
Here’s an example of the problem with Applied Cryptography:
If simplicity and speed are your main concerns, ECB is the easiest and fastest mode to use a block cipher. It’s also the weakest. Besides being vulnerable to replay attacks, an algorithm in ECB mode is the easiest to cryptanalyze. I don’t recommend ECB for message encryption.
For encrypting random data, such as other keys, ECB is a good mode to use. Since the data is short and random, none of the shortcomings of ECB matter for this application.
To understand how dangerous this advice is, you need to understand block cipher modes. Most real-world encryption is based on block ciphers AES is a block cipher; so are DES and Blowfish. , which transform fixed-sized inputs into fixed-sized outputs. Since real-world inputs aren’t exactly 8 or 16 bytes wide, ciphers are adapted to them with a block mode.
Of the available block modes, ECB is the simplest to understand. It’s the mode you’d design yourself, the first time you confronted a block cipher: divide the input into blocks, and apply the cipher to each independently. ECB mode is so widespread that we call it “the default mode”.
What Applied Cryptography has to say about ECB technically correct Technically correct: not the best kind of correct in cryptography. at best, and outright wrong at worst. ECB is virtually never safe to use. It probably won’t make your ciphertext “easier to cryptanalyze”. Rather, it’s going to make it decryptable, by an attacker without the key, using a Perl script.
You should own Ferguson and Schneier’s follow-up, Cryptography Engineering (C.E.). Cryptography Engineering, used to be called Practical Cryptography. The two books are practically identical. Written partly in penance, the new book deftly handles material the older book stumbles over. C.E. wants to teach you the right way to work with cryptography without wasting time on GOST and El Gamal.
C.E. takes pains to teach which mode to use, raising the specter of ECB only to exorcise it before weighing the pros and cons of CBC and CTR. The book takes most of a chapter guiding readers to safe conclusions.
By contrast, along with a chart on the page that follows it, the excerpt above constitutes much of Applied Cryptography’s instruction on block modes. The book offers detailed coverage of DES, Lucifer, Madryga, NEWDES, FEAL, REDOC, LOKI, Khufu, RC2, IDEA, MMB, CA-1.1, Skipjack, GOST, CAST, Blowfish, SAFER, 3WAY, CRAB, SXAL8, and RC5. You will never need to know any of these. In fact, you’ll almost never “choose” ciphers at all: you’re going to choose AES, or the finalists of crypto competitions. But you’ll often need to choose cipher modes.
The biggest problem with Applied Cryptography isn’t the technical content, but the tone. It can’t decide whether to be a tour guide or a handbook. It’s fantastic pop science, but a dangerously broken textbook. Ever found an implementation of Needham-Schroeder using IDEA in ECB mode with digital signatures built on SNEFRU? The designer read Applied Cryptography. You can smell cryptosystems written by the book’s enthusiasts.
The tone of C.E. is sharply different. After reading it, you’re: (To their credit, Ferguson and Schneier seem equally intent on convincing people not to build bespoke crypto in the first place.)
- going to use AES,
- in CBC or CTR mode,
- probably with random IVs,
- with randomness from a real CSPRNG,
- using HMAC-SHA2 to authenticate.
The best security books are the ones you can “read backwards” to learn how to attack systems instead of defending them. Cheswick and Bellovin’s Firewalls & Internet Security is like that; so is The Art Of Software Security Assessment. The first time I read C.E., I had the same feeling.
So I like Cryptography Engineering.
But of course, the important question about a book on crypto isn’t whether I like it.
Instead, you want to ask: could a competent developer read it, and, (…to the limit of what you could do with a book, of course) retaining everything, stand a chance at building a survivable cryptosystem?
I’m not sure. There are gaps in C.E.’s coverage. I’d like to lay those out now, in the hopes that a new edition (presumably to be called “Modern Cryptographic Design” so as to confuse us further) might spill some well-deserved ink on them.
2001-2003 was the tail end of the cryptographic dark ages, so let’s be clear that the book I’m criticizing was an achievement for its time. And its still the best guidebook to building crypto! That’s why I think it’s worth the time to dissect. “It’s all love”, as Stringer Bell might say.
Look at the highlight reel since the book was written: There were other advances, but C.E. did a good job presaging many of them.
Vaudenay’s CBC padding oracle attack, published just as the book was being written, racked up kills across pretty much every major web framework, including ASP.NET and Java.
Gregory Bard’s chosen-plaintext attack on TLS with predictable IVs was published and became the basis for Duong and Rizzo’s BEAST.
Osvik, Tromer, Percival, Bernstein, and a cast of thousands published the microarchitectural side channels, including cache timings that work over networks and local cache and branch buffer timings that threaten cloud hosted crypto.
Bleichenbacher’s e=3 signature bug in RSA validation broke Firefox.
Duong and Rizzo published the CRIME attack on TLS compression.
These attacks helped contribute new knowledge to the field. But many more attacks were published which, though known to the literature when C.E. was written, re-weighted the literature. A good example is the Playstation 3, which fell to repeated k-values in DSA signing.
Number Theoretic Crypto
C.E.’s coverage of RSA is weak enough that I think someone needs to write an article clarifying it. Nobody gets RSA right.
The thing to know about RSA is that it behaves differently from algorithms like AES. RSA ciphertexts are “just numbers” in a way that isn’t true with AES, and that makes RSA attacks subtler.
Lamentably, and despite the obvious effort Ferguson and Schneier sink into the math, they don’t nail the usage basics the way they do for AES. Encryption with RSA is counterintuitive: you need to go out of your way to feed it data that is as meaningless as possible. That’s the opposite of how a developer would think to use RSA. The authors don’t seem to expect readers to actually deploy RSA. If wishes were fishes!
A corrective article on C.E.’s RSA/DH coverage (or a new edition of C.E.) should teach developers:
About OAEP (for encryption) and PSS (for signing), the two safe ways to use RSA, and about the flaws of the default, PKCS #1 v1.5.
How numeric parameters are exploited in actual attacks (not just how to generate them safely).
How to safely validate RSA parameters and, in particular, how to safely generate and validate primes — a source of real-world RSA attacks.
A more conservative selection of parameters; for instance, it’s probably time to bury e=3 RSA.
Lastly: designers can trade flexibility for reduced complexity, and that’s usually a win. For instance, a crypto protocol can (and often should) hardcode parameters rather than negotiating them. Little mention is made of that opportunity in C.E. Too bad. The conservative approach is again counterintuitive to developers, to whom hardcoding anything is like simony.
Missing Basic Algorithms
The authors take the general tack of not describing constructions they don’t like. The problem is, patented or not, some of the excluded schemes see widespread use.
SRP is a great example. SRP establishes keys between a client and a server using only a password, and authenticates that password without revealing it. That’s simply too useful a capability for developers not to use. Being morally similar to DH, SRP inherits many of its pitfalls: we routinely defeat several SRP implementations by coercing servers to zero out key computations.
A more troublesome omission is DSA. DSA is a cryptographic signing algorithm; it’s used to authenticate binaries, or to sign Diffie Hellman exchanges for secure channels with forward secrecy. It’s both popular and very tricky, as the authors of the Playstation 3 signing code might tell you. DSA seems like a case where even if you decide not to cover it, you’d probably want to add strongly-worded language about how dangerous it is to play with. No such warning is to be found in this book.
Elliptic Curve
Elliptic curve cryptography (ECC) is similar in spirit to basic number-theoretic cryptography, but in a different, harder mathematical group. ECC keys are smaller, offering better security per key bit spent.
C.E. entire coverage of ECC is the single clause “such as those used in elliptic curve” (and note that clause isn’t even specific to ECC; zero points awarded).
ECC is going to replace RSA within the next 10 years. New systems probably shouldn’t use RSA at all. The basic finite field groups used by RSA and Diffie Hellman are looking less and less safe (see Joux, or Eran Tromer’s hypothesized 1024-bit RSA cracker with its measly $1MM price tag).
Conventional wisdom has ECC being notoriously tricky. And, for extra fun, ECC constructions inherit the implementation traps of DH and DSA. Developers need lots of help with it. It’s downright weird for the best modern crypto book to exclude ECC.
Encrypt-then-MAC
Imagine being lectured You always need to do both, encrypt and MAC, and a grateful nation thanks Ferguson and Schneier for making that clear. by Wallace Shawn’s character from The Princess Bride on the phlogiston theory of combustion. That’s a little bit like what it’s like to learn the proper order of encryption and authentication from C.E. We know today that you want to encrypt, then authenticate; to do otherwise is to invoke Moxie Marlinspike’s Cryptographic Doom Principle. But even though encrypt-then-MAC had been proven secure when C.E. was first written, the authors aren’t so sure, and attempt to “teach the controversy”.
For the flavor of how improvident that coverage turns out to be, see HTTPS/TLS. Every modern TLS stack offers AES encryption. But many of the largest, savviest sites in the world prefer instead RC4, a comically broken stream cipher obsoleted half a decade before Ferguson and Schneier’s book was printed. Why? Because HTTPS/TLS is from the phlogiston era of cryptography and uses AES in a MAC-then-encrypt construction, resulting in an intractable timing vulnerability.
Stream Encryption
A very careful reader can probably deploy stream encryption from C.E. recommendations and survive. But the coverage is imperfect; for instance:
As with OFB mode, you must make absolutely sure never to reuse a single key/nonce combination. This is a disadvantage that is often mentioned for CTR, but CBC has exactly the same problem. If you use the same IV twice, you start leaking data about the plaintexts. CBC is a bit more robust, as it is more likely to limit the amount of information leaked.
The equivalence drawn between CTR nonces and CBC IVs is crazymaking. CBC does not have exactly the same problem as CTR; it has a very different problem. CTR nonces must never repeat. CBC IVs must not be predictable.
C.E. lacks any coverage on native stream ciphers, such as the ones judged by the eSTREAM competition. There’s a rich literature on native stream ciphers, and C.E. doesn’t help developers make use of it.
The book also misses an opportunity to teach combined authenticated encryption (AEAD) modes. The AEAD modes combine stream cipher modes with MAC constructions that developers don’t have to think about. They’re a little magical, in the same sense that ABS brakes were magical in the 1970s.
While C.E. discusses some of the AEAD modes, the emphasis is on their downsides. The authors would clearly rather have developers bolt on HMAC-SHA2 manually, which is a shame; the track record on that construction isn’t great.
Key Derivation
The sad fact is that developers think cryptographic keys are a kind of password. Crypto code in the field is littered with hardcoded ASCII strings used as keys. If you’re going to know just one thing about cryptography, make it this: crypto keys are cryptographically random.
But users must be able to interact with cryptosystems. As a rule, they can’t remember 128 bit random numbers. And so real cryptosystems will occasionally need to accept passphrases.
Meanwhile, the single most widespread application of cryptography in modern software development is password storage. Virtually every online application in the world deals with this problem, and most of them apply crypto (badly).
When C.E. was written In the past several years, the literature on KDFs has taken on much greater importance as GPU programming has begun demonstrating how bad weak KDFs are. The best illustration of that are the GPU password crackers, which largely defeat the “salted hash” constructions most applications use to protect passwords. , there were two mainstream key derivation functions (KDFs) available for transmuting passphrases into crypto keys: bcrypt, based on the authors’ own Blowfish algorithm, and PBKDF2, the hash-based PKCS #5 v2.0 standard. Both constructions have the advantage of incurring a very small time penalty from legitimate users while extracting an enormous penalty from attackers. In the years since the book was written, we’ve also learned about “memory-hard” KDFs, of which scrypt is the seminal example, which are designed to be difficult to scale attacks against even with custom silicon.
Defense of user passwords is important enough to merit coverage in the book. Every developer needs to know how. But the topic is even more important in the more complicated cryptosystems C.E. contemplates. A real-world cryptosystem can get every other detail right and still manage to be merely as strong as a 1990s Unix password file if its keys come from a poor KDF.
 Attackers exploit covert channels to leak messages across security boundaries (for instance in a pattern of specially-encoded DNS queries.) . Side channels are the flip side of covert channels; they’re actual signaling performed unexpectedly.
One of the first things every software developer learns how to do is comparing strings. Developers don’t think before writing code to do string compares; many of them have known how since they were 11 years old. But the way you learned to compare strings when you were 11 doesn’t work with crypto secrets. Because the algorithm stops at the first mismatched character, it leaks timing information.
Timing attacks Here’s the exploit: Build a string you want to forge. Giving it an all-zeroes HMAC. Then send thousands of variants of the string and HMAC with the first byte randomized, and measuring each variant for the time it takes to get a response. The variant that takes the longest on average is probably the correct first byte. Lather, rinse, repeat. are pernicious, but they aren’t the most commonly exploited side channels. That honor belongs to protocol errors.
The best example of a protocol error side channel is the padding oracle. Ciphertexts are typically padded to block boundaries. Receivers check the padding after decryption and strip it off. If the padding is invalid, the system coughs up an error, and with it the ability to decrypt messages without keys. The validity of the padding tips the attacker off about the plaintext value of a selected byte.
There are other error oracles besides the block padding oracle. Several affect RSA. Variants of the attack affect some stream cipher modes. An error oracle coupled with known plaintext broke SIM card encryption. A book on safe crypto should give special coverage to error and exception handling.
The most counterintuitive example of a side channel attack I know of is Duong and Rizzo’s CRIME attack on TLS. Ask Applied Cryptography about compression and it’ll tell you:
Using a data compression algorithm together with an encryption algorithm makes sense for two reasons: Cryptanalysis relies on exploiting redundancies in the plaintext; compressing a file before encryption reduces these redundancies. Encryption is time-consuming; compressing a file before encryption speeds up the entire process.
It turns out, no. The length of the messages in a cryptosystem is also a potential side channel. If attackers control plaintext, they can submit inputs that can be correlated with message lengths to probe for the existence of string prefixes; longer messages tell the attacker their guess was wrong, while shorter messages indicate a redundancy that compression could exploit, betraying the presence of the prefix. Attackers can decrypt whole messages this way.
Want more examples? Consider cloud hosting, probably the de facto standard deployment environment for most new crypto. Cloud applications share metal with strangers, and thus attackers, who will gladly spend $40 to co-host themselves with a target.
It turns out that the microarchitecture of a typical CPU (that is, the design details of that CPU that aren’t immediately evident in the instruction set) is riddled with side channels. An attacker on the same machine as their victim can write a program that constantly monitors the CPU caches, producing a trace that can be correlated with crypto operations the attacker requests of that victim. It’s hard even to know where all these caches are; for instance, modern CPU performance relies on branch prediction, which uses its own obscure caches to hold branch targets.
Cryptography Engineering provides some background information on side channels, then throws up its hands and declares side channels to be an “arms race” without providing in-depth coverage. This would be a nit if the specifics of side channels didn’t have so many specific and durable consequences:
Developers should choose mature crypto libraries that have been audited for side channel defects.
Developers should be extraordinarily cautious both with error messages and, more importantly, with handling exceptional cases in message decryption.
Developers shouldn’t compress plaintext before encrypting.
Developers should be wary of hosting crypto code on shared hardware, or of offering sensitive crypto tools on platforms which might also host attacker code even at lower privilege levels.
Simply put, side channels want their own chapter in C.E.
Browsers, TLS, and The Rest
Finally, some points that are less about criticizing C.E. and more about establishing how useful a new edition could be:
HTTPS/TLS Frankly, Schneier doesn’t have much of an excuse for not covering TLS; he’s the co-author, with Dave Wagner, of one of the better-known security analyses of SSL 3.0 (the basis for TLS). Word of advice: get Wagner to co-author the next version! is the cryptosystem developers are most likely to come into contact with. It’s not foolproof; you have to make choices to deploy it. What ciphersuites should you use? What is perfect forward secrecy and what’s the impact of using it? How does session resumption work and what impact does it have on your systems security?
I am beating my own dead hobbyhorse by saying this, but I also think a discussion of the perils of browser Javascript cryptography would be worthwhile. It’s a bad idea that is unlikely to get less popular on its own.
Even if the authors are unwilling to delve into Javascript, the interactions between HTTPS and the HTTP Same Origin Policy (the most important security policy on the Internet) should be worth at least a couple of paragraphs.
I obviously couldn’t have written a better book than Cryptography Engineering. I doubt many other people could either. While we could use more books about attacking crypto, we need one good one, kept up to date, on building crypto. Cryptography Engineering should be that book.
If this stuff is interesting to you, here’s some additional reading:
It should be unlawful to use RSA without reading 20 Years Of Attacks On RSA; Boneh’s paper won’t get you up to date, but it’ll give you a good idea what you’re up against.
A good starting point on encrypt-then-MAC is Read everything else on Marlinspike’s and Langley’s blogs, too. (again) Moxie Marlinspike’s Cryptographic Doom Principle. To see the interplay between cryptographic doom and side channels, read Adam Langley’s Lucky 13 Attacks on TLS-CBC; pay attention towards the end at what a cast-iron bitch it is to try to lock down badly-designed constructions against side channels.
Watch Nate Lawson’s talk on exploiting timing attacks. Too many developers think of side channels as an abstract threat. And too many of the ones that don’t see timing attacks everywhere, even where they aren’t.
Ross Anderson and Serge Vaudanay’s Minding Your P’s And Q’s is the best introduction to parameter flaws in number-theoretic crypto like RSA and DSA.
For a scary story to tell young developers before they go to sleep at night, read Tromer and Osvik’s AES cache timing paper, and then reconsider cloud crypto.
Finally, if you’re interested in ECC crypto, the best place to start is Bernstein, Lange, and Schwabe’s NaCl library. NaCl was carefully designed so that developers can pick it up and use it today without creating low-level crypto vulnerabilities.
Thanks to Marsh Ray, Nate Lawson, Matthew Green, Sean Devlin, Tony Arcieri, and Hans Nielsen for reading drafts of this.


|
Human SacrificeWhat better way to show God you appreciate him than to squander his most precious gift, life, in a miasma of ruthlessness and gore?In addition to justifying Crusades, Witch Trials and Wars, this theological breakthrough is also the main justification for the time-honored practice of human sacrifice. Sacrifices are perhaps the most ancient method to honor deities, going right back to the earliest ancestor-worship religions of Egypt and Mesopotamia. The original theory was "everyone needs to eat," including the ancestor-gods. So priests would dutifully leave food sitting out for the gods, who would never actually eat the food. It was embarrassing to have all this food sitting around, so the priests eventually began burning, cutting or bleeding the sacrifices instead of just leaving them out to rot. As time went on, the original theory of feeding the gods was forgotten and the practice became a ritual which was essentially meaningless to its participants (like the use of chrism in a Christian baptism, just for example). The first sacrifices consisted of food and meat, but the emphasis slowly shifted to animal sacrifice and from there to blood sacrifice. Once you've moved past the notion that you're actually feeding the gods, an animal hierarchy kicks in, so a goat is a better sacrifice than a chicken, and a cow is better than a goat. So what would be the bestest sacrifice of all? Eureka! There is some controversy about when the practice of human sacrifice actually began. Some argue for a prehistoric origin, but the evidence for these claims unfortunately tend to be 10,000-year-old bodies found in Northern European bogs, which leaves room for a not-insignificant amount of interpretation. There's a better than even chance those bodies were the result of early executions or ritual killings, among all of which there is an admittedly fine line. Human sacrifice is more or less defined here as the ritual killing of a person to appease or coerce a god figure. The scholars don't really agree on where to draw the lines, but the bloodthirsty bastards have a marked tendency to designate just about any ancient death a "human sacrifice" for no defensible reason. Virtually every culture and region has a history of human sacrifice, from the Romans to the Celts to the Aztecs... Hell, even the Dutch. The ancient Greeks sacrificed humans to the goddess Artemis, including the famous sacrifice by Agamemnon of his favored daughter. This tale was later likely plagiarized by the Jews as the story of Abraham, who is ordered by Yahweh to sacrifice his beloved son, Isaac. In the Hebrew version, however, the whole gig is just a trick to see if Abraham would really go through with it. God has a good laugh at Abraham's expense, and everyone lives happily ever after. In the Middle East, the traditional human sacrifice was usually accomplished with a blade, and the blood of the sacrificed individual was collected as part of the ritual. This approach was positively humane compared to some other cultures. Methodology could vary dramatically depending on the geographic regions. In Northern Europe, victims were frequently overkilled, much like Rasputin, with corpses found stabbed in the back, strangled, with their heads bashed in and finally drowned in a bogs. The Celts are famously rumored to have burned victims to death in a giant wicker man, inspiring the 1973 thriller of that name. There were (and to an extent, still are) many different traditions of human sacrifice practiced on the continent of Africa. One especially grisly form, known as "muti" killing, involves dismemberment and decapitation, the removal of vertebrae and/or genitals, and draining of blood from the corpse. The overall effect of the practice is more or less to bring good fortune for the sacrificer by taking it away from the sacrificee. Removed parts may be further dissected for specific uses. Voudoun has often been associated with human sacrifice in the popular imagination, but inaccurately so. Santeria suffers the same PR problem, but we're not willing to stake our lives on the unfairness of that charge (nor are we willing to tempt fate by attempting an infiltration for the sake of knowledge). Various Hindu cults enjoyed a nice sacrifice every now and again, and some still do. The sacrifices were intended to honor the goddess Shakti, an incongruously maternal figure who showed her motherly love by asking her followers to gut and bleed each other. The cult of Kali would routinely sacrifice virgins (both boys and girls) by cutting off their hands, breasts and feet. Anti-Semites frequently cite an old libel that the blood of Gentile children is used to make matzo bread. Anyone with experience breadmaking will tell you that the rapid coagulation of blood makes it pretty useless as a baking ingredient, but the whispered slurs recur every few decades nevertheless. In Prague, the rumors were so pernicious that a mystical warrior was reputedly summoned through the power of Jewish magic to banish them once and for all. (This PR campaign failed when the warrior instead embarked on a murderous rampage.) Human sacrifice in the Western Hemisphere continued much later than it did in Europe, Asia and the Middle East. One find unearthed hundreds of corpses of fishermen in Peru who had been killed around the 14th century in the ancient equivalent of execution style — bound, on their knees and stabbed through the heart. While all these variations provide fun for the whole family, it's really the Incas and Aztecs of South America who elevated human sacrifice into the art form we all know and love today. The Incas sacrificed women and children using several different methods, but the Aztecs were the ones who really had a sense of style.  The classic example of Aztec sacrifice is immortalized in the image of a robed priest cutting the beating heart out of a living chest at the very apex of a pyramid, blood gleaming in the tropical sun as it ran down the massive stone structure's step-tiers. The Mayans also employed this method -- perhaps to help the odds of their apocalypse-predicting calendar -- but they also had more commonplace rituals in which priests would bleed themselves sub-fatally over a sacred location. Because the languages of indigenous South American tribes have mostly been lost, it's difficult to really determine what they were thinking about the rationale for these sacrifices, but they appear to have some astronomical significance (as almost everything associated with a pyramid eventually will). Some scholars believe the sacrifices were intended to ensure that the sun would keep on coming back every morning. It's understandable that this would be something of a priority, but entirely unclear what logic was used to connect the whole cut-out-the-beating-heart thing got to the whole sunrise-sunset thing. Human sacrifice is still practiced all over the world today, but more discreetly than in the past. You don't hear much about still-beating hearts, but then the Incans and Mayans mysteriously disappeared several hundred years ago. The Shakti and Kali cults in India are still quite vibrant. Although they usually carry out faux sacrifices using animals, or effigies made from flour or pumpkins, the occasional human still slips through the system. In some of the more chaos-and-poverty stricken areas of African, periodic outbreaks reveal a lingering human sacrifice problem there as well, particularly in village settings in West Africa as well as areas so decimated by war that human life is invariably cheapened. Not that this strictly a Third World problem. Murders with overtones of sacrifice or "muti" ritual trappings pop up in places like London, New York, New Orleans and L.A. more frequently than you'd expect. Interestingly, the civil rights movement has not stepped in to defend the right of worshippers to sacrifice as they choose, despite the fact that the West's most popular religion is based around what was arguably the most spectacular human sacrifice in history.
Double standard? Well, maybe, but it does let the virgins sleep at night.
|


Company Name
About this App
This app is for information purposes only. The existence of a complaint is not evidence of wrongdoing.
This app shows a user how many complaints have been filed against a particular business.
About the Washington State Attorney General
The Washington State Attorney General's Office handles multiple complaints that consumers file against private businesses. The office further investigates the claim in order to resolve the consumer's issue. Some complaints may result in the consumer receiving compensation. Other complaints may result in a favorable decision toward the business.
If enough complaints are filed against the same business, the Attorney General has the authority to bring legal action in the State of Washington, but does not have authority to represent an individual consumer.
Due to the high volume of complaints received by the attorney general, and the nature of a complaint not requiring the cooperation of a business, some complaints and/or inquiries can be more efficiently handled by an agency that specializes in the specific business or area of complaint.


{% include 'header.html' %}
Change Password - Mian: 16S rRNA data analysis, visualization, and feature selection tools
{% include 'navigation.html' %}
Change Password
{% if success == 1 %}
Success
Password has been successfully changed
{% endif %} {% if error == 1 %}
Could Not Change Password
Please try again
{% endif %}
Original Password
New Password
Submit
{% include 'footer-full.html' %}


Notebooks
Story: People fear the darkness's rain
People fear the darkness's rain
Title
People fear the darkness's rain
Collection
Summary
The people fear the rain that comes at night – it had come and flooded Victoria West, which was situated in a ravine. They make a large (male) fire in an effort to disperse the rain-clouds that gather overhead.
Comments
1) See also Flood at Victoria West, 2) This story is found in Book VIII-23
Contributors
|han≠kass'o (Klein Jantje) (VIII)
Date
24 November 1878 (told on or about)
Categories
The Rain and Rain's water, History (personal), Custom and daily life
Keywords
rain (people fear the darkness's) , rain (which comes angrily) , rain (its clouds) , rain (dispersing its clouds) , rain (that comes at night is not 'nice') , rain (at Victoria West) , rain (its actions when angry) , rain (that thunders and 'lightens') , rain (a male fire is made to disperse or 'divide' it) , rain-clouds (dispersing) , rain-clouds (a fire made to disperse or divide) , rain-clouds (of the darkness's rain) , fire (a male one is made to disperse the rain) , fire (made by people who fear the darkness's rain) , thunder (and darkness's rain) , lightning (and darkness's rain) , place (Victoria West and the darkness's rain that flooded there)
Story Pages
8010v-8011v


A set of rich gestures for desktop and mobile.
Supported events: * down * up * Same target as down, provides the element under the pointer with the relatedTarget property * trackstart * track * Same target as down * trackend * Same target as down, provides the element under the pointer with the relatedTarget property * tap * Targets the nearest common ancestor of down and up.relatedTarget * Can be prevented by calling any gesture event’s preventTap function * pinch * hold * holdpulse * release
Not yet implemented: * flick * pinchstart * pinchend
More info — https://groups.google.com/forum/#!topic/polymer-dev/ba4aDyOozm8
The element, or a parent of the element, should have the touch-action="none"
attribute.
javascript
PolymerGestures.addEventListener(element, eventname, handler, capture);
bash
mkdir gestures
cd gestures
git clone git@github.com:Polymer/tools.git
git clone git@github.com:Polymer/polymer-gestures.git
cd polymer-gestures
npm install
grunt
bash
cd gestures
python -m SimpleHTTPServer
open http://localhost:8000/polymer-gestures/samples/simple/
More info — http://www.polymer-project.org/resources/tooling-strategy.html


VQ Labs takes over the technology for you so that you can focus on business development. We provide you with a marketplace solution that will get you on the market quickly, collect feedback and validate your business idea. Not only do we deliver you a solution, but we also team up and share our years of experience in Sharing Economy solutions with you.
Easy to customize
No developers needed. No coding skills needed. Build and easily manage your brand through the Admin dashboard.
Fast time to market
We encourage and enable entrepreneurs to go to market, explore their customers and validate their ideas instead of spending time on building a product that might not work in the end.
Cost-effective
Start with the core, spend little. We understand your needs and demands and will always offer you the best-suited solution.


Built with from Grav and Hugo
A gokrazy package corresponds to a Go package (which in turn is part of a Go module). The gokr-packer program is a wrapper around go install.
gokr-packer
go install
To use the local version of a repository, use the replace directive of go.mod.
go.mod


OP,
Here are some suggestions as to storing the number.
*
Store a decimal digit in one char variable.
This is the easiest way , totally inefficient but if you want to do very few calculations and don't want to use a library , go for this way.
Arithematics is much easier this way , just add , subtract the corresponding digits with carry.
Multiplication can be done just like the way we are taught in schools.
42
x 21
-----
42
81X
-----
852
|
Converting to a string is straightforward , for each digit , add char('0'+digit) to the string.
*
Store ⌊log10(28*sizeof(std::size_t))⌋ digits in one std::size_t variable.
In this format , you store the maximum possible number of digits in a word.
e.g. if sizeof(size_t) is 4 , you store ⌊log
10(2
8*4)⌋ = 9 digits per word.
Operations similar to above but we have a word at a time than digit.
When you convert to string , add each digit from a word by taking char('0'+ word (mod 10) ) , then divide by 10 in each iteration. But , remember to add padding zeroes.
*
Store in binary format.
This is the way libraries like GMP et al. store numbers internally.Not Recommended.


LOGIN
alternative login
Username:
Password:
Different type of label coupling
Username:
Password:
E-mail:


Apple 2014–Present
#} {##}
{#
#}
{# My current role uniquely balances form and function. I’ve designed prototypes for executive review, built custom tooling for designers, and engineered web and native applications across various platforms. Most of my work has launched as interactive web experiences on apple.com.
#} {#I’ve also spearheaded collaborative efforts with designers while leading large teams of talented developers.
#} {#


alternative-vote-web
Number of winners:
Notes:
- Please follow the instructions to create a valid .csv file.
- If you get duplicate winners your data set likely has issues. Try adding another winner as a temporary fix.
- The script won't return a list of winners if the number of winners you select results in a perfect tie or exceeds the number of candidates.
- Multiple winners are displayed in order of rank.
- View source and license and report issues here.


Note: The measure of %ILI has lost its original meaning with the arrival of COVID-19 and the resulting changes in healthcare seeking behavior. ILI Nearby is no longer being maintained, and many of the underlying data sources may no longer be working. We are only leaving it running as others may be relying on it. For COVID-19 tracking, please see COVIDcast. For further questions on ILI Nearby, please contact us.
US National
HHS Regions
Census Regions
States
Zoom In
Zoom Out
{STATES_NOTE}
{NATIONAL_REGIONS_NOTES}
{STATES_NOTE}
{NATIONAL_REGIONS_NOTES}


‘Everyone Was in the Loop’
Listen and subscribe to our podcast from your mobile device: Via Apple Podcasts | Via Spotify | Via Stitcher
In explosive testimony, Gordon D. Sondland, the United States ambassador to the European Union, directly implicated President Trump, Vice President Mike Pence, Secretary of State Mike Pompeo and other top administration officials in what he said was a push for a “clear quid pro quo” with the president of Ukraine. But during questioning, things got complicated.
“The Latest” is a new series on the impeachment inquiry, from the team behind “The Daily.” For more information, visit nytimes.com/thedaily .
On today’s episode:
- Julie Hirschfeld Davis, the congressional editor of The New York Times.
Background reading:
- As striking as his account was, Mr. Sondland appeared on Wednesday as a highly problematic witness.
- Here are five takeaways from Mr. Sondland’s testimony.
Tune in, and tell us what you think. Email us at<EMAIL_ADDRESS>. Follow Michael Barbaro on Twitter: @mikiebarb . And if you’re interested in advertising with “The Daily,” write to us at<EMAIL_ADDRESS>.
“The Daily” is made by Theo Balcomb, Andy Mills, Lisa Tobin, Rachel Quester, Lynsea Garrison, Annie Brown, Clare Toeniskoetter, Paige Cowett, Michael Simon Johnson, Brad Fisher, Larissa Anderson, Wendy Dorr, Chris Wood, Jessica Cheung, Alexandra Leigh Young, Jonathan Wolfe, Lisa Chow, Eric Krupke, Marc Georges, Luke Vander Ploeg, Adizah Eghan, Kelly Prime, Julia Longoria, Sindhu Gnanasambandan, Jazmín Aguilera, M.J. Davis Lin, Dan Powell, Austin Mitchell, Sayre Quevedo, Monika Evstatieva and Neena Pathak. Our theme music is by Jim Brunberg and Ben Landsverk of Wonderly. Special thanks to Sam Dolnick, Mikayla Bouchard, Stella Tan, Julia Simon and Lauren Jackson.


Adaptive mesh refinement (AMR) algorithms¶
The basic adaptive refinment strategy used in AMRClaw is to refine on logically rectangular patches. A single Level 1 grid covers the entire domain (usually — if it is too large it may be split into multiple Level 1 grids). Some rectangular portions of this grid are covered by Level 2 grids refined by some refinement factor R in each direction (anisotropic refinement is now allowed too — see Specifying AMRClaw run-time parameters in setrun.py). Regions of each Level 2 grid may be covered by Level 3 grids, that are further refined (perhaps with a different refinement ratio). And so on.
For the hyperbolic solvers in Clawpack the time step is limited by the Courant number (see Section cfl), and so if the spatial resolution is refined by a factor of R in each direction then the time step will generally have to be reduced by a factor R as well.
The AMR code thus proceeds as follows:
In each time step on the Level 1 grid(s), the values in all grid cells (including those covered by finer grids) are advanced one time step. Before this time step is taken, ghost cells around the boundary of the full computational domain are filled based on the boundary conditions specified in the library routine bcNamr.f (where N is the number of space dimensions). Check the Makefile of an application to see where this file can be found.
After a step on the Level 1 grid, R time steps must be taken on each Level 2 grid, where R denotes the desired refinement ratio in time from Level 1 to Level 2.
For each of these time step, ghost cell values must be filled in around all boundaries of each Level 2 grid. This procedure is defined below in Ghost cells and boundary conditions for AMR.
After taking R steps on Level 2 grids, values on the Level 1 grid are updated to be consistent with the Level 2 grids. Any cell on Level 1 that is covered by a Level 2 grid has its q value replaced by the average of all the Level 2 grid cells lying within this cell. This gives a cell average that should be a better approximation to the true cell average than the original value.
The updating just described can lead to a change in the total mass calculated on the Level 1 grid. In order to restore global conservation, it is necessary to do a conservation fix up. (To be described...)
This style of AMR is often called Berger-Oliger-Colella adaptive refinement, after the papers of Berger and Oliger [BergerOliger84] and [BergerColella89].
The Fortran code in $CLAW/amrclaw is based on code originally written by Marsha Berger for gas dynamics, and merged in Clawpack in the early days of Clawpack development by MJB and RJL. The algorithms used in AMRClaw are described more fully in [BergerLeVeque98].
Ghost cells and boundary conditions for AMR¶
Consider a Level k > 1 grid for which we need ghost cells all around the boundary at the start of each time step on this level. The same procedure is used at other levels.
- Some Level k grids will be adjacent to other Level k grids and so any ghost cell that is equivalent to a Level k cell on some other grid has values copied from this this grid.
- Some ghost cells will be in the interior of the full computational domain but in regions where there is no adjacent Level k grid. There will be a Level k-1 grid covering that region, however. In this case the ghost cells are obtained by space-time interpolation from values on the Level k-1 grid.
- Some ghost cells will lie outside the full computational domain, where the boundary of the Level k grid lies along the boundary of the full domain. For these cells the subroutine bcNamr (where N is the number of space dimensions) is used to fill ghost cell values with the proper user-specified boundary conditions, unless periodic boundary conditions are specified (see below).
For many standard boundary conditions it is not necessary for the user to do anything beyond setting appropriate parameters in setrun.py (see Specifying classic run-time parameters in setrun.py). Only if user-specified boundary conditions are specified is it necessary to modify the library routine bcNamr.f (after copying to your application directory so as not to damage the library version, and modifying the Makefile to point to the new version).
There some differences between the bcNamr.f routine and the bcN.f routine used for the single-grid classic Clawpack routines (which are found in $CLAW/classic/src/Nd/bcN.f). In particular, it is necessary to check whether a ghost cell actually lies outside the full computational domain and only set ghost cell values for those that do. It should be clear how to do this from the library version of the routine.
If periodic boundary conditions are specified, this is handled by the AMRClaw software along with all internal boundaries, rather than in bcNamr.f. With AMR it is not so easy to apply periodic boundary conditions as it is in the case of a single grid, since it is necessary to determine whether there is a grid at the same refinement level at the opposite side of the domain to copy ghost cell values from, and if so which grid and what index corresponds to the desired location.
Choosing and initializing finer grids¶
Every few time steps on the coarsest level it is generally necessary to revise modify the regions of refinement at all levels, for example to follow a propagating shock wave. This is done by
- Flagging cells that need refinement according to some criteria.
- Clustering the flagged cells into rectangular patches that will form the new set of grids at the next higher level.
- Creating the new grids and initializing the values of q and also any aux arrays for each new grid.
Clustering is done using and algorithm developed by Berger and Rigoutsis [BergerRigoutsis91] that finds a nonoverlapping set of rectangles that cover all flagged points and balances the following conflicting goals:
- Cover as few points as possible that are not flagged, to reduce the number of grid cells that must be advanced in each time step.
- Create as few new grids as possible, to minimize the overhead associated with filling ghost cells and doing the conservation fix-up around edges of grids.
A parameter cutoff can be specified (see Specifying AMRClaw run-time parameters in setrun.py) to control clustering. The algorithm will choose the grids in such a way that at least this fraction of all the grid points in all the new grids will be in cells that were flagged as needing refinement. Usually cutoff = 0.7 is used, so at least 70% of all grid cells in a computation are in regions where they are really needed.
Initializing the new grids at Level k+1 is done as follows:
- At points where there was already a Level k+1 grid present, this value is copied over.
- At points where there was not previously a Level k+1 grid, bilinear interpolation is performed based on the Level k grids.
Flagging cells for refinement¶
The user can control the criteria used for flagging cells for refinement.
See AMR refinement criteria for details.


| Package | flare.vis.data |
| Class | public class Tree |
| Inheritance | Tree Data flash.events.EventDispatcher |
| Property | Defined by | ||
|---|---|---|---|
| directedEdges : Boolean The default directedness of new edges.
| Data | ||
| edges : DataList
The collection of EdgeSprites.
| Data | ||
| length : int The total number of items (nodes and edges) in the data.
| Data | ||
| nodes : DataList
The collection of NodeSprites.
| Data | ||
| root : NodeSprite
[write-only]
Sets the root node of this tree.
| Tree | ||
| tree : Tree
This property simply points back to this object.
| Tree | ||
| treeEdgeWeight : Function The edge weight function for computing a minimum spanning tree.
| Data | ||
| treePolicy : String The spanning tree creation policy.
| Data |
| Method | Defined by | ||
|---|---|---|---|
|
Add a node to the tree.
| Tree | ||
|
Adds the given edge as a child edge between a node already
in the tree and another node not yet in the tree.
| Tree | ||
|
Add an edge to this data set.
| Data | ||
|
addEdgeFor(source:NodeSprite, target:NodeSprite, directed:Object = null, data:Object = null):EdgeSprite
Creates a new edge between the given nodes and adds it to the
data collection.
| Data | ||
|
Adds a new data group.
| Data | ||
|
addNode(d:Object = null):NodeSprite
Adds a node to this data collection.
| Data | ||
|
Creates and returns a new root NodeSprite for the tree.
| Tree | ||
|
clear():void
Clears the tree, removing all nodes and edges.
| Tree | ||
|
contains(d:DataSprite):Boolean
Indicates if this Data object contains the input DataSprite.
| Data | ||
|
countLeaves():int
Counts the number of leaf nodes in the tree.
| Tree | ||
|
createEdges(sortBy:* = null, groupBy:Boolean = null, ignoreExistingEdges:* = false):void
Generates edges for this data collection that connect the nodes
according to the input properties.
| Data | ||
|
[static]
Creates a new Data instance from an array of tuples.
| Data | ||
|
[static]
Creates a new Data instance from a data set.
| Data | ||
|
Retrieves the data group with the given name.
| Data | ||
|
remove(d:DataSprite):Boolean
Removes a DataSprite (node or edge) from this data collection.
| Data | ||
|
removeEdge(e:EdgeSprite):Boolean
Removes an edge from tree tree, removing the entire
subtree rooted at the child node adjacent to the edge.
| Tree | ||
|
removeGroup(name:String):DataList
Removes a data group.
| Data | ||
|
removeNode(n:NodeSprite):Boolean
Removes a node from the tree, removing the entire
subtree rooted at that node.
| Tree | ||
|
swapToRoot(n:NodeSprite):void
Continuously swaps the given node with its parent node
until it is the root.
| Tree | ||
|
swapWithParent(n:NodeSprite):void
Swaps the given node with its parent node.
| Tree | ||
|
visit(v:Function, group:String = null, filter:Boolean = null, reverse:* = false):Boolean
Visit items, invoking a function on all visited elements.
| Data |
| Method | Defined by | ||
|---|---|---|---|
|
addDescendants(n:NodeSprite):void
Registers all tree descendants with this Tree instance.
| Tree | ||
|
Internal function for creating a new edge.
| Data | ||
|
newNode(data:Object):NodeSprite
Internal function for creating a new node.
| Data |
| root | property |
root:NodeSprite
[write-only]Sets the root node of this tree. This property can only be set when the tree does not yet have a root node.
Implementation public function set root(value:NodeSprite):void
| tree | property |
tree:Tree
[read-write]This property simply points back to this object.
Implementation public function get tree():Tree
public function set tree(value:Tree):void
| addChild | () | method |
public function addChild(p:NodeSprite, c:NodeSprite = null):NodeSprite
Add a node to the tree. If the child node argument is null, a new NodeSprite will be created. A new EdgeSprite connecting the nodes will be created. Returns the new child node.
Parametersp:NodeSprite — the parent node
|
|
c:NodeSprite (default = null ) — the child node. If null, a new child node is created.
|
NodeSprite —
the new child node
|
| addChildEdge | () | method |
public function addChildEdge(e:EdgeSprite):EdgeSprite
Adds the given edge as a child edge between a node already in the tree and another node not yet in the tree.
Parameterse:EdgeSprite — the edge to add to the tree
|
EdgeSprite —
the newly added edge
|
| addDescendants | () | method |
protected function addDescendants(n:NodeSprite):void
Registers all tree descendants with this Tree instance.
Parametersn:NodeSprite — a sub-tree root that has already been added to this Tree
|
| addRoot | () | method |
public function addRoot():NodeSprite
Creates and returns a new root NodeSprite for the tree. If the tree already has a root, this method throws an error.
ReturnsNodeSprite —
the newly added root
|
| clear | () | method |
public override function clear():void
Clears the tree, removing all nodes and edges.
| countLeaves | () | method |
public function countLeaves():int
Counts the number of leaf nodes in the tree.
Returnsint — the number of leaf nodes
|
| removeEdge | () | method |
public override function removeEdge(e:EdgeSprite):Boolean
Removes an edge from tree tree, removing the entire subtree rooted at the child node adjacent to the edge.
Parameterse:EdgeSprite — the edge to remove from the tree
|
Boolean — true if the edge was successfully removed, false otherwise
|
| removeNode | () | method |
public override function removeNode(n:NodeSprite):Boolean
Removes a node from the tree, removing the entire subtree rooted at that node.
Parametersn:NodeSprite — the node to remove
|
Boolean — true if the node was successfully removed, false otherwise
|
| swapToRoot | () | method |
public function swapToRoot(n:NodeSprite):void
Continuously swaps the given node with its parent node until it is the root.
WARNING: this method causes connecting edges to be reconfigured. If this tree is a spanning tree, this can cause havoc.
Parametersn:NodeSprite — the node to swap with its parent until it becomes the root
|
| swapWithParent | () | method |
public function swapWithParent(n:NodeSprite):void
Swaps the given node with its parent node.
WARNING: this method causes connecting edges to be reconfigured. If this tree is a spanning tree, this can cause havoc.
Parametersn:NodeSprite — the node to swap with its parent
|


|
2004-2005
Season Team Awards Team Death, 3rd Place, Iowa Gold National Tournament Team Death, 3rd Place, Kentucky Silver National Tournament Team Pestilence, 8th Place, Kentucky Silver National Tournament Team Pestilence 4th Place, Loras Regional Tournament Team Death, 5th Place, Loras Regional Tournament |


This website gives you ability to download whole library or specified amount of the newest songs from bronytunes.com.
I know that this site looks awful, to be honest it's the most awful site that I've ever made, but what's important it works :)
This webpage starts downloading songs one-by-one to ten-by-one from bronytunes and if you have well set up browser, it should save them to your hard disk. Instruction how to set up browser bellow.

It is:
You can set it up in every browser but I recomend do it in Firefox v.10 (it's really old version, I know but it's good because it has no plugins for mp3). You can download it here.
After the instalation, we still need to set up few thinks in browser settings, so open browser and its settings.
On the first tab called "General" set up your destination folder - I recommend new, empty folder in your music library. You can also untick "show the download window...", but if you do that you'll have to open this window manually everytime you'll want to check download state.
Now go on to tab "Content" and add this domain to exceptions in pop-ups (or just completly turn on pop-ups).
In tab "applications" find everything connected with mp3 files - eq. "MPEG layer 3 (audio/mpeg)" or "MPEG layer 3 (audio/x-mpeg)" and choose the option "save file".
At the end turn off auto updating your browser - tab "advanced", tab "update".
Now you're done. Now click here to test your settings - if file start downloading, everything is set up correct.


--- layout: post title: My take published: true date: 2010-09-01 categories: [] posterous_url: http://blog.hungerandthirstdesign.com/post/1047833975/my-take posterous_slug: post/1047833975/my-take ---
I think it was deliberate, although part of me is pretty sure it wasn’t. Not because Apple needs the press, but partly because it comes in a fairly vicious time for Apple and developers after the 3.3.1 clause in the SDK EULA. Maybe something to keep the general public happy and interested. So for what it’s worth, Apple, keep your stuff under control. Those kinda shenanigans melt servers with blog posts, feeds, and basically clog the interwebs. Just.Don’t.Do.It.
Better yet, what if this is another Gizmodo hoax? Faux-iPhone from China maybe? Some kickass design work from the graphics design department?
Companies or services (or whatever you call a group like the one behind Gizmodo) run on a business model that revolves solely around numbers. They’re really in the business of creating content around their ads. Ads is really the major way a blogging or news service makes its revenue, especially on the web with a non-subscriber based model. So it makes sense they would go after the biggest news story possible. I can’t blame them. Sure they probably could have done it better, sure they probably screwed Powell over.
The way I see it though, any company driven by “followers” rather than the quality of the services they can provide is already losing. What’s the point?  I’m not even sure I’d call what Gizmodo does a “service”. Its putting out content. Really low quality (and probably unedited) content… What’s more is when they find a story like this they talk it to death. Somebody kill it already.
The point is, if we lose site of service quality for numbers, we end up like McDonalds: Everywhere serving zillions but its not a place you’re proud to work. Its not something you’re proud to say you participated in.
I do have to say, the hardliner Apple geeks love ripping on Gizzie and its really funny to see. Settle down yo.
Checkout the new site design! Shoot any comments to me at @plukevdh on Twitter.


ENGLISH
German
Dutch
French
Italian
Japanese
Russian
USA
EUR
INR
GBP
CAD
AUD
JPY
Free Shipping For All Orders Of $200
Track Your Order
Newsletter
0
0
No Product In The Cart
0
I agree with the terms and conditions
VIEW CART
HOME
Default Shop
Organic
Simple Shop
Technology
Winery
Furniture
Fashion Classic
Fashion Modern
Fashion with Side
Jewelry
SHOP
BLOG
BLOG LAYOUT
With Sidebar
List View
Masonry View
POST LAYOUT
With Sidebar
Default Post
Backstretch Image
ABOUT
CONTACT
Checkout
Home
/
Checkout
Have a coupon?
Click here to enter your code
Subtotal
$
0
Shipping
Caculated at next step
Total
USD
0
Information
Shipping
Payment
Contact information
Already have an account?
Log in
Email or mobile phone number
*
Enter an email or mobile phone number
Keep me up to date on news and exclusive offers
Shipping address
Last Name (optional)
First Name
*
Enter a first name
Address
*
Enter an address
Apartment, suite, etc. (optional)
City
*
Enter a city
Postal Code
*
Enter a ZIP/ postal code
Save this information for next time
Continue to shipping


{% load i18n %}
{% if detail.type == 'case' and not module_brief.requires_case_details %}
{% if module.module_type == 'shadow' %}
{% blocktrans %}
This menu either doesn't have a source menu or has a source menu that doesn't require a case list.
Changes made here will have no effect.
{% endblocktrans %}
{% else %}
{% blocktrans %}
None of the forms in this menu require a case list.
Changes made here will have no effect until you either:
use forms that require a case list, such as forms that update or close a case, or


Introduction
In this first part we want to investigate in which dimensions the controversy is developed, which topics are used to support the different positions and have an initial overview on the general theme of milk and the possible arguments related to it.
To answer, we started asking in the more common searching engine on the net, Google Search. We use just one query as much generic as possible, to have, as results, all the possible points of views on the controversy and see which one is more relevant and discussed.


Specifies a fixed list of remote datacenters to forward the query to if there are no healthy nodes in the local datacenter. Datacenters are queried in the order given in the list. If this option is combined with NearestN, then the NearestN queries will be performed first, followed by the list given by Datacenters. A given datacenter will only be queried one time during a failover, even if it is selected by both NearestN and is listed in Datacenters.
reference to this, for fluency
Set the TTL duration when query results are served over DNS. If this is specified, it will take precedence over any Consul agent-specific configuration.
reference to this, for fluency
Set ID of the query, always generated by Consul
reference to this, for fluency
Set a list of user-defined key/value pairs that will be used for filtering the query results to nodes with the given metadata values present.
reference to this, for fluency
Set an optional friendly name that can be used to execute a query instead of using its ID
reference to this, for fluency
Specifies that the query will be forwarded to up to NearestN other datacenters based on their estimated network round trip time using Network Coordinates from the WAN gossip pool. The median round trip time from the server handling the query to the servers in the remote datacenter is used to determine the priority.
reference to this, for fluency
Specifies the behavior of the query's health check filtering. If this is set to false, the results will include nodes with checks in the passing as well as the warning states. If this is set to true, only nodes with checks in the passing state will be returned.
reference to this, for fluency
Set the name of the service to query
reference to this, for fluency
Set the ID of an existing session. This provides a way to automatically remove a prepared query when the given session is invalidated. If not given the prepared query must be manually removed when no longer needed.
reference to this, for fluency
Set a list of service tags to filter the query results. For a service to pass the tag filter
it must have all of the required tags, and none of the excluded tags (prefixed with !
).
reference to this, for fluency
Set regular expression which is used to extract fields from the entire name, once this template is selected.
reference to this, for fluency
The template type, which must be {@code name_prefix_match}. This means that the template will apply to any query lookup with a name whose prefix matches the Name field of the template.
reference to this, for fluency
Set the ACL token to use each time the query is executed. This allows queries to be executed by clients with lesser or even no ACL Token, so this should be used with care.
reference to this, for fluency
Specifies a fixed list of remote datacenters to forward the query to if there are no healthy nodes in the local datacenter. Datacenters are queried in the order given in the list. If this option is combined with NearestN, then the NearestN queries will be performed first, followed by the list given by Datacenters. A given datacenter will only be queried one time during a failover, even if it is selected by both NearestN and is listed in Datacenters.
the list of remote datacenters
reference to this, for fluency
Set the TTL duration when query results are served over DNS. If this is specified, it will take precedence over any Consul agent-specific configuration.
the TTL duration
reference to this, for fluency
Set ID of the query, always generated by Consul
ID of the query
reference to this, for fluency
Set a list of user-defined key/value pairs that will be used for filtering the query results to nodes with the given metadata values present.
list of key/value pairs
reference to this, for fluency
Set an optional friendly name that can be used to execute a query instead of using its ID
name of the query
reference to this, for fluency
Specifies that the query will be forwarded to up to NearestN other datacenters based on their estimated network round trip time using Network Coordinates from the WAN gossip pool. The median round trip time from the server handling the query to the servers in the remote datacenter is used to determine the priority.
number of nearest datacenters to query
reference to this, for fluency
Specifies the behavior of the query's health check filtering. If this is set to false, the results will include nodes with checks in the passing as well as the warning states. If this is set to true, only nodes with checks in the passing state will be returned.
the passing flag
reference to this, for fluency
Set the name of the service to query
service name
reference to this, for fluency
Set the ID of an existing session. This provides a way to automatically remove a prepared query when the given session is invalidated. If not given the prepared query must be manually removed when no longer needed.
id of session
reference to this, for fluency
Set a list of service tags to filter the query results. For a service to pass the tag filter
it must have all of the required tags, and none of the excluded tags (prefixed with !
).
list of service tags
reference to this, for fluency
Set regular expression which is used to extract fields from the entire name, once this template is selected.
a regular expression
reference to this, for fluency
The template type, which must be {@code name_prefix_match}. This means that the template will apply to any query lookup with a name whose prefix matches the Name field of the template.
the query type
reference to this, for fluency
Set the ACL token to use each time the query is executed. This allows queries to be executed by clients with lesser or even no ACL Token, so this should be used with care.
the ACL token
reference to this, for fluency
Generated using TypeDoc
Defines a prepared query.
Ruslan Sennov


Unused Functions
ComponentID
Size
Locations
Transitively Hidden
Singletons
ComponentID
Size
Locations
Transitively Hidden
Singletons
Green nodes have
visibility ("hidden")
. Red nodes have anything else.
source


|
||||||||||
| PREV NEXT | FRAMES NO FRAMES |
| Packages that use FeatureMap | |
|---|---|
| gate | This package contains the public interface to the GATE Java API. |
| gate.annotation | |
| gate.config | |
| gate.corpora | |
| gate.creole | |
| gate.gui | |
| gate.gui.annedit | |
| gate.gui.docview | |
| gate.jape | |
| gate.jape.functest | |
| gate.util | |
| gate.util.spring |
| Uses of FeatureMap in gate |
|---|
| Methods in gate that return FeatureMap | |
|---|---|
static FeatureMap |
Factory.duplicate(FeatureMap fm,
Factory.DuplicationContext ctx)
Construct a feature map that is a copy of the one provided except that any Resource values in the map are replaced by their
duplicates. |
static FeatureMap |
Utils.featureMap(Object... values)
Create a feature map from an array of values. |
FeatureMap |
DocumentFormat.getFeatures()
Get the feature set |
static FeatureMap |
Factory.newFeatureMap()
Create a new FeatureMap. |
static FeatureMap |
Utils.toFeatureMap(Map<?,?> map)
Create a feature map from an existing map (typically one that does not itself implement FeatureMap). |
| Methods in gate with parameters of type FeatureMap | |
|---|---|
void |
AnnotationSet.add(Integer id,
Long start,
Long end,
String type,
FeatureMap features)
Create and add an annotation with a pre-existing ID. |
Integer |
SimpleAnnotationSet.add(Long start,
Long end,
String type,
FeatureMap features)
Create and add an annotation and return its id. |
Integer |
SimpleAnnotationSet.add(Node start,
Node end,
String type,
FeatureMap features)
Create and add an annotation with pre-existing nodes, and return its id. |
static Resource |
Factory.createResource(String resourceClassName,
FeatureMap parameterValues)
Create an instance of a resource, and return it. |
static Resource |
Factory.createResource(String resourceClassName,
FeatureMap parameterValues,
FeatureMap features)
Create an instance of a resource, and return it. |
static Resource |
Factory.createResource(String resourceClassName,
FeatureMap parameterValues,
FeatureMap features,
String resourceName)
Create an instance of a resource, and return it. |
static FeatureMap |
Factory.duplicate(FeatureMap fm,
Factory.DuplicationContext ctx)
Construct a feature map that is a copy of the one provided except that any Resource values in the map are replaced by their
duplicates. |
AnnotationSet |
AnnotationSet.get(String type,
FeatureMap constraints)
Select annotations by type and feature values. |
AnnotationSet |
AnnotationSet.get(String type,
FeatureMap constraints,
Long offset)
Select annotations by type, features and offset. |
AnnotationGraph |
AnnotationGraph.getAnnotations(String type,
FeatureMap features)
Get annotations by type and features |
AnnotationGraph |
AnnotationGraph.getAnnotations(String type,
FeatureMap features,
Long offset)
Get annotations by type, features and offset |
static boolean |
Gate.getHiddenAttribute(FeatureMap fm)
Returns the value for the HIDDEN attribute of a feature map |
void |
DocumentFormat.setFeatures(FeatureMap features)
Set the features map |
static void |
Gate.setHiddenAttribute(FeatureMap fm,
boolean hidden)
Sets the value for the HIDDEN attribute of a feature map |
void |
Resource.setParameterValues(FeatureMap parameters)
Sets the values for more parameters in one step. |
boolean |
FeatureMap.subsumes(FeatureMap aFeatureMap)
Tests if this featureMap object includes aFeatureMap features. |
boolean |
FeatureMap.subsumes(FeatureMap aFeatureMap,
Set aFeatureNamesSet)
Tests if this featureMap object includes aFeatureMap but only for the features present in the aFeatureNamesSet. |
boolean |
FeatureMap.subsumes(Ontology ontologyLR,
FeatureMap aFeatureMap)
Tests if this featureMap object includes aFeatureMap features. |
| Uses of FeatureMap in gate.annotation |
|---|
| Fields in gate.annotation declared as FeatureMap | |
|---|---|
protected FeatureMap |
TestAnnotation.emptyFeatureMap
An empty feature map |
| Methods in gate.annotation with parameters of type FeatureMap | |
|---|---|
void |
AnnotationSetImpl.add(Integer id,
Long start,
Long end,
String type,
FeatureMap features)
Create and add an annotation from database read data In this case the id is already known being previously fetched from the database |
void |
ImmutableAnnotationSetImpl.add(Integer id,
Long start,
Long end,
String type,
FeatureMap features)
|
Integer |
AnnotationSetImpl.add(Long start,
Long end,
String type,
FeatureMap features)
Create and add an annotation and return its id |
Integer |
ImmutableAnnotationSetImpl.add(Long start,
Long end,
String type,
FeatureMap features)
|
Integer |
AnnotationSetImpl.add(Node start,
Node end,
String type,
FeatureMap features)
Create and add an annotation with pre-existing nodes, and return its id. |
Integer |
ImmutableAnnotationSetImpl.add(Node start,
Node end,
String type,
FeatureMap features)
The following methods throw an exception as they try to modify the state of the object |
protected Annotation |
TestAnnotation.createAnnotation(Integer id,
Node start,
Node end,
String type,
FeatureMap features)
|
Annotation |
AnnotationFactory.createAnnotationInSet(AnnotationSet set,
Integer id,
Node start,
Node end,
String type,
FeatureMap features)
Adds a new AnnotationImpl to the given set. |
Annotation |
DefaultAnnotationFactory.createAnnotationInSet(AnnotationSet set,
Integer id,
Node start,
Node end,
String type,
FeatureMap features)
|
AnnotationSet |
AnnotationSetImpl.get(String type,
FeatureMap constraints)
Select annotations by type and features This will return an annotation set containing just those annotations of a particular type (i.e. with a particular name) and which have features with specific names and values. |
AnnotationSet |
AnnotationSetImpl.get(String type,
FeatureMap constraints,
Long offset)
Select annotations by type, features and offset |
void |
AnnotationImpl.setFeatures(FeatureMap features)
Set the feature set. |
void |
CorpusAnnotationDiff.setParameterValues(FeatureMap parameters)
Sets the values for more parameters in one step. |
| Constructors in gate.annotation with parameters of type FeatureMap | |
|---|---|
AnnotationImpl(Integer id,
Node start,
Node end,
String type,
FeatureMap features)
Constructor. |
| Uses of FeatureMap in gate.config |
|---|
| Methods in gate.config that return FeatureMap | |
|---|---|
protected FeatureMap |
ConfigXmlHandler.attributeListToParameterList()
Utility method to convert the current SAX attribute list to a FeatureMap |
| Uses of FeatureMap in gate.corpora |
|---|
| Methods in gate.corpora that return FeatureMap | |
|---|---|
FeatureMap |
DocumentImpl.getFeatures()
Cover unpredictable Features creation |
static FeatureMap |
DocumentStaxUtils.readFeatureMap(XMLStreamReader xsr)
Processes a GateDocumentFeatures or Annotation element to build a feature map. |
static FeatureMap |
DocumentStaxUtils.readXcesFeatureMap(XMLStreamReader xsr)
Processes a struct element to build a feature map. |
| Methods in gate.corpora with parameters of type FeatureMap | |
|---|---|
static StringBuffer |
DocumentXmlUtils.featuresToXml(FeatureMap aFeatureMap,
Map<String,StringBuffer> normalizedFeatureNames)
This method saves a FeatureMap as XML elements. |
static void |
DocumentStaxUtils.writeFeatures(FeatureMap features,
XMLStreamWriter xsw,
String namespaceURI)
Write a feature map to the given XMLStreamWriter. |
| Uses of FeatureMap in gate.creole |
|---|
| Fields in gate.creole declared as FeatureMap | |
|---|---|
protected FeatureMap |
AbstractVisualResource.features
|
| Methods in gate.creole that return FeatureMap | |
|---|---|
FeatureMap |
ParameterList.getDefaults(List<List<Parameter>> parameters)
Get default parameter value set. |
FeatureMap |
AbstractVisualResource.getFeatures()
Accessor for features. |
FeatureMap |
ParameterList.getInitimeDefaults()
Get default initime parameter value set. |
FeatureMap |
AbstractResource.getInitParameterValues()
Get the current values for all this resource's registered init-time parameters. |
FeatureMap |
AbstractVisualResource.getInitParameterValues()
Get the current values for all this resource's registered init-time parameters. |
static FeatureMap |
AbstractResource.getInitParameterValues(Resource res)
Get the current values for all of a specified resource's registered init-time parameters. |
static FeatureMap |
AbstractResource.getParameterValues(Resource res,
List<List<Parameter>> params)
Get the current values of the given parameters from the given resource. |
FeatureMap |
ParameterList.getRuntimeDefaults()
Get default runtime parameter value set. |
FeatureMap |
AbstractProcessingResource.getRuntimeParameterValues()
Get the current values for all this resource's registered init-time parameters. |
static FeatureMap |
AbstractProcessingResource.getRuntimeParameterValues(Resource res)
Get the current values for all of a specified resource's registered runtime parameters. |
| Methods in gate.creole with parameters of type FeatureMap | |
|---|---|
void |
AbstractVisualResource.setFeatures(FeatureMap features)
Mutator for features |
void |
AbstractResource.setParameterValues(FeatureMap parameters)
Sets the values for more parameters for this resource in one step. |
void |
AbstractVisualResource.setParameterValues(FeatureMap parameters)
Sets the values for more parameters in one step. |
static void |
AbstractResource.setParameterValues(Resource resource,
FeatureMap parameters)
Sets the values for more parameters for a resource in one step. |
| Uses of FeatureMap in gate.gui |
|---|
| Fields in gate.gui declared as FeatureMap | |
|---|---|
protected FeatureMap |
FeaturesSchemaEditor.features
|
protected FeatureMap |
SerialDatastoreViewer.features
|
| Methods in gate.gui that return FeatureMap | |
|---|---|
FeatureMap |
FeaturesSchemaEditor.getFeatures()
Accessor for features. |
FeatureMap |
SerialDatastoreViewer.getFeatures()
Accessor for features. |
FeatureMap |
ResourceParametersEditor.getParameterValues()
Gets the current values for the parameters. |
FeatureMap |
NewResourceDialog.getSelectedParameters()
Returns the selected params for the resource or null if none was selected or the user pressed cancel |
FeatureMap |
FeatureMapEditorDialog.showDialog()
Make this dialog visible allowing the editing of the list. |
| Methods in gate.gui with parameters of type FeatureMap | |
|---|---|
protected void |
FeatureMapEditorDialog.initLocalData(FeatureMap data)
|
void |
FeaturesSchemaEditor.setFeatures(FeatureMap features)
Mutator for features |
void |
SerialDatastoreViewer.setFeatures(FeatureMap features)
Mutator for features |
void |
FeaturesSchemaEditor.setParameterValues(FeatureMap parameters)
Sets the values for more parameters in one step. |
void |
SerialDatastoreViewer.setParameterValues(FeatureMap parameters)
Sets the values for more parameters in one step. |
void |
FeaturesSchemaEditor.setTargetFeatures(FeatureMap features)
|
protected String |
ResourceParametersEditor.textForFeatureMap(FeatureMap fm)
Get a string representation for a FeatureMap value. |
| Constructors in gate.gui with parameters of type FeatureMap | |
|---|---|
FeatureMapEditorDialog(Component owner,
FeatureMap data)
Contructs a new FeatureMapEditorDialog. |
| Uses of FeatureMap in gate.gui.annedit |
|---|
| Fields in gate.gui.annedit declared as FeatureMap | |
|---|---|
protected FeatureMap |
SchemaFeaturesEditor.featureMap
The feature map currently being edited. |
| Methods in gate.gui.annedit with parameters of type FeatureMap | |
|---|---|
void |
SchemaFeaturesEditor.editFeatureMap(FeatureMap featureMap)
Method called to initiate editing of a new feature map. |
| Uses of FeatureMap in gate.gui.docview |
|---|
| Methods in gate.gui.docview with parameters of type FeatureMap | |
|---|---|
void |
AnnotationStack.addAnnotation(int startOffset,
int endOffset,
String type,
FeatureMap features)
Add an annotation to the current stack row. |
| Uses of FeatureMap in gate.jape |
|---|
| Fields in gate.jape declared as FeatureMap | |
|---|---|
protected FeatureMap |
Constraint.ontFeatureMap
FeatureMap that may contain ontology-related features and values pulled from any predicates that operate on those features |
protected FeatureMap |
DefaultActionContext.prfeatures
|
| Methods in gate.jape that return FeatureMap | |
|---|---|
FeatureMap |
Batch.getFeatures()
|
protected FeatureMap |
Constraint.getOntFeatureMap()
Generate a FeatureMap to perform ontology-related compare. |
FeatureMap |
ActionContext.getPRFeatures()
Provide access to the feature map associated with the JAPE processing resource. |
FeatureMap |
DefaultActionContext.getPRFeatures()
|
| Methods in gate.jape with parameters of type FeatureMap | |
|---|---|
void |
Batch.setFeatures(FeatureMap newFeatures)
|
void |
DefaultActionContext.setPRFeatures(FeatureMap features)
|
| Constructors in gate.jape with parameters of type FeatureMap | |
|---|---|
Constraint(String annotType,
FeatureMap attrs)
Construction from annot type and FeatureMap. |
| Uses of FeatureMap in gate.jape.functest |
|---|
| Fields in gate.jape.functest declared as FeatureMap | |
|---|---|
protected static FeatureMap |
BaseJapeTests.BaseAnnotationCreator.emptyFeat
|
| Methods in gate.jape.functest with parameters of type FeatureMap | |
|---|---|
protected BaseJapeTests.AnnotationCreator |
BaseJapeTests.BaseAnnotationCreator.add(int start,
int end,
String type,
FeatureMap fm)
Add an annotation of the given type over the given range. |
| Uses of FeatureMap in gate.util |
|---|
| Classes in gate.util that implement FeatureMap | |
|---|---|
class |
SimpleFeatureMapImpl
Simple case of features. |
| Fields in gate.util declared as FeatureMap | |
|---|---|
protected FeatureMap |
AbstractFeatureBearer.features
The feature set |
| Methods in gate.util that return FeatureMap | |
|---|---|
FeatureMap |
AbstractFeatureBearer.getFeatures()
Get the feature set |
FeatureMap |
FeatureBearer.getFeatures()
Get the feature set |
| Methods in gate.util with parameters of type FeatureMap | |
|---|---|
void |
AbstractFeatureBearer.setFeatures(FeatureMap features)
Set the feature set |
void |
FeatureBearer.setFeatures(FeatureMap features)
Set the feature set |
boolean |
SimpleFeatureMapImpl.subsumes(FeatureMap aFeatureMap)
Test if this featureMap includes all features from aFeatureMap However, if aFeatureMap contains a feature whose value is equal to gate.creole.ANNIEConstants.LOOKUP_CLASS_FEATURE_NAME (which is normally "class"), then GATE will attempt to match that feature using an ontology which it will try to retreive from a feature in both the feature map through which this method is called and in aFeatureMap. |
boolean |
SimpleFeatureMapImpl.subsumes(FeatureMap aFeatureMap,
Set aFeatureNamesSet)
Tests if this featureMap object includes aFeatureMap but only for the those features present in the aFeatureNamesSet. |
boolean |
SimpleFeatureMapImpl.subsumes(Ontology ontologyLR,
FeatureMap aFeatureMap)
Tests if this featureMap object includes aFeatureMap features. |
| Uses of FeatureMap in gate.util.spring |
|---|
| Methods in gate.util.spring that return FeatureMap | |
|---|---|
static FeatureMap |
SpringFactory.createFeatureMap(Map sourceMap)
Creates a feature map from a source map. |
| Methods in gate.util.spring with parameters of type FeatureMap | |
|---|---|
void |
GateResourceFactoryBean.setFeatures(FeatureMap features)
|
void |
GateResourceFactoryBean.setParameters(FeatureMap parameters)
|
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES |


Toggle navigation
Datepickers
Link
(current)
Link
Dropdown
Action
Another action
Something else here
Separated link
One more separated link
Demo
Bootstrap 3, Font Awesome 5
Date with link field:
Following field would normally be hidden
Date but it's a modal:
Date with restricted times:
Custom button:
📆 CUSTOM BUTTON 🎉
Time only
Last chosen date


Session Class
The session class allows you to maintain state for your application in the stateless environment of the web.
It allows you to store variables on the server using a variety of storage solutions, and recall these variables on the next page request.
Manual loading
For most cases, it is sufficient to configure the desired driver, and use the methods documented on the usage page.
However, there are situations where you would like more control over the way sessions behave.
You might want to use a different session driver than is configured in the session configuration file.
Or you have a need for multiple drivers concurrently. This is where the forge method comes in.
The forge method returns an instance of the session class, using the driver defined in the configuration file or via the parameter.
You can use the methods documented on the usage page on the object returned, using dynamic calls.
forge($config = array())
The forge method allows you to manually instantiate a session driver.
| Static |
Yes |
| Parameters |
| Param |
Default |
Description |
| $config |
optional |
You can select the driver of your choice by simply passing the name of the driver to the forge method.
If you require more custom configuration, define a $config array, using the parameters documented on the configuration page.
Configuration settings you pass here will override the ones defined in the configuration file.
|
|
| Returns |
object - The instantiated session object. |
| Example |
// instantiate a database session
$session = Session::forge('db');
// get the counter from the session
$counter = $session->get('counter');
// if not present, set a default
if ($counter === false)
{
$counter = 0;
}
// write the counter back
$session->set('counter', $counter);
// no need to explicitly write, Fuel will take care of that...
// you can also load a driver with settings that will override the defaults in the config file
$session = Session::forge( array('driver' => 'memcached', 'expiration_time' => 3600, 'memcached' = array('cookie_name' => 'appcookie')) );
|
Please note: when you want to use multiple session drivers at the same time, the cookie_name for each of these driver instances must be unique.
If you attempt to load a driver using a cookie_name that is already in use, and the instance using it uses the same driver as you are trying to load, that instance is reused.
If the instance is using a different driver, an exception is thrown.
rotate()
The rotate method allows you to manually force a rotation of the session id. You can use this as an extra security measure, for example when the security level of the current user is modified.
| Static |
No |
| Parameters |
None
|
| Returns |
void |
| Example |
// instantiate a database session
$session = Session::forge('db');
// force a rotation of the session id
$session->rotate();
|
get_config()
The get_config method allows retrieve a session driver configuration item.
| Static |
No |
| Parameters |
| Param |
Default |
Description |
| $name |
required |
Name of the session configuration variable.
|
|
| Returns |
mixed, the value requested, or null of the requested variable does not exist. |
| Example |
// instantiate a database session
$session = Session::forge('db');
// get the defined session cookie name
$cookiename = $session->get_config('cookie_name');
|
set_config()
The set_config method allows alter a session driver configuration item at runtime.
| Static |
No |
| Parameters |
| Param |
Default |
Description |
| $name |
required |
Name of the session configuration variable.
|
|
| Returns |
void |
| Example |
// instantiate a database session
$session = Session::forge('db');
// set the expiration time for this session to 2 hours
$session->set_config('expiration_time', 7200);
|
Using sessions with Flash
One of the problems with using Flash objects in websites, is that when they interact with your web application, they don't send the cookies
back that have been stored in the browser. Due to this problem, it is difficult to make them aware of the session state of the application.
To solve this problem, the Session class allows you to pass the cookie to the application using a POST variable.
You can set the name of the variable using the configuration setting 'post_cookie_name'. If the Session class finds a $_POST variable with this name,
it will assume it contains the session cookie, and will not use the session cookie. This allows you to copy the contents of the session cookie
client-side into the POST variable using a bit of javascript.
When you use a Flash based uploader. you will have to set the match_ua setting to false.
You have to do this because Flash uses a different User Agent which will prevent the Session class to correctly
identify the users session.
// function to get the session cookie
// you can use or own, or use the one your favorite javascript framework provides
function getCookie(c_name)
{
if (document.cookie.length > 0)
{
c_start = document.cookie.indexOf(c_name + "=");
if (c_start != -1)
{
c_start = c_start + c_name.length + 1;
c_end = document.cookie.indexOf(";", c_start);
if (c_end == -1) c_end = document.cookie.length;
return unescape(document.cookie.substring(c_start, c_end));
}
}
return "";
}
// we're using jquery and uploadify in this example, and we're passing
// the fuel cookie (called 'fuelcid' here) in the formData as 'fuelcid'
// Note: when generating this code, don't hardcode the cookie name, but
// instead get the cookie name from the session configuration file.
// Note:: check the "sessions without cookies" section below if you
// don't have a cookie available to pass the session id back
// ( parameters are related to Uploadify Version 3.2 )
$(function()
{
$('#custom_file_upload').uploadify(
{
'swf' : '/uploadify/uploadify.swf',
'uploader' : '/uploadify/uploadify.php',
'multi' : true,
'auto' : true,
'fileTypeExts' : '*.jpg;*.gif;*.png',
'fileTypeDesc' : 'Image Files (.JPG, .GIF, .PNG)',
'queueID' : 'custom-queue',
'queueSizeLimit' : 3,
'removeCompleted': false,
'formData' : {'fuelcid': getCookie('fuelcid')},
'onSelect' : function(file)
{
alert('The file ' + file.name + ' was added to the queue.');
},
'onQueueComplete' : function(queueData)
{
alert(queueData.uploadsSuccessful + ' files were successfully uploaded.');
}
});
}
Concurrency
When talking about sessions, session cookies, and their behaviour, it is important to understand how they work
and what the possibilities and limitations are.
This is especially true when it comes to concurrency.
For web-based application, you will have concurrency if you use multiple asynchronous ajax calls on your webpages,
or if you allow a browser to have multiple windows open to the same application (which, lets face it, is something you can't prevent).
Something else you need to know is that by default, the session class will rotate (or regenerate) the session id on a regular basis,
to prevent session hijacking due to session id fixation (someone stealing your session cookie and use it to take over your session).
You can control the rotation time using a configuration setting, or even disable it, but from a security point of view that is a bad idea.
Take these two together, and you have a potential disaster on your hands!
An illustration:
- you request a page, the session cookie containing ID-A is sent to the server.
- your page sends two ajax requests. the session cookie containing ID-A is again sent to the server with each request.
- ajax request 1 finishes, and rotates the ID. A cookie with ID-B is sent to the browser.
- now ajax request 2 finishes. Because it sent the same cookie, it also decides to rotate, this time to ID-C.
(you will get a different ID, because session IDs are generated using a randomized algorithm)
Now we have a problem. The session class tries to update the stored session with key ID-A to ID-C, but it can't find that session.
Remember, it had been updated from ID-A to ID-B by the first ajax call! So it decides the session is invalid, create a new and empty
session, and return that cookie to the browser. Now your valid cookie is overwritten by the new and empty session cookie.
Result: you have lost the session.
This is an issue that most frameworks have not solved. Enter Fuel!
Fuel's session class contains two mechanisms to detect and mitigate this problem.
Every session key store contains two session IDs: the current ID and the previous ID.
If a request comes in just after the session id has been rotated, the correct session can be located using the previous session id stored in the key store.
And it case of a session id mismatch which could not be recovered using the previous id, no updated cookie will be sent back to the browser.
The result is that you lose the session data of that request, but you don't lose the session itself.
Sessions without cookies
After a change to the session data, the Session class will always generate a session cookie, and send it to the client in the HTTP
response header. However, there are situations where is it undesireable, of even impossible, to use cookies. For example simply
because the client does not support them.
In these cases, there are alternative ways to pass a Session ID back to the application on a request from the client:
- via a GET variable. The name of the variable in the URL must be equal to the name of the cookie defined in the configuration.
- via a POST variable. You can define the form field name (post_cookie_name) that contains the session-id in the configuration.
- via the HTTP header. When constructing the HTTP request client side, you can add a "Session-Id" HTTP header with the session id.
You can use Session::key()
to retrieve the current session id, so you can pass it to the client in the response, instead
of using a cookie. If you have configured encryption in your session configuration, you need to encrypt the id:
// fetch the session ID and encrypt it
$session_id = \Crypt::encode(\Session::key());


DfE enquiries
Central newsdesk 020 7783 8300
General enquiries 0370 000 2288
News story
The Ofsted annual report shows a record number of academies rated 'outstanding' while 'inadequate' ratings across the schools sector doubled.
The 2010 Ofsted annual report published today shows that while generally across the schools sector the number of inspections this year resulting in an inadequate rating has doubled, academies have bucked the trend using their freedoms to raise standards across the board with more than ever being rated as outstanding.
Commenting on the report, Education Secretary Michael Gove, said:
This report shows us the real picture of our schools revealed by the new, more rigorous inspection regime. A worrying 576 schools, up from 360 last year, are either in special measures or have been given a notice to improve, with the number rated as inadequate in the last year twice as high as the year before. Even taking into account the new inspection system, this is simply unacceptable. No parent wants to send their child to a failing school and they shouldn’t have to.
There are also concerns in safeguarding, children’s homes and fostering. Whilst the vast majority of professionals in this area do an incredible job in very difficult circumstances delivering high-quality care, there are some areas that can be improved. The Munro review will look at child protection to help professionals get the support they need so that they are able to spend more time with children and families and less time on paperwork.
The report shows that solid leadership, high-quality teaching, freedoms over the curriculum and strong governance all add up to high standards and rapid improvements. Academy schools which have these freedoms have bucked the national trend and have seen an increase in the numbers getting the top Ofsted rating despite the new tougher inspections. That’s why our White Paper this week will outline further plans to make these freedoms a reality in as many schools as possible.
There has been a marked improvement in children’s services inspected and the best foster homes, children’s centres and social workers are turning around the life chances of some of society’s most disadvantaged and vulnerable people. There is a lot we can learn from and I’m determined that we will free up both the education and the children’s sectors so that professionals can learn from the best, adapting delivery to their local needs rather than having to follow a set system dictated from Whitehall.
Key points on academies in the report include:
Commenting on the quality of teaching, Michael Gove said:
The biggest factor in raising standards in schools is the quality of its teachers. The best education systems in the world consistently draw their teachers from the top tier of graduates by academic ability and select them carefully to ensure they are taking only those people who combine the right personal and intellectual qualities.
There is consensus amongst the highest performing countries that the most important thing we can do for teachers is train them well and then throughout their professional career. Too much teacher training involves either teachers being told how to comply with government criteria, or what John Bangs called quite rightly ‘death by PowerPoint’.
Teachers need to learn from other teachers. I have been impressed by arguments that the way to ensure we have good continual professional development is by getting teachers to observe superb practitioners of the craft and to learn from them. Today’s Ofsted report is a ringing endorsement of this, highlighting how schools with outstanding teaching frequently have senior school staff monitoring lessons which allows others to learn from the best teachers. That’s why our White Paper tomorrow will outline plans to give schools more flexibility to do this by removing restrictions on the time heads and other senior staff are allowed to monitor lessons.
But this has to start right from the outset with initial teacher training, and the Ofsted report is also clear that teachers need more practical classroom training to back up their theoretical training. Our White Paper will also outline plans to ensure trainee teachers spend more time in hands-on learning in the classroom.
Central newsdesk 020 7783 8300
General enquiries 0370 000 2288
Published: 23 November 2010


Priority given to Canadian education, work experience
Jamaica and Canada
Dear Mr Brown,
I read about the quality of Canada's education system. It seems to be very high, but I also think that the standard of the Caribbean Examinations Council's (CXC) Caribbean Secondary (CSEC) Education Certificate and Caribbean Advanced Proficiency Examination (CAPE) are extremely high in comparison. Are these qualifications accepted in Canada?
— MAP
Dear MAP:
In recent years, Canada has been regarded as belonging to the top tier of international rankings in relation to education. A major study of educational performance by the Organization for Economic Co-operation and Development (OECD) suggests that teenagers educated in Canada are among the best educated in the world.
At the university level, Canada has the world's highest proportion of working-age adults who have been through higher education.
Provincial jurisdiction
Canada does not have a national education system. Instead, education is under the jurisdiction of each province and territory. Moreover, Canada has a high level of immigrants in its school population, who seem to integrate well in the system.
One conclusion drawn by OECD is despite the different policies in each province, Canada has shown a commitment to equality and equity in school, which is deemed the central theme influencing the success of education in Canada.
Equity in the classroom
Studies have shown that the children of new migrants have scores as high as the rest of their schoolmates, which is a relatively uncommon result in contrast to other nations. Moreover, Canada's teachers are well paid by international standards, which attracts high-quality faculty and sufficient funding for corresponding high standards and special education.
Although there is a narrow socioeconomic gap in Canada, studies found that there was little variation for educational results based on wealth or district.
In response to your statement, I agree that CXC/CAPE have very high expectations of students. However, the high standard of Canada's system is more based on a systematic way of ensuring that all students in the nation meet the established standard, regardless of the capacity of a particular student or teacher, the nature of a particular school or location in a particular district.
Canadian experience
It can also be argued that many immigrants are highly educated and extremely motivated to utilise opportunities to succeed in Canada.
Many immigrants enter Canada as students, as priority is given under the economic immigration system for those with Canadian education and work experience because it leads to a smoother transition based on marketable employment. In Jamaica, foreign experience can enhance marketability, whereas in Canada, it is Canadian experience that is valued.
I am trying to place emphasis on this distinction, so that you can understand that although qualification can be accepted and recognised based on an evaluation by World Education Services, priority is intentionally given to Canadian experience (education and work).
Please visit jamaica2canada.com for additional information on Canadian Permanent Residence programmes, including Express Entry, the study & work programme, visas or appeals, etc.
Antonn Brown, BA, (Hons), LLB, MSc, RCIC, is an immigration counsel and an accredited Canadian education agent of JAMAICA2CANADA.COM — a Canadian immigration and education firm in Kingston. Send questions/comments to jamaica2canada@gmail.com.


Sign In
Please use open banking credentials
Open Banking has the power to revolutionise the way we manage our
money, shop
around and buy things. For small to medium enterprises, managing cash flow and
receiving payments should be cheaper and easier.
Open Banking could widen access to existing products, like credit,
debt advice or
financial advice. And bring new products to market from overseas, at the click of a
button. Open Banking will make things simpler, quicker and more convenient.
Open Banking gives us a platform through which we share our data. If
it can also
help us regain control over how we share all our data better.