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

В Diablo III можно поиграть и бесплатно! [Diablo 3 free]

| Thursday, May 17, 2012
Inline image 1

Если вы не успели поиграть в DIABLO III во время народного теста (link) — не отчаивайтесь. Бесплатно поиграться можно будет уже с 15 мая! Благодаря специальной версии игры Diablo III Starter Edition.

В течение 30 дней после начала продаж игры стартовая версия Diablo III будет доступна по гостевому пропуску (Guest Pass). Эти специальные ключи входят в состав всех коробочных изданий Diablo III. 

На пользователей, играющих на стартовой версии, накладываются следующие ограничения:
  • Доступен только I акт вплоть до Короля скелетов
  • Развитие ограничено 13 уровнем
  • Подбор игроков возможен только среди игроков со стартовой версией
  • Нет доступа к денежному аукциону

Read more: Habrahabr.ru
Read more: Battle.net
QR: Inline image 2

Posted via email from Jasper-net

Информационная анархия, или как победить торренты и легализовать копирайт

|
Часто можно услышать такие вопросы: «Как победить пиратство?», «Можно ли легализовать файлообмен?», «Как реформировать копирайт?»
Я думаю, адекватно ответить на эти отдельные вопросы невозможно, если не видеть большую картину, не понимать что происходит с информационным бизнесом в целом, и с его продуктами, с книгами, с периодикой — газетами, журналами, с музыкой, фотографиями, фильмами, играми, дизайном, софтом (далее в тексте — инфо-продукты).

Информационная революция
Мы являемся свидетелями двух революционных процессов:

1. Цифровые медиа: стремление к качеству и к охвату все большей аудитории привело к смене медиа (носителей) для информационных продуктов, от аналоговых медиа мы перешли к цифровым. Это дало изначальный рост доходов производителей (авторов, издательств, студий) в условиях старой бизнес-модели
2. Цифоровые каналы распространения: развитие телекоммуникаций, персональных гаджетов привело к тому, что старая бизнес-модель в распространении инфо-продуктов была убита феноменом интернета, точнее сочетанием цифровых медиа и цифровых каналов распространения.

Интернет убил старую бизнес-модель так быстро, что сейчас существует вакуум для современной бизнес-модели и в этой пустоте процветает анархия. То что мы видим — это анархия. Анархия — это распыление доходов, дисбалансы, падение производства и, потенциально, смерть бизнеса.

Информационная анархия

Инфо-продукты обладают уникальными базовыми свойствами: копирование (легкость получения копии товара высочайшего качества) и тиражирование (любая копия товара сама становится источником других копий).
Под действием этих свойств законные владельцы информационных продуктов не контролируют дальнейшую судьбу своих продуктов. В результате копирования и тиражирования создается два потока инфо-продуктов:

— первый поток условно-платных копий, который контролируется автором (это может быть не только абсолютная платность каждой копии, но и условно-платные бизнес-решения — shareware, freemium, микро-платежи, различные лицензии, закрепляющие право автора получать оплату за коммерческое использование продукта, право на бренд и рекламу, и многие другие формы относительной платности и полной бесплатности под контролем автора и/или владельца прав),

— второй поток условно-платных копий, который не контролируется автором (это все виды облачных хранений копий с общественным доступом и без общественного доступа, все торренты, все локальные копии файлов, созданные для личного пользования после официальной покупки и другие), при этом такие «левые»; копии также могут приносить доход своим новым владельцам (но не авторам), с помощью рекламы, или прямых продаж (смс за скачивание, копирование на физические носители, оплата подписки), или оказания каких-либо услуг с использованием инфо-продуктов (беслатное использование софта, видео-прокат и тд).

Информационную анархию создает именно второй поток, свободное распространение продуктов без ведома и без воли авторов и владельцев.

Read more: Habrahabr.ru
QR: Inline image 1

Posted via email from Jasper-net

TellYouLater

|
What kind of service is it?
This service lets you encrypt text messages so that they cannot be decrypted and read before a predefined date.

How secure is this kind of protection?
We use the encryption algorithms 1024-bit RSA and 128-bit AES, which are considered secure enough in most cases.

How does it work?
   We use asymmetric encryption. It means that the data is encrypted using a public key, and can be decrypted only if you have the corresponding secret key. For each hour in the next few years, our system has a pair of keys, a public one and a secret one. While all public keys are openly available, the secret keys are posted only when the time comes. Select a moment in time; a respective open key will be retrieved from our web site, and your message will be encrypted. To decrypt your message, a secret key will have to be obtained from our server. If that key hasn't been published yet, the decryption of the message will be impossible.

