Tag: windows

  • My views on Steve Jobs’s biography – Microsoft is here to stay

    I am reading Steve Jobs’s autobiography. Quite a detailed memo of Steve’s background as person who he was. The book is fantastic, and I recommend everyone should read it (atleast those in IT).

    One thing that got me thinking was the philosophy behind Apple’s products. These are never intended to replace any Microsoft products – ever! So why the heck do these seem in competition?

    As (it seems) Steve himself used to say ‘Good artists copy, great artists steal’, it easily could have been the case where Windows copied Mac. No point in arguing that further. But for how long?

    Windows 8, surface tablets, Androids, Dell Ultra books and so on … all trying to sell the same piece of technology and making wild predictions on attacking the same user base which Apple has.

    Personally, I’d be happy to use iPhone as a iPhone, and my Windows as a Windows machine. I wish they didn’t bother ordering what they think I need for me anymore.

  • .NET v4.0 building missing targets

    C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(847,9): warning MSB3644: The reference assemblies
     for framework “.NETFramework,Version=v4.0” were not found.

    If you end up building .NET projects outside of Visual Studio, just using the .NET v.40 runtime, you may (will?) hit the above warning, but who likes warnings from systems, anyways? You have the option of either installing Visual Studio, but then what’s the point if you had to ship build files in the first place. This is not an option on production systems, and needs resolution.

    It seems, the full framework alone doesn’t install the correct target libraries when using a non-VS build environment (MSBuild.exe). I was lucky to find in a forum about a working fix, and it works like a charm.

    1. Download and save the  Windows SDK v7.1 32-bit x86 ISO image from Microsoft.

    2. Copy the ISO image to the server using the local network

    3. Download Virtual CD-ROM Control Panel v2.0.1.1 from Microsoft

    4. Unzip Virtual CD-ROM Control Panel and follow readme.txt instructions to install and mount the ISO image.

    5. Uncheck everything except .NET Development > Intellisense and Reference Assemblies in the installer.

    6. Finsh the install.

    If you now try to build, no more warnings are generated, and you’re good to go.

  • Printer not connecting – Troubleshoot

    Didn’t realize turning on “TCP/IP NetBIOS Helper” service would solve the issue. The message “Printer spooler is not running” is completely misleading.

  • Brainteasers

    1. How many degrees angle between hour, minute hand when time is 3:15?
      7.5°
      360° full circle, therfore (360°/12 hrs) = 30° /hour.
      At 3:15,  minutes hand points to the 3, hour hand is ahead of 3 by 1/4th (15/60),  which is 7.5° apart. (30°/4)=7.5°
    2. Why are manhole covers round?
      – Round covers can be easily rotated
      – It’s easier to dig a circular hole
      – Round castings are easier to machine using a lathe
      – Easier to manufacture than custom-made covers
    3. How will you generate random number between two given numbers
      Assuming n1, n2 random number between them would be n1 + Math.random() * (n2 – n1)
    4. How will you sort a million integers?
      Split them into meaningful subsets, sort each subset, merge subset back
      http://neopythonic.blogspot.com/2008/10/sorting-million-32-bit-integers-in-2mb.html
    5. How many windows will be open in a 100 window room if you go around  a 100 times toggling each window you come across? All windows are closed initially.
      100 windows,  all closed.
      1st round, you toggle all windows i.e. all windows are opened
      2nd round, you close all even-numbered windows – 2, 4, 6, …
      3rd round, you open, close odd numbered winodws – 3, 6, 9,…
      So after 100 times, windows open are windows who have been toggled odd number of times. For e.g. consider window 12, round 1 will make it open, 2 will make it closed, 3 will make it open, 4 closed, then directly 12 will make it open. Consider again, window 20 – 1 (open), 2 (close), 4 (open), 5 (close), 10 (open), 20 (close). Consider 7 – 1 (open), 7 (close). So window 12 got touched 5 times, window 20 got touched 6 times, window 7 touched 2 times.
      So, in order to find “open” windows between 1-100, we have to find number having “odd” number of factors, which means numbers who have one repeated factor i.e.  factor by same factor gives the number e.g. 16 has 1, 2, 4, 8, 16 – open window. It has 4 which means 4×4= 16. Consider 20 has 1, 2, 4, 5, 10, 20. No factor is repetitive.
      Therefore, let us find numbers which are below 100, but are having square products, similar to 4×4 = 16 starting with 1, which gives 12=1, 22=4, 32=9, 42=16, 52=25, 62=36, 72=49, 82=64, 92=81, 102=100
      So open windows are 1, 4, 9, 16, 25, 36, 49, 64, 81, 100 = 1o open windows
    6. A party of four travelers comes to a rickety bridge at night. The bridge can hold the weight of at most two of the travelers at a time, and it cannot be crossed without using a flashlight. The travelers have one flashlight among them. Each traveler walks at a different speed: The first can cross the bridge in 1 minute, the second in 2 minutes, the third in 5 minutes, and the fourth takes 10 minutes to cross the bridge. If two travelers cross together, they walk at the speed of the slower traveler. What is the least amount of time in which all the travelers can cross from one side of the bridge to the other?
      Obvious (but incorrect)
      Incorrect answer

      Not  so obvious (correct answer)
      Correct answer

    7. Next…

    A party of four travelers comes to a rickety bridge at night. The bridge can hold the weight of at most two of the travelers at a time, and it cannot be crossed without using a flashlight. The travelers have one flashlight among them. Each traveler walks at a different speed: The first can cross the bridge in 1 minute, the second in 2 minutes, the third in 5 minutes, and the fourth takes 10 minutes to cross the bridge. If two travelers cross together, they walk at the speed of the slower traveler.

    What is the least amount of time in which all the travelers can cross from one side of the bridge to the other?

  • How to manually uninstall Symantec Endpoint Protection client from Windows 2000, XP and 2003, 32-bit Editions

    Much recently to my dismay, I figured out that I cannot remove Symantec’s Endpoint Protection from my own laptop without administrator password. I do not own this password, and I do not want anybody other than me permitting me what to uninstall. Hence I went ahead for manual uninstall according to these instructions (from Symantec’s own site) below-

    How to manually uninstall Symantec Endpoint Protection client from Windows 2000, XP and 2003, 32-bit Editions.

    The instructions are crisp and clear. I could manually uninstall following each step of those instructions, but there is one big trouble. The instructions talk to removing over 100’s of registry keys, values which I believe is sheer impossible manually. Why didn’t Symantec simply provide a small tool which has all those instructions bundled in a simple click-n-go fashion?

    I have tried to create a small registry file which can automate the removal of registry entries Uninstall Registry entries for Symantec Endpoint Protection
    For all other manual deletion of files, it would be great to write a small AutoIt script compiled to an exe. Maybe sometime later…

  • Tortoise SVN About dialog

    Crazy stuff people do these days.
    Photobucket

  • My slick HTC X02HT with spiced up WM 6

    Recently I visited smartphone-freeware. It has quiet a good amount of freeware goodies to spice up your Windows Mobile 6 Smartphone.

    I downloaded some good ones, particularly TotalCommander, slick-new theme Leopard OSX, and the must-have SmartToolkit.

    Guess how my mobile looks?
    WM6

    WM6

    Couldn’t get Skype to install due to insufficient space. 🙁 Need to free up some programs.

  • Using Apache’s mod_rewrite on Windows

    I recently happened to experiment with Apache’s mod_rewrite, an excellent library to change your machine friendly (or perhaps program friendly?) web urls into user friendly urls.

    The steps to make mod_rewrite to work on Windows is-
    – Edit httpd.conf for Apache, and uncomment the following line
    # LoadModule rewrite_module modules/mod_rewrite.so
    -to-
    LoadModule rewrite_module modules/mod_rewrite.so

    – Next, under <Directory “{Your document root}“> change
    AllowOverride None
    -to-
    AllowOverride All

    – Restart Apache

    – Create a sample folder “rewrite” under {Your document root}, with the following files
    {Your document root}
     
    rewrite
        .htaccess
        details.php

    – What we will attempt now is to have a url like http://localhost/rewrite/details/shantibhushan to be automatically executed as http://localhost/rewrite/details.php?user=shantibhushan

    – Edit your .htaccess file as follows
    <IfModule rewrite_module>
     RewriteEngine on
     RewriteBase /rewrite/
     RewriteRule ^details/(.+)$ details.php?user=$1 [L]
    </IfModule>

    – The RewriteRule is the actual line where we specify what url is to be mapped to which actual url. ^details/(.+)$ takes a user friendly url /details/shantibhushan and extracts “shantibhushan” as $1. It then replaces $1 into details.php?user=$1 resulting in details.php?user=shantibhushan as the actual url.

    – Edit details.php as follows
    <?php
    $user= $_REQUEST[‘user’];
    print(“<h1>$user</h1>”);
    ?>

    – The above sample simply takes “user” from details.php?user={user} and shows it back.

    – Done! Try accessing http://localhost/rewrite/details/shantibhushan and you should see details.php getting called with parameter as “shantibhushan”

    TODO
    – Simply accessing details/ results in error, and rewrite rule doesn’t assume such a case. It can be handled by RewriteCond
    – First I wanted to have details:shantibhushan as the url, but this has a bug on Windows not allows : in path. It seems to work fine on non-Windows.
    – The example assumes Apache is running on port 80 on your machine.