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

Background Networking

| Wednesday, April 18, 2012
Overview

This paper provides information about an app lifecycle management model for apps that require real-time connectivity between the client and server. To address the lifecycle limitations for real-time connected apps, Windows 8 Consumer Preview introduces a new set of APIs that allow users to build always reachable apps.

Read more: MS Download
QR: Inline image 1

Posted via email from Jasper-net

Workaround for CA0055 Error with Silverlight Projects in Visual Studio 2010

|
This connect bug describes an issue with creating certain types of Silverlight projects in Visual Studio. If you're referencing Silverlight 4 DLLs from a Silverlight 5 project, you may run into this code analysis/FXCop issue yourself if code analysis is part of your process. The core of the problem is a versioning decision in Silverlight 5 which results in compile-time violation due to loading two different versions of mscorlib in the same project. It manifests as the following error:

Error 2 CA0055 : Could not unify the platforms (mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, mscorlib, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) for 'MyProject.Silverlight\obj\Debug\MyProject.dll'.
More information on CA0055 may be found on MSDN.

How to Reproduce the Issue … in theory

In theory, all you need to do to reproduce the issue is reference a SL4-targeted DLL from an SL5 application. However, in practice, there are other factors in play. For example, it may matter which mscorlib version gets loaded first. These steps won't repro the problem on my installation, but I'm putting them out here in case they help you visualize the issue (and also because I had already written them up when I realized they don't repro here -- I don't want all these bits to go to waste). Create a Silverlight 4 class library. Make sure you target Silverlight 4. I named mine SL4ClassLibrary. The actual code is unimportant, but I set it to the following:

namespace SL4ClassLibrary
{
    public class Class1
    {
        public string Foo = "Bar";
    }
}

Read more: 10Rem
QR: Inline image 1

Posted via email from Jasper-net

.NET for Metro style apps

|
.NET is now a core part of several Microsoft platforms, and each has focused on specific subset of APIs. A lot of thought has been put into crafting each API surface area. Many of you have asked how the .NET APIs available for Metro style apps were chosen. In the following post, Immo Landwerth – a program manager on the CLR’s Core Framework team – provides an answer to this question. -- Brandon

Since the releases of the Windows 8 Consumer Preview and the Windows Developer Preview, developers have been busy exploring Windows 8, and many have asked questions about the subset of.NET Framework APIs that can be used to develop Windows Metro style apps. The natural tendency has been to compare the .NET APIs for Metro style apps to those available for other platforms such as Windows Phone. In particular, developers are wondering how much of their existing C# or Visual Basic source code they can expect to reasonably port to build a new Metro style app. We asked ourselves the same question when we carefully designed .NET APIs for Metro style apps.

In this post, I’d like to give you an overview of the APIs that are available to you for building Metro style apps. I will primarily discuss the design principles and requirements we used to decide which .NET Framework APIs to make available for Metro style app development. I will also touch on the relationships between .NET APIs for Metro style apps and other .NET API profiles.

Design goals
From the start of this project, we realized that we had a great opportunity to simplify app development, but also some interesting challenges to resolve. Metro style apps enable developers to provide compelling end-user experiences across all the supported Windows 8 devices. In order to achieve this goal, many important changes were made within Windows, some of which affected our design approach to the .NET Framework APIs that we would expose.

The biggest change, in terms of .NET Framework APIs, was the introduction of the Windows Runtime APIs. The Windows Runtime is a new API surface in Windows that exposes the functionality necessary to write Metro style apps. These APIs were designed to be used from a variety of programming languages: C# and Visual Basic and also native C++ and JavaScript. The task for our design team was to ensure that .NET Framework developers would be able to use both .NET Framework and Windows Runtime APIs together in a way that felt natural and intuitive. Also, the Windows Runtime team worked closely with us and approached the same task from the opposite direction.

Read more: .NET Blog
QR: Inline image 1

Posted via email from Jasper-net

Enable or Disable a Network Device in Your System Using Windows 8