Read more: TellYouLater.com
QR: Inline image 1

Posted via email from Jasper-net

Fluent Interfaces

|
What is a Fluent Interface?

When developing software, it is important that the code that you write is easy to understand in order that it can be maintained at a later date. There are many ways in which you can structure your classes in order to achieve this and various guidelines, such as the five SOLID principles. One way to achieve improved readability for your source code is to develop libraries with fluent interfaces.

Fluent interfaces allow code to be created that appears similar to natural language, when the symbols that decorate methods are ignored. This involves choosing member names that can be combined in ways that mirror words in a language such as English. The words are then combined using method chaining, where each method returns a result that can be acted upon by the next call in the sequence. However, fluent interfaces are not designed for method chaining alone.

To understand the difference between a fluent and non-fluent interface, let's look at an example. The code below uses method chaining but if the member names are read out loud, the meaning is not perfectly clear. The code calculates the date and time one week from the current date at 9:30am.

DateTime time = DateTime.Now.AddDays(7).Date.AddHours(9).AddMinutes(30);

This simple example is reasonably easy to understand for a developer but as the complexity grows it could become more difficult. If we convert the code to use a more fluent syntax, we can make its purpose clearer. The code below, read aloud, is "One week hence at 9:30".

DateTime time = 1.Week().Hence().At(9, 30);

Fluent interfaces are used widely in frameworks and library code. Two common examples that have been examined in earlier articles are Language-Integrated Query (LINQ) and Moq. You can create your own fluent interfaces by adding suitably named methods to your classes. You can also take advantage of C# 3.0's extension methods to add fluent-style methods to existing classes, including .NET framework types. We'll use this technique in the following sections to create a small fluent interface for date and time processing that supports the code example above.

Integer Extensions

In the fluent example code above, the first method used is "Week". This is an extension method of the integer type that creates a TimeSpan value representing the specified number of weeks. The code below shows how the method is created, as well as several other integer extension methods that create TimeSpans for days, hours and minutes.

public static class FluentTimeExtensions
{
    public static TimeSpan Days(this int number)
    {
        return new TimeSpan(number, 0, 0, 0);
    }
 
    public static TimeSpan Hours(this int number)
    {
        return new TimeSpan(number, 0, 0);
    }

Read more: BlackWasp
QR: Inline image 1

Posted via email from Jasper-net

The Task: Events, Asynchronous Calls, Async and Await

|
Almost any software application today will likely contain a long-running process. “Long-running” may be a relative term but in the Windows Runtime it is specifically anything that could take longer than 50ms to execute. That’s a fairly small window, and it means those operations will need to run concurrently to the main application thread. Concurrency is important in both client applications (to keep from blocking the UI) and server applications (to accommodate multiple simultaneous requests).

The new technology referred to as Visual Studio Asynchronous Programming provides a streamlined language syntax for asynchronous development. It does this by providing two new keywords: async and await. While these keywords may simplify asynchronous development, they can still be confusing to developers. There are a lot of materials out there but I thought it might help to take a very simple example and explore just what these keywords are and how they operate. In this post I’ll focus specifically on the .NET Framework 4.5 support. While they are also supported for Metro-style applications, the implementation is slightly different.

The Main Event

In the movie Mission Impossible II, the short-lived protagonist Dr. Nekhorvich says:

“…every search for a hero must begin with something every hero needs, a villain. So in a search for our hero, Bellerophon, we have created a more effective monster: Chimera.”

In the search for an elegant solution to asynchronous programming we must start with some of the rougher implementations that have plagued developers in the past.

The event-based pattern is probably one of the most well-known asynchronous patterns to .NET developers as it is prevalent throughout the base library. Let’s assume I have a method that multiplies two numbers and for some crazy reason (maybe I’m sending it over a 300 baud modem to my Commodore 64 to process the result on the 6502 chip … you know, using a bunch of ROR operations) it takes a bit longer to process than I’d like, so I want to make sure it executes asynchronously. The first thing I’ll do is create an event argument payload for the result:

public class MultiplyEventArgs : EventArgs 
{
    public int Result
    {
        get;
        private set; 
    }

    public MultiplyEventArgs(int result)
    {
        Result = result;
    }
}

Next, I’ll define an interface:

public interface IMultiplierEvent
{
    event EventHandler<MultiplyEventArgs> MultiplyCompleted;
    void MultiplyAsync(int a, int b); 
}

Finally, I’ll implement the class that executes the operation asynchronous and fires the completed event when done.

public class MultiplierEvent : IMultiplierEvent
{

    public event EventHandler<MultiplyEventArgs> MultiplyCompleted;

