Thursday, August 12, 2010

Samsung Intensity II

Samsung Intensity II U460 is a replacement to the original Samsung Intensity U450, and will be offered in two colors: Metallic Blue and Deep Gray. Features include the sliding QWERTY keyboard, 1.3MP camera, 1x data, and microSD memory card slot.

Basic specifications:
CDMA 800/1900
Average Dimensions - 4.29 x 2.09 x 0.61 inches (109 x 53 x 15 mm)
Average Weight - 4.10 oz (116 g)
Small display - 240 x 320 pixels; 262 144 colors
Standby / Talk times (300 h / 5 h)
1.3 megapixels Camera,  microSD/microSDHC slot
GPS - Yes

http://www.new-cell-phones.org/wp-content/uploads/2010/07/Samsung-Intensity-2-cell-phone-Verizon.jpg http://www.ubergizmo.com/photos/2010/7/samsung-intensity-2.jpg

Advanced Encryption in Silverlight and .NET Applications

AES encryption is implemented in both Silverlight and .NET run times, using exact same set of classes, primary one being AesManaged class.

using System;
using System.Text;
using System.Security.Cryptography;
using System.IO;
 
namespace Encryption
{
    public static class EncryptionUtility
    {
        public static string Encrypt(string input, string password)
        {
 
            byte[] utfData = UTF8Encoding.UTF8.GetBytes(input);
            byte[] saltBytes = Encoding.UTF8.GetBytes(password);
            string encryptedString = string.Empty;
            using (AesManaged aes = new AesManaged())
            {
                Rfc2898DeriveBytes rfc = new Rfc2898DeriveBytes(password, saltBytes);
 
                aes.BlockSize = aes.LegalBlockSizes[0].MaxSize;
                aes.KeySize = aes.LegalKeySizes[0].MaxSize;
                aes.Key = rfc.GetBytes(aes.KeySize / 8);
                aes.IV = rfc.GetBytes(aes.BlockSize / 8);
 
                using (ICryptoTransform encryptTransform = aes.CreateEncryptor())
                {
                    using (MemoryStream encryptedStream = new MemoryStream())
                    {
                        using (CryptoStream encryptor = 
                            new CryptoStream(encryptedStream, encryptTransform, CryptoStreamMode.Write))
                        {
                            encryptor.Write(utfData, 0, utfData.Length);
                            encryptor.Flush();
                            encryptor.Close();
 
                            byte[] encryptBytes = encryptedStream.ToArray();
                            encryptedString = Convert.ToBase64String(encryptBytes);
                        }
                    }
                }
            }
            return encryptedString;
        }
 
        public static string Decrypt(string input, string password)
        {
 
            byte[] encryptedBytes = Convert.FromBase64String(input);
            byte[] saltBytes = Encoding.UTF8.GetBytes(password);
            string decryptedString = string.Empty;
            using (var aes = new AesManaged())
            {
                Rfc2898DeriveBytes rfc = new Rfc2898DeriveBytes(password, saltBytes);
                aes.BlockSize = aes.LegalBlockSizes[0].MaxSize;
                aes.KeySize = aes.LegalKeySizes[0].MaxSize;
                aes.Key = rfc.GetBytes(aes.KeySize / 8);
                aes.IV = rfc.GetBytes(aes.BlockSize / 8);
 
                using (ICryptoTransform decryptTransform = aes.CreateDecryptor())
                {
                    using (MemoryStream decryptedStream = new MemoryStream())
                    {
                        CryptoStream decryptor = 
                            new CryptoStream(decryptedStream, decryptTransform, CryptoStreamMode.Write);
                        decryptor.Write(encryptedBytes, 0, encryptedBytes.Length);
                        decryptor.Flush();
                        decryptor.Close();
 
                        byte[] decryptBytes = decryptedStream.ToArray();
                        decryptedString = 
                            UTF8Encoding.UTF8.GetString(decryptBytes, 0, decryptBytes.Length);
                    }
                }
            }
 
            return decryptedString;
        }
    }
}

Create a Path Using Path Markup Language Silverlight 4 - Video Tutorial

Silverlight supports a powerful and complex mini-language that you can use to describe geometric paths. You use this mini-language when setting a property of type Geometry, such as the Clip property of a UIElement or the Data property of a Path element. In this video, Todd Miranda demonstrates how to manually create a path using Path Markup Language.

http://www.silverlight.net/learn/videos/all/create-a-path-using-path-markup-language/

Source: silverlight.net

Friday, July 30, 2010

RIA Services - Presentation Model & POCO Objects

RIA Services handles any relationship other than Many to Many. If you have a Many to Many you will need to have a linking entity between the two tables.

Each Entity POCO on the server needs to have a primary key (you mark the key(s) with the KeyAttribute). Related entities need a foreign key property and you need to mark the relationships with AssociationAttributes.

RIA Services is good at lazy loading, but you have to manually trigger the loads it will not do it automatically. If you want to load the Companies and the Employees at the same time then you need to decorate the association properties with the IncludeAttribute. If you don't want to include them then you don't. Because RIA Services is based on keys and foreign keys, you can load the Companies up in one load and then later if you want them load up the Employees and the relationships between the two tables will automatically link back on on the client based on the values of the foreign keys.

A few good resources to look at what be documentation of what RIA Services calls a Presentation Model:

http://msdn.microsoft.com/en-us/library/ee707347(VS.91).aspx

and there is a simple example of how the attributes work here:

http://tech.rofas.net/post/Working-with-associated-POCO-objects-in-WCF-RIA-Services.aspx

Wednesday, July 28, 2010

Samsung Intercept

Samsung Intercept M910 is an Android 2.1 powered smartphone with QWERTY keyboard. It features a 3.2" touch display, Wi-Fi, GPS, 3.2MP camera and microSDHC slot for memory.

Basic specifications:
CDMA 1900/800
Average Dimensions - 4.43 x 2.19 x 0.59 inches (113 x 56 x 15 mm)
Heavy Weight - 4.90 oz (139 g)
Average display - 240 x 400 pixels
Standby / Talk times (300 h / 5.5 h)
3.2 megapixels Camera,  microSD/microSDHC slot, WiFi, 3G
   Android
GPS - Yes

Tuesday, July 27, 2010

Motorola CHARM

Motorola CHARM is an Android 2.1 packing handset with 2.8-inch touch display, 3MP camera, QWERTY keyboard, A-GPS, Wi-Fi and 3.5mm headphones jack.

Basic specifications:
GSM 850/900/1800/1900
UMTS 2100/1700
Average Dimensions - 3.87 x 2.65 x 0.45 inches (98.4 x 67.2 x 11.4 mm)
Average Weight - 3.88 oz (110 g)
Average display - 320 x 240 pixels
Standby / Talk times (267 h / 6.75 h)
3 megapixels Camera,  microSD/microSDHC slot, 3G
   Android
GPS - Yes

Monday, July 26, 2010

Samsung Acclaim

The Samsung Acclaim is running Android 2.1, has 3.2” touchscreen, a side-sliding keyboard, 3MP camera with LED flash, Wi-Fi, GPS, and a 4GB memory card is included in the package.

Basic specifications:
CDMA 1900/800
Big Dimensions - 4.49 x 2.32 x 0.60 inches (114 x 59 x 15 mm)
Average Weight - 4.59 oz (130 g)
Big display - 320 x 480 pixels; 262 144 colors
Standby / Talk times (450 h / 8 h)
3 megapixels Camera,  microSD/microSDHC slot, WiFi, 3G
   Android
GPS - Yes