Sandwich Experiment
- Bread: Focaccia
- Spreads: Vegenaise
- Cheese: Swiss
- Vegetables: Lettuce, Tomato, Onion, Cucumber, Carrots
- Meat: Chicken (optional)
- Toasted: Yes
Rating: 5/5
Rating: 5/5
Rating: 3/5
I made two site updates today:
My Visual Studio Achievements are now listed in the sidebar. Ars published a wonderful article about the Visual Studio game engine.
Next, I created a Chrome extension for this site. You can download the official appytizers Chrome Extension from the sidebar. Instructions on how you can create your very own extension are coming soon in a separate post.
And one more thing – the site has a new logo!
I have had AT&T U-Verse at home for almost two years and the service has worked exceptionally. A few weeks ago, my modem started randomly disconnecting from the broadband network every few minutes. Nothing had changed in my configuration ever since it was first setup. It was baffling and frustrating because it also impacted the IPTV connection.
First, we called AT&T and they performed some line checks. They identified issues with the external wiring and dispatched a team to fix. This improved the HDTV service tremendously.
However, this didn’t resolve the broadband disconnects. I tried reconnecting every one of my computers and wireless devices but that didn’t help. I rebooted the modem and reset the wireless settings and the firewall settings to factory defaults – didn’t help. My modem was already sitting above ground and away from any blocking or interfering sources.
Finally, in desperation, I was ready to reset the modem to factory defaults and start from scratch. That’s when I noticed the RJ-11 cord and the power adapter were touching. I figured that maybe the power adapter was interfering with the RJ-11 data line. I moved apart the two cords so that they were not touching and rebooted the modem without resetting to defaults.
No more disconnects!
My Windows 2008 R2 Hyper-V server has 2 dynamic disks setup in a mirrored configuration that I wanted to split into the separate disks.
You can accomplish this from the command line using the diskpart tool. However, since this was my first time, I decided to play it safe and use the Disk Management Console.
First, I backed up all data on the mirrored volume. All information and advice I got suggested that I would not lose data but why take chances? It took approximately 4 hours to backup 400 GB.
Next, right click the mirrored volume. Remove Mirror lets you remove a disk from the mirror. Break Mirrored Volume destroys the mirroring and you lose redundancy. Data is retained on both disks that made up the mirror.
Select Break Mirrored Volume….
Say Yes.
Windows processes away for a few seconds and then I get my two separate disks. All data that existed in the mirror is available on both disks.
Links from MSDN for the Windows Workflow Foundation.
Vendors publish services with a guaranteed or defined uptime SLA. This chart translates the uptime % into the actual seconds, minutes or hours of permitted downtime.
This chart is provided as a reference only. Please check with the vendor for the definition of the SLA, the metrics used to calculate the uptime and the exclusions.
Total Seconds in a Year = 60 x 60 x 24 x 365 = 31536000
| Uptime % | Downtime (Seconds) |
Downtime (Minutes) |
Notes |
| 99.9 | 31536 | 525.6 | 9 hours/year |
| 99.91 | 28382.4 | 473.04 | 8 hours/year |
| 99.92 | 25228.8 | 420.48 | 7 hours/year |
| 99.93 | 22075.2 | 367.92 | 6 hours/year |
| 99.94 | 18921.6 | 315.36 | 5 hours/year |
| 99.95 | 15768 | 262.8 | 4.5 hours/year |
| 99.96 | 12614.4 | 210.24 | 3.5 hours/year |
| 99.97 | 9460.8 | 157.68 | 2.5 hours/year |
| 99.98 | 6307.2 | 105.12 | Almost 2 hours/year |
| 99.99 | 3153.6 | 52.56 | Less than an hour/year |
| 99.999 | 315.36 | 5.256 | 5 minutes/year |
| 99.9999 | 31.536 | 0.5256 | Less than a minute/year |
| 99.99999 | 3.1536 | 0.05256 | Always up |
The equivalent of the SQL Server TRUNCATE clause for DB2 v8 is
ALTER TABLE {TABLE-NAME} ACTIVATE NOT LOGGED INITIALLY WITH EMPTY TABLE
Here’s a succinct way of generating SELECT COUNT(*) against all tables in a DB2 database.
SELECT 'SELECT COUNT(*) AS COUNT_' || TABLE_NAME || ' FROM ' || TABLE_SCHEMA || '.' || TABLE_NAME FROM sysibm.TABLES ORDER BY TABLE_NAME
This returns output like the following:
SELECT COUNT(*) AS COUNT_ADVISE_INDEX FROM DB2INST.ADVISE_INDEX SELECT COUNT(*) AS COUNT_ADVISE_WORKLOAD FROM DB2INST.ADVISE_WORKLOAD
This function will let you resize an image in C#.
public static Bitmap Resize(Bitmap original,
int width, int height)
{
Bitmap bitmap = new Bitmap(width, height);
using (Graphics gfx = Graphics.FromImage(bitmap))
{
gfx.InterpolationMode
= Drawing2D.InterpolationMode.HighQualityBicubic;
gfx.SmoothingMode
= Drawing2D.SmoothingMode.HighQuality;
gfx.PixelOffsetMode
= Drawing2D.PixelOffsetMode.HighQuality;
gfx.CompositingQuality
= Drawing2D.CompositingQuality.HighQuality;
gfx.DrawImage(original, 0, 0, width, height);
return bitmap;
}
}
After weeks of putting up with significant disk activity and system slowness, I finally noticed that the McAfee anti-virus On Access Scanner process – mcshield.exe – was running as a High Priority process in Task Manager.
The fix was simple:
Happy system. Happy me.
I needed to get a list of all stored procedures that accessed a specific column in a table. Some stored procedures generated dynamic SQL statements so the View Dependencies feature was not guaranteed to get me the full list.
This query lets me retrieve the name and body of all stored procedures in a database. Adding the filter to look for the specific column is relatively simple.
SELECT o.Name AS SpName, c.Text AS SpBody FROM syscomments c WITH (NOLOCK) JOIN sysobjects o WITH (NOLOCK) ON c.ID = o.ID AND o.Type = 'P' -- Only stored procedures ORDER BY o.Name
This query is for SQL Server 2005 but should work across all versions.
To find all rows that are in dbo.TABLE1 but not in dbo.TABLE2 using the SQL JOIN operator:
SELECT COUNT(*) FROM dbo.TABLE1 t1 WITH (NOLOCK) LEFT OUTER JOIN dbo.TABLE2 t2 WITH (NOLOCK) ON t1.PrimaryKey = t2.PrimaryKey WHERE t2.PrimaryKey IS NULL