This is a mirror of official site: http://jasper-net.blogspot.com/

AJAX 2: What is coming with XMLHttpRequest Level 2? - JS Classes blog

| Wednesday, November 24, 2010
XMLHttpRequest, often referred as AJAX, is going to get a new and improved specification version named Level 2. This article gives an overview of what is planned for XMLHttpRequest Level 2 and how it can be used to improve Web applications usability.

Contents

Introduction
Brief history of XMLHttpRequest
XMLHttpRequest limitations
AJAX 2: What is XMLHttpRequest Level 2?

Conclusions

Introduction

For those that may still not be familiar, XMLHttpRequest is a JavaScript object that can send arbitrary HTTP requests from the user browser to a Web server in order to submit or retrieve information in the background.

It is often used to develop the so called AJAX Web applications, i.e. applications that interact with Web servers in a faster way, as they usually exchange information with the Web server without having to load a new page in the browser.

Brief history of XMLHttpRequest

The XMLHttpRequest was introduced by Microsoft in 1999 as part of the Microsoft Exchange Server 2000 product. The intention was to provide an highly interactive user interface similar to the Microsoft Outlook program but being solely based on a Web browser. That Web based interface was named OWA - Outlook Web Access.

The idea had a great success and the XMLHttpRequest object started being bundled in Internet Explorer 5 as part of a ActiveX object named MSXML.

Read more:  JS Classes blog

Posted via email from .NET Info

Open-Source Social Network Diaspora Goes Live

|
Diaspora, a widely anticipated social network site built on open-source code, has cracked open its doors for business, at least for a handful of invited participants. 'Every week, we'll invite more people,' stated the developers behind the project, in a blog item posted Tuesday announcing the alpha release of the service. 'By taking these baby steps, we'll be able to quickly identify performance problems and iterate on features as quickly as possible.' Such a cautious rollout may be necessary, given how fresh the code is. In September, when the first version of the working code behind the service was posted, it was promptly criticized for being riddled with security errors. While Facebook creator Mark Zuckerberg may not be worried about Diaspora quite yet, the service is one of a growing number of efforts to build out open-source-based social-networking software and services

Read more: Slashdot

Posted via email from .NET Info

Visual Studio 2010 Slowdown: VMDebugger is the Culprit

|
I recently wrote how Visual Studio 2010 is very slow on my fast PC, taking 25-30 seconds to start up.  Thanks to a Microsoft employee who helped me but wishes to remain anonymous, my problem is solved.

The VMWare add-in, VMDebugger, causes Visual Studio 2010 to load very slowly on my fast PC.


Note that your mileage may vary, and VMDebugger may not ultimately be responsible.  Software is so complex these days it’s amazing anything works.  But I learned a couple lessons from this experience:

It’s not enough to turn off the VMDebugger add-in with the Visual Studio Add-In Manager.  It’s also not enough to run Visual Studio from the command line (devenv.exe) with the /ResetAddin flag to prevent the add-in from starting.  The only way to truly remove the VMDebugger add-in and stop its effect on Visual Studio is to uninstall the entire VMWare Workstation product from your PC.  You can then reinstall VMWare but be sure to NOT install its Visual Studio add-in.

To see the true effect of running devenv.exe in /SafeMode, you must run it multiple times.  The first few times I ran it in safe mode, Visual Studio started relatively slow.  But when I ran it the fourth and subsequent times, VS2010 started in just a few seconds.  This led me to conclude that the Visual Studio slowdown was indeed caused by an add-in.

Read more: DevTopics

Posted via email from .NET Info

11 Things to Do When a Client Files Bankruptcy

|
Bankruptcy filings are up considerably. So, don't be surprised if you open your mail and find a letter from an attorney telling you that one of your clients or customers is seeking relief from the courts to solve his or her financial troubles.

The bankruptcy process is full of rules that the debtor and creditor must follow. However, bankruptcy is not as formal as say civil court, says Victoria Ring, a debtor bankruptcy specialist and CEO of Colorado Bankruptcy Training, which provides instruction and support to attorneys nationwide. Bankruptcy is a big "Let's Make a Deal." You can negotiate a resolution, hopefully one that is in your favor, in cases where the debtor is trying to save the business and pay back creditors.

With a Chapter 11 or Chapter 13 filing, reorganization is the goal. Debtors are required to pay debts according to a repayment plan the court sets up. Chapter 7 bankruptcy filing is quite different; the business is shutting its doors permanently and individuals are given a "fresh start" by liquidating assets and discharging debts.

Of course, the problem is that the vast majority of the filings are Chapter 7. More than 1.5 million consumer bankruptcy filings were processed over a 12-month period ending September 30, a 14 percent increase from the previous year, according to data released by the Administrative Office of the U.S. Courts. Chapter 7 filings were up 16 percent to over 1.1 million. Chapter 13 filings were up 9 percent to 434,839, while Chapter 11 filings were down nearly 4 percent to 14,191. Business bankruptcy filings fell 1 percent to 58,322.

1. Stop Contact Completely

Once a person or business files for bankruptcy, you have to stop any and all collection activity. If you make contact to try to get your money back, you will violate the bankruptcy code and you can actually be sued. Even if you filed a lawsuit against the client, it gets stayed until the bankruptcy is completed. You can, however, contact the attorney or court appointed trustee to work out an arrangement on how your debt is handled in the bankruptcy, says Ring, who is the author of 102 Things Your Need to Know Before You File Bankruptcy. If for some reason you are not listed in the bankruptcy petition as a creditor who is owed money, then you will have the right to keep collecting on the debt even after the bankruptcy is over, says Ring.

2. Do a Cost-Benefit Analysis

Assess whether it is even worth your time or should you simply take the loss, says Daniel Gershburg, a Brooklyn, New York bankruptcy attorney. Meaning, "in a practical sense can you really get any money back from this consumer or client?" For instance, say the business grosses over $500,000 but it has over $1 million in debts and a long string of 15 creditors or more. There is very little chance you are going to receive any money back, Gershburg says. In most cases, he adds, small companies or consumers filing bankruptcy aren't going to have tangible assets that the trustee can sell and then distribute to any and all creditors. Ring suggests reviewing the schedule I and schedule J, included in every petition, which will show the filer's income and expenses.

Dig Deeper: Report: Businesses Going Bankrupt


3. Pay Attention to the Type of Bankruptcy

Read more: Inc.

Posted via email from .NET Info

Grid, Cloud, HPC … What’s the Diff?

