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

Start your gaming engines with the Delta Engine Public Beta (Think ".Net game dev everywhere...")

| Tuesday, October 11, 2011
image_thumb.png?imgmax=800

The Delta Engine Public Beta Preview v0.9.0 has just been released. Grab your copy at http://DeltaEngine.net/Download

The Delta Engine allows you to develop applications and especially games for all major AppStore platforms completely under Windows with .NET by using your favorite tools. It is free to use (on Windows, see Licensing), Open Source and written in 100% .NET.

The Delta Engine currently supports Windows, iPad, iPhone, Android, Android Tablets, Windows Phone 7, Xbox 360, Linux, MacOS, the Web [GD:emphasis added] as well as more platforms in the future. To use non-windows platforms you will need a license (http://DeltaEngine.net/Licensing starts with v0.9.1 soon). In v0.9.0 you can already preview the build process and content generation with the Launcher and ContentManager tools.

Read more: Greg's Cool [Insert Clever Name] of the Day
Read more: Delta Engine Public Beta Preview v0.9.0 released
QR: start-your-gaming-engines-with-delta.html

Posted via email from Jasper-net

Compare Collections in C#

|
Often we need to check if the items in the collections are same or not. It comes into action very often during unit testing.

Here we will see three ways of doing so

Entity Class (Player Entity)

namespace ConsoleApplication1
{
    public class Players
    {
        public int PlayerId { get; set; }    
        public string PlayerName { get; set; }
        public string BelongsTo { get; set; }
        public int PlayerAge { get; set; }
        public int FeePerMatch { get; set; }
    }
}

And let the have our source ready as under

private static List GetPlayerList1()
        {
            List lstPlayers = new List();
            Enumerable
                .Range(1, 10)
                .ToList()
                .ForEach(i => lstPlayers.Add(new Players
                {
                    PlayerId = i
                    ,
                    PlayerName = string.Concat("PlayerName", i)
                    ,
                    BelongsTo = i % 2 == 0 ? "India" : "USA"
                    ,
                    PlayerAge = i + 20
                    ,
                    FeePerMatch = i + 1000
                }));
            return lstPlayers;
        }

        private static List GetPlayerList2()
        {
            List lstPlayers = new List();
            Enumerable
                .Range(1, 10)
                .ToList()
                .ForEach(i => lstPlayers.Add(new Players
                {
                    PlayerId = i
                    ,
                    PlayerName = string.Concat("PlayerName", i)
                    ,
                    BelongsTo = i % 2 == 0 ? "India" : "USA"
                    ,
                    PlayerAge = i + 20
                    ,
                    FeePerMatch = i + 1000
                }));
            return lstPlayers;
        }
    }

Approach 1 : Using Union extension method

var source1 = GetPlayerList1();
var source2 = GetPlayerList2();

var result = source1.Where(x1 => !source2.Any(x2 => x1.PlayerId == x2.PlayerId
                                                              && x1.PlayerName == x2.PlayerName
                                                              && x1.BelongsTo == x2.BelongsTo
                                                              && x1.PlayerAge == x2.PlayerAge
                                                              && x1.FeePerMatch == x2.FeePerMatch))
                         .Union(
                          source2.Where(x1 => !source1.Any(x2 => x1.PlayerId == x2.PlayerId
                                                              && x1.PlayerName == x2.PlayerName
                                                              && x1.BelongsTo == x2.BelongsTo
                                                              && x1.PlayerAge == x2.PlayerAge
                                                              && x1.FeePerMatch == x2.FeePerMatch)));


            if (result.Count() > 0) Console.WriteLine("Objects are not equal");
            else Console.WriteLine("Objects are equal");

            Console.ReadKey(true);
//Output
//Objects are equal


Read more: Beyond Relational
QR: compare-collections-in-c.aspx

Posted via email from Jasper-net

Beautiful Vector Graphic Illustrations

|

UI Automation Verify (UIA Verify) Test Automation Framework