| Tuesday, April 17, 2012
Whenever your computer is connected to more than one network adapter, you can disable any that are not in use. You can disconnect your computer from a network by disabling your network adapter and you can sometimes solve connection problems by disabling and then re-enabling the adapter.You can disable your network adapter in Windows 8 operating system by configuring the Device Manager and for this you need to follow a few steps that are described below:

Step 1: Click on Start to open Windows 8 Metro UI screen then select CONTROL PANEL.
Step 2: In the control Panel Select Device Manager then a Pop up window is opened.

Inline image 1

Step 3: Search for the "Network Adapters" in the list. On clicking a tiny arrow, it will let you show network adapters that are currently installed in your computer.

Read more: C# Corner
QR: Inline image 2

Posted via email from Jasper-net

An Overview of Performance Improvements in .NET 4.5

|
This article discusses the prerelease version of the Microsoft .NET Framework 4.5. All related information is subject to change.

On the Microsoft .NET Framework team, we’ve always understood that improving performance is at least as valuable to developers as adding new runtime features and library APIs. The .NET Framework 4.5 includes significant investments in performance, benefiting all application scenarios. In addition, because .NET 4.5 is an update to .NET 4, even your .NET 4 applications can enjoy many of the performance improvements to existing .NET 4 features.

When it comes to enabling developers to deliver satisfying application experiences, startup time (see msdn.microsoft.com/magazine/cc337892), memory usage (see msdn.microsoft.com/magazine/dd882521), throughput and responsiveness really matter. We set goals on improving these metrics for the different application scenarios, and then we design changes to meet or exceed them. In this article, I’ll provide a high-level overview of some of the key performance improvements we made in the .NET Framework 4.5.

CLR
In this release, we focused on: exploiting multiple processor cores to improve performance, reducing latency in the garbage collector and improving the code quality of native images. Following are some of the key performance improvement features.

Multicore Just-in-Time (JIT) We continually monitor low-level hardware advancements and work with chip vendors to achieve the best hardware-assisted performance. In particular, we’ve had multicore chips in our performance labs since they were available and have made appropriate changes to exploit that particular hardware change; however, those changes benefited very few customers at first.

At this point, nearly every PC has at least two cores, such that new features that require more than one core are immediately broadly useful. Early in the development of .NET 4.5, we set out to determine if it was reasonable to use multiple processor cores to share the task of JIT compilation—specifically as part of application startup—to speed up the overall experience. As part of that investigation, we discovered that enough managed apps have a minimum threshold number of JIT-compiled methods to make the investment worthwhile.

Read more: MSDN
QR: Inline image 1

Posted via email from Jasper-net

Announcing Microsoft All-In-One Code Framework Sample Browser v5 - A Big Refresh with Expansion to 3500+ code samples, Favorite Searches, Flexibilities & More

|
In partnership with MSDN Samples Gallery, Microsoft All-In-One Code Framework this morning is releasing a brand new version for its Sample Browser, which introduces a big search expansion to over 3500 quality code samples, the new Favorite Searches and Favorite Samples functions for managing your beloved samples, the integration of social media sharing, the enriched query conditions & more.  Its Zune-style user experience is still stunning.   This is a big refresh of Sample Browser since the last release half a year ago.  We sincerely hope that worldwide developers will love it!

Inline image 1

QR: Inline image 2

Posted via email from Jasper-net

R

|
Today I would like to share information with you on the editions that will be available for "Windows 8" when it is released to market. We have talked about Windows 8 as Windows reimagined, from the chipset to the user experience. This also applies to the editions available – we have worked to make it easier for customers to know what edition will work best for them when they purchase a new Windows 8 PC or upgrade their existing PC.

Windows 8 has the flexibility you need - whether you’re on an x86/64 or a WOA PC. You can use a touch screen or a keyboard and mouse – and switch anytime. It’s beautiful, fast, and fluid design is perfect for a wide range of hardware. And you’ll love browsing through the Windows Store and downloading all the apps you want. And those apps can work together too so you can share photos, maps, contacts, links and whatever else you want faster and easier. All editions of Windows 8 offer a no-compromise experience.

First, Windows 8 is the official product name for the next x86/64 editions of Windows.

