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

Hitwise: Facebook Overtakes Google To Become Most Visited Website In 2010

| Thursday, December 30, 2010
screen-shot-2010-12-29-at-2-56-32-pm.png

According to Hitwise data released today, Facebook.com was the top visited website in the US in 2010, taking up 8.93% of site visits between January and November 2010. Google.com came in second at 7.19%, Yahoo Mail is third with 3.52% and Yahoo.com is fourth at 3.30%. YouTube came in fifth at 2.65 %.

While Hitwise came to the same conclusion back in March, this is the first time Facebook has been named most visited site of the year (crowding out last year’s winner Google).

Read more: Techcrunch

Posted via email from .NET Info

The 20 Best How-To Geek Linux Articles of 2010

|
We might be known for our Windows articles, but in 2010 we sure posted a lot of really in-depth articles covering Linux. Here’s the 20 best articles that we covered this year, covering everything from how to tweak your setup to how to use Linux to fix Windows.

Recover Data Like a Forensics Expert Using an Ubuntu Live CD
Move Window Buttons Back to the Right in Ubuntu 10.04 / 10.10
How to Create Your Own Customized Ubuntu Live CD
HTG Explains: Which Linux File System Should You Choose?

Read more: How-to-geek

Posted via email from .NET Info

22 Awesome Windows 7 Themes

|
Windows themes are always downloaded as hot cakes. And with the launch of Windows 7, Windows 7 themes are in big demand. Windows 7 Themes have been released both by Microsoft and other parties as well. Windows 7 is developed keeping in mind users views and reviews so it is quite user friendly and light to load.

windows_strata40_by_s_u_p_r_e_m_e-d2nxpi2.jpg  windows_phone_7_theme_by_pauliewog260-d33rn78.jpg


Read more: slodive

Posted via email from .NET Info

Hackers claim discovery of PS3 'private key,' enabling unauthorized code [Update]

|
During the ongoing Chaos Communication Conference 27C3, the hackers responsible for the Wii's Homebrew Channel, calling themselves fail0verflow, gave a presentation in which they claimed to have figured out the "private key" used by Sony to authorize code to run on retail PS3 systems. This means, as a PSX-Scene forum post puts it, giving a hacker "full control of the PS3 system," without the use of a USB device.

The group will explain more when its website launches, and also plans to show a demo tomorrow at the conference. This hack is designed not to enable PS3 game piracy (though it might have that effect) but, according to a tweet by fail0verview, to enable Linux to run on all PS3s, "whatever their firmware versions."

Read more: joystiq

Posted via email from .NET Info

IE9'S INDEXEDDB PROTOTYPE IMPLEMENTATION

|
WIth HTML5 Labs we HTML5 prototype implementations. I have me the implementation IndexedDB viewed. First you have to ask yourself how you can expand the JavaScript functionality of Internet Explorer? The answer is: Component Object Model or COM shortly.

Installation

The implementation comes with two COM objects, therefore, the use under the hood of the SQL Server Compact 4th Once with a synchronous interface and the asynchronous version. The installation of the prototype is easy. First, you download the package, then to register dll in a command window elevates the appropriate COM using regsvr32.

 regsvr32 sqlcejse40.dll
After registering, you have the privileged IE9 but also start to work with the prototype.