|
It’s always nice when another piece of the puzzle comes into focus.  In this case, my time speaking at the first ever International Super Computer (ISC) Cloud Conference the week before last was well spent.  The conference was heavily attended by those out of the grid computing space and I learned a lot about both cloud and grid.  In particular, I think I finally understand what causes some to view grid as a pre-cursor to cloud while others view it as a different beast only tangentially related.

This really comes down to a particular TLA in use to describe grid: High Performance Computing or HPC.  HPC and grid are commonly used interchangeably.  Cloud is not HPC, although now it can certainly support some HPC workloads, née Amazon’s EC2 HPC offering.  No, cloud is something a little bit different:  High Scalability Computing or simply HSC here.

Let me explain in some depth …

Scalability vs. Performance
First it’s critical for readers to understand the fundamental difference between scalability and performance.  While the two are frequently conflated, they are quite different.  Performance is the capability of particular component to provide a certain amount of capacity, throughput, or ‘yield’.  Scalability, in contrast, is about the ability of a system to expand to meet demand.  This is quite frequently measured by looking at the aggregate performance of the individual components of a particular system and how they function over time.

Put more simply, performance measures the capability of a single part of a large system while scalability measures the ability of a large system to grow to meet growing demand.
Scalable systems may have individual parts that are relatively low performing.  I have heard that the Amazon.com retail website’s web servers went from 300 transactions per second (TPS) to a mere 3 TPS each after moving to a more scalable architecture.  The upside is that while every web server might have lower individual performance, the overall system became significantly more scalable and new web servers could be added ad infinitum.

High performing systems on the other hand focus on eking out every ounce of resource from a particular component, rather than focusing on the big picture.  One might have high performance systems in a very scalable system or not.

For most purposes, scalability and performance are orthogonal, but many either equate them or believe that one breeds the other.

Grid & High Performance Computing
The origins of HPC/Grid exist within the academic community where needs arose to crunch large data sets very early on.  Think satellite data, genomics, nuclear physics, etc.  Grid, effectively, has been around since the beginning of the enterprise computing era, when it became easier for academic research institutions to move away from large mainframe-style supercomputers (e.g. Cray, Sequent) towards a more scale-out model using lots of relatively inexpensive x86 hardware in large clusters.  The emphasis here on *relatively*.

Most x86 clusters today are built out for very high performance *and* scalability, but with a particular focus on performance of individual components (servers) and the interconnect network for reasons that I will explain below.  The price/performance of the overall system is not as important as aggregate throughput of the entire system.  Most academic institutions build out a grid to the full budget they have attempting to eke out every ounce of performance in each component.

Read more: cloud scaling

Posted via email from .NET Info

HTTP Post Denial Of Service: more dangerous than initially thought

|
What’s special about this denial of service attack is that it’s very hard to fix because it relies on a generic problem in the way HTTP protocol works. Therefore, to properly fix it would mean to break the protocol, and that’s certainly not desirable. The authors are listing some possible workarounds but in my opinion none of them really fixes the problem.

The attack explained

An attacker establishes a number of connections with the web servers. Each one of these connections contains a Content-Length header with a large number (e.g. Content-Length: 10000000). Therefore, the web server will expect 10000000 bytes from each one of these connections. The trick is not to send all this data at once but to send it character by character over a long period of time (e.g. 1 character each 10-100 seconds). The web server will keep these connections open for a very long time, until it receives all the data. In this time, other clients will have a hard time connecting to the server, or even worse will not be able to connect at all because all the available connections are taken/busy.

In this blog post, I would like to expand on the effect of this denial of service attack against Apache.

First, I would like to start with one of their affirmations:

“Hence, any website which has forms, i.e. accepts HTTP POST requests, is susceptible to such attacks.”

At least in the case of Apache, this is not correct. It doesn’t matter if the website has forms or not.
Any Apache web server is vulnerable to this attack. The web server doesn’t decide if the resource can accept POST data before receiving the full request.

Read more: acunetix

Posted via email from .NET Info

10 Essential Tools for building ASP.NET Websites

|
I recently put together a simple public website created with ASP.NET for my company at Superexpert.com. I was surprised by the number of free tools that I ended up using to put together the website. Therefore, I thought it would be interesting to create a list of essential tools for building ASP.NET websites. These tools work equally well with both ASP.NET Web Forms and ASP.NET MVC.

Performance Tools

After reading Steve Souders two (very excellent) books on front-end website performance High Performance Web Sites and Even Faster Web Sites, I have been super sensitive to front-end website performance. According to Souders’ Performance Golden Rule:

“Optimize front-end performance first, that's where 80% or more of the end-user response time is spent”

You can use the tools below to reduce the size of the images, JavaScript files, and CSS files used by an ASP.NET application.

1. Sprite and Image Optimization Framework

CSS sprites were first described in an article written for A List Apart entitled CSS sprites: Image Slicing’s Kiss of Death. When you use sprites, you combine multiple images used by a website into a single image. Next, you use CSS trickery to display particular sub-images from the combined image in a webpage.

The primary advantage of sprites is that they reduce the number of requests required to display a webpage. Requesting a single large image is faster than requesting multiple small images. In general, the more resources – images, JavaScript files, CSS files – that must be moved across the wire, the slower your website.

However, most people avoid using sprites because they require a lot of work. You need to combine all of the images and write just the right CSS rules to display the sub-images. The Microsoft Sprite and Image Optimization Framework enables you to avoid all of this work. The framework combines the images for you automatically. Furthermore, the framework includes an ASP.NET Web Forms control and an ASP.NET MVC helper that makes it easy to display the sub-images. You can download the Sprite and Image Optimization Framework from CodePlex at http://aspnet.codeplex.com/releases/view/50869.

The Sprite and Image Optimization Framework was written by Morgan McClean who worked in the office next to mine at Microsoft. Morgan was a scary smart Intern from Canada and we discussed the Framework while he was building it (I was really excited to learn that he was working on it).


Read more:  Stephen Walther

Posted via email from .NET Info

Passing Configuration Data to the Master Page in ASP.NET MVC

|
One of the common activities that I have found myself doing lately whenever I create a new project is to identify a way of loading configuration information and customizing the behavior of the Master Page. The way I initially went about solving this problem was to create a base class and have all of my Page ViewModel’s inherit from it. This caused two different things that I had to constantly maintain, making sure all of my ViewModel’s inherited from this MasterViewModel and then remembering to set the data every time a ViewResult is returned in an Action.

public class MasterViewModel : IMasterViewModel
{
   public string SiteName { get; set; }
}

I was able to take care of the second concern by simply creating a base controller that all of my controllers would inherit from and then override View(string viewName, string masterName, object model) { … } so that the settings are automatically injected into the model.

protected override ViewResult View(string viewName, string masterName, object model)
{
   ((MasterViewModel)model).SiteName = "Example";
   return base.View(viewName, masterName, model);
}

In order to get around the smell of forcing my ViewModel’s to inherit from a base class I put the MasterViewModel into the ViewData dictionary that is returned in the ViewResult.

protected override ViewResult View(string viewName, string masterName, object model)
{
   ViewResult result = base.View(viewName, masterName, model);
   result.ViewData[Data.Site] = _blogConfiguration.Configuration;
   return result;
}


Read more: about:thoughts

Posted via email from .NET Info

Ice Meteorite Found with Extraterrestrial Life-Forms

|
31117-223459-0847a6e20ee9a8f3a1058dea6210d86f.jpg

Duane P. Snyder will announce the discovery of the first and only known ICE METEORITE containing EXTRATERRESTRIAL LIFE-FORMS on November 30, 2010 at 10:00am at the Ramada Inn Conference Center, 1555 Phoenix Road, South Haven, MI 49090.
SOUTH HAVEN, Mich., Nov. 21, 2010 /PRNewswire/ -- Duane P. Snyder will announce the discovery of the first and only known ICE METEORITE containing EXTRATERRESTRIAL LIFE-FORMS on November 30, 2010 at 10:00am at the Ramada Inn Conference Center, 1555 Phoenix Road, South Haven, MI 49090.
Also to be announced: The ICE METEORITE's particle analysis, it's gas analysis, where it likely came from and PHOTOS of EXTRATERRESTRIAL LIFE-FORMS found in the melt-water of the ICE METEORITE.
Dr. Albert Schnieders of Tascon USA Inc, Chestnut Ridge, New York 10977, has commented that we basically found nearly all elements up to 90u in the sample spherical particles.


Read more: PRNewswire

Posted via email from .NET Info

Common WinDbg Commands (Thematically Grouped)

|

Setting up kernel mode debugger in windows

|
Introduction

When ever there is a bug in your program you usually open a debugger(GDB,visual studio debugger etc) to fix it, but how do you debug a bug in the operating system? Do you load the running OS in to debugger? Is it possible? The simple answer is no, Because even the debugger works with the help of OS. Its a catch22 situation
History

Earlier developers used two machines one is the defective OS(slave) and other machine is the one containing debugger software(master).  Now the defective slave is connected to master machine using a high speed cable, and then both slave and master machines are started, with the help of debugger the execution of slave machine is  paused. But this solution have some drawbacks.  

The connection speed between the machines is too slow, because the data and commands should be passed to and fro between master and slave.
Require extra hardware like cable and two separate machines
Current Process

Fortunately we now have much better options for beginners who want to study the internals of the OS by debugging. With the help of virtual machines we now do not require two separate machines. The slave machine can be thought of as a guest VM and master machine can be thought of as a host computer(your real physical machine). The connection between these host and guest have been made even simpler with the help of a software called VirtualKD(Virtual Kernel Debugger)[with out this tool we have to manually set up a named pipe in the guest and modify boot.ini to enable some special options. Its little time consuming]. So in this tutorial I will help you set up kernel mode debugger.

I will be using following tools.

  • WinDbg (Windows Kernel Debugger) 
  • Virtual Box (Virtual Machine Manager) 
  • VirtualKD (Tool to enable very high speed kernel debugging between host and just machines)

here after when ever I refer to OS it will be one version of windows

Read more: Codeproject

Posted via email from .NET Info

Installing QT 4.7.x for VS2010

|
had some issues installing QT on windows with vs2010 so I thought I'll share the solution that worked for me.

I'm using win7 64 bit , vs2010, qt 4.7.1
What do I need ?
qt add on for visual studio (qt-vs-addin-1.1.7.exe)
qt open source distribution (qt-everywhere-opensource-src-4.7.1.zip)
Installation Process


download and install qt add on for visual studio
download qt open source distribution
create qt directory (i used C:\Qt\4.7.1x32\)
extract the zip contents into previously created folder (extract files & folders not the root directory named qt-everywhere-opensource)
open visual studio command prompt named...


Read more: Code in Vain

Posted via email from .NET Info

Build a Pandora clone with Silverlight 4

|
For the uninitiated, Pandora is a popular Flash-based internet radio service: users create their own radio stations by seeding an artist or song, and by giving a thumb-up or thumb-down to played songs. The software responds by playing more of what the user likes based off these inputs.

In this article, I'm going to show you how to build a Pandora-like music service using Silverlight 4, WCF, and Entity Framework. The end result is Chavah ("HA-vah"), a fun Silverlight clone of Pandora which can be seen live at judahhimango.com/chavah.

Introduction

Why build a Pandora clone, you ask?

I have a selfish motivation: Pandora doesn’t play the music I’m most interested in. As a Jewish follower of Yeshua (Jesus), I enjoy a tiny genre of religious music called Messianic Jewish music, a genre so small Pandora doesn’t know about any of our music.

I thought, “Why not build a Pandora clone to play some great Messianic Jewish tunes?” It would serve myself primarily, but also others in our community. And it'd raise the awareness of some of the great Messianic music out there to boot.

But a more general motivation is, “Why not?” If anything, it’s a great learning experience to expose one’s self to a full client/server application using Silverlight, WCF, and Entity Framework. These technologies are currently popular and in demand by employers, so it’s great résumé fodder to boot.

Out of these motivations, the Chavah project was born. Chavah is my attempt to build a Pandora-like clone that plays Messianic Jewish music, and is the subject of this article.

Why Silverlight?

During the 2010 Professional Developer’s Conference, Microsoft hyped up IE9 and its HTML 5 support, without commenting much on Silverlight. Because of this, there has been speculation as to whether Silverlight would fade out in favor of HTML 5; folks questioning why to use Silverlight over HTML 5.

While Microsoft has since reiterated their long term support for Silverlight, the question of why use Silverlight was a very real question when starting a web app like Chavah.

My reasons for ultimately choosing Silverlight are pragmatic:

  • Silverlight is more cross-platform than HTML 5. Most of my target audience is still running browsers with limited or no HTML 5 support. And even for the few that do have HTML 5-compatible browsers , the support is neither consistent across browsers, nor stable. My target audience is Windows and Mac, and Silverlight runs great on both, right now, in most any web browser.
  • The tooling kicks ass. Visual Studio + Blend is a hard combo to beat. C# is a great language with great tool and refactoring support. Animations, paths, soft UI edges, glow effects, drop shadows, and all things UI sexy are easy with Blend. 
  • Silverlight will always be a step ahead of the HTML spec. By the time HTML 5 has broad reach, Silverlight will have features that only HTML 6 will bring. This is the nature of design-by-committee of the HTML spec. Silverlight will innovate and bring new features plain old HTML is missing, and will deliver it faster and broader than the HTML spec ever will.
  • Silverlight is an app development platform; HTML was intended for documents. Chavah is an application, not a document. HTML + Javascript + CSS hacks can turn a document into an app, but ultimately, a platform built for apps is more compelling for an application like Chavah.
  • Since Chavah is an application, I want users to be able to install Chavah locally onto their desktops. With Silverlight’s out-of-browser capabilities, users can optionally install Chavah as a native application. This simply would not be possible with HTML + CSS + Javascript, barring browser-specific hacks like IE9’s “pinned sites” or Google Chrome’s “application shortcuts”.

Points of Interest

In showing how Chavah is built, this article will show you how you can simulate the look and feel of apps like Pandora – smooth UI layout, animations, fluid feel – all in Silverlight 4. I’ll show you how a real-world application can make use of some of the new features in Silverlight, like out-of-browser functionality, easing animations, and GPU acceleration.
Additionally, we’ll cover communication with the backend WCF web service where the “pick a song based off the user’s likes and dislikes” logic is located.

I’ll show you how to add some fun social features to your application using WCF, Entity Framework, and SQLite.

Read more: Codeproject

Posted via email from .NET Info

Why does machine.config contain invalid Xml content after installing .Net 3.5 patches?

|
For quite a few times, I heard customers would hit this issue after installing .Net 3.5 patches or repair 3.5 on Windows Vista or Windows 2008 Server. Basically the machine.config file contains some invalid Xml content and applications using configuration do not work, especially for IIS-hosted applications. The main problem is that the WCF 3.5 installer (WFServiceReg.exe) did not handle the different cases very well.
Problem Statement
There are three different cases that I have heard:

Issue 1: .Net 3.0 is removed but .Net 3.5 is on the box

On Windows Vista and Windows 2008 Server, .Net 3.0 is installed through Component-Based Setup (CBS). However, .Net 3.5 is installed through Windows Installer (MSI). Thus .Net 3.5 does not have a strong dependency on .Net 3.0. People could accidentally uninstall .Net 3.0 from the box. This would cause the section handlers (for <system.serviceModel> etc) for WCF removed from machine.config. However, any further .Net 3.5 patch would cause the WCF installer to run and it would install the following dangling elements into machine.config:
<system.serviceModel>
 <extensions>
   ...
 </extensions>
 <client>
   ...
 </client>
</system.serviceModel>
This would cause the application to fail with the following error:
System.Configuration.ConfigurationErrorsException: Unrecognized configuration section system.serviceModel. (c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config line 146)

Issue 2: .Net 3.0 is on the box but the WCF section handlers are removed

For some unknown reason, .Net 3.0 is not uninstalled from the machine. However, the WCF section handlers are accidentally removed when different orders of install/uninstall operations happened. The application would also fail with the same error as Issue 1 above.

Issue 3: Redundant Xml elements when configSource is used


Read more: Wenlong Dong's Blog

Posted via email from .NET Info

David Reveman lands GPU acceleration for Moonlight…

|
David Reveman had a great birhtday present for me today. He just completed the hardware accelerated support for Moonlight.

You can watch two quick videos I made today with David: Hardware acceleration with Moonlight and Moonlight 3D Perspective Support.

In Moonlight hardware acceleration is used for a number of features:

Applying 3D transforms to any Silverlight objects (drawings, images, videos).
Accelerating rendering of surfaces by pre-caching the contents on hardware textures.
Pixel shaders.
Although Silverlight is able to accelerate some pixel shaders, Moonlight is able to accelerate all custom pixel shaders.

The code currently lives on GitHub and we are doing daily builds of Moonlight for users interested in trying it out.


Read more: Miguel de Icaza's web log

Posted via email from .NET Info

zlibnet - c# zlib wrapper library

|
Project Description
zlibnet - c# zlib wrapper library

Features:
-zip
-unzip
-compression/decompression stream
-fast, since using the unmanaged zlib library
-64bit support


Not supported:
-encryption/password protection
-multi volume archives
-UTF8 filenames/comments (can be added if needed, but not added yet since not supported by Windows Compressed Folders)
-ZIP64 (can be added if needed, but not added yet since not supported by Windows Compressed Folders)

zlibnet is a souped up library based on 2 other libraries, mainly:
http://www.organicbit.com/zip/
http://zlibnetwrapper.sourceforge.net/

The organicbit part is left mainly intact, but some bugfixes.
The zlibnetwrapper was written in managed C++, so it was ported to C#, with some changes.

In addition, I added a wrappers around the organicbit part, to simplify zipping/unzipping.


Read more: Codeplex

Posted via email from .NET Info

Top picks from a honkin’ big list of Windows Phone 7 tips

|
I don’t have a Windows Phone 7 handset yet but I am really hoping for one in the new year so I’ll be bookmarking this list of 72 tips from Pocket-lint for future reference.

In the meantime though here’s my top picks of their tips.

5. Removing apps from the Start screen

You like the app, but you don’t really want it on your Start screen anymore. No worries. Hold your finger on the tile in question for a couple of seconds and when it highlights press the no pin icon in the top right-hand corner.

7. Rating and reviewing apps

You really love the new app you’ve downloaded, so much so that you want to rate and review it so anyone else interested knows whether it’s any good or not. With Windows Phone 7 you don’t have to wait until you delete it to rate it, you can rate and review it at any time. Press and hold down on the app in question until that contextual menu appears and then choose “Rate and review”. It will bring up another page allowing you to have your say and give it a rating out of five. Easy peasy.

12. Turning off the key press sound

Click, click, click, click. Yep, it’s annoying isn’t it? Great thing is you can turn off the noise Windows Phone 7 makes when you tap on your keyboard in the ringtones and sounds area within settings.


Read more: winextra
Read more: Picket-lint

Posted via email from .NET Info

Debugging: Failed to Enable Constraints

|
I have a DataSet that has had a new field added to it recently. When my console application runs, it was throwing a “Failed to enable constraints” exception. I needed to find out which column in the DataSet was causing the error, so a co-worker suggested I create a temporary data adapter/set, so I can examine the GetErrors() method. Once the exception occurs, access the GetErrors() property using the Watch window. This will tell you exactly what your issue is.

Read more: GetErrors()

Posted via email from .NET Info

Damn You, Coding

|

Hexa.xText

|
Project Description
Hexa.xText is a .Net command line tool to extract text from source files for later translation, just like the GNU xgettext does.