For PCs and tablets powered by x86 processors (both 32 and 64 bit), we will have two editions: Windows 8 and Windows 8 Pro. For many consumers, Windows 8 will be the right choice. It will include all the features above plus an updated Windows Explorer, Task Manager, better multi-monitor support and the ability to switch languages on the fly (more details on this feature can be found in this blog post),which was previously only available in Enterprise/Ultimate editions of Windows. For China and a small set of select emerging markets, we will offer a local language-only edition of Windows 8.

Windows 8 Pro is designed to help tech enthusiasts and business/technical professionals obtain a broader set of Windows 8 technologies. It includes all the features in Windows 8 plus features for encryption, virtualization, PC management and domain connectivity. Windows Media Center will be available as an economical “media pack” add-on to Windows 8 Pro. If you are an enthusiast or you want to use your PC in a business environment, you will want Windows 8 Pro.

Windows RT is the newest member of the Windows family – also known as Windows on ARM or WOA, as we’ve referred to it previously. This single edition will only be available pre-installed on PCs and tablets powered by ARM processors and will help enable new thin and lightweight form factors with impressive battery life. Windows RT will include touch-optimized desktop versions of the new Microsoft Word, Excel, PowerPoint, and OneNote. For new apps, the focus for Windows RT is development on the new Windows runtime, or WinRT, which we unveiled in September and forms the foundation of a new generation of cloud-enabled, touch-enabled, web-connected apps of all kinds.  For more details on WOA, we suggest reading this blog post which shares more detail on how we have been building Windows 8 to run on the ARM architecture.

Feature name

Windows 8

Windows 8 Pro

Windows RT

Upgrades from Windows 7 Starter, Home Basic, Home Premium

x

x

 

Upgrades from Windows 7 Professional, Ultimate

 

x

 

Start screen, Semantic Zoom, Live Tiles

x

x

x

Windows Store

x

x

x

Apps (Mail, Calendar, People, Messaging, Photos, SkyDrive, Reader, Music, Video)

x

x

x

Microsoft Office (Word, Excel, PowerPoint, OneNote)

  

x

Internet Explorer 10

x

x

x

Device encryption

  

x

Connected standby

x

x

x

(more...)

Read more: Windows
QR: Inline image 1

Posted via email from Jasper-net

Writing android gui using python(introduction)

| Monday, April 16, 2012
PythonForAndroid provides support for python script language on android. CLE project supports interaction between python and java, gives a common interface for multiple programming languages. And wrapandroid project encapsulates android java class with cle objects. Using the three components, programmers can write android gui programs with python directly. This article is an introduction. There will have series of articles to further explain how to programming android applications using python.

Preparing environment.
install PythonForAndroid from http://code.google.com/p/android-scripting
CLE may install from network by application automatically, you need only include starcore_android_r5.jar in the project. The file is in starcore_devfiles_r5.zip, which can be download from http://code.google.com/p/cle-for-android
Wrapandroid has two files: wrapandroid.jar and SRPWrapAndroidEngine.xml, which can be download from http:/code.google.com/p/wrapandroid-for-multilaguage/download/wrapandroid_devfiles_0_8_1.rar
Begin programming
Open eclipse, create a new android project, for example, “introduction”
Add Permission, which is used to download and install cle for the application
 Collapse | Copy Code
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
copy files : starcore_android_r5.jar and wrapandroid.jar into the project directory, and add them to java build path, as shown below.

Inline image 1

copy file : SRPWrapAndroidEngine.xml to assets directory.
edit IntroductionActivity.java

import com.srplab.wrapandroid.*;
public class IntroductionActivity extends WrapAndroidActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //setContentView(R.layout.main);
        StarActivity._Call("DoAssetsFile", "python", "code.py");
    }
}

Read more: Codeproject
QR: Inline image 2

Posted via email from Jasper-net

Rename Your Computer in Windows 8

|
When Windows is installed, by default it asks for the computer name during the installation process.There may also be a situation when you you might want to rename your computer for some other reason. For this, you must be logged on as an administrator or a member of the Administrators group in order to complete this procedure; once the computer is renamed it requires a restart as well. If you are a Windows 8 user and want to rename your computer then follow the steps as given below.

