Geek Toys

Full-screen calendar view in Movable Type

Sillybean: Full-screen calendar view in Movable Type

There are several ways to generate a monthly calendar with alternate days shaded – PHP, Javascript, the COL tag (IE only) and CSS. We’ll use the CSS way.

  Permalink |  Comments[0]



Using Movable Type as an events calendar

Sillybean: Using Movable Type as an events calendar

Using Movable Type as an events calendar
There are a couple of ways of using Movable Type to create a calendar of events. One is to display future events as text entries, replacing the traditional bloggish today-going-backwards posting order. The key to this is the fact that MT allows you to change the date on a post, even to a future one. The other way is to change a blog’s monthly archive template to display in a calendar-style layout.

Note that if you want your events calendar to appear in a sidebar of your existing text blog, you will need to create a separate blog for the calendar and use includes to put it on your index page. The instructions below will change the configuration of your entire blog. Use at your own risk!

  Permalink |  Comments[0]





Five Step Photolog

FIVE STEP PHOTOLOG

This little MovableType photo-weblog (“photolog”) tutorial is the result of a request (gentle prod?) from another Minnesota weblogger who was curious how I did my implementation. I am sure there are many ways to do a photolog, this is merely one of them and it came about after much searching of other weblogs and hanging out in the MovableType Support Forums. Thanks to all who came before me!

  Permalink |  Comments[0]



Advice on debugging Java stack traces

I found this Introduction to Java Stack Traces useful. Here’s the recommended steps for debugging.

For hanging, deadlocked or frozen programs: If you think your program is hanging, generate a stack trace and examine the threads in states MW or CW. If the program is deadlocked then some of the system threads will probably show up as the current threads, because there is nothing else for the JVM to do.

For crashed, aborted programs: On UNIX look for a core file. You can analyze this file in a native debugging tool such as gdb or dbx. Look for threads that have called native methods. Because Java technology uses a safe memory model, any corruption probably occurred in the native code. Remember that the JVM also uses native code, so it may not necessarily be a bug in your application.

For busy programs: The best course of action you can take for busy programs is to generate frequent stack traces. This will narrow down the code path that is causing the errors, and you can then start your investigation from there.

  Permalink |  Comments[0]



Stack Frames

Examining the Stack

The call stack is divided up into contiguous pieces called stack frames, or frames for short; each frame is the data associated with one call to one function. The frame contains the arguments given to the function, the function’s local variables, and the address at which the function is executing.
When your program is started, the stack has only one frame, that of the function main. This is called the initial frame or the outermost frame. Each time a function is called, a new frame is made. Each time a function returns, the frame for that function invocation is eliminated. If a function is recursive, there can be many frames for the same function. The frame for the function in which execution is actually occurring is called the innermost frame. This is the most recently created of all the stack frames that still exist.

  Permalink |  Comments[0]



< Newer Articles |