Extracted text are placed inside po files that must be compiled into satellite assemblies through the included PO2Assembly MSBuild task.

Hexa.xText will extract any string contained in a method call like the following:

t("String to extract");

where t is the method that calls gettext to translate the string.

Read more: Codeplex

Posted via email from .NET Info

Debugging SQL Queries, Functions, & Stored Procedures with SQL Management Studio’s Integrated Debugger

|
image_b7f4b93f-5404-4829-b3ca-e5593130f1eb.png

Working with Stored Procedures and functions on a database tier can be time consuming, hard to debug and sometimes just difficult to get clarity on what is “happening”. A rarely discussed feature of Microsoft SQL Management Studio is its inbuilt debugging features. These allow you to see exactly what is going on, and step through your logic in a similar fashion to working in Visual Studio.
I have spent a fair bit of time in SQL Management Studio of late, working on a legacy project at my new workplace. You can only imagine my sheer *delight* that nearly all the logic for the application in discussion is done on the database tier, using stored procedures, triggers and CLR functions. Just magic… (if you haven’t picked up the sarcasm yet, here is a prod…).
Because of my recent sustained trip to the land of pain, i have quickly had to work on my SQL fu to be able to solve problems and get to the bottom of their cause as quickly and efficiently as possible. Writing a whole bunch of print @MyVariableName to the screen just doesn’t cut it with complicated bugs. SQL Management Studio’s debugging tool helps reduce the time needed for this greatly.


End the Pain game

For the example i want to show you I'm going to walk you through a number of scenarios. I’m going to debug a bit of SQL that executes a stored procedure, and within that stored procedure I'll call a SQL function. The reason for this example being slightly abstracted is so that you can actually gather the power of this tool for working with complicated scenarios. I won’t show you, but the same techniques can be used to following the path of a Trigger after the event you have just fired happens.
Optionally you can avoid doing any of the below and simply pick up “how” i debug and apply it to a database you know and *maybe* love.
Demo Setup

Open SQL Management Studio and create a blank database.
Run the SQL script below in a new query window


Read more: Diary of Ninja...

Posted via email from .NET Info

Palm Top Theater

| Tuesday, November 23, 2010
Youtube

The International Film Festival Rotterdam has brought cinema to the large screen. We think that the intimacy of small mobile screens are giving new impulses to the cinematic experience. V2_ will present a series of films and animations small enough to watch in the palm of your hand.

Acquaint yourself with a new 3D film experience on your iPhone or iPad at the Palm Top Theater exhibition. We invite you to a workshop to make new work for this intimate 3D environment. Experiments with space and interaction will form the heart of the exhibition.

Read more: V2

Posted via email from .NET Info

Design barter

|
We design, you pay whatever and whenever you like.
Submit a job now »


Read more: Design Barter

Posted via email from .NET Info

RHEL 6 released

|
Red Hat is pleased to announce the world-wide availability of Red Hat Enterprise Linux 6. This is a milestone event for Red Hat as we once again push forward and upward our leadership position in the market. Red Hat Enterprise Linux 6 delivers dramatic improvements in reliability, security, performance, scalability and infrastructure flexibility.

Red Hat Enterprise Linux 6 has been specifically architected to help organizations experience a seamless transition to emerging data center models that include virtualization and cloud computing. With support across the major hardware architectures, hypervisors and commercial Cloud providers, Red Hat Enterprise Linux 6 makes the transitions between physical and different virtual environments predictable and secure for our customers. Enhanced tools and new capabilities in this release enable administrators to tailor the application environment to efficiently monitor and manage compute resources and security. IT departments who adopt Red Hat Enterprise Linux 6 will improve their agility, lower their costs and reduce complexity with innovative technologies that span physical, virtual and cloud infrastructures.

Read more: rhelv6-announce

Posted via email from .NET Info

Nessus 4.4.0 Released!

|
Tenable is excited to announce a new release of the Nessus vulnerability scanner! This is a major release (moving from 4.2.2 to 4.4.0) and includes several new features and enhancements, including the addition of scan scheduling and enhanced reporting. The GUI and web server have both been updated and will be released through the plugin feed. The enhancements included in the plugin feed will be backward compatible with Nessus 4.2, and some of the new features will be available in Nessus 4.2 via the plugin feed update. However all users are strongly encouraged to upgrade to the latest version to take advantage of all the new features.

The list below outlines the changes included in the 4.4.0 release, including sample reports, scheduling examples and more:

User interface

A brand new reporting engine produces improved reports. Two new HTML reports have been added: a detailed plugin report (results displayed by plugin / vulnerability) and an "Executive Summary" report that summarizes the top 10 most vulnerable hosts on the network.

6a00d8345495f669e2013488ddb5dc970c-pi

Read more: Tenable

Posted via email from .NET Info

Game Design Evolution – Yeah, That’s About The Size of It…

|
I don’t know who is originally responsible for this image, but it pretty much sums everything up nicely, and not just for first-person shooters or map design:

BITmX-650x519.jpg

Read more: Tales of the Rampant Coyote

Posted via email from .NET Info

The Placebo Effect Not Just On Drugs

|
It seems the placebo effect isn't just valid on drugs. It's also a fact on elevators, offices and traffic lights. An article by Greg Ross says: 'In most elevators installed since the early 1990s, the 'close door' button has no effect. Otis Elevator engineers confirmed the fact to the Wall Street Journal in 2003. Similarly, many office thermostats are dummies, designed to give workers the illusion of control. "You just get tired of dealing with them and you screw in a cheap thermostat," said Illinois HVAC specialist Richard Dawson. "Guess what? They quit calling you." In 2004 the New York Times reported that more than 2,500 of the 3,250 "walk" buttons in New York intersections do nothing. "The city deactivated most of the pedestrian buttons long ago with the emergence of computer-controlled traffic signals, even as an unwitting public continued to push on.

Read more: Slashdot

Posted via email from .NET Info

Forget 200 lines, Red Hat speeds up Linux with 4 lines of code

|
Speeding up Linux, doesn't necessarily have to be a gargantuan task and it doesn't have to be done by Linus Torvalds either.

On Monday, Torvalds praised a new 200 line Linux kernel patch that was going to make Linux faster for all. Inside of the same week, a new userspace patch has emerged that can likely do the same thing, but with less code and even better performance.
"I really wonder why logic like this should live in kernel space at all,since a) the kernel has no real notion of a session, except audit and b) this is policy and as soon as people have this kind of group then they probably want other kind of autogrouping as well for the other controllers, which hence means userspace is a better, and configurable place for this."Red Hat developer Lennart Poettering wrote in a Linux Kernel Mailing list posting.
Torvalds (always the diplomat) responded:
Numbers talk, bullshit walks. The numbers have been quoted. The clear interactive behavior has been seen. And you're just full of bullshit. Come back when you have something working and with numbers and better interactive performance. Until then, nobody cares.

