{% extends "ew/base.html" %} {% load ew_templatetags %} {% load static %} {% block title %} Help {% endblock %} {% block content %}
»
ExponWords is a web application for learning words. It helps learn the word pairs fed by the user using the principle that the more we have already practiced a word, the less we need to practice it again.
So the main point of ExponWords is that the more times the user was able to remember a word when the program asked, the less frequently it will be asked (because it will be considered "stronger"). When a word is asked and the user states that he remembers it, the word will be asked the next day; if the users remembers the word the next day, it will be asked in 2 days; if he knows it in 2 days, it will be asked in 4 days; and so on with powers of 2. If the users admits on any of these occasions that he does not remember the word, the strength of the word as stored by ExponWords will go back to the initial level, and it will be asked again in 1 day, then 2 days afterwards, then 4 days afterwards etc.
ExponWords stores word pairs to be learnt. These can contain not only words, but also expressions or anything the users wants to learn. For the sake of simplicity though, they will be only referred to as word pairs. Word pairs have the following elements:
ExponWords has a global menu and a separate menu for each dictionary.
The global menu is available on the main page: the user can log in, log out, create dictionaries, set the options.
The dictionary menus are available from the dictionary page, which can be accessed from the main page by clicking on the name of the dictionary. The user can view, edit and delete the dictionary, add and import new words, and practice.
My favorite HTML tag is the  tag & its pair. E.g.:
The sun is not shining.
My favorite HTML tag is the  tag & its pair. E.g.:
The sun is not shining.
HTML (keep line breaks): with this format, the text will be interpreted as HTML code.
HTML line breaks (i.e. "
" tags) will be added to the end of each line, so that they will be displayed as separate lines. There is a similar mechanism for indented text.
The "&", "<" and ">" characters will be interpreted as HTML, so "&", "<" and ">" must be written instead.
Not all HTML tags and attributes are allowed, only those that are safe and cannot be used to execute JavaScript code in a browser.
My favorite HTML tag is the  tag & its pair. E.g.:
The sun is not shining.
My favorite HTML tag is the  tag & its pair. E.g.:
The sun is not shining.
My favorite HTML tag is the  tag & its pair. E.g.:
The sun is not shining.
My favorite HTML tag is the  tag & its pair. E.g.: The sun is not shining.
| Word in German: |
die Katze |
|---|---|
| Word in English: |
cat |
| Notes: |
[ˈkaʦə] |
| Word in German: |
die Katze |
|---|---|
| Word in English: |
cat |
| Notes: |
[ˈkaʦə] |
machen -- do essen -- eat die Katze -- cat Plural: die Katzen. Katzen sind süße Tiere.  Manche Hunde sind auch süß.  Katzen sind süße Tiere. (Cats are cute animals.) der Hund<TAB>dog<TAB>Plural: der Hund, die Hunde. Manche Hunde sind auch süß. (Some dogs are also cute.)
The practice page contains the following elements:
The "Practice early" page is a practice page where not only those words are asked that are due today, but those too that could benefit from practicing. (That means words whose dimness is larger than 0.75. So for example if a word is due after 100 day of its last practice, then it is asked in early practice sessions from day 75. From day 100, it is asked in normal practice sessions.)
In early practice sessions, the words are always ordered according to the I am a little behind ordering, which means that first those words are asked that are better suited for early practice (because their dimness is higher).
Words can be asked in several orders on the practice page. (Note that these orderings specify only the order of words within the practice page, not which word is asked which day.) You can set your preferred ordering globally on the Settings page, or only for one dictionary on the Modify dictionary page.
Note: words in the same category above (e.g. words with the same dimness tomorrow and strength) are asked in a random order.
Dimness is a measure that shows how many times a word should have been asked. For example, let's say that a word is practiced and "YES" is pressed, and it is due in 4 days. After the practice, the dimness of the word is zero, because it just has been asked. Then the dimness increases by one quarter each day: 0.25, 0.5, 0.75, 1, 1.25, etc. On the day when the word is due to be asked, it is 1 (by definition). Normally, the word is asked on this day so its dimness goes back to 0; but if the user does not practice it, the dimness will just increase by each day. The dimness of weak words increases rapidly, while the dimness of strong words increases slowly.
When the dimness of a word is greater than 1, it means that the word should be practiced: the higher the dimness, the more urgent the practice is. If the user has quite a few words larger than dimness 1 for the practice session, then the "I am a little behind" word ordering is recommended.
For those interested, here is the formula that calculates the dimness of a word with positive strength (words with nonpositive strength do not have dimness):
When the "YES" button is pressed during a practice session, the strength of the given word will be increased. There are two methods for strengthening the word. They both work on the basic principle that they double the time interval for the next practice: 1 day, 2 days, 4 days, 8 days, etc.
The difference is how they handle the situation when the word is not practiced on the day when the word is due, but later. For example let's say that a word was practiced on January 1st, 2nd, 4th, 8th, but even though ExponWords asked the word on 16th, 17th, etc., it was only practiced on 20th. Let's see how the two methods calculate the next practice time of the word:
In both cases, the strengths of the words will be calculated so that they provide the time intervals described above.
Generally, the first method is better (that's why that is the default), because it means less practice time. In some circumstances, though, the second one may be useful too. In case of early practice, always the first method is used.
The "Search and operations" page can be used to search in dictionaries. The dictionary and the label in which the search shall be performed can be selected. The text typed into the textbox will be split into words (words shall be separated by spaces).  If the search box is empty, all word pairs will be printed.
The searchbox is case insensitive and accent insensitive, so for example a search for "haz" will found the word pairs containing the text "Ház".
The "label:" prefix can also be used to search for a specific label, e.g. the search expression "label:oldwords cat" will show the word pairs that contain the "cat" word and have a label that contains the "oldwords" label, even in part (so e.g.the words with "veryoldword" label will be found as well).
The program shows the search hits in a table. Showing this table can be turned off by unchecking the "Show hits" checkbox. In this case, the program will still perform the search and display the number of hits. The usual operations can be performed as well; but they will be performed on all found word pairs, there is no possibility of manually selecting a subset of them.
The "Search and operations" page can also be used to perform certain operations on word pairs that have been selected. Word pairs can be selected with a single click on them. The selected word pairs are indicated by their gray background and the state of their checkboxes in the "Selected" column.
The followings can be set:
ExponWords in not the only web application for learning words and other items.
The algorithms of Supermemo (English) and szokincs.hu (Hungarian) are similar to the algorithm of ExponWords in that it has you practice the same word less and less often. The creator of Supermemo (Dr Piotr Wozniak) has articles about this kind of learning, and there is an article in Wired magazin about him.
Other applications for learning words include memorize.com (English), Quizlet (English), Brainscape (English) and Szókincsfejlesztő (Hungarian).
What happens if I leave the program in the middle of a practice session, and I have answered only some words, not all?
This does not cause any problems. The words answered with "YES" will be updated to stronger strength, and they will be asked again accordingly. The other (not practiced) words will be asked when you reload the Practice page.
What happens if I skip one or more days?
This will not cause a problem either, these words will not be skipped. The program always asks all the words that should have been asked in the previous days.
How does the program know whether I really knew the word asked?
It does not, you tell this to the program. Since clicking or "YES" or "NO" when asked whether you know a word or not has no effect other than changing the word's strength and date, you can even manipulate this with good will. For example when I learn a word in the morning and add it to my dictionary, in the morning practice I often hit "NO" (as if I did not know the word) even if I knew it, because I want it to be asked again in the evening practice session.
A word pair can be asked in two ways. For example if I'm Hungarian and I'm learning English, then the word can be asked in an English→Hungarian and in a Hungarian→English direction. How is this handled by the program?
When practicing, these two directions are basically handled as two separate words. Both directions have separate strengths and separate dates (which show when to ask them the next time).
The program cannot do something that I would like it to do. What can I do?
There are several things in my TODO list. If you need something, you can e-mail me and if I like the idea I will add it to my list or (if it is already on the list) try to move it to the top.
Which language can the program be used for?
The program can be used for any language, because the words are added by you.
In which order are the word to be practiced asked?
There are several possibilities: see the section on the practice word order.
In which languages is the user interface available?
Currently English and Hungarian. If you are interested in doing the translation for another language, please contact .
Why is ExponWords called ExponWords?
Because the dates when a word is asked are points of an exponential function: 1 day, 2 days, 4 days, 8 days etc (assuming that the user knew the word each time).
ExponWords is open source software and is distributed under the Apache Licence version 2. The source code repository can be found here.
{% endblock %}


AN ERROR HAS OCCURED
Do you have the minimal requirements?
If you do have the correct configuration and this error persists, view our FAQ and our Support pages.
Have you entered invalid information?
Have you entered all required information?


Scrabble tracker
Player 1 :
Player 2 :
Start new
Move:
--
Round:
--
Player:
Unknown
Score:
Next move


| I l@ve RuBoard |
This concludes our brief introduction. We have left out many features, but hopefully have given you a feel for how straightforward Python is.
We urge you to look at the Python tutorial or one of the books noted in the next section, but if you want to survey what Python can do, you should now be able to follow the code examples in the next few chapters.
| I l@ve RuBoard |


Workloads resources are responsible for managing and running your containers on the cluster. Containers are created by Controllers through Pods. Pods run Containers and provide environmental dependencies such as shared or persistent storage Volumes and Configuration or Secret data injected into the container.
The most common Controllers are:


THE SILENCE (SOKHOUT)
Reviewed by Harvey Karten New Yorker Films/MK2 Productions Director: Mohsen Makhmalbaf Writer: Mohsen Makhmalbaf Cast: Nadareh Abdelahyeva, Tahmineh Normatova, Goibibi Ziadolahyeva
Imagine you're about to have some guests for an afternoon party. You go to the baker's for bread and cake, to the liquor store for wine, to the appetizer's for smoked salmon. All the while you scurry about you're thinking about the festivities which are to begin in four hours.  At the same time you think back thirty years to the time you shopped in similar places for your mother, and regret the passing of years. This is the mundane, daily life of the middle-class American, and who's to complain?
Now think of a different situation. You go to the bakery and, instead of thinking of the future (however near) or the past (however remote), you're taking in the smells and sounds and feel of the place. Your mind is centered on the moment, the sort of affair that the swamis and gurus tell us is life's most desirable activity.
Now change your flow of thought to the movies. Would a dramatization of this concept be much of a story to show on the wide screen? Probably not, you say. Cinema, at least as we in the world's capital of the art form believe, is action. We worship a strong plot with a firm trajectory, each action propelling the next to a blockbuster conclusion. While this sort of narrative appears to have captured the world's primary audience for the pictures, there is yet another form of powerful cinema, one which is minimalist by contrast, and yet which leads by its succession of images to a commanding place in the mind of sophisticated viewers. "The Silence," known in its director's native Iran by the Farsi title "Sokhout," is such a yarn, centering on a ten-year-old boy who is in a way the sort of kid that Spielberg could dream up to introduce him and his audience to a mysterious world barely known.  ("The Silence" was filmed in Muslim Tadjikistan, which became independent of the former Soviet Union just a decade or so ago and where the women, by contrast with Iran, do not wear chodors.)
There isn't much of a plot to "The Silence," but that's hardly the point. The boy goes to work by bus, often escorted by his sighted friend Nadereh (Nadereh Abdelahyeva), where he uses his skilled ear to tune stringed instruments for an old man who runs a shop. The conflict, such as there is one, exists in the forthcoming dismissal of this lovely child by his boss because his little employee is often late to work. Though Khorshid regularly blames the bus for being tardy, the real reason for his detainment is that he becomes fascinated along the way the sounds of nature which, to him, come across literally as music. He can spend several minutes listening to a bee buzz as it crawls about a jar and flies off, and he prays for the winged creature's safe journey. When Khorshid shops among the street merchants for bread with his mother, he hears the sales pitches of the colorfully-garbed women as though they were a chorus in an opera and uses his acute senses to select a loaf not by its freshness but by the pleasing voice of its merchant. Even the dreaded knocks by his mother's landlord on the door of their modest home sound to him not like the dissonant timbre of a Stravinsky ballet but like the four opening notes of Beethoven's 5th Symphony. When Khorshid listens to boys his own age hammering out objects on their job without rhythm or meaning, he instructs them to hit the objects with the cadence of these same four notes until, in one climactic scene, he conducts a large "orchestra" of street drummers in part of the first movement of the Fifth.
By this movie, acted with perfectly natural performance by the entire ensemble, Mohsen Makhmalbaf does indeed appear to take on the guise of the Indian gurus who urge us to live in the present. Life is precious, too cherished to spend our moments giving much thought to the past or to plan for the future however close. Think only of the moment. Take in the glorious sounds of nature and of human beings. The most ordinary activities can reverberate like a Verdi masterpiece. In fact, there is no such thing as a mundane moment. The world is an enchanted place of glorious consonance. A little boy can lead you to view it as such, or so says this consummate film.
Not Rated. Running Time: 76 minutes. (C) 1999 Harvey Karten
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


ERRORConnection to PLC lost!Please try to refresh your browser.Automatic attempt to reconnect in 10 seconds...


Fire department truck ploughs into Centurion house
A fire department water tanker crashed into a house in Centurion on Saturday morning, the Tshwane Emergency Services said.
Its deputy chief, Charles Mabaso, said the conditions on the road were slippery and the driver seemed to have lost control of the tanker in Brakfontein.
"Fortunately, none of the occupants of the house were injured," said Mabaso.
The driver was taken to Unitas Hospital after sustaining moderate injuries in the crash.
The trucks cost between R1.8m and R2m.
On Monday, the municipality will look into the factors surrounding the incident as well as to discuss the matter with the home owner.


Many large events require security personnel to prevent the entrance of unruly or disruptive persons and/or removing persons who become unruly, disruptive, or who present a safety risk to others. Staff or contractors providing door security in licensed establishments are required to be licensed under the Security Services Act.
If you will be having security personnel at your event, please answer these questions


US charges Chinese national with industrial espionage
by AFPWASHINGTON: A Chinese national and former Monsanto employee has been charged with industrial espionage and stealing trade secrets, US officials said.
Haitao Xiang was arrested in June 2017 at an airport with a one-way ticket to China and in possession of software developed by the American agribusiness giant to help farmers improve crop yields, the Department of Justice said on Thursday in a statement.
The 42-year-old had worked at Monsanto and its subsidiary The Climate Corporation for nearly 10 years.
The indictment alleges another instance of the Chinese government encouraging “employees to steal intellectual property from their US employers”, Assistant Attorney General John Demers said.
Xiang faces up to 15 years in jail and a $5 million fine for each of the three counts of espionage against him, along with hefty jail terms and fines for three counts of theft of trade secrets.


---
layout: post
title: The life of a bootstrapper - Canada denied me a visitors visa because "I am
too poor"
date: 2012-06-13 16:42:00.000000000 -05:00
comments: true
categories: []
published: true
---
Update: I re-applied with additional information about my business and financial situation and they approved the visa for 2 - 3 years.
I recently applied for a visitors visa to Canada (officially known as a 'Temporary Residents Visa') because my best friend is getting married in July. I went to Canada about 3 years ago for his brother's wedding - around the same time of year - and it was nice. I have been looking forward to the trip.
Granted, I had my suspicions that my application was weaker than it could be - for a number of reasons.
I am a
bootstrapper. A few months ago, I started doing freelance web development to pay the bills. The issue with that is the cash flow fluctuates significantly. So when a good month happens, I have to put aside for slower months.
Needless to say, I couldn't provide a 'job letter' or show any 'proof of employment' to a Jamaican company that requires that I live in Jamaica - because no such thing exists. The best I can do is show company registration documentation, and bank account statements in all my bank accounts (locally, and US-based). Also, the application process has collided with a "slower period" - so the bank statements are not flattering, to say the least.
I don't own where I live, I rent.
I purposely chose not to use my parents as financial support, because...well...I am almost 30 and have 2 kids (with 1 on the way). Plus...I earn my own living (kinda), damnit!
Before deciding to go down this road, I read ENDLESS stories and blog posts about others that have trod a similar path. I debated doing something where I raise money, or bootstrap. I hated the idea of losing control and I seem to have an affinity to doing things the hard way (not that raising money isn't the hard way).
One of the things I didn't quite realize is that even though you are bootstrapping, life doesn't stop. You still need to interact with institutions that don't understand the concept of a bootstrapper or even the startup life or even freelancing.
So let this be another data point you should consider when you think about bootstrapping. I always thought, "nah...that will never happen to me". Seems it's more the rule than the exception.
Now, it seems, I will be missing my best friend's wedding in July.
I read about rock-bottom, but never knew what it felt like. I know you might scoff "Pfftt...I used to live in my car", but compared to what I am accustomed to, these last few months have been pretty damn hard and this almost feels like the nail in the coffin.
I am a pretty private guy, but I didn't know what else to do other than let it all out.
The worst part about this all, is that I can't see myself doing anything else - no matter how tempting it may be.
In other news, I am working on another product that I hope to launch in the coming days/week. If you are a freelancer, and want to find new business leads easier,
follow me on Twitter so you can know when I launch that.
Can't stop, won't stop.
This is the life I chose, or better yet, the life that chose me.


{{ appPanel({ titleText: "Get in touch", html: "If you’ve got a question, idea or suggestion share it on the #moj-design-system-support channel on Slack or email the Design System team on<EMAIL_ADDRESS>}) }}


Help System
Menu for the XCL12 Package
Menu for the XCL12 Package
- convert
- Convert ASCII data base format to STSDAS table format.
- function
- Generate functions as images, tables or lists.
- gfit1d
- Interactive 1-d linear curve fit to images, tables or lists.
- i2gaussfit
- Iterative 2-d Gaussian fit to noisy images (script).
- nfit1d
- Interactive 1-d non-linear curve fit to images, tables or lists.
- ngaussfit
- Interactive 1-d multiple Gaussian fit to images, tables or lists.
- prfit
- Print contents of fit tables created by fitting task.
- (Type
"help fitting option=sysdoc" for general information about the
- (Type
"help nlfit" for more information on the non-linear fitting algorithm.)
- (Type
"help ncfit" for more information on the non-linear interactive tools.)
- (Type
"help icfit" for more information on the linear interactive tools.)


DIE BLAUE STUNDE (THE BLUE HOUR) A film review by Olaf Seibert Copyright 1993 Olaf Seibert
The Swiss film DIE BLAUE STUNDE (Marcel Gisler, 1992) was shown on the Dutch television last Sunday. You may think that this article is a bit late then, but you would have needed to understand either the languages it was spoken in (German and French) or the subtitles (Dutch). Nevertheless, should you come across it, I can recommend it.
The following is taken from the VPRO TV guide.
VPRO Cinema Primeur--DIE BLAUE STUNDE
For a long time the film industry evaded gay life styles. Only in the last few years Hollywood dares to give leading parts to homosexuals, even though it only happens scantly. Alongside of that there has been existing a cinema, in which homosexuals are not considered as controversial people, who foremost cause fear or excitement. Such films originate mostly outside of the Hollywood-studios and European commercial cinema. Sunday night the VPRO will show in the series "Cinema Primeur" an example of such a film, in which for a change homosexuality isn't depicted as something dirty and dark. DIE BLAUE STUNDE, recorded in only thirty days on super 16 and later blown up to theatre size, is for that matter about a shady subject, that of male prostitution.
Main character Theo earns his income as a whore boy and has his working terrain mostly in chic Berlin hotels such as the Steigenberger. Theo's life is dictated by phone calls through a special line from businessmen from out of town, whether married or not.
Director Marcel Gisler (1960) originally wanted to make a documentary about male prostitutes in Berlin. In his research Gisler was mostly touched by the loneliness of the whores, the taboo that rests on their work, stronger than with female prostitutes. Together with actor Andreas Herder and Rudolf Nadler, Gisler processed his experiences to a clear tale in which he places two personalities opposite each other. Separated by the staircase lives in the one apartment the prostitute Theo, a good-looking boy in his twenties who has a on-off relationship with an older, rich composer. Committing too much is what Theo does not want, a night with a boy picked up in a bar is enough for him. His mother he sees only very seldom. "You don't know what you want, do you" says the cashier at the cinema, when he wants to return the ticket he just bought. It characterises Theo's searching existence. In the apartment opposite lives the Frangaise [Fran,caise (for people without Latin-1 characters)] Marie with a shy writer whose novel never gets finished. Theo is exploited with payment by his clients, sales woman Marie feels used by her lazy friend. One day she throws him out the door, after which an impossible love flowers between Theo and Marie.
Both have fears about showing their feelings and take a vulnerable position. Marie knows about Theo's work but doesn't judge it.
 The restrained, sober acting by Andreas Herder as Theo (for which he was awarded the Max Oph|ls [Oph"uls] prize for budding talent) and Dina Leipzig as the slightly older Marie, greatly contribute to the authenticity and almost documentary character of DIE BLAUE STUNDE. (Harry Hosman) Nederland 3, 22.28-23.55.
-- ___ Olaf 'Rhialto' Seibert D787B44DFC896063 4CBB95A5BD1DAA96 \X/ I can bicycle on both sides of the road -<EMAIL_ADDRESS>.
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


The plane in which the earth’s orbit around the sun lies.
Or, the circle in which this plane cuts the celestial sphere; i.e. the sun’s apparent path as seen from the earth.


|
M4521 BSP V3.01.000
The Board Support Package for M4521
|
#include <stdint.h>
Go to the source code of this file.
Macros | |
| #define | DEBUG_PORT UART0 |
| #define | __HSI (12000000UL) |
| #define | __HXT (12000000UL) |
| #define | __LXT (32768UL) |
| #define | __HIRC (22118400UL) |
| #define | __LIRC (10000UL) |
| #define | __SYS_OSC_CLK ( ___HSI) /* Main oscillator frequency */ |
| #define | __SYSTEM_CLOCK (1*__HXT) |
Functions | |
| void | SystemInit (void) |
| Setup the microcontroller system. Initialize the System and update the SystemCoreClock variable. More... | |
| void | SystemCoreClockUpdate (void) |
| Updates the SystemCoreClock with current core Clock retrieved from cpu registers. More... | |
Variables | |
| uint32_t | SystemCoreClock |
| uint32_t | CyclesPerUs |
| uint32_t | PllClock |
| #define __HIRC (22118400UL) |
Internal 22M RC Oscillator Frequency
Definition at line 37 of file system_M4521.h.
| #define __HSI (12000000UL) |
PLL default output is 72MHz
Definition at line 34 of file system_M4521.h.
| #define __HXT (12000000UL) |
External Crystal Clock Frequency
Definition at line 35 of file system_M4521.h.
| #define __LIRC (10000UL) |
Internal 10K RC Oscillator Frequency
Definition at line 38 of file system_M4521.h.
| #define __LXT (32768UL) |
External Crystal Clock Frequency 32.768KHz
Definition at line 36 of file system_M4521.h.
| #define __SYS_OSC_CLK ( ___HSI) /* Main oscillator frequency */ |
Definition at line 39 of file system_M4521.h.
| #define __SYSTEM_CLOCK (1*__HXT) |
Definition at line 42 of file system_M4521.h.
| #define DEBUG_PORT UART0 |
Select Debug Port which is used for retarget.c to output debug message to UART
Definition at line 26 of file system_M4521.h.
| void SystemCoreClockUpdate | ( | void | ) |
Updates the SystemCoreClock with current core Clock retrieved from cpu registers.
Update SystemCoreClock variable
| None |
Definition at line 32 of file system_M4521.c.
| void SystemInit | ( | void | ) |
Setup the microcontroller system. Initialize the System and update the SystemCoreClock variable.
Initialize the system
| None |
Setup the microcontroller system. Initialize the System and update the SystemCoreClock variable.
Initialize the system
| None |
Definition at line 76 of file system_M4521.c.
|
extern |
Cycles per micro second
Definition at line 25 of file system_M4521.c.
|
extern |
PLL Output Clock Frequency
Definition at line 26 of file system_M4521.c.
|
extern |
System Clock Frequency (Core Clock)
System Clock Frequency (Core Clock)
Definition at line 24 of file system_M4521.c.


Three different ways to use next/prev buttons
Vertically centered on both sides
Transparent buttons over the left and right side
100% height with vertically centered icons
View ResponsiveSlides.js documentation


--
:
--
St. Paul
[Weekday]
--
I don't do drugs, I am drugs.
Salvador Dalí
Salvador Dalí
News courtesy of newsapi.org
Weather courtesy of wunderground.com


Our main Install Guide is based upon the Ubuntu 12.04 (LTS) distribution and version. However, other than the distribution packages the install process should be very similar for other distributions.
For some other common distributions, we describe here the required distribution packages, and any other differences we are aware of from our general install guide.
Ubuntu 14.04 has only recently been released and we haven't yet fully migrated over to testing on that platform. These differences also relate to Linux Mint 16. We don't expect any particular problems once SEEK is installed and running, but there are a couple of minor differences that need to be followed.
First, there is an additional package required:
sudo apt-get install libcurl4-gnutls-dev
before running bundle install run the following:
bundle config build.nokogiri --use-system-libraries
This forces the nokogiri gem to rebuild against the newer installed version of LibXML. If you have already run bundle install before reading this, set that variable and then run:
gem uninstall nokogiri bundle install
Following this you can proceed with the standard installation steps.
This installation was carried out using Fedora 20, but most likely also applies, or is a good starting point, for Red Hat Enterprise Linux, CentOS and other Red Hat based Linux distributions.
Many thanks to Jay Moore for his contributed feedback from his own experiences installing SEEK on RHEL.
The package names are quite different for Red Hat and are installed using Yum. The packages you need to install are
sudo yum install mysql-server
This actually installed MariaDB, but it is compatible and not a problem. The rest of the packages (included those for running SEEK with Apache) are installed as follows
sudo yum groupinstall "Development Tools" "Development Libraries" sudo yum install wget curl mercurial ruby openssl-devel openssh-server git readline-devel sudo yum install libxml2-devel libxml++-devel java-1.7.0-openjdk-devel sqlite-devel sudo yum install poppler-utils libreoffice mysql-devel mysql-libs ImageMagick-c++-devel libxslt-devel sudo yum install libtool gawk libyaml-devel autoconf gdbm-devel ncurses-devel automake bison libffi-devel sudo yum install httpd-itk httpd-devel
Install as usual following the INSTALL guide but pay particular attention to any messages it reports about updating your .profile or .bash_profile
As with Linux Mint and Ubuntu 14.04, you should run the following command before running bundle install to make sure Nokogiri is compiled using the installed version of LibXML
bundle config build.nokogiri --use-system-libraries
Fedora installs MariaDB instead of Mysql. You may need to start up the database with:
sudo service mariadb start
To make it start at boot-time (this wasn't enabled by default for me) you should run:
sudo chkconfig mariadb on
To connect to the database to setup the user for SEEK do:
sudo mariadb
Otherwise everything else is the same.
To start and stop Apache you need to use
sudo apachectl start sudo apachectl stop
Also, as with MariaDB, it wasn't set to start at boot-time, so to fix this run:
sudo chkconfig httpd on
The user apache runs under is apache rather than www-data so to create a home directory for that user do:
sudo apachectl stop sudo usermod -d /home/apache apache sudo usermod -s /bin/bash apache sudo mkdir /home/apache sudo chown apache /home/apache sudo apachectl start
and instead of using www-data, to switch to that user use:
sudo su - apache
and then proceed with the normal installation, along with the differences to installing the gems and setting up the database described earlier, until you get to install and setup Passenger Phusion.
Before creating the Passenger module, I first need to set the following variable to ensure it was built using a 64bit architecture
export ARCHFLAGS="-arch x86_64"
and then proceed to run
bundle exec passenger-install-apache2-module
I got some warnings about FORTIFY_SOURCE requires compiling with optimization which I ignored and didn't seem to cause any problems.
At the end compiling and setting up Passenger Phusion, some details about the configuration to apply to Apache are displayed. This should be applied to a config file in /etc/httpd/conf.d/. For e.g. I used a file /etc/httpd/conf.d/seek.conf. You should also remove the other conf files that are put there by default. The contents of this file ended up looking like the following, although yours may differ slightly in terms of the versions used.
LoadModule passenger_module<EMAIL_ADDRESS><IfModule mod_passenger.c> PassengerRoot<EMAIL_ADDRESS>PassengerDefaultRuby /home/apache/.rvm/gems/ruby-2.1.2@seek/wrappers/ruby </IfModule> <VirtualHost *:80> # !!! Be sure to point DocumentRoot to 'public'! DocumentRoot /srv/rails/seek/public <Directory /srv/rails/seek/public> # This relaxes Apache security settings.  Options -MultiViews # Uncomment this if you're on Apache >= 2.4: Require all granted </Directory> </VirtualHost>
Afterwards, apache should be restarted with
sudo apachectl restart
Now, I encountered a permission error with loading the module, which I tracked down as being related to SELinux. To get around this I turned off SELinux with
sudo setenforce 0
There is a description of how to be able to re-enable this at sergiy.kyrylkov.name/2012/02/26/phusion-passenger-with-apache-on-rhel-6-centos-6-sl-6-with-selinux but we have been unable to get this to work.
If you have a solution on how to re-enable SELinux, please contact us. You can find details about how to contact us at seek4science.org/contact
The general packages:
sudo apt-get install wget curl mercurial ruby rdoc ri libopenssl-ruby ruby-dev mysql-server libssl-dev build-essential openssh-server git-core sudo apt-get install libmysqlclient16-dev libmagick++-dev libxslt-dev libxml++2.6-dev openjdk-6-jdk libsqlite3-dev sqlite3 sudo apt-get install poppler-utils openoffice.org openoffice.org-java-common
To avoid being prompted during the Ruby 1.9.3 installation with RVM:
sudo apt-get install libreadline6-dev libyaml-dev autoconf libgdbm-dev libncurses5-dev automake bison libffi-dev
To install the Passenger Phusion module to run SEEK with Apache:
sudo apt-get install apache2-mpm-prefork apache2-prefork-dev libapr1-dev libaprutil1-dev libcurl4-openssl-dev
The command to start soffice is also slightly different, using just single rather than double hyphens for the arguments:
soffice -headless -accept="socket,host=<IP_ADDRESS>,port=8100;urp;" -nofirststartwizard > /dev/null 2>&1 &
If you find the conversion of documents to PDF (for View Content in the browser) is slow, you can install a more recent LibreOffice 3.5 from a separate repository - although this may affect future Operating System upgrades:
sudo apt-get purge openoffice* libreoffice* sudo apt-get install python-software-properties sudo add-apt-repository ppa:libreoffice/libreoffice-3-5 sudo apt-get update sudo apt-get install libreoffice
By default, the user you create for Debian during the installation is not added to the sudoers list. You may want to add your user to the sudo group e.g
adduser fred sudo
more details can be found at wiki.debian.org/sudo
Alternatively, when following the installation run commands that start with sudo as the root user.
The required package names are just the same as for Ubuntu 12.04 - so just follow the install guide.
If you encounter issues related to rvm use - you may need to configure your terminal to run commands as a login shell. There is a checkbox that can be found under the menu Edit, Profile Preferences and then under the tab Title and Command.


{% load livewhale_api %} {% autoescape off %}
Dear {{data.name}},
{{data.created_by.first_name}} {{data.created_by.last_name}} listed you as a reference for his/her application for medical or dental school.
{% get_lw_content as email blurbs 2447 %} {{email.body}} {% endautoescape %}


Stacking context is the three-dimensional conceptualization of HTML elements along an imaginary z-axis relative to the user who is assumed to be facing the viewport or the webpage. HTML elements occupy this space in priority order based on element attributes.
« CSS « Understanding CSS z-index
The stacking context
In the previous example, Adding z-index, the rendering order of certain DIVs is influenced by their z-index value. This occurs because these DIVs have special properties which cause them to form a stacking context.
A stacking context is formed, anywhere in the document, by any element which is either
- the root element (HTML),
- positioned (absolutely or relatively) with a z-index value other than "auto",
- a flex item with a z-index value other than "auto",that is the parent element display: flex|inline-flex,
- elements with an
opacity
value less than 1. (See the specification for opacity), - elements with a
transform
value other than "none", - elements with a
mix-blend-mode
value other than "normal", - elements with a
filter
value other than "none", - elements with a
perspective
value other than "none", - elements with
isolation
set to "isolate", position: fixed
- specifying any attribute above in
even if you don't specify values for these attributes directly (See this post)will-change
- elements with
-webkit-overflow-scrolling
set to "touch"
Within a stacking context, child elements are stacked according to the same rules previously explained. Importantly, the z-index values of its child stacking contexts only have meaning in this parent. Stacking contexts are treated atomically as a single unit in the parent stacking context.
In summary:
- Positioning and assigning a z-index value to an HTML element creates a stacking context, (as does assigning non-full opacity).
- Stacking contexts can be contained in other stacking contexts, and together create a hierarchy of stacking contexts.
- Each stacking context is completely independent from its siblings: only descendant elements are considered when stacking is processed.
- Each stacking context is self-contained: after the element's contents are stacked, the whole element is considered in the stacking order of the parent stacking context.
The example
In this example every positioned element creates its own stacking context, because of their positioning and z-index values. The hierarchy of stacking contexts is organized as follows:
- Root
- DIV #1
- DIV #2
- DIV #3
- DIV #4
- DIV #5
- DIV #6
It is important to note that DIV #4, DIV #5 and DIV #6 are children of DIV #3, so stacking of those elements is completely resolved within DIV#3. Once stacking and rendering within DIV #3 is completed, the whole DIV #3 element is passed for stacking in the root element with respect to its sibling's DIV.
Notes:
- DIV #4 is rendered under DIV #1 because DIV #1's z-index (5) is valid within the stacking context of the root element, while DIV #4's z-index (6) is valid within the stacking context of DIV #3. So, DIV #4 is under DIV #1, because DIV #4 belongs to DIV #3, which has a lower z-index value.
- For the same reason DIV #2 (z-index 2) is rendered under DIV#5 (z-index 1) because DIV #5 belongs to DIV #3, which has an higher z-index value.
- DIV #3's z-index is 4, but this value is independent from z-index of DIV #4, DIV #5 and DIV #6, because it belongs to a different stacking context.
- An easy way to figure out the rendering order of stacked elements along the Z axis is to think of it as a "version number" of sorts, where child elements are minor version numbers underneath their parent's major version numbers. This way we can easily see how an element with a z-index of 1 (DIV #5) is stacked above an element with a z-index of 2 (DIV #2), and how an element with a z-index of 6 (DIV #4) is stacked below an element with a z-index of 5 (DIV #1). In our example (sorted according to the final rendering order):
- Root
- DIV #2 - z-index is 2
- DIV #3 - z-index is 4
- DIV #5 - z-index is 1, stacked under an element with a z-index of 4, which results in a rendering order of 4.1
- DIV #6 - z-index is 3, stacked under an element with a z-index of 4, which results in a rendering order of 4.3
- DIV #4 - z-index is 6, stacked under an element with a z-index of 4, which results in a rendering order of 4.6
- DIV #1 - z-index is 5
- Root
Example
HTML

Division Element #1
 position: relative;
 z-index: 5;

Division Element #2
 position: relative;
 z-index: 2;

Division Element #4
 position: relative;
 z-index: 6;

Division Element #3
 position: absolute;
 z-index: 4;

Division Element #5
 position: relative;
 z-index: 1;

Division Element #6
 position: absolute;
 z-index: 3;

CSS
* { margin: 0; } html { padding: 20px; font: 12px/20px Arial, sans-serif; } div { opacity: 0.7; position: relative; } h1 { font: inherit; font-weight: bold; } #div1, #div2 { border: 1px dashed #696; padding: 10px; background-color: #cfc; } #div1 { z-index: 5; margin-bottom: 190px; } #div2 { z-index: 2; } #div3 { z-index: 4; opacity: 1; position: absolute; top: 40px; left: 180px; width: 330px; border: 1px dashed #900; background-color: #fdd; padding: 40px 20px 20px; } #div4, #div5 { border: 1px dashed #996; background-color: #ffc; } #div4 { z-index: 6; margin-bottom: 15px; padding: 25px 10px 5px; } #div5 { z-index: 1; margin-top: 15px; padding: 5px 10px; } #div6 { z-index: 3; position: absolute; top: 20px; left: 180px; width: 150px; height: 125px; border: 1px dashed #009; padding-top: 125px; background-color: #ddf; text-align: center; }
Result
See also
- Stacking without z-index : Default stacking rules
- Stacking and float : How floating elements are handled
- Adding z-index : Using z-index to change default stacking
- Stacking context example 1 : 2-level HTML hierarchy, z-index on the last level
- Stacking context example 2 : 2-level HTML hierarchy, z-index on all levels
- Stacking context example 3 : 3-level HTML hierarchy, z-index on the second level
Original Document Information
- Author(s): Paolo Lombardi
- This article is the english translation of an article I wrote in italian for YappY. I grant the right to share all the content under Creative Commons: Attribution-Sharealike license
- Last Updated Date: July 9th, 2005


[gecode-users] How to create a text-based interface to Gecode?
Guido Tack
tack at ps.uni-sb.de
Fri Apr 7 15:49:52 CEST 2006
Hi!
> I need to pass runtime to a constraint solver ( Gecode :P ) some
> constraints
> as string and retrieve the possible results. I mean something like that:
> [...]
> In MY_MODULE I could use Gecode... but how? Can you post some small
> examples
> of Gecode use with constraints like the above one?
This is not exactly trivial. You really have to write a parser for the
strings, so that you have a more abstract representation of the
constraints. Then you need to interpret that representation, create
corresponding variables and post the constraints. So, basically, you are
implementing a small modelling language.
Cheers,
Guido
--
Guido Tack
http://www.ps.uni-sb.de/~tack
More information about the gecode-users
mailing list


Web Application Performance
Pillars of Web Performance
Network | Compute | Render
Network
Minimize payload size + round-trip times (RTT)
Turn GZIP on the server
Compress served resources
Test GZIP enabled: Open chrome dev tools -> Network -> Select Resource -> Header. Make sure you have Content-Encoding:gzip in the header.
Enable GZIP on Apache
mod_deflate configuration for Apache 2.x:
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
# Don’t compress
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
#Dealing with proxy servers
<IfModule mod_headers.c>
Header append Vary User-Agent
</IfModule>
</IfModule>
NodeJS + Express
var express = require('express');
var app = express();
app.use(express.compress());
var oneYear =<PHONE_NUMBER>0;
app.use(express.static(__dirname + '/public', { maxAge: oneYear }));
app.listen(process.env.PORT || 3000);
Using a CDN - traditional pattern
Using a CDN - with yepnope
Asynchronous conditional resource loader
Using a CDN - with require.js
JavaScript file and module loader
requirejs.config({
paths: {
jquery: [
'//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min',
'../js/lib/jquery'
]
}
});
//Later
require(['jquery'], function ($) {
});
Images
Over 60% of typical page sizes are images
Use proper image compression
- GIF: animation or transparency (IE6)
- PNG: drawing or if a wide color range is needed with transparency
- JPEG if the image is a photograph.
- WEBP - new standard from google (limited support)
Pick whichever compresses best per image!!!
Tools are available that perform further, lossless compression on JPEG and PNG files, with no effect on image quality
- JPEG: jpegtran or jpegoptim
- PNG: OptiPNG or PNGOUT
- You can use page speed :-)
Create SPRITEs to minimize round trips
Responsive Design?
One size does not fit all!!!
But, there are no perfect solutions
Images in responsive design
Minify JS/CSS/HTML
Downloading smaller files...
Remove duplicate
JS/CSS/HTML/Anything...
Use good modular design practices
Omit the protocol from embedded resources (http:, https:)

Omit optional tags
Not recommended
<!DOCTYPE html>

<title>Sample</title>

Hello World

Recommended
<!DOCTYPE html>
<title>Sample</title>

Hello World

Omit type attribute for styles and scripts

<link type="text/css" rel="stylesheet" href="/foo/style.css"/>

<link rel="stylesheet" href="/foo/style.css"/>

Use shorthand CSS where possible
/* Not recommended */
border-top-style: none;
font-family: palatino, georgia, serif;
font-size: 100%;
line-height: 1.6;
padding-bottom: 2em;
padding-left: 1em;
padding-right: 1em;
padding-top: 0;
/* Recommended */
border-top: 0;
font: 100%/1.6 palatino, georgia, serif;
padding: 0 1em 2em;
Write compressible Javascript
- Avoid global variables (put code in closure)
- Make global variables local (window, undefined, etc)
- Avoid using 'this' too often, assign to 'self' or 'that'
- Study JQuery...
Don't freeze the UI
- 1 thread = if JS is running, nothing else is happening
- Use setTimeout to allow the UI to update when performing long computations
- Use Web Workers if available for long JS work
UI frozen by JS execution
My utility for long-running JS code
Defend against stack overflow and UI blocking
Closures are not cheap
- Reuse functions
- Avoid array.forEach(), JQuery.each(), Y.each(), dojo.forEach, ... when possible
Automatic Garbage Collection
- Runs whenever it wants
- Minimize creation/destruction cycles
- May want to use an object pool
Repaint - also known as redraw - is what happens whenever something is made visible when it was not previously visible, or vice versa, without altering the layout of the document.
-Mark 'Tarquin' Wilton-Jones
When Repaint?
- Change visibility
- Formatting style change (colors, borders, etc)
- When reflow occurs
-Nicholas Zakas
Reflow is the process by which the geometry of the layout engine's formatting objects are computed.
-Chris Waterson
When Reflow?
- Initial page load
- Browser window resize
- DOM nodes added/removed
- Layout style applied
- Layout information retrieved
-Nicholas Zakas
Put stylesheets at the top
Put scripts at the bottom
Don't block page rendering
Reduce DOM elements
Fewer bytes to download
Faster browser performance
Minimize Reflows!!!
Touch the live DOM as little as possible
Example 1 - bad performance
Example 1 - better, but still bad
Browsers are intelligent
Browser has to give you the most up-to-date value when calling:
- offsetTop, offsetLeft, offsetWidth, offsetHeight
- scrollTop/Left/Width/Height
- clientTop/Left/Width/Height
- getComputedStyle(), or currentStyle in IE
Avoid calling these in a loop where css is changed!
Avoid forcing dom reflow
display: none or use DocumentFragments (document.createDocumentFragment())
HTMLCollection Objects - ARE LIVE!
document.images
document.forms
getElementsByTagName()
getElementsByClassName()
-
Nicholas Zakas
Infinite loop!
var divs = document.getElementsByTagName('div'), div;
for(var i = 0; i < divs.length; i++) {
div = document.createElement('div');
divs[i].appendChild(div);
}
HTMLCollection Objects
- Avoid if possible
- Copy to a an array if used often
- Use JQuery, which returns a JS array that is not live
CSS Selectors - use them efficiently
- ID, e.g. #header
- Class, e.g. .promo
- Type, e.g. div
- Adjacent sibling, e.g. h2 + p
- Child, e.g. li > ul
- Descendant, e.g. ul a
- Universal, i.e. *
- Attribute, e.g. [type="text"]
- Pseudo-classes/-elements, e.g. a:hover
-Steve Souders
Browsers read selectors right-to-left!
Select ALL a tags, then check which ones are under #foo and return those
#foo a {...}
The right-most expression is called the 'key'. The key will affect performance the most.
Don't overqualify selectors
If you have this:

Home

Contact

Don't do this:
#nav li a {...}
If you can do this:
#nav a {...}
-Harry Roberts
To prevent reflows, specify the width and height of all images, either in the HTML tag, or in CSS
Credits
- http://google-styleguide.googlecode.com/
- http://developer.yahoo.com/performance/rules.html
- http://www.phpied.com/rendering-repaint-reflowrelayout-restyle/
- http://www.slideshare.net/nzakas/writing-efficient-javascript
- http://csswizardry.com/2011/09/writing-efficient-css-selectors/
- http://stevesouders.com/
Rouben Meschian
rmeschian@gmail.com


Toggle navigation
Menu
GØTREK
Categories
Rainy Day
Active
Out and About
Road Trip
Dare
gØTrek's Picks
About
Forum
Places to go
gØTrek's favorite locations


*Email is required
*Please use suksawat hospital<EMAIL_ADDRESS>*Password is required
*Password must be at least 6 characters


RT @coreyhaines: Lots of love being left for @erniemiller while he's having an orca-otomy! Help us fill up his board: http://t.co/BluZjsyCU…
11/22/2013, 2:24:09 PM
Favs: 0
Retweets: 0
link--- layout: tweet ---
RT @coreyhaines: Lots of love being left for @erniemiller while he's having an orca-otomy! Help us fill up his board: http://t.co/BluZjsyCU…
11/22/2013, 2:24:09 PM
Favs: 0
Retweets: 0
link


Erick Matsen
Note how BAli-Phy can trace the history of each site through
the tree, and the columns are simply a reflection of that.
BAli-Phy is fully Bayesian, so it has a rigorous notion of alignment uncertainty, which can be elegantly summarized by that software:


"HAGIOGRAPHA "the holy writings, a term which came early into use in the Christian church to denote the third division of the Old Testament scriptures, called by the Jews Kethubim, i.e., “Writings.” It consisted of five books, viz., Job, Proverbs, and Psalms, and the two books of Chronicles. The ancient Jews classified their sacred books as the Law, the Prophets, and the Kethubim, or Writings. (See BIBLE.) In the New Testament (Luke 24:44) we find three corresponding divisions, viz., the Law, the Prophets, and the Psalms.
"HAGIOGRAPHA "the holy writings, a term which came early into use in the Christian church to denote the third division of the Old Testament scriptures, called by the Jews Kethubim, i.e., “Writings.” It consisted of five books, viz., Job, Proverbs, and Psalms, and the two books of Chronicles. The ancient Jews classified their sacred books as the Law, the Prophets, and the Kethubim, or Writings. (See BIBLE.) In the New Testament (Luke 24:44) we find three corresponding divisions, viz., the Law, the Prophets, and the Psalms.


Try to upload a DM5 XML file
Dive on {{dive.Dive.StartTime | date:'medium'}}
Temperature: {{dive.Dive.StartTemperature}}°C
Max depth: {{dive.Dive.MaxDepth}}m
Duration: {{dive.Dive.Duration}}s
Upload a file:
Upload Your File


I found my confident in art . I enjoyed working on designs and presentation which made my way in this project a lot more interesting . Doing what I loved .
Science and computers has always managed to pique my curiosity.I enjoyed working on web development and animations which made my way in this project a lot more interesting .
while life on earth has been fine, I couldnt help but wonder what it would be like In space. having done my fair share of research in this area , this competition satiated my need for discovering new topics perfectly
I have always found space intriguing,everything from black holes to Nebular hypothesis facinates me so much that I tend to come out of my comfort zone to discover more. This project gave me an entirely new perspective of balloons


My name is Daniel Parker. I started an open source project called Presenting XML in January 2001. As it turned out, most people that used this tool were interested in, not the web application framework, for which there were more established alternatives, but rather the content transformation capabilities of the console app samples, particularly for transforming flat files to XML and vice versa. As a result of this observation, Serving XML came to be in December 2003.
I have a company called Economic Technology, Inc. I do freelance consulting. I can be reached at<EMAIL_ADDRESS>Contributions to Serving XML are welcome.


Remember me
Sign in
Select port...
Select baud rate...
115200
57600
19200
Other
Select ground station...
CONNECT
DISCONNECT
Signed in as
(log out)
Export to file
Retrieve available messages


Recap: Monad
Monad
is a typeclass with two functions
class Monad m where
return :: a -> m a
(>>=) :: m a -> (a -> m b) -> m
A Maybe
Monad
We can define a Maybe a
type to represent “maybe-null” values
data Maybe val
= Just val -- ^ "Just one value" :-)
| Nothing -- ^ "No value" :-(
A the Monad
instance for Maybe
Can you help me fill this in?
instance Monad Maybe where
(>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b
Nothing >>= _ = ???
Just v) >>= f = ???
(
return :: a -> Result a
return v = ???
Maybe
represents computations that may produce no value
A value of type Maybe a
is either
Nothing
which we can think of as representing failure, orJust x
for somex
of typea
, which we can think of as success
Using Maybe
for computations that may produce no value
We saw how to write an eval
function that doesn’t crash
- But instead gracefully returns a
Nothing
(if there is a div-by-zero)
eval :: Expr -> Maybe Int
Number n) = Just n
eval (Plus e1 e2) = do n1 <- eval e1
eval (<- eval e2
n2 return (v1 + v2)
Div e1 e2) = do n1 <- eval e1
eval (<- eval e2
n2 if n2 == 0
then Nothing
else Just (v1 `div` v2)
Replacing Failure by a List of Successes
Lets generalize the Maybe
monad into a List monad!
Nothing
is the empty list[]
Just v
is the singleton list[v]
… but maybe there’s something sensible for lists with many elements?
QUIZ
Lets make lists an instance of Monad
by:
class Monad m where
return :: a -> m a
(>>=) :: m a -> (a -> m b) -> m b
instance Monad [] where
return = returnForList
>>=) = bindForList (
What must the type of returnForList
be ?
A. [a]
B. a -> a
C. a -> [a]
D. [a] -> a
E. [a] -> [a]
A Monad Instance for Lists
Lets implement the Monad
instance for lists?
-- returnForList :: a -> [a]
= ??? returnForList x
What’s the only sensible implementation?
QUIZ
Lets make lists an instance of Monad
by:
class Monad m where
return :: a -> m a
(>>=) :: m a -> (a -> m b) -> m b
instance Monad [] where
return = returnForList
>>=) = bindForList (
What must the type of bindForList
be?
A.
Lets work it out.
do {x <- ["cat", "dog"]; y <- [0, 1]; return (x, y)}
== ["cat", "dog"] >>= (\x -> [0, 1] >>= (\y -> return (x, y)))
Now lets break up the evaluation
0, 1] >>= (\y -> [(x, y)])
[
==> ((\y -> [(x, y)]) 0) ++ ((\y -> [(x, y)]) 1)
==> [(x, 0)] ++ [(x, 1)]
==> [(x, 0), (x, 1)]
So
"cat", "dog"] >>= (\x -> [(x, 0), (x, 1)])
[
==> (\x -> [(x, 0), (x, 1)]) "cat") ++ (\x -> [(x, 0), (x, 1)]) "dog")
==> [("cat", 0), ("cat", 1)] ++ [("dog", 0), ("dog", 1)]
==> [("cat", 0), ("cat", 1), ("dog", 0), ("dog", 1)]
QUIZ
What does quiz
evaluate to?
= do
foo f xs <- xs
x return (f x)
= foo (\n -> n*n) [0,1,2,3] quiz
A. [0]
B. [0,1,4,9]
C. [9]
D. Type Error E. Runtime Exception
QUIZ
What does the following evaluate to?
triples :: [(Int, Int, Int)]
= do
triples <- [0,1]
x <- [10,11]
y <- [100,101]
z []
A. [(0,10,100), (0,10,101),(1,10,100),(1,10,101),(0,11,100),(0,11,101)]
B. []
C. [[]]
D. [(0,10,100), (1,11,101)]
E. [0,1,10,100,100,101]
EXERCISE: Using the List Monad
A Pythagorean Triple is a
- triple of positive integers
a
,b
,c
- such that
a*a + b*b = c*c
Lets implement a function to return all triples where
a
,b
,c
are between0..n
pyTriples :: Int -> [(Int, Int, Int)]
= do
pyTriples n <- ???
a <- ???
b <- ???
c ???
HINT: You can write [i..j]
to generate the list of numbers between i
and j
>>> [0..5]
0,1,2,3,4,5] [
Using the List Monad
So lets implement a function
bits :: Int -> [String]
Such that
>>> bits 0
[]>>> bits 1
"0", "1"]
[>>> bits 2
"00", "01", "10", "11"]
[
>>> bits 3
"000", "001", "010", "011", "100", "101", "110", "111"] [
Summary
The Maybe
or Result
monad instance
- Conveniently work with computations that may fail
Generalize to List
monad instance
- empty list is failure
- non-empty list is successes
Gives us a for
-loop or iterator for free.


Your Xavier Musketeers are heading to the Final Four! What a historic moment this is for all of Xavier Nation. We could not be more proud of this team, and we could not be more excited for the alumni, fans, friends and supporters of the Xavier community. ALL FOR ONE!
Follow Xavier alumni on Facebook and Twitter for details on how to stay engaged with the Xavier community during this Final Four run.
The All For One Shop has Xavier merchandise to help you show your Xavier pride.
We know many fans are interested in following the Musketeers to Phoenix for the Final Four. You can travel to Phoenix on the Official Xavier Final Four Tour! Your Official Xavier Final Four Travel Packages include combinations of:
• All-Session game ticket
• Charter air
• Accommodations at the official Xavier fan hotel
• Roundtrip game day transportation
• Access to the official Xavier pregame party
• Tournament souvenir
Be a part of this special moment in Xavier history and reserve your spot on the Official Xavier Final Four Tour today! PrimeSport is the Official Ticket and Hospitality Provider of the NCAA.
Congratulations to the entire Xavier community. Celebrate this moment! As always, Let’s Go X!


{% extends 'layout.html' %} {% block body %}
Stay up-to-date with the world's latest space launches
{{launch.mission}}
{{launch.location}}
{{launch.description}}


Review Rating : {{myObject.reviewStars}}
Review Comments : {{myObject.reviewComments}}
Review Author : {{myObject.reviewAuthor}}


Commons leader Chris Grayling said full details of the transitional tax credit relief would be announced at the end of November in the chancellor's Autumn Statement - the government need to find up to £4.4bn to cover the cost of the climb down.
Mr Grayling told BBC Radio 4's Today programme the government "mustn't be distracted from our overall economic strategy".
Tax credits were introduced by the last Labour government to help low-paid families. Under the government's plans, the income threshold for receiving Working Tax Credits and Child Tax Credit is due to be cut from April.
Critics say the move could deprive low-income workers of up to £1,300 a year.
But the government says it is essential to tackle the deficit and argues most claimants will be better off when other changes, such as the introduction of the new national living wage, are taken into account.


cdemi's
24 August 2021 |
.NET #dotNet |
Faster .NET? Monster post by Microsoft software engineer shows serious improvements (theregister.com) Microsoft .Net |
| Essential reading for developers in search of performance and efficiency... Read more |
Carter Community for ASP.NET Core means enjoyable Web APIs on the cutting edge (hanselman.com) ASP.NET DotNetCore Open Source |
| I blogged about the open source Carter Community Project in 2019. Let's check ...... Read more |
Front End |
HTTP/3: Performance Improvements (Part 2) (smashingmagazine.com) Performance Security Browsers Guides |
| After almost five years in development, the new HTTP/3 protocol is nearing its final form. Let’s take a close look at the performance improvements of HTTP/3, congestion control, head-of-line-blocking, and 0-RTT connection set-up.... Read more |
Kubernetes #k8s |
Top Open Source Kubernetes Security Tools of 2021 (content.cloud.redhat.com) |
| Below, you will find the top eight most popular open source Kubernetes security tools identified by our survey respondents.... Read more |
Security #InfoSec |
What is realtime phishing? (phishdeck.com) |
| Realtime phishing is a novel phishing attack that tricks a victim into visiting an intermediary server controlled by an attacker pretending to be the real thing... Read more |
Hiring your Team in your First 100 Days (dianeabela.com) |
| You’ve just taken on the role of Information Security leader in an organisation. You’ve started to build an understanding of the business and what your objectives should be for the next 100; 200; 300 days. As your goals become clearer, you will need to start thinking...... Read more |
|
This newsletter is made with 💖 by cdemi and sponsored by moo Research. You can find this MIT Licensed open-source project on GitHub cdemi/NewsletterCurator. Generated with version <IP_ADDRESS>. You can also find an archive of all sent newsletters on GitHub at https://newsletters.cdemi.io/. If you want to unsubscribe from this newsletter, please click here. If you're new and you want to subscribe to this newsletter, please click here. |


{block name="title"}
{/block}
{include file="index/header" /} {include file="index/left" /}
{block name="content"} {/block}
{include file="index/footer"}


Dev Tool %1$s
By: Dennis Lang
Contact<EMAIL_ADDRESS>Developer tool to display various aspects of the Android enviroment.
Themes
Text / Font - click to measure size
Build - Global OS variables
Built-in Bitmap image resources
Types: b=Bitmap,s=Stateable,l=Layers,a=Animation
Click on image row for more details
IconDraw android.R.drawable.* images
IconAttr android.R.attr.* images
MiscAttr android.R.attr.* non-images
Screen - Screen dimensions
%2$s
CompileSdk: %3$s BuildTools:%4$s


{% extends 'zendesk_support_dashboard/tickets/zendesksupportbase.html' %} {% load i18n %} {% comment %} * File Name: ticket_detail.html * * Template Name: zendesk_support_dashboard/ticket/ticket_detail.html * * This file is created to handle the view of the zendesk ticket detail * * Start Date: 16th July 2016 * * Copyright<EMAIL_ADDRESS>{% endcomment %} {% block title %}{% trans page_title %}{% endblock %} {% block page_header %}


WS-Bridge
SOAP REST Web Service Bridge
Home
Routes
Configure
Help
How To
About
SOAP Action:
JSON Content:
{OperatingCompanyList:[{CompanyCode:"01"}]}
Send JSON
SOAP Content:
Send SOAP


John Smith @johnsmith 31m
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean efficitur sit amet massa fringilla egestas. Nullam condimentum luctus turpis.
Tabs
Select the tab style
Modals
Default modal
Stop!  Cause explosive decompression!
If rubbin' frozen dirt in your crotch is wrong, hey I don't wanna be right. Aww, it's true. I've been hiding it for so long. Can I use the gun? Yeah, and if you were the pope they'd be all, "Straighten your pope hat." And "Put on your good vestments."
But, like most politicians, he promised more than he could deliver. Is that a cooking show? Leela, are you alright? You got wanged on the head. For example, if you killed your grandfather, you'd cease to exist!
Primary modal
Stop!  Cause explosive decompression!
If rubbin' frozen dirt in your crotch is wrong, hey I don't wanna be right. Aww, it's true. I've been hiding it for so long. Can I use the gun? Yeah, and if you were the pope they'd be all, "Straighten your pope hat." And "Put on your good vestments."
But, like most politicians, he promised more than he could deliver. Is that a cooking show? Leela, are you alright? You got wanged on the head. For example, if you killed your grandfather, you'd cease to exist!
Info modal
Stop!  Cause explosive decompression!
If rubbin' frozen dirt in your crotch is wrong, hey I don't wanna be right. Aww, it's true. I've been hiding it for so long. Can I use the gun? Yeah, and if you were the pope they'd be all, "Straighten your pope hat." And "Put on your good vestments."
But, like most politicians, he promised more than he could deliver. Is that a cooking show? Leela, are you alright? You got wanged on the head. For example, if you killed your grandfather, you'd cease to exist!
Warning modal
Stop!  Cause explosive decompression!
If rubbin' frozen dirt in your crotch is wrong, hey I don't wanna be right. Aww, it's true. I've been hiding it for so long. Can I use the gun? Yeah, and if you were the pope they'd be all, "Straighten your pope hat." And "Put on your good vestments."
But, like most politicians, he promised more than he could deliver. Is that a cooking show? Leela, are you alright? You got wanged on the head. For example, if you killed your grandfather, you'd cease to exist!
Success modal
Stop!  Cause explosive decompression!
If rubbin' frozen dirt in your crotch is wrong, hey I don't wanna be right. Aww, it's true. I've been hiding it for so long. Can I use the gun? Yeah, and if you were the pope they'd be all, "Straighten your pope hat." And "Put on your good vestments."
But, like most politicians, he promised more than he could deliver. Is that a cooking show? Leela, are you alright? You got wanged on the head. For example, if you killed your grandfather, you'd cease to exist!
Danger modal
Stop!  Cause explosive decompression!
If rubbin' frozen dirt in your crotch is wrong, hey I don't wanna be right. Aww, it's true. I've been hiding it for so long. Can I use the gun? Yeah, and if you were the pope they'd be all, "Straighten your pope hat." And "Put on your good vestments."
But, like most politicians, he promised more than he could deliver. Is that a cooking show? Leela, are you alright? You got wanged on the head. For example, if you killed your grandfather, you'd cease to exist!
Inputs Ranger
Colors
Sizes


WITNESS LIST Criminal Justice Committee May 3, 2005 - 1:30P HB 225 Registering, but not testifying: For: Elkin, Bill Executive Director (Houston Police Retired Officers Association), Houston, TX Mica, Tara Lobbyist (NRA), Austin, TX Tripp, Alice Lobbyist (Texas State Rifle), Paige, TX HB 268 AGAINST: Beardoll, Bill Executive Director (Equal Justice Center), Austin, TX Blazek, Frank Attorney (Self), Huntsville, TX Marsh, Andrea Director, Fair Defense Project (ACLU), Austin, TX Niland, John Capital Trial Project (Texas Defender Services), Austin, TX Registering, but not testifying: Against: Gonzales, Dominic Director of Outreach (Texas Criminal Justice Coalition), Austin, TX Paynter, Suzii Director of Public Policy (Christian Life Commission), Austin, TX On: Keller, Sharon Chairman (Task Force on Indigent Defense), Austin, TX Shackelford, Wesley Special Counsel (Task Force on Indigent Defense), Austin, TX HB 546 FOR: Rosenthal, Charles A. District Attorney, Harris County (Harris County DA's Office), Houston, TX Registering, but not testifying: For: Chapusenaux, Edwin Deputy (Harris County Sheriff's Office), Houston, TX Staney, William Lieutenant (Houston Police Department), Houston, TX On: Girardet, Rebecca MD, Assistant Professor (University of Texas, Houston Medical Center), Houston, TX Lahoti, Sheila MD (University of Texas, Houston Health Science Center), Houston, TX McNeese, Margeret Professor, Pediatrics (University of Texas, Medical School Houston), Houston, TX HB 1239 FOR: Henson, Scott (American Civil Liberties Union), Austin, TX AGAINST: Jones, Jana District Attorney (271st District Attorney), Decatur, TX Registering, but not testifying: For: Gonzales, Dominic Director of Outreach (Texas Criminal Justice Coalition), Austin, TX Against: Kirk, Chris Brazos County Sheriff (Sheriff's Association of Texas), Bryan, TX On: Brubaker, James Commander (Texas Department of Public Safety), Austin, TX O'Burke, Patrick Deputy Commander (Texas DPS Network), Austin, TX HB 1326 Registering, but not testifying: For: Loethen, Glenn Executive Director, Deputy Director (Harris County Community Supervision and Corrections Department), Houston, TX On: Harris, David Assistant Attorney General (Texas Attorney General), Austin, TX HB 1695 Registering, but not testifying: For: Gonzales, Dominic (Texas Criminal Justice Coalition), Austin, TX Small, Ed Attorney (Texas and Southwestern Cattle Raisers), Austin, TX HB 1759 FOR: Diepraam, Warren Assistant District Attorney (Harris County DA's Office), Houston, TX Registering, but not testifying: For: Del Llano, Ann Attorney (ACLU), Austin, TX Rosenthal, Charles A. District Attorney, Harris County (Harris County DA's Office), Houston, TX SB 615 FOR: Lowery, Mark Special Agent in charge of Dallas District (US Secret Service), Irving, TX Melis, Alberto Chief of Police (Waco Police Department), Waco, TX Registering, but not testifying: For: Jones, Chris (CLEAT), Austin, TX Plemons, Randy Chief Deputy (McLennan County Sheriff's Office), Waco, TX Roberts, Douglas Paul Resident Agent in Charge (United States Secret Service), Waco, TX Smith, Robert Assistant to Chief (Woodway Public Safety), Woodway, TX SB 816 FOR: Jones, Chris (CLEAT), Austin, TX SB 951 Registering, but not testifying: For: Burns, Kevin Commissioner (County of Wise), Decatur, TX Walker, David Sheriff (Wise County), Decatur, TX SB 1182 FOR: Haynes, Huel Analyst (DPS), Austin, TX Registering, but not testifying: For: Jones, Jana District Attorney (271st District Attorney), Decatur, TX Molter, Michele (Texas Apartment Association), Austin, TX Watson, Rick Lieutenant (Dallas Police Department), Dallas, TX SB 1293 ON: Meraz, Gloria Director of Communications (Texas Library Association), Austin, TX


--- layout: post title: "A More Sophisticated Demo for bs-wizard Plugin" category : "GitHub Project" tags : [Wizard, CoffeeScript, Bootstrap, Popover, jQuery, Validate] css: [bs-wizard-min] js: [bs-wizard, jQuery.validate, jvb.popover, bs-wizard-demo2] --- {% include JB/setup %}
This is a more sophisticated demo for GitHub project bs-wizard, it uses jquery.validate.bootstrap.popover for validating. Live example:
To initialize the wizard, just do this (before_next is a customized function that you can intercept the wizard flow):
$(function() {
$(".bs-wizard").bs_wizard({beforeNext: before_next});
});
Here is the basic html code:


The map below shows where today's college football players come from. Counties that are shaded in darker colors are home to more players than counties in lighter shades. No players reported a grey county as their home.
The buttons on the right filter players by conference, college, or position. To adjust for population size, you can change the map so that county shades are based on the number of players as a percent of each county's college-aged male population.


Loading...
arrow_back
Settings
arrow_back
Map
more_vert
Map Location
Settings
Today, March 24
10°
10°
Clouds
Loading...


RedTool
Home
Contact us
Sign Up
Red
Tool
Username
Password
Login
Copyright © 2019 RedTool made by TinyCorp


In the Big Data era, data is not only becoming bigger and bigger; it is also becoming more and more complex. This translates into a spectacular increase of the dimensionality of the data. For example, the dimensionality of a set of images is the number of pixels in any image, which ranges from thousands to millions.
Computers have no problem processing that many dimensions. However, we humans are limited to three dimensions. Computers still need us (thankfully), so we often need ways to effectively visualize high-dimensional data before handing it over to the computer.
How can we possibly reduce the dimensionality of a dataset from an arbitrary number to two or three, which is what we're doing when we visualize data on a screen?
The answer lies in the observation that many real-world datasets have a low intrinsic dimensionality, even though they're embedded in a high-dimensional space. Imagine that you're shooting a panoramic landscape with your camera, while rotating around yourself. We can consider every picture as a point in a 16,000,000-dimensional space (assuming a 16 megapixels camera). Yet, the set of pictures approximately lie in a three-dimensional space (yaw, pitch, roll). This low-dimensional space is embedded within the high-dimensional space in a complex, nonlinear way. Hidden in the data, this structure can only be recovered via specific mathematical methods.
This is the topic of manifold learning, also called nonlinear dimensionality reduction, a branch of machine learning (more specifically, unsupervised learning). It is still an active area of research today to develop algorithms that can automatically recover a hidden structure in a high-dimensional dataset.
This post is an introduction to a popular dimensonality reduction algorithm: t-distributed stochastic neighbor embedding (t-SNE). Developed by Laurens van der Maaten and Geoffrey Hinton (see the original paper here), this algorithm has been successfully applied to many real-world datasets. Here, we'll follow the original paper and describe the key mathematical concepts of the method, when applied to a toy dataset (handwritten digits). We'll use Python and the scikit-learn library.
Let's first import a few libraries.
# That's an impressive list of imports. import numpy as np from numpy import linalg from numpy.linalg import norm from scipy.spatial.distance import squareform, pdist # We import sklearn. import sklearn from sklearn.manifold import TSNE from sklearn.datasets import load_digits from sklearn.preprocessing import scale # We'll hack a bit with the t-SNE code in sklearn 0.15.2. from sklearn.metrics.pairwise import pairwise_distances from sklearn.manifold.t_sne import (_joint_probabilities, _kl_divergence) from sklearn.utils.extmath import _ravel # Random state. RS = 20150101 # We'll use matplotlib for graphics. import matplotlib.pyplot as plt import matplotlib.patheffects as PathEffects import matplotlib %matplotlib inline # We import seaborn to make nice plots. import seaborn as sns sns.set_style('darkgrid') sns.set_palette('muted') sns.set_context("notebook", font_scale=1.5, rc={"lines.linewidth": 2.5}) # We'll generate an animation with matplotlib and moviepy. from moviepy.video.io.bindings import mplfig_to_npimage import moviepy.editor as mpy
Now we load the classic handwritten digits datasets. It contains 1797 images with \(8*8=64\) pixels each.
digits = load_digits() digits.data.shape
print(digits['DESCR'])
Here are the images:
nrows, ncols = 2, 5 plt.figure(figsize=(6,3)) plt.gray() for i in range(ncols * nrows): ax = plt.subplot(nrows, ncols, i + 1) ax.matshow(digits.images[i,...]) plt.xticks([]); plt.yticks([]) plt.title(digits.target[i]) plt.savefig('images/digits.png', dpi=150)
Now let's run the t-SNE algorithm on the dataset. It just takes one line with scikit-learn.
# We first reorder the data points according to the handwritten numbers. X = np.vstack([digits.data[digits.target==i] for i in range(10)]) y = np.hstack([digits.target[digits.target==i] for i in range(10)])
digits_proj = TSNE(random_state=RS).fit_transform(X)
Here is a utility function used to display the transformed dataset. The color of each point refers to the actual digit (of course, this information was not used by the dimensionality reduction algorithm).
def scatter(x, colors): # We choose a color palette with seaborn. palette = np.array(sns.color_palette("hls", 10)) # We create a scatter plot. f = plt.figure(figsize=(8, 8)) ax = plt.subplot(aspect='equal') sc = ax.scatter(x[:,0], x[:,1], lw=0, s=40, c=palette[colors.astype(np.int)]) plt.xlim(-25, 25) plt.ylim(-25, 25) ax.axis('off') ax.axis('tight') # We add the labels for each digit. txts = [] for i in range(10): # Position of each label. xtext, ytext = np.median(x[colors == i, :], axis=0) txt = ax.text(xtext, ytext, str(i), fontsize=24) txt.set_path_effects([ PathEffects.Stroke(linewidth=5, foreground="w"), PathEffects.Normal()]) txts.append(txt) return f, ax, sc, txts
Here is the result.
scatter(digits_proj, y) plt.savefig('images/digits_tsne.png', dpi=120)
We observe that the images corresponding to the different digits are clearly separated into different clusters of points.
Let's explain how the algorithm works. First, a few definitions.
A data point is a point \(x_i\) in the original data space \(\mathbf{R}^D\), where \(D=64\) is the dimensionality of the data space. Every point is an image of a handwritten digit here. There are \(N=1797\) points.
A map point is a point \(y_i\) in the map space \(\mathbf{R}^2\). This space will contain our final representation of the dataset. There is a bijection between the data points and the map points: every map point represents one of the original images.
How do we choose the positions of the map points? We want to conserve the structure of the data. More specifically, if two data points are close together, we want the two corresponding map points to be close too. Let's \(\left| x_i - x_j \right|\) be the Euclidean distance between two data points, and \(\left| y_i - y_j \right|\) the distance between the map points. We first define a conditional similarity between the two data points:
(p_{j|i} = \frac{\exp\left(-\left| x_i - x_j\right|^2 \big/ 2\sigma_i^2\right)}{\displaystyle\sum_{k \neq i} \exp\left(-\left| x_i - x_k\right|^2 \big/ 2\sigma_i^2\right)})
This measures how close \(x_j\) is from \(x_i\), considering a Gaussian distribution around \(x_i\) with a given variance \(\sigma_i^2\). This variance is different for every point; it is chosen such that points in dense areas are given a smaller variance than points in sparse areas. The original paper details how this variance is computed exactly.
Now, we define the similarity as a symmetrized version of the conditional similarity:
(p_{ij} = \frac{p_{j|i} + p_{i|j}}{2N})
We obtain a similarity matrix for our original dataset. What does this matrix look like?
The following function computes the similarity with a constant \(\sigma\).
def _joint_probabilities_constant_sigma(D, sigma): P = np.exp(-D**2/2 * sigma**2) P /= np.sum(P, axis=1) return P
We now compute the similarity with a \(\sigma_i\) depending on the data point (found via a binary search, according to the original t-SNE paper). This algorithm is implemented in the _joint_probabilities
private function in scikit-learn's code.
# Pairwise distances between all data points. D = pairwise_distances(X, squared=True) # Similarity with constant sigma. P_constant = _joint_probabilities_constant_sigma(D, .002) # Similarity with variable sigma. P_binary = _joint_probabilities(D, 30., False) # The output of this function needs to be reshaped to a square matrix. P_binary_s = squareform(P_binary)
We can now display the distance matrix of the data points, and the similarity matrix with both a constant and variable sigma.
plt.figure(figsize=(12, 4)) pal = sns.light_palette("blue", as_cmap=True) plt.subplot(131) plt.imshow(D[::10, ::10], interpolation='none', cmap=pal) plt.axis('off') plt.title("Distance matrix", fontdict={'fontsize': 16}) plt.subplot(132) plt.imshow(P_constant[::10, ::10], interpolation='none', cmap=pal) plt.axis('off') plt.title("$p_{j|i}$ (constant $\sigma$)", fontdict={'fontsize': 16}) plt.subplot(133) plt.imshow(P_binary_s[::10, ::10], interpolation='none', cmap=pal) plt.axis('off') plt.title("$p_{j|i}$ (variable $\sigma$)", fontdict={'fontsize': 16}) plt.savefig('images/similarity.png', dpi=120)
We can already observe the 10 groups in the data, corresponding to the 10 numbers.
Let's also define a similarity matrix for our map points.
(q_{ij} = \frac{f(\left| x_i - x_j\right|)}{\displaystyle\sum_{k \neq i} f(\left| x_i - x_k\right|)} \quad \textrm{with} \quad f(z) = \frac{1}{1+z^2})
This is the same idea as for the data points, but with a different distribution (t-Student with one degree of freedom, or Cauchy distribution, instead of a Gaussian distribution). We'll elaborate on this choice later.
Whereas the data similarity matrix \(\big(p_{ij}\big)\) is fixed, the map similarity matrix \(\big(q_{ij}\big)\) depends on the map points. What we want is for these two matrices to be as close as possible. This would mean that similar data points yield similar map points.
Let's assume that our map points are all connected with springs. The stiffness of a spring connecting points \(i\) and \(j\) depends on the mismatch between the similarity of the two data points and the similarity of the two map points, that is, \(p_{ij} - q_{ij}\). Now, we let the system evolve according to the laws of physics. If two map points are far apart while the data points are close, they are attracted together. If they are nearby while the data points are dissimilar, they are repelled.
The final mapping is obtained when the equilibrium is reached.
Here is an illustration of a dynamic graph layout based on a similar idea. Nodes are connected via springs and the system evolves according to law of physics (example by Mike Bostock).
Remarkably, this physical analogy stems naturally from the mathematical algorithm. It corresponds to minimizing the Kullback-Leiber divergence between the two distributions \(\big(p_{ij}\big)\) and \(\big(q_{ij}\big)\):
\(KL(P||Q) = \sum_{i, j} p_{ij} \, \log \frac{p_{ij}}{q_{ij}}.\)
This measures the distance between our two similarity matrices.
To minimize this score, we perform a gradient descent. The gradient can be computed analytically:
\(\frac{\partial \, KL(P || Q)}{\partial y_i} = 4 \sum_j (p_{ij} - q_{ij}) g\left( \left| x_i - x_j\right| \right) u_{ij} \quad \textrm{where} \, g(z) = \frac{z}{1+z^2}.\)
Here, \(u_{ij}\) is a unit vector going from \(y_j\) to \(y_i\). This gradient expresses the sum of all spring forces applied to map point \(i\).
Let’s illustrate this process by creating an animation of the convergence. We’ll have to monkey-patch the internal _gradient_descent()
function from scikit-learn’s t-SNE implementation in order to register the position of the map points at every iteration.
# This list will contain the positions of the map points at every iteration. positions = [] def _gradient_descent(objective, p0, it, n_iter, n_iter_without_progress=30, momentum=0.5, learning_rate=1000.0, min_gain=0.01, min_grad_norm=1e-7, min_error_diff=1e-7, verbose=0, args=[]): # The documentation of this function can be found in scikit-learn's code. p = p0.copy().ravel() update = np.zeros_like(p) gains = np.ones_like(p) error = np.finfo(np.float).max best_error = np.finfo(np.float).max best_iter = 0 for i in range(it, n_iter): # We save the current position. positions.append(p.copy()) new_error, grad = objective(p, *args) error_diff = np.abs(new_error - error) error = new_error grad_norm = linalg.norm(grad) if error < best_error: best_error = error best_iter = i elif i - best_iter > n_iter_without_progress: break if min_grad_norm >= grad_norm: break if min_error_diff >= error_diff: break inc = update * grad >= 0.0 dec = np.invert(inc) gains[inc] += 0.05 gains[dec] *= 0.95 np.clip(gains, min_gain, np.inf) grad *= gains update = momentum * update - learning_rate * grad p += update return p, error, i sklearn.manifold.t_sne._gradient_descent = _gradient_descent
Let’s run the algorithm again, but this time saving all intermediate positions.
X_proj = TSNE(random_state=RS).fit_transform(X)
X_iter = np.dstack(position.reshape(-1, 2) for position in positions)
We create an animation using MoviePy.
f, ax, sc, txts = scatter(X_iter[..., -1], y) def make_frame_mpl(t): i = int(t*40) x = X_iter[..., i] sc.set_offsets(x) for j, txt in zip(range(10), txts): xtext, ytext = np.median(x[y == j, :], axis=0) txt.set_x(xtext) txt.set_y(ytext) return mplfig_to_npimage(f) animation = mpy.VideoClip(make_frame_mpl, duration=X_iter.shape[2]/40.) animation.write_gif("images/animation.gif", fps=20)
We can clearly observe the different phases of the optimization, as described in the original paper.
Let’s also create an animation of the similarity matrix of the map points. We’ll observe that it’s getting closer and closer to the similarity matrix of the data points.
n = 1. / (pdist(X_iter[..., -1], "sqeuclidean") + 1) Q = n / (2.0 * np.sum(n)) Q = squareform(Q) f = plt.figure(figsize=(6, 6)) ax = plt.subplot(aspect='equal') im = ax.imshow(Q, interpolation='none', cmap=pal) plt.axis('tight') plt.axis('off') def make_frame_mpl(t): i = int(t*40) n = 1. / (pdist(X_iter[..., i], "sqeuclidean") + 1) Q = n / (2.0 * np.sum(n)) Q = squareform(Q) im.set_data(Q) return mplfig_to_npimage(f) animation = mpy.VideoClip(make_frame_mpl, duration=X_iter.shape[2]/40.) animation.write_gif("images/animation_matrix.gif", fps=20)
Let’s now explain the choice of the t-Student distribution for the map points, while a normal distribution is used for the data points. It is well known that the volume of the \(N\)-dimensional ball of radius \(r\) scales as \(r^N\). When \(N\) is large, if we pick random points uniformly in the ball, most points will be close to the surface, and very few will be near the center.
This is illustrated by the following simulation, showing the distribution of the distances of these points, for different dimensions.
npoints = 1000 plt.figure(figsize=(15, 4)) for i, D in enumerate((2, 5, 10)): # Normally distributed points. u = np.random.randn(npoints, D) # Now on the sphere. u /= norm(u, axis=1)[:, None] # Uniform radius. r = np.random.rand(npoints, 1) # Uniformly within the ball. points = u * r**(1./D) # Plot. ax = plt.subplot(1, 3, i+1) ax.set_xlabel('Ball radius') if i == 0: ax.set_ylabel('Distance from origin') ax.hist(norm(points, axis=1), bins=np.linspace(0., 1., 50)) ax.set_title('D=%d' % D, loc='left') plt.savefig('images/spheres.png', dpi=100, bbox_inches='tight')
When reducing the dimensionality of a dataset, if we used the same Gaussian distribution for the data points and the map points, we would get an imbalance in the distribution of the distances of a point’s neighbors. This is because the distribution of the distances is so different between a high-dimensional space and a low-dimensional space. Yet, the algorithm tries to reproduce the same distances in the two spaces. This imbalance would lead to an excess of attraction forces and a sometimes unappealing mapping. This is actually what happens in the original SNE algorithm, by Hinton and Roweis (2002).
The t-SNE algorithm works around this problem by using a t-Student with one degree of freedom (or Cauchy) distribution for the map points. This distribution has a much heavier tail than the Gaussian distribution, which compensates the original imbalance. For a given similarity between two data points, the two corresponding map points will need to be much further apart in order for their similarity to match the data similarity. This can be seen in the following plot.
z = np.linspace(0., 5., 1000) gauss = np.exp(-z**2) cauchy = 1/(1+z**2) plt.plot(z, gauss, label='Gaussian distribution') plt.plot(z, cauchy, label='Cauchy distribution') plt.legend() plt.savefig('images/distributions.png', dpi=100)
Using this distribution leads to more effective data visualizations, where clusters of points are more distinctly separated.
The t-SNE algorithm provides an effective method to visualize a complex dataset. It successfully uncovers hidden structures in the data, exposing natural clusters and smooth nonlinear variations along the dimensions. It has been implemented in many languages, including Python, and it can be easily used thanks to the scikit-learn library.
The references below describe some optimizations and improvements that can be made to the algorithm and implementations. In particular, the algorithm described here is quadratic in the number of samples, which makes it unscalable to large datasets. One could for example obtain an \(O(N \log N)\) complexity by using the Barnes-Hut algorithm to accelerate the N-body simulation via a quadtree or an octree.


Change logs
The history of the project's development is covered in more detail in the releases information on the GitHub project. Below is an overview:
Historic change logs
1.3.2 -
- Updated URL parsing module
1.3.1 -
- Added modern version of code without polyfills
1.3.0 -
- Removed 'alternate' structures as per specification change Sept 2015
1.2.0 -
- Updated backward compatibility parsing. Now blocks overlapping properties from different microformat versions and sets implied properties by microformat version
1.1.4 -
- Added options.html support for
get
andcount
1.1.1 -
- Upgraded backwards compatible parsing options
1.1.0 -
- Added support for v1 title to job-title
1.0.2 -
- Updated test structure for Firefox and browser support info in readme.md
1.0.0 -
- Updated to latest tests and made ready for use in Firefox
0.3.1 -
- Added relative URL expandition within HTML
0.3.0 -
- Full rewrite of code to provide microformats 2 parser
0.2.4 -
- Merge of Fabian Beiner changes.  SHA a8bab70a758bcf76e493a9b007726e9a5c1b170f
0.2.4 -
- Pull request - Checks if given element is already a vcard element. (Fabian Beiner)
0.2.3 -
- Add hResume draft spec 'competency' support and corrected output for child tag structures
0.2.2 -
- A small speed increase for browsers that support querySelectorAll
0.2.1 -
- A small speed increase
- Ran parser code through JSLint
- Corrected a number of edge case parsing problems
0.2 -
- Packaged the returned data using ufJSON schema Note: breaks with the original output schema
- Added simple error reporting
- Corrected hCard extended-street property so it returns an array
- Improved the hResume definition
- Reorganized the parser code to make it clear what are public and private methods
- Wrapped all definitions so they were not in the global scope
0.1 -
- Public on GitHub


By clicking the button below you will get Alex's first and maybe most important lesson of all: "The Getting Clear on your Goals Lesson"
You'd be stunned by how many devoted guitarists never actually think about what they want to accomplish and then wonder why their skills aren't where they want them to be.
This lesson, in the form of a survey, is designed to ask you the tough questions now so you're not spinning your wheels later. It won't be quick or easy but if you give it your best, by the end you will have officially begun the process of getting clear on what you want to accomplish.
"With his unique method Alex brought my technique to a new level. Alex is a patient, positive and encouraging teacher who has helped raise my confidence as a guitar player.
-Jeff Brown
"Alex is an excellent instructor: professional, patient and kind -- week after week. He has a great desire to see his students succeed, so he assigns very thoughtful, well laid out homework exercises with this in mind. To boot, he is a significant role model for my son Jake, someone we are grateful to call a friend to our family."
-Allie Dodson (mother of Jake)


Arctic Wild
schedule
destinations
activities
planning
about
contact
Enjoy the Solitude & Solace of
Arctic Wild
rafting trips
Base Camp Trips
Backpacking Trips
canoe trips
photography trips
custom trips


|
|||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
| Interface Summary | |
|---|---|
| Evaluator | |
| ParametersControl | |
| Route | An specific route rule. |
| RouteBuilder | |
| RouteBuilder.ParameterControlBuilder | |
| Router | Handles different rules in order to translate urls into Resource methods. |
| RoutesConfiguration | Configs your routes for your application. |
| RoutesParser | Extracts all possible routes for this specific resource. |
| TypeFinder | Discover Types from parameter paths |
| Class Summary | |
|---|---|
| DefaultParametersControl | Default implementation of parameters control on uris. |
| DefaultRouteBuilder | Should be used in one of two ways, either configure the type and invoke the method or pass the method (java reflection) object. |
| DefaultRouter | The default implementation of resource localization rules. |
| DefaultTypeFinder | Discover parameter types |
| FixedMethodStrategy | A route strategy which invokes a fixed type's method. |
| JavaEvaluator | Evaluates expressions in order to access values. |
| NoRoutesConfiguration | No extra routes are registered. |
| NoRoutesParser | Generates no routes for any resource. |
| NoStrategy | A route strategy which is basically invalid in order to force users to not forget to decide a route strategy. |
| NoTypeFinder | |
| PathAnnotationRoutesParser | The default parser routes creator uses the path annotation to create rules. |
| PatternBasedStrategy | Deprecated. |
| PatternBasedType | Deprecated. Use @Path instead. |
| PriorityRoutesList | Order Routes by priority |
| Rules | Rules for resource localization. |
| Exception Summary | |
|---|---|
| IllegalRouteException | Illegal routes might be created under different situations. |
| MethodNotAllowedException | Exception thrown when no routes matching given URI allow given HTTP method. |
| ResourceNotFoundException | Exception thrown when no routes matching URI are found. |
| RouteNotFoundException | A route was not found for the specified parameters. |
|
|||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |