Computers & Tech posts page 14

quicken files and rsync

Backing up quicken files via rsync evidently doesn’t work: the resource forks are destroyed, which the files “need”. Files saved in this way will just give an error message when opened in Quicken, “Unable to open file.” However, the data is not lost at all. The data file is actually a package. If you show package contents, you will get to the actual data file (/Data\ File/Contents/Data\ File). To recover this data, use vim or some other text editor that can handle the data properly. TextEdit or many other similar programs won’t work. You need to get the Contents/Data File from a working data file, perhaps a newly created one. Yank all the data from the file with your data in it: there are a lot of lines, so ‘500dd’ or something like that will get them all, or simply using the graphical version to select all. Then open the working file and replace all with the yanked lines. This worked great for me.

After my recent hard drive crash, I had to use whatever I had backed up. Quicken wise, I had backed up about 15 days before the crash using rsync. I also had an old file from nearly a year ago. Unfortunately, because of my saving methods, the data in both seemed to be from more than a year and a half ago. I soon discovered that the recent data file had been rsynced to the inside of the contents of the data file I had intented it to replace. This was the actual recent data file. Unfortunately it would not work. I searched the web for solutions, but no one seemed to have one. I did get information that the resources were removed by rsync, however. I decided to figure out how to put the new data into a data file that worked. Simply copying via the finder the Contents/Data\ File didn’t work. I tried replacing the contents via TextEdit, but that didn’t work either. I tried modifying a single line in the working data file with vim, and that worked. I then tried replacing the whole file contents, and that worked well.


Boot to console

I’m working on getting my computer to boot to a text console at startup instead of GUI. I had done this with previous versions of OS X, but never got around to it since installing Tiger. I really just want to figure out how to do it, but I could save some memory and a little bit of CPU time, and add to the coolity of startup by getting this to work.

In /etc/ttys, near the top, there are two lines that say console followed by some stuff. I commented out the second and uncommented the first. I have the verbose flag set as well (sudo nvram boot-args=”-v”), twice actually, but this doesn’t work once I change the line in ttys. I get the starting mac os x progress bar, which goes on forever instead. If I hit command-V to boot to verbose at startup, I can get to console. I read someone say that the progress bar screen is simply covering up the console, so I will look into disabling it. I don’t want to have to hold down command-V every time I restart, with penalty of having to hard-restart again if I forget.

For some reason, logging into >console doesn’t work in Tiger. I simply get an error message, then have 30 seconds or so to sit and wait till the login window reappears.

I should update this once I figure more out.

[Update:]I renamed /usr/libexec/WaitingForLoginWindow. Now boot goes through verbose startup direct to a console login prompt, which often has some additional startup messages after it. Thus startup is fine now. I got a startaqua script gathered from macosxhints.com that allows me to start up the regular mac interface. See http://www.macosxhints.com/article.php?story=20030716220410216 for the script and other instructions/discussions relating to this modification. The script must be run by root.


Excel: CSE formulas

I found a strange and for some reason hard to access feature of excel. Functions such as ‘sumif()’ allow you to sum one column based on the content of itself or another. But some very desirable formulas are too complicated for sumif().