To his credit Poettering did come back with a response to prove Torvalds wrong. Poettering provided a non kernelspace patch that speeds up Linux systems. The patch involved a simple edit of a users ~/.bashrc file with four new lines of code.

 if [ "$PS1" ] ; then  
         mkdir -m 0700 /sys/fs/cgroup/cpu/user/$$
         echo $$ > /sys/fs/cgroup/cpu/user/$$/tasks
 fi
Then, as the superuser do this:

 mount -t cgroup cgroup /sys/fs/cgroup/cpu -o cpu
 mkdir -m 0777 /sys/fs/cgroup/cpu/user

"Done. Same effect. However: not crazy," Poettering wrote.
That's not however the end of the story. As Torvalds (never one to give up a good fight) has shot back again at Poettering. In Torvalds view, the difference between the Red Hat engineer's userspace 4 line patch and the 200 line patch in the Linux kernel, is a question of automation.


Read more: InternetNews.com

Posted via email from .NET Info

Create jQuery Loading Animation to make your website Attractive

|
A loading animation is important to signal the user that the application is still doing something and the user should wait for an action to complete. This gets even more important when you use Ajax in your webapp.
Using the Ajax library jQuery it is very easy to create a loading animation that will be shown whenever an Ajax request is running.
First of all, you need an animated gif with a loading animation. You can pick a free gif and customize it at ajaxload.info
Include a div containing the image in every page of your webapp. Typically, you will add this div to a layout file or header that you include in every page.

<div id="loader" class="loader" style="display:none;">
<img id="img-loader" src="loader.gif" alt="Loading"/>
</div>

The attribute style=”display:none;” makes the div invisible when the page is loaded.
You can style the div whatever you like using the class “loader”. I decided that I wanted the div to be centered in the middle of the screen on top of the rest of the page.

.loader {
   position: fixed;
   top: 50%;
   left: 50%;
   margin-left: -50px; /* half width of the loader gif */
   margin-top: -50px; /* half height of the loader gif */
   text-align:center;
   z-index:9999;
            overflow: auto;
   width: 100px; /* width of the loader gif */
   height: 102px; /*hight of the loader gif +2px to fix IE8 issue */
}

To show the loader automatically when an Ajax request is running, add the following jQuery javascript code to every page by including it to a layout file or header.


Read more: DesignDim

Posted via email from .NET Info

Attachmate To Acquire Novell For $2.2B Cash

|
Novell has agreed to be acquired by Attachmate Corporation for $6.10 per share in cash, in a transaction valued at approximately $2.2 billion. The Boston Globe reports that the deal also includes the sale of some intellectual assets to a consortium organized by Microsoft. Attachmate plans to operate Novell and SUSE as separate business units. Here is the press release.

Read more: Slashdot
Read more: Attachmate
Read more: "Novell is the owner of the UNIX and UnixWare copyrights"

Posted via email from .NET Info

How to Quickly Create New Google Documents with a Shortcut or Hotkey

|
If you’ve switched over from Microsoft Office to Google Docs, you’ve probably noticed there’s just one problem: creating a new document takes far too many steps. Here’s how to create new documents with single click—or even a shortcut key.

Note: you can use these shortcuts to create Documents, Spreadsheets, and Presentations, but we’ve not yet figured out how to make a shortcut for a new Drawing. If you figure that out, please let us know.

Create a Windows Shortcut

Start by clicking anywhere on the desktop, and choosing New -> Shortcut from the context menu.

Now you’ll want to paste in the full URL for creating a new document in Google Docs, Spreadsheets, or Presentations into the Location box, and then give it an appropriate name. If you’re using standard Google Docs, you’ll be using one of the following URLs:

http://docs.google.com/?action=newdoc
http://spreadsheets.google.com/ccc?new
http://docs.google.com/?action=new_presentation
If you’re using Google Apps, you’ll want to use one of these URLs, replacing YOURDOMAIN with the actual name of your domain—you’ll probably notice that these URLs have HTTPS, which you can choose to use, or not.

https://docs.google.com/a/YOURDOMAIN.com/?action=newdoc
https://spreadsheets.google.com/a/YOURDOMAIN.com/ccc?new
https://docs.google.com/a/YOURDOMAIN.com/?action=new_presentation
Make sure that you’ve created the shortcuts that you want, and named them correctly, so we can add some nice icons.

Assign an Appropriate Icon and a Hotkey

To change the shortcut, just right-click on it and use Properties from the context menu, then flip over to the Web Document tab if you’re not already there. From here, you can customize the shortcut key to something that you’d like, and assign a different icon.

Read more: How-to-geek

Posted via email from .NET Info

lxc Linux Containers

|
The  container  technology  is actively being pushed into the mainstream linux kernel. It provides the resource management through the control groups aka process containers and resource isolation through the namespaces.

The linux containers, lxc, aims to use these new functionalities to provide an userspace  container  object  which  provides  full resource isolation and resource control for an application or a system.

The  first  objective  of this project is to make the life easier for the kernel developers involved in the containers project and especially to continue working on the Checkpoint/Restart new features. The lxc is small enough to easily manage a  container  with simple command lines and complete enough to be used for other purposes.

Read more: lxc Linux Containers

Posted via email from .NET Info

Lamebook

|
h1-new.png

Funny Facebook Statuses, Fails, LOLs and More

Read more: Lamebook

Posted via email from .NET Info

Beta Version of Nevercookie Released

|
Anonymizer has released a beta version of Nevercookie, the recently announced Firefox plugin designed to protect against the Evercookie, a JavaScript API built and made available to prove that the more you store and the more places you store it, the harder it is for users to control a Web site's ability to uniquely identify their computer. Evercookie is a more persistent form of cookie that enables the storage of cookie data in a number of different locations, such as Flash cookies and various locations of HTML5 storage. This allows websites to track user behavior even when users have enabled private browsing. Because an Evercookie stores data in locations outside of where standard cookies are stored, an Evercookie can rebuild itself unless users go through a number of steps to completely clear and reset their local storage

Read more: Slashdot

Posted via email from .NET Info

Privoxy

|
Privoxy is a non-caching web proxy with advanced filtering capabilities for enhancing privacy, modifying web page data and HTTP headers, controlling access, and removing ads and other obnoxious Internet junk. Privoxy has a flexible configuration and can be customized to suit individual needs and tastes. It has application for both stand-alone systems and multi-user networks.