    private void RaiseCompleted(int result)
    {
          
        var handler = MultiplyCompleted;
        if (handler != null)
        {
            handler(this, new MultiplyEventArgs(result));
        }
    }

    public void MultiplyAsync(int a, int b)
    {
        Task.Run(() => RaiseCompleted(a * b));
    }
}

Read more: C#:IMage
QR: Inline image 1

Posted via email from Jasper-net

Simplify Syntax with Extension Methods

|
Extension methods were first introduced with LINQ in C#3.0. They are just a syntactic construct, but as we’ll see in this post they can make a huge difference. What’s easier to read of these two?

string[] wishList1 =
    Enumerable.ToArray(
    Enumerable.Select(Enumerable.Where(Animals, a =&gt; a.StartsWith("A")),
    a =&gt; string.Format("I want a {0}.", a)));
 
string[] wishList2 = Animals.Where(a =&gt; a.StartsWith("A"))
    .Select(a =&gt; string.Format("I want a {0}.", a)).ToArray();

To me, the second alternative has several advantages:

Get rid of the name of the helper class declaring the method. Writing out the Enumerable class name doesn’t add any relevant information. On the contrary, it forces the reader to actively think of it to find out that it is irrelevant.
Left-to-right reading order instead of inside-out when following the evaluation order.
The method name and the parameters are written together. In the first example Select and the relevant code is splitted by the call to Enumerable.Where.
Extension methods creates a syntactic possibility to do two important things that are not allowed by the language.

Add methods to existing classes.
Add methods to interfaces.

Add Methods to Existing Classes

Sometimes it would be beneficial to extend existing classes with own methods. An example would be to add an IsEmail() method to the string class. The checking will be done using a regular expression, but using the name IsEmail makes the intent much more clear.

foreach (string s in strings)
{
    if (s.IsEmail())
    {
        Debug.WriteLine("{0} is a valid email address", (object)s);
    }
    else
    {
        Debug.WriteLine("{0} is not a valid email address", (object)s);
    }
}

Read more: Passion for Coding
QR: Inline image 1

Posted via email from Jasper-net

Интегрируем TortoiseSVN в Total Commander

|
Inline image 1
Преамбула:

Имеем в наличии TortoiseSVN и Total Commander, и активно их используем в работе. 
Практически все действия в Total Commander'e успешно совершаются одной только клавиатурой, без использования мышки, какими-либо горячими клавишами. Главное их найти/знать/привыкнуть, и работа становится в разы проще и быстрее.
TortoiseSVN же из коробки предоставляет нам только пункты в контекстном меню, до которого можно добраться двумя способами:
  • Мышкой. При активной работе, тянуться каждый раз до мышки, реально начинает напрягать уже через пару дней/часов/минут работы (зависит от крепости нервов разработчика) и времени занимает это довольно много.
  • Через клавишу контекстного меню + стрелок. Этот вариант конечно чем-то проще и быстрее (ибо не надо тянуться за мышкой), но всё так же не удобен и всё такой же медленный.

Хочется все действия с TortoiseSVN выполнять так же быстро, как и действия в самом Total Commander'e. 
Т.е. через горячие клавиши, в одно нажатие.

Облазив просторы интернета, не смог найти ни одной инструкции, как можно по-человечески интегрировать TortoiseSVN в Total Commander и сделать это возможным.
Поэтому решил написать свой небольшой простенький мануал.

Реализация.

По факту, всё достаточно просто.
В комплекте с TortoiseSVN идёт exe'шник, как раз для автоматизации: TortoiseProc.exe 
Он то нам и нужен. Полный список параметров для него доступен на официальном сайте.
В Total Commander'e, в свою очередь, имеется возможность создавать кастомные команды. 
Сделать это можно несколькими способами:
Через меню настроек: Инструменты -> Список команд ТС…

Read more: Habrahabr.ru
QR: Inline image 2

Posted via email from Jasper-net

Sandbox OS

|
Welcome to Sandbox OS, A Brand new COSMOS OS Made by Marblestech

Read more: Codeplex
QR: Inline image 1

Posted via email from Jasper-net

[UPDATE] The story of the Linux kernel 3.x…

|
The story of the Linux kernel 3.x…

In 2005 everybody was exited about possibility of bypass ASLR on all Linux 2.6 kernels because of the new concept called VDSO (Virtual Dynamic Shared Object). More information about this story can be found at the following link:
 
In short, VDSO was mmap’ed by the kernel in the user space memory always at the same fixed address. Because of that well-known technique ret-to-libc (or as some ppl prefer ROP) was possible and effective to bypass existing security mitigation in the system.
… 6 years later Linus Torvalds announced the release of the new kernel version – 3.x! Now, guess what happened…

pi3-darkstar new # uname -r
3.2.12-gentoo

pi3-darkstar new # cat /proc/sys/kernel/randomize_va_space
2

pi3-darkstar new # cat /proc/self/maps|tail -2
bfa81000-bfaa2000 rw-p 00000000 00:00 0          [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]

pi3-darkstar new # cat /proc/self/maps|tail -2
bfd5e000-bfd7f000 rw-p 00000000 00:00 0          [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]

pi3-darkstar new # ldd /bin/ls|head -1
    linux-gate.so.1 =>  (0xffffe000)

pi3-darkstar new # ldd /bin/ls|head -1
    linux-gate.so.1 =>  (0xffffe000)

pi3-darkstar new #
 
I’m not using

dd if=/proc/self/mem of=linux-gate.dso bs=4096 skip=1048574 count=1

because I’m lame 

pi3-darkstar new # echo "main(){}">dupa.c

pi3-darkstar new # gcc dupa.c -o dupa

pi3-darkstar new # gdb -q ./dupa
Reading symbols from /root/priv/projekty/pro-police/new/dupa...(no debugging symbols found)...done.
(gdb) b main
Breakpoint 1 at 0x80483b7
(gdb) r
Starting program: /root/priv/projekty/pro-police/new/dupa 

Breakpoint 1, 0x080483b7 in main ()
(gdb) dump binary memory test_dump.bin 0xffffe000 0xfffff000
(gdb) quit
A debugging session is active.

