March 20th, 2003 | 08:08
Added highlighting of search terms using a javascript technique found on this forum posting. Search terms will be highlighted according to the CSS “searchterm”, which is currently yellow. Since I have relatively long postings, this helps.
I guess the next step, when I have time, is to do a niftier search engine for b2, something that will keep a concordance of words and postings and search using that. The current b2 search is a nightmarish LIKE statement in the MySQL WHERE clause, so searches are relatively expensive, database-wise.
Posted in The Blog Itself | Comments Off on Search highlighting
March 19th, 2003 | 09:29
Part of my current project is to come up with a tool to layer various images on each other and finish with a composite picture. ImageMagick does this neatly and automatically. For example:
$ composite -verbose layer_foreground.png -compose Over layer_background.png final.png
We can put random text into an image:
$ convert -verbose -font $fontfile -fill grey -gravity North -draw ‘text 0,25 “text string”‘ layer_background.png
To make a small rectangle of color:
$ convert -size 20×10 xc:red smallred.gif
Many, many other things. The ImageMagick documentation is excellent.
Posted in Tech | Comments Off on ImageMagick Rules!
March 17th, 2003 | 19:45
Slate has an article today about how inept the Bush Administration’s diplomacy has been.
Basically, even though history does not repeat itself in perfect experimental cases, we can note that Clinton was able to get Greek support for his Kosovo intervention, despite popular Greek sentiment against it. In fact, getting Greek support was probably more difficult than Turkish support for Iraq, because the Greeks openly sympathized with the Serbs (the Turks look on the Arabs running Iraq with disdain), and have a longer history of anti-Americanism.
The primary difference was that Clinton worked within a multilateral framework (NATO), which gave the Greek government both incentive and cover for supporting the intervention. Incentive, because the Greeks had a say in NATO and felt like they had a hand in decision making, and cover, because, even with strong public sentiment against war, they could point to the alliance deciding on war, rather than the seemingly hegemonic superpower. Similarly, the French were on board for bombing the Serbs, despite France’s historic ties to Serbia.
Bush, contrary to Clinton, publicly disdained the various multilateral frameworks he had on hand from the beginning. This made smaller countries oppose the war for the sake of not looking like the superpower’s lackeys. And, even if their governments supported war, these governments would have no cover from NATO or the UN. Because of this, Bush squandered the massive sympathy the world had for the United States after 9/11.
Posted in Ideas | Comments Off on Slate on Bush’s Inept Diplomacy
March 16th, 2003 | 21:45
Fortuitously, the New York Times real estate section this week has an article about some of the issues involved with combining two apartments in a building.
Basically, doing this in a co-op is straight forward. This is because the co-op as a corporate entity direclty owns the building and the board has the capability of rearranging internal space. The apartment owner owns shares in the co-op, and it’s a matter of redistributing shares from the previous owner to the new one, as well as a copy of the proprietary lease. Interior changes requires the owner’s architect of engineer to file a particular type of alteration form, but I suppose this is similar to form any landlord would have to file to customize space for a tenant.
Condos are considerably more complicated to combine. The theory is that each apartment in a condo is a separate piece of real estate, with its own surveyor’s record, title, etc. City records would have to be amended to go through with the combination, for example. Also, each apartment is separated by commonly owned property, so a supermajority of condo owners in the building would have to approve the alteration and grant that commonly owned property to the owner of the combined unit.
The article notes that combinations are becoming more popular. I’m not sure if it’s a matter of the real estate market being ridiculously high, so that combining units appears to be a better, less risky option compared to buying a new unit. It might be less a matter of the absolute price level than how quickly the price level has risen in the past few years, which may make people forget about the opportunity cost of selling the current place and paying a larger down payment on the new apartment.
Hmm. This is one instance where the 30% condo premium doesn’t pan out. But how often do apartments get combined, compared with the available stock?
Anyway, I’ve archived a copy here before it goes into the NYT pay archive in a couple of weeks.
Posted in Apartment | 1 Comment
March 16th, 2003 | 11:24
Here’s the result of about half an hour with a tape measure and an hour ineptly playing with Visio. Presumably, professional apartment appraisers working for real estate agents would have an easier time with the whole process. Or they’d just use graph paper and get it done with, since there’s no need to really computerize it if you aren’t doing architectural plans. If it’s not clear (and it may not be), the entrance to the apartment is at the bottom of the picture. This will be the entrance for the combined apartment.
I’ll have to work on a Visio floorplan for the combined apartments. The doorway will be put on the left side of the living room of the B-line, probably something like a double-width doorframe. I’m not sure if it’d go in the dead center — I’m not sure how the walls line up exactly, so there may be an asymmetry anyway — but it’ll be there somewhere. Most likely, a real architect will draft the plans, so they won’t be a hack job on my part.
Posted in Apartment | Comments Off on B-Line Floor Plan
March 13th, 2003 | 23:22
I stumbled across this site on a Plastic.com quicklink.
Neat: I got 9/10 on the first page, and 8/10 on the second. I think most of it comes from spending too much time surfing the web, since a number of the images are familiar, or have come from Snopes. A number of the other show clear signs of photo fakery. A long time ago, I actually did read a book on the history of photo fakery. I bought it after an idle Sunday afternoon of flipping through channels on the TV (this was before Tivo) and coming across a talk given by the author on C-SPAN. Shockingly, I was interested enough to buy the book he was talking about. Yes, C-SPAN’s book hour actually sold something.
Anyway, most of the photo fakery discussed in the book were from the Cold War era, where Communist propaganda machines would churn out agitprop — some of it crude, some of it brilliant — and rewrite history. The most famous instances are when Politburo members fell out of favor with Stalin, and their images were purged from the official photographs, usually by very clever cutting and pasting (cutting and pasting was literal then, with scissors, glue and photographic prints and negatives). Part of the book discussed some techniques used by photoanalysts to try to discern the real from the fake. These generally involve careful inspections of shadow and tone, and, more involved, measurements of proportions.
There’s also a bit of photoanalysis of real pictures of fakes, most significantly that of Mao and his group of body doubles. You can tell them apart in a clear enough photo by examining their ears — the ridges and folds of the pinna are relatively idiosyncratic. Or they may be pictures that are mislabelled: through triangulation of shadows, you can tell that a person was in such-and-such a plaza at a particular day, and a particular time.
Interesting stuff. I recall the author said that digital techniques have gotten so good, it’s impossible to tell a good fake from the real thing. Most of the hoax photos circulating on the Net, though, are quick Photoshop jobs, and it’s not hard to figure out that the shadow is all wrong.
Posted in Photography | Comments Off on Photo Hoax Test
March 12th, 2003 | 13:42
After reviewing weblogs, I have a further note to help clarify search results reaching this site:
This weblog is not nor has ever been the Center on Juvenile and Criminal Justice: this is CJC.org, not CJCJ.org. For information on prisons, juvenile justice, incarceration rates, and so on, please go to the other web site. Yes, the URLs are different by only one letter, but my site is so obviously not the CJCJ that you really don’t have to repeatedly search for, say, “texas state prison facility”, “curfew”, “three strikes” or “shooting”. Yes, someone at CJCJ may have had a typo with a URL, but it doesn’t mean that you have to abide by it.
Oh, regarding people at the CJCJ having domain name typos, a couple of months ago I got bombarded by errant bounce messages. The CJCJ apparently was doing a mass-mailing and mistyped the Reply-To: address. So, if anyone at CJCJ comes by and sees this posting, yes, you should proofread your mailings, and, yes, the reason that bounces seem to route through some other mail server is because there’s an alias telling it to do so.
Posted in General | Comments Off on Prison, Juvenile Justice and URLs
March 11th, 2003 | 14:46
I’m doing coding on my current project, and am getting acquainted with CVS from a developer’s point of view. So, I had my first CVS mishap this morning, where I had to pull out an old version of a file and make it current. Sticky tags, of course, get in the way. Here’s a set of instructions on how to make an old revision the current one.
Basically:
Remove a version: cvs admin -o1.3 test (don’t have the option to merge changes)
Check out old version: cvs update -r1.2 test
Revert to the most recent version: cvs update -A test
Making the old version the most recent:
mv test test.old
cvs update -A test
mv test.old test
cvs commit -m “reverting to old” test
Since I’m making a CVS tricks post, here’s some bits of old documentation I had scattered around:
importing a directory tree into CVS
In the directory above the tree you want to import, run: “cvs import ModuleName vendor_tag release-tag” where ModuleName is the module you want to check into, etc.
Master documentation: found at CVSHome.org
A primer on tags and branches: found at http://www.psc.edu/~semke/cvs_branches.html
Posted in Tech | Comments Off on Stupid CVS tricks
March 9th, 2003 | 17:46
I’ve noticed that occassionally my web site is found by people searching Google with odd or alarming medical issues. Most recently, I’ve seen searches having to do with long term effects of aspirin, sinus infections from root canal work, etc. My web site is not the place to go to for medical advice. Please check your doctor. That’s what they’re there for.
Much more alarming are searches for “coffee grounds vomit” or “black vomit”. There’s been three or four search engine referrals having to do with this. It’s because I had this about five years ago and wrote a long post detailing what happened.
From experience, if you actually have just thrown up “coffee grounds” or “black vomit”, please, PLEASE, call 911/Emergency Services immediately and get yourself to a hospital. You are bleeding internally. The Internet is not the place to look for information at this moment.
Posted in General | Comments Off on Alarm Over Search Engine Hits on Medical Topics
March 9th, 2003 | 17:18
Finally got around to writing a “mail posting to a friend” function. There should now be a link next to “printable” that will bring up a form to mail a posting off to an email address. The main point was to facilitate the sending of, say, recipes to people.
The email format is somewhat of a ugly hack: Content-type is designated as text/html, even if it’s not a particularly well formatted MIME. Oh, well.
This b2 hack is based off of the Printable function as well as similar work posted to the b2 forum.
Posted in The Blog Itself | Comments Off on Mail Posting Function