Privoxy is Free Software and licensed under the GNU GPLv2.

Privoxy is an associated project of Software in the Public Interest (SPI).

Read more: Privoxy

Posted via email from .NET Info

Direct3D 10/11 Is Now Natively Implemented On Linux!

|
It's a pity Luca Barbieri or any Mesa / Gallium3D developers are not at Oktoberfest as they are deserving of more than a few Maß of Augustiner. In fact, today a new Gallium3D state tracker was pushed into Mesa and it's perhaps the most interesting state tracker for this open-source graphics driver architecture yet. It's a state tracker that exposes Microsoft's DirectX 10/11 API on Linux! And it's already working and can be hooked into Wine!

Read more: Phoronix

Posted via email from .NET Info

12 Ubuntu Derivatives You Should Consider

|
It's no secret that Ubuntu 10.10, or Maverick Meerkat, is one of the most user-friendly Linux distributions of all time for business and home users.

What many people don't realize, however, is that there are several other Linux distributions out there that are also based on Ubuntu and offer many of the same advantages. Some are focused on a specific niche; others are simply variations on the same general theme.

If you're already a fan of Ubuntu or simply want to experience what the excitement is all about, consider the following alternatives for what just may be an even more perfect match with your business's needs.

For Linux Beginners: Linux Mint and Pinguy OS
Similar to Windows: Zorin OS
Lightweight Versions: Lubuntu, Xubuntu and CrunchBang
For Cloud-Based Netbooks: Jolicloud
A Multimedia Focus: Ubuntu Studio and Mythbuntu

Read more:  Network world

Posted via email from .NET Info

.Net Memory. Problem with uncontrolled LOH size & possible solution

|
Introduction

Managed memory in .Net is separated on “Stack” memory and some kind of “heaps”.  The most important types of “heaps” is SOH (Small Object Heap) and LOH(Large Object Heap). From the names of memory types becomes clear that SOH - stores only small objects & LOH stores large objects. In this article I will consider only possible problem with LOH memory. Other memory types are out of scope of this article.

LOH

How the CLR decides which objects must be stored in LOH and with objects must be stored in SOH? Unfortunately I didn’t  find an exact answer on this question, but my own experiments and investigation shows that object is created in LOH when object size is more than 80000 bytes. Possibly Microsoft decided to use this size of memory, because the tests show balance between performance and memory usage, but it’s question to guys from Microsoft. Size of memory you can get programmatically or you can use some tools for this, “Process Explorer” for example.  


Some LOH features and problems associated with these features

Objects in LOH cannot be moved, it means that memory becomes fragmented and calls to memory become slower.
LOH memory only increases and never decreases, even if GC finished collect garbage. It means that in some wonderful moment you can get “OutOfMemoryException”. This problem is particularly actual in x86 machines where memory is limited only with 3 GB for each process.
Such problems can occur only if you use large collections of structures. It’s not a good practice to create a lot of structures, but what can we do if we already have large arrays with million records and all these records is value type? For the beginning we can try to replace all keywords from ‘struct’ to ‘class’ in our solution, for most types of applications it can solve problem, but we will get another one:  a lot of NullReferenceExcceptions will haunt us throughout our solution. My solution for this problem is simple: we can use  paged array(array of arrays) instead of simple, one dimensional  array.

LargeList implementation

Read more: Codeproject

Posted via email from .NET Info

CUDA-Multiforcer – GPU Powered High Performance Multihash Brute Forcer

|
The Cryptohaze Multiforcer is a high performance multihash brute forcer with support for per-position character sets, and very good performance scaling when dealing with large hash lists. As an example, on a list of 10 hashes, the Cryptohaze Multiforcer achieves 390M steps per second on a GTX260/216SP@1.24ghz card. On a list of 1.4 million hashes with the same card, performance drops to 380M steps per second. This is the password stepping rate – not the search rate. The search rate is 380M * 1.4M passwords per second!

Platforms

The Cryptohaze Multiforcer supports Windows, Linux, and Mac OS X. An nVidia GPU with CUDA support (8000 series, 9000 series, GTX200 series, GTX400 series) is required for this to function. Additionally, a reasonably modern driver with CUDA support will be required. However, to see good rates, a fairly powerful GPU is required. GTX200 series cards are the lowest recommended cards.


Read more: darknet.org.uk

Posted via email from .NET Info

HowTo: MSDeploy & MSBuild

|
Big Picture from MSDeploy

We start with the big picture of MSDeploy. The aim is to build a Deployment Package to make the delivery of software easier. Therefore we have several providers which are used to, for example, pack the data bank or the main ASP.NET Files into one package. Now you are able to publish this package quit easy with MSDeploy. MSDeploy should be installed on the Server too.

At this point I recommend you the blogs of ScottGu and Vishal Joshi (feels like he is THE developer behind MSDeploy).

One of the main advantages of MSDeploy: it’s very easy to bring in new updates. For example you can use the developer-machine of Visual Studio or a Buildserver with a Buildscript.

Posted via email from .NET Info

Consequences of using variables declared __declspec(thread)

|
As a prerequisite, I am going to assume that you understand how TLS works, and in particular how __declspec(thread) variables work. There's a quite thorough treatise on the subject by Ken Johnson (better known as Skywing), who comments quite frequently on this site. The series starts here and continues for a total of 8 installments, ending here. That last page also has a table of contents so you can skip over the parts you already know to get to the parts you don't know.

Now that you've read Ken's articles...

No, wait I know you didn't read them and you're just skimming past it in the hopes that you will be able to fake your way through the rest of this article without having read the prerequisites. Well, okay, but don't be surprised when I get frustrated if you ask a question that is answered in the prerequisites.

