Archive for September, 2010

Thông số cài 3G cho Nexus One

Để cấu hình Nexus One với mạng Viettel, hãy xem ở đây Làm sao để cấu hình 3G của mạng Viettel cho điện thoại Nexus One? « Nam Gi VU Blogs

Dưới đây là một hướng dẫn lấy từ nguồn ở đây thong so cai 3g cho nexus one (chưa kiểm được kiểm tra thử). Mình đã thử cấu hình máy Nexus One của mình với mạng VinaPhone theo hướng dẫn này nhưng không thành công. Không biết các bạn thì thế nào?

-Bạn vào mục setting/ wireless setting / mobile network / Access Point Names/ ấn menu, chọn new APN,

Mạng Viettel:
APN: v-internet
Username: để trống
Password: để trống

Ví dụ:
dòng đầu là tên APN, đăt là Viettel cho dễ nhớ,
dòng APN (dòng thứ 2) set là v-internet


Mạng VinaPhone:
APN: m3-world
Username: mms
Password: mms


Mạng MobiFone:
APN: m-wap
Username: wap (hoac  mms)
Password: wap (hoac  mms)

-nhớ để bật 3G lên, trong phần Mobile Network có cái 2G only, nhớ uncheck (không đánh dấu) cái này nhé

Thân.

Advertisements

Stack Overflow Notifier – Google Chrome extension gallery

One of my favourite Chrome addons

via Stack Overflow Notifier – Google Chrome extension gallery.

FastestChrome – Browse Faster – Google Chrome extension gallery

One of my favourite Chrome addons

via FastestChrome – Browse Faster – Google Chrome extension gallery.

A nice article to get used to Exception.

I found a nice article to get used to Exception from here C# Station: C# Tutorial Lesson 15 – Introduction to Exception Handling. Below is my favourite parts.

Exceptions

Exceptions are unforeseen errors that happen in your programs. Most of the time, you can, and should, detect and handle program errors in your code. For example, validating user input, checking for null objects, and verifying the values returned from methods are what you expect, are all examples of good standard error handling that you should be doing all the time.

However, there are times when you don’t know if an error will occur. For example, you can’t predict when you’ll receive a file I/O error, run out of system memory, or encounter a database error. These things are generally unlikely, but they could still happen and you want to be able to deal with them when they do occur. This is where exception handling comes in.

When exceptions occur, they are said to be “thrown”. What is actually thrown is an object that is derived from the System.Exception class. In the next section, I’ll be explaining how thrown exceptions are handled withtry/catch blocks.

The System.Exception class provides several methods and properties for obtaining information on what went wrong. For example, the Message property provides summary information about what the error was, theStacktrace property provides information from the stack for where the problem occurred, and the ToString()method is overridden to reveal a verbose description of the entire exception.

Identifying the exceptions you’ll need to handle depends on the routine you’re writing. For example, if the routine opened a file with the System.IO.File.OpenRead() method, it could throw any of the following exceptions:

  • SecurityException
  • ArgumentException
  • ArgumentNullException
  • PathTooLongException
  • DirectoryNotFoundException
  • UnauthorizedAccessException
  • FileNotFoundException
  • NotSupportedException

It’s easy to find out what exceptions a method can raise by looking in the .NET Frameworks SDK Documentation. Just go to the Reference/Class Library section and look in the Namespace/Class/Method documentation for the methods you use. The exception in the list above were found by looking at the OpenRead() method definition of the File class in the System.IO namespace. Each exception identified has a hyperlink to its class definition that you can use to find out what that exception is about. Once you’ve figured out what exceptions can be generated in your code, you need to put the mechanisms in place to handle the exceptions, should they occur.

Today, continue to have disappointment with Yahoo!

Well,

Today I received a survey email from Yahoo! asking us to give them our ideas on their email/marketing services. I thought ok it’s a chance for me to say something I dislike about them now (I’ve tried to contact them and give out my suggestion about the way their design user interface in moving/copying contacts into groups but after 1-2 years, everything… stays the same!).

Nice design the survey is but there’s a mistake in one or two of their questions. Moreover, at the end, they said I gonna win a prize they give away to 8 lucky people. OK, it sounds cool so I’d like to have a try on my luck! But what… they ask me for my cellphone but do not accept my Viettel phone number –  it’s in the format of 01681234567! What the… At last I have to enter my cellphone following their format!

Must say, Yahoo! disappointed me again. If they want the phone number in some format separately for home/cell numbers, they can make a UI that allow 1) to choose the type home/cell, and 2) to enter the number in three/two textboxes correspondingly.

Haizz… Yahoo! Don’t know how long you would going on. Best wishes for you!

Now you can sync my notes in Windows 7 Sticky Notes!

source: http://superuser.com/questions/187323/how-to-sync-notes-created-from-sticky-notes-so-as-to-reuse-them-among-different-p

If you love to note things in Windows 7 using the integrated  tool, i.e. Sticky Notes, then you should need to back-up/sync your notes to the internet. You will be happy like me! I would never be afraid to lose my notes again since I can access it any where as long as I have the access to the Internet ^_^!

In brief

Here’s just 3 steps to get it:

  1. Know where your notes is stored on your computer – it’s in here “%AppData%\Microsoft\Sticky Notes\StickyNotes.snt”
  2. Get a “magic” dropbox folder – so as you will be able to have a free storage folder on the Internet.
  3. Make some effort to have your dropbox folder do the syncing for you.

Details

You need:

  1. Symbolic link (recommend Link Shell Extension)
  2. Dropbox
  3. The location of the “data” of the notes i.e. in %AppData%\Microsoft\Sticky Notes\StickyNotes.snt and using symbolic link (referenced from source)

How to sync the notes:

  1. Go to the notes data file and create a symbolic link
  2. Save the symbolic link in your dropbox folder
  3. Done.

Hope that helps!

Getting started with Unit Testing with Moq

I note down here how I did get started with Unit Testing which use Moq framework.
Hope it would help you to save your learning-new-tech time!

Unit Test
“The Clean Code Talks — Unit Testing”
Equipping yourself before digging into Unit Testing!

Moq

QuickStart – moq – Project Hosting on Google Code
TDD : Introduction to Moq
Beginning Mocking With Moq 3 – Part 1
Introduction to Mocking with Moq (Video)
Moq: Linq, Lambdas and Predicates applied to Mock Objects
Decaying Code: Part 1 – Introduction to Moq

Mocking the Unmockable: Using Microsoft Moles with Gallio

Hope it’s helpful to you!

Questions about Moq:
What is the differences between “Strict” and “Loose” behavior? – Stack Overflow