    Inferior 1 [process 20117] will be killed.

Quit anyway? (y or n) y

pi3-darkstar new # file test_dump.bin
test_dump.bin: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped

Read more: pi3 blog
QR: Inline image 1

Posted via email from Jasper-net

Windows 8 Camp in a Box download (Windows 8 CP) - C#/Js Resources, HOL's, Samples and Presentations from the Windows 8 Dev Camps

| Wednesday, May 16, 2012
Inline image 2

Version: 1.0 
Date published: 5/11/2012

Language: English

Windows8CampInABoxCS.exe, 299.5 MB 
Windows8CampInABoxJS.exe, 303.8 MB

This download includes the hands-on-labs, presentations, samples and resources from the Windows 8 camps. The Windows 8 camps are free training events for developers ramping up on Metro style app development.

To sign-up for a Windows camp, please visit http://devcamps.ms/windows.

Supported operating systems: Windows 8 Consumer Preview

Windows 8 Consumer Preview + Microsoft Visual Studio 11 Beta (any SKU, including Express)
We have two packages available. Both packages include the same content and resources; the hands-on-labs are different.

Windows 8CampinaBoxJS includes the hands-on labs for those using HTML + Javascript.
Windows8CampinaBoxCS includes the hands-on-labs that use XAML + C#.
Here's what's in it (at least the C# version), some install and post install snaps.

QR: Inline image 1

Posted via email from Jasper-net

Calling all social coders: Xamarin is hiring Developer Evangelists

|
As we continue to rapidly grow at Xamarin, we’ve reached a point where we are looking to spread the word about MonoTouch and Mono for Android to even more developers around the world. To do this we’re creating a new team of social coders to represent us to the community as Developer Evangelists.

What is a Developer Evangelist? The job of an evangelist (sometimes called a Developer Advocate) is to raise awareness for our products in developer communities online and off. This means doing things like speaking at events, creating blog posts and screencasts, answering questions on Stack Overflow or anything else that helps our customers be successful.

Maybe you’ve never considered being an Evangelist because it’s “too sales-y” or “not technical enough”. At Xamarin, that’s not the case. The Evangelist’s job is to build relationships with developers and be a technical ally to our customers. That means you can get your hands as dirty as you want and you can leave the selling up to our excellent sales team.

Here are a few other reasons why you should consider it:

Work with Some of the Best Engineers in the World

We’ve taken great care to hire the best talent we can find. They’ve created a set of tools that are enabling developers all over the world to build great apps. The biggest injustice to a product is for the customer that needs it to never know it exists. Your job is to bring our engineer’s hard work out into the world and get it into the right hands. And when those customers need someone to advocate for them on the inside, you represent them back to the company.

Read more: Xamarian
QR: Inline image 1

Posted via email from Jasper-net

Microsoft "Data Hub," a private, self-service DataMarket for your internal data and users, but in the cloud...

|
Create a Private Self-Service DataMarket for Your Organization’s Data with Microsoft Codename “Data Hub”

IT departments of medium and large enterprises amass large amounts of data about the operations of their organizations, as well as detailed information on customers, suppliers, and other business partners. Historically, this information has been accumulated and analyzed for specific purposes and then archived or discarded. In this era of increasing “big data” consciousness, C-level executives expect analysis of internally generated data to deliver added business value, especially competitive advantage. A major problem is that information workers spend too much time searching for data and not enough time analyzing it for actionable insights with tools they’re accustomed to using—usually Excel.

To overcome these data distribution, discovery, and curation problems, Microsoft’s SQL Azure Labs team leveraged the public DataMarket investment to create Codename “Data Hub” as an early concept of a value-added service that enables IT organizations to provision and manage their own private DataMarket. Like the public DataMarket, Microsoft hosts the Data Hub preview on Windows Azure with SQL Azure tables as the data source at http://YourHubName.clouddatahub.net. Data Hub is a private preview, so you must request an invitation by completing a form on the Codename “Data Hub” Welcome page, wait for an e-mail with a token and instructions for its redemption. The first step is to specify the Firewall Rules for the IP range of your Data Hub’s users (see Figure 2.)

QR: Inline image 1

Posted via email from Jasper-net

X Window System for COSMOS

|
This is a project meant to provide a GUI for COSMOS. It is built upon version 89858 of COSMOS kernel and provided in .dll form that expose the most common methods to create dialog/modal windows with drag&drop, re-size, open/close facilities. This solution bases on double-linked list principle, recursively parsing the hierarchy of windows in both ways. This allows dynamic allocation of memory for an infinite number of windows, screen refresh and active window sensitivity.

I also provide a typesetting system based on 5x5 matrices of pixels for each character of English alphabet. It may be used for both keyboard input & onscreen-keyboard facility. The resolution is 320x200, this kernel version supporting a common VGA driver only. With future kernel releases, I'm willing to provide a SuperVGA version of X Window, for bitmap rendering and improved text facilities. This kernel version supplying FAT and Networking support I am sure you'll make good use of this GUI. Bonne chance!

PS. A short glimpse for my system running at www.youtube.com/watch?v=5JJmNbAhZbg

Read more: Codeplex
QR: Inline image 1

Posted via email from Jasper-net

WCF Streaming

|
Stream

The Stream sample demonstrates the use of streaming transfer mode communication. The service exposes several operations that send and receive streams. This sample is self-hosted. Both the client and service are console programs.

Windows Communication Foundation (WCF) can communicate in two transfer modes—buffered or streaming. In the default buffered transfer mode, a message must be completely delivered before a receiver can read it. In the streaming transfer mode, the receiver can begin to process the message before it is completely delivered. The streaming mode is useful when the information that is passed is lengthy and can be processed serially. Streaming mode is also useful when the message is too large to be entirely buffered.

Streaming and Service Contracts

Streaming is something to be considered when designing a service contract. If an operation receives or returns large amounts of data, you should consider streaming this data to avoid high memory utilization due to buffering of input or output messages. To stream data, the parameter that holds that data must be the only parameter in the message. For example, if the input message is the one to be streamed, the operation must have exactly one input parameter. Similarly, if the output message is to be streamed, the operation must have either exactly one output parameter or a return value. In either case, the parameter or return value type must be either Stream, Message, or IXmlSerializable. The following is the service contract used in this streaming sample.

[ServiceContract(Namespace="http://Microsoft.ServiceModel.Samples")]
public interface IStreamingSample
{
    [OperationContract]
    Stream GetStream(string data);
    [OperationContract]
    bool UploadStream(Stream stream);
    [OperationContract]
    Stream EchoStream(Stream stream);
    [OperationContract]
    Stream GetReversedStream();

}

The GetStream operation receives some input data as a string, which is buffered, and returns a Stream, which is streamed. Conversely, UploadStream takes in a Stream (streamed) and returns a bool (buffered). EchoStream takes and returns Stream and is an example of an operation whose input and output messages are both streamed. Finally, GetReversedStream takes no inputs and returns a Stream (streamed).

Enabling Streamed Transfers

Defining operation contracts as previously described provides streaming at the programming model level. If you stop there, the transport still buffers the entire message content. To enable transport streaming, select a transfer mode on the binding element of the transport. The binding element has a TransferMode property that can be set to Buffered, Streamed, StreamedRequest, or StreamedResponse. Setting the transfer mode to Streamed enables streaming communication in both directions. Setting the transfer mode to StreamedRequest or StreamedResponse enables streaming communication in only the request or response, respectively.

The basicHttpBinding exposes the TransferMode property on the binding as does NetTcpBinding and NetNamedPipeBinding. For other transports, you must create a custom binding to set the transfer mode.

The following configuration code from the sample shows setting the TransferMode property to streaming on the basicHttpBinding and a custom HTTP binding:

 <!-- An example basicHttpBinding using streaming. -->
<basicHttpBinding>
  <binding name="HttpStreaming" maxReceivedMessageSize="67108864"
           transferMode="Streamed"/>
</basicHttpBinding>
<!-- An example customBinding using HTTP and streaming.-->
<customBinding>
  <binding name="Soap12">
    <textMessageEncoding messageVersion="Soap12WSAddressing10" />
    <httpTransport transferMode="Streamed"                   maxReceivedMessageSize="67108864"/>
  </binding>
</customBinding>

In addition to setting the transferMode to Streamed, the previous configuration code sets the maxReceivedMessageSize to 64MB. As a defense mechanism, maxReceivedMessageSize places a cap on the maximum allowable size of messages on receive. The default maxReceivedMessageSize is 64 KB, which is usually too low for streaming scenarios.

Read more: MSDN
QR: Inline image 2

Posted via email from Jasper-net

WCF replacement for cross process/machine communication

|
I ran across another post of someone looking to get rid of WCF on StackOverflow today. The post titled “WCF replacement for cross process/machine communication” goes into the typical complaints about configuration of WCF. I actually think this is the least of the issues I’ve had with WCF. Whatever your reason for looking to abandon WCF, this post is for you. A step-by-step walk-through to get up and running with protobuffers over Win32 rpc.

Step 1 – Gathering dependencies

For this post I’m going to be using VStudio 2008. The primary reason is to show the explicit use of NuGet rather than depending on Visual Studio to do it for us. Now let’s get started. Start by creating a new project in Visual Studio, for this I’m going to use a simple command-line application named “SampleProtoRpc”.

After you have created the project, right-click the project and select “New Folder” and type the name “Depends”. Now visit the NuGet project page and download the “NuGet.exe Command Line bootstrapper”. It should be a single file, “NuGet.exe”. Place this file in the newly created “Depends” directory. From a command-prompt, run NuGet.exe to ensure that you are up and running.

Now right-click the project and select the “Properites” from the bottom. In the properties window, click the “Build Events” tab on the left. In the “Pre-build event command line:” text box enter the following text:

"$(ProjectDir)Depends\NuGet.exe" INSTALL Google.ProtocolBuffers.Rpc -OutputDirectory "$(ProjectDir)Depends" -ExcludeVersion -Version 1.11.1016.3

You can update the version to the latest by checking the current version at http://nuget.org/packages/Google.ProtocolBuffers.Rpc. The reason to use a fixed version is to prevent NuGet from constantly checking with the server to see if it has the latest version. By pinning the version number NuGet.exe will make a quick check and continue if it exists.

Read more: csharptest.net
QR: Inline image 1

Posted via email from Jasper-net

SIPSorcery

|
Overview

The SIPSorcery project is an experiment into the depths of the Session Initiation Protocol (SIP). The project is a combination of the source code available here on CodePlex and a live service hosted at https://www.sipsorcery.com/sipsorcery.html. The project has its roots in a previous mysipswitch project which has now been deprecated.

At its heart the project consists of a C# SIP protocol stack that implements all the required UDP, TCP and TLS transports. In addition to the SIP stack a number of related protocols: STUN, SDP, RTP & RTCP are implemented to varying degrees, usually only insofar as they are required for operation of the sipsorcery.com service.

The SIP Proxy and SIP Application Server make heavy use of the Microsoft Dynamic Language Runtime with the IronRuby engine being heavily used in dialplan processing and the IronPython engine being used for the SIP Proxy control script.

Read more: Codeplex
QR: Inline image 1

Posted via email from Jasper-net

How to: Implement a WCF Asynchronous Service Operation with Task

|
I love Task<T>.  It has to be one of the finest innovations in the framework in the past few years.  Recently I was reviewing some old WCF documentation How to: Implement an Asynchronous Service Operation which was probably written in 2006 and I have to say that we can do a much better job of it with Task<T> so here goes my rewrite.

Download Sample Code How to: Implement and Consume a WCF Asynchronous Service Operation with Task<T>

Implement a service operation asynchronously
In your service contract, declare an asynchronous method pair according to the .NET asynchronous design guidelines. The Begin method takes a parameter, a callback object, and a state object, and returns a System.IAsyncResult and a matching End method that takes a System.IAsyncResult and returns the return value. For more information about asynchronous calls, see Asynchronous Programming Design Patterns.

Mark the Begin method of the asynchronous method pair with the System.ServiceModel.OperationContractAttribute attribute and set the System.ServiceModel.OperationContractAttribute.AsyncPattern property to true. For example, the following code performs steps 1 and 2.

[ServiceContract]
public interface ISampleTaskAsync
{
[OperationContract(AsyncPattern = true)]
IAsyncResult BeginDoWork(int count, AsyncCallback callback, object state);

int EndDoWork(IAsyncResult result);
}

Implement the Begin/End method pair in your service class according to the asynchronous design guidelines. For example, the following code example shows an implementation in which a string is written to the console in both the Begin and End portions of the asynchronous service operation, and the return value of the End operation is returned to the client. For the complete code example, see the Example section.

Example
The following code examples show:

Read more: Ron Jacobs
QR: Inline image 1

Posted via email from Jasper-net

Вышел MonoDevelop 3.0

|
Inline image 2

Релиз был бы ничем не примечателен, если бы состоял только из тонн багфиксов и улучшений производительности. Однако же помимо них присутствуют два заметных глазу улучшения:

1) Поддержка сборки приложений для Mac App Store
2) Кардинальные улучшения в редакторе текста

