Saturday, August 29. 2009
I have been in love with my Kindle 2 since I bought it. That's not to say it's without some flaws. One of the things I constantly miss is the lack of page numbers as a frame of reference. On the Kindle, you don't have page numbers, you have "section" numbers. These numbers are dynamic based on font size and other things.
I recently have started using goodreads.com and wanted to be able to update my status with my current page number. To this end, I created a Kindle page calculator that you may find of use. There are some caveats, which I mention on the calculator page.
Let me know if you find this useful or if you have suggestions or problems.
Posted under the influence of [[Owl City :: Rainbow Veins]]
Tuesday, October 16. 2007
SQL Server 2005 Express is the best free edition of SQL that Microsoft has ever released. That being said, the few features it omits from the Standard version can be a source of frustration. For example, I wanted to setup an automated task to dump a SQL table into a MS Access database table every night. I realize that Express doesn't have a job agent, no big deal. We can use Task Scheduler for that. But how to move the data?
After experimenting, I found a great solution. I created a new "Linked Server" pointing to the Access database, then did a simple INSERT INTO / SELECT FROM statement in a stored procedure. Here are the basic steps:
1. Create a new Linked Server
Open Management Studio Express. Expand "Server Objects", then "Linked Servers". Right-click "Linked Servers" and pick "New Linked Server". Give it any name you want at the top, let's say TEST_MDB for sake of example. Provider should be "Microsoft Jet 4.0 OLE DB Provider". Product name is "Access". Data source should be the full path to the .mdb file. Leave Provider String empty. (Note: i think that's where you'd set user name and password if your mdb file is protected). Click Ok. If you refresh your Linked Server list, it should be there now.
2. The query syntax . . .
When referring to a table in your Access database, use the following syntax. Assuming a linked server name of TEST_MDB and a table name of Customers it would be:
TEST_MDB...Customers
Those three dots are very important.
You should now be able to write any query you want against that database. INSERT, SELECT, UPDATE, DELETE, whatever. Joins work as you would expect with a local table.
Posted under the influence of [[Ulver :: Untitled II]]
Monday, April 9. 2007
Several times a week, I wish that Visual Studio 2005 had an option where I could convert an HTML control to its ASP.NET counterpart. Generally, I am given a page mocked up by an HTML designer and I need to "make it work" in an ASP.NET application. Wouldn't it be great if I could right-click a 'input type="text"' HTML element and convert it to an ASP.NET TextBox? Or even better yet, run the conversion against an entire page and have every HTML element converted in one fell swoop. 'select' to DropDownList, 'input type="radio"' to RadioButton or RadioButtonList, and so on and so forth. If I wanted to make it really slick, it would capture attributes like "name" or "size" and convert them to the ASP.NET attributes like "ID" and "Width".
If anyone knows of such a tool, drop me a line. If I ever get a spare day, I might whip something up myself. Let me know if you'd be interested as well.
Posted under the influence of [[Ratatat::Seventeen Years]]
Saturday, March 17. 2007
Often, when restoring a database from a remote machine on my local development machine, my user logins no longer work for that database. The problem lies with the fact that while the user name is the same from machine to machine, the underlying GUID that SQL uses to identify users is different. Thankfully, there is a very easy one line command that fixes these "orphaned" users.
In the context of the database with the orphaned user, run:
EXEC sp_change_users_login 'Auto_Fix, 'username'
Of course, substitute the actual user name for the placeholder in the above script.
Posted under the influence of [[Pennywise::Victim of Reality]]
Saturday, December 10. 2005
I use avast 4 (home) for my virus protection. I frequently found that when running an ASP.NET application locally that sent mail via an external SMTP address, avast would get in the way and either slow the process down to a crawl, or cause a timeout and prevent the mail from going out. My temporary solution was to simply disable outbound email scanning while I was doing some local debugging.
Today I had a few minutes and thought I would find a more permanent solution. I dug through the various options in the Internet Mail scanner section, but didn't find anything that seemed to apply. I could choose to not scan by port or IP, but this external SMTP is my primary SMTP, so that's not a good solution either. After searching on the Avast forums, I discovered a "hidden" setting that has to be keyed directly into the avast4.ini file.
Open your avast4.ini file (default location is c:\program files\alwil software\avast4\data) and find a section called [MailScanner]. Right under that heading, add the following new line:
IgnoreProcess=aspnet_wp.exe
Save and it takes effect immediately without a reboot or avast restart. You could comma separate additional values if you have other processes you'd like to exclude.
Posted under the influence of [[Stereolab::Hallucinex]]
Friday, November 18. 2005
Don't ask why, but today I needed to solve a simple 3 x 3 matrix. Since I was a bit rusty, I first wanted to make sure that my system of equations had a finite solution. A quick google turned up a basic Javascript matrix calculator for 3 x 3 matrices, just what I needed. The online calculator quickly told me the solution to my problem. But, I had to implement this in code, so I figured I should be able to work it out on paper myself first.
An hour or two later, I was able to arrive at the same solution. During my struggle, I wished that the online calculator would "show its work" to see where I went astray. It didn't. Another few searches on google turned up no results. I guess this is a niche I should fill. I don't have time to do it now, but I would like to create a server-side app that not only solves a 3 x 3, but shows the steps along the way, with some explanation of what is happening. I found the tutorial on this site quite helpful in really explaining the steps and why the steps work. I plan on incorporating the work of both sites into a solver that explains step-by-step how the solution was reached.
Posted under the influence of [[Johnny Cash :: When the Man Comes Around]]
Friday, October 7. 2005
I'm currently in the process of setting up a new laptop at home, and high up on the list of priorities is installing Firefox with my must-have extensions. There are a couple I could name in my sleep, but there are others I always hunt and peck for until I finally track them down. Below I have documented the extensions I use not only for my own reference, but also to share with others as well. They are listed in order from most amazing to simply just amazing.
1. Web Developer
2. All-in-one Gestures
3. Super DragAndGo
4. Firebug
5. User Agent Switcher
I have not bothered with version numbers and links since those things tend to change over time. If you visit the Mozilla Extensions Gallery you will easily be able to find these with a simple text search.
One final note: These extensions are provided free of charge by developers. If you find them as valuable as I do, please consider a small donation to the extension's developer.
Saturday, August 6. 2005
On a recent project I made use of a fantastic library called Overlib. It fit the project's needs perfectly and allowed me to implement a solution in minutes instead of hours or days. The developer of this library provides it free of charge, and like many other free/open source apps, he had a link to make a donation. If you're anything like me, you've seen these links on any number of pages and perhaps thought: "Who would donate money to some person you don't know?"
Well, I was so grateful to this developer that I actually stopped and considered donating. I thought through what his code had allowed me to do, namely, to finish a project ahead of schedule and move on to yet other billable work. Basically, utilizing this code allowed me as a developer to be more profitable. I don't know what the actual going rate is for developers, but I personally charge about $75 per hour (depending on project size) and I have a feeling I'm on the cheap side. Doing some quick math, this guy saved me 5 - 6 hours easily, maybe more. I don't bill by the hour, but by the project, so if something helps me finish faster that increases my effective hourly rate and makes my clients happier.
As a result, I donated $25 to this particular developer. But then I got to thinking, what about all the other tools I use that make me a more efficient developer: phpAdmin, phpBB, netSpell, etc. And what about PHP and mySQL?? I realized that my very career, if not dependent on these projects, was at least greatly benefited by them. After all this pondering, I have instituted a new personal policy regarding open source projects. For every for-profit development project I quote on, if I plan on using any open source projects or languages, I budget in a small amount to donate to the respective groups/developers. I will not advocate a particular amount or percentage for others to use, but just wanted to put forth the general idea. Even my small dev projects generally have receipts of $1000 or more. It doesn't hurt my bottom line at all to earmark a small amount of that for the developers that make my life a lot easier and quite a bit more profitable.
Posted under the influence of [[Joy Electric :: Such As It Was]]
Monday, August 1. 2005
I have a client using several different Netgear print servers on his LAN. The models range in size from having 1 to 3 ports. We recently had a dot matrix printer die, and replaced it with an Okidata ML-590. The Okidata printer worked fine on a different computer, but when connecting it in the new location to the print server, it would literally print every other character (in text only mode).
After much head-pounding, I found a setting nestled in the Netgear Print Server Administration for the physical ports, changing "Ack+Busy" to just "Busy". That was it. Now it even works in ML-590 mode with full graphics support.
Life is good.
Monday, March 21. 2005
After spending about 30 hours on an osCommerce application involving complicated schematics and image maps, I got a bright idea. It would be really cool to leverage an OCR function to automatically scan an image for callout boxes, then draw a hotspot over it and setting the title to the number of the callout. This would save me literally dozens of hours on projects like this. Not to mention that when it comes time to update or fix a hotspot, having an app like this would make it a trivial task.
For a sample of what I'm talking about, check this link.
Posted under the influence of [[Rainer Maria :: The Contents of Lincoln's Pockets]]
Tuesday, December 14. 2004
I recently brought 2 colocated servers online running Windows 2003 Server. Being paranoid regarding security, especially on a production Windows server, I had the network people filter all traffic to the box except SMTP, HTTP and PPTP. I figured any other access I needed could be done over a VPN tunnel. Well, what I forgot to do was to enable Remote Desktop before I brought the box down to the NOC. So, when I got back to the office to test it, I could VPN in with no problems, but could not get a Remote Desktop.
I fired up the MMC, and connected to the remote machine. Terminal Services were running. Still couldn't connect via RDP. Did some digging online and found a way to enable Remote Desktop from the registry.
Launched regedt32.exe (can't use regedit.exe for remote registries), connected to the remote registry, and set the appropriate key. Voila! I was in! Here is the key / value you need to set:
KEY: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TerminalServer
DATA: fDenyTSConnections
VALUE: 0 = enable Remote Desktop / 1 = disabled
Posted under the influence of [[NiN :: the mark has been made]]
Sunday, September 19. 2004
I have a client running a Windows 2000 Pro box with dial-up for Internet access. His computer has steadily been becoming more unusable with his dial-up connection. After an indeterminate amount of time, he would get a svchost.exe fault, and his Internet connection would stop responding. At this point he would have to reboot in order to restore use of the modem.
I had searched the web high and low, and worked through all sorts of troubleshooting guides on this problem to no avail. Finally, I came across this comprehensive site that details how to really fix the problem.
I'm sure if you're facing the same problem it will help you as well.
Thursday, August 19. 2004
Why do I always think of really cool projects when I have absolutely no time to work on them?
I'll leave that conundrum for another night. For now, I'll document an idea I came up with that would save me, and undoubtedly many other PHP coders, a great deal of time. I think it would be incredibly helpful to have a class that could be passed a minimal number of parameters and it would generate a nicely formatted report.
Someone has built a rudimentary report generator already, which is freely available online. The problem is that it is far too basic in its current form. Here is a list of the features my report generator (if it ever comes to fruition) should have:
- Accept a mysql recordset as a data source
- Allow me to specify my own column headings if the field labels in the recordset are too cryptic
- Let me specify any number of font, color, spacing and alignment properties
- Let me dynamically assign styles depending on certain criteria in the data (e.g. if ID is missing, text is red)
- Easily set pagination properties (number of records to show per page)
- Allow end user or programmatic sorting and filtering of ANY or ALL columns
- Provide buttons to allow the user to export a PDF or CSV file from the data
- Allow end user to create a "printer friendly" version of the report
I don't think I'm asking for too much. I do think that if I ever sat down and created this, that many people would find it helpful, and a great time-saver. If anyone wants to urge me to actually tackle this project, feel free to drop me an email.
Posted under the influence of [[Death Cab For Cutie :: We Looked Like Giants]]
Tuesday, August 3. 2004
A client running Windows 2000 Professional (SP4) was experiencing something very odd trying to install his new Dell PocketPC. When he clicked the link to install ActiveSync 3.1, the hourglass would show up, the computer would work a little bit, but nothing would happen. No error messages, no setup screens, nothing.
If you look at Task Manager, you see a "SETUP.EXE" process running, but it never goes anywhere. Also, this happened with other apps: Procomm Plus for one. So it wasn't strictly an ActiveSync/PocketPC issue.
I found the solution digging around on ActiveSync installation problems. It turns out that the software for my client's HP All-In-One device interferes with many installation routines. The solution is to end all the processes beginning with 'hp'. Once those are terminated, both installations ran flawlessly, and of course after a reboot all the hp processes had returned and the printer still worked fine.
Posted under the influence of [[Mighty Mighty Bosstones :: Noise Brigade]]
I discovered this out of desperation today. I was trying to do an in-place Windows XP Pro upgrade, and I kept getting an error. All the work-arounds I found on the web required access to a command prompt. Well, during an XP upgrade, you can access a command prompt by hitting Shift-F10. This only works once setup has reached the GUI phase. I found it documented at Microsoft's Knowledge Base here.
Posted under the influence of [[VNV Nation :: Kingdom]]
|