It always requires a initialization. Finally, the functionality in the COM component is inside and we would all use of JavaScript. The package comes with such a script and called bootidb.js. A look into the appropriate line of code tells us also the window element according to a property indexedDB is added to the:

 1: if (! Window.indexedDB) {
 2: window.indexedDB = new ActiveXObject ("SQLCE.Factory.4.0");
 3: window.indexedDBSync = new ActiveXObject ("SQLCE.FactorySync.4.0");


What I never was so aware of the possibility of any viable IDispatch object in the HTML DOM to plug the browser. Looking at times that is the type library of COM objects we see the methods which we finally used directly from JavaScript:

  1: [
  2:   odl,
  3:   uuid(567270C8-E61A-4A8D-9C2E-2D2EC47D8704),
  4:   helpstring("ObjectStore - Asynchronous interface"),
  5:   dual,
  6:   nonextensible,
  7:   oleautomation
  8: ]
  9: interface IDBObjectStoreRequest : IDBObjectStore {
 10:     [id(0x60040000)]
 11:     HRESULT put(
 12:                     [in] VARIANT value,
 13:                     [in, optional] VARIANT key,
 14:                     [out, retval] IDBRequest** ppWebRequest);
 15:     [id(0x60040001)]
 16:     HRESULT add(
 17:                     [in] VARIANT value,
 18:                     [in, optional] VARIANT key,
 19:                     [out, retval] IDBRequest** ppWebRequest);
 20:     [id(0x60040002)]
 21:     HRESULT get(
 22:                     [in] VARIANT key,
 23:                     [out, retval] IDBRequest** ppWebRequest);
 24:     [id(0x60040003)]
 25:     HRESULT remove(
 26:                     [in] VARIANT key,
 27:                     [out, retval] IDBRequest** ppWebRequest);
 28:     [id(0x60040004)]
 29:     HRESULT createIndex(
 30:                     [in] BSTR name,
 31:                     [in] BSTR keyPath,
 32:                     [in, optional] VARIANT unique,
 33:                     [out, retval] IDBRequest** ppWebRequest);
 34:     [id(0x60040005)]
 35:     HRESULT index(
 36:                     [in] BSTR indexName,
 37:                     [out, retval] IDBRequest** ppWebRequest);

Read more: Dariusz quatscht (original in German)
Read more: Dariusz quatscht (translated to English)

Posted via email from .NET Info

4 Reasons Why Virtual Router is Superior to Connectify

|
Over a year ago I launch the Virtual Router project, and over that time it has become fairly popular! Virtual Router is downloaded nearly 7,000 time per week!

Download Virtual Router Here!

Virtual Router is a free, open source software based router for PCs running Windows 7 or Windows Server 2008 R2. Using Virtual Router, users can wirelessly share any internet connection (Wifi, LAN, Cable Modem, Dial-up, Cellular, etc.) with any Wifi device (Laptop, Smart Phone, iPod Touch, iPhone, Android Phone, Zune, Netbook, wireless printer, etc.) These devices connect to Virtual Router just like any other access point, and the connection is completely secured using WPA2 (the most secure wireless encryption.)

Virtual Router is superior to Connectify because it is:

  • Open Source
  • Not Ad-Supported
  • ...

Read more: Chris Pietschmann

Posted via email from .NET Info

Silverlight: Reading from a File Contained in your XAP

|
The approach you take to reading from a file that is contained in your XAP is different from one you might take reading a file that is on a server or one that you have copied over to your ClientBin (which could be done using WebClient).

To do this first add the file to your Silverlight project and set the Build Action for this file to be of type Resource.

Next, create a URI that points to the file like I do below and create a StreamResourceInfo from the URI.

Uri uri = new Uri("SilverlightApplication6;component/MyFile.txt", UriKind.Relative)
StreamResourceInfo streamInfo = Application.GetResourceStream(uri);

Replace SilverlightApplication6 above with the namespace used in your Silverlight application. Replace MyFile.txt with the name of your file you added to your Silverlight project.

Next, get the Stream object from StreamResourceInfo and you can then create a StreamReader from the Stream.

if (null != streamInfo)
{
   Stream stream = streamInfo.Stream;
   StreamReader sr = new StreamReader(stream);

Read more: Everything Silverlight

Posted via email from .NET Info

USING COM OBJECTS FROM ASP.NET

|
I got the following question yesterday:

Hi, I created a web application in which I am generating a ms-word document using Microsoft.Office.Interop.Word dll. The application is running fine in the visual studio but when I tried to run on IIS 5.0 through virtual directory then its giving the following error – Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005. In my application I have taken reference of Microsoft Word 12.0 Object Library, but its coming as Microsoft.Office.Interop.Word dll, this interop dll is just a wrapper of the actual word COM dll. But I have to register the actual word COM dll. so my problem is to find – 1) The path of the original word dll(COM) 2) How to register this dll, either using regsvr32 or to register on IIS. OR there will be any other solution. I have gone through many forums but did’nt get any solution. If you have any idea/suggestion on COM Word components please revert me back.


First, you really shouldn’t be using COM from ASP.NET.  That’s not to say that you can’t, but there are so many issues when you do this that you are really better off avoiding it if at all possible. Find a third party dll that is written in .NET.

Second, I’d be willing to bet that when you developed this application, you developed it as a file based project instead of developing it under IIS.

You always want to develop your web applications under IIS so that you run into these types of problems while you are developing instead of after the fact.  If your operating system doesn’t have IIS available, upgrade to one that does!

The error message, is telling you that you don’t have permissions to run the COM object.  This was easily found using Google to search for the error code along with some possible solutions.

The problem is that ASP.NET is not running as a user that has access to the COM object.  In fact, ASP.NET can’t run any code outside of the virtual directory you created the application in by design.  You COULD grant the ASPNET_WP user access to the COM objects, but I would recommend against that for security reasons.

Read more: .NET ANSWERS

Posted via email from .NET Info

גרסאות קודמות – לרשותכם בעת צרה

|
שלום לכולם, כאן דן מצוות התמיכה של Microsoft ישראל.

כולנו נתקלנו בסיטואציה בה נמחק לצמיתות קובץ בעל ערך רב ממערכת ההפעלה שלנו. ערכו של הקובץ יכול להיות פיננסי - כגון מסמך חשוב או הודעות דואר אלקטרוני מתיבת ה-Outlook שלכם, והוא יכול להיות חשוב לא פחות, כמו התמונות של הנכדים.

מערכות ההפעלה של Microsoft, Windows Vista ו- Windows 7, צוידו במנגנון מתוחכם 
שנקרא "גרסאות קודמות" (Previous Versions). 

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

מנגנון הגרסאות הקודמות משתמש בזיכרון בדיסק הקשיח שלכם, המוקצה מראש לצורך פעולות הגיבוי. 
כברירת מחדל, מערכת ההפעלה תקצה כ-15% משטח הדיסק לצרכי הגיבוי של מנגנון הגרסאות הקודמות (המשלב בתוכו גם את מנגנון שחזור מערכת).

על מנת להתאים אישית את גודל שטח הדיסק שיוקצה לגיבוי, ניתן לעקוב אחר צעדים 6-16.
הפעלת המנגנון הינה פשוטה למדי, והיא זהה במערכות ההפעלה Windows 7 ו-Windows Vista. בשלב זה אציין, כי מערכת ההפעלה לא מגבה כברירת מחדל את כלל הקבצים האישיים - אופן הגיבוי ותכיפותו, תלויים במיקום הקבצים בדיסק הקשיח שלכם ובגודל השטח המוקצה למנגנון לצורך פעולות הגיבוי.

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

1.    על מנת לנסות ולשחזר את המידע שאבד, יש ראשית לבחון היכן היה הקובץ ממוקם. 
אתרו את התיקייה בה אחסנתם את הקובץ.

משתמשי Windows 7 שימו לב! – במידה והקובץ נשמר בספרייה, ובמידה ושיניתם את הגדרות המיקומים של אותה הספרייה (Locations) – יש לבחון מה היה מיקומו המדויק של הקובץ.
אם הקובץ אוחסן בשולחן העבודה שלכם, תוכלו לגשת אל התיקייה בנתיב הבא:
C:\Users\USER\Desktop, כש- USER= שם המשתמש שלכם

2. נקליק באמצעות הלחצן הימני של העכבר על התיקייה בה אוחסן הקובץ. בתפריט שיפתח, נבחר 
במאפיינים (Properties). שימו לב כי מדובר בתיקייה עצמה ולא בקיצור דרך המקשר אליה.

Read more: Support Blog

Posted via email from .NET Info

AJAX and the ASP.NET 2.0 Callback Framework

|
Interaction with a Web application can be initiated via a synchronous page postback or an out-of-band postback, known as a client callback, from the client to the server.  The default ASP.NET Web page model uses synchronous page postbacks, which are usually triggered on the client by submitting an html form.  During a page postback, the Web page and controls are recreated and a new version of the entire Web page is rendered on the client.  In addition, most of the application logic is present on the server-side.   Unfortunately page postbacks often introduce a great deal of processing overhead which can decrease performance.  Since the entire page must be reconstructed via a synchronous request to the server, the client must wait for a response to continue working.  On the other hand, client callbacks can improve performance and enhance the end user experience when working with a Web application.   Callbacks utilize a set of technology standards commonly referred to as AJAX (Asynchronous JavaScript and XML).

AJAX includes:
Presentation content using XHTML and CSS
Dynamic display and interaction with XHTML (DHTML) using the Document Object Model (DOM)
Data interchange using strings, often in XML format
Asynchronous data retrieval using an http request object
JavaScript - to bind everything together

Client callbacks can be synchronous or asynchronous.  In either case, the browser creates a new connection to send the callback to a remote server, thus the callback is out-of-band.  The contents of the entire page do not need to be submitted, so the page lifecycle for a callback skips events associated with rendering page contents on the server.   In addition, sending an asynchronous callback to a server permits an end user to continue working in the client application while the request is processed.  When the response is returned, the appropriate content in the Web page is updated without refreshing the entire page.  The diagrams below illustate the difference between synchronous and asynchronous communication between a client application and a server.

Synchronous
sync.png

Asynchronous
async.png

Posted via email from .NET Info

How It Works: Error 18056 - The client was unable to reuse a session

|
This message has come across my desk a couple of times in the last week and when that happens I like to produce blog content.  

The error is when you are trying to use a pooled connection and the reset of the connection state encounters an error.   Additional details are often logged in the SQL Server error log but the 'failure ID' is the key to understanding where to go next.

Event ID:           18056
Description:     The client was unable to reuse a session with SPID 157, which had been reset for connection pooling. The failure ID is 29. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.

Read more: CSS SQL Server Engineers Part 1, Part 2

Posted via email from .NET Info

GWF beta released! (w/full source) - a unique approach to web application development

|
GWF was created for the following reasons
  1. To simplify web application development with built-in support for many of the tasks we do over and over again
  2. To serve as a more complete example of what can be accomplished with Gaia Ajax - the best ajax library for ASP.NET!
  3. To illustrate the powerful DRIMR technology with a concrete example of it's benefits
GWF had the following design goals in mind
  1. Document based storage approach (JSON)
  2. Drag&Drop page composition with instant loading
  3. Use Convention over Configuration
  4. Dynamic Discovery of resources and definitions
  5. Simple and convenient API for developers
  6. Easy to extend
  7. Also licensed under GPL

Read more: GAIAWARE

Posted via email from .NET Info

ADOBE “MOLEHILL” 3D API VIDEOS

|
In the wake of the Adobe Flash “Molehill” 3D API being unveiled at AdobeMax this year, interest in 3D Flash has exploded. Rather than bore you with why I think this is so interesting (though I must mention that it uses the GPU), here’s some videos to give you an idea of how incredible this API is going to be

Read more: Savagelook.com

Posted via email from .NET Info

Cosmos C# Open source operation system

|
FileDownload.aspx?ProjectName=Cosmos&DownloadId=68007&Build=17450

   Cosmos (C# Open Source Managed Operating System) is a complete operating system built from the ground up in C#. Cosmos currently only runs on x86 and x64 processors, but we are investigating many other platforms, including ARM processors, Apple's iPhone, and the Nintendo Wii.

Read more: Codeplex

Posted via email from .NET Info

Possible issue where .NET Framework 4 setup reports success but fails to update mscoree.dll behind the scenes

|
I have heard from a few customers since the release of the .NET Framework 4 who have installed the .NET Framework 4 on Windows Vista or higher and setup reported success, but they see an error when running the .NET Framework setup verification tool.  I wanted to describe this scenario in a bit more detail, including how to diagnose whether or not your computer is running into this issue based on the setup log files.

How to quickly tell if this blog post might apply to you

Before reading this whole post, here is a quick way you can check whether or not you are likely to be encountering the issue described below:

Your OS was Windows Vista, Windows Server 2008 or Windows 7.  This particular issue does not affect Windows XP or Windows Server 2003.
You installed the .NET Framework 4 and setup reported success, but you cannot use .NET Framework 4 applications on your computer afterwards.
The file %windir%\system32\mscoree.dll and/or %windir%\syswow64\mscoree.dll has a file version of 2.0.* instead of 4.0.* (and you have rebooted your computer after installing the .NET Framework 4 to make sure that any files that were in use during installation have had a chance to be updated).
Symptoms of the problem

In the cases I’ve seen so far, the .NET Framework setup verification tool reported an error like the following when it tried to run a .NET Framework test application that is bundled with it:

****ERROR**** Process 'Netfx40TestApplication.exe' exited with return code -2146232576

This return code translates to 0x800131700, which is a .NET Framework common language runtime (CLR) error code that means “Failed to load the runtime.”  In other words, this return code means that this version of the .NET Framework runtime failed to load at all on this computer.

Further investigation on the computers that exhibited this behavior showed that the file mscoree.dll (which is located in %windir%\system32 and/or %windir%\syswow64) had a version number of 2.0.*.  This file is shared by all versions of the .NET Framework, and it should always have a version of at least 4.0.* after installing the .NET Framework 4.  If this file is not updated to version 4.0.*, the CLR loader will be unable to load the .NET Framework 4, and it will cause the type of failure in the .NET Framework verification tool that I described above.

Read more: Aaron Stebner's WebLog

Posted via email from .NET Info

The drop

|
An anonymous coder confesses a grievous sin. All companies and products referenced in this work are fictitious. Any resemblance to real companies and products, living or dead, is purely coincidental. Credits: The Apostle John, Tom Waits, James E Wright

Video: Xtranormal

Posted via email from .NET Info

Understanding Direct3D 10 Application Code

|
Understanding Direct3D 10 Application Code

Preface

Nearly everything you do in Direct3D is done to manipulate the graphics hardware itself. This is why DirectX is not so much a game platform as it is a hardware interface. The most important piece of hardware that we are concerned with is called the GPU, or graphics processing unit. The GPU is a separate integrated circuit chip that executes "shader" files. Think of shaders as mini programs that are executed on the GPU: they are written in HLSL and loaded as FX (effect) files, having an .fx file extension. While the CPU (microprocessor) performs calculations that can direct the entire system, the GPU performs calculations on graphics, directing graphics output to the monitor. This is why it is good idea to ascertain the capabilities of your machine’s graphics hardware. Identify your GPU (and its capabilities) by going to the “download latest drivers update” section of http://www.nvidia.com.  

Making any Direct3D program requires one to first create a window, a standard window identified by a window handle. You can use the normal Win32 API functions or other technologies like MFC. The purpose of creating a main window is to receive messages and provide a canvas upon which Direct3D will render drawings or images. Direct3D will draw all of its data onto this window. Upon creating the Direct3D object, we then create the Direct3D device. The Direct3D device is the most important interface in Direct3D.

The DirectX Graphics Infrastructure: DXGI

Since all our rendering is done with a Direct3D device, the first thing we need to do is construct a device. This also involves constructing a swap chain, consisting of a back buffer and primary surface. Doing this requires us to fill out a structure called DXGI_SWAP_CHAIN_DESC and then call the D3D10CreateDeviceAndSwapChain() function. These structures will be discussed after our first example. The DXGI is a component that lies at the base of all of the most recent versions of Direct3D. It handles the fundamental tasks involved with Direct3D, such as verifying the appropriate resolution rate and displaying images on the screen. DXGI is not actually a part of the DirectX API, but rather underlies it and other graphic components. That is, it acts as an interface between Direct3D and the hardware.

Read more: Codeproject

Posted via email from .NET Info

WPF Twitter client with Model-View-ViewModel Design Pattern step by step

|
Introduction

This article details real world example of how to use a Model-View-ViewModel Design Pattern. I split the process of development into steps. Each step is based on the previous one and adds some specific functionality. At the end of each step we will have a working application.

As the example I chose Twitter Client. I suppose it is comprehensible and useful. I’ll use TweetSharp library to make work with twitter API simple and not cumbersome.

The reader is supposed to have some experience of work with WPF, in particular, having investigated data binding.

I will not write here why you should use MVVM while working with WPF. Yet if you want to read in details about motivation for using this design pattern, I recommend to you to read the article “WPF Apps with the Model-View-ViewModel Design Pattern” by Josh Smith. On my part I would like to say that design which smells is big pain, especially if you use WPF.

Background

A Twitter Client shows tweets grouped according to some criteria. It also allows submitting user’s tweet and send direct messages. Finally, it provides friends management – a user can “follow” somebody which means he or she will see the followings tweets in his or her tweetlist.  

We start off with looking at an existing Twitter Client before writing code. This analysis will clarify how our client should look and what controls we should use.

Read more: Codeproject

Posted via email from .NET Info

Can your mockup tool do this?

|
   Can your mockup tool do this? Most mockup tools give you a static image with no preview option. Click on the image below (or this link). A new window will open and you will see an interactive mobile prototype that looks very much like the real application. This interactive prototype was created with Tiggr. Tiggr’s Web Preview feature allows you to generate HTML/JS/CSS and preview the prototype in any browser. Go ahead and try it on your mobile phone (http://gotiggr.com/preview/5673/).

Read more: Maxa Blog
Read more: Tiggr

Posted via email from .NET Info

Taking a screenshot from within a Silverlight #WP7 application

|
Often times, you want to take a screenshot of an application’s page. There can be multiple reasons. For instance, you can use this to provide an easy feedback method to beta testers. I find this super invaluable when working on integration of design in an app, and the user can take quick screenshots, attach them to an email and send them to me directly from the Windows Phone device. However, the same mechanism can also be used to provide screenshots are a feature of the app, for example if the user wants to save the current status of his application, etc.

Caveats

Note the following:

  • The code requires an XNA library to save the picture to the media library. To have this, follow the steps:
  • In your application (or class library), add a reference to Microsoft.Xna.Framework.
  • In your code, add a “using” statement to Microsoft.Xna.Framework.Media.
  • In the Properties folder, open WMAppManifest.xml and add the following capability: ID_CAP_MEDIALIB.
  • The method call will fail with an exception if the device is connected to the Zune application on the PC. To avoid this, either disconnect the device when testing, or end the Zune application on the PC.
  • While the method call will not fail on the emulator, there is no way to access the media library, so it is pretty much useless on this platform.
  • This method only prints Silverlight elements to the output image. Other elements (such as a WebBrowser control’s content for instance) will output a black rectangle.

The code

public static void SaveToMediaLibrary(FrameworkElement element, string title)
{
   try
   {
       var bmp = new WriteableBitmap(element, null);

       var ms = new MemoryStream();
       bmp.SaveJpeg(
           ms,
           (int)element.ActualWidth,
           (int)element.ActualHeight,
           0,
           100);
       ms.Seek(0, SeekOrigin.Begin);

       var lib = new MediaLibrary();
       var filePath = string.Format(title + ".jpg");
       lib.SavePicture(filePath, ms);

Read more: Laurent Bugnion (GalaSoft)

Posted via email from .NET Info

Top Ten Indications You Are A Computer Industry Newbie

|
Just for fun and because I am old[ish]. But more seriously, because people should know the history of computer science and the computer industry so as not to repeat mistakes.

  1. You think garbage collection came in with Java. Garbage collection has been around a long long time. BASIC  PLUS in the RSTS/E operating system had it over 40 years ago.
  2. You think cloud computing is new. It’s different more in implementation than in concept than the old mainframe computing.
  3. You think internet chat started with either ICQ or AOL Instant Messenger. There was Internet Relay Chat and VAX Phone long before that.
  4. You think the Internet and the World Wide Web are the same thing.
  5. You never heard of Digital Equipment Corporation. Once the second largest computer company in the world and a driving force behind the paradigm switch from mainframe computers to mini computers they are now gone. Lots of lessons you’ve missed if you don’t know that story.
  6. You don’t remember PostScript files. The standard for great printing before PDFs.
  7. The only mark up languages you know are HTML and XML. Few seem to remember that markup languages were used for document creation before web page creation.
  8. You don’t know what FORTRAN and COBOL stand for – FORmula TRANslation and COmon Business Oriented Language.

Read more: Computer Science Teacher - Thoughts and Information

Posted via email from .NET Info

WPF Tutorial - Styles, Triggers & Animation

| Wednesday, December 29, 2010
Introduction

Perhaps the most interesting and most important feature for any WPF application is Styling. Styling means defining styles for controls, and store in reusable ResourceDictionaries and hence forth, it could be used later on by calling its name. Styles in WPF could be well compared with CSS styles. They are both similar in most of the cases, while the former extends the feature allowing most of the features which WPF have. In this article I will discuss mostly how you could use Style in your WPF application to enhance the Rich experience of your UI.

So basically if you have already gone through the articles in the series, you must have already know most of the things on how you could apply your styles, how could you define style objects etc. In this article I will discuss how you could write better styles for your application.

Style

WPF exposes a property Style for every Control. If you look into the object Hierarchy, the Style is basically a property which exposes an object of Style in FrameworkElement. So each object can associate it and define custom setters to manipulate the basic look and feel of a control.

WPFClassHierarchyStyle.JPG

Read more: Codeproject

Posted via email from .NET Info

The Differences Between Network Calls in Windows and Linux

|
Berkeley and Microsoft socket models that are mostly compatible on the source code level are not so cross-platform in practice.

Let’s examine some subtle differences in their implementation. These differences were found when writing a cross-platform RPC for redirection of network calls of some process from one OS to another.

Socket Types

BSD:    int
Win:    void * // macros SOCKET

While the processor capacity is 32 bits, there are no problems in mutual displaying. On Windows 64 bits, the SOCKET type is twice larger in size.

The socket descriptor on BSD does not differ from the file descriptor. It means that some system calls accept descriptors of sockets and files simultaneously (for example, such commonly used calls as close(), fcntl(), and ioctl()).

There is one more side effect that appears in some cases. The matter is that systems, which support Berkeley model, have a small numerical value of the socket descriptor (less than 100) and the descriptors that are created in succession differ on 1. In the Microsoft model, such descriptors have values that are approximately more than 200 at once, and the descriptors created in succession differ on sizeof(SOCKET).

Error Handling

BSD:   Calls return -1, global variable errno is set.
Win:    Calls return -1 (SOCKET_ERROR macro), we receive the status with WSAGetLastError().

errno constants and Windows error codes have absolutely different values.

Socket creation

 socket(int af, int type, int protocol);

Constants for the first argument have absolutely different values on BSD and Windows. Constants for the second argument coincide so far.

Socket Setting

BSD:
 getsockopt(int sockfd, int level, int option_name, void *option_value, socklen_t *option_len);
 setsockopt(int sockfd, int level, int option_name, void const *option_value, socklen_t option_len);

Win:
 getsockopt(SOCKET sock, int level, int option_name, void *option_value,  socklen_t *option_len);
 setsockopt(SOCKET sock, int level, int option_name, void const *option_value,  socklen_t option_len)

Flag constants for the second and third arguments have absolutely different values on BSD and Windows.

Read more: Codeproject

Posted via email from .NET Info

SIKULI

|
What's SIKULI?

Sikuli is a visual technology to automate and test graphical user interfaces (GUI) using images (screenshots). Sikuli includes Sikuli Script, a visual scripting API for Jython, and Sikuli IDE, an integrated development environment for writing visual scripts with screenshots easily. Sikuli Script automates anything you see on the screen without internal API's support. You can programmatically control a web page, a desktop application running on Windows/Linux/Mac OS X, or even an iphone application running in an emulator.

Read more: SIKULI

Posted via email from .NET Info

“Team For Word” A TFS Word Client and a User Guide For It

|
A few days ago I have encountered a very nice tool that is called “Team For Word”

Until now I have worked with the “Team Spec” that cost a license compares to this tool that is totally free and with an open source.

In the past few days I have worked a lot with the “Team For Word” on clients sites, we have tried to see if this tool can replace the “Team Spec” and the answer is not simple.

This tool has some abilities that”Team Spec” doesn’t have like presenting all the work items from a query with links and attachments, or gives you the ability to show an attachment from a work item, but it lacks the ability to get word texts and convert it to work items or it can’t get a balk of work items from TFS to word.

The list of abilities are:

  • Connection to TFS 2008 (2010).
  • Adding one or more property of an item of work in the Word document.
  • Notification of the changed items in the document.
  • Notification of items changed on the TFS server.
  • Publication of all or part of the modification made in the document.
  • To update the document with changes from the server.
  • Pre-defined in TFS query execution.
  • Modification of the TFS server or project in the document properties.
  • Creating a work item.
  • Create formatting model.
  • Inserting template formatting.
  • Editing a block of data by the content of another element of travail
  • Opening a WI from the action panel
  • Management of the iteration and area
  • Improved management of differences between the document and TFS
  • Adding synchronization boxes identical document

Read more: Eran Ruso

Posted via email from .NET Info

WPF Tutoriall - Concept Binding

|
Table of Contents

Introduction
Binding in WPF
DataBinding / Object Binding
Why ObservableCollection
XML Binding
Importance of DataContext
Binding Members
Binding in Code-behind
Command Binding
MultiBinding
Conclusion


Introduction

Before this article, I have discussed about the architecture of WPF, Markup extensions, dependency properties, logical trees and Visual trees, layout, transformation etc. Today I will discuss what we call the most important part of any WPF application, the binding. WPF comes with superior DataBinding capabilities which enables the user to bind objects so that whenever the other object changes, the main object reflects its changes. The main motive of DataBinding is to ensure that the UI is always synchronized with the internal object structure automatically.

DataBinding was present before introduction of WPF. In ASP.NET we bind data elements to render proper data from the control. We generally pass in a DataTable and bind the Templates to get data from individual DataRows . On the other hand, in case of traditional windows forms application, we can also bind a property with a data element. The Bindings can be added to properties of objects to ensure whenever the property changes the value, the data is internally reflected to the data. So in one word, DataBinding is nothing new to the system. The main objective of DataBinding is to show data to the application and hence reducing the amount of work the application developer needs to write to just make the application properly display data. In this article, I will discuss how you could use the Databinding in WPF application and also create a sample application to demonstrate the feature in depth.

Binding in WPF

WPF puts the concept of Binding further and introduced new features, so that we could use the Binding feature extensively. Binding establishes the connection between the application and the business layers. If you want your application to follow strict design patter rules, DataBinding concept will help you to achieve that. We will look into greater detail with how to do that in a while.

In WPF we can bind two Properties, One Property and one DependencyProperty, two DependencyProperties etc. WPF also supports Command Binding. Lets discuss how to implement them in detail.

Read more: Codeproject

Posted via email from .NET Info

Awesome Quora Chrome Extension Is Awesome

|
screen-shot-2010-12-28-at-10-43-25-am.png

Addicted to Quora? Wish there were a way to search the Q&A site directly from your browser as well as receive notifications about your notifications while surfing the web? Well, this awesome Google Chrome extension created by Andrew Brown is just what your browser ordered.

Read more: Techcrunch

Read more: Quora

Posted via email from .NET Info

Chinese Written Language To Dominate Internet

|
"In the beginning, the language of the World Wide Web was English. Times change though, and the United States' military's gift to civilization knows no national boundaries, and growing worldwide adoption of the internet has changed the audience make-up to such an extent that the dominant language of the internet is about to become Chinese. That's not to say the Chinese are all that comfortable with this either. There has just been an official decree requiring the use of Chinese translations for all English words and phrases in newspapers, magazines and web sites. While all countries have watched the unregulated global nature of the internet erode traditional cultural values and the integrity of national languages, it seems the Chinese powers-that-be have concluded that the purity of the Chinese language needs to be preserved.

Read more: Slashdot

Posted via email from .NET Info

Researchers create ultra-fast '1,000 core' processor, Intel also toys with the idea

|
We've already seen field programmable gate arrays (or FPGAs) used to create energy efficient supercomputers, but a team of researchers at the University of Glasgow led by Dr. Wim Vanderbauwhede now say that they have "effectively" created a 1,000 core processor based on the technology. To do that, the researchers divvied up the millions of transistors in the FPGA into 1,000 mini-circuits that are each able to process their own instructions -- which, while still a proof of concept, has already proven to be about twenty times faster than "modern computers" in some early tests. Interestingly, Intel has also been musing about the idea of a 1,000 core processor recently, with Timothy Mattson of the company's Microprocessor Technology Laboratory saying that such a processor is "feasible."

Read more: Engadget

Posted via email from .NET Info

Thin Client, Or Fat Client? That Is the Question

|
If virtual desktops are so great, asks Jonathan Eunice, then why isn't everyone using them? However encouraged folks are by the progress virtual desktop infrastructure (VDI) has made, and however enthused they may be about extending the wins of server virtualization over into the desktop realm, you don't see analysts and developers eating the virtual desktop dog food. And even the folks you meet from Citrix, Microsoft, Quest, VMware, and Wyse — the people selling VDI — use traditional 'fat' notebooks. So, are you using virtual desktops? Why, or why not?

Read more: Slashdot

Posted via email from .NET Info

Combining Abstract Classes and Interfaces

| Tuesday, December 28, 2010
I've been continuing to work with my GUI classes in XNA. I'm in the process of remodeling the base class to make things more extensible and customizable. I use an abstract base class Control that all controls inherit from so they can be iterated over easily. I also have a class that can manage all of the controls that are present on the screen. I started experimenting with combining the base class with interfaces. I'm pleased with the results. I created a number of interfaces for different types of controls that can be used to extend the abstract base class providing a well defined public interface for accessing the controls. So now the base class Control has just two fields exposed by properties.

public abstract class Control
{
   #region Field Region

   string name;
   object tag;

   

Posted via email from .NET Info

10 Webapps that Add Great New Features to Gmail

|
Gmail's packed with features out-of-the-box, and Gmail Labs offers even more great functionality for adventurous users. But if you're looking for more than what Google's offering, these 10 services bring even more excellent functionality to Gmail.

You can add new features to your Gmail mailbox in multiple ways. There's the official Gmail Labs section where you'll find loads of "experimental" features developed by members of the GMail team itself. Need to translate an email message? Or want to move the Gmail chat window to the right? You can do it all with Gmail Labs.

You then have contextual gadgets that are triggered based on the email content. For instance, if an email has a link to a YouTube video, you'll be able to watch that video inside Gmail itself with the magic of gadgets. There're also Sidebar gadgets that can bring external content like news, maps, to-do lists, etc. into Gmail.

1. Other Inbox
2. Unsubscribe.me
3. FindBigmail.com
4. Rapportive.com
6. Email Oracle

Read more: Lifehacker

Posted via email from .NET Info

IR Black Theme For Visual Studio

|

Create Web Application or Virtual Directory in IIS

|
Did you know you can create Web Applications and Virtual Directories in IIS from inside Visual Studio?

Just go to File -> New Web Site and click on the Browse button:
Choose "Local IIS" and pick a web site you want to create the new item in:
In the upper-right corner of the dialog you will notice buttons:

5582.image_5F00_thumb_5F00_4.png

Posted via email from .NET Info

TinEye

|
TinEye is a reverse image search engine. You can submit an image to TinEye to find out where it came from, how it is being used, if modified versions of the image exist, or to find higher resolution versions.

TinEye is the first image search engine on the web to use image identification technology rather than keywords, metadata or watermarks. It is free to use for non-commercial searching.

TinEye regularly crawls the web for new images, and we also accept contributions of complete online image collections. To date, TinEye has indexed 1,800,781,909 images from the web to help you find what you're looking for. For more information, please see our FAQ, and for some real TinEye search examples, check out our Cool Searches page.

Read more: TinEye

Posted via email from .NET Info

25 Beautiful High Quality CSS/XHTML Website Templates

|

59 Best Web Design Of Year 2010

|

25+ EXAMPLES OF NEW CREATIVE FACEBOOK PROFILE PAGES

|
With the new release of Facebook pages many people are getting very creative with their own profile pictures. French artist Alexandre Oudin (#8 below) is the one responsible for this awesome creativity. Today we will showcase some creative profile page designs for you to get inspired, and hopefully make your very own.

If you dont wish to mess around and try to figure out this hack yourself, we have included a useful tutorial by photographer Florian Stravock( Youtube video below). You can download the Photoshop document used in the video here. However if you are like me and are very lazy, check out this image tool created by TechCrunch reader Trevor Farbo. This tool is named Piccut, it will allow you to upload a desired image that you would like to use for your profile picture. Once uploaded to Piccut, the software will then cut it into correct pieces that you will upload in order to Facebook and achieve this task.

Here are a few other tools that emerged from this phenomenon:

http://www.picturize.me/ (same tool as Piccut)
http://apps.facebook.com/ProfilePhotosBar (a Facebook app that does this automatically for you without having to upload pictures manually)

1) Take a screenshot of your new Facebook profile page.
2) Create a new Photoshop doc of your current screen size.
3) Grab the Slice tool (same family as the Crop tool) and select around the pictures.
4) With the Marquee tool, select around the sliced areas.
5) Bring the image that you want on Facebook into Photoshop and position it roughly the way you want it.
6) Drag the image layer under the Facebook layer and refine your positioning.
7) Go to “File,” select “Save for web and devices,” select all your document area, click “Jpeg, set the quality to 100% and save. Under slices select “All user slices.”
8) Upload your pictures to Facebook and tag them from last to first. When you get to the first picture click “Make this my profile picture.”

