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

VirtualBox 4.0 is released ! New PPA for Ubuntu and Debian

| Thursday, December 23, 2010
Again another release from Oracle before the end of the year, this time is VirtualBox 4.0 who has been released . This new version features an improved user interface, as well as added virtual hardware support, including for chip-sets supporting PCI Express and others. Other changes include increased capacity and throughput using a new asynchronous I/O model for networked (iSCSI) and local storage, and improved standards support with support for the Open Virtualisation Format (OVF), support more than 1.5/2 GB guest RAM on 32-bit hosts, Resource control: added support for limiting a VM’s CPU time and IO bandwidth and more.

Read more: Unixmen

Posted via email from .NET Info

23 important .net interview questions on Localization/Globalization

|
This section will cover the most asked questions related to Localization/Globalization during .net interview by the interviewer so have a look on the following and do revise it when ever you go for the .net interview
Normally the .net interviewer starts with.....

What is Unicode & Why was it introduced?

Does .NET support UNICODE and How do you know it supports?

What is the difference between localization and globalization?

What architecture decisions you should consider while planning for international software’s?

How do we get the current culture of the environment in windows and ASP.NET?

Which are the important namespaces during localization and globalization?

What are resource files and How do we generate resource files?

Can resource file be in any other format other than resx extensions?

How is resource files actually used in project?

How can we use Culture Auto in project?

What are satellite assemblies?

How do we generate Satellite assemblies?

What is AL.EXE and RESGEN.EXE?

Read more: QuestPond

Posted via email from .NET Info

Using Google App Engine as Proxy for Silverlight and Flash Cross-Domain Requests

|
When using Silverlight or Flash to fetch data from other domains one often runs into cross-domain access restrictions. For security reasons in order to access data from different domains, the remote server explicitly has to allow this by defining a crossdomain.xml (or, for Silverlight, clientaccesspolicy.xml is good as well). If this file cannot be found on the remote domain, the request is not executed.

This can be fustrating when querying against RSS feeds or JSON/XML web APIs that don’t define any of these files. The workaround for this issue is to use some sort of proxying service. In this article I’ll be showing how to use Google App Engine to create a simple proxy that will forward these requests for free – within a reasonable daily load.

Google App Engine Overview
The reason I’ve chose to implement the proxy using Google App Engine is because it has a free daily quota and getting started using it is really simple: all you need is a Google account and to download and install the Google App Engine SDK.

Google App Engine supports developing in both Java and Python. In my example I’ll be using Python. In order to use and deploy the code yourself as well, follow these steps:

Read more: Greg Does IT

Posted via email from .NET Info

Android Phones Get Virtualization

|
VMware is teaming with LG to sell Android smartphones that are virtualized, allowing a single phone to run two operating systems, one for business use and one for personal use. A user's personal email and applications would run natively on the Android phone, while a guest operating system contains the employee's work environment. The devices would also have two phone numbers

Read more: Slashdot

Posted via email from .NET Info

Man Sues Rockstar Saying GTA:SA Is Based On His Life

|
978-1-thumblg.png

From the article: 'Rockstar Games are no strangers to legal action, but it doesn't come stranger than this. An American model, Michael Washington (known as "Shagg") is suing the publisher — as well as parent company Take Two Interactive — because they based Grand Theft Auto: San Andreas on his life.'"

It's a good thing Washington never learned the infinite ammo cheat.

Read more: Slashdot

Posted via email from .NET Info

HTG Explains: Which Linux File System Should You Choose?

|
File systems are one of the layers beneath your operating system that you don’t think about—unless you’re faced with the plethora of options in Linux. Here’s how to make an educated decision on which file system to use.

The landscape of the Linux file system support is drastically different from Windows and OS X. In Windows and OS X you can find software that will add support for non-standard file systems, but both operating systems can only be installed on their native file system and third party support is added after the fact.

Linux on the other hand has a vast array of supported file systems built into the kernel. But how are you supposed to know which file system to pick when installing? We will take a look at some of the most popular choices available and give you use cases to consider—the choice is ultimately up to you based on your needs.

What is Journaling?
Before we go to far down the rabbit hole talking about options, we need to first take a quick look at journaling. The only real thing you need to know about journaling is that every modern file system uses journaling in some form or another and on any desktop or laptop you are setting up with Linux you will want to use a journaling file system.

Read more: How-to-geek

Posted via email from .NET Info

The Complete List of iPad Tips, Tricks, and Tutorials

|
The Apple iPad is an amazing tablet, and to help you get the most out of it, we’ve put together a comprehensive list of every tip, trick, and tutorial for you. Read on for more.

Note: This article was originally published earlier this year, but we’ve updated it with a real lot more content since then, so we’re republishing it for you. We’ll be keeping this page updated as we find more great articles, so you should bookmark this page for future reference.

How to Maximize Your iPad’s Battery Life
How to Lock the Screen on Your iPad with iOS 4.x
How to Pause an iPad App Install
How to Force Reboot and Quit Apps
Stream Video from Your Desktop to Your iPad

Read more: How-to-geek

Posted via email from .NET Info

GoldenEye Source Conversion Mod Released

|
silo17.jpg  playtestv41.jpg

GoldenEye: Source is a total conversion modification of Half-Life 2. It is a fan made artistic recreation, released for free, with only one goal in mind;  to bring the memories and experiences from the original GoldenEye64 back to life using Source Technology. We want you to look at this mod and remember the first best multiplayer first-person shooter ever made. We are doing our best to bring in the opinions of the community to create a game that everyone is going to enjoy. But, we are not here to recreate the game exactly how it was in GE64, a lot of things have changed since they first designed that game, mainly in technology and gamers experiences. We are here to take the game even further but at the same time provide a lot of those fun elements that hardcore GE64 fans will enjoy. We've got experienced team members all across the board, from professional level, to amateurs looking to make it into the business working hard to make this dream a reality.

We focus on a daily basis to keep the original feel for the game that we all know and love. Adding new and fun game play features is our secondary mission, along with new maps and weapons that will keep the game feeling new. We do this by getting together with all of our development team, and asking ourselves "What are the things we always wanted to see and do?". This question has come up alot, and we think we are creating and implementing interesting ideas into the mod for fans and gamers to enjoy!

Read more: moddb

Posted via email from .NET Info

Oracle Releases MySQL 5.5

|
Two years after Sun released MySQL 5.1, Oracle has picked up the ball with the official release of MySQL 5.5. New features include semi-synchronous replication, InnoDB by default and new SIGNAL/RESIGNAL support for exception handling. Above all, Oracle stressed that they are committed to further MySQL open source development and that they see it as a complementary technology to their proprietary Oracle database.

Read more: Slashdot

Posted via email from .NET Info

Debian 6.0 To Feature a Completely Free Kernel

|
The Debian Project has announced that the upcoming release — Debian 6.0 'Squeeze' — will have a completely free Linux kernel. This means that the Linux kernel which ships with Debian 6.0 will not have any non-free firmware. The Debian Project has been working on removing the non-free parts since the last two releases. With Squeeze, they are finally realizing that goal

Read more: Slashdot

Posted via email from .NET Info

Nexus S has been rooted, let the madness commence!

|
Our good friends at xda-developers haven't kept us waiting long. Root access on the Nexus S has been achieved on the phone's day of release, and full instructions for replicating it are available at the link below. The Nexus S is the proud and so far only carrier of Google's latest and greatest Android software, so you're basically getting unrestricted access to the very best Mountain View can offer. Hit that source link. Do it.

Read more: engadget

Posted via email from .NET Info

Google Rolls Out Shared Spaces Using Wave Technology

|
Google Labs has quietly debuted Shared Spaces, using Google Wave technology to let users quickly create a space with collaborative gadgets and a chat box inside.

As soon as it’s open to the general public, it will be simple and quick to create a space, grab a gadget from the gallery of 50 that already exist, and then paste the Space’s URL into a chat window, e-mail message, tweet or any other content-sharing platform.

If users know JavaScript, they can create their own gadgets and then rapidly build a Space around it, inviting all to participate.

Read more: Mashable

Posted via email from .NET Info

Swiss Bank Has 43-Page Dress Code