На последнем стоит остановиться подробнее.

Во-первых, они таки прикрутили NRefactory 5, библиотеку из состава SharpDevelop. Теперь она используется редактором для получения AST, что позволило наконец-то починить проблемы автокомплита в лямбда-выражениях и LINQ.

Автоформатирование теперь не пытается поломать разметку во всём документе, а только подгоняет под правила ту часть, которую вы закончили писать (ну как в Visual Studio). По этому поводу его даже включили по-умолчанию. Кстати о студии, добавлен совместимый с ней набор правил форматирования кода.

Inline image 3

Так же появилась новая фишка — статический анализ кода прямо в редакторе с предложениями по его исправлению, отлавливает вещи вроде кривого именования переменных, ненужного использования неймспейса, наличие возможности использования средств рефакторинга (поддержка NRefactory ко всему прочему позволила ещё и расширить арсенал уже имеющихся), etc.

Read more: Habrahabr.ru
Read more: Mono
QR: Inline image 1

Posted via email from Jasper-net

The new, easier localhost - localtest.me

|
Save this URL, memorize it, write it on a sticky note, tweet it, tell your colleagues about it!

and

If you do any testing on your local system you’ve probably created hosts file entries (c:\windows\system32\drivers\etc\hosts) for different testing domains and had them point back to 127.0.0.1. This works great but it requires just a bit of extra effort.

