- Samurai
If you judge a Japanese restaurants by the number of Japanese who frequent the place this was the clear favorite a few years ago. Samurai was considered an in-sider tip back then. Located next to a striptease club in one of the red-light areas it wasn’t mainstream yet. Since then the number of Japanese guests in the restaurant has declined since the word has spread that you get reasonably price truly authentic sushi and sashimi – most guests are Europeans nowadays.
My wife and I think that the quality of the food and the care with which the components are arranged on the plates have slightly decreased over the years. However, we can still highly recommend it.
Reservation almost required for dinner, the place is always full. - Sala of Tokyo
The food is good and if you manage to get a table in the quite back room (ask for it if you make a reservation) the atmosphere is nice. It’s a little on the pricy side but it’s justified for many dishes. We wouldn’t recommend paying the extra surcharge to have wagyū meat instead of the regular beef. It’s not worth it.
We didn’t like many of the rich snobbish other guests. The Swiss owner lacked Japanese hospitality. - Fujiya
Next on our list. - Yooji’s
Certainly not the most authentic place in Zurich but the sushi is ok. If you go with a group of four we’d recommend to get the big sushi plate for all to share. Friendly staff. - ISHI
Too stylish and modern to be authentic. Since they don’t even have Japanese staff we never bothered trying. Heard some horrible stories from friends. - oKara
- isakaYa
- Ginger
- Takano
Open-air sukiyaki on the terrace apparently -> we have to try in summer. - Ooki
Ramen shop close to Stauffacher. Tiny restaurant – have dinner early or make a reservation. The place has its own charm, definitely worth a try. The menu is small but the food is really delicious. A few types of ramen and gyoza (must have), that’s all. - Blue Note
No website (domain parking)
Stockerstrasse 45
8002 Zürich
Tel: +41 44 202 17 17 - Satori Sushi House
Looking for a way to modify the default printer presets i.e. the presets called “Standard” in OS X I came across a Mac OS X Hints article that talks about the ~/Library/Preferences/com.apple.print.custompresets.plist file.
However, what I found way more interesting is that apparently OS X provides a web interface for CUPS at http://localhost:631/ for the locally installed printers.
Through that interface you can nicely modify the default printer presets. Just go to http://localhost:631/printers/ -> choose your printer -> select Set Default Options in the second drop-down. You’ll be asked for an administrator’s username/password to save the changes. No surprise there.
In a recent stackoverflow.com question I asked for input on how to implemented animated GIFs in SWT table/tree viewer cells. Below is some code of the final solution.
Animation thread
The animation thread can be asked for the “current frame index” (CFI) by interested parties. The CFI thusly denotes the frame of an animated GIF which should be rendered. LabelProviders are the interested parties in this context because they actually render the images.
The thread increments the CFI in its run method. Also, Display#asyncExec is triggered in the run method. During the async execution the table/tree is ask to redraw and update – see lines 69ff.
/**
* This animation thread doesn't actually animate anything itself. However, it acts as a pace maker
* for other components that are able to render animated images. In a loop this thread marks
* designated columns of a tree viewer (see constructor) for redrawing and calls
* update() on the tree itself. Label providers on the other hand ask this thread for
* the current frame index whenever they're triggered provide an image for the designated column.
*
* The viewer's content provider is ideally suited to control the life cycle of this thread. It can
* create/destroy a thread instance whenever the viewer's content is updated.
*
*/
public class BuildColorAnimationThread extends Thread {
private final TreeViewer viewer;
private final int animationColumnIndex;
private final ImageLoader sampleImage;
private int currentFrameIndex;
private boolean cancel;
private static BuildColorAnimationThread runningInstance;
/**
* C'tor which sets this instance to be the one running instance.
*
* @param viewer the viewer whose content should be animated
* @param animationColumnIndex the index of the column to be animated
* @param sampleImage a sample image which resembles the animation images in the viewer, the
* thread uses it to extract repeat-counts and frame delays
* @see BuildColorAnimationThread#getRunningInstance()
*/
public BuildColorAnimationThread(final TreeViewer viewer, final int animationColumnIndex,
final ImageLoader sampleImage) {
this.viewer = viewer;
this.animationColumnIndex = animationColumnIndex;
this.sampleImage = sampleImage;
this.currentFrameIndex = 0;
BuildColorAnimationThread.setRunningInstance(this);
}
/**
* Returns the running instance of the animation thread or null if there's none.
*
* @return the running instance of the animation thread or null if there's none
*/
public static BuildColorAnimationThread getRunningInstance() {
return runningInstance;
}
private static void setRunningInstance(BuildColorAnimationThread runningInstance) {
BuildColorAnimationThread.runningInstance = runningInstance;
}
@Override
public void run() {
int repeatCount = this.sampleImage.repeatCount;
/*
* The repeat count takes into consideration that an animated image might not be animated
* infinitely but only for a given number of loops.
*/
while (!this.cancel && !this.viewer.getTree().isDisposed()
&& (this.sampleImage.repeatCount == 0 || repeatCount > 0)) {
this.viewer.getTree().getDisplay().asyncExec(new Runnable() {
public void run() {
final BuildColorAnimationThread thread = BuildColorAnimationThread.this;
final Tree tree = thread.viewer.getTree();
if (!tree.isDisposed()) {
final Rectangle clientArea = tree.getClientArea();
// Marks ONLY the animation column to be redrawn and not the entire table!
tree.redraw(clientArea.x, clientArea.y, tree.getColumn(thread.animationColumnIndex)
.getWidth(), clientArea.height, false);
tree.update();
// During the first loop currentFrameIndex=0...then currentFrameIndex=1,etc.
thread.currentFrameIndex =
(thread.currentFrameIndex + 1) % thread.sampleImage.data.length;
}
}
});
try {
int ms = this.sampleImage.data[this.currentFrameIndex].delayTime * 10;
if (ms < 20) {
ms += 30;
}
if (ms < 30) {
ms += 10;
}
Thread.sleep(ms);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
/*
* If the last frame was signaled as being the current frame, decrement the repeat count and
* start again.
*/
if (this.currentFrameIndex == this.sampleImage.data.length - 1) {
repeatCount--;
}
}
}
/**
* Returns the index of the current frame. Animation providers (i.e. renderers) call this method
* in order to find out which frame of an animated image they should render at any given point in
* time.
*
* @return frame index starting at 0
*/
public int getCurrentFrameIndex() {
return this.currentFrameIndex;
}
/**
* Signals the thread to stop. It will finish the current execution in its run method and will
* then stop.
*/
public void cancel() {
this.cancel = true;
}
}
LabelProvider
I use my own implementation of an OwnerDrawLableProvider which paints a static image if the icon doesn’t have to be animated. If it needs to be animated (based on some attribute of the row’s input) it paints the frame of an animated GIF. The index of the frame to draw is determined by the animation thread shown above. Hint: the getImage() method is called by paint().
/*
* For each (animated) job color the provider keeps a map of frame_index-to-image entries. This
* speeds up the process of delivering images for rendering because they don't have to be created
* all the time from ImageData objects.
*/
private final Map> imagesMap =
new HashMap>();
@Override
protected Image getImage(Event event, Object element) {
final IJob job = (IJob) element;
Image image = BuildColorInfo.getIconImage(job.getColor());
if (job.isRunning()) {
final BuildColorAnimationThread animationThread =
BuildColorAnimationThread.getRunningInstance();
/*
* Should no animation thread be running, the static image fetched a few lines above will be
* returned.
*/
if (animationThread != null) {
final int currentFrameIndex = animationThread.getCurrentFrameIndex();
Map images = this.imagesMap.get(job.getColor());
if (images == null) {
images = new HashMap();
this.imagesMap.put(job.getColor(), images);
}
image = images.get(Integer.valueOf(currentFrameIndex));
if (image == null) {
image = createNewImage(event, job.getColor(), currentFrameIndex);
images.put(Integer.valueOf(currentFrameIndex), image);
}
}
}
return image;
}
private Image createNewImage(Event event, JobColor color, int currentFrameIndex) {
final ImageLoader imageLoader = BuildColorInfo.getImageLoader(color);
return new Image(event.gc.getDevice(), imageLoader.data[currentFrameIndex]);
}
“Controller”
The controller is responsible to start/stop the animation thread. Basically, whenever the viewer’s input changes the running animation thread must be canceled and a new thread must be started. The best hook for that is the viewer’s content provider – an implementation of I<Tree|Table>ContentProvider as it declares an inputChanged() method.
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
if (this.animationThread != null) {
this.animationThread.cancel();
}
// Animates the first column.
this.animationThread =
new BuildColorAnimationThread((TreeViewer) viewer, 0, BuildColorInfo
.getImageLoader(JobColor.BLUE_ANIME));
this.animationThread.start();
}
The code presented here was implemented for H2Eclipse, the Hudson plugin for Eclipse.
Use the JavaScript console in Firebug and run the following script snippet:
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("HEAD", "the_url",true); // Async HEAD request (relative path to avoid cross-domain restrictions)
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) { // make sure the request is complete
alert(xmlhttp.getAllResponseHeaders()) // display the headers
}
}
xmlhttp.send(null); // send request
…A temporary issue with the Google Talk client requires that the Gmail service be added to any sign in account. If you don’t want to have an active Gmail account but want to use the Google Talk client, please sign up for Gmail once and delete the service permanently…
http://www.google.com/support/talk/bin/answer.py?answer=141360
The article the quote below was taken from a story about the serious issues Toyota seems to have with its jamming accelerators.
Some owners of recalled Toyotas are now saying they are afraid to drive them. “I live only a half mile from the office and I drive there,” said Elaine Byrnes, a Camry owner in Los Angeles. “If I had to go farther, I wouldn’t consider it.”
I lived in California for a year. So, I know what sort of attitude Americans have towards their cars but this was too much – definitely too much.
The story unfolded like this in my mind:
Some owners of recalled Toyotas are now saying they are afraid to drive them.
“Yes, that’s understandable. Toyota really has a problem. But what do you do? You depend on your cars, don’t you.”
“I live only a half mile from the office…”
“Ohh, well, then there’s no problem, is there? You could walk or take the bike.”
I even did the math quickly: an average adult walks about 5km (3.1 miles) in an hour. Hence, a half mile takes you a little over 10 minutes.
“…and I drive there,” said Elaine Byrnes, a Camry owner in Los Angeles.
“Seriously? What a waste!”
“If I had to go farther, I wouldn’t consider it.”
“What? That reasoning makes no sense at all. That most certainly qualifies for being one of the dumbest justifications for someones actions I’ve heard in a long while.”
As much as I love America, stories like this make me wonder if this planet has a future.
As I’m a very liberal mind my heart jumped when I came across the following quote today:
“Government big enough to supply everything you need is big enough to take everything you have.”
A quick Internet investigation lead me to a page that claims that the above quote isn’t by Thomas Jefferson but from Gerald Ford.
cache-control, pragma, no-cache, expires header, and tons more. I learned a lot from the below referenced articles.
Caching tutorial for web authors: http://www.mnot.net/cache_docs/
jGuru forum question: http://www.jguru.com/faq/view.jsp?EID=377
A friend of mine started learning and practicing “nuad boran“, traditional Thai massage, a while ago. In order to get the best possible courses and the most authentic teachers she spent a few weeks in Thailand twice.
I had the pleasure of serving as one of her “practice objects” i.e. she needed human dummies on which she could practice her new techniques. I was immediately fascinated and impressed. It can give you so much more and it feels so much more complete than an ordinary massage.
Meanwhile she opened her own massage business. Check her out: http://www.mynuad.ch/
This is a follow-up for the Beware of WebSphere admins post just below.
My first immediate conclusion after the described deployment problems was to ban the use of the jsession cookie in future applications. If the application always includes the jsessionid parameter in URLs there’s nothing that can go wrong during deployment in terms of cookie paths.
Contemplating a second longer made it obvious that maybe this wouldn’t be such a wise decision after all. There are number of developers who try to enforce the exact opposite because the jsessionid URL parameter can be considered harmful. I highly recommend reading the following two blog posts that support this thesis:
http://randomcoder.com/articles/jsessionid-considered-harmful
http://boncey.org/2007_1_8_purging_jsessionid