Adams Bros Blog

23Mar/140

tgtd reload targets.conf failing

Author: Trenton

I've spent hours trying to figure out why tgtd is not working properly.  I change things in targetd.conf, and nothing actually changes for the initiator (clients).  I can even change the password, and the old one still works but the new one does not.   I found out that tgtd will frequently refuse to stop, even though you shut the service off, and no clients are connected.  So, if you're having this problem where your targetd.conf just doesn't seem to be reloading, check if tgtd is still running.

ps awxuf | tgtd
  • tgtd reload configuration not working
  • tgtd reload configuration fails
  • tgtd config reload
  • tgtd configuration won't reload
  • tgtd config won't reload
Filed under: Linux No Comments
18Feb/145

Razer Deathstalker Stuck Enter Key On Login

Author: Trenton

There have been two updates since they said they'd fix it.  Neither update fixed it.  If you run into this, please contact razer and bug them about fixing it..

I've been having this problem with Windows 7.  I'm not sure if this solution will work on any other Windows platform, but it may.  I am not even sure that this is a safe operation for Razer Synapse, as it may lose your settings.  I haven't had a problem, but I make no claims or warranties as to whether this causes problems on your system.

If this is happening to you, it's because of synapse, not your keyboard. Their software gets messed up during the unlocking of the session somehow. This solution will fix it.

Filed under: Games Continue reading
27Feb/130

apache tomcat 7 rpm

Author: Trenton

So, I decided to get an apache tomcat 7 rpm going.  I ended up finding someone who had created one, and then made it work a little bit better.  I had one guy that used to be a fedora RPM contributor help out a bit as well.  The result is a repository on github.

If you want to help contribute, and make it better, by all means fork it and work away. :D

https://github.com/TrentonAdams/apache-tomcat-rpm

Filed under: Java, Linux No Comments
13Mar/120

Age of Empires Cannot Detect CD

Author: Trenton

I have the collectors edition, which includes AOE 1/2 and the expansions.  I was having troubles with this game, as it kept asking for the CD, when the DVD was in the drive.  This was because I applied a patch downloaded off the original site, thinking I needed to make sure it was up to date.  Well, as the story goes, the readme.txt on the DVD tells you NOT to do that, and that all the latest patches are already applied, and the ones on the website are not compatible with the DVD version.

Filed under: Uncategorized No Comments
28Feb/1210

Upgrade Android SQLite Database

Author: Trenton

After fiddling with a few different styles of coding a database upgrade implementation for Android, I've settled on a fairly simple method.  Basically, I take the old version, and increment a counter until I get to the current version.  Through each iteration, I use switch on the value of the upgradeTo variable, and upgrade each cycle.  If things get too complex for your application, you can always create individual upgrade methods, for each version.

Of course this method will only work if your database version is incremented by one each time you change the database.  And, this really should be the way you version it anyhow.

    public void onUpgrade(
        final SQLiteDatabase db, final int oldVersion,
        final int newVersion)
    {
        int upgradeTo = oldVersion + 1;
        while (upgradeTo <= newVersion)
        {
            switch (upgradeTo)
            {
                case 5:
                    db.execSQL(SQLiteSet.V5_ADD_LAST_CARD);
                    db.execSQL(SQLiteCard.V5_ADD_FAILED);
                    break;
                case 6:
                    db.execSQL(SQLiteSet.V6_ADD_IMPORT_TYPE);
                    break;
                case 7:
                    db.execSQL(SQLiteSet.V7_ADD_SHORT_FNAME);
                    break;
            }
            upgradeTo++;
        }
    }

Someone asked in a comment, why we do the upgrade in a loop.  I do this because I do not know what version they will be converted from or to. So, I must either put a bunch of logic for every possible upgrade variation, such as 1 => 2, 1 => 3, 1=> 4, 3=> 4, etc, etc, or, I can loop through and do one upgrade at a time, and increment the version through each loop.  This GREATLY simplifies the database upgrade.

Filed under: Android, Java 10 Comments
13Feb/120

perltwit just release

Author: Trenton

Perl Twit is a Linux/Unix command line utility for sending twitter messages.

I've been using this for probably well over a year now, and just never managed to release it.  Today I decided to push it up to github.com, and let the world have at her.

https://github.com/TrentonAdams/perltwit

Filed under: Linux, Perl No Comments
31Dec/117

Send Email in your Android Application

Author: Trenton

I've seen a lot of examples of how to send email from an android application.  All of them result in applications coming up in a chooser list that are not appropriate for sending email.  In this post, I'll described the various solutions I found, and the solution that brings up only email clients.

Filed under: Android, Java Continue reading
7Nov/110

Conversion to Dalvik format failed with error

Author: Trenton

I went looking, and looking, and looking, for a solution to this problem. None of them seemed to fit the bill. I tried...

  1. updating proguard
  2. not using libraries I shouldn't be
  3. re-importing the project
  4. removing duplicate android jars
  5. removing all android jars
  6. a host of other "suggestions" from Eclipse Android users
Filed under: Android, Java Continue reading
22Jul/110

Eclipse Android Hello World Tutorial Video – Part 3

Author: Trenton

In third part of the android hello world video, we explain the different components of the application, and why things are done in a certain way.  This video is a bit raw.  However, rather than editing the videos, I'm going to try and improve my presentation skills as I go.

21Jul/112

Ubuntu Sluggish or Slow

Author: Trenton

I was recently having a problem where my new computer was becoming extremely sluggish while running Ubuntu Linux 11.04.  The keyboard input was very delayed and slow.  The graphics were terribly slow.  Just about everything in the system became very slow.  I've heard reports from similar problems, of complete lockups.  It seemed to be linked to when the screensaver was activated, or power management was activated.  But, after having disabled both, and continuing to have problems, I realized that wasn't it.  Keep reading for the solution to my problem; I hope it helps you too.

Filed under: Linux, ubuntu Continue reading