Awesome Remote Control Shark and Clown Fish [Video]
Do you like having fun with remote control toys and want something awesome to try out? Then take a look at these two terrific options from Air Swimmers. Whether you like the shark, the clownfish, or both you and your kids will definitely have a lot of fun taking them for a “swim around the block”! Read more: How-to geek
QR:
Overlay an image to a video file using Microsoft Expression Encoder 4
Posted by
jasper22
at
10:05
|
What is Expression Encoder?Microsoft Expression Encoder is a Windows based program for encoding web based videos and digital video.Features of MS Expression Encoder Preparing videos (you can do simple edits and overlays) Capture you Desktop screen actions (to make online training videos) Encoding high level video's to devices and web We can customized Silverlight video's Steps to Overlay an image to a video file: 1. open the Expression Encoder from Microsoft Expression, select Transcoding Project and click OK.
[Transcoding project means we can use this application as Silverlight compatible bit streams (VC.1 or H.264)..] 2. Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 Click on import button and select a file as media file type and Click OK
Read more: C# Corner
QR:
[Transcoding project means we can use this application as Silverlight compatible bit streams (VC.1 or H.264)..] 2. Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 Click on import button and select a file as media file type and Click OK
QR:
RelativeSource Binding in Silverlight
Posted by
jasper22
at
10:04
|
Sometime we need to bind the same data in different properties of the same control. For example, in some cases we need to show text in a TextBlock and also want to show the same text as a Tooltip to that TextBlock control. How to do it? It's very easy to bind the same value twice in the control. But is there any other way to implement the same? Let us discuss this today in this blog post. If you are not aware of it till date, you will definitely like. Let us discuss the common way to implement this. As we discussed we can bind data in multiple properties of the same control like this:<TextBlock Text="{Binding Information, ElementName=userControl}"
ToolTipService.ToolTip="{Binding Information, ElementName=userControl}"
HorizontalAlignment="Center" VerticalAlignment="Center"/>If you want to do this in similar way, you have to define a name to the UserControl or to the TextBlock control itself and use that as "ElementName" explicitly. In other way, you can use the RelativeSource binding in XAML to self binding the same data in multiple properties like Text and Tooltip as below:<TextBlock Text="{Binding Information, ElementName=userControl}"
ToolTipService.ToolTip="{Binding Text, RelativeSource={RelativeSource Self}}"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
Read more: Kunal's Blog
QR:
ToolTipService.ToolTip="{Binding Information, ElementName=userControl}"
HorizontalAlignment="Center" VerticalAlignment="Center"/>If you want to do this in similar way, you have to define a name to the UserControl or to the TextBlock control itself and use that as "ElementName" explicitly. In other way, you can use the RelativeSource binding in XAML to self binding the same data in multiple properties like Text and Tooltip as below:<TextBlock Text="{Binding Information, ElementName=userControl}"
ToolTipService.ToolTip="{Binding Text, RelativeSource={RelativeSource Self}}"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
Read more: Kunal's Blog
QR:
C++ 2011 standard approved by unanimous vote
Posted by
jasper22
at
10:02
|
I just heard from our C++ standards committee member, that the C++ FDIS (ISO/IEC FDIS 14882) has officially been approved by the ISO in a unanimous vote. 21 of 21 National Bodies voted to APPROVE. Well done everyone who has worked so hard on the updated C++ standard. Even as we are finishing C++Builder XE2 for this year’s release, our C++ compiler team is also working on Embarcadero’s next generation C++ compiler which will support the updated, and now approved, C++ standard.
Read more: Sip from firehose
QR:
Bjarne Stroustrup’s C++ FAQ
Bjarne Stroustrup’s C++ Overview presentation
Bjarne Stroustrup’s C++Ox overview talk at University of Waterloo
Herb Sutter’s trip report from the March 2011 Madrid Meeting "We have FDIS"
Read more: Sip from firehose
QR:
Silverlight testing framework support in the Unit Testing Service
Posted by
jasper22
at
10:01
|
The CodeRush Unit Test Runner supports running tests from the Silverlight Unit Test Framework which is a part of Silverlight Toolkit now, so it’s easy to test your Silverlight applications.Once you install the Silverlight Unit Test Framework, you are able to create the Silverlight Unit Test Application project. Here is what the Add Project dialog looks with the Silverlight tab highlighted:
If you create this type of a project, you will get the source file containing a single test case. If you ever worked with Microsoft unit testing in Visual Studio, you will find the API quite familiar, including all key classes, attributes and namespaces: the TestClass attribute identifies the class that contains unit tests. The TestMethod attribute identifies methods that represent a single unit test case. Read more: DevExpress CodeRush Tips&Tricks
QR:
QR:
Clojure and the CLR
Posted by
jasper22
at
10:00
|
From the Clojure home page: Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy and a powerful macro system. Clojure is predominantly a functional programming language, and features a rich set of immutable, persistent data structures. When mutable state is needed, Clojure offers a software transactional memory system and reactive Agent system that ensure clean, correct, multithreaded designs. I’ve had an interest in Clojure ever since I saw Craig Andera do a talk on the topic in D.C. (Craig also has a set of Clojure videos @ Pluralsight). It was just an intellectual fascination until clojure-clr appeared and things took a turn towards the possibly practical.
Why Am I Interested in Clojure?As a dialect of Lisp, Clojure embodies the spirit of the greatest single programming language ever designed, including the parentheses, prefix notation, and a simple, clutter-free syntax.
Functions are first class citizens in Clojure, of course, so you can pass functions as parameters and return them as the result of other functions. There are closures, currying, and recursive looping. Fans of LINQ and functional programming with Func<> and Action<> on the CLR should know that you won’t be missing anything with Clojure, in fact, there is a whole new world to explore. Read more: Ode to code
QR:
Why Am I Interested in Clojure?As a dialect of Lisp, Clojure embodies the spirit of the greatest single programming language ever designed, including the parentheses, prefix notation, and a simple, clutter-free syntax.
Clojure | C# |
; Comparing 5 and 3+2 returns 0 (println (compare 5 (+ 3 2))) | // Comparing 5 and 3+2 returns 0 Console.WriteLine(5.CompareTo(2 + 3)); |
QR:
CryEngine goes free
Posted by
jasper22
at
09:58
|
GDC Europe: PC SDK offered gratis for non-commercial useOne of the most cutting-edge game development platforms is, from today, available to everyone for free.Crytek, the independent Frankfurt group famous for its CryEngine, has become the latest engine vendor to offer its tech at no initial cost. Much like with Unity and, more recently, the Unreal Development Kit, CryEngine’s SDK is being offered gratis in the hope that more developers will experiment and test game ideas with the tech.Carl Jones, Crytek’s engine business director, said he hopes the free SDK will “lead to new companies being formed and using our engine”. If a studio wants to release a commercial product using CryEngine, standard licensing rates will then come into effect.The toolset is available for download at crydev.net, Crytek’s new web portal for the mod and development community, and the German independent has pledged to update the tech regularly. The SDK is only available for PC games development, Crytek added. Since its launch CryEngine 3 has been licensed by numerous games studios dotted across Asia – a market Epic Games is beginning to make inroads into. Licensing deals with western studios are in place but have yet to be announced. Read more: Develop
QR:
How to Validate ASP.NET Web Forms Using a Business Rules Engine
Posted by
jasper22
at
09:57
|
A Brief Intro Into Web Form ValidationAs you know, the purpose of an HTML form is to deliver user input from the client to the server. One of the purposes of web applications is to make sure that the incoming data is valid, safe, and ready for further processing. This is called "input validation". The process of input validation can be divided into three steps: 1. Format validation. For example, the server needs to make sure that fields don't contain any unsafe values, that the required fields have data, that values of different types can be safely converted into those types, etc. Normally, format validation is done by validation controls. 2. Conversion of received string values into typed values. For example, if the form accepts loan applications, the incoming data needs to be converted into some kind of a loan application object where the string "annual gross income" would be converted into GrossIncome property of type System.Decimal. 3. Optional validation of business rules against strongly typed data. For example, the server must make sure that annual income is larger than the total debt and that the applicant has been employed for the last 5 years. The first two steps are well documented and understood. They are almost always required and can be automated by using common or custom tools and controls, at least to some degree. But the third step is not that simple. A lot of developers I know are absolutely sure that they never use business rules in their web forms. And most of them are wrong. The reason is simple: we often mix format and rule validation in one statement without realizing it. Of course, some small forms don't use business rules at all. But it's rather an exception from the rule. Consider the following code: DateTime test;if(txtLastEmployed.Text.Length == 0 ||
!DateTime.TryParse(txtLastEmployed.Text, out test) ||
test < DateTime.Now.AddYears(-5))
{
DisplayWarningMessage("The date of last employment is either empty, or has invalid format, or is in the past of limit.");
}In this example, the first condition is format validation, the second is type conversion, and the third is evaluation of a business rule. It's easy to see that the first two conditions will never change, unless the LastEmployed property gets removed from our imaginary data object. But the third condition is not guaranteed to stay the same forever. The way it's written, if tomorrow the business owner changes the 5 years term to any other number, we will have to compile, test, and deploy the entire application all over again just because of this tiny change. Of course, we can always store condition values in configuration files. For example, the following snippet would demonstrate such an implementation:try
{
// some code
}
catch(Exception ex)
{
if (ConfigurationManager.AppSettings["Production"] == "true")
{
LogException(ex);
DisplayAnExcuse("Sorry, we screwed up!");
}
else throw ex;
}
Read more: Codeproject
QR:
!DateTime.TryParse(txtLastEmployed.Text, out test) ||
test < DateTime.Now.AddYears(-5))
{
DisplayWarningMessage("The date of last employment is either empty, or has invalid format, or is in the past of limit.");
}In this example, the first condition is format validation, the second is type conversion, and the third is evaluation of a business rule. It's easy to see that the first two conditions will never change, unless the LastEmployed property gets removed from our imaginary data object. But the third condition is not guaranteed to stay the same forever. The way it's written, if tomorrow the business owner changes the 5 years term to any other number, we will have to compile, test, and deploy the entire application all over again just because of this tiny change. Of course, we can always store condition values in configuration files. For example, the following snippet would demonstrate such an implementation:try
{
// some code
}
catch(Exception ex)
{
if (ConfigurationManager.AppSettings["Production"] == "true")
{
LogException(ex);
DisplayAnExcuse("Sorry, we screwed up!");
}
else throw ex;
}
Read more: Codeproject
QR:
Using Android Preferences in a background service
Posted by
jasper22
at
09:55
|
n this post I will explain how I have used the Android Preferences in a background service. The preference is used as an interval for updating a listview with some simple text items.Preferences To create the preferences screen I added an Options Menu. This options menu is part of the HomeActivity. The HomeActivity simply shows a listview. When clicking on the options menu button it will start the SettingsActivity. This activity extends the PreferenceActivity. The only thing that is really necessary in the SettingsActivity is to add the preferences that are specified in the corresponding xml. In my implementation I have added a method that sets the selected value below the title. In the screenshot on the left you can see that the summary shows 15. SettingsActivity.javapublic class SettingsActivity extends PreferenceActivity {
public static final String UPDATE_PREF = "updatePref"; @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.preferences);
setUpdatePreferences();
} private void setUpdatePreferences() {
ListPreference updatePref = (ListPreference) findPreference(UPDATE_PREF);
updatePref.setSummary(updatePref.getValue());
Read more: J Team
QR:
public static final String UPDATE_PREF = "updatePref"; @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.preferences);
setUpdatePreferences();
} private void setUpdatePreferences() {
ListPreference updatePref = (ListPreference) findPreference(UPDATE_PREF);
updatePref.setSummary(updatePref.getValue());
Read more: J Team
QR:
How Linux mastered Wall Street
Posted by
jasper22
at
09:54
|
When it comes to the fast-moving business of trading stocks, bonds and derivatives, the world's financial exchanges are finding an ally in Linux, at least according to one Linux kernel developer working in that industry. This week, at the annual LinuxCon conference in Vancouver, Linux kernel contributor Christoph Lameter will discuss how Linux became widely adopted by financial exchanges, those high-speed computerized trading posts for stocks, bonds, derivatives and other financial instruments. [Longterm kernel proposal signals ongoing Linux growth and Linux First Steps]As an alternative to traditional Unix, Linux has become a dominant player in finance, thanks to the operating-system kernel's ability to pass messages very quickly, Lameter said in an interview with IDG. In fact, the emerging field of high-frequency trading (HFT) would not be possible without the open-source operating system, he argued. Lameter himself was hired as a consultant by one exchange -- he won't say which one -- based on his work in assembling large-scale Linux clusters.
Read more: IT World
QR:
VirtualBox 4.1.2 is released!
Posted by
jasper22
at
09:53
|
Oracle today released VirtualBox 4.1.2, a maintenance release of VirtualBox 4.1 which includes fixes and GUI support for Linked Clones.virtualboxWhat's New in This Release:· VMM: fixed 64-bit guests on AMD Fusion CPUs (bug #8824)
· VMM: fixed handling of the sysenter/sysexit machine instructions in 64-bit guests on Intel hosts
· GUI: added linked clone support
· GUI: fixed error check when changing the VM controller settings (4.1.0 regression; bug #9246)
· GUI: fixed the inclusion of additional information (license, vendor, ...) on OVF export
· GUI: when taking a snapshot from the VM selector, don't do a live snapshot
· GUI: fixed immediate crash during start on certain environments due to a library version conflict
· Guest control execution: implemented copying single files from guest to the host (directories and filters not supported yet)
· Guest control execution: limited to serve up to 5 guest processes at a time by default
· Main: return the correct RDP default port fixing settings warnings in the GUI if the remote display was enabled at runtime (bug #9368)
· VBoxSVC: made the path comparison OS independent when images are registered (bug #9303)
· VBoxSVC: several fixes/performance improvements for cloning of VMs
· Snapshots: fixed "Solid-State drive" flag survival on snapshot creation (bug #9379)
· VBoxManage: implemented copyfrom and stat guest control tools to copy files from guest to host and to check for existence of files on the guest
· VBoxManage: fixed extpack install --replace (bug #9308)
· VBoxManage: allow to start multiple VMs with startvm
· VBoxManage: experimental support for SATA CD/DVD hotplugging
· Mouse support: fixed an off-by-one pointer position error affecting Windows guests (bugs #7566, #9321)
· VRDP: fixed a case when the screen was not redrawn correctly (bug #9242)
· NAT: changed TCP connection establishment according to Winsock API requirements (Windows hosts only; bug #8919)
· USB: fixed device recognition issues (bugs #9299) and fixed several device capturing issues (Windows hosts; bug #9299)
· USB: fixed issues with remote filters being applied to local USB devices
· OVA: fixed import of renamed OVA files (bug #9033)
· Windows host: fixed icon for .VDI files (bug #9393)
Read more: Unixmen
QR:
· VMM: fixed handling of the sysenter/sysexit machine instructions in 64-bit guests on Intel hosts
· GUI: added linked clone support
· GUI: fixed error check when changing the VM controller settings (4.1.0 regression; bug #9246)
· GUI: fixed the inclusion of additional information (license, vendor, ...) on OVF export
· GUI: when taking a snapshot from the VM selector, don't do a live snapshot
· GUI: fixed immediate crash during start on certain environments due to a library version conflict
· Guest control execution: implemented copying single files from guest to the host (directories and filters not supported yet)
· Guest control execution: limited to serve up to 5 guest processes at a time by default
· Main: return the correct RDP default port fixing settings warnings in the GUI if the remote display was enabled at runtime (bug #9368)
· VBoxSVC: made the path comparison OS independent when images are registered (bug #9303)
· VBoxSVC: several fixes/performance improvements for cloning of VMs
· Snapshots: fixed "Solid-State drive" flag survival on snapshot creation (bug #9379)
· VBoxManage: implemented copyfrom and stat guest control tools to copy files from guest to host and to check for existence of files on the guest
· VBoxManage: fixed extpack install --replace (bug #9308)
· VBoxManage: allow to start multiple VMs with startvm
· VBoxManage: experimental support for SATA CD/DVD hotplugging
· Mouse support: fixed an off-by-one pointer position error affecting Windows guests (bugs #7566, #9321)
· VRDP: fixed a case when the screen was not redrawn correctly (bug #9242)
· NAT: changed TCP connection establishment according to Winsock API requirements (Windows hosts only; bug #8919)
· USB: fixed device recognition issues (bugs #9299) and fixed several device capturing issues (Windows hosts; bug #9299)
· USB: fixed issues with remote filters being applied to local USB devices
· OVA: fixed import of renamed OVA files (bug #9033)
· Windows host: fixed icon for .VDI files (bug #9393)
Read more: Unixmen
QR:
Lambda Expressions, Func and Action Delegates
Posted by
jasper22
at
09:51
|
Func and Action Delegates take the C# language to a new functional programming level. Lambda Expressions are tightly entwined in the LINQ infrastructure. We take a brief look at each.Lambda Expressions A lambda expression is an unnamed method that you write in place of a delegate instance. The compiler immediately converts the lambda expression to either:• A delegate instance.
• An expression tree, of type Expression<TDelegate>, representing the code inside the lambda expression in a traversable object model.
This allows the lambda expression to be interpreted later at runtime. Given the following delegate type:
delegate int Squarer (int i);
we could assign and invoke the lambda expression x => x * x as follows:
Squarer sqr = x => x * x;
Console.WriteLine (sqr(3)); Lambda expressions are simply definitions of functions, but in a very concise form with little syntactical ceremony. Because the underlying platform supports delegates as a way to pass pieces of code around, lambda expressions can leverage this infrastructure and be converted into delegates. The following example illustrates the creation of a function that adds two numbers together, with and without the use of lambdas: // C# 2.0
Func<int, int, int> add20 = delegate (int a, int b) { return a + b; };// C# 3.0
Func<int, int, int> add30 = (a, b) => a + b;
A lambda expression has the following form:
(parameters) => expression-or-statement-blockYou can omit the parentheses if there is only one parameter of an inferable type. In the example, there is a single parameter, x, and the expression is x * x:
x => x * x; Each parameter of the lambda expression corresponds to a delegate parameter, and the type of the expression (which may be void) corresponds to the return type of the delegate.
Read more: eggcafe
QR:
• An expression tree, of type Expression<TDelegate>, representing the code inside the lambda expression in a traversable object model.
This allows the lambda expression to be interpreted later at runtime. Given the following delegate type:
delegate int Squarer (int i);
we could assign and invoke the lambda expression x => x * x as follows:
Squarer sqr = x => x * x;
Console.WriteLine (sqr(3)); Lambda expressions are simply definitions of functions, but in a very concise form with little syntactical ceremony. Because the underlying platform supports delegates as a way to pass pieces of code around, lambda expressions can leverage this infrastructure and be converted into delegates. The following example illustrates the creation of a function that adds two numbers together, with and without the use of lambdas: // C# 2.0
Func<int, int, int> add20 = delegate (int a, int b) { return a + b; };// C# 3.0
Func<int, int, int> add30 = (a, b) => a + b;
A lambda expression has the following form:
(parameters) => expression-or-statement-blockYou can omit the parentheses if there is only one parameter of an inferable type. In the example, there is a single parameter, x, and the expression is x * x:
x => x * x; Each parameter of the lambda expression corresponds to a delegate parameter, and the type of the expression (which may be void) corresponds to the return type of the delegate.
Read more: eggcafe
QR:
New C# Forum for the Israeli Developers Community
Posted by
jasper22
at
09:50
|
Following are some blog news:New Israeli C# ForumI'm proud to present a new MSDN forum in Hebrew for the C# developers community in Israel, managed by yours truly. The forum is available on the following link: http://social.msdn.microsoft.com/Forums/he-il/VisualCsharpil To all those nice developers who keep asking me C# related questions by mail, I strongly urge you to post your C# related questions on this forum. NOT because I don't enjoy it!On contrary, I love to help you and would even more enjoy it if even more people could enjoy the answers. Plus, there's more people on this forum that can help, so you will probably get an answer sooner :)
In other news..New Windows 8 BlogRead more: Arik Poznanski's Blog
QR:
In other news..New Windows 8 BlogRead more: Arik Poznanski's Blog
QR:
Making the most out of IIS compression - Part 1: configuring IIS 7 compression
Posted by
jasper22
at
09:48
|
IntroductionUsing compression is the single most effective way to reduce page load times. The .aspx files sent by the server to the browser consist of HTML. HTML is highly compressible by algorithms such as gzip. Because of this, modern web servers including IIS 5 and later have the ability to compress outgoing files, and modern browsers have the ability to decompress incoming files. Both IIS 6 and IIS 7 offer advanced compression related options that help you get better performance improvements for your web site and make better use of your servers and bandwidth. Unfortunately, these options are not always easy to access. This article series shows step by step how to unlock these options. In the first article in this 2 part series, we'll focus on configuring IIS 7 compression. If you are used to IIS 6, you'll find that IIS 7 offers many new features, including the ability to cache not only compressed static files, but also compressed dynamic files. If you still use IIS 6, the next article in the series will show how to configure IIS 6 compression. Contents
Request and response headers involved in compressionHow does the server know that the browser can accept compressed content? And how does the browser know that the content it received is compressed? When a browser that supports compression sends a request to the server, it includes the request header Accept-Encoding telling the server which compression algorithms it supports. For example:Accept-Encoding: gzip,deflate
Read more: Codeproject
QR:
- Request and response headers involved in compression
- Starting configuration of IIS 7 compression
- Installing the dynamic content compression module
- Enabling compression
- Setting compression by site, folder, or file
- Compression level
- Disabling compression based on CPU usage
- Setting the request frequency threshold for static compression
- Caching compressed dynamic files
- Improving the compressibility of your pages
- Summary
Request and response headers involved in compressionHow does the server know that the browser can accept compressed content? And how does the browser know that the content it received is compressed? When a browser that supports compression sends a request to the server, it includes the request header Accept-Encoding telling the server which compression algorithms it supports. For example:Accept-Encoding: gzip,deflate
Read more: Codeproject
QR:
12 Fresh Google+ Apps, Tools and API Hacks
Posted by
jasper22
at
09:47
|
Although Google+ was launched more than a month ago, many applications and services have been already built on it. Which is really amazing considering the fact that, Google+ still don't have a public API. So, I started the roundup with API hacks to understand how other apps might have been made of. 1. PlusFeed Although Google has not relaesed a public API for Google+, Russell Beattie has built a Google app to provide an ATOM feed of users' public posts. ( see my public feed).The idea behind that app started by inspecting AJAX calls on Google+ page itself, which showed that Google uses this URL "https://plus.google.com/_/stream/getactivities/118211149935481259253/?sp=[1,2,"118211149935481259253",null,null,null,null,"social.google.com",[]]" to load your posts, which returns a malformed JSON array of my Google+ posts. While you cann't use that malformed JSON in Javascript directly, you can use Google Feeds API to convert ATOM feed from PlusFeed into a regular JSON array that you can use.A WordPress Plugin was already built based on PlusFeed. Also, The same idea was implemented in a PHP class by Rich Kreider. 2. JavaPlusAnother Google+ API hack, Javaplus, a Java object by Jason Grey for accessing many parts of the Google+ data. Javaplus can retrun basic information of a user, user's public posts feed, list of people in user's circles or people having a user in their circles. 3. Google+ Search
Read more: More tech tips
QR:
Catel Examples
Posted by
jasper22
at
09:45
|
Project Description
Repository containing several example projects for Catel in WPF, Silverlight and WP7.For more information, visit http://catel.codeplex.com. Read more: Codeplex
QR:
Repository containing several example projects for Catel in WPF, Silverlight and WP7.For more information, visit http://catel.codeplex.com. Read more: Codeplex
QR:
WCF 4 (Windows Communication Foundation) for Beginner - Table of content
Posted by
jasper22
at
09:45
|
כתבתי מדריך די מפורט בעל ארבעה עשר פרקים למתחילים בעולם ה - WCF,
לכל מי שמתחיל בעולם ה - WCF, או מי שרוצה להבין את היסודות, המדריך הזה הוא המקום להתחיל.
חלק ראשון - בו אדבר על מה זה Service ומה זה Contract. נושאים בחלק ראשון: מה המשמעות של Service.
מה זה Contract ומה ההבדל בין ServiceContract לבין OperationContract.
כיצד מתחילים לכתוב Service.
מה זה DataContract ומה זה DataMember.
חלק שני - בו אספר לכם כיצד להרים Services לאויר (Hosting) נושאים בחלק שני: סיכום דוגמת קוד להגדרה של Service מהפרק הקודם.
מי מחזיק את השירות באויר.
מה זה Endpoint.
הגדרה של Endpoint בקונפיג.
מה זה Binding.
הגדרה של Service Host והרמת השירות הראשון שלנו לאויר.חלק שלישי - בו אספר כיצד לתקשר עם Service שבאויר. נושאים בחלק שלישי: סיכום דוגמת קוד מהפרק הקודם.
מה Client צריך לעשות כדי לתקשר עם ה - Service.
יצירת Client ראשון בעזרת ChannelFactory.
יצירת Client שני בעזרת Service Reference.
חלק רביעי - בו אסביר על החלקים השונים של קובץ הקונפיג. נושאים בפרק רביעי: סיכום הפרקים הקודמים.
ממה מורכב האלמנט Binding.
סוגי ה - Bindings השונים.
הבנת המאפיין bindingConfiguration של אלמנט Endpoint
הבנת המאפיין behaviorConfiguration של אלמנט Endpoint
הבנת המאפיין behaviorConfiguration של אלמנט Service
לכל מי שמתחיל בעולם ה - WCF, או מי שרוצה להבין את היסודות, המדריך הזה הוא המקום להתחיל.
חלק ראשון - בו אדבר על מה זה Service ומה זה Contract. נושאים בחלק ראשון: מה המשמעות של Service.
מה זה Contract ומה ההבדל בין ServiceContract לבין OperationContract.
כיצד מתחילים לכתוב Service.
מה זה DataContract ומה זה DataMember.
חלק שני - בו אספר לכם כיצד להרים Services לאויר (Hosting) נושאים בחלק שני: סיכום דוגמת קוד להגדרה של Service מהפרק הקודם.
מי מחזיק את השירות באויר.
מה זה Endpoint.
הגדרה של Endpoint בקונפיג.
מה זה Binding.
הגדרה של Service Host והרמת השירות הראשון שלנו לאויר.חלק שלישי - בו אספר כיצד לתקשר עם Service שבאויר. נושאים בחלק שלישי: סיכום דוגמת קוד מהפרק הקודם.
מה Client צריך לעשות כדי לתקשר עם ה - Service.
יצירת Client ראשון בעזרת ChannelFactory.
יצירת Client שני בעזרת Service Reference.
חלק רביעי - בו אסביר על החלקים השונים של קובץ הקונפיג. נושאים בפרק רביעי: סיכום הפרקים הקודמים.
ממה מורכב האלמנט Binding.
סוגי ה - Bindings השונים.
הבנת המאפיין bindingConfiguration של אלמנט Endpoint
הבנת המאפיין behaviorConfiguration של אלמנט Endpoint
הבנת המאפיין behaviorConfiguration של אלמנט Service
StyleCop 4.6 released
Posted by
jasper22
at
09:43
|
The Alpha release of StyleCop 4.6 is available at http://stylecop.codeplex.com/releases/view/64494This release provides integration with Resharper 6. I have used it and so far without any problems.Read more: Tatworth
QR:
QR:
Jumio סולקת כרטיסי אשראי עם מצלמת אינטרנט [סטארטאפ]
Posted by
jasper22
at
12:10
|
אם אתם לא בוטחים ב-PayPal ולעיתים מוותרים על קניות מקוונות רק מהפחד שיגנבו לכם את מספר כרטיס האשראי, חברת Jumio מציגה טכנולוגיה חדשה, בה ניתן לשלם באמצעות הצגת כרטיס האשראי אל מצלמת הרשת שלנו.
לתשלום, חייכוהטכנולוגיה שפיתחה Jumio ונקראת Netswipe מאפשרת למשתמשים לשלם על הקניות המקוונות שלהם באמצעות החזקת כרטיס האשראי מול מצלמת הרשת. בניגוד לרושם הראשוני, הטכנולוגיה שפותחה מסוגלת לזהות שאכן מדובר כרטיס אשראי אמיתי ולהוציא ממנו את המידע הנחוץ על מנת לבצע ולהשלים עסקאות. מנכ"ל החברה, דניאל מטס (Daniel Mattes) מתאר את מערכת הסליקה שפיתח כ-"Square ללא חומרה". אחוז גבוה מהמחשבים היוצאים כיום לשוק מכילים מצלמת אינטרנט מובנת וניתן להניח כי למרבית המשתמשים יש כרטיס אשראי כזה או אחר. Jumio מייעלת את העבודה עם הכלים הזמינים לה כיום בשוק במטרה להקל על המשתמשים ובעלי החנויות לבצע עסקאות יחדיו. Netswipe לא רק מפענחת את פרטי כרטיס האשראי, היא גם מסוגלת לבצע את תהליך התשלום עצמו. כך, בעלי עסקים יכולים לקבל תשלום בצורה קלה ומהירה מהגולשים על ידי הטמעת שיטת התשלום החדשה באתר שלהם. בכך גם יכולים להמנע מתופעת נטישת עגלת הקניות לפני שהושלמה העסקה. לטענת מטס, ניסוי שערך במהלך שישה שבועות עם בעלי עסקים במהלכו הטמיעו את אמצעי התשלום החדש באתרם, הראה כי שיעור הנטישה של הלקוחות ירד מ-52% אל רק 21%.
לתשלום, חייכוהטכנולוגיה שפיתחה Jumio ונקראת Netswipe מאפשרת למשתמשים לשלם על הקניות המקוונות שלהם באמצעות החזקת כרטיס האשראי מול מצלמת הרשת. בניגוד לרושם הראשוני, הטכנולוגיה שפותחה מסוגלת לזהות שאכן מדובר כרטיס אשראי אמיתי ולהוציא ממנו את המידע הנחוץ על מנת לבצע ולהשלים עסקאות. מנכ"ל החברה, דניאל מטס (Daniel Mattes) מתאר את מערכת הסליקה שפיתח כ-"Square ללא חומרה". אחוז גבוה מהמחשבים היוצאים כיום לשוק מכילים מצלמת אינטרנט מובנת וניתן להניח כי למרבית המשתמשים יש כרטיס אשראי כזה או אחר. Jumio מייעלת את העבודה עם הכלים הזמינים לה כיום בשוק במטרה להקל על המשתמשים ובעלי החנויות לבצע עסקאות יחדיו. Netswipe לא רק מפענחת את פרטי כרטיס האשראי, היא גם מסוגלת לבצע את תהליך התשלום עצמו. כך, בעלי עסקים יכולים לקבל תשלום בצורה קלה ומהירה מהגולשים על ידי הטמעת שיטת התשלום החדשה באתר שלהם. בכך גם יכולים להמנע מתופעת נטישת עגלת הקניות לפני שהושלמה העסקה. לטענת מטס, ניסוי שערך במהלך שישה שבועות עם בעלי עסקים במהלכו הטמיעו את אמצעי התשלום החדש באתרם, הראה כי שיעור הנטישה של הלקוחות ירד מ-52% אל רק 21%.
Avatar Kinect - available now
Posted by
jasper22
at
12:08
|
Is Avatar Kinect a game changing innovation or is it just silly? With a little more work it could provide the sort of virtual or is it augmented, reality that creates a new way to interact and experience novel environments. We first reported on the Avatar Kinect system back in January this year (2011) when it was first demoed. Now you can download it and try it out for yourself from the Kinect Fun Labs. The download is free but to use it you will need to be a Gold member of Xbox LIVE - but you can use it free until September the 8th via Xbox LIVE (silver or gold membership). The idea of Avatar Kinect is simple enough. It uses the Kinect to determine body position and facial expression and maps these in real-time onto an avatar displayed on the screen with other similar avatars. The following short video shows in very roughly how this is achieved:
Read more: I Programmer
Read more: Kinect fun labs
QR:
Google Announces Google CDN
Posted by
jasper22
at
11:49
|
Google has introduced their Page Speed Service which 'is the latest tool in Google's arsenal to help speed up the web. When you sign up and point your site's DNS entry to Google, they'll enable the tool which will fetch your content from your servers, rewrite your webpages, and serve them up from Google's own servers around the world.' Read more: Slashdot
QR:
QR:
MX Video Player For Android Plays Almost Any Video File Format
Posted by
jasper22
at
11:45
|
MX Video Player is a free video player for Android that comes with support for almost every video file format known to date along with multiple subtitle files such as mkv subtitle track, .srt, .sub, .ass, .mpl, .psb etc. Rich graphical UI, high quality full-screen video playback, editable playlist features, advanced video playback controls, customizable subtitle options, easy switch between hardware and software decoder and its compatibility with most Android devices makes MX Video Player a must-have tool for all your video playback needs. Although there are quite a few video players available for Android users but MX Video Player simply has the edge when it comes to finding a player that combines optimum quality video playback options with a host of video formats. MX Video player supports all the popular video file formats including: avi
mpeg
mp4
wmv
divx
xvid
mov
flv
vob
3gp
and more…
Read more: Addictive tips
QR:
mpeg
mp4
wmv
divx
xvid
mov
flv
vob
3gp
and more…
Read more: Addictive tips
QR:
HOWTO build your own open source Dropbox clone
Posted by
jasper22
at
11:44
|
Install OpenSSH serverFirst you’ll need to install OpenSSH Server on the remote system:
apt-get install openssh-server
Configure SSH for Passwordless LoginsYou’ll need to configure passwordless logins between the two hosts you want to use, this is how rsync will pass the files back and forth. I’ve previously written a HOWTO on this topic, so we’ll crib from there. First, generate a key:ssh-keygen -t rsaUPDATE: actually, it’s easier to do it this wayssh-keygen -N '' -f ~/.ssh/id_dsa(Enter)You shouldn’t have a key stored there yet, but if you do it will prompt you now; make sure you overwrite it. Enter passphrase (empty for no passphrase):(Enter)Enter same passphrase again:(Enter)We’re not using passphrases so logins can be automated, this should only be done for scripts or applications that need this functionality, it’s not for logging into servers lazily, and it should not be done as root!
Read more: Fak3r
QR:
35 Million SK Telecom Accounts Stolen By Chinese Hackers
Posted by
jasper22
at
11:35
|
South Korea's SK Telecom has revealed that earlier this week hackers stole 35 million account details from two sites. A portal called Nate Portal that provided e-mail services and a social networking site called CyWorld were the two targets by hackers who, SK Telecom claims, used IP addresses originating from China. From the article, 'The stolen data included user IDs, passwords, social security numbers, names, mobile phone numbers and email addresses. Nate said the social security numbers and passwords are encrypted so that they are not available for illegal use. Read more: Slashdot
QR:
QR:
Get Facebook Notifications In Ubuntu Unity Launcher With Faccialibro
Posted by
jasper22
at
11:27
|
In the past we showed you how to create a Google+ quick list and notifications indicator for the Ubuntu Unity Launcher. This time we have a similar launcher for Facebook. Faccialibro is a Unity launcher indicator which provides unread notification count from the Unity Launcher and also provides a quick list for launching Facebook notifications, messages and friends page from a quick list. To install Faccialibro, you will first need to install Python-Facebook from here. Once done, you can download the Faccialibro package from the developer’s website (link given at the end of the post). Extract the compressed archive and hit CTRL+H to display hidden files and folders. Open the folder faccialibro, right click on the Faccialibro.desktop file and select Properties. Read more: Addicitive tips
QR:
[Silverlight] Put on attribute per line in XAML files
Posted by
jasper22
at
09:48
|
A XAML file can be unreadable when there are a lot of attributes in controls. Lines are often too long to be displayed on screen (horizontal scrollbar is required). Visual Studio 2010 offers an option allowing us to put one attribute per line automatically to facilitate code reading.
So, when you have written your code, press Ctrl + K + D to format XAML.To activate this option, go to Tools -> Options, then open Text Editor -> XAML -> Formatting and select Spacing. Next, check “Position each attribute on a separate line“.Read more: Aymeric's blog
QR:
The Top 5 WPF and Silverlight Gotchas
Posted by
jasper22
at
09:47
|
As I’m sure you know, WPF and Silverlight both use XAML as their interface markup language. The idea is that you can define your user interface (UI) and bind it to data without ever writing a line of code (healthy skepticism advised). Whether or not you buy into that vision, the UI possibilities can be stunning, and it seems Microsoft has created a technology that combines both power and flexibility. However, with that power comes responsibility. It’s with an eye on that responsibility that I write this article, in which I want to talk about some of the problems that you can introduce into your application without even realizing it.
Background .NET uses a garbage collector to reclaim and reuse the space left behind when objects are no longer needed. To do this, it builds a list of all objects that are still ultimately referenced from an application root, such as the stack, other objects on the heap, the CPU and statics, to name just a few. Everything else (i.e. objects which have no such references) is assumed to be garbage, and the .NET framework rearranges memory allocation to reuse the gaps these objects filled. A leak (or, if you’re being picky, leak-like behavior) occurs when a section of code fails to release references to objects it has finished working with. The smaller the leak, the greater the number of iterations that must occur before it becomes a noticeable problem. The larger the leak, the more obvious the problem. A really obvious example of this problem is adding an object to a static collection and then forgetting about it. Other common ones involve event handling, which we will discuss later. The simple fact is that if you leave a reference to an object behind, and that reference traces back to an application root, then you have a leak. There are lots of great articles about .NET memory management, and one of the first things you can do to avoid leaks in general is to really understand memory management.
heavyweight User Interfaces in xaml Silverlight and WPF applications are state-full, and allow us to hold state in the form of complex data structures as well as rich UI elements such as images and media. All of this “stuff” adds to the size of the views we create and, ultimately, the size of a memory leak when things go wrong. If you have a memory leak that involves a complex UI then it can quickly become a major problem, especially if users are constantly opening and closing windows as part of standard flows. Read more: simple-talk
QR:
Background .NET uses a garbage collector to reclaim and reuse the space left behind when objects are no longer needed. To do this, it builds a list of all objects that are still ultimately referenced from an application root, such as the stack, other objects on the heap, the CPU and statics, to name just a few. Everything else (i.e. objects which have no such references) is assumed to be garbage, and the .NET framework rearranges memory allocation to reuse the gaps these objects filled. A leak (or, if you’re being picky, leak-like behavior) occurs when a section of code fails to release references to objects it has finished working with. The smaller the leak, the greater the number of iterations that must occur before it becomes a noticeable problem. The larger the leak, the more obvious the problem. A really obvious example of this problem is adding an object to a static collection and then forgetting about it. Other common ones involve event handling, which we will discuss later. The simple fact is that if you leave a reference to an object behind, and that reference traces back to an application root, then you have a leak. There are lots of great articles about .NET memory management, and one of the first things you can do to avoid leaks in general is to really understand memory management.
heavyweight User Interfaces in xaml Silverlight and WPF applications are state-full, and allow us to hold state in the form of complex data structures as well as rich UI elements such as images and media. All of this “stuff” adds to the size of the views we create and, ultimately, the size of a memory leak when things go wrong. If you have a memory leak that involves a complex UI then it can quickly become a major problem, especially if users are constantly opening and closing windows as part of standard flows. Read more: simple-talk
QR:
System.Threading.Tasks and updating the UI thread
Posted by
jasper22
at
09:46
|
This is something that I couldn't remember parts of earlier today so I figured I would add it to my "knowledge base". I wanted to retrieve a TFS work item on a background thread in my ViewModel and have the UI update when complete. Specifically I wanted to retrieve the title of a TFS work item (project here) and have that display after the user entered a work item id. While this is not a terribly expensive server hit, it can be noticeable enough to want it performed on another thread. In the end the method associated with my RelayCommand looked like the below:private void CheckWorkItemId()
{
if (!this.WorkItemIdInvalidated || this.ProjectId <= 0
|| string.IsNullOrWhiteSpace(Settings.Default.TfsServerName))
return;
this.WorkItemTitle = WORK_ITEM_FETCH;
Task.Factory.StartNew(() => WorkItemInfoRetriever.Get(
Settings.Default.TfsServerName, this.ProjectId)).ContinueWith(t =>
{
if (null == t.Exception)
{
this.WorkItemTitle = t.Result.Title;
this.WorkItemIdInvalidated = false;
}
else
{
this.WorkItemTitle = null;
var ex = t.Exception.InnerException;
if (ex is InvalidWorkItemException)
_messageBoxService.ShowOKDispatch(ex.Message, "Invalid Work Item");
else
_messageBoxService.ShowErrorDispatch(ex.Message, "Unexpected Error");
} ReCalculateCommands();
}, TaskScheduler.FromCurrentSynchronizationContext());
}
The salient points are: Grabbing the current task scheduler while on the UI thread with TaskScheduler.FromCurrentSynchronizationContext, done in the ContinueWith call
Chaining in a continuation to be run when the task completes via Task.ContinueWith
Checking for exception when completed. I bypassed explicit use of AggregateException and InnerExceptions as in my case there'd be a single error or noneRead more: geoffhudik.com
QR:
{
if (!this.WorkItemIdInvalidated || this.ProjectId <= 0
|| string.IsNullOrWhiteSpace(Settings.Default.TfsServerName))
return;
this.WorkItemTitle = WORK_ITEM_FETCH;
Task.Factory.StartNew(() => WorkItemInfoRetriever.Get(
Settings.Default.TfsServerName, this.ProjectId)).ContinueWith(t =>
{
if (null == t.Exception)
{
this.WorkItemTitle = t.Result.Title;
this.WorkItemIdInvalidated = false;
}
else
{
this.WorkItemTitle = null;
var ex = t.Exception.InnerException;
if (ex is InvalidWorkItemException)
_messageBoxService.ShowOKDispatch(ex.Message, "Invalid Work Item");
else
_messageBoxService.ShowErrorDispatch(ex.Message, "Unexpected Error");
} ReCalculateCommands();
}, TaskScheduler.FromCurrentSynchronizationContext());
}
The salient points are: Grabbing the current task scheduler while on the UI thread with TaskScheduler.FromCurrentSynchronizationContext, done in the ContinueWith call
Chaining in a continuation to be run when the task completes via Task.ContinueWith
Checking for exception when completed. I bypassed explicit use of AggregateException and InnerExceptions as in my case there'd be a single error or noneRead more: geoffhudik.com
QR:
NHibernate Work-Around is not really a Work-Around…
Posted by
jasper22
at
09:44
|
Over the weekend I came across a blog post about NHibernate, and an apparent work-around for a feature not supported by NHibernate.The original post can be found here: nHibernate LINQ workaround for System.NotSupportedException Basically the author wanted to write something along the lines of:
var fruitIds = new List<int> { 5, 8, 13 };using (var session = factory.OpenSession())
{
var result = from f in session.Query<NHFruit>()
join i in fruitIds
on f.Id equals i
select f; foreach (var fruit in result)
Console.WriteLine(fruit.Name);
}Where the query joins to a list of Ids to filter the results out. This however, happens to throw an exception:
Read more: Phillip Haydon
QR:
var fruitIds = new List<int> { 5, 8, 13 };using (var session = factory.OpenSession())
{
var result = from f in session.Query<NHFruit>()
join i in fruitIds
on f.Id equals i
select f; foreach (var fruit in result)
Console.WriteLine(fruit.Name);
}Where the query joins to a list of Ids to filter the results out. This however, happens to throw an exception:
Read more: Phillip Haydon
QR:
The anti-virus exclusion list round-up to rule them all... Or I'm running SQL Server/Windows/FRS/other Microsoft server products, what folders, files and processes should I exclude in my anti-virus scanning?
Posted by
jasper22
at
09:42
|
"Security is something that is at the top of everyone’s mind, but what if your A/V software actually causes an issue with some of the software you’re running? If that’s the case then there’s probably an exclusion you need to make to keep things safe, secure and working smoothly. Luckily Microsoft’s own Jeff Patterson and Tony Soper have put together a pretty comprehensive list of ALL the AV exclusions you might want to configure for Windows Server, including AD, OpsMgr, ConfigMgr, Hyper-V, SQL, WSUS, MED-V, DPM, App-V and much much more. You can check it out on our TechNet Wiki below:
Read more: Greg's Cool [Insert Clever Name] of the Day
Read more: Looking for an Anti-Virus exclusion list? Here’s your one-stop shop
QR:
Read more: Greg's Cool [Insert Clever Name] of the Day
Read more: Looking for an Anti-Virus exclusion list? Here’s your one-stop shop
QR:
WCF Extensibility – WebHttpBehavior
Posted by
jasper22
at
09:41
|
This post is part of a series about WCF extensibility points. For a list of all previous posts and planned future ones, go to the index page.In the last post about QueryStringConverter I mentioned that the way to replace the converter used by some operations in WCF WebHttp endpoints (they’re more widely known as WCF REST endpoints, although the purists may disagree with this name) is to create a class derived from WebHttpBehavior and override a virtual method from that base class. In this post I’ll go over the other virtual methods in that class, which makes extending WCF WebHttp endpoints (a little) easier than the general WCF endpoints. Public implementations in WCFThe WebHttpBehavior class is concrete, so it can be used directly. There is one public subclass in WCF, WebScriptEnablingBehavior, which is the behavior used in endpoints compatible with the ASP.NET AJAX library--LINK. That behavior modifies the base with the following changes: Changes the DefaultBodyStyle property to WrappedRequest (and throws if one tries to set a different value)
Changes the DefaultOutgoingRequestFormat and DefaultOutgoingResponseFormat to WebMessageFormat.Json (instead of Xml)
Changes the properties AutomaticFormatSelectionEnabled, FaultExceptionEnabled and HelpEnabled to false (and throws if one tries to set them to true).
Adds additional validation for features not supported by the ASP.NET AJAX library
Changes the default QueryStringConverter to use the JsonQueryStringConverter, which allows the passing of complex types (encoded in JSON) in the query string for GET requests as well)
Adds a new “metadata” endpoint which returns a JavaScript proxy which uses the ASP.NET AJAX library, and applications using that library can call the endpoints by using the "method” syntax (instead of having to handcraft the requests in the JavaScript code)
Adds a new IErrorHandler in the server which changes exceptions in a JSON format understood by the ASP.NET AJAX library
Adds a new IClientMessageInspector in the client, for the (not so common) case where this behavior is used at the client side so it will be able to understand the JSON format emitted by the error handler mentioned above So that class changed a lot of the behavior. And the good thing is that all those changes were made via public virtual method, so it’s possible to recreate something similar with “normal” user code as well.
Class definition public class WebHttpBehavior : IEndpointBehavior
{
// Properties
public virtual bool AutomaticFormatSelectionEnabled { get; set; }
public virtual WebMessageBodyStyle DefaultBodyStyle { get; set; }
public virtual WebMessageFormat DefaultOutgoingRequestFormat { get; set; }
public virtual WebMessageFormat DefaultOutgoingResponseFormat { get; set; }
public virtual bool FaultExceptionEnabled { get; set; }
public virtual bool HelpEnabled { get; set; }
protected internal string JavascriptCallbackParameterName { get; set; }
// Methods
public virtual void AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters);
protected virtual void AddClientErrorInspector(ServiceEndpoint endpoint, ClientRuntime clientRuntime);
Read more: Carlos' blog
QR:
Changes the DefaultOutgoingRequestFormat and DefaultOutgoingResponseFormat to WebMessageFormat.Json (instead of Xml)
Changes the properties AutomaticFormatSelectionEnabled, FaultExceptionEnabled and HelpEnabled to false (and throws if one tries to set them to true).
Adds additional validation for features not supported by the ASP.NET AJAX library
Changes the default QueryStringConverter to use the JsonQueryStringConverter, which allows the passing of complex types (encoded in JSON) in the query string for GET requests as well)
Adds a new “metadata” endpoint which returns a JavaScript proxy which uses the ASP.NET AJAX library, and applications using that library can call the endpoints by using the "method” syntax (instead of having to handcraft the requests in the JavaScript code)
Adds a new IErrorHandler in the server which changes exceptions in a JSON format understood by the ASP.NET AJAX library
Adds a new IClientMessageInspector in the client, for the (not so common) case where this behavior is used at the client side so it will be able to understand the JSON format emitted by the error handler mentioned above So that class changed a lot of the behavior. And the good thing is that all those changes were made via public virtual method, so it’s possible to recreate something similar with “normal” user code as well.
Class definition public class WebHttpBehavior : IEndpointBehavior
{
// Properties
public virtual bool AutomaticFormatSelectionEnabled { get; set; }
public virtual WebMessageBodyStyle DefaultBodyStyle { get; set; }
public virtual WebMessageFormat DefaultOutgoingRequestFormat { get; set; }
public virtual WebMessageFormat DefaultOutgoingResponseFormat { get; set; }
public virtual bool FaultExceptionEnabled { get; set; }
public virtual bool HelpEnabled { get; set; }
protected internal string JavascriptCallbackParameterName { get; set; }
// Methods
public virtual void AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters);
protected virtual void AddClientErrorInspector(ServiceEndpoint endpoint, ClientRuntime clientRuntime);
Read more: Carlos' blog
QR:
Catel - Part 7 of n: What’s new in Catel 2.x
Posted by
jasper22
at
09:39
|
Table of Contents2.2. IPleaseWaitService implementation for Silverlight 2.3. Single namespace for all controls 2.4. Auditing IoC containers / ServiceLocator 3.3. External containers 3.4. Synchronization between containers 3.5. Supported external containers MVVM behaviors WP7 Mango support What’s next?
1. IntroductionWelcome to part 7 of the articles series about Catel. If you haven’t read the previous article(s) of Catel yet, it is recommended that you do. They are numbered so finding them shouldn’t be too hard. This article is all about the new Catel 2.x releases. Catel 2.0 was released on August 4th, 2011 and contains tons of new features and improvements. This article will handle the most important changes and new features. There are some features that are important enough to name in this article, but not important enough for a separate chapter. Therefore, some of the changes are described in the general part.
2. GeneralThis chapter describes features that are important enough to be mentioned, but do not required a separate chapter because the explanation is fairly simple.
2.1. BehaviorsCatel now offers several new behaviors out of the box. The developers of Catel are normally spoiled with the luxury of developing applications using WPF, but sometimes they need to write software using Silverlight. One of the downsides of writing applications in Silverlight is that a lot of functionality you are used to in WPF is not available. Two of these simple things are the missing DoubleClick event and the missing option to update a binding on property changed instead of lost focus.
2.1.1. DoubleClickToCommandTo easily enable developers to use these “luxuries” in Silverlight, two new behaviors are developed. The DoubleClickToCommand allows a developer to enable the DoubleClick event (which is not available) on any FrameworkElement that supports the LeftMouseButtonDown event. So, if a DoubleClick event must be added, this can simply be done using the behavior. Say there is an Image control representing a logo, and the user should be able to double-click it to edit the logo. The following code is sufficient to create this behavior: <Image Source="/Catel.Demo;component/resources/images/catel.png">
<i:Interaction.Triggers>
<catel:DoubleClickToCommand Command="{Binding EditLogo}" />
</i:Interaction.Triggers>
</Image>2.1.2. UpdateBindingOnTextChangedOne question we get asked on a very regular basis is how to update a binding when the user types something into a textbox. By default, the binding only updates when the textbox loses the focus. Sometimes, this behavior is not enough because the developer wants to give the user feedback immediately when typing in a textbox. Or, another usage is a textbox with a filter where the filter should apply immediately after typing into a textbox. One option to solve this problem is to subscribe to the TextChanged event in the code-behind and update the binding explicitly. A better option is to use the UpdateBindingOnTextChanged behavior that ships with Catel. <TextBox Text="{Binding SearchParameter, Mode=TwoWay}">
<i:Interaction.Behaviors>
<catel:UpdateBindingOnTextChanged />
</i:Interaction.Behaviors>
</TextBox>
Read more: Codeproject
QR:
- 3.2.1. Registering a type
- 3.2.2. Registering an instance of a type
- 3.2.3. Registering a type via MissingType event
- 3.2.4. Resolving a type
- 3.4.1. Synchronization from external container to ServiceLocator
- 3.4.2. Synchronization from ServiceLocator to external containers
- 3.4.3. Automatic or manual synchronization
1. IntroductionWelcome to part 7 of the articles series about Catel. If you haven’t read the previous article(s) of Catel yet, it is recommended that you do. They are numbered so finding them shouldn’t be too hard. This article is all about the new Catel 2.x releases. Catel 2.0 was released on August 4th, 2011 and contains tons of new features and improvements. This article will handle the most important changes and new features. There are some features that are important enough to name in this article, but not important enough for a separate chapter. Therefore, some of the changes are described in the general part.
2. GeneralThis chapter describes features that are important enough to be mentioned, but do not required a separate chapter because the explanation is fairly simple.
2.1. BehaviorsCatel now offers several new behaviors out of the box. The developers of Catel are normally spoiled with the luxury of developing applications using WPF, but sometimes they need to write software using Silverlight. One of the downsides of writing applications in Silverlight is that a lot of functionality you are used to in WPF is not available. Two of these simple things are the missing DoubleClick event and the missing option to update a binding on property changed instead of lost focus.
2.1.1. DoubleClickToCommandTo easily enable developers to use these “luxuries” in Silverlight, two new behaviors are developed. The DoubleClickToCommand allows a developer to enable the DoubleClick event (which is not available) on any FrameworkElement that supports the LeftMouseButtonDown event. So, if a DoubleClick event must be added, this can simply be done using the behavior. Say there is an Image control representing a logo, and the user should be able to double-click it to edit the logo. The following code is sufficient to create this behavior: <Image Source="/Catel.Demo;component/resources/images/catel.png">
<i:Interaction.Triggers>
<catel:DoubleClickToCommand Command="{Binding EditLogo}" />
</i:Interaction.Triggers>
</Image>2.1.2. UpdateBindingOnTextChangedOne question we get asked on a very regular basis is how to update a binding when the user types something into a textbox. By default, the binding only updates when the textbox loses the focus. Sometimes, this behavior is not enough because the developer wants to give the user feedback immediately when typing in a textbox. Or, another usage is a textbox with a filter where the filter should apply immediately after typing into a textbox. One option to solve this problem is to subscribe to the TextChanged event in the code-behind and update the binding explicitly. A better option is to use the UpdateBindingOnTextChanged behavior that ships with Catel. <TextBox Text="{Binding SearchParameter, Mode=TwoWay}">
<i:Interaction.Behaviors>
<catel:UpdateBindingOnTextChanged />
</i:Interaction.Behaviors>
</TextBox>
Read more: Codeproject
QR:
SmartOS: The Complete Modern Operating System
Posted by
jasper22
at
09:37
|
SmartOS incorporates the four most revolutionary OS technologies of the past decade — Zones, ZFS, DTrace and KVM — into a single operating system, providing an arbitrarily observable, highly multi-tenant environment built on a reliable, enterprise-grade storage stack. With the introduction of KVM in SmartOS, you no longer have to give up the power of an enterprise-grade operating system in order to run legacy applications and stacks. SmartOS turns any server into a highly efficient hosting platform for multi-tenant, machine-to-machine, or storage applications. SmartOS offers unique, innovative tools for application developers, service providers and data center operators – tuned and hardened for modern datacenter deployment.
Read more: SmartOS
QR:
Subscribe to:
Posts (Atom)