We also found this amazing video, showcasing  amazing use of Facebook profile hacking!

Read more: Inspiration feed

Posted via email from .NET Info

Shared Libraries For Windows Phone 7, MonoDroid and Beyond

|
  If you’ve been doing mobile development, you probably know all about the problem of having to target multiple platforms, along with the languages each one requires. Having to rewrite and support essentially the same code on different platforms flat out sucks, and isn’t really a great way to spend your time. Thanks to the fine folks working on Mono and its satellite projects, it’s possible to leverage the power of the .NET framework across many platforms. In this article I’ll focus on sharing the same code across Android and Windows Phone 7, but you’ll easily see how it could be extended to Silverlight, ASP.NET or iOS without much effort at all.
These days it seems like the ubiquitous mobile app example is some sort of Twitter client, so why should I be any different? We’ll build a very simple app that let’s you search Twitter for a given term. First, let’s set up the projects we’re going to need in a new solution. This post assumes that you’re using a non-express edition of Visual Studio 2010 since that’s what MonoDroid requires.


Setup
First, make sure you have the Project Linker extension installed in Visual Studio. This extension makes it really easy to share code between projects without having to manually copy code over and maintain changes. You can find it by just searching in Visual Studio’s Extension Manager (Tools -> Extension Manager). Once that’s installed, set up the following projects in a blank solution:

  1. TwitterSearcher: a normal .NET class library
  2. TwitterSearcher.MonoDroid: a MonoDroid class library
  3. TwitterSearcher.WP7: a Windows Phone class library
  4. App.MonoDroid: a MonoDroid application
  5. App.WP7: a Windows Phone 7 Silverlight application

