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

Linux 2.6.37 Released

| Thursday, January 6, 2011
It's early January, and bleary-eyed people everywhere are getting over their hangovers and wondering where they should send their merge requests to.

And now they can. Because 2.6.37 is out, and the merge window for the next release is thus open. Of course, as usual, I'll probably let 2.6.37 cool for a few days to try to encourage people to look at the release rather than go all crazy with newly merged features in the next tree.

All in all, not a lot happened the last week. The diffstat is dominated by some VFS locking documentation and a few updates to fix up some ASoC codex register cache changes. The rest is really pretty small and boring. Full shortlog (from -rc8, naturally - the shortlog for the whole 2.6.37 release is much too big) appended.

We did have another revert to fix hopefullythe last "blank screen" regression on intel graphics.

Read more: LKML

Posted via email from .NET Info

How To Boot 10 Different Live CDs From 1 USB Flash Drive

| Wednesday, January 5, 2011
09bootingcc.png

Ever get the urge to try out a bunch of Linux distros at once? Maybe you’re hosting a Linux installation party. Here’s an easy way to get a bunch of Live CDs working from a single thumb drive.

10 Distributions, You Say?
MultiSystem is a really easy tool made to run on Ubuntu and Ubuntu-based distros that you can use to play with various LiveCDs at once, or to create the ultimate recovery device.  If you don’t use Ubuntu, you can use an Ubuntu Live CD to install MultiSystem so that you can create your super live USB drive without having to run Linux as your main OS.

It’s best to download your ISOs ahead of time, and select a USB drive large enough to house them all.  I actually went with an 8 GB SD card (used via a USB adapter).  Here are some of the popular and interesting distros I used.

Ubuntu, a very novice-friendly and popular distro that’s widely used
Kubuntu, a KDE-oriented version of Ubuntu.
Linux Mint, another novice-friendly distro that aims to get more usable out of the box.  It is also 100% compatible with Ubuntu packages.
Linux Mint Debian Edition, like Linux Mint except it’s 100% compatible with the Debian testing build.
Debian, one of the older and more central distros out there.  It has both a “stable” build and a “testing” build.
Fedora, which used to be RedHat and is another big distro.  It aims at power, and has several “spins”, which aim to work out of the box for different purposes.

Read more: How-to-geek

Posted via email from .NET Info

Wordmarks

|
WHY?

I don't know if it's just me but I find myself skimming through my font library every time I am about to design a new wordmark. And the fonts that I end up using are mostly the ones that are already activated/installed on the system.

These are the fonts that proved themselves through the test of time by staying activated and used over over again (some of them are default fonts installed by the operating system but you know what I am getting at).

I built this simple tool for checking out a wordmark before diving into the font management program. Give it a try, and spread the word if you find it useful.

Read more: Wordmarks

Posted via email from .NET Info

MS Asks Google To Delay Fuzzer Tool

|
Polish Google security white hat Michal Zalewski has announced concerns that one of a hundred vulnerabilities his fuzzer tool found in IE is well known to third party hackers in China. His simple explanation provides an interesting counter argument to Microsoft's usual request that security problems not be released until they can slowly investigate them. From the article, 'Microsoft asked Zalewski to delay cross_fuzz's release, but he declined, in part because of his fear the IE vulnerability was already being explored by Chinese hackers, but also because the company's security experts had not responded to information he provided.' You can read about and download cross_fuzz for your own use

Read more: Slashdot

Posted via email from .NET Info

Does Windows Phone 7 Have a Data Transmission Bug ?

|
Microsoft commentator and Windows Phone 7 Expert Paul Thurrott has reported a serious bug that indicates Windows Phone 7 is uploading up to 50 MB of unidentified data every day. The phone operating system apparently ignores Wi-Fi connections for sending this data, leading some Windows Phone 7 owners hitting their 2 GB plan data limit while doing little more than checking email and social networking sites. Thurrott has written a book on Windows Phone 7 and is unlikely to be making such a claim unless it has some substance. At the moment no one knows what this data contains or where it is going, though Thurrott suspects it may be related to the Windows Phone Marketplace

Read more: Slashdot

Posted via email from .NET Info

Desktop Fun: Google Themed Icon Packs

|
googlechromedesktop01.png

Are you an avid user of Google’s online services, but the icons for your desktop and app launcher shortcuts leave something to be desired? Now you can make those shortcuts shine with style using our Google Themed Icon Packs collection.

Read more: How-to-geek

Posted via email from .NET Info

Angry Birds arrives on Windows, now available from Intel AppUp Center

|
angry.jpg

If you've been waiting for the day when you could finally play Angry Birds on your Windows computer, brace yourself: Intel has announced that Rovio's insanely popular trajectory game is now available for purchase from the AppUp Center.

The AppUp version of Angry Birds will run you $9.99, though Rovio is offering a discount right now, so you can get the game for $4.99 if you act quickly. You'll need to download and install the AppUp Center software first, then provide payments details -- after that, you can let the birds-versus-pigs productivity nosedive commence!

Read more: DownloadSquad

Posted via email from .NET Info

Microsoft Confirms Zero-Day Hours After Exploit

|
Microsoft confirmed on Tuesday an unpatched vulnerability in Windows just hours after a hacking toolkit published an exploit for the bug. A patch is under construction, but Microsoft does not plan to issue an emergency update to fix the flaw. The bug was first discussed Dec. 15 at a South Korean security conference, but got more attention Tuesday when the open-source Metasploit penetration tool posted an exploit module crafted by researcher Joshua Drake. Metasploit says successful attacks are capable of compromising victimized PCs, then introducing malware to the machines to pillage them for information or enlist them in a criminal botnet

Read more: Slashdot

Posted via email from .NET Info

xll - the easy way to create Excel add-ins

|
A C++ library for creating xll add-ins

Create Excel add-ins using the Excel 2007 SDK that use the big grid, wide-character strings, and thread-safe functions. The library can also be used to create add-ins that work with Excel 97 through Excel 2003.

Read more: Codeplex

Posted via email from .NET Info

Displaying a Paged Grid of Data in ASP.NET MVC

|
Introduction
This article demonstrates how to display a paged grid of data in an ASP.NET MVC application and builds upon the work done in two earlier articles: Displaying a Grid of Data in ASP.NET MVC and Sorting a Grid of Data in ASP.NET MVC. Displaying a Grid of Data in ASP.NET MVC started with creating a new ASP.NET MVC application in Visual Studio, then added the Northwind database to the project and showed how to use Microsoft's Linq-to-SQL tool to access data from the database. The article then looked at creating a Controller and View for displaying a list of product information (the Model).
Sorting a Grid of Data in ASP.NET MVC enhanced the application by adding a view-specific Model (ProductGridModel) that provided the View with the sorted collection of products to display along with sort-related information, such as the name of the database column the products were sorted by and whether the products were sorted in ascending or descending order. The Sorting a Grid of Data in ASP.NET MVC article also walked through creating a partial view to render the grid's header row so that each column header was a link that, when clicked, sorted the grid by that column.

In this article we enhance the view-specific Model (ProductGridModel) to include paging-related information to include the current page being viewed, how many records to show per page, and how many total records are being paged through. Next, we create an action in the Controller that efficiently retrieves the appropriate subset of records to display and then complete the exercise by building a View that displays the subset of records and includes a paging interface that allows the user to step to the next or previous page, or to jump to a particular page number, we create and use a partial view that displays a numeric paging interface