Step 1: Logon to the Windows 8 computer with any account that has Administrative privileges.

Step 2: From the given option available on the applications Click on Desktop.

Inline image 1

Step 3: Right-click on the Computer icon and from the context menu that appears Click on Properties.

Read more: C# Corner
QR: Inline image 2

Posted via email from Jasper-net

Windows 8 JavaScript–Change Lock Screen Image

|
In the past couple of months I’ve worked a lot with Windows 8 JavaScript and C#, I’ve also wrote plenty of posts on that subject and there is much more stuff to talk about.

In this post I’ll show two things:

Using File Picker using JavaScript
Change Windows 8 Lock Screen Image Programmatically

Inline image 1

Step 1: Create Blank JavaScript Project

In the app.onactivated function we add the following code to listen the Choose Picture button and calling the displayCurrentImg function. 
When you click the Choose Picture button we call the openFilePicker function.

app.onactivated = function (eventObject) {
    if (eventObject.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) {
       $("#btnBrowse").addEventListener("click", function () {
            openFilePicker();
        }, false);
 
        displayCurrentLockImg();
        WinJS.UI.processAll();
    }
};

Step 2: Find The Current Lock Screen Image

You might notice that in the previous step I used $ char to find the button element, no I’m not using JQuery, I’ve just create a function that return the querySelector return value based on the value we pass. I said it before and I’ll say it again there is not need to add JQuery to Windows 8 Application everything you need is there!

Read more: Shai Raiten
QR: Inline image 2

Posted via email from Jasper-net

Visual Studio 11 Fakes Part 1 - Stubs

|
Background

Over the years I’ve heard many customers ask us to ship a mocking framework in Visual Studio. I was always a bit cautious about providing this for a few different reasons.

First, I’ve always been hesitant to recommend “mocks” when unit testing, preferring stubs in most cases. For anyone unsure of the difference between a Mock and a Stub, I suggest you read Martin Fowler’s excellent article Mocks Aren’t Stubs.

On the one hand there is a difference in how test results are verified: a
distinction between state verification and behavior verification. On the other
hand is a whole different philosophy to the way testing and design play
together…

Martin Fowler Mocks Aren’t Stubs

Basically a stub is a test fake (or dummy) that is used as a stand-in for the real type. You do this to avoid having to pass in a real object, which would extend your test beyond the realm of “unit”. They are frequently used when doing classical “Arrange, Act, Assert” state-based testing. A mock, on the other hand, provides not only a fake implementation but also logic for verifying how calls were made on the fake. When you are testing side- effects, protocols and interactions between objects, they are extremely valuable.

The concern is that I have often seen people fall into using behavior verification where none is needed. Overuse of mocks inhibits free refactoring of the code because, as Martin discusses in his essay, it leads to a very tight coupling between the tests and the implementation instead of just to the interface contract. I might blog more on this later, but let’s keep going.

The second reason for my reluctance was that there are quite a few good Mock/Stub implementations available in the community. Moq, Rhino, NMock and others have strong followings and good reputations and I wasn’t sure I wanted to get into the business of competing with them.

But despite the misgivings about competing with community driven projects, there was continued feedback from customers asking for help from Visual Studio in making fast-running, isolated unit tests. A part of this is because many customers are unable to use open-source or third-party tools. Another part is simplicity: people would rather have what they need on-hand, in the box.

Introducing Visual Studio 11 Fakes

In the end, it was decided that we would make an investment in this area for Visual Studio 11. In VS11 Beta we included the first publicly available version of the VS Fakes framework. Our goal with the Fakes framework is to enable developers to quickly and easily isolate their unit tests from their environment.

QR: Inline image 1

Posted via email from Jasper-net

ILSpy v2 4 U - ILSpy v2 RTW's

|
Today, we released ILSpy 2.0 final to the Web:

ILSpy_Master_2.0.0.1595_RTW_Binaries.zip 
ILSpy_Master_2.0.0.1595_RTW_Source.zip

Daniel's Beta feature post still applies to the release version:

Assembly Lists
Support for decompiling Expression trees
Support for lifted operatores on nullables
Decompile to Visual Basic
Search for multiple strings separated by space (searching for "Assembly manager" in ILSpy.exe would find AssemblyListManager)
Clicking on a local variable will highlight all other occurrences of that variable
Ctrl+F can be used to search within the decompiled code view

Read more: ILSpy 2.0 Final
QR: Inline image 1

Posted via email from Jasper-net

xUnit Theory, the Data Driven Unit Test

|
Do you like copying and pasting code? Neither do I.

A good set of unit tests often end up reusing the same code with varied inputs. Rather than copy and paste that test code over and over, we can use the pattern of data driven unit tests to help streamline our test fixtures. This is the practice of having a single test definition be invoked and count as multiple tests at run time. This also enables us to do other dynamic things, such as configuring our unit tests from external sources. :)

I love NUnit, but it does not offer data driven unit tests. I frequently use MSTest, but it's data driven tests inconveniently require you to define a DataSource. Meanwhile xUnit offers several lightweight and simple options for defining data driven tests, which it refers to as theories.

Let's take a look at some of xUnit's Theory data sources:

InlineData Example

public class StringTests1
{
    [Theory,
    InlineData("goodnight moon", "moon", true),
    InlineData("hello world", "hi", false)]
    public void Contains(string input, string sub, bool expected)
    {
        var actual = input.Contains(sub);
        Assert.Equal(expected, actual);
    }
}

Read more: Tom DuPont .NET
QR: Inline image 1

Posted via email from Jasper-net

מדריך להגדרת לוח שנה עברי במערכת ההפעלה Windows 7

|
Inline image 2

משתמשים רבים פונים אלינו בשאלה כיצד ניתן להגדיר לוח שנה ירחי במקום לוח השנה הגרגוריאני המוגדר במערכת ההפעלה כברירת מחדל או במילים אחרת כיצד ניתן להגדיר לוח שנה עם תאריכים עבריים במערכת ההפעלה . גם אתם מעוניינים לדעת כיצד ? הכנסו עכשיו למדריך להגדרת לוח שנה עברית במערכת ההפעלה Windows 7  .

שלום לכולם ,

כאן רותם כהן והיום נלמד כיצד להגדיר לוח שנה עברי במערכת ההפעלה Windows 7 .

לוח השנה הגרגוריאני עליו מושתת לוח השנה במערכת ההפעלה נוצר כבר בשנה 1582 על גבי לוח השנה היוליני אותו יצר יוליוס קיסר בהשראת האפיפיור גרגוריוס . לוח השנה הגרגוריאני מונהג במרבית מדינות העולם כלוח שנה אזרחי ומנגד ללו עומד לוח השנה הירחי אשר מתבססס על מחזור הירח בחול חודש ובו נעשה שימוש בדת היהודית ובמדינת ישראל .

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

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

*תודה למשתמש גדי על המידע

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

Read more: Windows Support
QR: Inline image 1

Posted via email from Jasper-net

Untitled

|
Various articals about Rhino Mock using and some techniques/tips etc...

Contents tagged with rhino-mocks

Today I learned that you can mock out and ref parameters with the following syntax in Rhino Mocks.

[TestMethod]
public void ShowHowRhinoMocksOutRefParameterWorks()
{
    /* Setup */
    var mock = MockRepository.GenerateMock<IBookRepository>();
    var bookFinder = new BookFinder(mock);
 
    /* Arrange */
    mock.Expect(rep => rep.FindByTitle(Arg<string>.Is.Anything, out Arg<int>.Out(10).Dummy))
        .Return(new List<Book>());
 
    /* Act */
    var count = 0;
    var books = bookFinder.FindBooks("hitchhikers guide to the galaxy", out count);
 
    /* Assert */
    Assert.AreEqual(10, count);
}

Read more: litemedia
QR: Inline image 1

Posted via email from Jasper-net

Rhino Mocks Constraints

|
Constraints are a way to verify that a method's arguments match a certain criteria. Rhino Mocks includes a number of built-in constraints, and allows you to define you own custom ones, which will integrate cleanly into the framework. You specify constraints on method arguments using the following syntax:

Expect.Call(view.Ask(null,null)).IgnoreArguments().Constraints(
   Is.Anything(), Is.TypeOf(typeof(SomeType))).Return(null).

You need to pass the exact same number of constraints as the number of arguments of the method. When a method is called during replay state, Rhino Mocks evaluates each constraint against the parameter in the same index, and accepts the method if all the constraints were met. As a note, I got the idea of the current constraints syntax from NMock2, as it is much leaner approach to create constraints.

Rhino Mocks' built in constraints:

Rhino Mocks Constraints


Constraint
ExampleAccepted Values

Rejected Values
IsAnythingIs.Anything()Anything at all {0,"","whatever",null, etc}Nothing Whatsoever
EqualIs.Equal(3)35
Not EqualIs.NotEqual(3)null, "bar"3
NullIs.Null()null5, new object()
Not NullIs.NotNull() new object(), DateTime.Nownull
Type OfIs.TypeOf(typeof(Customer)) or Is.TypeOf<Customer>()myCustomer, new Customer()null, "str"
Greater ThanIs.GreaterThan(10)15,532,10
Greater Than Or EqualIs.GreaterThanOrEqual(10)10,15,439,3
Less ThanIs.LessThan(10)1,2,3,910,34
Less Than Or EqualIs.LessThanOrEqual(10)10,9,2,034,53,99
MatchingIs.Matching(Predicate<T>)
SameIs.Same(object)
NotSameIs.NotSame(object)
PropertyEqual To ValueProperty.Value("Length",0)new ArrayList()"Hello", null
NullProperty.IsNull("InnerException")new Exception("exception without inner exception") new Exception("Exception with inner Exception", new Exception("Inner")
Not NullProperty.IsNotNull("InnerException")new Exception("Exception with inner Exception", new Exception("Inner") new Exception("exception without inner exception")
ListIs In List [the parameter is a collection that contains this value] List.IsIn(4)new int[]{1,2,3,4}, new int[]{4,5,6}new object[]{"",3}
One Of [parameter equal to one of the objects in this list]List.OneOf(new int[]{3,4,5}) 3,4,59,1,""
EqualList.Equal(new int[]{4,5,6})new int[]{4,5,6}, new object[]{4,5,6} new int[]{4,5,6,7}
TextStarts WithText.StartsWith("Hello")"Hello, World", "Hello, Rhino Mocks""", "Bye, Bye"
Ends WithText.EndsWith("World")"World","Champion Of The World" "world", "World Seria"
ContainsText.Contains("or")"The Horror Movie...", "Either that or this""Movie Of The Year"
Like [Perform regular expression validation]Text.Like("rhino|Rhinoceros|rhinoceros") "Rhino Mocks", "Red Rhinoceros""Hello world", "Foo bar", Another boring example string"

QR: Inline image 1

Posted via email from Jasper-net

Implementing Custom TPL Dataflow Blocks

|
Dataflow Blocks are the backbone of the .NET 4.5’s new high performance parallel processing library. And while they offer a lot of functionality out of the box, there will be times when a custom block is necessary. Zlatko Michailov has put together a document outlining the process and many of the traps you may encounter. The full guide, Guide to Implementing Custom TPL Dataflow Blocks, is available on the Parallel Programming with .NET blog so we’ll just hit the highlights.

Before you begin, Zlatko asks you to consider if you just glue together an existing ITargetBlock and ISourceBlock. If so, the Encapsulate function will create a new IPropagatorBlock for you. This function handles most of the boilerplate code, but you still have to explicitly state how messages are propagated from the target to the source block.

For more control you can explicitly implement ITargetBlock and ISourceBlock. Unlike most abstract interfaces, not all methods are meant to be exposed on the implementing class’s public interface. Some methods such as LinkTo and Complete are meant to be called by general code, while others such as OfferMessage should only be called via the abstract interface from another block. Section 5.1 of the guide has the recommended visibility rules for each.

Zlatko then shows two detailed examples. The first is a synchronous filter block, the second a synchronous transformation block. While there is quite a bit of boilerplate code, it does illustrate a lot about how TPL Dataflow works internally.

The truly tricky code comes into play when Zlatko starts talking about the asynchronous block. Right from the beginning you have to start considering things such as a lock hierarchy. Zlatko recommends an approach used by the built-in blocks which involves an outgoing, an incoming, and a value lock.

Marking a block as completed seems like a simple thing; one simply needs to set the Completion property when Complete or Fault is invoked. But once you start working with asynchronous blocks even this can be tricky. For example, actually setting the property has to be done without holding a lock because it may trigger other synchronous code.

Read more: InfoQ
QR: Inline image 1

Posted via email from Jasper-net

What Recruiters Look At During The 6 Seconds They Spend On Your Resume

| Sunday, April 15, 2012
Although we may never know why we didn't get chosen for a job interview, a recent study is shedding some light on recruiters' decision-making behavior. According to TheLadders research, recruiters spend an average of "six seconds before they make the initial 'fit or no fit' decision" on candidates. 

The study used a scientific technique called “eye tracking” on 30 professional recruiters and examined their eye movements during a 10-week period to "record and analyze where and how long someone focuses when digesting a piece of information or completing a task."
In the short time that they spend with your resume, the study showed recruiters will look at your name, current title and company, current position start and end dates, previous title and company, previous position start and end dates, and education.
The two resumes below include a heat map of recruiters' eye movements. The one on the right was looked at more thoroughly than the one of the left because of its clear and concise format:

Inline image 2

Read more: Business insider
QR: Inline image 1

Posted via email from Jasper-net

Очень быстрый и эффективный способ расслабления глаз

|
Inline image 2

Не знаю, все ли программисты всесторонне любознательные люди, но я всегда пытаюсь получить фундаментальные знания во всех областях, которые могут быть практически полезны. В то время, когда мне в голову пришла эта идея я изучал анатомию и физиологию по журналам «Тело человека. Снаружи и внутри», ну а по работе я занимался стерео-варио фотографиями (для тех кто не знает — были такие советские календарики с ребристой поверхностью, где картинка либо казалась объемной, либо менялась). Так вот, в один из вечеров мне пришла в голову замечательная идея, которую я на протяжении уже 4х лет использую для поддержания своего зрения.
Обещаю, что эффект почувствуете сразу!

Причины ухудшения зрения

Существует 2 теории, почему у человека портится зрение. На мой взгляд и по моему опыту обе они имеют место

Хрусталик глаза и ресничные мышцы

Для начала взглянем на то, почему ухудшается зрение:
Близорукость — корректируется при помощи двояковогнутой (уменьшающей) линзы.

Inline image 1

Read more: Habrahabr.ru
QR: Inline image 3

Posted via email from Jasper-net

A Fluent Builder in C#

|
When it comes to the number of arguments to pass to a function, Uncle Bob is pretty clear. Quoting from Clean Code:

The ideal number of arguments for a function is zero (niladic). Next comes one (monadic), followed closely by two (dyadic). Three arguments (triadic) should be avoided when possible. More than three (polyadic) requires very special justification – and then shouldn’t be used anyway.

Still, some objects might have more than 3 attributes or properties and you usually need some way to initialize them via the constructor. Some attribute might not be mandatory, therefore on some occasions you can get by with a few overloads adding more parameters as needed.

Consider the following (contrieved) example from the world of soccer. I have picked a few attributes that encapsulate the concept of a Team.

namespace Soccer
{
    public enum Color
    {
        White,
        Red,
        Green,
        Blue
    }
 
    public class Team
    {
        string Name { get; set; }
        string NickName { get; set; }
        Color ShirtColor { get; set; }
        string HomeTown { get; set; }
        string Ground { get; set; }
 
        public Team(
            string name,
            string nickName,
            Color shirtColor,
            string homeTown,
            string ground)
        {
            Name = name;
            NickName = nickName;
            ShirtColor = shirtColor;
            HomeTown = homeTown;
            Ground = ground;
        }
    }
}

Let’s try initializing one team:

Team team1 = new Team(
    "Manchester United",
    "The Red Devils",
    Color.Red,
    "Manchester",
    "Old Trafford");

Read more: Stefano Ricciardi
QR: Inline image 1

Posted via email from Jasper-net