This localtest.me trick is so obvious, so simple, and yet so powerful. I wouldn’t be surprised if there are other domain names like this out there, but I haven’t run across them yet so I just ordered the domain name localtest.me which I’ll keep available for the internet community to use.

Here’s how it works. The entire domain name localtest.me and all wildcard entries point to 127.0.0.1. So without any changes to your host file you can immediate start testing with a local URL.

Examples:

QR: Inline image 1

Posted via email from Jasper-net

Visual Studio Toolbox: Designing XAML-based Metro style apps with Visual Studio and Blend

| Sunday, May 13, 2012
Previously on Visual Studio Toolbox, Robert showed how to use Visual Studio 11 and XAML to start building Metro style apps for Windows 8. In this episode, Joanna Mason shows us how to use Visual Studio's XAML Designer and Blend to make these apps better looking. She demonstrates how powerful Blend is as a design tool and why it is an indispensable tool you should master as you are building XAML-based apps.

Read more: Channel9
QR: Inline image 1

Posted via email from Jasper-net

FYI: No JIT on Windows 8 for ARM

|
Since the media will be all over that Windows 8/ARM vs. Mozilla thing this weekend, I wanted to chime in with an actual technical analysis:

Windows 8/ARM only allows sandboxed apps from independent developers. These only have access to the WinRT API, but not the full WIN32 API. Yes, the WIN32 API _does_ exist on W8ARM, but only Internet Explorer and system processes get access to it.