Read more: Greg Shackles

Posted via email from .NET Info

MVVM Training

|
Capture.PNG

What is In the Box?

In the Box is a high quality, multi-media training that is consumed within Visual Studio 2010.  Content is navigated and delivered using a next generation computer based training (CBT) experience, the Visual Studio 2010 Feature Extension.

In the Box, is a brand name for a series of CBT Feature Extensions I’ll release that are listed in the Visual Studio 2010 Add New Project dialog; see below image.  This release is MVVM Training, the next will be Prism Training.

In the Box features:

Visual Studio 2010 Feature Extension
Content delivered as text, code, images, diagrams, video, or hyperlinks to the Internet
Hierarchical navigation tool window for content navigation
Content is viewed inside Visual Studio 2010 tool windows
No additional downloads or dependencies; all content is in the box.  (except online videos)
Installed and updated from the Visual Studio Gallery
Managed (disabled or uninstalled) using Visual Studio Extensions Manager (see bottom of this page)
Authored using Microsoft Word and the Instant Feature Builder

Read more: Visual Studio Gallery

Posted via email from .NET Info

ViewText

|
What is this?

ViewText.org is a service provided to make reading content on the web easier, faster, and safer by extracting the main article content from news items, blog posts, RSS feeds, and PDF's. The text is big, beautiful, and void of distracting items, perfect for reading on mobile devices. Use ViewText on your site by linking articles through the ViewText engine.