Step 0: A Brief Roadmap
This article walks through displaying a paged grid of data. It is presumed that you have already read and worked through the following two articles:
Displaying a Grid of Data in ASP.NET MVC, in which we created the ASP.NET MVC demo application and saw how to display a grid of data without any features like sorting or paging, and
Sorting a Grid of Data in ASP.NET MVC, in which we created a view-specific Model (ProductGridModel) and partial view to display a sorted grid of data and to allow the user to sort the grid by a column of their choice in either ascending or descending order.
Recall that in Sorting a Grid of Data in ASP.NET MVC the demo was available at the URL www.yoursite.com/Products/Sortable. Visiting this URL displayed the grid using its default sorting characteristics, which was to sort the grid by the ProductName column in ascending order. To have the data sorted by an alternate column or sorting direction, you'd pass in the column name and sort direction through the querystring like so: www.yoursite.com/Products/Sortable?sortBy=ColumnName&ascending=true|false. For example, the URL /Products/Sortable?sortBy=UnitPrice&ascending=false would display the products sorted by the UnitPrice column in descending order.

The paged grid we will create in this article will work in much the same manner. Namely, there will be two optional querystring parameters:

page - specifies the index of the page of data to display; note that this index starts at 1, meaning to view page 2 you'd specify a page parameter of 2. If this value is omitted it defaults to showing the first page of data (that is, it has a default value of 1).
pageSize - indicates how many records to show per page. Defaults to 10.
Visiting the URL www.yoursite.com/Products/Paged without specifying any querystring parameters would display the first 10 products, whereas visiting www.yoursite.com/Products/Paged?page=2&pageSize=15 would display the second page of products where each page was 15 records (in other words, it would display products 16-30).
One final note before we get started: the code/demo in this article focuses on paging only. The grid displays the products sorted by their ProductID values in ascending order. A future article will examine how to create a sortable, paged grid.

Step 1: Updating ProductGridModel, the View-Specific Model
The demo we created in Displaying a Grid of Data in ASP.NET MVC used a collection of Product objects as its model (namely, the NorthwindDataContext object's Products property). While this worked fine for the simple grid, a more nuanced approach was needed for the sortable grid demo created in Sorting a Grid of Data in ASP.NET MVC. In particular, to render a sortable grid the View needed to know what column the data was sorted by and whether it was sorted in ascending or descending order. To supply this extra information to the View we created a new class named ProductGridModel that served as a Model for the Sortable action's View. (Such classes are referred to as view-specific Models, as they are Models created for a specific View.)

Read more: 4 guys from Rolla

Posted via email from .NET Info

How Kinect works

|
07b8b5ed-4d19-4cb3-957f-d6e367f4c8a7.PNG

How You Become the Controller

"You are the controller." If you've been following the buzz surrounding Kinect, you've probably heard this phrase tossed around. From plugging leaks with your hands and feet in Kinect Adventures! to changing songs with the flick of a wrist in Zune, Kinect opens up a new way to naturally experience your entertainment.

But once you get over the magic of opening the disc tray with the wave of a hand like you're a Jedi, you might start to wonder how it all works under the hood. In this blog post, I'll focus on the secret sauce behind the human tracking system and how it allows game developers to produce Kinect-enabled experiences. Then Arjun Dayal, a program manager on the team, will show you how Kinect enables a gesture-based approach to navigating the Xbox Dashboard and Kinect Hub. But before we get into any of that, let’s start with the conceptual principles that guided Kinect’s development.

It’s an Analog World We Live In
Traditional programming is based on sets of rules and heuristics: cause and effect, zero and one, true and false. Fortunately, this approach works well when modeling simple systems with a limited number of inputs and outputs. Take Halo for example (not a simple system by any means, but suitable for proving the point): pushing A causes Master Chief to jump; moving one stick causes him to walk forward; moving another causes him to look up. If A, then B. Unfortunately, the real world is not digital, but analog.

In the analog world, it’s not just about yes and no, but it’s about maybe. It’s not just about true or false, but it’s about probability. Think briefly about all of the possible variations of a human waving his hand: the range of physical proportions of the body, the global diversity of environmental conditions, differences in clothing properties, cultural nuances to performing even a simple gesture. Quickly, you end up with a search space around 10^23, an unrealistic problem domain to solve through conditional-based programming.

We knew early on that we had to invent a new way of approaching this problem, one that works like the human brain does. When you encounter someone in the world, your brain instantly focuses on him and recognizes him based on years of prior training. It doesn’t crawl a decision tree hundreds of levels deep to discern one human from another. It just knows. Where a baby would have a hard time telling the two apart, you’ve learned to do so in a split second. In fact, you could probably make a reasonable guess about their age, gender, ethnicity, mood, or even their identity (but that’s a blog post for another day). This is part of what makes us human.

Kinect was created in the same way. It sees the world around it. It focuses on you. And even though it’s never seen how you wave your hands before, it instantly approximates your movements to the terabytes of information it’s already learned.

The Kinect Sensor
At the heart of the skeletal tracking pipeline is a CMOS infrared sensor which allows Kinect to perceive the world, regardless of ambient lighting conditions. Think of this as seeing the environment in a monochrome spectrum of black and white: black being infinitely far away and white being infinitely close. The shades of gray in between these two extremes correspond to a physical distance from the sensor. The sensor gathers each point in its field of view and forms it into a depth image that represents the world. A stream of these depth images is produced at a rate of 30 frames per second, creating a real-time 3-D representation of the environment. Another way to think of this is like those pinpoint impression toys that used to be all the rage. By pushing up with your hands (or your face if you were really adventurous), you could create a simple 3-D model of a piece of your body.

Finding the Moving Parts


Read more: Xbox LIVE > Engineering Blog

Posted via email from .NET Info

WP7: When does GC Consider a Local Variable as Garbage

|
Consider the following code that I received

static void Foo()
{
   TestClass t = new TestClass();
   List<object>l = new List<object>();
   l.Add(t); // Last use of l and t

   WeakReference w = new WeakReference(t);

   GC.Collect();
   GC.WaitForPendingFinalizers();

   Console.WriteLine("Is Alive {0}", w.IsAlive);
}

If this code is is run on the desktop it prints Is Alive False. Very similar to the observation made by a developer in http://stackoverflow.com/questions/3161119/does-the-net-garbage-collector-perform-predictive-analysis-of-code. This happens because beyond the last usage of l and t, the desktop GC considers l and t to be garbage and collects it.

Even though this seems trivial, it isn’t. During JITing of this method the JITer performs code analysis and ensures that runtime tables are updated to reflect whether at a particular time a given local variable is alive or not (it is not used beyond that point). This needs a bunch of data structures to be maintained (lifetime tables) and also dynamic analysis of code.

In case of Windows Phone 7 (or other platforms using NETCF) for the same code you’d get Is Alive True. Which means the NETCF GC considers the object to be alive even beyond it’s last usage in the function.

Due to the limited resources available on devices, NETCF does not do these dynamic analysis. So we trade off some runtime performance to ensure faster JITing (and hence application faster startup). All local variables of all functions in the call stacks of the all managed threads in execution during garbage collection is considered live (hence also object roots) and not collect. In NETCF the moment the function Foo returns and the stack is unwound the local objects on it including t and l becomes garbage.

Read more: I know the answer (it's 42)

Posted via email from .NET Info

20 Great Web Applications Alternatives to Usual Desktop Software

|
Desktop Software has been a great help in our computer work purposes. They serve as our working tool on our projects, designs, hobbies, interest etc. But web apps have set a great trend over the web. Developers of web applications created applications that are likely powerful as the desktop software but create more great output and easiness.  The best thing is that you don’t need to install any of these web apps to use. Just browse over the web and visit these great web applications.

1. Google Docs
2. Meebo
3. Slide Rocket
4. Aviary
5. Mint


Read more: 1st Web Designer

Posted via email from .NET Info

SQL Framework

|
Introduction

Developers who have experienced in large application development know the necessities of framework. In this regards, more experience developer like Team Lead, Technical Lead and Project Manager up to CTO have high respect of it. They know from their experience that large application should develop in very organized way so that newly assigned developers take tiny time to adopt the development structure behind the application and take less costly man hour form Team Lead or other senior developers. They also know that maintenance will be easy and cost effective after development has been completed for the application.

Background

Apart from this I will be going through developing a SQL Framework. I will show the necessity of it with demonstration.

Let’s Get Started

Open SQL Management Studio

Say you are working in a large software company for a big project and will take long time. You have many programmers working under you in this project. Sometimes programmers are switching from your software company and replace by newly join programmers. So far this is a big project so underlining database size will be accordingly. Say, you have assigned a task to a programmer to create a store procedure for data insertion with proper validation and other necessary command in store procedure.

The bellow procedure has been created by the programmer as his assigned task.

CREATE PROCEDURE [dbo].[Customer_Set]

@Name as varchar(50),
@Address as varchar(250),    
@Mobile as varchar(50)
AS
BEGIN

SET NOCOUNT ON

--Validation
IF @Name IS NULL
BEGIN

RAISERROR ('Name cannot be empty.',16,1)
END

IF LEN(@Name)<3
BEGIN

RAISERROR ('Name cannot be less than 3 characters.',16,1)
END

--Data Insertion
BEGIN TRY

INSERT INTO [dbo].[Customer]
([Name]
,[Address]
,[Mobile])
VALUES
(@Name
,@Address
,@Mobile)
END TRY
BEGIN CATCH
RETURN (0)
END CATCH
 RETURN (1)
END

Read more: Codeproject

Posted via email from .NET Info

REMOTING using SQL Server database

|
Well, this is a very simple Example to implement the remoting concept.

It consists of 3 parts:

Business Component.
Server application
Client application

I have used the northwind database of the SQL Server in the business logic

Business Component

//pwd is 1234: Use the password  of your system. Northwind database must be

Installed

//You can specify the IP Address of the

//server computer in place of.
Open a class library project .Name it as remlibrary.
Type this code in the class file.
using System;
using System.Data;
using System.Data.SqlClient;

public class product:MarshalByRefObject
{

 public DataSet GetDataFromDatabase(int catID)
 {
     SqlConnection cn = new SqlConnection("server=.;uid=sa;pwd=1234;database=northwind");
     SqlDataAdapter da = new SqlDataAdapter("select productname,unitprice from products where categoryid=@a", cn);
     da.SelectCommand.Parameters.AddWithValue("@a", catID);
     DataSet ds = new DataSet();
     da.Fill(ds, "abc");
     return ds;
 }


}

Server application:
Open a Console Application.Name it as ConsoleApplicationrem.
Add a reference to System.RunTime.Remoting.dll
//Note: The port number is 6 for the TCP protocol.
//8085 or other port numbers are just fictitious port numbers.

//For implementing on 2 different machines, the port number must be 6 using TCP

using System;
//using System.IO;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;

namespace ConsoleApplicationrem
{
public class Server
{
 public static void Main()
 {
     TcpChannel h=new TcpChannel(6);
   ChannelServices.RegisterChannel(h,false);
RemotingConfiguration.RegisterWellKnownServiceType(typeof(product),
"RemoteObjects",WellKnownObjectMode.Singleton);
   Console.WriteLine("The Server hasstarted");
   Console.WriteLine("Press the enter keyto stop the server ...");
   Console.ReadLine();
 }
}
}

For the Client application.

Read more: C# Corner

Posted via email from .NET Info

[WCF]Some tips for making WCF service and client proxy working more effeciently

|
1) Protocol and serialization format

   There are many blog and MSDN articles that discuss the serialization format and protocols that are applicable in different scenarios. In general binary serialization formats provide better latency and smaller payload sizes than their XML equivalents. And 'WCF native' bindings such as NetNamedPipeBinding and NetTcpBinding have lower communication overhead than interoperable bindings such as BasicHttpBinding. For communication with platform services we've found the following are optimal choices:

Recommendation:

Calls to WCF services running on localhost: NetNamedPipeBinding
Calls to WCF services running on remote machines:BinaryHttpBinding


2) Channel factory caching

   WCF client proxies use Channels (System.ServiceMode.InnerChannel) for communication with a remote service. A channel is created using channel factory. The creation of channel factory is an expensive operation and contributes significant overhead for calls made using a proxy. As a result WCF attempts to cache the ChannelFactory object for communication. Channel factory caching significantly reduces the overhead of WCF calls. The caching can be accidentally/unwittingly disabled if certain constructors are used for creating the proxy.