The WinRT API does not offer the equivalent of VirtualAlloc() or VirtualProtect() with the ability to make code executable at runtime. But JIT compilers absolutely require this functionality, which means there'll be NO INDEPENDENT JIT COMPILERS for W8ARM!

The Internet Explorer process on W8ARM has special privileges and is the only one allowed to run a JIT compiler to speed up JavaScript.
No other browser will be able to compete on performance with IE on W8ARM. That sure simplifies keeping up with the competition ... ;-)

Actually, fully-functional browsers need access to a couple more APIs that is denied to them, too. But the inability to run a JIT compiler has consequences for a much wider range of software:

!*!*!
For W8ARM there'll be no LuaJIT (in JIT mode), no PyPy, no Java, no v8, just to name a few. Ditto for any software that relies on them (Scala, Clojure, JRuby) or embeds them.
!*!*!

Read more: FreeList
QR: Inline image 1

Posted via email from Jasper-net

tangible T4 For VS11 Beta

|
With tangible's T4 Editor FREE EDITION you can author your own Code Generator via Text-Templates (TT-Files) with IntelliSense, Syntax-Highlighting, Automatic T4 Transform on Build. Using the modeling tool you can envision and model your project and later generate from it.

New Development Experience uses Visual Studio Code Editor, allows for Theme Customization, adds Debugging and more.