Features

  • Extracts article content from web pages
  • Combines multi-page articles into one
  • Populates RSS feeds with the full article content
  • Extracts text from PDF files
  • Beautiful on mobile phones
  • Caches content
  • Removes scripts
  • Convert text to PDF

Read more: ViewText

Posted via email from .NET Info

Frangipani: A Scalable Distributed File System

|
The ideal distributed file system would provide all its users with coherent, shared access to the same set of files,yet would be arbitrarily scalable to provide more storage space and higher performance to a growing user community. It would be highly available in spite of component failures. It would require minimal human administration, and administration would not become more complex as more components were added. Frangipani is a new file system that approximates this ideal, yet was relatively easy to build because of its two layer structure. The lower layer is Petal (described in an earlier paper), a distributed storage service that provides incrementally scalable, highly available, automatically managed virtual disks. In the upper layer, multiple machines run the same Frangipani file system code on top of a shared Petal virtual disk, using a distributed lock service to ensure coherence.
Frangipani is meant to run in a cluster of machines that are under a common administration and can communicate securely. Thus the machines trust one another and the shared virtual disk approach is practical. Of course, a Frangipani file system can be exported to untrusted machines using ordinary network file access protocols.

Read more: Systems We Make

Posted via email from .NET Info

25 Even More – Sick Linux Commands

