These guys play godlike. The less I say the better it would be. Have a look at some foosball tricks.
Saturday, December 23, 2006
Tuesday, December 19, 2006
Wednesday, December 13, 2006
Inline search in IE
One thing I hate about IE is its "Find in page" utility. Half of the time, I am either moving the search box or locating the highlighted result. And to top it up, the search is not incremental either. This in itself can be a reason for me to not to use IE.
Solution:
Inline search with IE : Quick download, easy to use, mimics Gvim's and Firefox's search to some extent and highly effective. In short DAMN COOL.
Solution:
Inline search with IE : Quick download, easy to use, mimics Gvim's and Firefox's search to some extent and highly effective. In short DAMN COOL.
Gvim and Visual Studio Shortcuts
While I mostly use Gvim, I'm sometimes forced to use Visual Studio in two situations:
1. When I have to debug something; Visual Studio has an excellent debugger.
2. When one of my team members require my help.
The second reason is more important because I don't want to look clumsy while helping them out.
I have found the Visual Studio equivalents for some of my core gvim commands and they are:
Gvim       Visual-Studio        Purpose
*          Ctrl + F3            Search for current word under cursor
#          Ctrl + Shift + F3    Search for previous word under cursor
Ctrl + o   Ctrl + '-'           Go to previous location
Ctrl + i   Ctrl + Shift + -     Go to next location
/          Ctrl + i             Incremental search
gg         Ctrl + Home          Go to the beginning of the file
G          Ctrl + End           Go to the end of the file
n          F3                   Find again
Ctrl + P   Ctrl + Space         Autocomplete
qx         Ctrl + Shift + R     Record a temporary macro
@x         Ctrl + Shift + P     Play a temporary macro
%          Ctrl + ]             Go to matching braces
mx         Ctrl K + Ctrl K      Make a bookmark
'x         Ctrl K + Ctrl N      Move to (next) bookmark
~          Ctrl K + Ctrl U      Change the text to UPPERCASE
zf%        Ctrl M + Ctrl M      Fold a section
1. When I have to debug something; Visual Studio has an excellent debugger.
2. When one of my team members require my help.
The second reason is more important because I don't want to look clumsy while helping them out.
I have found the Visual Studio equivalents for some of my core gvim commands and they are:
Gvim       Visual-Studio        Purpose
*          Ctrl + F3            Search for current word under cursor
#          Ctrl + Shift + F3    Search for previous word under cursor
Ctrl + o   Ctrl + '-'           Go to previous location
Ctrl + i   Ctrl + Shift + -     Go to next location
/          Ctrl + i             Incremental search
gg         Ctrl + Home          Go to the beginning of the file
G          Ctrl + End           Go to the end of the file
n          F3                   Find again
Ctrl + P   Ctrl + Space         Autocomplete
qx         Ctrl + Shift + R     Record a temporary macro
@x         Ctrl + Shift + P     Play a temporary macro
%          Ctrl + ]             Go to matching braces
mx         Ctrl K + Ctrl K      Make a bookmark
'x         Ctrl K + Ctrl N      Move to (next) bookmark
~          Ctrl K + Ctrl U      Change the text to UPPERCASE
zf%        Ctrl M + Ctrl M      Fold a section
Friday, December 08, 2006
MSDN goes Wiki
No matter how many people Microsoft puts in, there can't be enough to keep MSDN in shape. That is the rate at which technology is evolving. Personally, I think it is a right move by Microsoft to make MSDN Wiki based and I am very excited about it. This project has a huge potential.
You can visit it by clicking over here
You can visit it by clicking over here
Monday, December 04, 2006
Sidebar Gadget
Recently, I had to create a Windows Vista Sidebar Gadget which pulls out data from a database locally installed on the machine and displays it to the user in a eye-catching manner.
Being new to the .Net and given that my past projects had more or less revolved around UNIX and C, I had to do a lot of research. Although there was a lot of information available on the internet on how to develop a Vista Sidebar there was practically none on how to access data from a managed piece of code from within Jscript. I discovered two ways to do it and in the following section I'll describe precisely that.
For the uninitiated, a Vista Sidebar is nothing but a bunch of HTML and Jscript files packed together. That is it. For more information on how to develop a Sidebar Gadget, please refer to this page.
First way:
AxComp.cs
using System;
using System.Runtime.InteropServices;
namespace Foo.Something
{
public interface Ix
{
string CallMe();
}
public class Bar: Ix
{
public string CallMe()
{
return "Friendly string.";
}
}
}
Run.bat
@echo.
@echo To be run from an administrator command prompt
@echo.
csc /nologo /t:library AxComp.cs
regasm AxComp.dll /nologo /codebase
TestActiveXControl.html
Regasm is the Assembly Registration tool that reads the metadata within an assembly and adds the necessary entries to the registry, which allows COM clients to create .NET Framework classes transparently. Once a class is registered, any COM client can use it as though the class were a COM class. The class is registered only once, when the assembly is installed. Instances of classes within the assembly cannot be created from COM until they are actually registered.
To test it out, define a webpage as shown below:
TestActiveXControl.html
<html>
<title>
Test ActiveX Control
</title>
<script language="JAvaScript">
var obNewActiveXComponent = new ActiveXObject("Foo.Something.Bar");
alert(obNewActiveXComponent.CallMe());
</script>
<body>
<hr>
<h3>Communicating with managed APIs from Javascript</h3>
<hr>
</body>
</html>
If you want to explore all the technologies which enable managed/unmanaged interaction, this page would be helpful.
Watch out this space for more information...
Being new to the .Net and given that my past projects had more or less revolved around UNIX and C, I had to do a lot of research. Although there was a lot of information available on the internet on how to develop a Vista Sidebar there was practically none on how to access data from a managed piece of code from within Jscript. I discovered two ways to do it and in the following section I'll describe precisely that.
For the uninitiated, a Vista Sidebar is nothing but a bunch of HTML and Jscript files packed together. That is it. For more information on how to develop a Sidebar Gadget, please refer to this page.
First way:
AxComp.cs
using System;
using System.Runtime.InteropServices;
namespace Foo.Something
{
public interface Ix
{
string CallMe();
}
public class Bar: Ix
{
public string CallMe()
{
return "Friendly string.";
}
}
}
Run.bat
@echo.
@echo To be run from an administrator command prompt
@echo.
csc /nologo /t:library AxComp.cs
regasm AxComp.dll /nologo /codebase
TestActiveXControl.html
Regasm is the Assembly Registration tool that reads the metadata within an assembly and adds the necessary entries to the registry, which allows COM clients to create .NET Framework classes transparently. Once a class is registered, any COM client can use it as though the class were a COM class. The class is registered only once, when the assembly is installed. Instances of classes within the assembly cannot be created from COM until they are actually registered.
To test it out, define a webpage as shown below:
TestActiveXControl.html
<html>
<title>
Test ActiveX Control
</title>
<script language="JAvaScript">
var obNewActiveXComponent = new ActiveXObject("Foo.Something.Bar");
alert(obNewActiveXComponent.CallMe());
</script>
<body>
<hr>
<h3>Communicating with managed APIs from Javascript</h3>
<hr>
</body>
</html>
If you want to explore all the technologies which enable managed/unmanaged interaction, this page would be helpful.
Watch out this space for more information...
Subscribe to:
Comments (Atom)