<%@ page import="java.io.BufferedReader, java.io.InputStreamReader, java.io.IOException, java.io.UnsupportedEncodingException, java.net.URL, java.net.URLEncoder" %> <%! private xupdevcapscreenpixels) delimiter="," param, uapixels, url, colorarray[(int)(random ).append(resarray[0]); string[] } } private colorarray="value.split(" colorarray.length)]); } private encodedvalue="URLEncoder.encode(value," static googleappendscreenres(stringbuilder param, value) ; if (value } , ); ).append(resarray[1]); } } % random) & % googleappendurl(stringbuilder void ).append(param).append(=").append( " (uapixels="null)" !="null)" resarray="screenRes.split(delimiter); " screenres="xUpDevcapScreenpixels; " (resarray.length="2)" pagead=" " final http://pagead2.googlesyndication.com/pagead/ads? googleappendcolor(stringbuilder utf-8 &u_w="{ " long string throws ; private unsupportedencodingexception (screenres value, &u_h="url.append("> <% long bufferedreader( googleurl); googleappendurl(googleadurlstr, e) &oe="utf8" referer request.getremoteaddr()); googleadurlstr.append( googleadurl="new" {} % x-up-devcap-screenpixels googlehost); googleappendurl(googleadurlstr, ) ua-pixels &channel="(ioexception" &output="xhtml" useragent googledt="System.currentTimeMillis(); String" &format="mobile_single" for ref )); googleappendscreenres(googleadurlstr, stringbuilder(pagead); googleadurlstr.append( (request.getquerystring() ? } } ip googleurl : out.println(line); &markup="xhtml" host request.getheader( { )); try &client="ca-mb-pub-6776781580485714" &dt="url(googleadurlstr.tostring()); " new googlehost="(request.isSecure()" , + ).append(googledt); googleadurlstr.append( ad_type="text_image" url (line="reader.readLine())" !="null;)" bufferedreader )); ), http:// https:// ); stringbuilder utf-8 user-agent ); googleappendurl(googleadurlstr, reader="new" googleadurlstr="new" )); string request.getquerystring().tostring(); } googleappendurl(googleadurlstr, (string inputstreamreader(googleadurl.openstream(), ); googleadurlstr.append( line; catch>

Monday, December 31, 2007

Shared libraries on the Palm Pilot

After much playing around with the Palm Pilot simulator and debugger, I have figured out how to use PalmOS's shared library features. Note that this is not "official" in any way, but it seems to work for me. Comments are welcome. This document is divided into four sections:

* Intro to shared libraries on the Palm Pilot
* How to use shared libraries
* How to make your own shared libraries
* Conclusions

Note that I have only experimented with the Palm Pilot Pro; I have not tried the Palm Pilot Personal, and the old Pilots with PalmOS 1 almost certainly won't work (they don't have the SysLibLoad function, but I guess someone could emulate it...).
Intro to shared libraries on the Palm Pilot

Shared libraries (sometimes called "system libraries") on the Palm Pilot enable many applications to share common code, without having to have a copy of the code in each application's code resource. For example, there can be one copy of encryption routines, or a version of the standard C library, and many applications can be using it.

Shared libraries can also help you get around the 32K code size limit; you can break up your code into a main portion (of at most 32K), and a number of libraries (each of at most 32K).

Shared libraries are implemented as resource databases, with a resource type of libr and a resource ID of 0. In contrast, an application is a resource database with (usually) four resources: code 0, code 1, data 0, and pref 0. The libr 0 resource in a shared library corresponds exactly to the code 1 resource in an application.

A shared library on the Palm Pilot is not like one on most varieties of Unix. Whereas for Unix, shared libraries export a symbol table, and the operating system's dynamic loader maps calls based on their symbol name, for the Palm Pilot, shared libraries export a dispatch table. A dispatch table is basically a list of addresses of the functions in the library that can be called from other applications.

Every shared library must include the following four functions as the first four entries in its dispatch table:

open
Applications call this to initialize the library.
close
Applications call this to free storage allocated by the library, prior to exiting.
sleep
The system will call this routine for each shared library that is in use when the system is about to power down.
wake
The system will call this routine for each shared library that is in use when the system has just powered up.

These functions do not need to have these exact names; the names used internally by the shared library have no relation to the names applications use to access the functions. For example, the open routine in the Serial Library is called SerOpen, and the one in the Network Library is called NetLibOpen.

The remainder of the functions in the dispatch table can do whatever the library designer wants. I'm not sure what the size limit of the dispatch table is, but I haven't hit it yet (it's at most about 5500 functions, but it could be less).
How to use shared libraries

The Palm Pilot Pro, as shipped, comes with two libraries pre-installed: the serial library and the networking library. This section explains how to install third-party shared libraries, and how to write programs that use them.

To install a shared library, simply HotSync (or use something like pilot-xfer) the .prc file to your Pilot. In my experience, if you already have a copy (or an older version) of a library on your Palm Pilot, you need to delete it (with the Memory application) before installing the new version. I'm not sure why that is, and I'll look into it more later.

Once the library is installed, applications can use it. In order for a shared library to be used, it needs to be entered into the loaded library table. Once that has been done, its index in the loaded library table is called its reference number.

An application that wishes to use a shared library should use the SysLibFind function. This function looks up a shared library in the loaded library table, and gives back the reference number.

If SysLibFind fails, it means the library is not currently loaded. The application can try to load the library itself by using the SysLibLoad function. Once a reference number for the library has been obtained, the library's open function should be called. These functions can often be called from the StartApplication routine.

In the example below, the application is trying to use the library called "Gauss Library", which is stored in a resource database of type 'libr' and creator 'Gaus':

Err err;
UInt GaussLibRefNum;

...

err = SysLibFind("Gauss Library", &GaussLibRefNum);
if (err) err = SysLibLoad('libr', 'Gaus', &GaussLibRefNum);
ErrFatalDisplayIf(err, "Cannot load Gauss Library!");
err = GaussLibOpen(GaussLibRefNum);
/* Check for errors in the Open() routine */

Note that SysLibLoad is not defined in some header file distributions. If you get an error regarding this, put the following near the top of your C file:

Err SysLibLoad(ULong type, ULong creator, UIntPtr refNumPtr)
SYS_TRAP(684);

Every function in a shared library must take a UInt refNum as its first argument. For example, if the above Gauss Library implements arithmetic on Gaussian (complex) integers, and it contains a function Err GaussLibAdd(UInt refNum, Gauss_t *sum, Gauss_t *a, Gauss_t *b), the application would call it as follows:

Gauss_t a, b, sum;
Err err;

...

err = GaussLibAdd(GaussLibRefNum, &sum, &a, &b);

The application would also have #include "GaussLib.h" in it (this header file would generally be distributed with the library). The GaussLib.h header file would have definitions for any data types used by the library, as well as declarations for the library functions. For example, the declarations in GaussLib.h might be:

Err GaussLibOpen(UInt refNum) SYS_TRAP(sysLibOpen);
Err GaussLibClose(UInt refNum, UIntPtr numappsP) SYS_TRAP(sysLibClose);
Err GaussLibSleep(UInt refNum) SYS_TRAP(sysLibSleep);
Err GaussLibWake(UInt refNum) SYS_TRAP(sysLibWake);
Err GaussLibCreate(UInt refNum, Gauss_t *val, Long re, Long im)
SYS_TRAP(sysLibCustom);
Err GaussLibRead(UInt refNum, Gauss_t *val, Long *re, Long *im)
SYS_TRAP(sysLibCustom+1);
Err GaussLibAdd(UInt refNum, Gauss_t *sum, Gauss_t *a, Gauss_t *b)
SYS_TRAP(sysLibCustom+2);
Err GaussLibMul(UInt refNum, Gauss_t *prod, Gauss_t *a, Gauss_t *b)
SYS_TRAP(sysLibCustom+3);

These declarations would enable applications to call, in addition to the four "standard" functions, the functions GaussLibCreate, GaussLibRead, GaussLibAdd, and GaussLibMul.

Finally, when the application is about to exit, it should close the shared library by calling its close function. This is often done in the StopApplication routine. In addition, an application may choose to unload the library from the loaded library table. It should only do this, however, if the library is not in use by other applications (the close() function in the library could return information about whether any other applications are using the library). Libraries are unloaded by calling the SysLibRemove function (after which the reference number is invalid). For example,

UInt numapps;

err = GaussLibClose(GaussLibRefNum, &numapps);
/* Check for errors in the Close() routine */
if (numapps == 0) {
SysLibRemove(GaussLibRefNum);
}

How to make your own shared libraries

This section will outline how to create a shared library using the Unix tools. A shared library is created in the same way as a regular Palm Pilot application, with a couple of notable exceptions:

* The library can have no data or bss segment. This means no global or static variables. Static constants (including literal strings) are fine, though, as these go in the text (code) segment.
* The m68k executable is linked with the -shared flag to gcc, which prevents the C run-time (crt0) and standard C libraries from being automatically included. Instead of the C run-time, the first object file in the link command must be the one that begins with your library's dispatch table. More on this later.

We will now see how to create the Gauss Library, which was described above. Here is the complete GaussLib.h:

#ifndef __GAUSSLIB_H__
#define __GAUSSLIB_H__

/* Data structures */
typedef struct {
Long re, im;
} Gauss_t;

/* Function declarations */
Err GaussLibOpen(UInt refNum) SYS_TRAP(sysLibTrapOpen);
Err GaussLibClose(UInt refNum, UIntPtr numappsP) SYS_TRAP(sysLibTrapClose);
Err GaussLibSleep(UInt refNum) SYS_TRAP(sysLibTrapSleep);
Err GaussLibWake(UInt refNum) SYS_TRAP(sysLibTrapWake);
Err GaussLibCreate(UInt refNum, Gauss_t *val, Long re, Long im)
SYS_TRAP(sysLibTrapCustom);
Err GaussLibRead(UInt refNum, Gauss_t *val, Long *re, Long *im)
SYS_TRAP(sysLibTrapCustom+1);
Err GaussLibAdd(UInt refNum, Gauss_t *sum, Gauss_t *a, Gauss_t *b)
SYS_TRAP(sysLibTrapCustom+2);
Err GaussLibMul(UInt refNum, Gauss_t *prod, Gauss_t *a, Gauss_t *b)
SYS_TRAP(sysLibTrapCustom+3);

#endif

The format of this header file is simple; the first part defines data structures, and the second declares the library functions. Note that each library function declaration is followed by a SYS_TRAP attribute. The four standard functions should have the values listed above, and subsequent functions should have arguments to SYS_TRAP starting at sysLibTrapCustom and incrementing from there.

We now start looking at GaussLib.c. The first section of the C file sets up declarations for functions that the dispatch table will use, as well as defining the globals structure for the library. Remember that since the library can have no global variables, it needs to dynamically allocate space for its globals. It does this by having a single structure which contains all of its globals, and it allocates memory for this structure in the Open function, and frees it in the Close function. The only global variable we will use in the Gauss Library is a reference count of the number of applications currently using the library. The beginning of GaussLib.c, then, looks like:

#include
#include "GaussLib.h"

/* Dispatch table declarations */
ULong install_dispatcher(UInt,SysLibTblEntryPtr);
Ptr *gettable(void);

/* The globals structure for this library */
typedef struct {
UInt refcount;
} GaussLib_globals;

The first piece of code in GaussLib.c must be the code which sets up the dispatch table. For any library, it looks like this:

ULong start (UInt refnum, SysLibTblEntryPtr entryP)
{
ULong ret;

asm("
movel %%fp@(10),%%sp@-
movew %%fp@(8),%%sp@-
jsr install_dispatcher(%%pc)
movel %%d0,%0
jmp out(%%pc)
gettable:
lea jmptable(%%pc),%%a0
rts
jmptable:
dc.w 50
dc.w 18
dc.w 22
dc.w 26
dc.w 30
dc.w 34
dc.w 38
dc.w 42
dc.w 46
jmp gausslib_open(%%pc)
jmp gausslib_close(%%pc)
jmp gausslib_sleep(%%pc)
jmp gausslib_wake(%%pc)
jmp gausslib_create(%%pc)
jmp gausslib_read(%%pc)
jmp gausslib_add(%%pc)
jmp gausslib_mul(%%pc)
.asciz \"Gauss Library\"
.even
out:
" : "=r" (ret) :);
return ret;
}

ULong install_dispatcher(UInt refnum, SysLibTblEntryPtr entryP)
{
Ptr *table = gettable();
entryP->dispatchTblP = table;
entryP->globalsP = NULL;
return 0;
}

The only part of the above code that will change for different libraries is the section between the jmptable: and out: labels. Here's how to work it out: suppose your library has n functions, including the four standard ones (for GaussLib, n is 8). Then on the first line, you would put dc.w 6n+2 (here, 6n+2 = 50).

The next n lines are of the form dc.w 2n+4i-2, as i ranges from 1 to n.

The next n lines are of the form jmp internal_function_name(%%pc), where each internal_function_name is the name of one of the library functions, as named in the source code for the library, which may be different from the name in GaussLib.h. (In fact, if it has the same name, you may run into problems unless you change the definition of SYS_TRAP.) The first four should be the standard four functions, and the remaining ones must be in the same order as they are listed in the header file.

The last line contains the textual name of the library, which applications will use in a SysLibFind call.

Now you should define the four standard functions. The open function should, if necessary, allocate memory for the library globals. Note that the amount of dynamic memory available is limited. If you have a large amount of constant data (such as a word list), include it as static const data in your program, so that it ends up in the text segment. If you really need a large amount of variable data, consider putting it into a database, and only including a pointer (or handle) to the database in the globals structure. Here is a template for the open routine:

Err gausslib_open(UInt refnum)
{
/* Get the current globals value */
SysLibTblEntryPtr entryP = SysLibTblEntry(refnum);
GaussLib_globals *gl = (GaussLib_globals*)entryP->globalsP;

if (gl) {
/* We are already open in some other application; just
increment the refcount */
gl->refcount++;
return 0;
}

/* We need to allocate space for the globals */
entryP->globalsP = MemPtrNew(sizeof(GaussLib_globals));
MemPtrSetOwner(entryP->globalsP, 0);
gl = (GaussLib_globals*)entryP->globalsP;

/* Initialize the globals */
gl->refcount = 1;

return 0;
}

The first two lines of code are the idiom that any library function would use if it needed to access some value in the globals structure. The next section deals with the case that some other application has already opened this library. In our case, we just increment the reference count, but other libraries may want to return an error code.

The section after that is the idiom for allocating the memory for a globals structure, and the last section is the library-specific initialization of the global variables.

The close routine should free any memory or close any databases allocated or opened by the open routine, but only if no other application currently has the library open. Here is a template for the close routine:

Err gausslib_close(UInt refnum, UIntPtr numappsP)
{
/* Get the current globals value */
SysLibTblEntryPtr entryP = SysLibTblEntry(refnum);
GaussLib_globals *gl = (GaussLib_globals*)entryP->globalsP;
if (!gl) {
/* We're not open! */
return 1;
}

/* Clean up */
*numappsP = --gl->refount;
if (*numappsP == 0) {
MemChunkFree(entryP->globalsP);
entryP->globalsP = NULL;
}

return 0;
}

This routine first gets a pointer to the library's global data. If this is NULL, the library is not open. This error can be signalled to the application with a result code, as above, or the library can do something like ErrFatalDisplayIf(!gl, "Gauss Library is not open!"); instead.

The remainder of this routine should be used to deallocate the library global memory, if the library reference count has dropped to 0. In this case (which is a good idea), we also return the number of applications that still have the library open. If this is 0, the application that just closed us should remove the library from the loaded library table.

The sleep and wake routines are usually trivial; only if your library actually cares (as, say, the Network Library might) when the Palm Pilot is turned on or off should anything happen here.

Err gausslib_sleep(UInt refnum)
{
return 0;
}

Err gausslib_wake(UInt refnum)
{
return 0;
}

From here on in, you just write the code to implement your library functions. In our example, none of our functions access the library globals, so it is very easy:

Err gausslib_create(UInt refNum, Gauss_t *val, Long re, Long im)
{
val->re = re;
val->im = im;
return 0;
}

Err gausslib_read(UInt refNum, Gauss_t *val, Long *re, Long *im)
{
*re = val->re;
*im = val->im;
return 0;
}

Err gausslib_add(UInt refNum, Gauss_t *sum, Gauss_t *a, Gauss_t *b)
{
sum->re = a->re + b->re;
sum->im = a->im + b->im;
return 0;
}

Err gausslib_mul(UInt refNum, Gauss_t *prod, Gauss_t *a, Gauss_t *b)
{
prod->re = (a->re*b->re)-(a->im*b->im);
prod->im = (a->re*b->im)+(a->im*b->re);
return 0;
}

We now try to compile GaussLib.c into a shared library resource database. The first step is to compile each C file into an object file. In our case, we only have one C file:

m68k-palmos-coff-gcc -O5 -c GaussLib.c

We now link all of our object files into a program file. If you have more than one object file, the one that starts with the dispatch table must come first. Some libraries may need the -lgcc at the end of this line, and some may not; try it without, and if you get errors, try it with.

m68k-palmos-coff-gcc -shared -o GaussLib GaussLib.o -lgcc

Now, make sure your data and bss segments are empty:

m68k-palmos-coff-objdump --section-headers GaussLib

GaussLib: file format coff-m68k

Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000224 00010000 00010000 00002000 2**2
CONTENTS, ALLOC, LOAD, CODE
1 .data 00000000 00000000 00000000 00000000 2**2
ALLOC, LOAD, DATA
2 .bss 00000000 00000000 00000000 00000000 2**2
ALLOC

If the "Size" field of the data or bss if not 0, check your library carefully for global or static data, and either make them static constants (if possible), or else move them to the library globals structure.

Next, extract the text segment from the program file, delete the data and other non-useful segments, and rename the text segment to the library segment:

m68k-palmos-coff-obj-res GaussLib
rm -f {code,pref,data}0000.GaussLib.grc
mv code0001.GaussLib.grc libr0000.GaussLib.grc

Now build a resource database (prc) file, containing only the library segment:

build-prc GaussLib.prc GaussLib Gaus libr0000.GaussLib.grc

At this point, everything is ready to go, except for the fact that build-prc assumes the database it creates is of type 'appl'. Shared libraries should be of type 'libr'. It would be good if a future version of build-prc would have an option for this, but for now, here is appl2libr.c:

#include

int main(int argc, char **argv)
{
FILE *prc;
char kind[5];

if (argc < 2) {
fprintf(stderr, "Usage: %s file.prc\n", argv[0]);
exit(1);
}

prc = fopen(argv[1], "r+");
if (!prc) { perror("fopen"); exit(2); }
if (fseek(prc, 0x3c, SEEK_SET)) { perror("fseek"); exit(2); }
kind[4] = '\0';
if (fread(kind, 4, 1, prc) != 1) { perror("fread"); exit(2); }
if (strcmp(kind, "appl")) {
fprintf(stderr, "%s is not an appl file\n", argv[1]);
exit(3);
}
if (fseek(prc, 0x3c, SEEK_SET)) { perror("fseek"); exit(2); }
strcpy(kind, "libr");
if (fwrite(kind, 4, 1, prc) != 1) { perror("fwrite"); exit(2); }
if (fclose(prc)) { perror("fclose"); exit(2); }
return 0;
}

Compile this program, and convert your prc file to have type 'libr':

gcc -o appl2libr appl2libr.c
./appl2libr GaussLib.prc

You're done! GaussLib.prc is now a shared library, ready to be uploaded to a Palm Pilot. You can distribute the prc file along with applications that use it, and/or you can distribute the header file so people can write their own applications that use the library.

For reference, here is a Makefile:

LIBNAME = GaussLib
CREATOR = Gaus

CC = m68k-palmos-coff-gcc
XTRALIBS = -lgcc
OBJRES = m68k-palmos-coff-obj-res
BUILDPRC = build-prc

$(LIBNAME).prc: libr0000.$(LIBNAME).grc ./appl2libr
$(BUILDPRC) $@ $(LIBNAME) $(CREATOR) libr0000.$(LIBNAME).grc
./appl2libr $@

./appl2libr: appl2libr.c
gcc -o $@ $<

libr0000.$(LIBNAME).grc: $(LIBNAME)
$(OBJRES) $(LIBNAME)
rm -f {code,pref,data}0000.$(LIBNAME).grc
mv code0001.$(LIBNAME).grc libr0000.$(LIBNAME).grc

$(LIBNAME): $(LIBNAME).o
$(CC) -shared -o $(LIBNAME) $(LIBNAME).o $(XTRALIBS)

$(LIBNAME).o: $(LIBNAME).c
$(CC) -O5 -c $(LIBNAME).c

clean:
rm -f libr0000.$(LIBNAME).grc $(LIBNAME).o

spotless: clean
rm -f appl2libr $(LIBNAME).prc $(LIBNAME)

Monday, December 17, 2007

UIPickColor

The first two parameters are similar to each other: they are pointers to
the index and the RGB values. You can set either (but not both) pointers
to NULL if you want. They're the default, starting values for the picker.

The third parameter is which mode to start in: RGB sliders or "chits": 256
small squares that you can tap upon. Pass UIPickColorStartPalette or
...RGB.

Fourth param is the title (leave null for the default), and fifth is the
help tip ID (which is currently unused).

When the function returns, the color index and/or rgb variables you passed
a pointer to will have the user's selected data in them. The RGB value may
be "more correct" than the index, since this function won't change the
palette and thus the user could pick an RGB value that isn't in the current
palette. If you care, you'd want to change the palette yourself now that
you know the user wants that particular shade.

Here's a small excerpt taken from some sample code I wrote for PalmSource,
many moons ago. (The only reason to pass &myColorindex is to allow usage
of the Palette view even though we really only care about the RGB return
value. So they both need to be provided, with appropriate initial values.)

UIPickColor(&myColorindex,
&myRgb,
UIPickColorStartPalette,
"Pick it!",
0);

// change the color of field text to the chosen setting (while our app
is running)
UIColorSetTableEntry(UIFieldText, &myRgb);

// get everything to redraw with the new setting
FrmDrawForm(FrmGetActiveForm());

Tuesday, December 11, 2007

Palm Programming Tutorial(BmpSetTransparentValue)

For the BmpSetTransparentValue() function, tr are two arguments one is the bitmap pointer, and the other is the transparent value.

In my app, I have used pure wite transparent color, and I set it 0xFFFF

BmpSetTransparentValue((BitmapType*)bmpV3, 0xFFFF);

make 5-6-5 bitmap coding (16bit)
RGBColorType color;
//UInt8 R,G,B ( color.r, color.g, color.b )

R = (R-7) / 8;
G = (G-3) / 4;
B = (B-7) / 8;
put all colors to one value
UInt16 color = (R<<11) | (G<<5)>| B;

Set Custom "Ringtones" for Your Email Inbox

email-alerts2.png
Custom ringtones on our phones have been making it easy to tell who's calling (and whether we want to answer) without looking at our phones for years now, so why aren't we doing the same thing with our incoming email? A frequently firing new-email alert can throw you off a productivity sweep with nothing more than a gentle ding. You rush to your inbox to open this new gift of an email just to find that... oh... it's another borderline offensive mass email chain from your cousin-in-law. Today I'll show you how to set up custom alerts with your favorite desktop email client to minimize email distraction without missing important messages.

This post was inspired by this excellent post at weblog Inspect My Gadget.

A lot of people turn off email notifications altogether to ensure they avoid the distraction of the constant, IM-like flow of new email, but that also means that when a really important message arrives, you may not get to it in the timely manner it requires. You can take advantage of custom alerts (i.e., custom ringtones for your email) to help firewall your attention so that only the messages that need to be brought to your attention are, and the emails you don't need to get to quickly aren't. Whether you're running Thunderbird, Outlook in Windows, or Mail.app on your Mac, each has the ability to perform custom alerts for incoming mail. First I'll show you the customized email alerts I use to give you a few ideas of where you can start, then I'll show you how to set it up in your client of choice.

When To Use Email "Ringtones"

  • contact-groups.pngBy Groups: If you use your desktop email client to deal with both personal and work email, you may want to set up different alerts for each (or only alerts for the more important group). Likewise, if you're just using the client for personal email, you might want to set different notification sounds for friends and family.
  • By Individual: If you want to get really specific, you can set custom alert tones by individual. This won't be the most practical for all clients (it would be especially painful to set up with Thunderbird), but the concept of matching a snippet of your contact's custom phone ringtone with your email notification is enticing.
  • By Subject: If you've got a buzzword or two that you always want to keep on top of, you might want to consider a custom alert for any email containing that special topic.
  • By Priority: I don't know a lot of people who actually set priority when they send emails, but if you're dealing with folks who do, it might be worthwhile to set a special alert for your high priority messages. Then again, you can still set up your own list of priority contacts and non-priority contacts to achieve the same basic goal.

If you really want to use custom notifications to streamline your inbox and minimize distraction, I'd recommend setting custom alerts only for important emails—that means long threads discussing this YouTube video with your friends won't receive a notification at all, but that all-important email from your boss will set off a fire-alarm-esque alert.

Now that you've got a better idea how and when you might use custom alerts, here's how to set them up.

Custom Email Notifications in Thunderbird

mailbox-alert-right.jpgIn contrast to Outlook and Mail.app, Thunderbird unfortunately doesn't come with a "Play Sound" option in its Message Filters dialog. Luckily a crafty extension developer has thrown together a Thunderbird extension called Mailbox Alert. After you've installed Mailbox Alert, you can create notification settings every time a new message arrives in any folder in Thunderbird.

new-tip-shot.pngThat means that all you have to do is set up the appropriate filters to either move or copy a message to a separate folder in Thunderbird when you receive new email, at which point you can set up an alert specific to that message by its folder. Alternately, if you're using Thunderbird as the ultimate Gmail IMAP client, you may already have filters set up in Gmail that you can use, in which case you'd only need to set up the customized alerts.

Remember that Thunderbird's address book supports groups, which means that if you want to create separate alerts by group, creating a filter that can copy new email into separate folders by contact groups is a cinch.

Custom Email Notifications in Outlook

up-to-date-outlook.pngThe original post on Inspect My Gadget already covered the basics of setting up custom alerts in Outlook, so I won't go into detail here. In a nutshell, you just head to Tools -> Rules and Alerts, create a new rule, and apply the ""Play a sound when I get messages from someone" template. Outlook makes it extremely easy to set up a lot of these custom alerts—by sender or distribution list—relatively quickly.

Custom Email Notifications in Mail.app

mail.app-notifications.pngSetting up custom email alerts with Mail.app is easy, due mostly to Mail's simple filtering setup, integration with Address Book, and large set of filter options. You can easily set up alerts by Address Book groups, sender, or any other criteria with very little work. Just open Mail's preferences, click the Rules tab, then start adding rules like the one you see above.

Hot Image Your PC's Hard Drive with DriveImage XML

dix-header.png

You don't need a complicated boot CD or expensive software to create a restorable system disk image for your PC: free utility DriveImage XML can save a full, working snapshot of your Windows hard drive while you work on it. (That's hot.) When your PC crashes and burns or just slows down over time, the best insurance you can have is a mirror image of your operating system, complete with drivers, user settings, software applications, and documents in one place. A while back we covered how to partition and image your Windows hard drive using the Linux-based System Recovery Boot CD, a process that involves command line work, disk-burning, rebooting, and video driver wrangling. With DiskImage XML, imaging your PC's hard drive is a matter of a few clicks, no reboots required. Let's check it out.


Create a New System Image


First, download DriveImage XML for free and install it as usual. You can store your system image anywhere you'd like, but I highly recommend saving it on a disk other than the one you're imaging. So if you plan to image your C: drive, purchase an external hard drive to store C:'s image, or right after you create the image, burn the files to CD or DVD. This way if your C: drive fails or breaks, you still have your image available on a separate physical disk.

When you launch DriveImage XML (DiX), click on the "Backup" button on the lower left of the screen. It will scan your PC and list all the hard drives connected to your system. To image your C: drive (most likely your system's primary, active disk), select it and click the Next button to launch DriveImage XML's backup wizard. Click Next again to set where DiX should save your image, and a few additional options, as shown.

dix-selectimagedestination.png

The settings here will affect how large your image file is and how it can be restored. Here's a rundown of what each does.

  • Raw mode. In "raw mode," DriveImage XML makes a sector by sector copy of your drive, including unused space. This means your image file will be the same exact size of the drive, and it can only be restored to a drive of that same exact size. For most home use situations, leave this box unchecked. (There's no sense in backing up blank disk space.)
  • Split large files. If you plan to burn your disk image to CDs or DVDs, select "Split large files," which will break your image file down into smaller chunks. This way you can easily save them to smaller-sized disks later on. If "Split large files" is NOT checked, you'll get one giant image file, either as large as the disk itself or as large as the used space on the disk (depending on whether "Raw mode" is enabled.)
  • Compressed. If space on your destination drive is at a premium, select the "Compressed" option to make your image file up to 40% smaller than in normal mode. Compression will slow down the imaging process, but it will help save on disk space.
  • Hot Imaging Strategy. The hot part of DriveImage XML is that it can image your drive while you work but that means that files you're using while it does its thing have to be locked to be copied correctly. DiX will try two strategies: locking the drive entirely (if you're not using the computer and saving files), or using Windows' built-in Volume Shadow Services to get the last saved state of the drive. Leaving this at the default "Try Volume Locking first" is fine for home use.

Click the Next button to start creating the drive image file. Depending on the speed of your computer, and the size of your hard drive (and amount of used space), this process can take a significant amount of time. Consider starting it before you leave your computer for the evening, or during your lunch break. DriveImage XML will keep a running counter of how much time it's been copying the disk and how much time is left until it completes, as shown.

dix-imageinprogress1.png

DiX isn't fast, especially if you've got a lot of data to image. On the spare PC where I ran DiX, about 12GB of used space took about 35 minutes to image. When the imaging process is complete, you'll have two types of files stored on the destination: a single .XML file (hence DriveImage XML's name), and either one or several .DAT files (depending on whether or not you selected "Split large files.") The .XML file is a list of all the files in the image. The .DAT file(s) contain the actual image data. Here's what the file listing on my external drive looks like, once my image was complete.

dix-imgfilelist.png

Once you've saved a system image, you can use it in three ways: to restore individual files from their saved state; to restore your PC back to the exact state it was when you saved the image, or to make an exact copy of the drive to another partition or hard drive.

Browse and Restore Individual Files

To view and copy files contained within an image to your PC, click on the Browse button on the lower left of the DriveImage XML window, and click "Load Image." Then select the .XML file for the image you saved. (Remember, every image has exactly one .XML file associated with it.) DiX will read the .XML listing and display all the files contained within the image, as shown.

Navigate the folder tree as usual, and right-click any file to view it, launch it using its associated application, or extract it (restore it to your current PC setup.) You can also right-click on an entire folder like "My Documents" and choose "Extract" (or press Ctrl+S) to copy it to your current PC setup.

Perform a Complete System Restore

If your computer's hard drive crashed entirely, you can restore it to its past state using the DiX image you created. Restoring an image to a target disk will delete everything on the disk and copy the contents of the image to it. That means you cannot restore an image to a drive you're already using (because you can't delete the contents of a disk already in use). So if you booted up your computer on your C: drive, you can't restore an image to your C: drive. You need access to the target drive as a secondary disk. There are a few ways to do this. You can install the target drive as a slave in another PC in addition to its primary boot drive, or you can buy a hard drive enclosure and connect the target as an external drive.

Either way, to restore a disk image to a drive you intend to boot from, you'll need:

  1. A PC running DriveImage XML
  2. The saved disk image files, whether they're on CD, DVD, on the host PC or on an external drive
  3. A target drive with a partition at least the size of the drive image files. (You can use Windows built-in Disk Management console or your partition manager of choice to create a new partition to restore to.)

To start the restore process, in DriveImage XML, click on the Restore button, then click the Next button, which will launch the drive restore wizard. From there, select the .XML file associated with the image, and then select the target drive. (Remember, the target drive must be an existing partition that's the same size or larger than the image, and it must not be the active system drive.) All files will be deleted from the target drive on restore, so be double sure there's nothing there you need to save. Like the image creation process, Dix will display a progress bar and estimated time as it restores the image to the drive.

Once the image has been copied and restored onto the target drive, you'll have to make that drive the active, boot partition for your PC to start using it. Either install the disk back into your PC, or use the Disk Management Console to set the target partition as "Active" and reboot your PC. Alternately, you can create a bootable Windows CD with DriveImage XML on it. Here's more on DriveImage XML on a BartPE bootable CD.

More DiX Actions

You can also copy an entire existing partition to another blank partition without making an image at all, using DiX's Drive to Drive feature. (This could be useful to make a full copy of a data partition, for example.) Finally, you can schedule regular disk image operations using Windows Task Scheduler and Dix command line options. For more on that, in DiX's Help file, under the Feature folder, see "Task Scheduler."

Comparison to Commercial Alternatives, and Why DriveImage XML is Not Quite Time Machine for Windows

Commercial software that retails betweens $50 and $70, like Norton Ghost and Acronis TrueImage, do exactly what DiX does for free. However, DiX does NOT do incremental images like most commercial products and Mac OS X's built-in Time Machine does. Every time you create an image it's a full and complete backup of the disk, which means that regularly scheduled imaging can eat up hard drive space fast.

Also, DiX's image files aren't browse-able using Windows Explorer, the way Mac users can explore Time Machine's backups using the Finder. However, the developers say that DiX is not necessarily required to restore files from the images it creates. The .XML file is not proprietary and readable by any program out to do so, and the image file itself is just all your files squashed into one big .DAT file. The .XML file acts as a map to the .DAT file, and if DiX wasn't around, in theory other programs would be able to grok it pretty easily. Which is nice, but still not as transparent as Time Machine's backup files.

Video Demonstration

Finally, if you haven't had enough of DriveImageXML, here's a video tutorial on using it, posted by its makers on YouTube.

How do you insure a speedy recovery from a system crash or just back to a clean and shiny Windows installation? Have you tried DriveImage XML? Tell us about it in the comments.

Monday, December 10, 2007

Use Your iPhone's Internet Connection On Your Laptop




iphone-tether-head.png
It's great that your iPhone has a data plan and a killer mobile browser, but when you're sitting at the airport waiting to catch a plane with your laptop right next to you, wouldn't it be nice to use your full-on desktop browser? Out of the box your iPhone won't allow you to tether your EDGE data connection to another computer wirelessly, but with a little ingenuity on your part you'll be browsing the net on your laptop through your iPhone's data service in no time.

NOTE: You're probably asking yourself: "Isn't the EDGE data network that the iPhone uses SLOW?" Well, yes it is. But if you're at all like me, sometimes a slow full-screen browsing session is better than slow browsing on the small screen.

I've only tested this method on my MacBook Pro, but since SSH is platform independent, this should be a workable solution on Windows, Mac, or Linux.

What You'll Need

For this guide, you'll need:

Prepare Your iPhone

install-ssh.jpgAssuming you've already got Installer.app installed on your iPhone (which you will have installed if you've gone through the jailbreak mentioned above), the first thing you need to do is install OpenSSH. So head to your iPhone's home screen and fire up Installer.app. Now go to the Install tab and tap on System -> OpenSSH and tap the Install button. Once it installs, exit Installer.app.

Start Up Your Ad-Hoc Network

This process differs depending on what operating system you're using. As I said above, I've only tested this on a Mac, but I'll point to instructions on how to do the same on Windows as well.

ad-hoc 1.pngIf you are using a Mac, just click the Airport icon in your menu bar and click on Create Network. Then just give your network a name and--if you like--a password.

On a Windows PC you'll need to set up Internet Connection Sharing. You can find instructions for doing so here. Good luck!

Once you create your network, your computer won't be able to connect wirelessly to any Wi-Fi hotspot, just other devices.

Connect Your iPhone to Your Computer

connect-to-network.jpgTo get your computer and iPhone talking, you'll need to connect your iPhone to the ad-hoc network we created above. To do so, go to the Settings application, tap Wi-Fi, and select your ad-hoc network from the list of available networks.

ip-addy.jpgOnce you're connected, tap the blue arrow next to your new network to get info on your connections--namely your IP address. Write that puppy down because you'll need it in a second.

Connect Your Computer to Your iPhone's Internet

Now it's time to make use of the SSH server we installed on our iPhone. From this point on, we're basically following our previous guide to encrypting your web browsing with an SSH SOCKS proxy. Open up your command line application of choice and enter the following:
ssh -ND 9999 root@YourIPAddress

...where YourIPAddress is replaced with whatever you wrote down above.

host-key.pngIf this is the first time you're SSHing into your iPhone, it may take a bit for your secure key to be generating, so give it at least 30 seconds. You'll be asked if you're sure you want to continue connecting (answer "yes") and then you'll be prompted for a password. At the time of this writing, the default password for OpenSSH on your iPhone is alpine, though you should change the root password when you get a chance.

After you've entered the correct password, the prompt will appear to hang. That's actually what should be happening, so you're on the right track.

Set Your Browser to Use SOCKS Proxy

At this point you just need to set your browser or operating system to use the SOCKS Proxy we've just set up to route our internet connection through the iPhone's EDGE connection. Gina's post shows how to do this with Firefox, though I'll admit I had some trouble getting the proxy to play properly with Firefox on my Mac. Your mileage may vary, but as an alternative I'll show you how to set it up in Safari, which worked well for me.

configure-proxy.pngFirst, open the Safari Preferences, go to the Advanced tab, and click the Proxies "Change Settings" button. Make sure you're looking at your Airport advanced settings and are viewing the Proxies tab. Tick the SOCKS Proxy checkbox, enter localhost in the section labeled SOCKS Proxy Server and 9999 in the port next to it. Hit OK and Apply your settings. Then just head back to Safari and you're ready to browse.

The 20 Best iPod Utilities [Feature]


ipods.png

With a new generation of iPods on the market this holiday season, your reliable old iPod may not seem as shiny as it once did. But with the help of third party applications and utilities, you can unlock tons of useful functionality you never knew was there and revive that aging iPod so it doesn't look quite so bad next to its successors. Whether new or old, the following 20 iPod utilities can help you get the most from your iPod.

Transfer (and Play) Music to and from Your iPod

While syncing music to your iPod has always been a breeze, pulling music off your iPod isn't quite at easy—unless you're using one of these handy apps, that is.
  • floola1.pngDitch iTunes with Floola (Windows/Mac/Linux): Floola is a freeware, cross-platform application that makes it easy to copy music and videos to and from your iPod from and to any computer. In all, Floola can actually work as a full-on iTunes replacement that can run from your iPod's hard drive. And because it's cross platform, Floola makes for an excellent all-around iTunes replacement if you're not a fan of iTunes. For another cross-platform solutions, you might give YamiPod a try. (Read more about a self-sustaining iPod)
  • senuti1.pngRecover Your Library or Transfer New Songs to iTunes with Senuti (Mac): The freeware, Mac OS X only Senuti integrates tightly with your iTunes library to extract music from your iPod to your iTunes library and works particularly well for importing music that isn't already in your iTunes library. Of course it's also a godsend if you've had a hard drive failure and your only music backup is your iPod, but its playlist support and ability to scan your existing library so you avoid importing duplicate songs. (Read more)
  • ipod-folder.pngDead Simple iTunes Library Recovery with iPod -> Folder (Windows/Mac): If all you want to do is recover your music library from your iPod back to your computer, iPod -> Folder is probably the simplest way to do it. Just fire it up, point it to your iPod, point it to a folder on your computer, and let it rip. It even has a "Include MP3 files only" option in case you're borrowing tunes from a friend's iPod and you don't want their DRM-infected files. (Read more)
  • mypodder.pngSync Podcasts to Your iPod from Any Computer with myPodder (Windows/Mac/Linux): Whether you're a lover of podcasts who can't wait to get to your home computer before getting your latest podcast fix or you just know you'll need a few new podcasts to listen to for the commute home, myPodder can automatically download, manage, and sync any podcast to your iPod no matter whose computer you're using. (Read more)

Converters: Video and Audiobook

Yes, you could purchase TV shows and movies from iTunes, but if you've already got the DVD or you've downloaded a video that happens to be in the wrong format, why should you shell out more cash to Apple—especially when you can easily convert them for your iPod using free apps?
  • handbrake1.pngRip DVDs for Your iPod with HandBrake (Windows/Mac/Linux): The cross-platform freeware application HandBrake is the go-to application when you want to rip a DVD for your iPod or iPhone (or PSP or PS3 or AppleTV...). Just pop in your DVD, pick what you want for your iPod, and start ripping. (Read more)
  • videora.pngConvert Videos for Your iPod with Videora iPod Converter (Windows): If you've got a video file on your computer that your iPod doesn't support, fear not. Just plug it into Videora and let it do the heavy lifting for you. It even transcodes YouTube videos—all you need to do is give it the URL. (Read more)
  • isquint.pngConvert Videos for Your iPod with iSquint (Mac): Make any video iPod-compatible with iSquint. Just drag the videos you want to convert into the iSquint queue, choose the encoding quality (which will also determine file size and time required to encode), and let it rip. You can even tell iSquint to automatically add the video to your iTunes library once it's done encoding. (Read more)
  • Convert YouTube Videos for Your iPod with Zamzar: Web site Zamzar is probably best known for converting pretty much any file format to any other file format (and it can be used for pretty much any iPod video conversion if you prefer it), but you may not have known that it also provides a simple method for converting any YouTube video for your iPod. Just enter the URL of the video, choose to convert it for your iPod, and it'll email the finished product to you once it complete the conversion. (Read more)
  • ipodifier.pngMonitor Folders and Automatically Convert Videos with iPodifier (Windows): iPodifier transcodes files just like Videora and iSquint, but if you're a frequent video downloader or you're rolling your own DVR, iPodifier can be set to monitor a folder for new videos—like your BitTorrent downloads folder, for example—and automatically transcode them for your iPod. (Read more)
  • mp3-to-audiobook.pngMP3 to iPod Audio Book Converter (Windows): If you love a good audiobook but your book isn't in the right format for your iPod, this handy little app will convert your MP3s to the iPod audiobook format (M4B) so you get all of the audiobook features like playback speed adjustment and "start from last position" functionality without the tedium of doing it yourself. (Read more)

Miscellaneous iPod Utilities

  • iscrobblerIntegrate Your iPod with Last.fm with iSproggler (Windows) and iScrobbler (Mac): If you're a fan of the music recommendation service Last.fm and you happen to do most of your music listening on your iPod, you can automatically upload your iPod listening habits to the site with whichever application matches your operating system. Just install, enter your Last.fm username and password, and forget it. (Read more)
  • Take Control of Your Shuffle with iPod Shuffle Database Builder (Windows/Mac/Linux): Add songs to your iPod shuffle by simply dragging them to your shuffle without touching iTunes—making it much more like a non-iPod MP3 player that lets you manage your music using your filesystem. (Read more)
  • ipodbackup.pngBackup Your Home Folder to Your iPod with iPodBackup (Mac): iPodBackup saves an encrypted image of your Mac's home folder to your iPod with incremental, secure backups—great for those of you who iPod have several spare gigs of storage leftover even after you've synced your iTunes library. (Read more)

Upgrades for Older iPods

A number of third party applications and utilities exist to expand the functionality of your existing iPod by modifying or installing new software onto your iPod. For example:
  • ipod-video-to-classic.pngUpgrade Your iPod Video to an iPod classic (Windows): When Apple released the iPod classic, they gave it a simple visual refresh that one would think could easily be retrofitted to older iPods, but for whatever reason Apple's not letting your run the fancy new interface on your older iPod. A replacement firmware for your video iPod brings the splitscreen interface of the updated iPod classic to your older video iPod. Read more)
  • wikipod.pngPut Wikipedia on Your iPod with Encyclopodia: (Windows/Mac/Linux) The open source Encyclopodia project brings the giant repository of knowledge that is Wikipedia to your iPod. Searching Wikipedia on the iPod is a bit of a chore (you have to type out your words with the clickwheel), but once you get used to it it feels pretty good to carry Wikipedia in your pocket. This one's for decidedly older iPods, since it won't work on 5G iPods or above, nanos, and, of course, shuffles. (Read more)
  • ipod-linux.png
  • Install Linux on Your iPod with iPod Linux: Had enough of the default iPod interface and want to jazz things up a little bit so you can do things like install and play games for free on your iPod? Replace the default iPod firmware with iPod Linux (or hell, use the graphical dual boot interface and run both). iPod Linux is supported on mostly older iPod generations. (Read more)
  • rockbox.pngReplace Your iPod Firmware with Rockbox: Supporting every iPod through the 5.5G video iPods, Rockbox is an open source firmware replacement for the iPod (and other MP3 players). Rockbox can sport everything from Last.fm support, album art, a port of the video game Doom, a Game Boy emulator, video player, and tons more. (Read more)

iPhone and iPod touch Only

Okay, so if you do happen to have one of the fancier new iPods, you do have access to a few other fairly exciting third-party developments.
  • Install Applications on an iPhone: This video demonstrates how to "jailbreak" your iPhone or iPod touch running the current firmware (1.1.2) so you can install third party applications (many of which are really impressive). If you're still running 1.1.1, installing applications only takes one click.
  • stream-ipod-to-any-itunes.pngWirelessly Stream Music from Your iPod touch or iPhone to Any iTunes Library: Assuming you can install apps on your iPhone/iPod touch (see above), you can also stream your 'Pod's music library wirelessly to any computer on the same network. That means next time you want your friend to listen to a new song on your iPod you can ditch the headphones and do it on a proper set of speakers.

Did we miss a favorite of yours? Let's hear what iPod apps and add-ons make your iPod—new or old—sparkle.

Rip DVDs in Linux the (Semi-)Easy Way


linux_topper3.jpg
With its hacker-friendly aesthetic and open source mentality, you'd think a Linux desktop would be the best place to assert your digital rights—you know, make backup copies of your DVDs, convert them for iPods, that kind of thing.

And you'd be half right. There are plenty of programs that let you take control of your video discs, but they're only useful if you can make it through a maze of configuration menus, command line options, choices about bit rates and codecs, and the occasional confusing message about a missing library.

I've tried out a good number of DVD ripping and conversion programs, and I've made peace with one method, and one program, that gets the job done more often than not. It's not exactly one-click, but once your system is set up, you can drop in DVDs and back them up or convert them with relative ease.

Note on system differences: I set up my ripping/burning system on a Lenovo Thinkpad T61 running a brand-new installation of Ubuntu 7.10 (Gutsy Gibbon). As with so many things Linux, packages and commands may vary based on your system. But for the most part, the tools I use in this walkthrough work across distributions and on both major desktop environments, GNOME and KDE.

Make your system media-friendly

The key ingredient to ripping in Linux is enabling your system to read encrypted DVDs—the kind you buy and rent. Since Linux lacks (to my knowledge) a licensed DVD player, we'll be using the libdvdcss2 package to get access. You might find the libdvdcss2 package in your distro's repositories, but you'll definitely find it at the VideoLAN web site, and Ubuntu users can install it from the Medibuntu site.

linuxrip2_2.jpgIf you're going to be shrinking your DVDs down to portable media formats like DivX or MPEG-4, you need the corresponding codecs installed. For Ubuntu users, that means heading to Applications->Add/Remove, typing in gstreamer and installing all the packages that come up, along with installing the w32codecs package from the Medibuntu source above. In other distros, try searching your installation programs for terms like "codec," "divx," "restricted," and other relevant phrases.

The program I'll be using to shrink dual-layer DVDs down to burn-able size is K9Copy, available in many repositories. It's straight-forward, it doesn't ask 47 questions about your bitrate preferences, and it works mostly on its own. Although it's KDE based, it runs in GNOME environments without too many required libraries.

Finally, here are the programs I recommend for playing and burning video files and ISOs. Use what you know best, but I've had the best success with these selections:

  • VLC Media Player: Just like on Windows and Mac, the Linux version of this all-in-one wonder plays nearly anything resembling video or audio. You could use it to play back entire DVD backup folders, as Adam prefers, or even play the DVD image itself.
  • DeVeDe and ManDVD: For creating burnable DVD images from video files. DeVeDe can handle fancier conversions, but ManDVD lets you create some pretty slick-looking front-end menus.
  • K3b or GnomeBaker: These burning programs for KDE and GNOME seem to just work, and often catch errors before burning rather than create coasters, in my experience.

Getting started

linuxrip3_2.jpgLoad a DVD into your drive, launch K9copy and select the blue folder icon in the top left corner. The title contents of your disc will be displayed, but don't touch any of that yet. Hit the "Settings" menu and select "Configure K9Copy."

Select the "DVD" category on the left of the menu that pops up, then change the "Output directory" to a convenient location. This is where the "AUDIO_TS" and "VIDEO_TS" folders that make up a DVD will go before an ISO is made. I had trouble getting the folders to go into a Windows-formatted storage partition on my Ubuntu system, and while I think KDE-based users might have more success, plan on having at least 9 GB free on your actual Ext3 (or Linux-formatted) drive or partition. You can change the "DVD size" setting here if you have trouble burning to disc, but the default 4400 MB is what most single-layer DVD-Rs can hold.

linuxrip6.jpg Now select the MPEG-4 category, unless you don't plan on compressing DVDs down to video files. I've found success choosing the XviD codec, selecting the "2 pass" option and changing the codec under the "Audio" tab to AC3, but video geeks will know what to do here. You can also easily opt for better quality rips and larger files by adjusting the "File size" option in the "Video" tab or splitting the rips onto two or more CD-Rs. Note that these are just the default settings; you can rip to another format, like the iPod-friendly MPEG-4 using the "MPEG4 Encoding Options" tab at the main window's bottom edge.

Hit "OK," and now it's time to choose what we want to retain from the DVD. If you want to copy everything—including menus, featurettes and all the language and subtitle tracks—select the "DVD Playback Options" menu from the right-hand edge and check the "Keep original menus" button at the bottom. Otherwise, you can go title by title through the DVD, deciding which audio, video and subtitle tracks to drop for better picture quality. If you're unsure what to pick, hit the camera button at the top left to preview the video and change the subtitle and audio options to see what's best.

Let 'er rip

linuxrip5_6.jpg Now make sure the "ISO image" output device is selected, and then click either the MPEG4 or Copy buttons (or choose from the Actions menu) to start ripping. I found my ripping times to be about even with DVD Shrink in Windows, but certainly faster than if I ran DVD Shrink in WINE or other Windows emulators. After it finishes, you're most of the way there—you can burn the ISOs to DVD-Rs, watch the backups in your media player, or use the video files wherever you can play 'em. K9Copy has an option to burn directly to DVDs, but I haven't read too many great things about it.

Friday, December 7, 2007

Paypal hacking


This tutorial will help you to hopefully get software and possibly products for almost free.
It won't work on products because it sends the seller an email along the lines of "you have received $0.01 from (your paypal name) for (the product)" However this works great on automated software scripts where it detects that you gave a payment and emails you a link to download the software.

IT'S BACK FROM THE GRAVE, REPUBLISHED!


step 1Download Tamper Data
You will need the Firefox extension Tamper Data for this to work.
Download it here: link to download tamper data

step 2Finding your target
You need to find a place that supports paypal or paypal shopping carts.




step 3Start Tamper Data
Next we need to start Tamper Data up.
In Firefox menu go to tools then Tamper Data.
Once the window shown below pops up press Start Tamper

step 4Buy it!!
Now click add to cart.
The Tamper with request window will pop up. Click the Tamper button.

step 5Tamper with the data
Now for the most important part, modifying the post variables.
Find the parameter called amount and change the value to 0.01 because that is the lowest amount PayPal will process. Next mess with the parameter called no_shipping, if it is even there, until your shipping comes out free. When you are done click the OK button at the bottom of the window.

step 6Finished
Your now done and the world is your oyster (or other preferred mollusk)!





Thursday, December 6, 2007

Movies On Your Treo - Easy Method #1

Ingredients

Needed:

  • FairUse Wizard 2
  • TCPMP
  • A DVD drive on your PC
  • A Computer running Microsoft XP

Recommended:

  • SD Card Reader or
  • Softick CardExport


The two "needed" programs allow you to convert your DVDs into a format that can be viewed on your Treo. Both are freeware. (The sites accept donations, and we encourage you to support the developers.) You will not need any other software (decrypters) to do the job. There is a good chance that this method will work as well for Windows Mobile devices as for Palm OS devices. This tutorial is based on my experience with a Treo 650 & 700p, and I encourage anyone with a WM5 device to comment.

The only equipment you should have is an SD card reader. It makes transfer of larger files much easier, and I have heard that hotsyncing large files to your device with the Palm install tool does not work well.

Instructions

The first thing I like to do when starting a video encryption is to set up everything. I put a folder labeled "Treo Movies” in the "My Documents" folder on my computer's desktop.

movimage002.jpg

By doing this first, I know where I am going to place all projects and where to find all finished work. Then I put a folder on my SD card where I am going to transfer the movies once they have been converted. I call it “Movies”.

movimage004.jpg

As with any computer or Palm project, proper preparation makes the whole thing go smoother.

Now, install everything: FairUse Wizard 2 to your PC, TCPMP to your Treo, and Softick CardExport if you choose to use it. Last time I checked, it was loathe to work with Fat32 (4ghz cards) so if you have a 700P or a ROMmed 650 you may want to use a card reader. I do, as Softick didn't want to play with any of my 4 gig cards.

Starting Encryption

Place the DVD you want to convert into your computer's DVD drive. If any programs are open, close them. Next, open Fairuse Wizard. Fairuse Wizard's opening screen will come up.

movimage006.jpg

Notice "start new project" is already selected:

Next select where the finished movie will go. Select the "Treo Movies" folder in "My Documents" if you've set it up as I recommended.

Select "Next". There may be a point in the process where you are notified that the disc is encrypted. The program will still do the work. Please make sure you own the disc. There are penalties for pirating, and also for sharing completed projects.

movimage008.jpg

You will be given a screen to select the DVD writer you are using for the project. Select the driver that has the DVD you wish to convert. Then select OK.

movimage011.jpg

You will be given choices of the files that the DVD has on board but FairUse Wizard will automatically select the correct file. It is noticeable because (in a single movie) it is the largest file, recognizable by the size in megabytes already highlighted.

movimage013.jpg

Notice that “Hide Chains” and “Cache the selected program chains (multisession)" have already been selected for you. If you wish to do a TV series with multiple episodes on disc, you will have to realize that the first episode will be highlighted. Once encryption of the first episode is done, you will have to restart FairUse Wizard and then select the second episode manually (noticeable by its matching large file size but lower file position). Continue until all episodes have finished.


Now it starts:

movimage015.jpg

FairUse begins its work.

There will be one more pause where you will have to do something before it goes autopilot. For a Harry Potter video the stoppage will look like this:

movimage017.jpg

All you have to do is select next. It will bring up some choices: On this next screen you should select IVTC. If you don't, the computer will do it for you.

movimage019.jpg

Once this is done, You will be introduced to a screen that asks you to choose the output file size. Kill me, but I like big Audio, Video. Give me 400meg for movies for reduced pixelation with blacks and great audio. Down to 250 meg has been pointed out to me as being workable. Here is a screenshot of me goin' BIG!!

movimage021.jpg

As far as Resolution goes, I think the program selects the proper amount without interference. Experiment and see what you like but the setting chosen has always worked for me.

movimage023.jpg

Auto Pilot from here on out. The program will finish without you having to do anything.

First Video Encryption:

movimage025.jpg

Then the Audio encryption:

movimage027.jpg
Second Video Encryption:
movimage029.jpg

Finally the finished product:

movimage031.jpg

Once the video encryption process is finished there will be large leftover files in your "Palm Movies" folder along with the finished movie. At this point I usually go back in to my "Palm Movies" folder on my desktop and clean up the mess. You want to delete all the files with the exception of the completed movie. Your completed movie can be recognized by its file size (a little over 400meg for this tutorial) and the way it looks (a circle in the Windows colors scheme with a "play" icon). Cleaning up makes movies easy to find and keeps your hard drive from becoming cluttered.

movimage033.jpg

After cleanup is done and the movie has been converted to a file compatible with TCPMP you must choose the way you want to load the movie file. The way I do it is drag and drop it to my SD card using the reader

It is now time to play it! Open TCPMP on your device. Use your menu button to open TCPMP's menu screen. Select "Open Files"

movimage035.jpg

Go to the file that has your movies (in this case "Movies"):

movimage037.jpg

Select the movie you wish to view (in this case "Shogun Assassin" and a check will appear in the box and the selection will be highlighted in yellow). Select OK.

movimage039.jpg

The movie will come up. Select "Play" to watch.

movimage041.jpg

To fine tune viewing you have options. If you need more volume, select "Prefs". Select "Audio" and then use the "Volume" slider bar to make small adjustments in volume.

movimage043.jpg

To make large adjustments in volume select the "Preamp" slider. This will help if the volume needs major increases. A combination of the two will help fine tune the movie volume to your specific need.

movimage043.jpg

On this demo I specifically chose a Letterbox (Widescreen) movie to demonstrate. When converting movies there is usually a border at the top and bottom. If you convert a Full Screen movie, it usually plays fine once volume is adjusted. With a Widescreen conversion, the movie can appear very small. For some this is fine. For others, you may wish to make the movie appear larger. There is a way to fix this. Go back and select "Prefs". Select "Video"

movimage045.jpg

Notice the screen defaults to "Fit Best". It gives you this picture using my example:

movimage047.jpg

If I change the setting to "Fill Screen"..

movimage049.jpg

I get this. Better.

movimage051.jpg

There is a small amount of left and right picture lost but no real loss of image quality. It also renders the movie more easily viewable.

Google
 
PalmProgramming