Recommendations:

a) Always create WCF proxies using either the default constructor or a constructor that takes the endpointconfigurationname as parameter.
b) Don’t use the constructors of the proxy that takes Binding as an argument.
c) Don’t access the public properties ChannelFactory, Endpoint, and ClientCredentials of the proxy.

Read more: Steven Cheng's MSDN Notes

Posted via email from .NET Info

[WCF]WCF performance testing information share

|
PerfGoals
Check the application design for potential synchronous and asynchronous operations
Check the application design for WCF binding configurations
Determine the optimal service throttling settings for the application
Measure the WCF services' ServiceContract (methods) throughput and response times (server and client end)
Calls Per Second
Call Duration      
Check if the application topology is scaled out by deploying them into a load balanced server farm
Execute both end to end and component level performance tests


PerfTesting

WCF service hosted in IIS (using certificates)
In VSTS solution, Add Service Reference to WCF service.  After you enter web address where service is hosted, you see list if services that can be found at the selected web address. Each service might contain multiple service contracts and/or endpoints. The operations displays a list of operations (methods) that are available for each service contract.
App.config is added to the solution consisting of service bindings and endpoints
If the application uses client certificates, you would install the cert and update the thumprint in the app.config

    <system.serviceModel>
       <behaviors>
       <endpointBehaviors>
         <behavior name="ClientCredentialsBehavior">
           <clientCredentials>
             <serviceCertificate>
               <authentication certificateValidationMode="PeerTrust" revocationMode="NoCheck"/>
             </serviceCertificate>
             <clientCertificate findValue="7e cd 30 4a 60 af 6f e5 e9 03 8f 4e 51 7d 8b bd cd 48 c7 29"
                                storeLocation="LocalMachine" storeName="My" x509FindType="FindByThumbprint"/>
           </clientCredentials>

Read more: Steven Cheng's MSDN Notes

Posted via email from .NET Info

16 Amazing Facebook Hack And Tips For Geeks

|
Who would have thought that few clicks would take the initiative to connect with old friends and allow making new ones. Mark zuckerberg has surprised everyone with the depth of his thoughts which evolved as Facebook. It has made a great way to socialize ourselves with other individuals.

On the other end - to many, the Facebook of the world are trivial and a waste of time. Well, 800 million people could't all be wasting their time! Facebook has introduced such a wide range of features to entertain its users all the time.

Though social networking now plays a significant part in every aspect of life. To stay in touch and connected, e-commerce, online retail, marketing, news and information, sharing, and most importantly even business. without this vital aspect of our lives, we would be almost back to the dark ages. while privacy and securities issues are nothing to be scoffed at- social networking may well be preview of what the next generation of the net will be all about. the next decade is predicted to be the most out of the box technological move forward ever.

In case you are regularly accessing Facebook then you might know many of regular stuffs like add/delete friends, update statuses, walls and profile, add and explore pages and add applications and etc.. But for geeks there are many more Facebook tricks excluding common ones, and it's not a big deal if you easily fail to remember some of them.

Today, we have pulled pretty nifty tricks and tips which you can use to show off your geek skills. I hope you do like to try once. and please feel free to share in the comment section below.