Anyway, as you learned from Part 5 of Ken's series, the __declspec(thread) model, as originally envisioned, assumed that all DLLs which use the feature would be present at process startup, so that all the _tls_index values can be computed and the total sizes of each module's TLS data can be calculated before any threads get created. (Well, okay, the initial thread already got created, but that's okay; we'll set up that thread's TLS before we execute any application code.)

If you loaded a __declspec(thread)-dependent module dynamically, bad things happened. For one, TLS data was not set up for any pre-existing threads, since those threads were initialized before your module got loaded. Windows doesn't have a time machine where it can go back in time to when those threads were initialized and pre-reserve space for the TLS variables your new module needed. Nope, your module is just out of luck with respect to those pre-existing threads, and if it tries to use __declspec(thread) variables, it'll find that its TLS slot never got initialized, and there's no data there to access.


Read more: The old new thing

Posted via email from .NET Info

Agile versus Waterfall Videos

|
The Rise and Fall of Waterfall is a cute video (although with a somewhat annoying soundtrack.. watch with the sound off).

Youtube

My favorite part of it is the screenshot (seen above) showing the waterfall stages and their respective impacts.  The poor Operations folks at the bottom remind me of Ken Johnston’s quote:

Ops beware; unpleasant matter tends to roll downhill and you are near the bottom

For those wondering what the alternative to Waterfall is, here is Scrum in 10 minutes
And if 10 minutes is too long, then try 13 seconds:
And for those looking for the Next Big thing, Kanban is the new “Scrum”


Read more: Your Software Has Bugs

Posted via email from .NET Info

Thread Local Storage

|
Windows, like practically any other mainstream multithreading operating system, provides a mechanism to allow programmers to efficiently store state on a per-thread basis. This capability is typically known as Thread Local Storage, and it’s quite handy in a number of circumstances where global variables might need to be instanced on a per-thread basis.

Although the usage of TLS on Windows is fairly well documented, the implementation details of it are not so much (though there are a smattering of pieces of third party documentation floating out there).

Conceptually, TLS is in principal not all that complicated (famous last words), at least from a high level. The general design is that all TLS accesses go through either a pointer or array that is present on the TEB, which is a system-defined data structure that is already instanced per thread.

The “per-thread” resolution of the TEB is fairly well documented, but for the benefit of those that are unaware, the general idea is that one of the segment registers (fs on x86, gs on x64) is repurposed by the OS to point to the base address of the TEB for the current thread. This allows, say, an access to fs:[0x0] (or gs:[0x0] on x64) to always access the TEB allocated for the current thread, regardless of other threads in the address space. The TEB does really exist in the flat address space of the process (and indeed there is a field in the TEB that contains the flat virtual address of it), but the segmentation mechanism is simply used to provide a convenient way to access the TEB quickly without having to search through a list of thread IDs and TEB pointers (or other relatively slow mechanisms).

On non-x86 and non-x64 architectures, the underlying mechanism by which the TEB is accessed varies, but the general theme is that there is a register of some sort which is always set to the base address of the current thread’s TEB for easy access.

The TEB itself is probably one of the best-documented undocumented Windows structures, primarily because there is type information included for the debugger’s benefit in all recent ntdll and ntoskrnl.exe builds. With this information and a little disassembly work, it is not that hard to understand the implementation behind TLS.


Read more: Nynaeve Overview, Thread Local Storage, part 2: Explicit TLS,  Thread Local Storage, part 3: Compiler and linker support for implicit TLSThread Local Storage, part 4: Accessing __declspec(thread) dataThread Local Storage, part 5: Loader support for __declspec(thread) variables (process initialization time)

Posted via email from .NET Info

WAITFOR what ?

|
I raised a feedback to sqldocfb@microsoft.com regarding the documentation for the WAITFOR statement in BOL. It has been the same ever since SQL 2000 and I think it is wrong

WAITFOR
{
   DELAY 'time_to_pass'
 | TIME 'time_to_execute'
 | [ ( receive_statement ) | ( get_conversation_group_statement ) ]  
   [ , TIMEOUT timeout ]
}

But if it was consistent with other items in BOL such as RAISERROR it would be documented as

WAITFOR
{
   DELAY { time_to_pass | @local_variable }
 | TIME { time_to_execute | @local_variable }
 | [ ( receive_statement ) | ( get_conversation_group_statement ) ]  
   [ , TIMEOUT timeout ]
}

Because of this, I’m not sure how many people know about the ability to use variables when doing a WAITFOR statement so here are a couple of examples:

DECLARE @datetime datetime ;

SET @datetime = '00:00:10.000' ;

WAITFOR DELAY @datetime ;
GO

or

DECLARE @datetime datetime ;

SET @datetime = DATEADD(ss,10,GETDATE()) ;

WAITFOR TIME @datetime ;
GO

BOL talks about being able to specify an acceptable formats for a datetime datatype, then excludes having a specifying a date, which does make things clear. But this may also lead you to believe that only the datetime datatype can be used as a the local variable, when this isn't the case and the following will also works:

DECLARE @chartime char(12) ;

SET @chartime = '00:00:10.000' ;

WAITFOR DELAY @chartime ;
GO


Read more: Martin Bell UK SQL Server MVP

Posted via email from .NET Info

XQuery for the Non-Expert

|
It’s time for a new series to blog posts – XQuery for the Non-Expert.  The purpose for these posts will be to provide a foundation for using XQuery against XML.

Myself, I am not an XQuery expert.  These posts are summarizing what I know and understand.  Some of this knowledge and understanding is changing on a regular basis.  Please correct me if something incorrect is posted here.

To prepare for these new posts, we need a starting point.  The starting point is going to be a vocabulary lesson.  This way as I discuss different functions and aspects of XQuery we know what things mean.


Read more: Strate SQL

Posted via email from .NET Info

Part 1 of 4 : Tips/Tricks for Silverlight Developers.

|
I wanted to create a series of blog post that gets right to the point and is aimed specifically at Silverlight Developers. The most important things I want this series to answer is :

What is it?
Why do I care?
How do I do it?
I hope that you enjoy this series. Let’s get started:

Tip/Trick #1)

What is it? You can easily enable a visual Framerate counter inside your Silverlight Application. The end result looks like the image below:

Why do I care? This should be used for profiling/performance testing of your Silverlight Application before you move it into production status.

How do I do it: Simply add the following two lines inside your div tags:

<param name="enableFramerateCounter" value="True" />
<param name="enableGPUAcceleration" value="True" />

Tip/Trick #2)

What is it? You can clear isolated storage on your Silverlight application from the browser instead of through code. A surprising amount of people are not aware of this.

Why do I care? It’s easy to access and do without writing any code. It also can be easily accomplished by an end user.

How do I do it: Simply right-click your Silverlight Application and select Silverlight then click on the Application Storage tab. At the bottom of the tab, you can either delete an individual sites isolated storage or all sites.

Tip/Trick #3)

What is it? Inserting a line break inside of a TextBlock/TextBox.

Why do I care? You will need to insert a linebreak into a TextBlock or Textbox at some point...

How do I do it: You can do it inside of XAML or in code behind by reviewing the samples below:

Here is an example using XAML:

<TextBlock FontSize="24" Height="71" HorizontalAlignment="Left" Margin="12,12,0,0" Name="textBlock1" VerticalAlignment="Top" Width="229" >
   Hello, my name is <LineBreak/> Michael
</TextBlock>


Read more: Michael Crump

Posted via email from .NET Info