Git un-add

Ahh, the joys of working with a new revision control system. When I was just about ready to commit some code, git tells me I've gotta add it.

Sure, that sounds fine and dandy, except I pressed tab and accidently added a trailing "/", committing the folder's contents rather than the folder itself (yeah I know, weird aye?)

So instead of having:

modified:   folder

I had:

deleted:    folder
new file:   folder/.gitignore
new file:   folder/__init__.py
new file:   folder/models.py
new file:   folder/views.py

Shit! I dont want to delete half a days worth of work! Luckily, to undo this AND keep your changes, simply type:

git reset HEAD drupal_glue

Windows 7: Disable Program Compatibility Assistant

This occasionally appears when a program made for an older operating system crashes. It appears with a dialog with the title "This program has known compatibility issues" like below.

pca

Now, you can disable this in two ways. The first being through the Services Manager.

  • Run "services.msc"
  • Find "Program Compatibility Assistant Service"
  • Edit and stop the service (if running).
  • Set the startup type to disabled.
  • Optionally, you can do the same with "Diagnostic Policy Service" also as PCA is reliant on this service.

The second option is to use the Group Policy Editor.

  • Run "gpedit.msc"
  • Follow through to Computer Configuration
  • Administrative Templates
  • Windows Components
  • Application Compatibility
  • Edit "Turn off Program Compatibility Assistant" and set it to "Enabled"

This option is useful for system administrators who require faster performance and are aware of the compatibility of the applications they are using. Note: With the PCA turned off, the user will not be presented with solutions to known compatibility issues when running applications.

I've copied part of its description as a mini disclaimer: don't disable this unless you know what you're doing.

Windows 7: Minimise Windows Live Messenger to Tray on close

MSN is alright, when its not silently discarding undelivered messages or still refusing to resume files which have failed to transfer. "At least it still looks pretty, right?", © Apple.

Anyways, in Win7 WML decided to logout and close rather than minimise to tray like it has been for many years now. Probably to help show off the fancy Win7 taskbar button functionality.

However, I don't really like having an unnecessary icon in the taskbar when I'm not talking to anyone during work. It plays on my OCD to check for messages =\

Its actually one of the first question everyone asks when they tried out the Windows 7 beta/RC. "Hey, how do I minimise MSN to the tray?"

