Friday, July 04, 2008
Windows Live Writer

My laptop changed, so wanted to get back to the setup I had before, been through enough trouble to get Windows Live Writer to be installed on my machine. You wish it is a MS baby, single installable, double click and boom!! Everything is installed completely.

 

Otherwise Windows Live Installer uses Windows Installer, Automatic Updates and all underlying component. Not sure why?

It uses so many components and piece in background to make it work. Basically, the installable can install any or a lot more components on your machine than required. Found garmahis.com (Thanks to Michael Garmahis) where I could get a standalone installable. There is another one if you like ... here.



VishaL KHAPRE@11:46 PM < % 4 (0) @ Add

. . ° º o O o º ° . .


Friday, July 06, 2007
Disable drag and Text selection in Firefox

Firefox is known to support most of the W3C Dom standards and IE is usually to support most non standard or I would say "IE Standard". Anyways, I still like IE because my website is viewed by mostly IE users, almost over 85%.

I had seen some people copying text from website, so I wanted to implement no drag and copy text from my website. Here is what I added to the body tag of each HTML rendered page on my site. (I know there are other ways to copy. :( )

onmousedown="javascript:clickTrap();" ondragstart="return false" ondblclick="return false" onselectstart="return false"

This stopped drag and text selection for every IE visitor on my site. Easy and simple technique allowed me to achieve what I wanted. Still there were about 15% "Standard Browser" based non standard users. They could drag and select text from my site. Searching paid off after a long time. Mozilla based browsers need to you to create a javascript event handler routine to stop the drop or use this non-standard, browser specific tags. Here is what I did. You can leave them in your CSS file because IE just ignores them and Firefox will block the drag.

<style>
    .protectedText 
    {    
        -moz-user-focus: ignore;    
        -moz-user-input: disabled;    
        -moz-user-select: none;
     }
</style>
<input class="protectedText" type="text" value="Change this"> 
<span class="protectedText">sdaf</span>

Find other such tags, that mught be useful for you.
http://www.xulplanet.com/references/elemref/ref_StyleProperties.html

Labels:



VishaL KHAPRE@11:16 PM < % 4 (0) @ Add

. . ° º o O o º ° . .


Monday, May 07, 2007
Windows zip folder association

Windows has built in zip files added as folders in Windows Explorer. This feature is default support by a Windows standard install. This makes it completely difficult when there are more than on file in the folder or even if there is only one large file with a lot of files and folders inside it.

 

Here is the solution, run following on Windows /DOS command prompt.

 

"regsvr31 /u zipfldr"
(offcourse with out quotes)

If you want to register it back then

"regsvr31 zipfldr"
(offcourse with out quotes)

Chow!!

Labels:



VishaL KHAPRE@7:53 AM < % 4 (0) @ Add

. . ° º o O o º ° . .


Tuesday, September 05, 2006
A National Security violation

Check out this Google Maps Api based Flight Simulator. You can fly over Washington DC. You can fly over Capitol, White House. Be careful, if you cannot maintain your altitude, it can crash into anything you want.
This is a National Threat flight simulator :)... just kidding.


VishaL KHAPRE@9:11 AM < % 4 (0) @ Add

. . ° º o O o º ° . .


Thursday, August 24, 2006
Python on the .NET Framework

One of the least talked language on web is IronPython when it became available in Microsoft CLR.
Dynamic runtime languages were previously thought to run very poorly on the .NET Framework, but IronPython dismisses that idea. Microsoft is backing IronPython because it exemplifies just how well the .NET Framework can handle dynamic runtime languages. Supposedly, IronPython runs as fast as the C-based implementation of Python-2.4, if not faster. The company claims that IronPython can run 1.8x faster than Python-2.4 right now. Besides being speedy, it also allows developers to access all of the standard C Python libraries, not to mention and create their own subclasses deriving from the .NET framework.
IronPython is the codename for a new implementation of the Python programming language on the .NET Framework. It is fast - up to 1.8x faster than Python-2.4 on the standard pystone benchmark. It supports an interactive interpreter with fully dynamic compilation as well as static compilation to produce pre-compiled executables. It's well integrated with the rest of the Framework and makes all of the .NET libraries easily available to Python programmers. In this episode Jim Hugunin introduces IronPython with demos showing interactive exploration and GUI building from a command prompt as well as simple embedding as a scripting language in an existing Windows Presentation Foundation application. Via Overview at Microsft's Download website
Still, when I read this old news, I was surprised to see Microsoft's backing on Python where they will not be investing that much of money to see a dynamic language work. Anyways, as part of research found a very interesting comparision of Ruby, Java and C++ with Python by dmh2000. This comparision is just awesome.
conclusion
Java is more productive than C/C++. Use C/C++ only when speed or bare metal access is called for. Python/Ruby is more productive than Java and more pleasant to code in. There is a big question on static vs. dynamic typing. I contend that static typing has to be better for the purposes of program correctness, but the required cruft reduces productivity. If actual practice in large systems shows that in fact runtime typing errors don't occur often and are worth the productivity tradeoff, then I will bow to dynamic typing. I can't come up with a definitive answer to Python vs. Ruby. They seem very equivalent. Would choose based on practicality in a given situation. My general feeling was that Python annoyed me in ways that Ruby didn't, but I think those annoyances would disappear if I was using Python all the time.

Labels:



VishaL KHAPRE@8:39 AM < % 4 (0) @ Add

. . ° º o O o º ° . .