| Monday, October 10, 2011
UI Automation Verify (UIA Verify) Test Automation Framework
UIA Verify is a test automation framework that features the User Interface Automation Test Library (UIA Test Library) and Visual UI Automation Verify (Visual UIA Verify), the graphical user interface tool. The framework facilitates manual and automated testing of the Microsoft (R) User Interface (UI) Automation Provider implementation of a control or application. The majority of the UIA Verify functionality is provided through a dynamic link library (e.g., UIATestLibrary.dll) that contains the code for testing specific UI Automation functionality and supports logging of the test results.

With the Visual UIA Verify, you can quickly find and select any UI element anywhere on the desktop. Based on the specific control type and the supported control patterns, UIA Verify provides the built-in test scenarios prioritized for the particular UI element. Developers can add additional test scenarios by adding the code to the UIA Test Library. The tool can output the test results or the summary in various forms. Visual UIA Verify can output test details in HTML.

For each UI element, the available test cases are organized into three groups:

    Automation Element tests -- general test cases for the selected automation element
    Control tests -- test cases specific to the control type of the selected automation element
    Pattern tests -- test cases specific to all patterns exposed by the selected automation element


The UIA Test Library can be integrated to an existing automated test. This CodePlex project includes sample automation code in C#.

Read more: Codeplex
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=uiautomationverify.codeplex.com/

Posted via email from Jasper-net

How Much is That Phished PayPal Account?

|
paypalshop2.png

Compromised PayPal accounts are a valuable commodity in the criminal underground, and crooks frequently trade them in shadowy online forums. But it wasn’t until recently that I finally encountered a proper Web site dedicated to selling hacked PayPal accounts.

Many of the PayPal accounts for sale at iProfit.su have a zero balance, but according to the proprietor of this shop these are all “verified.” PayPal “verifies” an account when a customer agrees to attach a bank account to it; PayPal then sends a micropayment the bank account, and asks the user the value of that mini deposit. A bonus feature: all the hacked PayPal profiles currently for sale at iProfit.su are advertised as having a credit card attached to them, which is another way PayPal accounts can be verified.

The creator of iProfit.su also advertises private, bulk sales of unverified PayPal accounts; currently he is selling these at $50 per 100 accounts – a bargain at only 50 cents apiece.

Accounts are sold with or without email access (indicated by the “email” heading in the screenshot above): Accounts that come with email access include the username and password of the victim’s email account that they used to register at PayPal, the site’s proprietor told me via instant message. The creator of iProfit.su told me the accounts for sale were stolen via phishing attacks, but the fact that accounts are being sold along with email access suggests that at least some of the accounts are being hijacked by password-stealing computer Trojans on account holders’ PCs.

It’s not clear how this guy prices the verified PayPal accounts. In the accounts I saw advertised (see screenshot above), the prices started at $2.50 for verified accounts with a balance from $0 to $10. Higher-balance verified accounts appear to be priced at between 8 to 12 percent of their total balance. For example, one account — apparently taken from a hapless victim named Abigail — has a current balance of $121.07, and is being sold for $15.

Read more: Krebs On Security
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=krebsonsecurity.com/2011/10/how-much-is-that-phished-paypal-account/

Posted via email from Jasper-net

Converting XML data to CLR object using XmlSerializer

|
Introduction

My last post (Consuming a WebService from Silverlight) was all about accessing a Web Service/API from Silverlight. In the article, I described how to consume an external API, with a sample from the GeoName Web Services. This post is a continuation of that article. Here I am going to demonstrate how to convert the result output, which is in XML, to a CLR object, and of course use it as a datasource in a Silverlight app.
Source Code and Links

    GeoSearch live link – GeoSearch
    Download latest version of source code - GeoSearch

GeoSearch, the example Project

GeoName is a provider of various Web Services/API, exposing information about geographic details of places. You can visit the website here. Using their service, I am going to design a search page where the user can get the geo details based on the name.

Read more: Codeproject
QR: Converting-XML-data-to-CLR-object-using-XmlSeriali

Posted via email from Jasper-net

Passing Values Between Pages in Silverlight 4