|
The HR of Swiss bank UBS AG came up with an innovative 43-page document (French) to establish fashion 'dos' and 'don'ts' in their retail branches. Among the rules are such things as: 'neither sex should allow their underwear to appear,' perhaps Dilbert was a bit ahead of them on that. The document also mentions smells and 'avoid garlic and onion-based dishes

Read more: Slashdot

Posted via email from .NET Info

Virtual Styling Community Polyvore Debuts Analytics Tool For Fashion Designers

|
tb.jpg

Polyvore, the startup lets web shoppers pull their favorite items any online store and mix and match to create personalized outfits online, is debuting a new analytics tool. Style Analytics provides retailers with metrics about their brand’s perception on the site.

The Style Analytics tool will rank brands on Polyvore based on engagement level with their clothing and accessories. The tool aims to be a resource for fashion companies to learn how Polyvore’s community are interacting with a brand. For example, Polyvore will let designers know how many “sets” are created with their clothes, what products are used the most in Polyvore sets and how the brand ranks compared to other designers on the site.

Read more: TechCrunch

Posted via email from .NET Info

MonoDevelop plugin for F# now available

|
The recent open code drop of the F# compiler and library source has led to quite a lot of activity. One of the things has been the emergence of a MonoDevelop plugin for F#,

MonoDevelop is a cross-platform and open-source Integrated Development Environment. ...This web page describes an open-source project that implements MonoDevelop support for the F# language. The project is built on top of the F# compiler services. Currently, the aim is to provide consistent "user experience" for various platforms when creating small and medium F# projects (for example, when teaching F#).

The source for the project is currently hosted on GitHub.