|
Here, urfix we know how much you guys love top Linux commands,

1) Monitor progress of a command

pv access.log | gzip > access.log.gz

Pipe viewer is a terminal-based tool for monitoring the progress of data through a pipeline. It can be inserted into any normal pipeline between two processes to give a visual indication of how quickly data is passing through, how long it has taken, how near to completion it is, and an estimate of how long it will be until completion. Source: http://www.catonmat.net/blog/unix-utilities-pipe-viewer/
2) Graphical tree of sub-directories

ls -R | grep “:$” | sed -e ‘s/:$//’ -e ‘s/[^-][^\/]*\//–/g’ -e ‘s/^/ /’ -e ‘s/-/|/’

Prints a graphical directory tree from your current directory

3) Delete all files in a folder that don’t match a certain file extension

rm !(*.foo|*.bar|*.baz)

Deletes all files in a folder that are NOT *.foo, *.bar or *.baz files. Edit the pattern inside the brackets as you like.

4) Easy and fast access to often executed commands that are very long and complex.

some_very_long_and_complex_command # label

When using reverse-i-search you have to type some part of the command that you want to retrieve. However, if the command is very complex it might be difficult to recall the parts that will uniquely identify this command. Using the above trick it’s possible to label your commands and access them easily by pressing ^R and typing the label (should be short and descriptive).

5) Define a quick calculator function

? () { echo “$*” | bc -l; }

defines a handy function for quick calculations from cli.

once defined:

? 10*2+3

6) Display a cool clock on your terminal

watch -t -n1 “date +%T|figlet”

This command displays a clock on your terminal which updates the time every second. Press Ctrl-C to exit.

A couple of variants:

A little bit bigger text:

watch -t -n1 “date +%T|figlet -f big”You can try other figlet fonts, too.

Big sideways characters:

watch -n 1 -t ‘/usr/games/banner -w 30 $(date +%M:%S)’This requires a particular version of banner and a 40-line terminal or you can adjust the width (“30″ here).

7) intercept stdout/stderr of another process

strace -ff -e trace=write -e write=1,2 -p SOME_PID

Read more: urfix's blog

Posted via email from .NET Info

7 Free Official Microsoft Press EBooks

|

15 Great HTML5 Website Templates For Your Next Projects

|
HTML5 is bringing modern web standards to everyone. Because HTML5 consists powerful functionality which supports true semantic capabilities to Web documents, augmenting their human-readable content with machine-readable data and metadata.

Not long ago we have discussed about recommended resources To Learn All About HTML5HTML5 Canvas Games, HTML5 Media Player Implementations with you. And now here we go againwith freebie HTML5 website templates that will become of a great use for you. No doubt, HTML is most popular web design technology/technique among web designers and developers. This is the base language in web designing so every designers starts their designing with this technology. HTML5 is the latest version of HTML. It has multiple new and fresh features to make your website more attractive and alive.

These “15 Great HTML5 Website Templates For Your Next Projects” have all new and fresh features related of HTML5 technology.

biz-solution-e1286624014963.jpg

Read more: Technology To Software

Posted via email from .NET Info

Have a Bite of Bytecode!!

|
This topic is very different from other Java topics.  I am sure a lot of developer think that why should I learn about byte code at all. Well I can give only two reasons of that

(1)    Either you are a Byte code engineer for example using a library like BCEL which is used to change/enhance byte code generated by Java compiler.

(2)    You are passionate to learn thing under the hood (Under the hood is used mostly by Bill Venners a great writer of a great book Inside the Java Virtual machine worth reading it.)

What is byte code after all??

Just like C and C++ generates assembler code. Java compiler generates byte codes.  This byte code is used by JVM to perform instructions written by Programmer in Java language.

What byte code consists of?

Byte code is basically combination of instructions to be executed at run time by JVM. The main things byte code has:

Opcodes: Opcode is an instruction which will get executed by JVM at run time.
Information of reference to the objects
Information about the local variables
There is one command line tool given by sun which comes with Java installer. That command line tool is used to read byte codes generated by Java compiler. For Example we have following java code:

public class BiteOfByteCode{
public void sayHello(String name){
 System.out.println(name);
}
}

Read more: Cup of Java with Java

Posted via email from .NET Info

Create custom windows in WPF with ease

|
Introduction