1. HOW TO: Add a Dislike Option to Your Status Update
2. HOW TO: Update Facebook Without Using Facebook
3. HOW TO: Hide Status Updates From Certain People
4. HOW TO: Get Facebook Updates On Email
5. HOW TO: Pre-Schedule Status Updates

Read more: Tech Insight Magazine

Posted via email from .NET Info

Improving ASP.NET Security with Visual Studio 2010 Code Analysis

|
Anyone doing ASP.NET development probably admits, openly or not, to introducing or stumbling upon a security issue at some point during their career. Developers are often pressured to deliver code as quickly as possible, and the complexity of the platform and vast number of configuration options often leaves the application in a less than desirable security state. In addition, the configuration requirements for debugging and production are different, which can often introduce debugging settings in production, causing a variety of issues.

Over the years, the ASP.NET platform has matured and better documentation has been made available through MSDN and community blogs, but knowing which feature or configuration setting to use is often troublesome. Even with good knowledge of the security functionality, mistakes can happen that could result in security vulnerabilities in your application.

Peer code review is a useful process and a good way to catch issues early. Still, not everyone has the time or budget—or knowledgeable peers at hand—for such review.

Since the introduction of code analysis in Visual Studio 2005, developers have been able to automatically analyze their code to see if it complies with a series of best practices ranging from design, maintainability, performance and security. So far, code analysis has been a great tool, but it hasn’t focused on providing best security practice guidance for ASP.NET—until now.

In this article I’ll introduce you to the new ASP.NET code analysis rules that can be used with Visual Studio code analysis as well as with the standalone FxCop application to improve the security of your ASP.NET applications.

Overview
You can download the ASP.NET security code analysis rules package for Visual Studio 2010 and FxCop version 10.0 from go.microsoft.com/?linkid=9750555. The installation contains three new rules packages:

ASP.NET.Security: This category focuses on security best practices related to how System.Web.Ui.Page properties are initialized.
ASP.NET.MVC.Security: This category focuses on security best practices related to how ASP.NET MVC is used.
ASP.NET.Security.Configuration: This category focuses on security best practices related to configuration elements under the web.config files.
Once the rules package is installed, you can start reviewing the security of your Web application automatically by clicking on the Run Code Analysis on Web Site button under the Build menu (see Figure 1). The analysis will review each Page class and web.config file of your application against a series of security best practices for ASP.NET.

gg490350.Faust_Figure1_hires(en-us,MSDN.10).jpg

Read more: MSDN Magazine

Posted via email from .NET Info

First steps with ehcache

|
Ehcache is easy and very powerful object caching system. In this tutorial I'm going to show how to start using the ehcache.

First step is to download the distribution. From the archive you need the

ehcache-core-2.3.1.jar - jar file contains everything that is need to use ehcache.
ehcache.xsd - schema for the ehcache configuration file.
First you need to create configuration file ehcache.xml.

ehcache.xml

<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="ehcache.xsd"
        updateCheck="true" monitoring="autodetect"
        dynamicConfig="true">

   <!-- Specify cache storage location -->
   <diskStore path="/tmp/jprofessional/cache"/>
   <cache name="test"
          maxElementsInMemory="50"
          maxElementsOnDisk="5000"
          eternal="false"
          overflowToDisk="true"
          diskSpoolBufferSizeMB="20"
          timeToIdleSeconds="300"
          timeToLiveSeconds="600"
          memoryStoreEvictionPolicy="LFU"
          transactionalMode="off"
           />

</ehcache>

Configuration defines storage directory and cache with name "test".

Let's define the object that we are going to put into cache:

package com.jprofessional.ehcache;

public class TestBean {
 private String name;
 private Integer id;

 public TestBean() {
   super();
 }

 public void setName(String aName) {
   name = aName;
 }

 public String getName() {
   return name;
 }

 public void setId(Integer aId) {
   id = aId;
 }