|
In this post, we will look into some of the approaches available for passing values between Silverlight pages: a Silverlight page to a Silverlight page and an ASPX page to a Silverlight page. A typical approach in legacy web systems is using the QueryString, where parameters are passed as field–value pairs.
QueryString in Silverlight

In a real application scenario, suppose a Customer page appears when the user clicks on to see the details of a particular Customer. The customer ID/name will be used in the query string and can be passed to the CustomerDetail page. The CustomerDetail page will parse the URL and fetch the details from the data source based on the value from the query string.

Silverlight pages can access the query string from the NavigationContext property of the page (check my earlier post for more details). So in the above example, the CustomerDetail page can access it with one line of code: this.NavigationContext.QueryString["**QS Field Name**"].

// Executes when the user navigates to this page.
protected override void OnNavigatedTo(NavigationEventArgs e)
{
    lblQSValue.Content = this.NavigationContext.QueryString["PassQS"];
}

Passing Parameters from an ASPX Page to Silverlight Using InitParameters

Although QueryString is a way to pass values between pages, there are alternate ways of sending parameters to a Silverlight application, one of which is InitParam.

In an ASPX page, in the object tag where the XAP file gets loaded, we can add the following tag:

<param name=”InitParams” value=”PassVALA = IamA,PassVALB = 25″ />

<body>
<form id=”form1″ runat="”server”" style=”height:100%”>
<div id=”silverlightControlHost”>

   type=”application/x-silverlight-2″ width=”100%” height=”100%”>






  style=”text-decoration:none”>

  alt=”Get Microsoft Silverlight” style=”border-style:none”/>

<iframe id=”_sl_historyFrame”
  style=”visibility:hidden;height:0px;width:0px;border:0px”></iframe></div>
</form>
</body>

Read more: Codeproject
QR: Passing-Values-Between-Pages-in-Silverlight-4

Posted via email from Jasper-net

Introducing Mono.Dns

|
The internal implementation of System.Net.Dns in Mono ends up calling getaddrinfo () or some other similar function in libc. This is perfectly fine for most applications. However, sophisticated applications that perform more than just a few DNS queries, like crawlers, aggregators, and log processors, are taking a big performance hit when running under Mono. One of the issues is that the libc implementation is not optimized to be used from multiple threads. Barring an external library dependency, there is not much that can be done to address that problem. Another issue is that the implementation of the asynchronous methods in System.Net.Dns are based on asynchronous delegates invoking the synchronous version of the methods. In other words, calling, for instance, Dns.BeginGetHostAddresses () will use a threadpool thread to block on the call to Dns.GetHostAddresses (). Mono.Dns is here to address these problems and more.

The Mono.Dns assembly provides a set of classes that can help you implement a DNS client or server. There is also an implementation of a simple asynchronous DNS resolver with an API inspired by the System.Net.Socket.Socket.*Async() set of methods. The source code is available in the Mono.Dns GitHub repository. There is an example of use in test/resolver.cs.

As an example of the performance advantage, grab the plainolddns.cs file, compile it, and download this file. Make sure you pull the latest Mono from the master branch and run the program like this:

$ mono plainolddns.exe $(cat google-domains.txt)
...A BUNCH OF NAMES and IP ADDRESSES
...
00:00:18.4342605

Read more: Sin ley
QR: Oct-09.html

Posted via email from Jasper-net

Google Cloud SQL

|
What is Google Cloud SQL?

Google Cloud SQL is web service that allows you to create, configure, and use relational databases with your App Engine applications. It is a fully-managed service that maintains, manages, and administers your databases, allowing you to focus on your applications and services.

By offering the capabilities of a MySQL database, the service enables you to easily move your data, applications, and services into and out of the cloud. This allows for high data portability and helps in faster time-to-market because you can quickly leverage your existing database (using JDBC and/or DB-API) in your App Engine application.

To ensure that your critical applications and services are always running, Google Cloud SQL replicates data to multiple geographic regions to provide high data availability.

The service is currently in limited preview.

Read more: Google Cloud SQL
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://habrahabr.ru/blogs/gae/129907/

Posted via email from Jasper-net