One of the features I wanted to add to Synergy toolkit was the ability to quickly create custom theme windows with all the features of a standard windows. In this article I am demonstrating how to create a custom window theme visually using declarative XAML and apply it to windows in your applications.

You can download Synergy SDK with full source code here.
You may also want to see my window docking solution in Synergy here.
I will be posting updates on Synergy SDK on my twitter account: MixModes

The sample application Synergy uses main window as the custom window whose theme is defined within Windows.xaml resource dictionary within MixModes.Synergy.Themes project.

Declarative is the key

As we all know XAML is declarative and simple and so there is no reason why traditional approach of writing code for windows and controls should apply. One must be able to simply create a visual and stick it in a control template to get things working. That was exactly my motivation when I started out developing look-less window functionality in Synergy.

Declare a template

The first thing you may want to do in creating a custom window is to actually create a visual template. The easiest way to create this template is to create a user control in Microsoft Blend and then define extension points in XAML that look-less control will liven up once the template is applied. Once the visual is ready all that needs to be done is a style creation for CustomWindow where the template can be pasted and then the temporary user control can be discarded.

Read more: Codeproject

Posted via email from .NET Info

Instant oil spill

| Monday, December 27, 2010

Architecture of WikiLeaks

|
1292009610-284333226-08-528x386.jpg

Thanks to the New York Post article we noticed that this project Pionen White Mountain, which we featured November 24, 2008, is indeed the WikiLeaks Headquarters.   Pionen – White Mountain designed by Albert France-Lanord Architects is housed in a former 1,200 sqm  Cold War bunker (originally built as a World War II bunker); an amazing location 30 meters down under the granite rocks of the Vita Berg Park in Stockholm.

One of the original founders of WikiLeaks is architect John Young. Sections and more photographs following the break.

Update: It seems that the New York Post article was misleading. The Pionen – White Mountain facilities, a Bahnhof computer center, hosts two Wikileaks servers at these facilities and provides power, cooling, and Internet access to the servers.

Read more: arch daily

Posted via email from .NET Info

What are the differences between Mark Zuckerberg and Julian Assange

|
     "What are the differences between Mark Zuckerberg and me? I give private information on corporations to you for free, and I’m a villain. Zuckerberg gives your private information to corporations for money and he’s Man of the Year."
-- Julian Assange on SNL

Read more: VINYL IS micro

Posted via email from .NET Info

Dilbert comics

|

AMD Radeon HD 6950 can be turned into an HD 6970 using a BIOS hack

|
10x1227bu3stk.jpg

Ah, the joy of getting something for nothing -- that's what this time of year is all about, right? The techPowerUp! guys seem to think so, and they've got the perfect gift for all you thrifty PC gaming enthusiasts: a BIOS flash for the Radeon HD 6950 that unlocks the full potential of its hardware (in other words, it turns it into an HD 6970). We already knew the two retail SKUs were built on the same Cayman core, but this hack confirms that all the 6950's performance handicaps have been enacted in software rather than hardware, leaving you all to flip a switch, click a few confirmatory dialogs, and get your game on.

Read more: Engadget

Posted via email from .NET Info

Pitfalls of Chinese Conversion

|
After basic introduction of software Globalization from my team mates, I would like to talk about something more specific in this entry.

Kernel32 is one of the DLLs (Dynamic-Link Libraries) supported by Microsoft Windows. It is a collection of code which can be used by multiple processes while being loaded into memory. Kernel32.dll has provided APIs (Application Programming Interface) to convert East Asian characters, for example, to convert Simplified Chinese to Traditional Chinese or vice versa.

We can call the LCMapString API provided by Kernel32.dll in a small WinForms application to perform the conversion task: (Please be noted, LCMapStringEx API is a newer version of LCMAPString API. It can also perform the conversion task, but it can be only supported in Windows Vista or later version!)
       public static string ToSimplified(string stringSource)
       {
           String stringTarget = new String(' ', stringSource.Length);
           int iReturn = LCMapString(LOCALE_SYSTEM_DEFAULT, LCMAP_SIMPLIFIED_CHINESE, stringSource, stringSource.Length, stringTarget, stringSource.Length);
         
           return stringTarget;
       }

The ToSimplified function’s input parameter is the source string to be converted, and the return value is the converted string. In this case, the source string is the Simplified Chinese text, and the output string is the Traditional Chinese text converted from the source.

If we change the flag value (the second parameter) of LCMapString API from LCMAP_SIMPLIFIED_CHINESE to LCMAP_TRADITIONAL_CHINESE, we can build another function to convert a source string from Traditional Chinese to Simplified Chinese! It is a convenient API, isn’t it?

Read more: Global Developer Blog

Posted via email from .NET Info

New IE Zero Day

|
Microsoft has released a notice about a new zero day attack against Internet Explorer. Guess it's going to be more a 'Script Kiddie Christmas,' less of a 'White Christmas.' 'Ok, fess up — who asked for an IE 0 day for Christmas? I'm guessing Santa got his lumps of coal mixed up with a bag of exploits. This exploit has been discussed over the last day or so on full disclosure and a number of other sites. Metasploit already has a module available for it (just search for CSS & IE). Microsoft has put out an advisory 2488013 regarding the issue which manifests itself when a specially crafted web page is used and could result in remote code execution on the client.

Read more: Slashdot

Posted via email from .NET Info

Trend Micro Browser Guard protects against zero-day critical flaws in Internet Explorer

|
With so many types of Internet threats to watch out for nowadays, it's important to have a multi-layered defense in place. A good antimalware program is a start, but it won't protect you against everything -- like some zero-day exploits such as the new one reported by Microsoft which affects Internet Explorer.

Trend Micro's Browser Guard offers additional protection for users of Microsoft's Web browser, and best of all it's totally free. Install Browser Guard and it resides in your system tray and integrates into Internet Explorer, where it scans for malicious Web code.

Read more: DownloadSquad

Posted via email from .NET Info

How To Be Popular On Facebook, Quantified

|
Network World reports that Facebook has just released an analysis of the word usage for about one million status updates from its US English speakers with the words in updates organized into 68 different word categories based on the Linguistic Inquiry and Word Count (LIWC)--a text analysis software program that calculates the degree to which people use different categories of words across a wide array of texts. The results? To be popular on Facebook all you have to do is write longer status updates, talk about music and sports, don't be overly emotional, don't talk about your family, don't refer to time and use the word 'you' a lot. Facebook's study also confirms something that bloggers and Fox News have known for years: negative comments produce more online activity. Sure, Facebook users might click the like button more often on updates expressing positive emotion. But Facebook found you can't beat negativity for user engagement, as dismal status updates garnered more comments than positive ones.

Read more: Slashdot

Posted via email from .NET Info

Israel destroyed Syria nuclear reactor: WikiLeaks

|
Israeli-air-force.jpg

Israel destroyed a Syrian nuclear reactor in an air raid just weeks before it went online in 2007, said a US diplomatic cable released by WikiLeaks and published on Friday in an Israeli daily. "On September 6, 2007, Israel destroyed the nuclear reactor built by Syria secretly, apparently with North Korea's help," then US secretary of state Condoleezza Rice wrote in the cable published in Yediot Aharonot newspaper.
"Our intelligence experts are convinced that the attack targeted by the Israelis is in fact an atomic reactor of the same type built by North Korea in Yongbyon," she wrote in the message dated April 2008.

"We have good reason to believe that the reactor was not built for peaceful purposes," she said, adding the attack came only weeks before the reactor was to become operational.

Rice also noted the secrecy surrounding the construction of the nuclear facility, with the Syrian authorities refusing to invite the International Atomic Energy Agency or any media to inspect the site.

Syria has always denied that the structure targeted by Israeli warplanes was a nuclear reactor, although it has admitted it was a "military site under construction."

Read more: hindustant times

