About this page: have you ever run into little technical problems with computer hardware or software that you spent hours or days trying to fix? You google and google and sleuth various forums. When I find the solution, I sometimes post it here so it might help others. Thankfully this doesn't happen often!
My ibdata had grown to over 20 GB (from my work on wikipedia document classification), and I did not need the database tables anymore. Simply dropping the table does not reduce the ibdata file size. So I dumped the databases I wanted to keep into files, and removed ibdata. After this, I could not get mysql to work again - everything went wrong, from error messages about firewalls, password, not being able to start the service, etc. etc. etc. So I uninstalled the whole thing, and reinstalled. I reloaded the databases, and all seemed fine based on mysql command line access.
Then I started one of my rails apps, and it would complain that a simple call like Model.find(:all) was given a NULL pointer. Clearly some problem with the database connection. I updated all my gems, even installed the mysql gem (which I must have already had), and nothing worked.
Then I stumbled upon this post: http://forums.aptana.com/viewtopic.php?t=7563#p27407 and I followed the instruction of downloading the libmysql.dll, but it in the ruby/lib directory, and now all works fine. I still don't understand why (all I did was install a new version of mysql, no changes to ruby or rails)... but it works.
With Rails 2.2.2, ActionMailer enables STARTTLS by default. It was patched in 2.2.3, with a ":enable_starttls_auto => false" option, but that doesn't help in 2.2.2.
A post by Ken Liu turned out to be quite helpful. The only thing was that RAILS_GEM_VERSION was not set, and I used Rails::VERSION::STRING instead.
(I posted this at community.dell.com)
When my Dell monitor lost video signal (eg when the PC is shut off), it was not possible to turn it off, and the entire screen would change colors. I did not find a fix on the web, but return the monitor to factory defaults fixed the problem.
Here is the fix:
1 press menu button
2 hit + to get to "factory reset"
3 hit menu button again
4 hit + to get to "all settings" (NOT "factory")
5 hit menu button again
Now when you onplug the video cable, you should get the little self test box that creeps over the screen, instead of the color changes.
Note that when I first tried this, at step 3 I would get three options: "exit", "factory" and "all settings"; hitting "factory" did not help. After I hit "all settings' (which fixed the problem), "factory" no longer appears.
I switched to the Blackberry Curve several months ago (after 5 years of Blueberry!), and after setting it up with T-Mobile and Enterprise activation, I was able to manage my corporate and my personal email separately, and send and receive emails for all accounts separately. Great.
Recently, coporate IT migrated us all from Lotus Notes (!!) to Outlook/Exchange, and to a different BB server (outsourced actually). Per instructions, I backed up and wiped my Blackberry (unrelated to this topic, it only came up to the black screen and I actually had to get a warranty exchange of the handset). I reactivate with T-Mobile, and restored it, then went through enterprise activation, and all was as before.
Then one day I got the dreaded "policy changed" message on the Blackberry, and my personal pop accounts were gone (including the "setup internet email icon etc). After some googeling, I found a discussion among corporate IT BB administrators who were talking about how to avoid pop email to Blackberries! One of them complained that whatever they did, the cellprovider could always send down the service book for the pop email.
So I went to the T-Mobile webpage and clicked on "re-send service books". Bingo! Now I get my personal pop-email on the Blackberry again. With drawbacks: they are mixed in with the corporate email stream, and I can only reply to them from my corporate email account. But at least I get the emails!
(I posted this at discussions.apple.com)
I have a DELL Vista PC. My son had an ipod nano, which connected fine to iTunes through the front USB port. Then he put the ipod through the wash(BTW - I dropped my blackberry in water, and after it dried off it was fine!). So he decided to go for an ipod touch.
What a FRUSTRATING experience, and Apple telephone support did not help at all. When we first connected the touch, we got an error message about the software version not being right, and to re-install iTunes. We did that (the first of about 10 times). The installer ran into a problem with a veryvery cryptic error message, rolled back partly, but then completed without further complaints. Connecting the touch (with iTunes running) resulted in a beep, and the ipod was actually visible as a device in "My Computer" - it looked like a camera. However, iTunes did not recognize it.
I browsed discussion groups, and then removed everything Apple from the computer: uninstalled everything signed by apple, removed the folders in Programs and even the registry keys. Then reinstalled, with exactly the same behavior.
Then my wife spent many hours with Apple support on the phone. They were extremely courteous and helpful, but zoomed in on the USB port (after going through a couple of iTunes uninstalls and reinstalls). They claimed the USB port somehow didn't have the right drivers etc. Microsoft or Dell problem !!
I tried to update the drivers of the USB ports, but they all claimed to be up-to-date. Give up on ipod touch on this computer...
Yesterday, I went back and browsed some more discussion groups and stumbled upon AMDS (Apple Mobile Device Service) - instructions where to stop and start the service, but it wasn't installed at all. There was an iPod service, which I thought might be a different name, but no. So I went through another uninstall/reinstall cycle, being really meticulous about it, and got to the same situation.
The touch worked fine on our other XP PC's, so I disabled AMDS on one of them, and the behavior was exactly the same as on the Vista PC. So the USB port was definitely not the problem, and AMDS was a much better lead.
I then took the ultimate step - I did a clean reinstall of Vista, then installed iTunes. No error messages. iPod touch connects fine. My son is happy, and as a result so am I.
If anybody from Apple reads this, here are improvement suggestions:
1) the phone support person should have figured out that AMDS is not running, it seems pretty central to it all working
2) the installer had an error message which might as well have been Ketchua (and I am computer literate), and the installer completed without further complaints, but without installing AMDS.... that should not happen
As a stand-alone email reader, I decided to use MailFetcher which works well and quick. I am using pop, just because.
I did use the :delete_if attribute to pass in a block to decide whether a mail can be deleted on the server or not. Turns out the mails did not get deleted on my particular mail server. Reading through the documentation I decided to give the :finish option a try, and voila.
I am writing a standalone mailer using ActionMailer.
I ran into two issues...
I did no want to use a view, and all the documentation seems to be focussed on creating variables that can then be used in a view. Turns out you can simply do
body "Whatever you want to put in the body"
and ActionMailer won't look for a view. I found this hint on-line but don't remember where....
The other problem was that I tried to define a "reply-to" in an outgoing message. The documentation seems to suggest that you can use
reply_to "some@email.address"
But that fails. Instead (per this link) one can use this:
@headers["reply-to"] = "some@email.address"
I have a Panasonic BL-C10A webcam at home. It has an integrated webserver, which allows interactive control and real-time viewing.
Before this week, I had Covad DSL without a fixed IP. I used my netgear router for uPnP to broadcast my current IP for port forwarding to the webcam. Panasonic has the xxx.viewnetcam.com service that discovers the current IP and lets others on the internet point their browser to the current IP, and via port forwarding to my webcam. The webcam itself is password protected, so I put the camera controls on menhart.com/Cam, and it would then ask for credentials.
This I can check on "driveway status" from away from home, and family overseas can, for example, watch jumping house birthday parties on the driveway in realtime.
Well, Covad's DSL has become incredibly bad - it will cut out (disconnect) every couple of minutes. This is after it worked flawlessly for six years. I've paid for their technicians to come out and check things out, and they exchanged the DSL modem, rewired the internal phone lines, all to no effect. Of course when I told them these should not be the problems, because the same setup worked fine for six years, they would ignore that. So time to give up on that.
So we had surfnet installed. This is line-of-sight wireless (wifi, actually) - from our house we can see one of their base stations on the other side of town (up on Montevina). Surfnet primarily caters to the Los Gatos and Santa Cruz mountain communities, but since we're far enough up we see the signal. We got the 1M service, and it delivers as promised. Ok, occasionally, the download is "stuck" for a minute, but this does not happen often, and the connection/session is not interrupted.
BUT, surfnet has a strict "no webservers" policy, and the whole uPnP/port forwarding/xxx.panasonic set up does not work.
Luckily, the Panasonic webcam has another useful feature, which is ftp. So I set it up such that every minute, the webcam uses ftp to upload the latest image to a hosted webserver, and that is now what www.menhardt.com/Cam points to. It works quite well!
(I posted this at http://lists.mysql.com/internals/34720 and it has been submitted as a bug report to MySQL http://lists.mysql.com/internals/34786)
I have a MyISAM table "movies" with a fulltext index on the title column. In there, I have among many other titles:
"City Of God"
"An Unreasonable Man"
I do a query like:
select title from movies where match (movies.title) against ('+city of*' in boolean mode);
This query NEVER RETURNS - it results in a locked table and a bogged down mysql, even ^C out of the commandline client does not make the query go away (the table has less than 300 entries at this point, it's not big!).
('+city of') or ('+city') returns the right thing, and to tell you the truth, the '+city of*' was a programming error (not mine :-), but still, why does it lock up mysql?
(I posted this at http://ubuntuforums.org/archive/index.php/t-425328.html)
My son has a Vista dual core machine, and I thought that I'd put Ubuntu on it so I could use it as a server from my office when he's at school. And if I need it, he could be playing his on-line games in Firefox (actually, not, because I failed miserably to install Java so he could play runescape on Firefox/Ubuntu, but that's another story).
I had recently installed Ubuntu 6.10 as dual-boot on an XP machine in our kitchen and that works very well (after some issues with the graphics card, where garlik42 on this forum helped me out, thanks).
So I put the Ubunto CD in, and it did not give me the automatic repartitioning option - just reformat and manually repartition. This is a Dell machine, and it already had 3 partitions (one of them has the recovery on it, I guess). So I added another partition, but wait... you need 2 (swap and /), so I added an extended partition, and within it, those two. Then I let the installer do its work - 160GB disk, so it took a but of time, but all seemed to go well, and Ubuntu works... except for that it is really not all that fast - it's actually slower than a vmware virtual machine with debian that I run hosted on an XP machine with lesser hardware. I need to check whether Ubuntu takes advantage of the dual core or not.
Anyway, all was well until my son came back to play a game and wanted to boot to Vista. It complained, and suggested some sort of repair operation, and when I agreed, it went away... for hours.... overnight... nothing happened. My son was in tears, and went around shouting I HATE UBUNTU !!! I HATE UBUNTU !!! Not only can he not play his games, it's his birthday tomorrow (11th), and his grandfather's present is a new PC game!
I reverted to on-board graphics, and I had the same behavior. There were three disks that came with the Dell box. One was a pretty cool hardware test utitilities DVD, and I ran through many of those, all was fine. There was a Vista recoveryDVD, and it would boot from there, but quickly go to the good old black screen, and sit there. For reasons unknown there was also a Vista upgrade DVD, and it would boot from there, and go to the black screen, again without return. Nothing worked.
Then I popped an old XP Upgrade CD in there, because I had used its repair facility once before. This got me a step further - it never got to repair, just to the stop screen with error code 0x0000007B.
There is a Microsoft knowledge base about it. One of the suggestions was to put the drive into another computer. So I did, and of course at first the computer didn't recognize the drive at all, apparently this SATA thing had to be enabled in the bios of the other computer, but when I started it up after that, Windows (XP in this case) started chkdsk on it, and repaired some stuff, and I could read the drive fine. I then put it back into the other computer, and now Vista and Ubuntu both boot and work as advertised.
I am not sure there is a lesson here - Ubuntu is great and free, but it definitely still requires some doing - the two times I tried a dual boot install so far (which allows me to recklessly generalize) resulted in problems that even a smart but non-engineering person like my wife would not have been able to handle.
Most important, though, my son will actually have a Happy Birthday !!! :)
I needed to put utf8 multibyte characters into a webpage. I forget the details, except that I think I tried everything, including iconv, etc., so I looked up the definition of utf and multibyte characters on wikipedia, and also how funky characters are encoded in HTML, and wrote a little Ruby helper.
def utf8_to_html( str )
outstr = ''
i = 0
while ( i < str.size )
# ASCII character
if (str[i] & 0b1000_0000) == 0
outstr << str[i]
i += 1
# UTF-8 2 byte character
elsif (str[i] & 0b1110_0000) == 0b1100_0000 && i < str.size-1
x1 = str[i+1] & 0b0011_1111
x2 = str[i] & 0b0001_1111
x2 = x2 * 0b0100_0000
outstr << '&#' + (x1+x2).to_s + ';'
i += 2
# 3/4 byte character? (unlikely, so ignore for now)
else
i += 1
end
end
outstr
end
It seems that our database on MaxWiki entered a corrupt state today.
Here is how I recovered from it:
innodb_force_recovery = 5in the MySQL config file my.conf ( see http://www.mysql.org/doc/refman/5.1/en/forcing-recovery.html).
mysqldump -mysqldump --database typo -uroot -pROOTPASSWORD > typo.sql
mysqld_safe --user=mysql
mysql_install_db --user=mysql
mysqladmin -u root password ROOTPASSWORD
In summary, this actually quite simple and quick... but it was pretty scary at first.
(I posted this at http://beast.caboo.se/forums/2/topics/801)
acts_as_attachment would not work for me (using a windows box for this), while it did work for others on the project (who use linux or macs).
After some digging, I found that the attachment_data was much shorter than the file, and what happens of course is that one windows you have to use "rb" instead of "r". Tempfile does noÂÂÂÂÂÂÂt do that.
So what worked for me was to change in instance_methods.rb
#uploaded_data= self.attachment_data = file_data.read
to
self.attachment_data = File.open( file_data.path,"rb").read
And that seems to work, but it broke the Mac solution. So I made it conditional on the Ruby platform variable.