More information about the plugin is available here: http://functional-variations.net/monodevelop/
And two screencasts (one about F# command line tools and another about F# MonoDevelop) are here: http://functional-variations.net/screencasts/

Read more: Don Syme's WebLog on F# and Related Topics

Posted via email from .NET Info

Replace sp_msforeachtable With the CLR C#

|
In a previous post I create a CLR stored procedure in VB.NET to replace the undocumented system stored procedure sp_msforeachtable.  As promised here is the C# code.  I am still working on reacquainting myself with C based syntax so please feel free to point out any errors or performance issues.

using System; using System.Data; using System.Data.SqlClient; using System.Data.SqlTypes; using Microsoft.SqlServer.Server; public partial class StoredProcedures
{
   [Microsoft.SqlServer.Server.SqlProcedure]
   public static void clr_foreach_table(SqlString command, SqlString type)
   { //Create the output that will be used to return erros that are caught in the upcoming code
     SqlPipe  output  = SqlContext.Pipe;
      try
         {
             SqlConnection conn = new SqlConnection("context connection=true");
             SqlCommand cmd = conn.CreateCommand(); //Create a string that will hold the query with the replaced question mark holding the table and/or view
  //Dim foreach As String = Nothing
   switch (type.ToString().ToUpper())
   {
  case "*":
      cmd.CommandText = "SET NOCOUNT ON SELECT TABLE_SCHEMA + '.' + TABLE_NAME FROM INFORMATION_SCHEMA.TABLES";
      break;
  case "T":
      cmd.CommandText = "SET NOCOUNT ON SELECT TABLE_SCHEMA + '.' + TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'";
      break;
  case "V":
      cmd.CommandText = "SET NOCOUNT ON SELECT TABLE_SCHEMA + '.' + TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'VIEW'";
      break;
   }
   conn.Open();
   SqlDataAdapter da = new SqlDataAdapter(cmd);
   DataTable dt = new DataTable();
             da.Fill(dt);
             da.Dispose();
             conn.Close();
             conn.Dispose();
             int counter = dt.Rows.Count-1;
            while (counter >= 0)
            { //A new context connection is created as the previous has been used with a different command and then disposed
  SqlConnection cn = new SqlConnection("context connection=true");
  try
   { //Replace the question mark with the table/view name and assign the new query to the foreach variable
//foreach = command.ToString.Replace("?", dt.Rows(counter)(0).ToString)
//Create a sql command that is passed the foreach string and the new connection
       SqlCommand sp_command = new SqlCommand(command.ToString().Replace("?", dt.Rows[counter][0].ToString()), cn);
      cn.Open();
      SqlContext.Pipe.ExecuteAndSend(sp_command);
      cn.Close();
  }
   catch (Exception ex)
   {
      //Catch any error(s) and then use the output to pipe this to the messages of SSMS specifying that it is
      //in the inner Try block and also pass the query being executed back to troubleshoot
       output.Send("Inner Try " + ex.Message.ToString() + command.ToString().Replace("?", dt.Rows[counter][0].ToString()));
  }
   finally
   {
      cn.Close();
      counter -= 1;
  }


Read more: SQLServer pedia

Posted via email from .NET Info

Debug .NET and Flex in Visual Studio

|
One of the unique features of Amethyst is its multi-process ’Cylon’ Debugger. This not only lets you debug multiple SWFs simultaneously, it also lets you debug mixed platform (.NET/Flex) and mixed-language (e.g. C# or VB and ActionScript) applications in a single debugging session. This video shows how...

Read more: Sapphire steel

Posted via email from .NET Info

Beginner Bash: Must-Know Bash Commands

|
I switched full time to Ubuntu Linux last year and haven’t looked back. In this year I’ve learned to love the Bash shell (which includes the Terminal in Mac and Cygwin on Windows). At this point, I can finally say I’m faster in Bash then I was in Windows Explorer, Commander, Nautilus, or the Windows command prompt; and I prided myself on being a guy with a lot of .bat files. My goal now is to write some tips I learned in the last year. Before explaining the more advanced stuff I want to introduce some of the most basic basics.

So here it is: "Stuff I wish someone had explained clearly to me a year ago". Almost all these apply to Cygwin in Windows as well as Mac/Ubuntu Terminal.

1. More than just ls – "ls" lists files. But you’ll be faster if you learn the options and parameters.

ls -l
Lists files in long format, sort of like the default on Windows. Some systems have the "ll" command mapped to this by default. If "ll" does not work for you then open up your .bash_profile file and copy this into the last line: alias ll="ls -l". That’ll map ll for you.

ls -CF –color
Adds color to your directory listing. Executables, directories, and files are all listed in different colors. Yes, this is way to hard to type and remember every time. So make an alias which forces ls to be colorized. Again, open .bash_profile and stick this in there: alias ls="ls -CF –color". Now all usages of ls get colored.

ls -a
By default, ls ignores file starting with a dot (.). The -a option lists these files.

2. More than just find

find . -name
ls does not search subdirectories by default, which the "dir" Windows command did. It takes a while to get used to is, but " find . -name "*file*" " is the same as " dir /s *file* ". It searches all directories for a given file. The period (.) must be escaped to "\.". So to search for MyClass.java do "find . -name MyClass\.java ". Yeah, the quotes are a hassle.

find -exec
You can execute a command for each result in the find result set, just use the -exec option along with some crazy notation. For instance, to open all matching files in gedit: " find . -name "*sh" -exec gedit {} \; " Again, kinda crazy syntax.

Pipe and XARGS
It’s a basic recipe to know. Here’s how to search all the files in your current directory for the word "mystring": find . | XARGS grep mystring . That’s all the grep I’ve ever needed.


Read more: canoo

Posted via email from .NET Info

MySQL Transaction Gotchas & Good Parts

|
In my previous post, “MySQL Transactions & Why You Can’t Emulate Them in PHP” we discussed why transactions are useful and how a few simple SQL commands can make your application more robust. But few things are that easy in the life of a web developer…

Statements you can’t ROLLBACK
Unfortunately, ROLLBACK isn’t a global undo for every database action. If you make a fundamental change to the schema, any existing transactions will be COMMIT-ed and the alteration will run within it’s own single transaction. The statements to watch out for are:

  • CREATE DATABASE
  • ALTER DATABASE
  • DROP DATABASE
  • CREATE TABLE
  • ALTER TABLE
  • DROP TABLE
  • RENAME TABLE
  • TRUNCATE TABLE
  • CREATE INDEX
  • DROP INDEX
  • CREATE EVENT
  • DROP EVENT
  • CREATE FUNCTION
  • DROP FUNCTION
  • CREATE PROCEDURE
  • DROP PROCEDURE

Read more: sitepoint

Posted via email from .NET Info

A Simplified Grid Markup for Silverlight and WPF

|
The WPF / Silverlight syntax is long and cumbersome. This blog post describe a simple attached property that allows you to specify row and column widths / heights as a simple comma separated list, e.g. RowDefinitions=”Auto,,3*,,,,2*”

The Grid is probably one of the most useful and versatile layouts that Silverlight and WPF offers. However, if you hand craft your XAML, as I do, you will probably start to find the Grid markup for defining rows and columns to be verbose and cumbersome. If we look at the following example, which uses a mixture of Auto, Star and Pixel widths / heights:

<Grid>
 <Grid.RowDefinitions>
   <RowDefinition Height="Auto"/>
   <RowDefinition/>
   <RowDefinition/>
   <RowDefinition/>
   <RowDefinition/>
   <RowDefinition/>
   <RowDefinition Height="2*"/>
 </Grid.RowDefinitions>
 <Grid.ColumnDefinitions>
   <ColumnDefinition Width="100"/>
   <ColumnDefinition/>
 </Grid.ColumnDefinitions>

 <TextBlock Text="User Details" FontSize="20"
         HorizontalAlignment="Center"
         Grid.ColumnSpan="2"/>

 <TextBlock Text="Forename:"
             Grid.Row="1"/>
 <TextBox Text="Jeremy"
           Grid.Column="1" Grid.Row="1"/>

 <TextBlock Text="Surname:"
             Grid.Row="2"/>
 <TextBox Text="James"
           Grid.Column="1" Grid.Row="2"/>

 <TextBlock Text="Age:"
             Grid.Row="3"/>

Read more: Scott Logic

Posted via email from .NET Info

Getting the File System Image and Deleted Data Recovery

|
Contents
  • Description of the FAT File System Format 
  • Reserved Area 
  • FAT Area 
  • Data Area 
  • Example of Recovering of Real Data 
  • Example

Description of the FAT File System Format

As the majority of modern flash drives are formatted in FAT file system, let’s examine the structure of this file system. This file system consists of 3 main areas: reserved area, table (FAT area), and data area. The reserved area stores the description of the file system structure. The FAT area contains the state of all clusters of the file system. The cluster can be free, used, or marked as damaged (bad). The data area contains the contents of files. So, if it is written “abc” in the text file, this value will be located in the data area.

Read more: Codeproject

Posted via email from .NET Info

The __fortran calling convention isn't the calling convention used by FORTRAN

|
Although the Microsoft C compiler supports a calling convention called __fortran, that's just what the calling convention is called; its relationship with the FORTRAN programming language is only coincidental. The __fortran keyword is now just an old-fashioned synonym for __stdcall.

Various FORTRAN compilers use different calling conventions; the one I describe here applies to the now-defunct Microsoft Fortran PowerStation.

Fortran Powerstation pushes parameters on the stack right-to-left, with callee-cleanup. (So far, this matches __fortran aka __stdcall.) Function names are converted to all-uppercase, with an underscore at the beginning and @n appended, where n is the number of bytes of parameters. (This still matches __stdcall aside from the uppercase conversion.)

As for how the parameters are passed, well, that's where things get weird. FORTRAN natively passes all parameters by reference. This is the source of a famous classic FORTRAN bug known as constants aren't.

     PROGRAM MYSTERY
     CALL MAGIC(1)
     PRINT *, 'According to the computer, 3 + 1 is ', ADDUP(3, 1)
     END

     FUNCTION ADDUP(I, J)
     ADDUP = I + J
     END

C     What does this subroutine actually do?
     SUBROUTINE MAGIC(I)
     I = 9
     RETURN

     END
(It's been a long time since I've written a FORTRAN program, so I may have gotten some of the details wrong, but any errors shouldn't detract from the fundamental issue.)

When you run this program, it says

According to the computer, 3 + 1 is 12
How did that happen? We called a function that adds two numbers together, and instead of getting 4, we get 12?

Read more: The old new thing

Posted via email from .NET Info

An introduction to the Vectir SDK

|
What is Vectir?

Vectir is an application that allows you to remote control your PC from your phone. They support a large number of phones and the important part is that they support my new phone (BlackBerry Storm 2). What makes it even cooler is that you get the option of connecting via Bluetooth or WiFi. Both these worked perfectly. Unfortunately the WiFi option worked only when I was on the same local WiFi network. This has the potential to give your new remote virtually infinite range, but for some reason Vectir failed to connect to my PC even after I gave Vectir my public IP and setup port forwarding on my PC. Hopefully that will be sorted some time in the future. Vectir comes with support for some popular applications like iTunes, Windows media player and my long time favourite Winamp. Each set of controls is called a profile. If you are the picky type, you can modify the functionality of a specific profile. But if you are like me, there will always be that application that you would like to control but is not supported. One example of this was the ability to control VLC or hibernate windows using my phone. Vectir comes with the standard shutdown, reboot, logoff options, but lacked the hibernate option.


A simple way to add support for your application?

The good news is that Vectir comes with some very flexible built in plugins that allow you to extend it's functionality quite easily. These include the ability to send key strokes, mouse clicks or execute command line programs. A good tutorial for creating a new profile for VLC can be seen here. A quick example is the ability to hibernate the computer. This can be done quite simply using the command line plugin provided in Vectir and using the following command line

c:\windows\system32\rundll32.exe powrprof.dll,SetSuspendState Hibernate

But if you are like me, you will soon realise that there is so much the command line can do. You will probably quickly come to the point where even the command line and sending key strokes has it's limitations. One way to get around this is to make your command line applications. While this is a good option it is not very extendible. What makes Vectir truly awesome is the ability to extend it's functionality via plugins. At the time of writing I was not able to find any tutorials on writing a plugin for Vectir, so I have decided to share my recently gained knowledge with you.


Getting started

We will look at the basic framework of the the VectirSDK. While you can get a sample project from the Vectir developer section, I prefer starting from a clean slate to fully to get a clear picture of what I am trying to do. Before we get started, a couple of notes:
I'm not a Vectir expert/insider. I just downloaded the SDK, messed around with it for a couple of hours and got things working. So if you notice if anything is out of order, let me know.
I used Visual Studio 2008 Professional. Apparently you can use the free Express edition, but then I have not tried this, so you may run in to problems


Read more: Codeproject

Posted via email from .NET Info

F# Silverlight Application

|
Sick of creating C# Silverlight projects simply to host your lovely F# code ? Well, be sick no more - this extension will allow you to create an F# Silverlight App in 1 easy step! Hope someone out there finds this useful!

(Updated 22/12/2010)

Update includes:

Changed output folder so debugging should now work straight away.
Gave App.fs a more neutral namespace as the fsproj file references it directly
Slightly larger MainPage.fs as an example of using Silverlight with F#

Read more: Visual Studio Gallery

Posted via email from .NET Info

60 Creative Illustrated Twitter Backgrounds

|
In today’s post, we have listed 60 most creatively designed Twitter backgrounds which use various and innovative illustrations to create a visually attractive and appealing look to their profiles.

twitterbackgrounds42.jpg  twitterbackgrounds27.jpg

Read more: noupe

Posted via email from .NET Info

Silverlight Sockets Sample

|
Project Description
Trivial but complete sample for doing SL sockets.

There is an SL project and a console socket server handling 943rd (SL policy) port and 4505th (for arbitrary data communication).

Read more: Codeplex

Posted via email from .NET Info

Troubleshooting and Performance Tuning with SQL Server Traces

|
A couple of weeks ago I wrote a post (How to Change Database Settings with the PDO_SQLSRV Driver) that highlighted a problem that came up at the November JumpIn! Camp in Redmond. To get to the root of the problem (and eventually a solution), I used SQL Profiler to monitor events on my database server. Of course, monitoring server events can be helpful in troubleshooting any issue, including performance issues, when it comes to data-driven applications. Unfortunately, SQL Profiler (a tool that allows you to easily monitor server activity)  is not included as part of SQL Server Express. Fortunately, SQL Profiler is just a nice UI for functionality that is built into SQL Server (including the Express version). So, in this post I’ll show you how to create, read from, and write to a trace file using SQL and SQL Server Management Studio (which you can download for free from here).

Note: While SQL Profiler is not included with SQL Server Express, it is included in the Developer version, which sells for about $50 (and I’ve seen slightly better prices on Amazon).

1. Create a trace. Open SQL Server Management Studio and execute the Transact-SQL below. Note that the sp_trace_create stored procedure is used to create a trace (see the sp_trace_create documentation for a detailed description of the stored procedure and its parameters). The code below will create a trace file (Trace.trc) in the C:\Users\Public\Documents folder. The .trc extension will be appended automatically to the trace file name. The file should not already exist.

/* Declare variables used in trace creation */
declare @rc int -- Return Code for sp_trace_create
declare @TraceID int -- Trace ID created by sp_trace_create
declare @maxfilesize bigint -- Max size in MB for trace file
set @maxfilesize = 5

/* Create the trace. */
exec @rc = sp_trace_create @TraceID output,
                          0,
                          N'C:\Users\Public\Documents\Trace',
                          @maxfilesize,
                          NULL

2. Set the events to be monitored. The hardest part in setting up a trace is in deciding what information you want to collect. The sp_trace_setevent stored procedure is used to set the events to be monitored (see the sp_trace_setevent documentation for more info). If you follow that link to the documentation you’ll see that there is a long list of events that you can collect information about. And, for each event, you have to decide what information you want to collect (see the @columnid parameter in the documentation). To keep things relatively simple, the Transact-SQL below collects some information for the RPC:Starting, RPC:Completed, SQL:BatchStarting,

Read more: Brian Swan

Posted via email from .NET Info

Battle.Net Library

|
.NET Project to use with Battle.net. Could import stuff from Armory for now

Read more: Codeplex

Posted via email from .NET Info

Why Android Is the New Windows

| Wednesday, December 22, 2010
Windows' dominance of the PC market has been good in many ways: reduced hardware costs, increased IT literacy and a standard development platform to name a few. Perhaps Android will bring similar benefits. But unless Google are very careful, it is likely to bring some of the same problems, too

Read more: Slashdot

Posted via email from .NET Info

Adblock Plus for Chrome now available

|
We told you it was coming soon, but we didn't know precisely how soon: Wadlimir Palant has already pushed the first beta version of Adblock Plus for Google Chrome. It was just four days ago that TechCrunch reported that Palant had changed his mind about never releasing a Chrome port -- citing reasons like not wanting to maintain two unrelated projects and the availability of capable alternatives like AdThwart.

That's all changed, however, and AdThwart has become the foundation of Adblock Plus for Chrome. The first release includes improved filters, updated code to bring the extension more inline with its Firefox cousin, and better XHTML support.

Read more: DownloadSquad

Posted via email from .NET Info

Cloud computing fundamentals

|
Summary:  A revolution is defined as a change in the way people think and behave that is both dramatic in nature and broad in scope. By that definition, cloud computing is indeed a revolution. Cloud computing is creating a fundamental change in computer architecture, software and tools development, and of course, in the way we store, distribute and consume information. The intent of this article is to aid you in assimilating the reality of the revolution, so you can use it for your own profit and well being.

Read more: IBM

Posted via email from .NET Info

Pitfalls and Lessons Learned when switching from SVN to GIT

|
This is not Git howto, it just describes where our team had trouble when starting our current project in Git.

Git is not SVN

Just forget everything you know about SVN. Start over with a fresh mind. Ok checking out and commiting are still similar, but when working with branches and tags, it's a whole new world.
Take a look at the Git cheatsheet: https://Git.wiki.kernel.org/index.php/GitCheatSheet

Don't get confused by the many commands, you'll get there. Starting Git is not that complicated.

Play around

You don't need much give Git a spin. Install it, work with it in a local repository. There is plenty of information out which will show you how to do so. Try everything you need to do in your daily work life. Merge, branch, tag .....
The only important thing is: work on the command line. After you got everything figured out you can use your IDE as an aide.

Watch out, branches

Here's the first thing i stumbled on. I was working on two branches, both not too different. Let's call the brA and brB.
So after creating to files in brA, I switch to brB to test something. I was wondering, why brB did have the same files and modifications I just did in brA.
Long story short. Never switch away from a dirty state, unless you know what you're doing.
What happened? Before switching away from brA, I had my repo in a "dirty state". That means, I had changes I did not commit to my working tree. These files will "follow" me to whereever I go.
This is actually very useful, if you want to test if a fix or change you made works in different scenarios before you commit it. But sometimes you do not want this behavior. So there are two options to avoid it. If you're sure you want the code in the branch, commit it. Otherwise stash it. There's a nice post to stashing on ariejan's site.

Read more: United Coders

Posted via email from .NET Info

What Are the Next Big Things In Open Source?

|
Last week, SDTimes compiled a list of the five next big things in open source. I'd like to hear what you think are the open source technologies to watch in 2011.

The SDTimes list includes technologies such as HBase and CouchDB, building on the NoSQL momentum. An interesting observation is that the addition of Eclipse Virgo to the already rich  Eclipse eco-system really adds weight to the runtime options available. According to the article, Windmill is poised to become a successor to Selenium in the web app testing arena. The project that might appeal to most Java developers is Gosu:

Overall, Gosu is a compelling new Java scripting language, and a reasonable alternative to Ruby and Groovy.

Predicting the future is a difficult thing to do, but here are some things that I think will make it big in 2011:

e4:

Eclipse has always had lots of cutting edge open source projects. If I was to take my pick of what will do well next year, it has to be e4. A new way to develop RCP applications, and under development for the last two years, I think this will really gain traction in 2011.

UI Builders:

Following on from Google's acquisition of Instantiations, and the subsequent open sourcing of the WindowBuilder tool, I think we'll see a big surge in UI builders for all different target platforms. Right now Swing, SWT and GWT are under control, but we could still do with a visual editor for Android (or iPhone) apps.

Cross Compilation / DSLs

OK, nothing particularly new here. DSLs have been prevalent for quite some time now. But when I look at Xtext, and I see what they've already done with Applause, their mobile application DSL, it's clear to see that DSLs are the way forward for a single source approach for your applications. There's no doubt that mobile will continue to be big in 2011. DSLs (particular with the power of Xtext) are the perfect match for this trend.

Read more: Javalobby

Posted via email from .NET Info

Simple SIP(VOIP) based phone in C#

|
Introduction

This application was developed and is currently in use as "Help -> Call to support". The idea is to create zero configuration very simple call-out phone, thats how it is now.  (Though IP based incoming calls supported. Example To: sip:test@ip:7666, 7666 is the port SIP_Call out runs).

Currently this application runs on windows only. For some reason .NET "still" has no managed support for audio-in and audio-out. Audio part uses unmanaged windows wave API.

I tried to make example application well organized,clear and well commented - don't know how it turned out, that you can judge. For beginners i suggest to google and read some SIP introduction, otherwise you never get whats going on.

Because code is full of comments, i think there is no need blaa blaa text here, just dig into the code.

SIP commands and terms used(in example application):

INVITE - Invite has 2 meanings:
          1) Initial INVITE - In simple words we or remote-party just sends call offer.
          2) Mid-dialog INVITE - In SIP specifications this is called "RE-INVITE".
             RE-INVITE is used to modify session info, in our case implementing call onhold.
             RE-INVVITE can be sent by us or remote-party.

ACK - ACK must be sent to remote-party each INVITE/RE-INVITE postitive 2xx response.
      ACK just confirms that we received 2xx rescponse.

CANCEL - CANCEL can be used to cancel pending INVITE or RE-INVVITE request.

BYE - BYE is used to end the active call. Call terminating side must send BYE.

SIP dilaog - We can imagine this as session between us and remote-party.

SIP call - SIP call consists SIP dialog and audio RTP session.
Establishing a call:

Call establishing starts from creating RTP audio session, because we need to advertise our RTP session IP:port in SDP. After it we need to do NAT handling if it's needed. Now inital INVITE request can be created and send to remote-party. For more detail RFC 3216 should be read, see links below.

Example SIP messages exchanged:

INVITE sip:bob@192.168.1.44 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.33;branch=z9hG4bKnashds8
Max-Forwards: 70
To: Bob <sip:bob@domain.com>
From: Alice <sip:alice@domain.com>;tag=1928301774
Call-ID: a84b4c76e66710
CSeq: 314159 INVITE
Contact: <sip:alice@192.168.1.33>
Content-Type: application/sdp
Content-Length: sdp_size_in_bytes

v=0
o=- 2890844526 2890844526 IN IP4 192.168.1.33
s=
c=IN IP4 192.168.1.33
t=0 0
m=audio 1111 RTP/AVP 0 97
a=rtpmap:0 PCMU/8000
a=sendrecv


SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.1.33;branch=z9hG4bK4b43c2ff8.1 ;received=192.0.2.3
To: Bob <sip:bob@domain.com>;tag=a6c85cf
From: Alice <sip:alice@domain.com>;tag=1928301774

Read more: Codeproject

Posted via email from .NET Info

Cumulative Update package 5 for SQL Server 2008 R2

|
Cumulative Update 5 contains hotfixes for the Microsoft SQL Server 2008 R2 issues that have been fixed since the release of SQL Server 2008 R2.

Note This build of this cumulative update package is also known as build 10.50.1753.0.

We recommend that you test hotfixes before you deploy them in a production environment. Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
981356  The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 was released

Read more: MS Support

Posted via email from .NET Info

Free calling in Gmail extended through 2011

|
When we launched calling in Gmail back in August, we wanted it to be easy and affordable, so we made calls to the U.S. and Canada free for the rest of 2010. In the spirit of holiday giving and to help people keep in touch in the new year, we’re extending free calling for all of 2011.

In case you haven’t tried it yet, dialing a phone number works just like a regular phone. Look for “Call phone” at the top of your Gmail chat list and dial a number or enter a contact’s name.

gmail_voice_screenshot.png

Read more: GMail blog

Posted via email from .NET Info

Setting up a Linux virtual machine for easy web development on Windows

|
Being a Windows user can be a real drag when trying to use technologies originally designed for the Unix world.  This hardship is especially prominent in web development.  While I do admire ASP.NET MVC, and enjoy being able to develop in C# as much as possible, my real passion right now is using Python with the Django framework.

For simple applications, I often start out using Cygwin, the Django development server, and a sqlite database (side note: have you ever tried to get the MySQLdb library installed in Cygwin?  What a mess!).  But that setup can only take me so far.  Not only is development a little tricky on a Windows box, but deployment and testing can be a mess.  Most of the time, my web apps will be running on a Linux server.  Ideally, I would be able to test everything locally in an environment as close to production as possible (and as a personal choice, without switching my development machine to run Linux).

For a while, I tried to set up my Windows machine to run Apache and MySQL.  That’s fairly easy to do with something like XAMPP.  The hard part is finding all of the necessary extensions and bindings to run (if you want to go that route, this StackOverflow question is a good starting point).  While I did get everything working in the end, it was a real pain.  My machine was filled with extra applications and services that take up resources simply to provide me with a testing environment, and setting up a new development machine became a very non-trivial task.

Read more: dan carroll

Posted via email from .NET Info

Expert-Exchange remove

|
תופעה מטרידה שנתקלתי בה הרבה היא שבחיפוש בגוגל אני מקבל תוצאות מ expert-exchange שזה אתר דומה לStackOverflow  רק בתשלום. זה מטריד כי יש אפשרות לראות את השאלה אבל בשביל התשובה צריך לשלם… 
לא מעוניין שהאתר הזה יופיע בכלל אצלי על המפה. 
אז מסתבר שיש תוספים שיפתרו את הבעיה עבורנו…
תוסף לכרום – יותר אינטואיטיבי, קל להוסיף סינונים.
תוסף לפיירפוקס – פחות נוח, מאפשר חריגים.
שניהם אגב יעבדו רק בגוגל רגיל ולא בחיפוש המהיר החדש.
לIE לא מצאתי.

Read more: Adiel Sharabi

Posted via email from .NET Info

SearchForPython

|
pythonlogo.png

A search engine for Python developers
Don't forget you can add @ at the end of a search for method details!

Read more: SearchForPython

Posted via email from .NET Info

Writing clean, testable, high quality code in Python

|
Introduction
Writing software is among the most complicated endeavors a human can undertake. Brian Kernigan, co-author of the AWK programming language and "K and R C", sumed up the true nature of software development in the book, Software Tools, when he stated, "Controlling complexity is the essence of software development." The harsh reality of real world software development is that software is often created with intentional, or unintentional, complexity and a disregard for maintainability, testability, and quality. The end result of this unfortunate reality is software that can become increasingly difficult and expensive to maintain and that fails sporadically and even spectacularly.
The first step in the process of writing high quality code is to re-examine the entire thought process of how an individual or team develops software. Often in failed, or troubled, software development projects, the software was developed in a reactionary stream of consciousness where the focus of the software development was on getting a problem solved in any manner possible. In a successful software project, the developer is thinking not only about how to solve the problem at hand, but additionally about the process involved in solving the problem.
A succesful software developer will devise a way to run the tests in an easily automated fashion, so they can continuously prove the software works. They are aware of the dangers of needless complexity. They are humble in their approach, seek critical review, and expect refactoring at every step of the way. They continuously think about how they can ensure their software is testable, readable, and maintainable. Although Python the language, and Python the community, are heavily influenced by desire to write clean, maintainable code that works, it is still quite easy to do the exact opposite. In this article, we will tackle this problem head on and explore how to write clean, testable, high quality code in Python.
A clean code hypothetical problem
The best way to demonstrate this style of development is to solve a hypothetical problem. Let's suppose you are a back-end web developer at a company that allows users to generate reviews, and you need to come up with a way to show and highlight small snippets of those reviews. One way to approach the problem would be to write a large function that takes a snippet of text, and query parameters, and returns back a character limited snippet with the query parameters highlighted. All of the logic needed to solve the problem would be included in the one "mega" function, and you would simply need to keep rerunning your script, until you got the result you wanted. The format would probably look like the code example below and would often be developed with a combination of print statements, or logging statements, and an interactive shell.

Messy code

def my_mega_function(snippet, query)
   """This takes a snippet of text, and a query parameter and returns """

   #Logic goes here, and often runs on for several hundred lines
   #There are often deeply nested conditional statements and loops
   #Function could reach several hundred, if not thousands of lines
   
   return result

With a dynamic language like Python, Perl, or Ruby, it is easy to develop software by simply banging away at the problem, often interactively, until you get what seems to be the correct result and calling it a day. Unfortunately, this approach, while tempting, often leads to a false sense of accomplishment that is fraught with danger. Much of the danger lies in not designing a solution to be testable, and part lies in not properly controlling the complexity of the software written.


Read more: IBM

Posted via email from .NET Info

Ultimate Guide to Microformats: Reference and Examples

|
If you’re not familiar with the concept of POSH (plain old semantic HTML), the first thing to know is that producing semantic code that reflects content contextually (rather than stylistically) is a critical component of the web design process. While HTML has a whole bunch of awesome elements by which to convey meaning, a slew of purpose-built microformats (conventions) have been created to better represent the kind of content that exists on the page. This guide discusses popular microformats that can enhance the semantics and interoperability of your website.


What Are Microformats?
Microformats are pretty interesting if you give them a chance. While they aren’t a component of the W3C HTML spec, they do offer a valuable and useful set of naming conventions (using class, id, rel and rev attribute values) that identify points of interest on the page, such as calendar events, links to the content’s license agreement, and even quirky things such as cooking recipes.

While microformats are not a W3C standard yet–though many microformats either have been recommended to the W3C as standards or are in draft form–the level of support browsers and web services have for them explains their utility.

Simply put: microformats are worth learning about and implementing into the websites you build.

Read more: Six Revisions

Posted via email from .NET Info

Trigger a Storyboard on ViewModel changes

|
Interactions based on ViewModel changes are easy as soon as you understand how it works. A lot of people have been hiding and showing elements in the UI based on a boolean in the ViewModel which is converted to fit the Visibility property. Of course they used an IValueConverter that translates a bool to a Visibility enum.
But sometimes designers are tough, they don’t want to show and hide, they want to play a full animation. Of course I know about the ability to trigger a Storyboard by using EventTriggers (control Loaded or Clicked for example). But did you know about the DataTrigger?

DataTrigger

The DataTrigger comes Expression Blend, you’ll have to reference the Microsoft.Expression.Interactions library, which can be found here: C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\Silverlight\v4.0\Libraries\Microsoft.Expression.Interactions.dll
It’s not really that complex to use. If you only want to start a Storyboard when a specific value is put in the bound property the binding looks very much like this.

<Grid x:Name="LoginGrid">
 <i:Interaction.Triggers>
   <ei:DataTrigger Binding="{Binding IsLoggedIn}" Value="true">
     <ei:ControlStoryboardAction x:Name="FadeOutOnLogin" Storyboard="{StaticResource LoginFadeOut}"/>
   </ei:DataTrigger>
 </i:Interaction.Triggers>
</Grid>

Operators

If you have something more specific where you want to use an operator other than equal it will be just a little bit different. The below only starts the storyboard when the value is less than 1.

<Grid x:Name="LoginGrid">
 <i:Interaction.Triggers>
   <ei:DataTrigger Binding="{Binding IsLoggedIn}" Value="1" Comparison="LessThan">
     <ei:ControlStoryboardAction x:Name="FadeOutOnLogin" Storyboard="{StaticResource LoginFadeOut}"/>
   </ei:DataTrigger>
 </i:Interaction.Triggers>
</Grid>

You can use any of the following operators: Equal, NotEqual, LessThan, LessThanOrEqual, GreaterThan, GreaterThanOrEqual.

Really complex scenario’s

Alright, it will start to become more complex when you have more than just on condition that needs to be applied. It would be more clear to make use of a PropertyChangedTrigger in that case, and additional set Conditions. The below example gets a trigger if the IsLoggedIn is changed, and than will apply the conditions, greater than 1 and less than 10 in this example. If the outcome of the conditions is true the Storyboard will start.

<Grid x:Name="LoginGrid">
 <i:Interaction.Triggers>
   <ei:PropertyChangedTrigger Binding="{Binding IsLoggedIn}">
     <i:Interaction.Behaviors>
       <ei:ConditionBehavior>
         <ei:ConditionalExpression>
           <ei:ComparisonCondition LeftOperand="{Binding IsLoggedIn}" Operator="GreaterThan" RightOperand="1"/>
           <ei:ComparisonCondition LeftOperand="{Binding IsLoggedIn}" Operator="LessThan" RightOperand="10"/>
         </ei:ConditionalExpression

Read more: Mark Monster

Posted via email from .NET Info

Authentication in Silverlight using WCF and ASP.NET Membership Provider

|
WCF has provided many benefits for developing secure, scalable distributed applications. One of the nice features of WCF service security is its integration with ASP.NET Membership provider. Using this provider, a caller can be authenticated by the WCF service against the user credentials stored in the SQL Server ASPNETDB database.

Recently while conducting a training for my clients for ASP.NET and Silverlight 4.0, one of my participants has asked me a question regarding integration between WCF services, ASP.NET Membership provider and authenticating the Silverlight client caller against the WCF service using this membership provider, instead of creating any other custom authentication class. It was a great question and I thought of sharing the solution through this article. Make sure you read my recently published article on Silverlight 4.0 - Secure Communication to WCF service using Custom User Name and Password Validator

Creating WCF Service with Custom Binding and SSL

Step 1: Open VS2010 and created a blank solution, name it as ‘SILV4_ASPNETMembershipProvider_WCF’. In this solution, add a WCF service application and name it as ‘WCF_SecureService’.

Step 2: Rename ‘IService1.cs’ to ‘IService.cs’. Add the following code in ‘IService.cs’:
Step 3: Rename ‘Service1.svc’ to ‘Service.svc’ and write the following code in it:
Step 4: Open the web.config file, add the connection string for the database which contains user credentials and also define ASP.NET membership provider. Configure this provider in the service behavior so while verifying, the caller WCF service will load this membership provider. Also use ‘CustomBinding’ with https transport and define its ‘authenticationMode’ to ‘UserNameOverTransport’ so that the caller has to send the user credentials for making a call to WCF service. The web.config file is as shown below:

Read more: dot Net Curry

Posted via email from .NET Info

How to Play By the Rules of Fast Ethernet

|
The truth is everyone who uses Ethernet has wished from time to time that their network was faster. When Ethernet was first designed in the late 1970s, 10Mbps was like a ride on the autobahn.

With today's bandwidth-intensive multimedia applications that number is barely adequate. For example, full motion video for video conferencing can require up to 25 Mbps. That means that classic Ethernet, at 10 Mbps, can only deliver poor quality real-time video for a single session. Fast Ethernet, which runs at 100 Mbps, allows for watching a broadcast presentation in one window while running a conference with three people in three other windows, while still leaving enough margin for network-based application usage.

Below are two primary areas to think about, if you want to play by the rules, when it comes to upgrading your network from 10Mbps to 100Mbps:

1. Cabling

A common problem with Fast Ethernet is the different cabling specifications. In Fast Ethernet, twisted pair cabling either needs to be category 5 or category 3 with proper twist on all four pairs. In classic Ethernet, it was easy to distinguish  between 10Base-2 for 10Base-5. With Fast Ethernet, special care must be taken to verify that the entire connection between station and concentrator either supports TX's 31.25MHz signal or maintains T4's four pairs with proper twist. There are a number of good cable testers and pair scanners available to help in determining this for your network.

2. Hubs

The problem with hubs is the number allowed in a single collision domain. Classic Ethernet allows hubs to be cascaded up to four deep between any two stations. In Fast Ethernet, the number of hubs allowed in a collision domain is drastically reduced to only a single hub. Sometimes it may be possible to have more than one hub in a collision domain, but it will probably be easier over the long term to design a Fast Ethernet network assuming that only one hub is allowed.

Read more: WildPackets Network Analysis and Monitoring Blog

Posted via email from .NET Info

Assigning Unique AutomationId for Silverlight XAML Controls

|
If you want to run coded UI tests or create action recordings for your Silverlight 4 application, you must have a unique automation property that identifies each control. For more information about how to set up your Silverlight application so that the controls are recognized, see How to: Set Up Your Silverlight Application for Testing.

Static XAML Definition
To specify a unique automation property for a control that is defined in your XAML file, you can set the AutomationProperties.AutomationId or AutomationProperties.Name implicitly or explicitly, as shown in the following examples. Setting either of these values gives the control a unique automation property that can be used to identify the control when you create a coded UI test or action recording.

Set the Property Implicitly

Set the AutomationProperties.AutomationId to ButtonX using the Name property in the XAML for the control.

<Button Name="ButtonX" Height="31" HorizontalAlignment="Left" Margin="23,26,0,0"  VerticalAlignment="Top" Width="140" Click="ButtonX_Click" />

Set the Property Explicitly

Set the AutomationProperties.AutomationId to ButtonX explicitly in the XAML for the control.

<Button AutomationProperties.AutomationId=“ButtonX” Height="31" HorizontalAlignment="Left" Margin="23,26,0,0"  VerticalAlignment="Top" Width="140" Click="ButtonX_Click" />

Read more: Vishnu's Blog

Posted via email from .NET Info

How do I simulate input without SendInput?

|
Michal Zygmunt wants to create a system where multiple applications can have focus, with different users generating input and directing them at their target applications. Attempting to simulate this by posting input messages didn't work. "Can you tell us maybe how SendInput is internally implemented so that we can use it to simulate only part of the actions (like without acquiring focus)?"

SendInput operates at the bottom level of the input stack. It is just a backdoor into the same input mechanism that the keyboard and mouse drivers use to tell the window manager that the user has generated input. The SendInput function doesn't know what will happen to the input. That is handled by much higher levels of the window manager, like the components which hit-test mouse input to see which window the message should initially be delivered to. So if your goal is to change the way you call SendInput so it changes the focus management rules, you're barking up the wrong tree. It's like asking, "Please tell me how RAM chips work so I can use it to change the way Lotus 1-2-3 resolves circular references."

Read more: The old new thing

Posted via email from .NET Info

Вышла новая версия набора компонентов для .NET — DXperience 10.2!

|
Компания DevExpress объявила о выходе новой версии своего продукта DXperience, который содержит компоненты для программистов, ведущих свою разработку на платформе .NET с помощью MS Visual Studio. Версия DXperience 10.2 содержит множество новых продуктов и улучшений для таких популярных направлений как Silverlight, WPF, ASP.NET MVC, а также традиционных ASP.NET и Windows Forms.

Если вы пишете код, используя одну из этих технологий, добро пожаловать под кат.

Итак, что нового появилось в версии 10.2?

Прежде всего, мы значительно расширили линейку наших компонентов для Silverlight и WPF, что даёт теперь нашим пользователям уверенность, что они имеют под рукой весь необходимый набор средств для разработки реальных бизнес-приложений.

Silverlight

Для поклонников Silverlight мы выпустили новый продукт DXCharts, который представляет собой компонент для рисования графиков и диаграмм. В нём есть поддержка всех основных типов диаграмм, дополнительных объектов, большой набор встроенных анимаций, а также полностью настраиваемые модели для серий и точек.

silverlight-charts.gif

Read more: Habrahabr.ru
Read more: DevExpress

Posted via email from .NET Info

Microsoft Expression Studio 4 Ultimate Trial

|
Overview
Expression Studio opens up a new world of creative possibility. Its professional design tools give you the freedom to make your vision real—whether you’re designing for standards-based websites, rich desktop experiences, or Silverlight. Includes Expression Web + SuperPreview, Expression Blend, SketchFlow, Expression Encoder Pro and Expression Design.

For more information about what else is new in this release, see Expression Studio 4 Ultimate Overview.

Help us improve Expression Studio byreporting any technical issues.

For more insight into Expression Studio, please see theExpression team blog.

Read more: MS Download

Posted via email from .NET Info

Advanced Topics in PInvoke String Marshaling

|
Introduction

The .NET Platform Invoke tools, used through the DllImportAttribute, are a powerful and simple mechanism to interface with unmanaged DLLs. However, there are many subtleties that are important when addressing string buffer ownership responsibility with unmanaged code. This article covers some of the additional options besides the default MarshalAs(UnmanagedType.LPStr).

Background

So you've bought into .NET hook line and sinker, but you still have a bunch of native code DLLs around you want to make use of. Platform Invoke provides a mechanism to wrap those native DLLs, but unfortunately some Platform Invoke situations are not as simple as you might think from reading the basic Platform Invoke documentation.  

What if the native code expects to own the string after the call? What if you'd like to marshal UTF8 strings instead of ANSI/ASCII strings? What if the parameter is really an out-buffer that the target is going to write to? These are just a few of the realities that exist when interfacing with native-code DLLs. While you'll learn that it's easy to handle any of these situations using PInvoke, they are all distinctly different and require different code.  

Using the code

We're not going to cover the basic concepts of PInvoke here. For that we recommend you review one of the many excellent tutorials available elsewhere. Instead, we're going to consider some of the different ways one can use PInvoke to interact with a native-code DLL entry point declared as:

  void my_function(char *data);  

There are several possible contracts this C-code could have with us over the character pointer data. Below are a few of those contracts. In all cases we assume a null-terminated ANSI/ASCII string.

data may be read-only during the lifetime of the call, and never stored by native code
data may be modified during the lifetime of the call, and never stored by native code
data may be adopted by native code as it's own, where native code expects to free it later  
If you're familiar with PInvoke tutorials, you should be familiar with how to handle case #1 above.   We simply declare the entry point and specify the built-in LPStr marshaler.

    [DllImport("mydllname")]
    extern static unsafe void my_function( [MarshalAs(UnmanagedType.LPStr)] string data)

The attribute decorator is simple, and automatically handles case #1 above. Before the call, the built-in Marshaler allocates a fixed-location buffer for a null-terminated string, and copies an ANSI/ASCII compatible version of the managed string into the buffer.  After the call, the Marshaler automatically frees the buffer, making sure not to leak memory.


Read more: Codeproject

Posted via email from .NET Info

Brace for Impact!

|
My HTML5 Game Engine Impact is now ready. It took some time, but I think it was worth it. I'm proud of what I have achieved and I hope you'll like it too. Part of why it took so long to put it all together is that it now runs on the iPhone, iPod Touch and iPad. Try it yourself at playbiolab.com and impactjs.com/drop or watch a short video:
All those platforms still have their problems with sound and the iPhone 4 has a hard time filling all its pixels, but the games remain to be playable even on the 1st gen iPod Touch. You can read a bit more about Impact on mobile platforms in the documentation.

Even with iOS support, it might come as a shock to some of you that I am selling Impact, rather than releasing it for free. I love free and open source software and I've been contributing stuff for quite some time now. I had a hard time thinking about whether to release my Game Engine for free. The reason I decided to charge for Impact is a) it is easily the biggest thing I've ever made and I'd love to continue working on it full time, and b) I believe it is worth the money.

Read more: PhobosLab

Posted via email from .NET Info

#if DEBUG in javascript

|
כיצד לדעת האם האפליקציה בשלבי פיתוח או שהיא בשרת - בצד הלקוח

באתר "ערוץ השידורים של מכללת סלע" רציתי לדעת האם אני במוד DEBUG או לא.

ראיתי פוסט של פיני בנושא, אבל להשתמש עם Sys.Debug עושה לי כמה בעיות.
ראשית הוא עובד רק במידה ומגדירים את המאפיין ScripMode ל - Debug או ל - Release, במידה וזה מוגדר ב - Auto המאפיין isDebug בצד הלקוח תמיד מחזיר true,

בנוסף אצלי זה מוגדר תמיד ב - Release בגלל הבעיה שתארתי כאן.

כדי שאוכל לדעת באיזה מוד האפליקצייה נמצאת כתבתי את הקוד הבא:

       protected void Page_Load(object sender, EventArgs e)
       {
#if DEBUG
       string DEBUG =  "var DEBUG=true; ";
#else
       string DEBUG = "var DEBUG=false; ";
#endif

           ClientScript.RegisterClientScriptBlock(GetType(), "key", DEBUG, true);
       }

כעת בצד הלקוח אפשר לכתוב את הקוד הבא

<script type="text/javascript">
   if (DEBUG) {
   }

Read more: שלמה גולדברג (הרב דוטנט)

Posted via email from .NET Info

ServiceStack

|
ServiceStack is a high-performance Open source .NET web services framework that simplifies the development of XML, JSON and SOAP Web Services.

Developed in the modern era, it has first-class support for IOC, testing and convention-based development enabling you to to develop your webservices entirely using pure, clean POCO DataContract's that are decoupled from the endpoint that it is hosted on.

These same DTO's can later be shared with any .NET client application eliminating the need for any generated code.

Creating a web service is done by adding a new Request and Response DataContract and the Service to handle them. With no other configuration required, they are immediately discoverable and callable via the following supported endpoints:

REST and XML
REST and JSON
SOAP 1.1 / 1.2
Services can run on both Mono and the .NET Framework and be hosted in either a ASP.NET Web Application, Windows Service or Console application.

If you want to know more about Service Stack, check out the following links:

Read more: ServiceStack

Posted via email from .NET Info

TouchStack - A MonoTouch ServiceStack.NET client

|
Project Description

TouchStack makes it easier for MonoTouch developers to consume Web services created and exposed by the brilliant ServiceStack.NET webservice framework

Why

I first developed this library because i wanted a client that would allow me to make asynchronous webservice calls without having to manually manage threads. So i decided to build one from scratch around Foundation Framework's NSUrlConnection. The initial client has evolved since it was initially designed and i therefore decided to open-source the project hoping that will come to help others along the way.

Dependencies

The library currently depends on:

- MonoTouch.dll (Mainly required for the NSUrlConnection and NSUrlConnectionDelegate);

- System.Runtime.Serialization, System.ServiceModel.Web and System.Xml (Required by the Json and Xml encoders);

- No external libraries are required (although i am thinking of using ServiceStack.NET's serializers in future releases).


Features

The library currently provides the following main features:

- Implicit asynchronous web-service calls. Results and error conditions are reported via custom events;

- Currently XML and JSON formats are supported;

- Supports SSL connections;

- It can easily be extended with your own custom encoder.

Plans

- Provide support for other authentication methods, such as basic HTTP authentication;

- Support SOAP 1.1 and SOAP 1.2 formats;

Read more: Codeplex

Posted via email from .NET Info

MonoWiimote

|
Project Description
Managed c# library for using Wii Remote device under Mono/Linux enviroment.

It requires libcwiimote-0.4 (sudo apt-get install libcwiimote-0.4).

Read more: Codeplex

Posted via email from .NET Info

Watch out those prepared SQL statements

|
Although not documented very well, the system stored procedures listed below are known to many SQL Server developers and DBAs. For more details, please check out http://msdn.microsoft.com/en-us/library/ms176007.aspx. But rarely have any developers called these stored procedures directly from application code. They are usually executed on behalf of ODBC, OLE DB, or other APIs, which developers are familiar with.

sp_prepare

sp_execute

sp_prepexec

sp_unprepare

In a recent engagement with a partner, we were testing an intensive OLTP workload. The application uses a 3rd-party ODBC driver to interact with SQL Server 2008 R2. As the client application is running from Linux machines, we can't use Microsoft's ODBC driver in this scenario. During the test, we observed a strange behavior that the throughput gradually dropped over time. See screenshot of the perfmon below. The batch requests per second dropped from 3k to 2.7k in less than an hour.

After extensive investigation ruling out common things like resource contention, fragmentation, etc, we found that the application issued tons and tons of queries via sp_prepexec, but we couldn't find matching sp_unprepare statements. When we monitored SQL Server memory clerks (sys.dm_os_memory_clerks), we saw ever increasing MEMORYCLERK_SQLCONNECTIONPOOL while the number of connections stayed stable. So it's clear that SQL Server kept preparing the statement handles consuming more and more of the connection memory pool (see perfmon graph above with connection memory usage). And these handles were not cleaned up properly. The application code, as expected, is following the 3rd-party ODBC driver vendor standard API procedures to run the queries. The root cause is actually in the ODBC driver, which wrapped queries in sp_prepexec but failed to issue sp_unprepare afterwards causing the statement handle leak.

Read more: Microsoft SQL Server Development Customer Advisory

Posted via email from .NET Info

10 Things to Learn Next Year

|
It's almost the end of the year, which means that the usual flood of "Top 10", "Year in review" and other backward-looking articles are here.  Retrospectives can be a lot of fun and even occaisionally insightful, but in my opinion they are looking in the wrong direction.  So, in the spirit of looking forward to a new year, here's my top 10 list.  Not things that happened in 2010, but things I want to learn in 2011.  Some of these I have already started using but want to master, others are mysterious new toys that have grabbed my attention if not my time.

10.  HTML5.  The importance of HTML5 cannot be overstated, IMHO.  With support for the Canvas object, video, geolocation, etc, etc, HTML5 is already changing the web in surprising and innovative ways.  The best part?  It's not a new language.  All the tags I know and love are still there.  There is still a lot to learn, but I don't have to start from scratch.  In some ways (like the doctype), HTML5 is even simpler than earlier versions, a refreshing reversal of the usual cruft of complexity that builds up on a language over time.

9.  Groovy.  Groovy is one of a slew of new(ish) languages that run on the venerable and performant Java Virtual Machine.  Groovy borrows heavily from Java's own syntax, flattening out the learning curve for developers that already know Java.  So, it runs on the JVM, and it looks a lot like Java.  What's the big deal with Groovy?  Well, proper closures, for one.  A great console, for another.  One of the things I LOVE about coding in Python is that if I want to play around with some code I can just start up a Python console and go to work.  Java's edit -> compile -> debug cycle seems positively crippling by comparison.  Add in the fact that apps written in Groovy can leverage Java's gigantic library of existing components and you have a language that I have to add to my toolbox this year.  Oh, and don't forget Grails.  I've built a couple simple apps with it and I think I'm in love.

8.  The ins and outs of cross-platform mobile development.  Compared to the whole of computing, mobile applications are still in their infancy.  Without getting into the growing pains this market is going through (Apple's walled garden, Verizon Android crapware, etc), there is one big challenge as a developer.  What platforms do you support?  What language(s) do you develop in?  Is it worth it to build both Android and iOS apps?  Do you even have the resources to do so?  Companies like Appcelerator aim to make this easier by creating cross-platform dev tools for popular mobile device platforms.  I want to make my apps available to as broad an audience as possible without the headache of maintaining several codebases.  This is a space to watch.

7.  A NoSQL database.  Most of the platforms I work with rely on relational databases.  They work.  MySQL / Oracle ( the two I work with most frequently) are mature, stable and perform well enough when properly tuned.  But, like any tool, RDBMSs aren't the right solution for every problem.  They can be expensive to scale quickly, and frankly I don't always need a well defined schema.  Sometimes I just need a persistent store for some simple objects.  Now that CouchDB is available as a client-side DB for Android, I can see quite a few interesting applications for this technology.  If iOS support comes through then we have another choice for cross-platform data stores.

Read more: unorganized machines

Posted via email from .NET Info

Visual Studio 2010 Setup Projects and x64 Support

|
I was taking the Windows Azure CmdLets project and getting it into an MSI just to make it easier to deploy in a nice package.  I ran into problems with the Setup project not being able to properly establish the right registry settings for an x64 environment.

Even though you set the target platform on the Setup project to x64 the InstallUtil.lib that get’s run is still x86.  In order to have it work property, you need to follow the steps identified here:

http://msdn.microsoft.com/en-us/library/kz0ke5xt.aspx

The section “64-bit managed custom actions throw a System.BadImageFormatException exception” covers the steps you need to follow, using the Orca MSI editor to replace the InstallUtilLib.dll from the one that the Setup Project embeds (x86) to a x64 version.

Now, works like a charm…

Read more: Shawn Cicoria

Posted via email from .NET Info

Cached Commons

| Tuesday, December 21, 2010
Cached Commons is a collection of user-contributed javascript libraries that have been cached, optimized, and hosted on Github’s fast CDN. If a library is missing from this collection, post a request on Github and we’ll add it immediately. The readme has all the details.

  • Visualization
  • CSS Libraries
  • Dojo and Plugins
  • Ext Library and Plugins
  • HTMl5 Javascripts
  • Internet Explorer
  • jQuery and Plugins

Read more: Cached Commons

Posted via email from .NET Info

Google Libraries API

|
What is the Google Libraries API?
The Libraries API is a content distribution network and loading architecture for the most popular, open-source JavaScript libraries. Using the Google API Loader's google.load() method increases your application's speed while providing access to a growing list of the most popular, open-source JavaScript libraries, including:
  • Chrome Frame
  • Dojo
  • Ext Core
  • jQuery
  • jQuery UI
  • MooTools
  • Prototype
  • script.aculo.us
  • SWFObject
  • Yahoo! User Interface Library (YUI)
  • WebFont Loader

Read more: Google

Posted via email from .NET Info

Cloud9 IDE

|
demo_img.png

Cloud9 IDE is aiming to be the IDE for Javascript developers. We have all experienced the Eclipse variants and other Java or C++ IDE's for which webdevelopment and javascript was an afterthought. Extending these applications or customizing them to our needs was done in either Java or C++ and generally very difficult. We are developing applications in javascript to run online for a purpose, why shouldn't you do your application development online too?
For these reasons we have started Cloud9 IDE as an online platform for Javascript development, and all the code is opensource and free to adapt and use.

Read more: Cloud9

Posted via email from .NET Info

Free Silverlight Book, Gauge and TileView Controls

|
silverlight-book-control.jpg

The pack offers three free Silverlight controls for incredibly rich UI and data visualization – Book, Gauge and TileView. The controls feature the full functionality of their commercial versions, thus offering lean and intuitive API, Expression Blend support, Visual Studio 2010 and SharePoint 2010 support and built-in Office Black theme.

Read more: Telerik

Posted via email from .NET Info

CodeMirror

|
CodeMirror is a JavaScript library that can be used to create a relatively pleasant editor interface for code-like content ― computer programs, HTML markup, and similar. If a parser has been written for the language you are editing (see below for a list of supported languages), the code will be coloured, and the editor will help you with indentation.

Read more: Codemirror

Posted via email from .NET Info

MooPlay

|
MooPlay brings some controls over an html5 video element. You can build and customize your own player with :
  • a play / pause control
  • buttons to move inside the video (rewind and fast forward)
  • an interactive play progress slider
  • a load progress bar
  • a volume slider and a mute button
  • subtitles loaded through an ajax request and synchronized with the video. Supported formats are SubRip (.srt) and SubViewer (.sub)
  • full page display
  • current and/or remaining time
The video element methods can be called by other scripts, MooPlay objects will adapt themself to any state changes.

Read more: MooPlay

Posted via email from .NET Info