Posted via email from .NET Info

ObservableDictionary (C#)

|
Few weeks ago I posted an ObservableDictionary(Of TKey, TValue) in VB.NET, today I had some time to translate it to C# (not tested, just translated, kindly notice me for any error).

using System;
using System.Linq;
using System.ComponentModel;
using System.Collections.Generic;
using System.Collections.Specialized;

namespace System.Collections.ObjectModel
{
 class ObservableDictionary<TKey, TValue> : IDictionary<TKey, TValue>, INotifyCollectionChanged, INotifyPropertyChanged
 {
   private const string CountString = "Count";
   private const string IndexerName = "Item[]";
   private IDictionary<TKey, TValue> _Dictionary;
   protected IDictionary<TKey, TValue> Dictionary
   {
     get { return _Dictionary; }
   }

   #region Constructors
   public ObservableDictionary()
   {
     _Dictionary = new Dictionary<TKey, TValue>();
   }
   public ObservableDictionary(IDictionary<TKey, TValue> dictionary)
   {
     _Dictionary = new Dictionary<TKey, TValue>(dictionary);
   }
   public ObservableDictionary(IEqualityComparer<TKey> comparer)
   {
     _Dictionary = new Dictionary<TKey, TValue>(comparer);
   }
   public ObservableDictionary(int capacity)
   {
     _Dictionary = new Dictionary<TKey, TValue>(capacity);
   }
   public ObservableDictionary(IDictionary<TKey, TValue> dictionary, IEqualityComparer<TKey> comparer)
   {
     _Dictionary = new Dictionary<TKey, TValue>(dictionary, comparer);
   }
   public ObservableDictionary(int capacity, IEqualityComparer<TKey> comparer)
   {
     _Dictionary = new Dictionary<TKey, TValue>(capacity, comparer);
   }
   

Posted via email from .NET Info

We are hiring!

|
In 2005, I got out of the army, and looked for a job. I felt that I had all the necessary qualifications (at the time, I had already written Rhino Mocks), but I run into an interesting problem. I didn’t have any commercial experience. I am sure that you are familiar with the tale. All the jobs require at least 2 – 3 years experience, and the list of qualification looked like someone just raided the TLA storage facilities.

That was pretty annoying at the time, and I wished I could do something about it. Now I can.

We aren’t hiring additional full time employees (at least not right now), but we are hiring interns. The main idea is to enable people to gain commercial experience while working on cool software.

Some information that you probably need to know:

You have to know to program in C#. If you have OSS credentials, that is all for the better, but it is not required.
This is a paid position, you are not expected to work for free.
It is not a remote position, our offices are located in the Southern Industrial Area in Hadera, Israel.
I’m not going to ask you to do all the annoying work. There is some annoying stuff to do (mostly docs), but look below to see what exactly I have in mind.
This position entails:

Working on our shipping products (the Uber Prof line of products and the Raven DB / Raven MQ line).

Among other things, I have earmarked the following features for you:

Raven DB’s query optimizer.
Raven DB’s auto sharding & scaling.
Raven DB’s clustering support.
Uber Prof’s production profiling feature.

Read more: Ayende @ Rahien

Posted via email from .NET Info

Top Ten Essential Tools for Linux Administrators

|
They say a good manager always brings Linux tools to facilitate their hard work. A set of applications that can access again and again. In this connection, Linux Magazine did a top 10 compiled applications that you can not miss any administrator of GNU/Linux.
All System Administrator, or SysAdmin needs a set of tools with which to manage your systems and office environments. These ten essential tools provide excellent support for Linux system administrators. Note that this standard is not ready or anything, just a compiled application that have demonstrated a history and have stood test of time in data centers.
Then we bring these ten tools for free use.

1 – Webmin:
This is a web-accessible application for configuring Unix-like systems like GNU/Linux and OpenSolaris. With it you can configure internal aspects of a system as users and share space, services, configuration files off computer, as well as modify and control various services such as Apache, PHP, MySQL, DNS, Samba, DHCP, etc. .
Official Website

2 – Byobu
3 – TcpDump
4 – Virtual Network Computing
5 – Gparted
6 – DenyHosts


Read more: Systechblog.com

Posted via email from .NET Info

LibreOffice 3.3 RC2 is available!

|
" The Document Foundation is happy to announce the second release candidate of LibreOffice 3.3. This release comes with lots of improvements and bugfixes,and a very substantial reduction in size for the Windows installer. As usual, be warned that this is beta quality software – nevertheless, we ask you to play with it – we very much welcome your feedback and testing!"

What`s new?
- The Windows build is an International build - you can choose the user interface language that is suitable for you. The help content is not included, but using an online version. Alternatively, there are separate helppacks available. Please browse the archives to get the helppack pack you need for your platform.

- The Linux and MacOSX builds are English builds with the possibility to install language packs. Please browse the archives to get the language pack you need for your platform.

- The LibreOffice branding and renaming is new and work in progress. You may still see old graphics, icons or websites. So please bear with us. This also applies to the BrOffice.org branding - applicable in Brazil.

- Filters for the legacy StarOffice binary formats may be missing.More detailed release notes are available in our wiki.

You can download this new release from This link:
http://www.documentfoundation.org/download/


Read more: Unixmen

Posted via email from .NET Info

Silverlight Asynchronous WCF Calls Without Ruining Your Architecture

|
A while back I wrote a blog post about how Silverlight 4’s asynchronous network calls make a layered client-side architecture difficult.  In that post I talk about wanting to have a loosely coupled, testable, n-tier architecture on my Silverlight client application.  Basically, I wanted to have a client-side architecture that was nicely layered like Figure 1 rather than a flat, 1-tier architecture like Figure 2.

image_thumb.png

Read more: Benjamin Day Consulting, Inc.: The Blog

Posted via email from .NET Info

Internals of a Delegate

|
Strange Rules of Delegate

Well, at recent times, at least after the introduction of .NET framework 3.5 the use of Delegates in a program has increased quite a bit. Now almost every people in .NET language must at least somehow used delegates on their daily programming activities. It might be because of the fact that the use of delegates has been simplified so much with the introduction of lambda expressions in .NET framework 3.5 and also the flexibility to pass delegates over other libraries for decoupling and inversion of control in applications. Hence, we can say the way of writing code in .NET environment has been changed considerably in recent times.

Introduction

If you want the most simple and somewhat vague idea about delegates I would say a delegate is actually a reference to a method so that you might use the reference as you use your object reference in your code, you can send the method anywhere in your library or even pass to another assembly for its execution, so that when the delegate is called, the appropriate method body will get executed. Now, to know a more concrete and real life example, I must consider you to show a code :

public delegate int mydelegate(int x);
       public class A
       {
           public mydelegate YourMethod { get; set; }

           public void ExecuteMe(int param)
           {
               Console.WriteLine("Starting execution of Method");
               if (this.YourMethod != null)
               {
                   Console.WriteLine("Result from method : {0}", this.YourMethod(param));
               }
               Console.WriteLine("End of execution of Method");
           }
       }
       

       static void Main(string[] args)
       {

           //int x = 20;
           //int y = 50;

           A a1 = new A();

           a1.YourMethod = Program.CallMe;


           a1.ExecuteMe(20);

           Console.Read();
   }
    public static int CallMe(int x)
       {
           return x += 30;
       }

}

In the above code, I have explicitly declared a delegate and named it mydelegate. The name of the delegate will indicate that it is a type that can create reference to a method which can point to a method which have same signature as defined in it. Clearly If you quickly go through the code defined above, the property YourMethod can point to a signature which has same signature as declared to mydelegate. Hence, I can pass a method CallMe easily to Type A, so that when the object of A calls the delegate, it executes the method CallMe.

Read more: DOT NET TRICKS

Posted via email from .NET Info