My thoughts on food, technology, politics, running and... nope, those are the only thoughts I've got!
Saturday, April 23, 2016
Thursday, April 07, 2016
Major accomplishment
Sunday, January 10, 2016
Beach Ball!!!
Saturday, January 02, 2016
Friday, January 01, 2016
Swift selector argument - yes you can!
For example, if you are calling performSelectorOnMainThread to work around the problem between GCD and UIWebView that causes hangs in stringByEvaluatingJavaScriptFromString (see here) you don't have a choice.
But how to pass an argument? I defined my selector function to take AnyObject? just as I assumed I should since withObject:AnyObject?
So tl;dr - here's what I was doing wrong. The colon at the end of the selector DOES MATTER. Well duh, of course it does, because it indicates there's an argument. Here's an example of everything working correctly...
private func caller() {
let arg = 42
performSelectorOnMainThread("myfunc:", withObject: arg, waitUntilDone: false)
}
func myfunc(arg: AnyObject?) {
guard let n = arg as? Int else {
print("how did we get in this cornfield?")
return
}
print("and here we are with our arg n: \(n)")
}
...and the proof of the pudding - my, how tasty!
and here we are with our arg n: 42
Thursday, December 10, 2015
What To Wear
| °F | Just Right | Too Much | Not Enough |
|---|---|---|---|
| 56 |
| didn't need the hat or gloves or extra LST | n/a |
Wednesday, November 25, 2015
Handy howmany commandy
tcsh & csh
alias howmany "echo 'select count(*) from table;' | sqlplus -s 'xxxxxx/xxxxxx@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxxxxx)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=xxxxxx)))'"
sh & bash
alias howmany="echo 'select count(*) from table;' | sqlplus -s 'xxxxxx/xxxxxx@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxxxxx)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=xxxxxx)))'"
(for ksh use either) - and then...
$ howmany
Enjoy!
p.s. I'd love to add a pipe to
sed -e '/^$/ d; s/^\s-*//g'
but the dollar sign screws things up, at least in tcsh. Oh well!
Wednesday, November 18, 2015
Sunday, November 15, 2015
Hard-to-read Podcasts
Saturday, November 14, 2015
Don't take checks from strangers
Wednesday, October 07, 2015
Emacs cleanup
;; kill buffers visiting /scratch or /tmp files
(defun cleanup ()
(interactive)
(let* (
(n)
(list)
(file)
)
(setq list (buffer-list))
(setq n 0)
(save-excursion
(dolist (elt list)
(setq file (buffer-file-name (get-buffer elt)))
(if (and
file
(or
(string-match "^/scratch/" file)
(string-match "^/tmp/" file)
)
)
(progn
(if (kill-buffer elt)
(setq n (+ n 1))
)
)
)
)
(message "Delete %d buffer%s." n (if (= n 1) "" "s"))
)
)
)
Wednesday, August 26, 2015
I Repeat...
I'm always forgetting how to repeat a command. Here's how in tcsh:
$ repeat 9999 sh -c 'now=`date +%s` ; date > /tmp/tmp ; then=`date +%s` ; diff=`expr ${then} - ${now}` ; echo xxxxx ${diff} xxxxx ; if [ ${diff} -gt 0 ] ; then date ; fi ; sleep 15'
(The inner command is /bin/sh, of course)
Saturday, January 03, 2015
Hot and Sour Matzo Ball Soup
- Swanson Chinese hot and sour broth
- more broth (h&s or vegetable, optional)
- a can or two of mushrooms
- a scallion or two, chopped like you do
- matzo balls, prepared as directed on the back of a can of Manischewitz matzo meal
Instructions:
- Mix up the matzo ball ingredients and put them in the refrigerator.
- Cut up the scallion(s) and put them, along with the mushrooms, into the broth.
- Bring the broth and vegetables to a boil.
- Add the matzo balls to the boily broth.
- Lower the heat and simmer per the Manischewitz directions, about 30 minutes or so.
Monday, August 04, 2014
Listening Ports
Here's a handy command to find out which ports are listening:
And ymmv, but sudo is probably a good way to run that.
Saturday, April 26, 2014
Emacs Window Title
M-x set-frame-name
th! Stack Overflow
Wednesday, April 23, 2014
New cron job
Why? If you've ever run into the problem where python cron jobs start piling up because of abrtd, and you've restarted abrtd, this will help you keep an eye on things. Every hour on the 18 (so as not to run into one of my running python scripts) I'm counting python processes and if there are more than four, I'll hear about it.
Friday, January 31, 2014
Pet Peeve: "infinite number of"
Why say "infinite number of monkeys" when you can just say "infinite monkeys"??
Tuesday, January 28, 2014
Solaris TAR with Excluded Directories
$ tar cfX - /tmp/excludes . | gzip > ~/excluded.tgz
where /tmp/excludes looks like this:
./sub1
./sub2
./sub3
So it's not just a list of what's excluded, it's starting with the dot!
hattip: thank you, My Couple Of Cents!!
Saturday, November 02, 2013
Android SQLite queries and numeric predicates
Uri uri = MyProvider.URI;
String[] projection = ...;
String where = COLUMN_NAME + "=?";
String[] whereArgs = new String[] { someValue };
String sortOrder = SORT_COL + " " + sortDir;
Cursor c = getContentResolver().query(uri, projection,
where, whereArgs, sortOrder);
String[] projection = ...;
String where = COLUMN_NAME + "=(?+0)";
String[] whereArgs = new String[] { Long.toString(someValue) };
String sortOrder = SORT_COL + " " + sortDir;
Cursor c = getContentResolver().query(uri, projection,
where, whereArgs, sortOrder);
Tuesday, October 22, 2013
World Series Match-Ups
In case you're wondering about other match-ups, here is the complete list of which teams have played each other how many times.
11 Dodgers & Yankees
7 Giants & Yankees
5 Cardinals & Yankees
4 Athletics & Giants
4 Braves & Yankees
4 Cubs & Tigers
3 Cardinals & Red Sox
3 Cardinals & Tigers
3 Reds & Yankees
2 Athletics & Cardinals
2 Athletics & Cubs
2 Athletics & Dodgers
2 Athletics & Reds
2 Braves & Indians
2 Cubs & Yankees
2 Giants & Senators
2 Orioles & Pirates
2 Phillies & Yankees
2 Pirates & Yankees
1 Americans & Pirates
1 Angels & Giants
1 Astros & White Sox
1 Athletics & Braves
1 Athletics & Mets
1 Blue Jays & Braves
1 Blue Jays & Phillies
1 Braves & Twins
1 Brewers & Cardinals
1 Browns & Cardinals
1 Cardinals & Rangers
1 Cardinals & Royals
1 Cardinals & Twins
1 Cubs & Red Sox
1 Cubs & White Sox
1 Diamondbacks & Yankees
1 Dodgers & Orioles
1 Dodgers & Twins
1 Dodgers & White Sox
1 Giants & Indians
1 Giants & Rangers
1 Giants & Red Sox
1 Giants & Tigers
1 Giants & White Sox
1 Indians & Marlins
1 Indians & Robins
1 Marlins & Yankees
1 Mets & Orioles
1 Mets & Red Sox
1 Mets & Yankees
1 Orioles & Phillies
1 Orioles & Reds
1 Padres & Tigers
1 Padres & Yankees
1 Phillies & Rays
1 Phillies & Red Sox
1 Phillies & Royals
1 Pirates & Senators
1 Pirates & Tigers
1 Red Sox & Reds
1 Red Sox & Robins
1 Red Sox & Rockies
1 Reds & Tigers
1 Reds & White Sox
Wednesday, August 07, 2013
MySQL Reference
- Redhat Enterprise Linux (RHEL) Install and Configure MySQL Database Server
- How Do I Enable Remote Access To MySQL Database Server?
So thanks, nixCraft, for the assist!!
Tuesday, July 02, 2013
Upgrading Debian
Why? Why not!!
Actually, it's because of the whole google-chrome-stable and gconf-blah-blah business. It's scrolled off my screen, but it's all over the internets.
Mainly I'm following the steps I found here at HowtoForge.
Updated my sources.list, just replacing squeeze with wheezy
Did an update and an upgrade, started to do a dist-upgrade, but got this error:
E: Could not perform immediate configuration on 'openjdk-6-jre'. Please see man 5 apt.conf under APT::Immediate-Configure for details. (2)
Did this to continue:
sudo apt-get remove default-jre
sudo apt-get remove openjdk-6-jre
How about being WAN'd in via SSH and my end goes sleepy or wonky? Yikes!! But I did a:
sudo dpkg --configure -a
and the dist-upgrade is chugging along again.
A word of advice to whoever is responsible for configuration files: It sure would be nice if I could resolve all of the config conflicts either before or after the upgrade. Having the upgrade pause for me to Z and cp and blah blah blah, that's annoying.
And it's done. Now to fix the above:
sudo apt-get install default-jre
sudo apt-get install google-chrome-stable
Friday, June 21, 2013
Starting Oracle
$ cd install-area/oracle11/software
$ setenv ORACLE_HOME `pwd`
$ setenv ORACLE_SID orcl
$ ./bin/sqlplus 'sys/password as sysdba'
SQL*Plus: Release 11.2.0.3.0 Production on Fri Jun 21 06:35:36 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
.
.
.
$ ./bin/lsnrctl start
Filed under note-to-self and let's hope next time I remember there is a note!
Monday, March 18, 2013
Debian Console Mode?
Sunday, March 17, 2013
Debian Wireless (solved)
Sunday, March 10, 2013
My Apache setup
Friday, March 08, 2013
Tuesday, March 05, 2013
Firefox already running? Not.
Next time Firefox won't start and complains of "Firefox is already running but is not responding..."
Sunday, February 24, 2013
Friday, February 08, 2013
Where the streets have node names
Thursday, January 03, 2013
Samsung 923NW Screws
Monday, December 10, 2012
TightVNC selection sharing
autocutsel -s PRIMARY -fork
Thanks, Thomas from the Internets!
Reverting iTunes to 10.6.3 -- yes, you can!!
OR... (better yet, DON'T INSTALL ITUNES 11!! -- I hope somebody reads this before it's too late)
Sunday, December 09, 2012
VNC keymap swap
I switched to tightvncserver hoping that my vnc crashing will go away ::fingers crossed::
Saturday, December 08, 2012
Permission and PSP Import
Wednesday, December 05, 2012
Getting older sucks!!
Saturday, November 10, 2012
Trot Diamond, 2005-2012
Saturday, October 06, 2012
113 hours
I just finished with a project I've had on my list for the longest time. I watched all seven seasons of The West Wing, my favorite TV show of all time. It only took me 40 days to watch 154 episodes, about 113 hours running time. And no, I have no idea how I managed that!
Wednesday, October 03, 2012
Android Calendar tip
I'd been trying without any luck to find a way to make Agenda the default tab. I'd long given up wondering why the Week view wasn't available anymore.
Then mostly out of frustration, I long-pressed the Agenda icon and all of a sudden I was looking at this screen:
So it turns out you can choose which Calendar views to choose from and which order they appear in at the bottom of the Calendar screen. Yay!
Saturday, September 29, 2012
Ubuntu notes
| File Manager | $ nautilus |
| Terminal | $ gnome-terminal |
| System Settings | $ gnome-control-center |
| Update Manager | $ sudo update-manager |
| Backup | deja-dup (ui?) |
$ wmctrl |
Wednesday, September 05, 2012
VNC tip
Unknown message type 5
The google wasn't much help, so I just tried stabbing at it, and luckily, it didn't take long for something to happen.
But fortunately, Mac OS's built-in Screen Sharing does seem to work just fine. :-)
Useful ssh tricks
Thursday, August 16, 2012
Rezound ICS Linking Fixed!!
After the recent over-the-air upgrade of my HTC Rezound to Ice Cream Sandwich, I found that an important feature of Android (and indeed of every operating system) no longer worked: clicking links no longer launched the application responsible for handling that type of link.
I found the problem written up on Talk Android and realized I had a couple of choices:
I could restore my Rezound back to Gingerbread(Oh no you can't)- I could root my phone and make the fix.
As technical as I am, rooting is still kind of scary/daunting. I was really wishing I could go back to Gingerbread. But the Ice Cream Sandwich is so tasty! So root it would be.
My first search led me to an extremely helpful guide on Android Forums. I followed the instructions there for unlocking my bootloaded using htcdev, a tool that HTC provided. One thing I should say here is when the instructions call for using adb on the PC, you want your phone to be up and running and plugged into your PC. If you're using fastboot on the PC, your phone will want to be in the fastboot state, which, as much as it should have been obvious to me, wasn't at first.
Then I installed Amon Ra as my recovery, and I'm linking to it because that's proper, but you really should go to Android Forums and read up on all of this.
And next, to be honest, I wasn't quite sure what to do. I was under the FALSE impression that you needed to flash a ROM to be root. Don't know why I thought that, but it's not the case.
But where I ended up at this point was really great, the All-In-One Tool. It would have done the bootloader unlocking for me if I hadn't done that already. It also does five flavors of recovery flashing, which I wasn't needing at that point. What I did need, though, was Super User. And the instructions were muddy clear, so let me add some advice about that. You want to run the Perm Root (GB/ICS) command while the phone is plain old up and running, since adb is used to push a zip file, SuperSU.zip. It's after that file has been pushed that you want to reboot into recovery and use that recovery's zip installer. The output of the Perm Root command tends to give the impression that you're already rooted, but that's not the case until you've used recovery to do the installation of the zip.
So now I was rooted, but I wasn't done. I had copied /system/build.prop to my desktop, made the necessary edits* and pushed it back to my phone as /sdcard/build.prop.new, but I needed to put it back into /system. To do this, I used Mount /system (rw / ro) to make /system writable and I used Root Explorer (File Manager) to move build.prop.new to /system, rename build.prop to build.prop.old and finally rename build.prop.new to build.prop.
*Oh, and by the way, I found "ro.da1.enable" in build.prop twice, so I just made all of the changes twice.
Once I rebooted my phone, the good old linking behavior was fixed. Just as for centuries, clicking a Microsoft Word Document link on my desktop browser has always launched Microsoft Word, clicking on an Amazon MP3 link now launches the Amazon MP3 app, just as the gods intended.
Now that I'm able to declare victory, thanks to lots of help from the Internets, I'm off to click some thank-you and donation buttons.
Saturday, August 11, 2012
Screen capture!
My HTC Rezound has been upgraded (ha!!) to Ice Cream Sandwich, and I wondered whether screen shots might be possible. It is!! Just power/vol- and voila!!
Monday, April 16, 2012
Emacs Colors Begone
(setq-default global-font-lock-mode nil)
I'm not sure what version of Emacs that was for, but here's what I had to do (a couple times, actually) in version 23.1.1...
M-x global-font-lock-mode
Monday, April 09, 2012
Database Dropped
Wednesday, March 07, 2012
Fun with words
- something
- tenletters
- eighteencharacters
- two words
Sunday, March 04, 2012
layout.xml -> Activity.java
(defun xml-to-java ()
(interactive)
(progn
(setq tmp (buffer-string))
(switch-to-buffer "tmp")
(insert tmp)
(goto-char (point-min))
(save-excursion
(replace-regexp "[\n\t ]+" " ")
)
(save-excursion
(replace-regexp
" *<\\(\\w+\\)[^>]*android:id=\"@\\+id/\\(\\w+\\)\"[^>]*>"
"\nprivate \\1 \\2;\n\\2 = (\\1) findViewById(R.id.\\2);\n")
)
(save-excursion
(replace-regexp " *<!-- \\([^>]*\\) -->" "\n/* \\1 */\n")
)
(save-excursion
(replace-regexp " *<[^>]*>" "")
)
(save-excursion
(replace-string "\n\n" "\n")
)
)
)
Thursday, February 23, 2012
Facebook Subscriptions
Facebook Subscriptions
Very handy if you want to unsubscribe from annoying f-book friends.
Hat tip: Quora
Thursday, February 16, 2012
Google Calendar v3 Entry Update
I've been trying to update an event and all I've been getting back is a cryptic 400 error, "unsupported output format" -- BIG HELP!!
Well maybe if it had said input format... I don't know what made me try this, but when I set the Content-Type header of my PUT request (application/json) -- IT WORKS!!
Saturday, January 28, 2012
HTTP Clients for Android
Sunday, January 22, 2012
Android Emulator | Android Developers
Friday, January 06, 2012
(Semi-) Auto-complete your declarations
Well let's say you're declaring and assigning, like this:
SomeTypeName foo = something.getFoo();
But you can't remember the SomeTypeName part. Try this instead:
String foo = something.getFoo();
Eclipse will underline the error (oh yeah, you have to be using Eclipse, but who isn't??) and all you have to do it press Ctrl/1 (or Cmd-1 if you're on a Mac) and the quick fix will pop up,
Change type of 'foo' to 'SomeTypeName'
Just hit Enter and you're done! You're welcome!! :)
Saturday, December 10, 2011
SQLite.delete with args workaround
getContentResolver().delete(LogProvider.URI, LogDatabase.COL + " < ?", new String[] { Long.toString(lval) });
But this code does:
getContentResolver().delete(LogProvider.URI, LogDatabase.COL + " < " + Long.toString(lval), null);
Don't know if it's a bug in SQLite or in the way I was calling it. Doesn't matter, it's an easy enough workaround. Hope this saves somebody else some trouble!
Monday, December 05, 2011
Ballot Experiment
GraniteGeek at the Nashua Telegraph is doing an experiment with multi-choice ballots, and anyone can participate! Wish you could endorse Buddy Roemer's effort to get money out of elections? Afraid to vote for the candidate you truly like best because you would be "throwing your vote away"? Here is a chance to play with a system that fixes all that... Give it a try!
Friday, October 14, 2011
how to get screen to stay on when plugged in? - Android Forums
Thursday, October 06, 2011
createElement + iframe = NO
IE doesn't like it. Click here for the details and a workaround.
Wednesday, August 31, 2011
Droid2 Unrooting
Anyway, here are some links I found useful:
Here are the instructions for getting RSD Lite and the SBF file you need:
http://droid2hacks.com/droid-2-hacks/how-to-unrootunbrick-droid-2-back-to-factory/
And here is a tip on what to do when you're stuck at "Please manually power up this phone" -- just go back into the bootloader (up-arrow/power) and plug back in if you became unplugged. Part of my problem may be that I was running under Parallels and I goofed when it asked me to retain the USB connection to the phone.
Anyway, here's the other thing. When you're done, if you go to your settings and it has forgotten your phone number, no need to panic. From here I learned that by dialing *228 and hitting SEND you'll connect to the automated programming system. You'll hear stuff in the earpiece but if you pull the phone away from your face, you'll actually see the phone telling you it's being programmed. As in activated.
And Here's something else I didn't know. When I was done, I still had all of my apps. I'm not sure how this is possible. I expected everything to be wiped out. Did I do it right? Did the flash really happen? I'm assuming that it did, since my phone had to be reactivated onto Verizon's network. Oh well, it does seem to have worked!
Saturday, August 20, 2011
Thursday, August 11, 2011
Add UIBinder widget to root panel
And they give this example for adding your UIBinder object to your application:
Document.get().getBody().appendChild(helloWorld.getElement());
Maybe that's OK for an HTML UIBinder. I haven't tried that.
Instead, I was using GWT widgets in my UIBinder, and I wanted to add a ClickHandler to one of my buttons. But nothing ever happened when I clicked it. Turns out, as I read on Stack Overflow, that indeed the handlers aren't initialized properly unless you add to the root panel.
So here's what I did that worked just fine:
RootPanel.get().add(helloWorld);
Wednesday, August 10, 2011
Got default constructor?
Sunday, July 31, 2011
sls (combination of ssh and ls)
Here's a little bash script I just wrote and thought somebody might find useful. I'm always moving files around using scp and also needing to ssh around to ls them. So why not combine the ssh and the ls into sls -- just like scp, right?
Here are the usage and help text...
usage: sls [ls-option]... user@host[:file]...
sls is a magical combination of ssh and ls. Simply give the sls command some (or no) ls options and one or more remote locations and you'll get a listing for each. The remote spec is the same user@host:file specification you would use with the scp command, and the file part is optional.
And here is the script itself. If you have any fixes or improvements, please let me know.
Thursday, July 28, 2011
Deploying GWT
I found a handy how-to on elitecoderz.net.
Thanks, Erik!
Tuesday, July 26, 2011
GWT widgets with radio buttons
First the problem, which was that setValue didn't seem to be doing anything -- my radioButton's weren't getting set. This isn't actually true. It turns out that if I scrolled down, one of the radio buttons on the page WAS getting set. Can you guess what was going on? That's right, all of the radio buttons from all sets all had the same name.
Heres the lesson: If you make a GWT widget that has radio buttons in it, and you use more than one of these widgets on a single page, you're going to need to make the name of each radio set unique.
And my solution: What I did was to use the hashCode of the panel that contains the buttons, and this worked just fine.
You're welcome!
Sunday, July 24, 2011
Summer nest boxes
Cut from a 1"x10"...
- a 4" piece for the front
- a 7" piece for the back
- a 17.5" piece for the bottom
- two 17.5" pieces for the sides
The front and back stand on top of the bottom, such that the interior length of the box is 16".
The sides and bottom rest on the same surface, such that the exterior width of the box is 10.75".
If you cut the 17.5's short by the width of your saw blade, you should be able to get three nest boxes out of two 8-foot boards -- one board for five 17.5's and two 4's and the other board for four 17.5's, one 4, and three 7's.
Saturday, July 09, 2011
Friday, July 01, 2011
Fun with Eclipse on Mac OS: the command/option saga
I googled all around and found nothing, nothing at all, about this. The only other thing I could think of was to submit a bug (this one) and hope that someone could point me to some page about a gotcha... or whatever.
Well the plot thickens. Turns out that if I create a new user account on the Mac, that user doesn't have the same problem. So at least I know it's not even something about my system, but rather about my normal user account. So if I can't figure out, the worst case solution is I have to switch users to run Eclipse. Maybe I'd just switch to a new user account instead and move all my stuff to it.
But before I do all that, I'll see if I can figure out what it is about my account that's causing this. If I find any answers, I'll be posting them here.
Update: I tried a bunch of things -- moving all of the Preferences out of ~/Library, moving .* out of ~, moving Application Support files... I finally got fed up and just created a new account. Oh what fun this will be! :/
Wednesday, June 29, 2011
Kensington Universal Multi-Display Adapter
I've got a Kensington Universal Multi-Display Adapter hooked up to my Mac Mini, so I can have two displays. Works really great, but... whenever the power goes out and the system shuts down, I'll start it back up and that monitor is dark, dead, like a paperweight.
Want to know what I did to fix it? It's really complicated. Unplug the adapter from the system and plug it back in. Yes, that's all. Only took me an hour this time to think of that. Maybe next time I'll google it and end up back here and ::facepalm:: suffer for only a few minutes.
You're welcome, self!!
TweetDeck
Try it yourself, it's in the Android market: here.
Update: one thing I found kind of annoying is that I couldn't figure out how to switch the order of the columns. Maybe someone can give me a better idea how to do this, but I ended up jotting them down, deleting them (the "home" and "me" columns can't be deleted) and re-adding them. Hey, it worked!
Sunday, June 26, 2011
Speaking of Ubuntu (which rocks, by the way)
Installing Eclipse (on Ubuntu, of course)
Wednesday, June 22, 2011
SCP and spaces
Its advice didn't work for me out of the box, however.
What I ended up doing instead that did work was this:
scp -r 'myserver.com:"/path/with/a/Space\ In\ It' ./
Which is to say that I single-quoted the whole source argument and single-escaped each space.
I'm dealing with left-parentheses similarly:
scp -r 'myserver.com:"/path/with/a/Space\(s)\ In\ It' ./
Looks like there are other characters I need to escape, like single quotes, but I'm not going to worry about those right now. If you have any idea about escaping those in this context, please leave a comment.
Wednesday, May 25, 2011
One less hyphen to kick around
I have decided to stop hyphenating the word "email".
That's all for now.
Friday, March 25, 2011
Changing Ubuntu screen resolution
System -> Preferences -> Monitorsand change the resolution there, but I googled around and stumbled onto a command line solution -- this is the command that did the trick:
$ xrandr -s 1024x768
Tuesday, March 22, 2011
#resume-fail
PM: Device 0000:00:00.0 failed to resume async: error -16
This is a Latitude C640, by the way, in case anyone else is searching for a fix for this... if someone should stumble in here, please leave a comment, even if you don't find an answer, so I can follow up and see how you did.
In the mean time, I've set my lid-close behavior to hibernate, which does seem to work. Odd thing about that, though, is it displays a similar error (with "resume" replaced by "thaw") when the hibernate is taking place. But it does shut itself off and restart does restore the system properly.
UPDATE: I found a post on Ubuntu Forums that mentions a different issue, but the solution seems to help -- here's my /etc/default/acpi-support file...
# # Configuration file for the acpi-support package # # # The acpi-support package is intended as "glue" to make special functions of # laptops work. Specifically, it translates special function keys for some # laptop models into actions or generic function key presses. # # # Suspend/hibernate method # ------------------------ # # When gnome-power-manager or klaptopdaemon are running, acpi-support will # translate the suspend and hibernate keys of laptops into special "suspend" # and "hibernate" keys that these daemons handle. # # Only in situations where there is no gnome-power-manager or klaptopdaemon # running, acpi-support needs to perform suspend/hibernate in some other way. # There are several options for this. The options are: # # dbus-pm: # Perform suspend and hibernate actions via a DBUS request to the power # management daemon. This works for power management daemons that we don't # know of. (For gnome-power-manager and klaptopdaemon this will do nothing, # since those will be detected when they are running, and triggered using # a virtual keypress.) # # dbus-hal: # Perform suspend and hibernate actions via a DBUS request directly to HAL, # bypassing any running power management daemons. # # pm-utils: # Use pm-suspend and pm-hibernate to suspend and hibernate. (The dbus method # normally results in this as well, but calls through dbus. Use this option # only if you don't have dbus installed.) # # hibernate: # Use the hibernate package to suspend and hibernate. # # acpi-support: # Use the legacy built-in suspend/hibernate support. (DEPRECATED) # # none: # Do not attempt to suspend/hibernate. Set SUSPEND_METHODS="none" to # disable suspend/hibernate handling in acpi-support. # # If you specify dbus or pm-utils, the result will normally be the same as when # you suspend from your desktop environment. If you specify "hibernate" or # "acpi-support", be aware that this probably does not match what your desktop # environment would do (unless you have managed to configure something so that # the DBUS power management interfaces call the hibernate package). # # # Please specify a space separated list of options. The recommended value is # "dbus pm-utils" # SUSPEND_METHODS="dbus-pm dbus-hal pm-utils" # # LEGACY BUILT IN SUSPEND SUPPORT (DEPRECATED) # -------------------------------------------- # # These options only work for the "acpi-support" suspend method. This is NOT # recommended, but is retained for backward compatibility reasons. # # Comment the next line to disable ACPI suspend to RAM ACPI_SLEEP=true # Comment the next line to disable suspend to disk ACPI_HIBERNATE=true # Change the following to "standby" to use ACPI S1 sleep, rather than S3. # This will save less power, but may work on more machines ACPI_SLEEP_MODE=standby # Add modules to this list to have them removed before suspend and reloaded # on resume. An example would be MODULES="em8300 yenta_socket" # # Note that network cards and USB controllers will automatically be unloaded # unless they're listed in MODULES_WHITELIST MODULES="" # Add modules to this list to leave them in the kernel over suspend/resume MODULES_WHITELIST="" # Should we save and restore state using the VESA BIOS Extensions? SAVE_VBE_STATE=false # The file that we use to save the vbestate VBESTATE=/var/lib/acpi-support/vbestate # Should we attempt to warm-boot the video hardware on resume? POST_VIDEO=true # Save and restore video state? # SAVE_VIDEO_PCI_STATE=true # Should we switch the screen off with DPMS on suspend? USE_DPMS=true # Use Radeontool to switch the screen off? Seems to be needed on some machines # RADEON_LIGHT=true # Uncomment the next line to switch away from X and back again after resume. # This is needed for some hardware, but should be unnecessary on most. # DOUBLE_CONSOLE_SWITCH=true # Set the following to "platform" if you want to use ACPI to shut down # your machine on hibernation HIBERNATE_MODE=shutdown # Comment this out to disable screen locking on resume LOCK_SCREEN=true # Uncomment this line to have DMA disabled before suspend and reenabled # afterwards DISABLE_DMA=true # Uncomment this line to attempt to reset the drive on resume. This seems # to be needed for some Sonys # RESET_DRIVE=true # Add services to this list to stop them before suspend and restart them in # the resume process. STOP_SERVICES="" # Restart Infra Red services on resume - off by default as it crashes some # machines RESTART_IRDA=false # Add to this list network interfaces that you don't want to be stopped # during suspend (in fact any network interface whose name starts with # a prefix given in this list is skipped) SKIP_INTERFACES="dummy qemu" # Note: to enable "laptop mode" (to spin down your hard drive for longer # periods of time), install the laptop-mode-tools package and configure # it in /etc/laptop-mode/laptop-mode.conf.
Do-over!
Wednesday, March 16, 2011
How I roll Linux
I'm installing Linux
This post isn't about the fact that I'm on this crazy lovefest with Linux, which certainly isn't news.
No, I'm running the browser and writing this post WHILE I'M INSTALLING!!
This happens to be the umpteenth time I've tried to install on this one hard drive -- it's a long story, every chapter of which ends with "Error: out of disk" and some kind of Grub recovery prompt that doesn't do anything... so I ended up repartitioning, putting 40GB in for Windows to see if NTLDR will save me. We'll see. And if it does, it will be thanks to an article on linux.com.
Anyway, I was -- still am -- in the middle of the latest install and Ubuntu has this little slide show going on showing you all the cool things about 10.10 -- and believe me, Ubuntu has lots of coolness, which is why I'm working so hard getting it onto my biggest spare laptop drive...
Anyway, among the slideshow blurbs was a link to Ubuntu's support page... and it was clickable... so I clicked it... and the browser came up... and the install is still going on... totally amazing!! I wonder how you'd be able to bring up the browser, or anything else on the Live CD, and with any luck I won't have any more opportunities this morning to find out!! ::fingers crossed::
Thursday, March 10, 2011
With a name like Blekko...
Update (4:58 a.m.) go ahead and try to create a word on Wiktionary, but some guy will delete your page before you can even see it in the search results! #jackwagon
Update (~6:45 a.m.) a Google search already includes my test word, but they do have a leg up, this being a Google-hosted blog after all.
Update (Friday) 24 hours later, only Google has my results!
Monday, March 07, 2011
Working with TOPS-10 .TAP files in SIMH
.assign mta0: tape: .mount tape:/reelid:??????/nowaitStep 2: mount the "tape"
(go to SIMH and hit ctrl/E to interrupt the simulator)
sim> set tu0 lock
sim> attach tu0 /path/??????.tap
sim> go
.r opr
OPR>shoW queUES
OPR>
21:04:05 -- System Queues Listing --
Mount Queue:
Volume Status Type Write Req# Job# User
------- -------- -------- ------- ------ ---- -------------------
T10FOR Waiting Magtape Locked 4 2 OPR [1,2]
Volume-set: TAPE
Label-Type: No, Tracks: 9, Density: 1600 BPI
There is 1 request in the queue
OPR>ideNTIFY (device) mta0: (with) reQUEST-ID 4
OPR>
21:04:29 Device MTA0 -- Volume T10FOR reassigned --
User: OPR [1,2] Job #2
OPR>exit
Step 3: restore the files.r backup /tape tape: /files /rew /restore dsk:=[*,*]*.*With a tip of the hat to www.asun.net for help with the first two steps.
Sunday, March 06, 2011
Empire, another timewaster from my youth
Well here's the latest gem of my youth: EMPIRE, Wargame of the Century. Just log into your nearest Ubuntu system and say "$ empire" -- you'll thank me, I'm sure!!
...+++++++... .++++++++.........+.. .+. 0 S
...+++++aX+..........+++A+A++.........AA. .+. e
+++Xa+++..a++............+O+.........++AA. .++ 2 c
.+++++++...++++...........++........++AAOA....++ t
..+++++.....+++++...........+.........A++AA...+++ 4 o
++++++.......+++......................+AAA....A++ r
++................+++............T...........A+O+ 6
+X.........p..T...A++++.....................A++++ 5
a+++.++++........AO+++++..+..........++.....+++++ 8
+++a++........AA++A++++++.......++++....AA+++. R
++X++......A++++A++++++......+++++....A+++.. 10 o
++aaa......AAA+AAAO++++O....++++++.....+O.. u
++++a.....AA......++A+....A++O++......... 12 n
+++a+....................A++++A......... d
aa......................+A+++++....... 14
aa......................A+++++++...... 1
aa....................AOA+A++++...... 16 7
a++....................AAAAA+OA++... 8
.aXa....................AAAAAAA++... 18
........++++.......+++.......AA+A..
.....+X+++...... ++.. ....AA... 20
....++++a...... +... ........
...+++ a.... ++.. ....... 22
... +.. .....
+....... 24
.......
..... 26
...
My hope was to build this from the Fortran/Macro sources on TOPS-10, but that didn't pan out -- many undefined symbols in the Link. But this updated version is definitely the next best thing!
Friday, March 04, 2011
Setting javax.net.ssl.trustStore in JDev
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
And trying to solve it using the program attached to this post.
Unfortunately when I'd run it, instead of seeing the same error as above, I'd see this:
No errors, certificate is already trusted
And here's why: I noticed when JDeveloper started up WLS, it was setting
But when I ran InstallCert, it was instead referencing a keystore that does contain the certificate I need
It turns out that in JDev preferences, setting Client Trusted Certificate Keystore will change the value of javax.net.ssl.trustStore. A quick restart of WLS and your app is working great!
Java switches
$ javac -d ./classes ...
$ java -cp ./classes ...
I.e. I can never remember which one gets the -d and which gets the -cp. I need to make up a little song or something.
Wednesday, March 02, 2011
No more crashes!
My Droid 2 was crashing waaaay too much. Or should I have said wayyyy? It's hard to know. I never let it bother me too much until one day when my phone felt physically hot in my pocket and after setting it on my desk, I heard the tell-tale buzz of rebooting. Enough. I wish I could remember which site I was reading that led me to an idea of a culprit, because they deserve credit for what I'm about to tell you. Which is that Advanced Task Killer is no longer on my phone, and ::knock on wood:: it has been nearly crash-free (once) ever since. Come to think of it, the article I read might not have named the software, but just blamed task killers in general. Maybe the fault lies elsewhere and ATK is being blamed unfairly, but the result of removing one app does tend to speak pretty loudly for itself.
Too many windows
Every now and then I'll click a link in the Android browser and an alert will pop up, telling me I have too many windows open. Should I blame the web programmer for insisting that a new window be created? No, he/she might never have imagined their site being used on my tiny, wondrous computer. The developers of the Android web browser, on the other hand, had a pretty good idea where their program would be running and should have left the new-window decision up to me. The very idea of multiple windows, unless the user has requested such a thing, seems contrary to the natural flow of the Android UI. So let it never be said that this Phandroid never had a critical word for Google, even if it is a small one.
Monday, February 28, 2011
An old map
refrigerator
|
N/S
closet | | u:A
| ENS------ENW-------------C/UDWS
N/S | d:B
| | | u:B |
ENS----------ENW----(-----------------A/UDWS |
| | d:C |
| | | | u:C | |
| ENS----ENW----(----------B/UDWS | |
| | | d:A | |
| | u:F | u:E | | |
| ENS--D/UDWS ens--F/UDWS ENS-- ENS-- |
| | d:E | d:D | | |
| | | | | | | |
| | | --ENW----ENW----ENW-- | |
| | | | |
| --ENW----ENW------------------------ENW-- |
| |
| u:D |
ENS--------E/UDWS ENS--
| d:F |
| | |
--ENW----------ENW------------------------------ENW--E/W--torture
Sunday, February 27, 2011
Google algorithm changes and eHow
But having said that, I needed to look up the specs on some computers this morning and eHow came up in the result all three times. OK, that's kind of weird, right? In one case, I was able to get my information from one of the other results. But in the other two, I wouldn't have gotten the answer unless I'd clicked eHow's article.
Monday, February 14, 2011
I heart Emacs
And REALLY, Blogger?? I can't use <3 in the subject of a post? COME ON!!
Saturday, February 12, 2011
Twitter rant #43
Clicking a #hashtag is really great when you want to see the same message retweeted 100 f-ing thousand times #fail
Friday, February 11, 2011
Green
Recycle? The wide-mouth plastic caps of some juice bottles can be RE-USED as handy fruit stands!
Wednesday, February 09, 2011
dude_memory_exists => false
Monday, February 07, 2011
Android meet iTunes
Friday, February 04, 2011
Tap tap tap
Is this thing on? Hey maybe I'll get back to blogging now that there's a handy Android app!!