So, to get the original "hide to tray" behaviour of the pre-7 days, simply run it in Vista compatibility mode.

  • Find the shortcut to Messenger (but don't run it!)
  • Right click and select "Properties"
  • Select the "Compatibility" tab
  • Tick "Run this program in compatibility mode for:"
  • Choose "Windows Vista" with the latest service pack.

I really wish they'd put an extra checkbox so we could choose which behaviour we wanted. They can just default it to what they want, so we can change it to what we want!

Now, if only we could officially disable that hideous photo sharing piece of crap!

*Edit*
07/09/2009 - Remove photo sharing or use the updated A-Patch (Thanks BrandiniMP! Didn't know he finally added the functionality in)

Windows: Set Windows Explorer location to a drive

By default, Windows Explorer opens up in either "My Computer" or "My Documents", I cant remember since its been that long. In Windows 7, it goes straight to your "Libraries" folder.

I find it much more useful if it went straight to a drive of my choice since I know exactly what I want without all the fuss.

To do that, either edit the shortcut or create a new one and set the location to:

explorer.exe /e,D:

That will automatically open it up to D drive. Change that and it will open up any (valid) drive you want.

Windows: Disable "Your password will expire in # days" upon login

I'm not a terribly security oriented person, and these kind of things are annoying. It also confuses the crap out of my parents who just want to get online and browse news sites.

To disable this message:

  • Go to Start
  • Run
  • Type in "control userpasswords2"
  • Select the "Advanced" tab
  • Click on "Advanced"
  • Expand "Local Users and Groups (Local)"
  • Select "Users"
  • View the user you wish to edit
  • And finally, tick "Password never expires"

Vista/Win7: Disable hibernation

I love this feature, but some people dont need it. The other day I needed to install the Visual Studio 2008 Service Pack 1 and it frikken needed 5gb of free space on my C drive. The setup package is only 265mb! WTF?

Anyways, I could get enough space from temporarily removing my hibernation files, so off I went exploring the intricate Control Panel labyrinth.

To my surprise, its been removed since the Vista days. How stupid. Now it can only be accessed through the command line.

  • Run "Command Prompt" with administrator access.
  • (Right click and "Run as administrator")
  • To enable, type "powercfg -H on"
  • To disable, type "powercfg -H off"

Windows 7: Disable Homegroups and remove it from your Explorer Tree

Being the curious cat that I am, I enabled this feature when Win7 was installed in the false hope that it would be useful in some way.

After a month, I found that I had no use for this thing and all it did was clutter up my workspace. So, lets kill it!

  • In Windows Explorer, right click on "Homegroup" and select "Change HomeGroup settings".

image Before.

  • Select "Leave the homegroup..."
  • Confirm "Leave the homegroup" again.

If you get an error message saying "Windows couldn't remove your computer from the homegroup.", make sure that both "HomeGroup Listener" and "HomeGroup Provider" services are running.

After its been removed, you can disable the services.

image
After.

Windows 7: Modify firewall settings/rules

I tried using the firewall for a while, and sometimes it'd pop up and I would click the wrong setting.

After searching that horrible hedge maze called the "Control Panel", I found where to change the settings!

  • Control Panel
  • Windows Firewall
  • Advanced settings
  • Depending on what you're after, select either "Inbound Rules" or "Outbound Rules"
  • Modify the rule for the application you want

Windows 7: Disable automatic disk defragmenting

A nice feature to have for computer illiterate people, but if I'm trying to squeeze every bit of power and disk bandwidth out of this machine, I'm going to stop this disk heavy process from starting on its own.

Get to the options by:

  • Clicking on the Start Menu
  • All Programs
  • Accessories
  • System Tools
  • Disk Defragmenter (Alternatively you can just run "dfrgui.exe")
  • Click the "Configure Schedule" button
  • Untick "Run on a schedule (recommended)"

Windows 7: Restore menu underline hotkeys

Yet again, the inner keyboard warrior in me took a hard hit when I noticed that Microsoft hid the hotkey mnemonics by default in Windows 7.

Honestly, how am I to learn the keyboard shortcuts in applications when they aren't displayed!? Fortunately, theres still a way to display them, albiet a bit more difficult to get to than previous Windows.

  • Open up the Control Panel
  • Select "Ease of Access Center"
  • Click on "Make the keyboard easier to use"
  • Under "Make it easier to use keyboard shortcuts"
  • Tick "Underline keyboard shortcuts and access keys"

[ Source ]

Windows 7: Disable the "Open File Security Warning" message

I really hate those "are you sure" security questions. They just dull your senses towards security and people just learn to click through them anyways.

So, lets just save the trouble and get rid of them altogether.

  • Fire up the Control Panel
  • Select "Internet Options"
  • Security
  • Custom Level
  • Under the "Miscellaneous" branch
  • Find "Launching applications and unsafe files"
  • Set it to "Enable (not secure)"
  • Save your way out of there.

Now the security warnings are gone. However, Internet Explorer will complain everytime you open it by displaying an error page with a yellow information bar.

To get rid of it:

  • Run "gpedit.msc"
  • Under "Computer Configuration"
  • Select "Administrative Templates"
  • "Windows Components"
  • "Internet Explorer"
  • Change "Turn off the Security Settings Check feature" to "Enabled"

That should stop the annoying error messages.

*update 22/03/2013*

For those on the Home version without gpedit.msc, I've got two solutions for you!

1) Command line to create the value

  • Open up command prompt and paste this command

reg ADD "HKLM\SOFTWARE\Policies\Microsoft\Internet Explorer\Security" /f /v DisableSecuritySettingsCheck /t REG_DWORD /d "1"

Note: I'm not sure if you need to run the Administrator version of command prompt or not (right click command prompt > Run as Administrator)

2) Apply a registry patch

  • Open up notepad and paste this.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Security]