Quickly write your own .NET Code Generator via T4 Text-Templates (.tt-Files) with Intelli-Sense & Syntax-Highlighting. tangible T4 Editor comes with UML-Style modeling tools and can generate from diagrams, database schemas, xml, word, excel sources, or any other data source. Microsoft T4 looks and smells like ASP.NET - it is simple! T4 is used in ASP.NET MVC, Entity Framework and DSL Tools. The Microsoft T4 Generation Engine is already built into Visual Studio, however Visual Studio does not provide an Code-Editor for it. That is why we created the tangible T4 Editor for Visual Studio. You can now accelerate your projects by adopting Microsoft T4 today and generate the code you need directly from diagrams, database schemas, xml files or other sources - Write less, achieve more.

QR: Inline image 1

Posted via email from Jasper-net

All Known and Unknown Autostart Methods In Windows

|
1. Autostart folder
   Everything in here will restart.
   C:\windows\start menu\programs\startup {english}
   C:\windows\Menu Démarrer\Programmes\Démarrage {french}
   This Autostart Directory is saved in    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell
   Folders Startup="C:\windows\start menu\programs\startup" 
   'So it could be easily changed by any program.

2. Win.ini
   [windows]
   load=file.exe
   run=file.exe

3. System.ini [boot]
   Shell=Explorer.exe file.exe

4. c:\windows\winstart.bat
   'Note behaves like an usual BAT file. Used for copying deleting specific files. Autostarts
    everytime

5. Registry
   [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices]
   [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce]
   [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run]
   [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce]
   [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
   [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce]
   [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServices]

Read more: Open hacking
QR: Inline image 1

Posted via email from Jasper-net

WPF Tip: Attached properties and bindings

|
Attached properties are a great way to extend capabilities of existing elements without the need to derive or otherwise tinker with those elements. Suppose we create an attached property that is a collection of objects of some particular kind. When that property changes, those objects are read, and that special functionality is applied. Here’s a hypothetical example of such a scheme:

public static class SomeHelper {
    public static DemoCollection GetData(DependencyObject obj) {
        return (DemoCollection)obj.GetValue(DataProperty);
    }
 
    public static void SetData(DependencyObject obj, DemoCollection value) {
        obj.SetValue(DataProperty, value);
    }
 
    public static readonly DependencyProperty DataProperty =
         DependencyProperty.RegisterAttached("Data", typeof(DemoCollection), typeof(SomeHelper), new UIPropertyMetadata(null, OnDataChanged));
 
    static void OnDataChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e) {
        var coll = (DemoCollection)e.NewValue;
        // do something with collection
        foreach(var d in coll) {
            Trace.WriteLine(d.Text);
        }
    }

public class Demo : DependencyObject {
    public string Text {
        get { return (string)GetValue(TextProperty); }
        set { SetValue(TextProperty, value); }
    }
 
    public static readonly DependencyProperty TextProperty =
         DependencyProperty.Register("Text", typeof(string), typeof(Demo), new UIPropertyMetadata(string.Empty));
 
}
 
public class DemoCollection : List<Demo> {
}

To summarize: The SomeHelper class defines the Data property which is of type DemoCollection, which is a List of Demo objects. The reason DemoCollection is defined and the code doesn’t use List<Demo> directly, is because WPF’s XAML does not support generics at this time. For each Demo object within the collection, its property Text is printed using Trace.WriteLine. In a real application, this is where the special code would be.

Let’s use that in a simple scenario:

<Grid>
    <local:SomeHelper.Data>
        <local:DemoCollection>
            <local:Demo Text="Hello" />
        </local:DemoCollection>
    </local:SomeHelper.Data>
</Grid>

The “local” XML prefix points to the namespace and assembly where the above types are defined. In this case, we should see “Hello” traced out to the Visual Studio debugger when running with the debugger. No surprise there.

Read more: Pavel's Blog
QR: Inline image 1

Posted via email from Jasper-net