Possible Governmental Backdoor found ("case R2D2")

|
r2d2_2.png

The announcment was made public on ccc.de with a detailed 20-page analysis of the functionality of the malware. Download the report in PDF (in German)

The malware in question is a Windows backdoor consisting of a DLL and a kernel driver.

The backdoor includes a keylogger that targets certain applications. These applications include Firefox, Skype, MSN Messenger, ICQ and others.

The backdoor also contains code intended to take screenshots and record audio, including recording Skype calls.

In addition, the backdoor can be remotely updated. Servers that it connects to include 83.236.140.90 and 207.158.22.134.

We do not know who created this backdoor and what it was used for.

We have no reason to suspect CCC's findings, but we can't confirm that this trojan was written by the German government. As far as we see, the only party that could confirm that would be the German government itself.

Our generic policy on detecting governmental backdoors or "lawful interception" police trojans can be read here.

We have never before analysed a sample that has been suspected to be governmental backdoor. We have also never been asked by any government to avoid detecting their backdoors.

Having said that, we detect this backdoor as Backdoor:W32/R2D2.A

Read more: F-Secure
QR: 00002249.html

Posted via email from Jasper-net

Dart: a language for structured web programming

|
Today we are introducing an early preview of Dart, a class-based optionally typed programming language for building web applications. Dart’s design goals are:

    Create a structured yet flexible language for web programming.
    Make Dart feel familiar and natural to programmers and thus easy to learn.
    Ensure that Dart delivers high performance on all modern web browsers and environments ranging from small handheld devices to server-side execution.

Dart targets a wide range of development scenarios: from a one-person project without much structure to a large-scale project needing formal types in the code to state programmer intent. To support this wide range of projects, Dart has optional types; this means you can start coding without types and add them later as needed. We believe Dart will be great for writing large web applications.

Dart code can be executed in two different ways: either on a native virtual machine or on top of a JavaScript engine by using a compiler that translates Dart code to JavaScript. This means you can write a web application in Dart and have it compiled and run on any modern browser. The Dart VM is not currently integrated in Chrome but we plan to explore this option.

The language comes with a set of basic libraries and tools for checking, compiling, and running Dart code, all of which will evolve further with your participation. We've made the language and preliminary tools available as open source on dartlang.org. Check out the site to give feedback, learn more about Dart, and participate in its development.

main() {
print('Dart: Structured Web Programming');
}

Read more: The Official Google Code blog
QR: dart-language-for-structured-web.html

Posted via email from Jasper-net

An Idiot's Guide to C++ Templates - Part 1

| Sunday, October 9, 2011
Prolusion

Most of the C++ programmers stay away from the C++ templates, due to its perplexed nature. The excuses against templates:

    Hard to learn
    Compiler errors are vague
    Not worth the effort

Granted that templates are slightly hard to learn, understand and adapt. Nevertheless, the advantages we gain from using templates would outweigh the negatives. There is lot more than generic functions or classes, that can be wrapped around templates. I would explicate them.

While C++ templates and STL (Standard Template Library) are siblings, technically. In this article, I would only cover templates at the core level. Next part of this series would cover more advanced and intersting stuff regarding templates, and some understanding about STL.

Table of Contents:

  • Class Templates
    • Multiple Types with Class Templates

    The Syntax Drama

    As you probably know, template largely uses the angle brackets: The less than ( < ) and the greater than symbol ( > ). For templates, they are always used together in this form:

     < Content >

    Where Content can be:

        class T / typename T
        A data type, which maps to T
        An integral specification
        An integral constant/pointer/reference which maps to specification mentioned above.

    In this part, I would only cover points 1 and 2. The symbol T is nothing but a data-type, which can be any data-type.

    Let's jump to an example. Suppose you write a function that prints double (twice) of a number:

    void PrintTwice(int data)
    {
        cout << "Twice is: " << data * 2 << endl;        
    }

    Which can be called passing an int:

    PrintTwice(120); // 240

    Read more: Codeproject
    QR: template1.aspx

    Posted via email from Jasper-net

    Microsoft vs Skype

    |