DCSIMG
May 2008 - Posts - IHateSpaghetti {code}

IHateSpaghetti {code}

VSX, DSL and Beyond by Eyal Lantzman

Syndication

Coding / Architecture

Extensibility /DSL

Projects

Articles

May 2008 - Posts

 

I found very cool post that show how to obtain quality and better compression with a little tuning and less automation.

 

here's the code:

    System.Drawing.Image myThumbnail = CreateThumbnail(myBitmap,Width,Height,false);                

    //Configure JPEG Compression Engine
                System.Drawing.Imaging.EncoderParameters encoderParams = new System.Drawing.Imaging.EncoderParameters();
                long[] quality = new long[1];
                quality[0] = 75;
                System.Drawing.Imaging.EncoderParameter encoderParam = new System.Drawing.Imaging.EncoderParameter(System.Drawing.Imaging.Encoder.Quality, quality);
                encoderParams.Param[0] = encoderParam;

                System.Drawing.Imaging.ImageCodecInfo[] arrayICI = System.Drawing.Imaging.ImageCodecInfo.GetImageEncoders();
                System.Drawing.Imaging.ImageCodecInfo jpegICI = null;
                for (int x = 0; x < arrayICI.Length; x++)
                {
                    if (arrayICI[x].FormatDescription.Equals("JPEG"))
                    {
                        jpegICI = arrayICI[x];
                        break;
                    }
                }
   
    myThumbnail.Save(Path.Combine(SavePathThumb, fileName), jpegICI, encoderParams);
                myThumbnail.Dispose();

 

Posted by Eyal | with no comments

 

Some web developers don't aware that some anti viruses by scanning the web.config file (or other asp.net watched files) initiates AppDomain restarts and as a result the performance problems (cache is reset as well, naturally),  various crashes and "unexplained" behavior. The solution is simple – exclude asp.net hosted directory from the AV scans, however in order to detect this issue or analyze the severity and recurrence of the problem you'll need to write some very neat code – see ScottGu's Blog for more information.

Posted by Eyal | 1 comment(s)

 

Visual Studio 2008 SDK is now online.  The latest version can be downloaded here.

Some of the new/updated features:

 

·         Significant reduction in size for Visual Studio Shell redistributable packages. The Visual Studio Shell Isolated and Visual Studio Shell Integrated redistributables are now approximately 150 megabytes smaller. The redistributables no longer carry the full .NET Framework 3.5 payload. However, they contain a bootstrapper that automatically downloads the .NET Framework 3.5 runtime if it is not installed on the target computer.

·         Support for progress feedback in a chained installation. The Visual Studio Shell Isolated and Visual Studio Shell Integrated redistributables can now pass installation progress back to the chaining process. This lets developers display accurate progress in their setup programs.

·         Visual Studio Shell development now supports normal user. Developing and deploying a Visual Studio Shell application no longer requires the developer to be an administrator on a Windows XP computer or to have elevated privileges on a Windows Vista computer.

·         The SQL Server team has provided a new XML Tree Editor sample.

·         Addition documentation about the shell has been added.

 VS2008 SP1 Beta is required for this one - download it here.

 

Posted by Eyal | with no comments
תגים:,

Today I had a strange behavior with service broker between two SQL's in express version. The receiving side dropped the messages with the following error (profiler) "This message has been dropped due to licensing restrictions."

I googled the issue and found the reason: "SQL Server Express can use Service Broker only in combination with other SQL Server 2005 editions"; It's good to know... 

Posted by Eyal | with no comments

A wonderful series of post by István Novák from the very beginning of VSX development step by step – highly recommended!

The codeplex project

 

Posted by Eyal | with no comments
תגים:, ,

For those of you that want to dig in to DSL and VShell and don't know where to start comes to the rescue the following sample application.

"The Storyboard Designer is a sample application running on top of the VS Shell Isolated mode. It is composed of a DSL with many UI customizations, a custom project and custom VS templates.
The purpose of this sample is show how to integrate existing VSX and DSL assets to a VS Shell Isolated application."

 

Enjoy

Posted by Eyal | 5 comment(s)
תגים:, ,

 

I needed a "deep debug" (including the managed code) and found a great step by step guide by Shawn Bruke about the way to achieve this.

Here is the guide.

Posted by Eyal | with no comments

 

I came across a great tool for the VS Package developers among us.

This visual tool is currently a read only (for review/ debug) but has a set of great features that can be very useful.

Quote:  "The VSCT (Visual Studio Command Table) PowerToy is a read-only viewer that you can use to explore the commands associated with a VSPackage, and with Visual Studio itself. You can quickly search for any existing commands in the Visual Studio IDE. By browsing through the command groups, GUIDs and IDs, priorities, and other properties of existing commands, you can more easily place and integrate the commands of your own VSPackage."

You can download it from here.

Posted by Eyal | with no comments
תגים:,

I've gathered various posts discussing all kinds of problem and resolutions when dealing with service broker.

A very useful query for message pileup in the queue is this one (100% mine :-) ):

SELECT is_initiator,

s.name as 'local service',

 far_service,

count(*) as conversations,

sum(msg.messages) as messages

FROM

                sys.conversation_endpoints ce

left join sys.services s on ce.service_id = s.service_id

inner join (

                                SELECT count(*) as messages, conversation_handle

                                FROM   [YOUR QUEUE NAME GOES HERE]

                                GROUP BY conversation_handle

)  as msg on msg.conversation_handle = ce.conversation_handle

GROUP BY is_initiator, s.name, far_service

Extenral link #1: Troubleshooting tools

External link #2: Troubleshooting

External link #3: Conversation troubleshooting

External link #4: Queries for troubleshooting

Posted by Eyal | with no comments