One possibility is multiple condition columns. Typing “=sum(if(a1:a100=’Red’,if(b1:b100=’June’,1,0),0)” should be a good formula to count all flowers that are red and bloom in june in the proper table. It should sum the range the results of the first if, which will be 1 if both ifs are true, or 0 otherwise. But excel doesn’t understand this, and can’t normally handle ranges in non-ranged functions.

Another example, which I discovered this by (something like the above is the example I found that allowed me to figure this out, thanks http://www.mrexcel.com/tip011.shtml ), is to sum the totals of only negative numbers in a column. I wanted to do this for a worksheet I have monitoring the amount of gas I have used from my propane tank. One column has use, which is negative if it was filled. I wanted to sum all fills. Sumif() didn’t work at all, so I tried (based on Mr. Excel’s example) to put “=sum(if(a1:a100<0,a1:a100,0))”, but that didn’t work either.

The solution to allowing Excel to handle ranges in regular functions is simply to hit control-shift-enter after entering them. Suddenly, they work properly. The formula then has curly brackets around it in the formula bar. Every time the formula is changed, you must hit control-shift-enter. If you hit regular enter, it will revert back to a non-functioning function. You must click on the formula in the formula bar to get this to work again.

I don’t know why Excel hides this functionality behind a rather unknown and unusual key combination. The functions are worthless otherwise, so there is no reason to have the non-CSE functionality when entering these functions. They add a great amount of power to the analysis of data, allowing many of the possibilities that otherwise only real databases would allow.


audacity: microphone won’t stop monitoring

I recently recorded some music through an external USB device called a Powerwave. It allows me to record one stereo track through a 1/8th inch jack or RCA jacks. I used Apple’s Garageband to do the recording. It does have a strange problem of not allowing one to see or edit anything past 33 minutes into a track: you can only listen, and only by starting it from sometime within the first 33 minutes and then fast forwarding to where you want it. But it is much more stable than Audacity, so I felt more confident in using it. However, I used Audacity for some initial testing of the setup. I had it play through the speakers while recording, since the input wasn’t a mic.

When I finished with Garageband, I disconnected the Powerwave, and the input device was changed back to the internal microphone. For some reason, the mic was continuosly monitoring even with all audio applications closed. I went in to Garageband to try to turn it off, by various means, but was unable to. I left it go for nearly a day, and nearly forgot about it, save for an occasional crackling noise I heard when I got home from work, which I at first thought was a mouse. I finally found the solution to the problem. Audacity had left the audio driver or whatever monitoring the input, and after I removed the Powerwave, it was still monitoring (though I had been able to turn it off for some reason from Garageband while using the Powerwave). Switching this off in Audacity preferences wasn’t enough to turn it off: I had to record a track to make the settings take effect.


apple to use Intel?

I say boo. After all these years of touting the advantages of the PowerPC, I’ve really come to prefer them. Some have pointed out that Intel is doing well with mobile processors, but I think the PowerPC is doing well enough: good computing to power consumtion ratio as compared to Pentiums anyway. Via I am more interested in for mobile devices.

For numerous reasons, this is a very odd change for Apple, and their reasons don’t seem to make much sense. There is speculation that Apple is covertly making this change-over to later announce it has been bought by Intel. I wouldn’t have put any thought into it, except for the extreme oddity of the move on Apple’s part. Still seems a little far fetched, but it would certainly explain Apple’s recent decision.


Finder more useful

in finder: create new file by hitting command-n. type in name with extension, opens editor of that extension set in preferences with new file with that name. also enter in keywords describing new files contents. based on setup, system will know “where” to put file: example – create a new file, type in keywords Lizard Bobson; system knows file is for Bobson account in work ‘folder’.

for every file extension, there is a systemwide set default editor and default viewer. If file opened for viewing, opened in view mode, in which viewing tools are available, editing tools generally disabled. If opened for editing, editing tools are made available and viewing tools are hidden/made less available.

Example: text editor viewing mode – up down left right arrows move view (up, down, page up, page down). character keystrokes do find for typed characters.

text editing mode – up down left right move input/editing cursor. keystrokes type text.


Database/Image App

database/image app that allows one to drag images into it, have it automatically file as regular images (with tags as extra data in file) in file system based on user set fields. defaul fields simply image and image name and image type(jpeg, etc.), but can add any fields, any number of them, and create personal organization system.set what organization system is used for filing files. has folder style interface type deal, allowing images to be grouped togethor in folders, then subfolders, etc., but the folders can be created on the fly based on criteria. related images of the same thing can be grouped togethor.


Info Storage

to user, related information given togethor, but is really stored in most efficient means possible, best balance of factors such as access time (search, sort, etc), modification time (change data and append), new item time, storage space, number of accesses to storage media.

all instances of data in any format should be able to be looked at from ‘finder’ level and relatable

redundant and inconsistant data can be eliminated using spare cpu time during idle time

relatable in hierarchial type view, getting more specifically related as go deeper in hierarchy, very generally related near top.

search time reduced using hierarchy by eliminating items in unrelated branches: searching for a friend named Amy would search through a friends subdir before/instead of business partner dir.


Ideas: File Browser

file browser (like finder) has built-in/plug-in capabilities to read and work with basic document formats. Images would appear as thumbnails, with preferences, that can be easily viewed at full size in a self controlled slide show type thing by folder. Movies would be viewable full size in the browser as well. audio files would be listenable toable, including being able to leave them play while doing other browsing. Text files would be completely viewable, possible editable. PDF’s would be viewable. Other formats would have plugins available from the maker of the app that produces them.

Allows viewing of files while still maintaining a file-browser like appearance and functionality at all times.

Controls would be provide when necessary from an easily accessible location, such as at the top of the window or in a floating window that disappears with no mouse movement. Proper controls would appear for the proper file-type.

All files would be able to be given tags, including user created tags, that are simply data about the file for informative and searching use. For example mp3 tags would be editable from the browser, as well as JPEG EXIF data.

Files could be organized in multiple directory setups without the use of aliases or anything, just an additional centrally located database directory file. Each media type would or could be given its own database so that one could look at all images at once in the image database while still have those images grouped with related other media in the regular directory system. This could perhaps be automated, having all images automatically put into the image database, which would then be able to be queried by its tags to show categories or specific dates or what-have-you.

All controls would be easily navigable and accessible with the keyboard as well as with the mouse, allowing speed and flexibility. This would include at least the major preference settings.

The browser would be very customizable to fit most peoples needs and tastes.

The browser would be designed to be slim and fast, taking up as little disk space, memory, and processor power as possible.

It would also be very plug-inable, so that users who don’t want certain features could easily remove them to save resources. Plug-ins would be able to be developed by third parties, so that alternatives for each file-type or function could be provided. If someone doesn’t like, say, the regular image browser, they could remove it and install a third party one easily that would integrate with the browser.

/****** the following is sort of a reworded, newer, and a bit different version of the above *****/

The independent application that handles specific document types is generally no longer needed, in my opinion. All files can be handled from within a single application, allowing the difference in file types to not affect the similarity in content (one should be able to view both text files and images relating to a given subject without having to change applications).

Plug-ins would provide the capabilities for multiple file-types: a plugin would essentially be the application for viewing and editing a given file-type, but would be opened within the ‘finder’ instead of separately. Each plugin would be loaded when opened, and taken back out of memory when no longer needed, possibly a specified time after the last opening of that doc type, with the amount of time weighted based upon the frequency of opening that given doc type.

Each document would be stored in the database like an object of an inherited class in an object oriented programming language. Every file would have certain attributes, such as disk location, creation and modification dates, name, user, group, as well as functions, such as rename, modifyContent, view. These would be part of the ‘file’ class. General categories of files may have more attributes and functions than that: ex ‘media’ category may contain author, date media was created. The ‘media’ category would contain some specific file types, or perhaps more specific of categories, such as pictures, movies, music. Each specific file type, what would be the instances created in the database, would have the most specific attributes and functions. A photo might have attributes size, color profile, shutter speed, and functions resize, contrast. Each specific file type, like in any OO inherited object, would have all attributes and functions of the more general categories of file type in addition to its own.

With standard setting, the document by default is opened in viewing mode. In this mode, no changes can be made to the file. All commands are designed to aid in the viewing of the file. A certain command would enter editing mode (likewise in editing mode, a certain command would bring you to view mode). In editing mode, all commands are set-up for editing. As an example, for a text document, typing ‘apple’ might put ‘apple where the cursor is currently when editing, but live-search for that text when viewing (another entry has more on this).

If anyone is interested in helping me build such a thing, contact me at public@tobymackenzie.com. I have only a little programming experience and have done almost nothing towards creating this project. I plan to start by making an application for Mac OS X that is like any other application and doesn’t affect the finder or its database, instead having an additional database that is its own and working through/with the systems database.

related thought

folders are not really files. they are used only for organization, so would not exist if there was no organization. files containing your content are a different kind of file from the organizing folders.


</toby>