 public Integer getId() {

Read more: JP Professional

Posted via email from .NET Info

There is something about "Paths" for Asp.net beginners

|
What’s so important about "paths"?

October, 2004

A young developer was struggling with the hardest problem on earth. He was trying to show an image in two different web pages. The image was appearing on one web page, and, the same was not appearing on another!

Following was the HTML element he was struggling with:

<img id="imgAction" src="images/action.jpg" />

Guess what, the poor developer was none but me!

I still can remember, I had troubles with setting appropriate paths for different elements(Images/documents/videos etc) in the web pages. I used to struggle with putting download links in the pages and show images and/video files (Which I still have to do) by using different HTML elements or server controls along with setting their different attributes (href, src etc) values. It sounds funny, but, often I used to find myself in situations where the images were appearing in one page and not appearing in another Or, the download links were braking often. I wondered why!

That was a great mastery to me in those early days, along with lots of other mysterious things I was going through each day.

Its obvious, I didn’t have clear understanding about setting the href or src property values appropriately for the HTML and Asp.net server controls, and that’s why I had to suffer.

Its been long, those days are gone. I grew up a little, and, I don’t have any problem with those mysterious paths these days. Still today, I see lots of newbies struggle with these path related issues (See here and here) and these hurts. So, I decided to uncover those “path mysteries” for the absolute beginners (Like me in October 2004) so that, they don’t have to waste a minute for setting appropriate path values for Asp.net pages.

Please note that, this article doesn’t discuss any “rocket science”. All It talks about is some plain old basic stuff and great chance is, you already are a master of the subject matter. But, I often love to go back to the basics, and try to sharpen my knowledge, to make myself a little better then yesterday. Who knows? someone might just feel the same. If you are one of those, feel free to proceed.

What did I mean by "Path"?

In an Asp.net applications, we either use HTML elements or Server controls for adding several elements (Such as, Image, HyperLink etc.) in the pages. For an <img> element, we need to set an “src” attribute value (Usually, in terms of relative URL path) that points to an image within the application in general. Also, for an anchor <a> element, we need to set an “href” value that points to a resource (Be it a page or an image or a downloadable zip file) within the application directory. These are the attributes that I am referring as “path” in general.

Read more: Codeproject

Posted via email from .NET Info

Windows Graphics Engine Contains Security Flaw

|
Microsoft released a security advisory today concerning Windows Vista, Windows XP and Windows Server 2003.

The flaw is associated with the Windows graphics rendering engine, which improperly parses a specially crafted image file, leading to a stack overflow, according to Microsoft's security advisory 2490606. This remote code execution exploit can be used by a hacker to gain user rights on a system. However, Microsoft's blog describing the problem states that the company isn't aware of any active exploits occurring yet.

The issue is made more acute if the user has administrative rights, which may allow the attacker to modify network settings or change and delete data.

Typically, an attack using this exploit would attempt to get Windows users to click on an e-mail attachment containing a thumbnail image or an instant messaging link. An alternative attack method might be to direct a user to a thumbnail image located on a network sharing space.

The security advisory suggests keeping software updated and using firewalls and antivirus software. It also describes a few workarounds to increase protection, prior to Microsoft's release of patch.

Read more: Microsoft Online

Posted via email from .NET Info

32 Javascript Alternatives with Pure CSS – Updated

|
The pure CSS techniques, outlined in this article, are neither new nor are they ground-breaking. What they do offer is CSS solutions to what would typically and traditionally be associated with Javascript, and as a demonstration that they do exist and could be quite easily used.
Having said all that, we are in no way saying that these techniques are in anyway better than there Javascript equivalent, just an optional alternative and as a proof of concept.

CSS Image Map

pure_css_01.jpg

Pure CSS Timeline
pure_css_02.jpg

Create a Content Slider Using Pure CSS
pure_css_04.jpg

Read more: Speckyboy

Posted via email from .NET Info

הוספה של פונט מקוד - חלק שני

|
א מזמן פרסמתי פוסט - כיצד להוסיף פונט מקוד.
מסתבר שהחברה מפרוייקט אתגר לא נחים - וכרגע הם רוצים להוסיף את הפונט כ - Embedded Resource (כדי שלא יצטרכו להעתיק את הפונט כל פעם יחד עם קובץ ה - exe)
השלב הראשון הוא די פשוט, יש להוסיף את קובץ הפונט ל - Resources.
השאלה הנשאלת כעת: כיצד להוסיף את הפונט, מסתבר שיש מתודה בשם AddMemoryFont, אבל למרבה הצער זה מקבל IntPtr ולכן צריך לכתוב את הקוד הבא:

IntPtr pointer = Marshal.AllocHGlobal(Resources.ahronbd.Length);
Marshal.Copy(Resources.ahronbd, 0, pointer, Resources.ahronbd.Length);
myFonts.AddMemoryFont(pointer, Resources.ahronbd.Length);
Marshal.FreeHGlobal(pointer);

בהנחה ששם הפונט הינו ahronbd.
בהתחלה נגדhר משתנה מסוג IntPtr ונקצה מקום בזיכרון בגודל של המערך.
לאחר מכן נעתיק את הפונט לזיכרון ששמרנו בצעד בקודם.
נוסיף את הפונט ל - Collection.

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

Posted via email from .NET Info

What is the best book on Silverlight 4?

|
Silverlight/Expression 4 Books!

I recently stumbled upon a post asking, “What is the best book on Silverlight 4?” In the age of the internet, it can be hard for anyone searching for a good book to actually find it. I have read a few Silverlight 4/Expression books in 2010 and decided to post the “best of” collection. Instead of reading multiple books, you can cut your list down to whatever category that you fit in. With Silverlight 5 coming soon, now is the time to get up to speed with what Silverlight 4 can offer. Be sure to read the full review at the bottom of each section.

For the “Beginner” Silverlight Developer: Both of these books contains very simple applications and will get you started very fast.

51ucwGaw5gL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU01_.jpg51wY7fCNRNL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU01_.jpg

Read more: Michael Crump

Posted via email from .NET Info

Select TOP With TIES in SQL Server

|
The SQL Server TOP Expression returns only the first set of rows that is either a number or a percent of rows. If you want additional rows to be returned from the base result set if duplicate values exists in the qualified set of results, then use TOP..WITH TIES as shown in the example below:

USE Northwind
GO
-- TOP vs TOP WITH TIES
-- By SqlServerCurry.com

-- Using TOP Expression
SELECT TOP 3
OrderID, UnitPrice, Quantity
FROM [Order Details]
ORDER BY Quantity DESC

-- Using TOP WITH TIES
SELECT TOP 3 WITH TIES
OrderID, UnitPrice, Quantity
FROM [Order Details]
ORDER BY Quantity DESC

Read more: SQL Server curry

Posted via email from .NET Info

Mono for Android

|
mono-android.png

Now that we feel that we have fixed all the embarrassing bugs in Mono for Android, so we have opened up our Mono for Android preview program to anyone that wants to take it out for a spin.

Mono for Android brings the full Mono VM to Android. We use a library profile that is better suited for mobile devices, so we removed features that are not necessary (like the entire System.Configuration stack, just like Silverlight does).

In addition to bringing the core ECMA VM to Android, we bound the entire set of Android Dalvik APIs to C# and in the process C#-ified them. This includes using C# properties for metadata (less XML config file messing around), exposing C# events, C# properties, strongly typed generic types where necessary, implicit conversions where needed, using the C# API style, IEnumerable where appropriate (to let you LINQ over your Dalvik, and we turn IIterable into IEnumerables for you).

On the OpenGL front, we brought the same OpenTK library that is popular among .NET developers on both Windows, Linux and iPhone, so you can share the same OpenGL logic across all platforms.

Read more: Personal blog of Miguel de Icaza

Posted via email from .NET Info

הטריקים שממציאים את לוח הכפל מחדש

| Tuesday, January 4, 2011
הצלבת קווים, מעוינים ועיגולים: סרטונים ביוטיוב מציעים טכניקות מוזרות ומעניינות להכפלת מספרים במהירות. מה הן שוות באמת?

נניח שקיבלתם לפתור את התרגיל 21x13=?, תוך היעזרות בדף ועפרון בלבד (הו, האימה!). איך תעשו זאת? חלקכם לא יזדקקו לנייר כלל, כי עם כל הכבוד, חישובים ברמת מורכבות כזו אפשר לעשות גם בראש: 21 כפול 10 זה 210, ו-21 כפול 3 זה 63, וביחד 273. אחרים, זהירים יותר או חסרי ביטחון, יכתבו את המספרים האחד מעל השני, יכפילו ספרות בודדות על סמך לוח הכפל תוך הזחה שמאלה כמו שלמדנו בבית ספר, יסכמו את התוצאות הנפרדות ויגיעו לאותה תשובה. לגיטימי. אבל איך הייתם פותרים את התרגיל אם הייתם יפנים?

53211.jpg

Read more: Nana10

Posted via email from .NET Info

Use SFTP Protocol for Communication with Secure FTP Servers

|
What’s new in this release?

The new version of Aspose.Network for .NET 6.0.0 has been released. This new Release supports SFTP protocol for communication with secure FTP servers. SFTP uses SSH file transfer protocol usually on port 22. The new and improved features added in this release are listed below

SFTP protocol support for ftp servers
Add DeliveryTime property in MapiMessage class
Add DeleteFolder() method to ExchangeWebServiceClient
MSG saved from Outlook 2007 shows attachments in LinkedResources
Issues are resolved with parses eml addresses without displaying the name
Image Attachments in EML file are saved as junk file issue is resolved
Other most recent bug fixes are also included in this release.

Read more: ASP .NET Forum

Posted via email from .NET Info

HowTo: have Visual Studio open XAML documents in code view

|
4403.fullxamlview_5F00_thumb_5F00_0C012F5B.png

Just a small post to start the new year... and let it be a good one!

When opening a XAML document in Visual Studio, it opens in split view by default. This might become annoying when you have a large XAML document, because all the content needs to be rendered before you can get some work done.

Here’s how you can have Visual Studio open XAML documents in code view:

Go to Tools, Options
Under Text Editor open the XAML section and select Miscellaneous
Under Default View check the Always open documents in full XAML view box (see image below)
Click OK to apply and you’re all done!
Hope this helps.

Read more: Rick van den Bosch - Blog

Posted via email from .NET Info

Fireworks theme for Windows 7

|
0820.image_5F00_47B816AF.png

So if you want to remember the new year with the usual fireworks then download the Fireworks theme for Windows 7. “Give a cheer, 2011 is here. Spark your New Year with these images of celebratory fireworks around the world in this Windows 7 theme.”

Read more: I'm PC

Posted via email from .NET Info

World of Warcraft hits Kinect

|
184_22826_World-of-Warcraft-Kinect-Video.jpg?i=1294137945

University project allows gamers to play WoW with Microsoft’s motion controller. US researchers have managed to adapt Kinect and use it to control Blizzard’s MMO behemoth World of Warcraft. An Institute for Creative Technologies team working out of the University of Southern Carolina have developed FAAST – middleware that translates physical gestures to in-game actions through Microsoft’s motion controller, according to Wired. FAAST stands for Flexible Action and Articulated Skeleton Toolkit and works in a similar way to custom keyboard mappings. The build that has been demonstrated uses left hand motions to control the camera, right hand ones to select attacks, and hunching for character movement. However, the team’s leader Evan Suma admitted the system is limited and not ideally suited to prolonged WoW sessions.

Read more: MCV

Posted via email from .NET Info

Playing Midi Files with DirectMusic

|
Introduction

This article focuses on the use of CMidiMusic which allows an easy access to DirectX DirectMusic API. This class allows loading and playing general midi sequence files(.mid). The class is designed to perform midi playback in one segment and offers additional features like using any midi port installed in your system, 3D sound environment, sound effects, etc.

Direct Audio Specifications

The DirectX 8.0 Audio part offers improved integration between DirectSound and DirectMusic, including a great set of new features. Some of these are listed hereafter:

The last version of Direct Audio allows using hardware acceleration for sound synthesis.
With the new AudioPath model, the sound of a port does not go directly to a directsound buffer, instead, it goes to an audiopath which controls data flow from a performance to the final output. The audiopath allows controlling the 3D position of each sound and adding other effects.
The segments are modified independently and you can apply effects like pan, volume, individually.
It allows using DLS2 (Downloadable sound level 2 standard) which provides a great sound quality and unlimited use of instruments with the software synthesizer.
FX (Reverb, Chorus...) if it is available in the software synthesizer.
It overcomes the 16 midi channels limit, allowing the use of as many midi channels as the software is able to handle.
The playback can be controlled accurately in run time by selecting different sets of musical variations and changes in the chords progress.
3D Positioning.

Main Interfaces of DirectMusic

IDirectMusic8: This interface allows managing buffers and ports. There should only exist one instance of this interface per application.
IDirectMusicPerformance8: This is the most important interface in playback management. It is used to add and remove ports, play segments, notify event reception, control music parameters and obtain timing information.
IDirectMusicPort8: This interface provides access to DirectMusicPorts objects like MPU-401 or the software synthesizer.
IDirectMusicSegment8: This interface represents a segment, musical piece made up of multiple tracks. It can contain a midi file, a wave, a segment.
IDirectMusicLoader8: Its main function is to find and load the different objects. These objects are to be stored in a segment.
IDirectMusicSegmentState8: The (playback) engine creates a SegmentState object which allows analyzing the state of the segment currently playing.
IDirectMusicAudioPath8: The IDirectMusicAudioPath8 interface represents the stages of data flow from the data file to the primary buffer.
DirectMusic Architecture

Once a resource has been loaded in a segment, the performance dispatches the messages defined by a tool of an application, such tools are grouped in toolgraphs which process specific segment messages. A tool can modify a message and pass it on, delete it, or send a new message.

Finally, the messages are delivered to the output tool, which converts the data to MIDI format before passing it to the synthesizer. Channel-specific MIDI messages are directed to the appropriate channel group on the synthesizer. The synthesizer creates sound waves and streams them to a device called a sink, which manages the distribution of data through buses to DirectSound buffers.

Read more: Codeproject

Posted via email from .NET Info

Walkthrough: Request a Digital Certificate from Certificate Server or create a testing Digital Certificate to sign a Package

|
This topic describes how to request a digital certificate from a certificiate server(CA), or create a testing only digital certificate, and then use the digital certificate to sign an Integration Services package.

Request a Code Signing certificate using the Active Directory Certificate Services web interface.
1. Open the Internet Explorer(IE)
2. Type the URL for the Active Directory Certificate Services web interface(e.g. http(s)://CAServerName/certsrv, where CAServerName is the DNS name of your CA server).
3. Click "Request a certificate" in the home page.
4. In the new page, click "advanced certificate request"
5. In the new page, click "Create and submit a request to this CA"
6. In the "Advanced Certificate Request" page, select "Code Signing" from the "Certificate Template", and then fill the other options(Optional)
7. Click "Submit" to request and install the certificate.
Request a Code Signing certificate using Certificate Management Console
1. Open the Management Console(MMC) by typing "mmc" in the Start > Run
2. In the MMC windows, click "File", and then click "Add/Remove Snap-in..."
3. In the "Add or Remove Snap-ins" dialog, please select "Certificates"
4. Click "Add>"
5. In the coming dialog "Certificates snap-in", select "My user account", and then click "Finish".
6. Click "OK"
7. Expand the Certificates
8. Right-click "Personal", and then select "All Tasks" > "Request a New Certificate"
9. In the "Certificate Enrollment" dialog, click "Next"
10. In the "Select Certificate Enrollment Policy", please select the available template, and then click "Next".
11. Now, the "Request Certificates" is shown. Please select "Code Signing", and then click "Enroll".
12. In the next dialog, click "Finish" to finish the request. The certificate will be installed to the Personal store automatically.
Create your own Code Signing certificate
1. Open the Command window.
2. Create a root certificate using the following command:
makecert -n "CN=SSIS Root Certificate" -a sha1 -eku 1.3.6.1.5.5.7.3.3 -r -sv root.pvk root.cer -ss Root -len 1024 -sr localMachine

3. Create a client certificate using the following command.
makecert -pe -n "CN=SSIS Code Signing Certificate" -ss MY -a sha1 -eku 1.3.6.1.5.5.7.3.3 -iv root.pvk -ic root.cer


Read more: SQL Server Forum Support Team

Posted via email from .NET Info

PathListBox: making rockin' animations

|
This is the second post on Silverzine about PLB (PathListBox). If you missed the first one check it out here: PathListBox Getting Started.

Ok lets check out how to make some animations using a PLB. There is so many possibilities on what you could do with this control when animating, I am just going to cover a few of the main ones, but experiment with everything because there is a lot more to be discovered.

So in this example, I have made a simple path with the pen in the shape of a circle (tip: create a circle shape and then trace around it with the pen), note that the ends of my circle are not connected.

racecarPath.jpg

Read more: SilverSize

Posted via email from .NET Info

How Twitter Uses NoSQL

|
InfoQ has released a video of Twitter's Kevin Weil speaking at Strange Loop earlier this year on how the company uses NoSQL. Weil is quick to point out that Twitter is heavily dependent on MySQL. However, Twitter does employ NoSQL solutions for many purposes for which MySQL isn't ideal. According to Weil, Twitter users generate 12 terrabytes of data a day - about four petabytes per year. And that amount is multiplying every year. Read on for our notes on Weil's talk.

Scribe
Syslog stopped scaling for Twitter after a while, so instead it uses Scribe, a log collection framework created and open-sourced by Facebook. Twitter has contributed some of its own patches to Scribe.

Twitter uses Scribe to write logs to Hadoop. Scribe made it so easy for Twitter to log data, it started to log much more data. It now logs 80 different categories of data.

Hadoop
Twitter needs to store more data per day than it can reliably write to a single hard drive, so it needs to store data on clusters. Twitter uses Cloudera's Hadoop distribution to power its clusters.

Weil says MySQL isn't efficient at doing analytics at the scale Twitter needs. Instead, Twitter uses Hadoop and its own open source project called FlockDB. Hadoop can run analytics and hit FlockDB in parallel to assemble social graph aggregates.

Pig

Read more: ReadWrite cloud

Posted via email from .NET Info

R.U.S.E gets Kinect support

|
This video shows how the PC game R.U.S.E. is controlled by Microsoft Kinect based on the Evoluce multi-gesture software for depth-sensing sensors. Gamers will like the idea to control almost any PC game with the Kinect controller or similar devices.

Read more: Wolfgang Herfurtner

Posted via email from .NET Info

Control Styles and Templates

|
Silverlight
Silverlight uses default styles and templates for several controls. You can copy these styles and templates into your project and modify them in order to customize control behavior and appearance. For more information, see Customizing the Appearance of an Existing Control by Using a ControlTemplate.

In This Section
AutoCompleteBox Styles and Templates
Shows the default style and template for the AutoCompleteBox control.

Button Styles and Templates
Shows the default style and template for the Button control.

Calendar Styles and Templates
Shows the default style and template for the Calendar control.

CheckBox Styles and Templates
Shows the default style and template for the CheckBox control.

ChildWindow Styles and Templates
Shows the default style and template for the ChildWindow control.

ComboBox Styles and Templates
Shows the default style and template for the ComboBox control.

ContentControl Styles and Templates
Shows the default style and template for the ContentControl control.

DataGrid Styles and Templates
Shows the default style and template for the DataGrid control.

DataPager Styles and Templates
Shows the default style and template for the DataPager control.

Read more: MSDN

Posted via email from .NET Info

Hello World in LLVM

|
For some time now, I have been very interested in the compilation process of programming languages and how they are converted to assembly. Naturally, I became very interested in LLVM portable assembly syntax, and how its syntax compares to x86 assembly. It turns out that it is very readable and understandable, unlike the bare bones assembly found when disassembling a program. I found that it is actually a lot easier to analyze x86 assembly after it has been been generated from LLVM as intermediary since the LLVM block labels are commented into the assembly blocks and in general the structure looks very similar. Let us look at an example of a simple hello world program.


@0 = internal constant [20 x i8] c"Hello LLVM-C world!"

declare i32 @puts(i8*)

define void @sayHelloWorld() {
aName:
 %0 = call i32 @puts(i8* getelementptr inbounds ([20 x i8]* @0, i32 0, i32 0))
 ret void
}

Looking through the following example, the global @0 is set with a string. An external function where the body is defined somewhere else needs to be initialized with the declare keyword. A new function, however, needs to be defined along with its body, return type, and parameters. Each function body needs to have at least one label, which in this case is aName. After the block label, the call function is used which calls puts function from an external definition. The function getelementptr returns a pointer to an element specified with certain bounds. When the inbounds keyword is used, access is denied outside of the bounds specified. The register %0 is set with the result of external puts function, and a void is returned. Now I will present the equivalent x86 assembly.


       .section        __TEXT,__text,regular,pure_instructions
       .globl  _sayHelloWorld
       .align  4, 0x90
_sayHelloWorld:                         ## @sayHelloWorld
Leh_func_begin0:
## BB#0:                                ## %aName
       subq    $8, %rsp
Ltmp0:
       leaq    ___unnamed_1(%rip), %rdi
       callq   _puts
       addq    $8, %rsp
       ret
Leh_func_end0:


Read more: Planet of the Ecks

Posted via email from .NET Info

because it is registered in web.config and lives in the same directory as the page

|
הוספה של User Control לעמוד.
במידה ואתם עובדים עם User Controls יש שתי דרכים להשתמש בהם בדפי ה - aspx שלנו.

דרך אחת להוסיף שורת Register בתחילת העמוד:

<%@ Register src="~/UserControl.ascx" tagname="UserControl" tagprefix="uc1" %>

דרך נוספת היא לרשום את ה - UserControl בקובץ ה - web.config, כך:

<system.web>
 <pages>
   <controls>
     <add src="~/UserControl.ascx" tagName="UserControl" tagPrefix="uc1"/>
   </controls>
 </pages>
</system.web>

אני מעדיף את הדרך השנייה, מכיוון שזה חוסך לי להוסיף Register לכל עמוד.

הבעייה:
יש בעייה מוזרה במידה ורושמים את ה - UserControl בקובץ הקונפיג, וגם ה - User Control וקובץ הקונפיג נמצאים באותה תיקייה (כלומר ב - root) נקבל את השגיאה הבאה: (בהנחה של - UserControl קוראים UersControl.ascx ולדף קוראים WebForm1.aspx)

The page '/WebForm1.aspx' cannot use the user control '/UserControl.ascx', because it is registered in web.config and lives in the same directory as the page.

הפיתרון:
להעביר את ה - UserControl לתיקייה אחרת (נניח UC) ואז נכתוב:

<system.web>
 <pages>
   <controls>
     <add src="~/UC/UserControl.ascx" tagName="UserControl" tagPrefix="uc1"/>
   </controls>
 </pages>
</system.web>

למה זה קורה ?

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

Posted via email from .NET Info

שיפור ביצועי דיסק ה-SATA שלכם על-ידי שינוי הגדרת המערכת מעבודה בממשק-IDE לעבודה בממשק-AHCI

|
כידוע, טכנולוגיות SATA (או בקיצור Serial Advanced Technology Attachment) היא הטכנולגיה העכשוית אשר בה משתמשים לחיבור דיסקים קשיחים המיוצרים בשנים האחרונות. ממשק החיבור IDE אשר היה נפוץ עד אז (ובהרבה מחשבים גם כיום), אינו נחשב כסטנדרט יותר.

הגדרת הממשק (SATA או IDE) בה עובד מחשב, נקבעת בהגדרות ה-BIOS. על מנת שתהיה תאימות מירבית לכל הממשקים, רב המחשבים מוגדרים כברירת מחדל לעבודה באמצעות ממשק IDE הפחות מהיר, ומשום כך, כאשר נתקין מערכת הפעלה, המערכת תזהה רק את ממשק ה-IDE ותתאפשר עבודה מול הממשק הזה בלבד ברמת ה-Registry. עבודה בממשק זה מביאה ברב המקרים לירידה בביצועי המערכת.

שינוי הגדרת הממשק ב-BIOS מ-IDE ל-AHCI לאחר התקנת מערכת הפעלה, תגרום להופעת מסך כחול עם קוד שגיאה 0x0000007B ברב המקרים, ולא תתאפשר העלאת מערכת ההפעלה עד לשינוי סוג הממשק בחזרה ל-IDE. הסיבה נעוצה בכך שמערכת ההפעלה לא הכירה את ממשק ה-AHCI בזמן ההתקנה ולא התקינה את מנהלי ההתקן (הדרייבר) המתאים לכך.

לשמחתנו, קיימת אפשרות להתערב קצת ב-Registry ולגרום למערכת ההפעלה לזהות את הממשק החדש ולהפעיל את מנהל ההתקן המתאים.

לפני שתמשיכו… שינוי שגוי ב-Regisrty עלול לגרום למערכת ההפעלה שלא לעלות ותדרש התקנה מחדש של מערכת ההפעלה. בצעו גיבוי ל-Registry לפני שתמשיכו בתהליך.

הפעילו את יישום ה-Registry על-ידי לחיצה על התחל – הפעלה (או בשרות החיפוש ב-Windows Vista/7) וכתיבת המילה regedit ולחיצה על לחצן אישור. כאשר נפתח ה-Registry, חפשו את המפתח הבא:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\msahci

image_thumb_3C09516A.png

Read more: Lets blog with Regev

Posted via email from .NET Info

Boost's shared_ptr up to 10× slower than OCaml's garbage collection

|
Our recent post about the merits of accurate garbage collection over reference counting prompted Tezka to ask for measurements demonstrating the performance differences between an accurate GC and the reference counted shared_ptr smart pointers provided by the Boost C++ library.

The benchmarks we have been using to prototype allocators for our HLVM project provide the perfect setting for such an experiment. We already have C++ code that solves the n-queens problem using logic programming with a variety of different allocation strategies. Adding another version of our benchmark using Boost's shared_ptr gave the following remarkable results:

Posted via email from .NET Info

VS 2010 SP1 (Beta) and IIS Express

|
Last month we released the VS 2010 Service Pack 1 (SP1) Beta.  You can learn more about the VS 2010 SP1 Beta from Jason Zander’s two blog posts about it, and from Scott Hanselman’s blog post that covers some of the new capabilities enabled with it.

You can download and install the VS 2010 SP1 Beta here.

IIS Express

Earlier this summer I blogged about IIS Express.  IIS Express is a free version of IIS 7.5 that is optimized for developer scenarios.  We think it combines the ease of use of the ASP.NET Web Server (aka Cassini) currently built-into VS today with the full power of IIS.  Specifically:

It’s lightweight and easy to install (less than 5Mb download and a quick install)
It does not require an administrator account to run/debug applications from Visual Studio
It enables a full web-server feature set – including SSL, URL Rewrite, and other IIS 7.x modules
It supports and enables the same extensibility model and web.config file settings that IIS 7.x support
It can be installed side-by-side with the full IIS web server as well as the ASP.NET Development Server (they do not conflict at all)
It works on Windows XP and higher operating systems – giving you a full IIS 7.x developer feature-set on all Windows OS platforms
IIS Express (like the ASP.NET Development Server) can be quickly launched to run a site from a directory on disk.  It does not require any registration/configuration steps. This makes it really easy to launch and run for development scenarios.

Visual Studio 2010 SP1 adds support for IIS Express – and you can start to take advantage of this starting with last month’s VS 2010 SP1 Beta release.

Downloading and Installing IIS Express

IIS Express isn’t included as part of the VS 2010 SP1 Beta.  Instead it is a separate ~4MB download which you can download and install using this link (it uses WebPI to install it).

Once IIS Express is installed, VS 2010 SP1 will enable some additional IIS Express commands and dialog options that allow you to easily use it.

Enabling IIS Express for Existing Projects

Visual Studio today defaults to using the built-in ASP.NET Development Server (aka Cassini) when running ASP.NET Projects:

image_thumb_3DE44046.png

Read more: ScottGu's Blog
Read more: IIS Express

Posted via email from .NET Info

136 Best Email Templates

|
Whether Free Email Templates or Premium Email Templates, they are fast becoming a necessity for current Global marketing. It can be highly thought-provoking to capture, retain and sustain the prospective clients with email campaigning. Email Templates ought to be striking enough to capture new readers, but it should also not loose on content part if you want your readers to have a long and fruitful relation with you.

In today’s post we are featuring you 136 Best Email Templates around the web. As some email templates are Free and some are Premium email templates, you are requested to check the commercial terms mentioned on the site of the Email Template you choose, before actually using it for your personal or commercial use. So go ahead with your one of the most effective marketing and communication tool.

10_Screenshot.jpg   01_Image.jpg

Read more: Slodive

Posted via email from .NET Info

Apache Subversion To WANdisco, Inc: Get Real.

|
The Apache Subversion project has just had to remind one of its corporate contributors about the rules of the road. WANdisco, Inc was putting out some very odd press releases and blog posts, implying (among other things) that their company was in some sort of steering position in the open source project. Oops — that's not the Apache Way. The Apache Software Foundation has reminded them of how things work. Meanwhile, one of the founding developers of Subversion, Ben Collins-Sussman, has posted a considerably more caustic take on WANdisco's behavior.

Read more: Slashdot

Posted via email from .NET Info

ejabberd

|
The ejabberd instant messaging server is software to communicate and collaborate in real-time between two or more people based on typed text. For example, ejabberd can be used by:

  • Businesses to secure business communication and to improve collaboration efficiency
  • Developers to obtain or improve Erlang programming skills
  • Hosting providers to provide high-available instant messaging services to its customers
  • Individuals to toy with instant messaging software

Read more: ejabberd

Posted via email from .NET Info

sdchat

|
SDChat stands for Secure and Decentralized Chat. SDChat is both a protocol and a stack of portable libraries and programs that implement the protocol.

The purpose is to create networks using GPG and RSA for secure chatting (which doesn't mean anonymously).
Anonymity can be achieved using proxies, Tor and secure networks.

Security → The protocol is based on public key exchange (currently only GPG) and signed data to verify the provenience of messages.
Decentralized → The network is based on nodes connected each other. Each node filters or drops data coming from unknown sources, i.e. from unknown/untrusted public keys.
Chat → The base of the protocol is for chat, but it's been designed to be extensible with other protocols.


Read more: sdchat

Posted via email from .NET Info

Prosody IM

|
Prosody is a modern flexible communications server for Jabber/XMPP written in Lua. It aims to be easy to set up and configure, and light on resources. For developers it aims to be easy to extend and give a flexible system on which to rapidly develop added functionality, or prototype new protocols.

Prosody is licensed under the permissive MIT/X11 license.

Read more: Prosody

Posted via email from .NET Info

Paint.NET PSD Plugin

| Monday, January 3, 2011
This is a Paint.NET plugin for loading and saving Photoshop .PSD files. It was written by Frank Blumenberg in 2006, and has been maintained by Tao Yue since 2010.
Tao's web page: http://www.taoyue.com/
Tao's email address: taoyue@alum.mit.edu

If you'd like to contribute towards the development of the PSD plugin, donations are accepted via PayPal: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FNX5QVJX43HC2

Installation
Simply unzip and move PhotoShop.dll to the "FileTypes" folder in the directory where Paint.NET is installed.

Discussion
We do not use the Discussion forum on Codeplex, since Paint.NET already has a forum where users gather for discussion. There is a thread for this PSD plugin on the official Paint.NET forums: http://forums.getpaint.net/index.php?/topic/18128-photoshop-psd-file-plugin-107-and-later/

To be notified of new releases, you may subscribe either to the discussion thread, or to the relevant RSS feeds on Codeplex.

Bug Reporting and Patches
Bug reports are welcomed. Interchanging PSD files reliably with Adobe Photoshop is the raison d'être of the plugin. Improving reliability is of much higher priority than features. Please submit bug reports through the Issue Tracker on Codeplex. If you are not an experienced tester/developer, please first read "How to Report Bugs Effectively," by Simon Tatham. http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

Patches and other contributions are also welcomed. I would prefer that you discuss the patch beforehand with me so that I know what's coming. I might also be able to offer advice on the best way to go about making the change with the least disruption to the codebase. Please click the "Contact" link on my Codeplex page: http://www.codeplex.com/site/users/view/taoyue

Features
Layers
Masks (loading only: merged into the layer)
RLE-compressed files
The following color modes can be loaded.
32 Bit-RGBA
Gray scale
Indexed
CMYK
Multichannel CMY
Duotone (as gray scale)
Lab
Only RGBA images are saved out, since Paint.NET uses RGBA internally.

Limitations
The filetype plugin does not include every feature in the PSD file format. Only those elements in PSD that have counterparts in Paint.NET are implemented. For example: Text layers, layer effects, and vector masks do not exist in Paint.NET. PSD files with these features may load using the plugin, but a number of elements will be missing.

Read more: Codeplex

Posted via email from .NET Info

To ref or not to ref

|
So the question is what is the point of passing a reference type along with the ref keyword?

Scenario 1:

I have an Employee class as below.

public class Employee
{

public string FirstName { get; set; }
public string LastName { get; set; }
 
public override string ToString()
{
return string.Format("{0}-{1}", FirstName, LastName);
}
}

In my calling class, I say:

class Program
{

static void Main()
{
Employee employee = new Employee
{
FirstName = "John",
LastName = "Doe"
};
Console.WriteLine(employee);
CallSomeMethod(employee);
Console.WriteLine(employee);
}
private static void CallSomeMethod(Employee employee)
{
employee.FirstName = "Smith";
employee.LastName = "Doe";
}
}

After having a look at the code, you’ll probably say,

Well, an instance of a class gets passed as a reference, so any changes to the instance inside the CallSomeMethod, actually modifies the original object. Hence the output will be ‘John-Doe’ on the first call and ‘Smith-Doe’ on the second.

And you’re right:

image_thumb_46D10B55.png

So the question is what’s the use of passing this Employee parameter as a ref?

Read more: IBloggable - implemented

Posted via email from .NET Info