The Snippet Designer is a plugin which enhances the Visual Studio IDE to allow a richer and more productive code snippet experience.
http://www.codeplex.com/SnippetDesigner
Wednesday, June 24, 2009
Wednesday, June 17, 2009
Load image/rotate image in Canvas tag (support only firefox)
How to load an image in a canvas tag?
Start unpretentiously with an empty canvas tag:
Now the javascript. Two variables to store a handle to the canvas element and the 2D context of the canvas:
var can = document.getElementById('canvas');
var ctx = can.getContext('2d');
Now let's load an image into the canvas. Using the new Image() constructor you can create an image object, then set its src property to point to the location of the image file. Then set an onload handler for the image which is an anonymous function to be called when the image is done loading. There you put the image inside the canvas using the drawImage() method of the canvas context.
var img = new Image();
img.onload = function(){
can.width = img.width;
can.height = img.height;
ctx.drawImage(img, 0, 0, img.width, img.height);
}
img.src = 'zlati-nathalie.jpg';
You can also notice how the dimensions of the canvas are adjusted to match the dimensions of the image.
How to flip the image upside down
The canvas context provides a rotate() method. The rotation always happens around the top left corner of the image, so we first translate() the image to the bottom right. This way when the image is rotated, it fits back into the canvas. (There is also a one pixel correction, I have no idea why, just saw that the image wasn't flipping exactly otherwise). Assigning this functionality to the onclick:
can.onclick = function() {
ctx.translate(img.width-1, img.height-1);
ctx.rotate(Math.PI);
ctx.drawImage(img, 0, 0, img.width, img.height);
};
C'est tout! Once again, the demo is here.
Start unpretentiously with an empty canvas tag:
Now the javascript. Two variables to store a handle to the canvas element and the 2D context of the canvas:
var can = document.getElementById('canvas');
var ctx = can.getContext('2d');
Now let's load an image into the canvas. Using the new Image() constructor you can create an image object, then set its src property to point to the location of the image file. Then set an onload handler for the image which is an anonymous function to be called when the image is done loading. There you put the image inside the canvas using the drawImage() method of the canvas context.
var img = new Image();
img.onload = function(){
can.width = img.width;
can.height = img.height;
ctx.drawImage(img, 0, 0, img.width, img.height);
}
img.src = 'zlati-nathalie.jpg';
You can also notice how the dimensions of the canvas are adjusted to match the dimensions of the image.
How to flip the image upside down
The canvas context provides a rotate() method. The rotation always happens around the top left corner of the image, so we first translate() the image to the bottom right. This way when the image is rotated, it fits back into the canvas. (There is also a one pixel correction, I have no idea why, just saw that the image wasn't flipping exactly otherwise). Assigning this functionality to the onclick:
can.onclick = function() {
ctx.translate(img.width-1, img.height-1);
ctx.rotate(Math.PI);
ctx.drawImage(img, 0, 0, img.width, img.height);
};
C'est tout! Once again, the demo is here.
Wednesday, May 20, 2009
Configuring Multiple Sitemaps in .NET
http://itechtalk.wordpress.com/2007/12/07/configuring-multiple-sitemaps-in-net/
Friday, February 13, 2009
Oracle Developer Tools for Visual Studio
The 11g release of Oracle Developer Tools for Visual Studio (ODT) includes a host of powerful new features that make Oracle and .NET development easier and faster. These features make it convenient for Microsoft Visual Studio developers to stay in Visual Studio for the entire development lifecycle. The new features detailed in this paper are available for Visual Studio 2008, Visual Studio 2005 and Visual Studio .NET 2003. This release supports Oracle Database version 9.2 or later and is also compatible with any version of the Oracle Data Provider for .NET (ODP.NET). The Oracle Developer Tools for Visual Studio is a free product that is available for download.
Learn more: http://www.oracle.com/technology/tech/dotnet/tools/index.html
Learn more: http://www.oracle.com/technology/tech/dotnet/tools/index.html
Monday, February 2, 2009
Error: The task with the name Data Flow Task and the creation name "DTS.Pipeline.1" is not registered for use on this computer
I also ever experienced this problem. This problem occured probably, you use username and password to log on to your computer, so sql server need to verify the user who authorized to use the sql server service.. But sometimes sql server cannot redirect to the account, so we need to configure the user.
Here's the step :
1. open sql server configuration mangager
2. choose sql server 2005 services
3. right click sql server integration services, choose properties
4. choose log on tab, select this account, enter your username and password which is used to log on your computer.
5. reopen the business intelligence studio. There you are, the data flow task component can work properly again.
finally, i found out how to solve this problem...
thanks to sulton..
Here's the step :
1. open sql server configuration mangager
2. choose sql server 2005 services
3. right click sql server integration services, choose properties
4. choose log on tab, select this account, enter your username and password which is used to log on your computer.
5. reopen the business intelligence studio. There you are, the data flow task component can work properly again.
finally, i found out how to solve this problem...
thanks to sulton..
Monday, January 12, 2009
How To Enable jQuery Intellisense in VS 2008
Good news for .net developer. That is from what i have found on the web.
On November 21, the vice president of Microsoft's .NET Developer division, Scott Guthrie, announced that his group had produced "great jQuery IntelliSense support" in for both Visual Studio 2008 and the free Visual Web Developer 2008 Express package in collaboration with the jQuery development team. This delivers on his promise, made in September, that such support would be forthcoming. Guthrie's blog post has instructions on how to grab and install the proper hotfix to add this capability.
Several programmers have written about this problem in detail. Brad Vincent noted the IntelliSense jQuery bug in a blog entry more than half a year before all the recent hoopla, and James Hart came up with a clever solution to javascript:void(0)the jQuery IntelliSense problem in Visual Studio. Hart's fix is to create a dummy JavaScript file that contains stubs to all of jQuery's calls and link to it within Visual Studio; the editor picks up the dummy APIs and auto-completes based on them, but the end-user's Web browser actually uses the jQuery library. Scott Hanselman has also put together a nice tutorial on working with jQuery inside VS 2008.
or read this for simple solution without installing hotfix http://blogs.msdn.com/webdevtools/archive/2008/10/28/rich-intellisense-for-jquery.aspx
On November 21, the vice president of Microsoft's .NET Developer division, Scott Guthrie, announced that his group had produced "great jQuery IntelliSense support" in for both Visual Studio 2008 and the free Visual Web Developer 2008 Express package in collaboration with the jQuery development team. This delivers on his promise, made in September, that such support would be forthcoming. Guthrie's blog post has instructions on how to grab and install the proper hotfix to add this capability.
Several programmers have written about this problem in detail. Brad Vincent noted the IntelliSense jQuery bug in a blog entry more than half a year before all the recent hoopla, and James Hart came up with a clever solution to javascript:void(0)the jQuery IntelliSense problem in Visual Studio. Hart's fix is to create a dummy JavaScript file that contains stubs to all of jQuery's calls and link to it within Visual Studio; the editor picks up the dummy APIs and auto-completes based on them, but the end-user's Web browser actually uses the jQuery library. Scott Hanselman has also put together a nice tutorial on working with jQuery inside VS 2008.
or read this for simple solution without installing hotfix http://blogs.msdn.com/webdevtools/archive/2008/10/28/rich-intellisense-for-jquery.aspx
Subscribe to:
Posts (Atom)