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

Python Is Out For IOS

| Thursday, July 12, 2012
It looks like Python is the way to go if you want to use a scripting language in the mobile world. Python is out for iOS now, although its not free. It looks like it is a bit further along and more polished than the Android version Google has been working on for awhile now. Writing apps in Python over Java or Objective-C would make life much easier. I guess well see how bad the performance hit for using a scripting language in the mobile world is soon.

QR: Inline image 1

Posted via email from Jasper-net

10 Illustrated Examples of Visual Studio 2012

| Monday, July 9, 2012
Fresh from the 2012 MVP summit with lots of enthusiasm and grand ideas, I thought it would be worthwhile repeating my 25 illustrated examples of Visual Studio 2010 and .NET 4 post with the technologies of today (or should that be tomorrow?) albeit a few weeks later than I had planned. There are some very, very exciting new things in the pipeline which I’d like to share while they’re fresh in my mind and analogous with that post from two and a half years back, I’d like to actually show you what’s happening.

There’s so much great new stuff in Visual Studio 2012 that it deserves its own post! If I can create the time, I’ll also try and get around to covering ASP.NET specifically. Keeping in mind I’m a very web-centric guy, let me show you some of the features which have gotten me a bit excited about what’s coming in the very near future.

1. Its grey (and other UX changes)
Let’s just get this out there right now; the new Visual Studio UX is polarising. Actually, polarising would suggest there are two different views of it. The reality is there is a strong chorus of “Ugh” at the moment. You see it’s all about Metro these days and that means VS 2012 now looks like this when running on Windows 8:

Inline image 1

Just in case you need a little reminder of how things used to look, here’s VS 2010 on Win 7:

Inline image 2

There are three things I want to call out in VS 2012 as they’re the three which are repeatedly brought up:

The greyness.
The capitals on panel titles.
The colons on the panels. 
You can get a better idea of those last two items here:

Read more: DZone
QR: Inline image 3

Posted via email from Jasper-net

picotux — самый маленький компьютер с Linux в мире

|
Пока во всю идёт месячник Raspberry Pi, самое время рассказать о самом маленьком компьютере с Linux. Встречайте — picotux 100, детище немецкого гения.

Inline image 1

Общие характеристики

Размеры: 36x19x19 мм
Вес: 18 гр
Рабочая температура: -40°C to 85°C

Характеристики

Процессор: 32-bit ARM 7 Netsilicon NS7520, 55 МГц
Оперативная память: 8 Мб SDRAM
Флеш память: 2 Мб (720 Кб занято под ОС), можно расширить по 4-х
Сеть: 10/100 Mbit, HD and FD, auto sensing
Com-порт: есть контакты, скорость до 230.400 bps
Питание: 3.3 В, 250 мА
ОС: uClinux 2.4.27 (Big Endian native)
Shell: Busybox 1.0
Приложения: Webserver, Telnet
Поддерживаемые ФС: CRAMFS, JFFS2, NFS
Разработка с помощью: GCC + binutils + uClibc

Дата выпуска: 18.05.2005
Цена: 99 Евро

Также доступна прокачанная модель — picotux 112:

Inline image 2

Read more: Habrahabr.ru
QR: Inline image 3

Posted via email from Jasper-net

ASP.NET Impersonation and Parallel.ForEach Issue

| Sunday, July 8, 2012
This week I ran into a very strange issue that has some pretty big implications.

The problem is this: if you use ASP.NET with impersonation, and you also use Parallel.ForEach, threads that run on other cores, lose the execution context.

Put another way, threads that run on other cores don’t respect your impersonation settings, and default to the unimpersonated calling context.

How to reproduce:
First, add impersonation to the web.config (within <system.web>) – for example:

    <identity impersonate=“true“
        userName=“mydomain\MyServiceAccount“ 
        password=“GoodPassword“/>
Now, in code, I run this code synchronously:

    protected void Page_Load(object sender, EventArgs e)
    {
        Debug.WriteLine(“Process starting as “ + WindowsIdentity.GetCurrent().Name);
        List<String> items = new List<string>();
        items.Add(“Item 1″);
        items.Add(“Item 2″);
        items.Add(“Item 3″);
        items.Add(“Item 4″);
        items.Add(“Item 5″);
        items.Add(“Item 6″);
        items.Add(“Item 7″);
 
        foreach (String item in items)
        {
            DoWork(item);
        }
    }
 
    private void DoWork(String itemName)
    {
        DebuWriteLine(“Executing “ + itemName + ” as “ + WindowsIdentity.GetCurrent().Name);
    }
That results in output, like you might think:

    Process starting as myDomain\MyServiceAccount
    Executing Item 1 as myDomain\MyServiceAccount
    Executing Item 2 as myDomain\MyServiceAccount
    Executing Item 3 as myDomain\MyServiceAccount
    Executing Item 4 as myDomain\MyServiceAccount
    Executing Item 5 as myDomain\MyServiceAccount
    Executing Item 6 as myDomain\MyServiceAccount
    Executing Item 7 as myDomain\MyServiceAccount

Now, if you instead run that code as a Parallel.ForEach:

    Parallel.ForEach(items, (item) =>
    {
        DoWork(item);
    });

You will then see very strange results:

    Process starting as myDomain\MyServiceAccount
    Executing Item 2 as myDomain\rseder
    Executing Item 1 as myDomain\MyServiceAccount
    Executing Item 3 as myDomain\rseder
    Executing Item 4 as myDomain\MyServiceAccount
    Executing Item 6 as myDomain\MyServiceAccount
    Executing Item 5 as myDomain\rseder
    Executing Item 7 as myDomain\MyServiceAccount

What is happening? I’m not exactly sure. I read quite a few message board comments of people guessing. I spent a whole afternoon going to a zillion different pages, sorry I don’t have anything specific to reference here.

Anyhow, this code ran on a single processor, quad-core computer. It seems as though when code runs on the other cores, it loses execution context.

A Solution, not a great one though:
One solution I found (again, sorry, I couldn’t find link to credit the original idea) was to RE-impersonate the impersonated user, within our Parallel.ForEach. That looks something like this:

    // Get a handle to the current, impersonated identity
    WindowsIdentity identity = WindowsIdentity.GetCurrent();
 
    Parallel.ForEach(items, (item) =>
    {
        // RE-impersonate the ASP.NET identity, within this separate task
        using (WindowsImpersonationContext impersonationContext =
            identity.Impersonate())

Read more: Rob Seder's Blog

Posted via email from Jasper-net