"DisableSecuritySettingsCheck"=dword:00000001

  • Save it as a file called "security-warning.reg" on your desktop (Note the .reg extension and make sure you change "Save as type" from *.txt to *.*)
  • Double click the file and apply it.

[ Source ]

Django: How to serve media files (CSS, images, javascript, etc)

Being new to both Python and Django, I was having some trouble setting up my project to serve static files.

Looking at the static serving docs, they seem to gloss over the main points but dont quite help get you there.

To get support for static file serving:

  • In "settings.py", import "os.path"

import os.path

  • Change "MEDIA_ROOT", "MEDIA_URL" and "ADMIN_MEDIA_PREFIX" to

MEDIA_ROOT = os.path.join(os.path.dirname(__file__), "media")
MEDIA_URL = '/media/'
ADMIN_MEDIA_PREFIX = '/media/admin/' (anything other than media)

  • In "urls.py", include the following imports

from django.views.static import *
from django.conf import settings

  • And the following URL handler

# Required to make static serving work
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),

Restart your server and it should be accessible from http://your.domain.com/media/something.css

*Edit 06/11/09*

If its still displaying a 404, check that "ADMIN_MEDIA_PREFIX" is not the same as "MEDIA_URL".

List (and unshare) folders in Windows 7

After installing Windows 7, I was browsing around and found that they had removed the little "shared" icon overlay to let users know that a folder is being shared.

I found a way to list the shared folders and noticed that my computer was sharing a bunch of folders that I didn't want shared. Most importantly, ALL my personal and system files were exposed by default. WTF!?

You can disable them by running "Computer Management" through "compmgmt.msc" and selecting "Shared Folders" > "Shares".

There you can find a list of all shared folders in your computer.
Unfortunately, all your drives and system folders are shared by default because the "Server" service is an absolute cunt. Unsharing them will do nothing, because when the service is restarted, the disabled shares will appear again.

*update 8/6/2011* Thanks to xD for sharing a way to stop the drives and system folders (ADMIN$, C$, etc) from being shared!

Open up a command prompt with admin access and paste in:
reg ADD "HKLM\SYSTEM\CurrentControlSet\services\LanmanServer\Parameters" /f /v AutoShareServer /t REG_DWORD /d "0"
reg ADD "HKLM\SYSTEM\CurrentControlSet\services\LanmanServer\Parameters" /f /v AutoShareWks /t REG_DWORD /d "0"
Reboot to complete.

Vista/7: Change desktop icon size

My room is a mess. My desk is full of junk. And much like the rest of my living space (and to the horror of thousands of you out there) my Windows desktop is full of icons. Lots of em!

Since theres so many, I absolutely can't stand the size of the gigantic desktop icons which came default with Vista and Windows 7.

I've got alot of desktop space, but then again don't want to waste it all on desktop icons.

Luckily it is easy to change the size. Simply right click on the desktop and select "View" > "Small icons"

image

Vista/7: Change text size of icons

I've got pretty bad vision, and even though I'm running my computer on a huge monitor, the icon size doesn't do me any justice.

