Archive for March 2011

 
 

How to fix delicious add-on for Firefox 4

Firefox 4 excellent and very fast browser, but many add-ons stopped working. One of them is delicious add-on. Of course is possible to use delicious bookmarklets, but it certainly can not replace all functionality that old delicious add-on has. With the help of a small change in one of the files - it will be possible to return the add-on back to the “life”.

First thing to do, in the windows explorer enter the following path:

%appdata%\Mozilla\Firefox\Profiles

Choose a folder that name ends with .default extension.Then go to extensions folder.

In the folder locate a directory with following GUID (represents delicious add-on)

{2fa4ed95-0317-4c6a-a74c-5f3e3912c1f9}

Under GUID directory open install.rdf file in any text editor.

Find a line contains  em:maxVersion attribute .

Change attribute value to “4.0”.Save the file . Restart Firefox 4 .

Final file shown below

<?xml version="1.0"?>

  
  
    
  

A simple way to run C# code from bat file

I read an interested article demonstrated how to run a bat file with embedded C# code. I repost this example here, because the original post is written in Russian. Despite the fact that there are other more powerful solutions and frameworks to achieve the same goal (e.g. Powershell) - I think the way presented by the author, is very useful for different scenarios.

/*
@echo off && cls
set WinDirNet=%WinDir%\Microsoft.NET\Framework
IF EXIST "%WinDirNet%\v2.0.50727\csc.exe" set csc="%WinDirNet%\v2.0.50727\csc.exe"
IF EXIST "%WinDirNet%\v3.5\csc.exe" set csc="%WinDirNet%\v3.5\csc.exe"
IF EXIST "%WinDirNet%\v4.0.30319\csc.exe" set csc="%WinDirNet%\v4.0.30319\csc.exe"
%csc% /nologo /out:"%~0.exe" %0
"%~0.exe"
del "%~0.exe"
exit
*/
class HelloWorld
{
    static void Main()
    {
        System.Console.WriteLine("Hello, World!\r\nI am at " + System.Environment.Version);
        System.Console.ReadLine();
    }
}

How to get rid from annoying IE warning when you debug a Silverlight application

When you try to open a local file, Internet Explorer displays the following warning: "To help protect your security, Internet Explorer has restricted this webpage from running scripts or ActiveX controls that could access your computer.Click here for options…".

ie-warning

You may run blocked file (application) by right click on the warning bar ,but doing this every time is very annoying. Especially when you debug Silverlight applications.  To disable the warning go to Tools->Internet Options and in opened dialog choose “Advanced”,then  check the fallowing option “Allow active content to run in files in My Computer*” as shown in the screenshot below.Then press “OK” and restart the browser .

 internet-options-disable

Note: This trick can be useful when you open local XML or JS file