I like to have my icons at 10pt rather than the default 8pt. It helps! But rather than jacking up the font for every aspect of Windows, I only need it for icons.

  • Right-click on your desktop
  • "Personalise"
  • Click "Window Colour"
  • "Advanced appearance settings..."
  • Select "Icon" from the dropdown
  • Change the text size to something you like.
  • Enable quick launch on Windows 7

    Quicklaunch, one of my favourite features got neutered.
    image
    To bring back this functionality:
    • Right-click on the taskbar.
    • "Toolbars"
    • "New Toolbar"
    • Select the folder "C:\Users\YOURACCOUNT\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch".
    • Drag the toolbar to the location of choice.
    • Start dragging shortcuts into the quick launch!

    Visual Studio 2005/2008: How to compile C++ in 64 bit

    When starting with a new project, sometimes it is helpful to keep x64 in mind from the very beginning.

    • From the "Build" menu, select "Configuration Manager".
    • Under the "Active Solution Platform", select "<New...>".
    • Select "x64" from the new platform type.
      (If it is not available, you need to modify your VS2005/VS2008 installation by inserting the DVD and selecting x64 compiler under C++)
    • Copy settings from "Win32".
    • Ensure that the "Create new project platforms" checkbox is ticked.
    • OK to save.

    Now in your main window, select between x86 and x64 by changing the selection in the dropdown.

    imageThats all there is to it!

    Installing Eclipse with PyDev

    Getting started with a new language can be a bit difficult, but it can be alot less frustrating with the right development environment helping you along the way with little trips here and there.

    At time of writing, I have set this up with

    1. Eclipse v3.5 (162mb)
    2. Python v2.6.2 (13.8mb)
    3. PyDev

    To install, download the required files listed above. Then

    • Install Python (anywhere)
    • Download and unzip Eclipse into a folder of your liking
    • Create a "workspace" directory for your python projects
    • Run Eclipse and select your workspace folder.
    • Click on "Help" > "Install New Software..."
    • Click "Add" and type "PyDev" for the name, using http://pydev.sourceforge.net/updates as the location.
    • Expand and select "Pydev".
    • Click through to finish.
    • Restart when prompted.

    Configuring PyDev

    • Select "Window" > "Preferences"
    • Expand "Pydev" and select "Interpreter - Python"
    • Click "New" and give it a name.
    • Select "python.exe" from your Python install path.
    • Click OK and accept the defaults.
    • Save the preferences and now you're ready to go!

    Moving on from last decade; My experience over a month migrating from XP to 7

    Ahh, its time to come out of my XP cave and crawl into a new shell of an operating system. Vista, you've had your time to shine. I gave you some attention for a day or two but once I really get to know you better, the appeal quickly died (along with 500gb of valuable data *grr*)... very much like how you lose appeal for a girl once you find out she's been knocked up. In a sense, both Vista and pregnant women can even be considered "bloated".


    Vista and the younger sister 7, BEFORE you knew any better.

    In comes Windows 7 with same heritage as Vista, but she's learnt her lessons through her sister's mistakes. The stunning young hot sister thats lookin' fresh as ever with hourglass curves in the right places and a cute face to boot. Not to mention, 7 knows a few neat tricks that you'd love ;)~

    29o1pbt[1] 
    Vista, after you've gotten to know her... Still cute but dumb as dirt.

    Windows 7 successfully installed at 7:50pm on the 26th of August, 2009. Just to note, it took alot longer to install than the previous beta and RC versions.

    First impressions?

    • Hot damn! This is nice!
    • Fast! Actually blazing compared to Vista and slightly slower than my super tweaked XP SP3, which is still a considerable effort! It even runs quite smoothly on my 5 year old computer.
    • Polished. I've yet to experience a system crash which was due to anything from Microsoft. Only application level crashes related to 3rd party apps which do not officially support Win7 or x64 platforms.
    • Drivers for unidentified devices were available straight from Windows Update. More amazingly, they worked! Even that useless finger print scanner!
    • Confusing. Personally, I still hate the Vista Windows Explorer tree and jump-lists. The common dialog window is never consistent and the size varies so often that I have noticed myself resizing it out of habit.
    • Explorer crumbs are still there, and they still suck.
    • "Program Files" and "Program Files (x86)", is there really a need for that? (64bit only)
    • Snipper tool, if you were an electoral candidate you'd get my #1 vote!
    • Desktop still displays "desktop.ini" files when showing hidden/system files.
    • I'm already low on space, even after allocating 30gb for Windows. How the hell did it eat up 27gb!?
    • The new method of hiding tray icons is pretty cool.

    With installation and eye candy out of the way, below are the things that actually mattered to me when using Windows 7 for work on a day to day basis.

    The New Taskbar on Steroids

    So let me get this straight. With the new taskbar, one click is to activate the LAST active instance, hover to get a list of instances and another click to focus, while shift click opens a new instance.

    Horribly time consuming. Before, I just click once to activate the tab and click once on a smaller icon to start a new instance.


    Official Microsoft response? "YOU BETCHA! HOOOOOOOO~!" \o/

    Don't get me wrong, the new taskbar is a nice. Especially with the fancy peek feature and pinned items. Despite its new functionality, I found it to be just as annoying and time consuming as the Mac OSX dock tray and quickly reverted back to the old style.

    I'm a quick-launch kinda guy, mainly because I can fit more icons down there. I've got quite a bit of desktop space, why not use it?Taskbar shows instances of applications and quick-launch gives me the ability to spawn new instances, nice and simple.

    A welcomed new feature is the ability to rearrange the taskbar items without any 3rd party apps like TaskShuffle. This feature is quite handy, but I wish we were able to rearrange tasks within the same application group (rather than being forced to move them as a whole).

    Even after a month of using Windows 7, I've yet to decide whether the aero peek feature on the taskbar is super awesome or damn right annoying. Currently I'm leaning towards awesome but there are still times when it appears when you don't want it to.

     
    Compare Aero peek to this rabbit; subtly annoying and ridiculously cute, but too cute to get rid of.

    On a related note, the search feature on the Start Menu is quite handy and pleasant to use. It provides easy access to things you want by typing a few words to identify it.

    Whats the catch? It also displays "Uninstall <Application>" shortcuts too. If the results were sorted by usage rather than alphabetically, this problem wouldn't exist.

    Control Panel

    Now that the taskbar is configured, time to move onto configuring the rest of the system. The "Control Panel" was the biggest "WTF!?" issue for me. It seems to have been ported from Vista without much thought put into it.

     
    Firstly, here we have the old control panel. Segregated, laid out logically and things don't hide from you when they feel like it.

    Every click lead me further and further into a never ending labyrinth of configuration pages which just morphs from one to another! Eventually my eyes glazed over the pages, not really caring if I have seen it or not.

    The dialogs were incoherent, excessively wasted whitespace, lost settings and I'm damn well sure I'd hate to talk a computer illiterate person through these setups. I know I'm going to try out alot of 3rd party applications to configure my Windows 7 rig.

     
    WHAT. THE. FUCK? Heres the new control panel.
    Illogical and so many damn paths just to get to the same destination.

    I found the best way to overcome this was to simply change the start menu settings to display the control panel as a menu item with links.

    *edit 07/01/2010* Correction, the best way to overcome this is to use the "All Tasks" or "GodMode" trick.


    Ok, I'm starting to go crazy after all this control panel mindfucking...

    Behind the scenes

    There are now TONNS of extra services. So many more than XP. It seems as if Microsoft has gone into a servicing frenzy and decided to put everything into a new service rather than configuration settings. Was there really a need to seperate "HomeGroup Listener" and "HomeGroup Provider"?

    A major plus to the Vista'ish backbone seems to be that most drivers can be installed without the need for a reboot.

    UAC? Surprisingly, I've still got it enabled. I havn't turned all access overlordy and ripped its heart out Kano style. Compared to Vista's UAC, which whinged the moment I tried to empty the recycle bin, the improved one seems to ask only once and let you go on your merry way.

    Add/remove programs also allows you to remove functionality from Windows that you don't need (such as Faxing, Internet Printing or the Windows Media Centre). Although it existed in previous versions of Windows, the current iteration seems to allow for customisation.

    For those Microsoft developers, you may be pleased to find that Powershell comes preinstalled. The calculator has also been redesigned to include new programmer modes (which is where hex conversion is now hidden).

    New Windows key shortcuts! Woohoo! Being a keyboard warrior helps get the job done, especially when using a stupid little touchpad to get my tasks done. Now I can easily position Windows to the left or right halves of the screen with just the "Windows + LEFT/RIGHT" buttons. Maximise and restore/minimise can be done with "Windows + UP/DOWN".

    What I found surprising was the fact that all my hard drives were shared by default. Even my Windows installation folder and "Users" folder (containing user data and settings) were shared by default! With all the huff about better security (yadda yadda yadda), WHAT THE HELL MICROSOFT!?

    The battery life is frikken awesome! On XP I got about 2hrs, 1.5hrs on Vista and surprisingly 2.5hrs on Win7.

    Libraries

    Libraries are down right awesome! It lets you group together a bunch of folders of a certain purpose, like music for example. Especially useful for someone like me who cant get around to sorting all the music folders which spans over 3 drives and 15 folders.

     
    Dear Libraries, you're AWESOMEEEEEE!

    Homegroups

    Ok, I've never found this useful during a month of using Windows 7. I've disabled it and don't miss it a bit. If someone knows how feature can even be remotely useful, please let me know!

    Power modes for portable notebooks

    This is top shit from the Vista era! Accidently pressing "Windows + X" gave me a dialog to configure the settings for the power mode I'm currently in.

     
    The (actually easy to use) power mode settings.

    It was so easy to set up my power settings, then unplug the laptop umbilical cord and then set it up one more time. If only I knew about this before spending more than 10 minutes setting it up in the hideous control panel version.


    Doing the power mode setup in the control panel would be the effective equivalent of Mexican underpants wrestling.

    Verdict?

    Being the customisation-crazed caveman Hitler of computers, alot of people expected me to hate Windows 7, or at least trash talk about tiny changes until the point where I reverted back to XP (like I did with Vista).

    Surprisingly (even to myself), I like Windows 7. I would even recommend it to anyone that asks, provided they don't try to install on a PC from last decade. Windows 7 does require a modern computer though.

    Enough already! What can I change!?

    I think that should sum up the majority of the changes that affected me on a day to day basis during my journey from yesteryear to a modern operating system.


    Ok, review over. Time to crack those knuckles, rip off that shirt, drop those pants and get your hands dirty!

    Despite all their efforts to make software more secure and "user friendly", sometimes it just becomes down right annoying to a power user.

    Luckily, thats where the little changes come in to aid productivity. I haven't had the time to write up all the posts yet, so here's the link to all the Windows 7 specific topics. Let the tweaks begin!

    Using printf() with unicode

    UTF8 is a bitch, but it solves alot of your problems. Starting to use wide-string UTF8 functions and data types isn't hard but sometimes little things can really catch you out.

    Like when you want to use printf() to stick a string into a format.

    Using the usual "%s" will only display the first character. You need to tell the formatter that you're expecting a wide string instead using "%ls".

    wsprintf(output, L"new format: %ls", strInput);
    wsprintf(output, _TEXT("new format: %ls"), strInput);

    Thunderbird stores duplicate emails (case sensitive duplicate checks)

    Nobody expects emails to be treated case-sensitively. Which is why I found it so surprising that Mozilla would treat it so strictly by the book (titled RFC822 actually).

    At the current time of writing, Thunderbird stands at v2.0.0.23 and after 7 or more years of a bug track being posted, it still isn't fixed. =\

    If you've got a Mozilla bug tracker account, please vote it up so this obsolete requirement is removed!

    Direct link to vote is here.

    C++: Can't use IActiveDesktop, "undeclared identifier"

    Importing IActiveDesktop seems fairly straight forward. As the docs state, all you really need is "shlobj.h" right?

    Nope, it'll still give you compilation errors!

    You also need to make sure that you add in "wininet.h" prior to including "shlobj.h". That way "_WININET_" is defined, making IActiveDesktop available to your project.

    Windows 7: Find out date of installation

    Ever needed to figure out when you installed something? File create/modification dates are a bit unreliable, but luckily Windows 7 has another way of finding that out.

    Run "Command Prompt" and type in "systeminfo". The date will be displayed under "Original Install Date".

    Windows 7: Fix for the retarded "Apply to Folders" not working with media folders

    So Windows wants to make things user friendly. Well thats nice of it, but please we're good friends here. You can stop being so polite and just let me do what I want.

    simple 
    What I wanted was this; short, sweet and simple.

    HATEHATEHATE 
    When browsing to a music folder, I get this... (Image from Tux)

    The frustrating thing about a "user friendly" centric system is that well... it can be too friendly and just become annoying. Its like that kid in school that struts around thinking he's cool and friends with everyone, but the truth is he's an annoying little dipshit and nobody gives half a fuck what he thinks.

    Ok, onto business. You've probably noticed that after setting up the perfect folder display settings, you applied the settings to all folders using:

    • Tools
    • Options
    • View
    • Apply to Folders

    And soon after, whilst browsing to your music or pictures folder... realised that Windows 7 is ignoring the settings that you've spent a few precious minutes on configuring. THAT FUCKWIT!

    Luckily, that can be undone. This is a 2 part process as Windows has saved the settings for each folder which you've tried to configure. To clear the old settings:

    • Navigate to "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell".
    • Delete the keys "BagMRU" and "Bags".
    • Log off Windows and log back on so it can regenerate these settings back to default.

    After logging back in, do NOT open Windows Explorer up until you have done the following. Now the final step is to slam that kid's head into the school toilets and execute with a single flush, using "regedit".

    • Find your way back to "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell".
    • Navigate to "Bags\AllFolders\Shell".
    • Add a new String value called "FolderType".
    • Set its value to "NotSpecified".

    Now you can go back to Windows Explorer and configure your display settings one last time. This time it should set like glue.

    [ Sources: Reset folders, Disable folder templates ]

    Vertically aligning text in a div with CSS

    Tables were good. When you tell it to align something somewhere, it'd work!

    Divs are also good, it keeps your mark-up clean.

    But when it comes to displaying grids of data in divs... who the fuck decided it was time to deprecate tables!?

    Anyways, you're probably here because "vertical-align: middle;" isn't working on your div. Either that or I'm back because I've forgotten how this works.

    Problem is, you need to also set "line-height: ##px;".

    [ Source ]

    Visual Studio 2008: Microsoft Incremental Linker is buggy

    Visual Studio's C++ linker is a piece of shit, or at least it is on Vista/Win7. I've been playing around with it for creating x64 apps and as LStucki mentioned, it doesn't seem like Microsoft is eating their own dog food very much.

    A temporary fix for this would be to disable the embedded manifest.

    1. Project
    2. Properties
    3. Configuration Properties
    4. Manifest Tool
    5. Input and Output

    Set "Embed Manifest" to "No".

    Props to Juan Baez (Tux`) for that!

    Windows 7: Disabling thumbnail caching

    I hate the "thumbs.db" file generated by Windows Explorer.

    Its the equivalent of computation diahorea splattered all over your disk drives.

    On previous versions of Windows, it was rather easy to disable that feature.

    However on Windows 7, Microsoft decided to hide the option in another location.

    Run "gpedit.msc" and go to

    1. User Configuration
    2. Administrative Templates
    3. Windows Components
    4. Windows Explorer
    5. Turn off the caching of thumbnails in hidden thumbs.db

    Change the setting to "Enabled" and you're set !

    Cant uninstall Need For Speed Carbon, EAInstall.dll missing

    Strange quirk here, poor uninstaller coding I suppose.

    To fix this, just move "EAInstall.dll" to "C:\Windows" and run the uninstaller again.

    Once its finished, remember to delete "EAInstall.dll"

    Uninstalling Visual Studio 2003

    I know I know, its ancient...

    But I've finally decided to let go of it now that its been superseded by not just one, but TWO newer editions of Visual Studio.

    Unsurprisingly, the uninstaller didn't work. So, I had to snoop around my computer looking for things that may work.

    Luckily, the uninstaller was there all along. Its just that the uninstall file used by "Add/Remove Programs" wasn't the right.

    To uninstall this historic piece of software, go to "C:\Program Files\***Visual Studio .NET 2003 Folder***\Visual Studio .NET ***Installed Edition***" and run "setup.exe"

    Mine happen to be:
    "C:\Program Files\Microsoft Visual Studio .NET 2003\Visual Studio .NET Enterprise Architect 2003 - English"

    It should take a few minutes to uninstall, so you'll have plenty of time to wipe your tears while the ashes are thrown into the sea.

     
    Copyright © Twig's Tech Tips
    Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog