Friday, October 28, 2011

My first iPhone/iPad app 'Nghe Si' is in the App Store

Nghe Si is an iOS/iPhone/iPad app enabling users to follow their favorite Vietnamese celebrities' latest updates including posts, photos, and videos.

Check it out: http://itunes.apple.com/us/app/nghe-si/id473961965?mt=8

6289656502_9e7ac8cfe6.jpg

Android MainHelloButton App

LinearLayout
Orientation horizontal
LinearLayout
layout_height wrap_content
layout_width fill_parent
orientation vertical
layout_gravity center
id blank
id @+id/myTextView
text @string/message_start
textColor @color/text_color
layout_margin 20dp
layout_height wrap_content
layout_width wrap_parent
layout_gravity center

src\MainHelloButton.java

import android.app.Activity;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.Button;
import android.widget.TextView;
import android.util.Log;
import android.view.View;

public class MainHelloButton extends Activity{

private int mPressCount;

private static final String TAG = "MainHelloButton";

public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

final Button myButton = (Button) findViewById(R.id.my_button);
final TextView myTextView = (TextView) findViewById(R.id.my_text_view);

myButton.setOnClickListener(new View.OnClickListener(){
public void onClick(View v){
mPressCount++;
Resources res = getResources();
string msg = res.getString(R.string.message_format, mPressCount);
myTextView.setText(msg);

Log.d(TAG, "Log a button click press = " + mPressCount);
}
});
}
}

Change app icon in AndroidManifest.xml file
Log.d ~ debug
Log.wtf ~ what a terrible failure
Log.f ~ failure

Window -> Show View -> Other -> Android -> LogCat

Tuesday, October 25, 2011

Free Javascript and CSS E-books

Just for answering a few questions from SitePoint. Good stuff.

http://www.sitepoint.com/launch/2e46ac

Thursday, October 20, 2011

ios AdMob

// Create a view of the standard size at the bottom of the screen.

GADRequest *request = [GADRequest request];

if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad){

bannerView_ = [[GADBannerView alloc]

initWithFrame:CGRectMake(20.0,

self.view.frame.size.height -

GAD_SIZE_728x90.height,

GAD_SIZE_728x90.width,

GAD_SIZE_728x90.height)];

}

else{

bannerView_ = [[
GADBannerView alloc]

initWithFrame:CGRectMake(0.0,

self.view.frame.size.height -

GAD_SIZE_320x50.height,

GAD_SIZE_320x50.width,

GAD_SIZE_320x50.height)];

}

// Specify the ad's "unit identifier." This is your AdMob Publisher ID.

bannerView_.adUnitID = @"ADMOBID";

// Let the runtime know which UIViewController to restore after taking

// the user wherever the ad goes and add it to the view hierarchy.

bannerView_.rootViewController = self;

[
self.view addSubview:bannerView_];

[
self.view bringSubviewToFront:bannerView_];

// Initiate a generic request to load it with an ad.

[bannerView_ loadRequest:request];

iOS NSURLConnection

responseData = [[NSMutableData data] retain];

NSURLRequest *request = [NSURLRequest requestWithURL:

                             [NSURL URLWithString:@"http://www.url.com"]

cachePolicy:NSURLRequestReloadIgnoringLocalCacheData

timeoutInterval:60.0];

NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];

[connection start];

#pragma mark NSURLConnection delegate methods

- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {

[
responseData setLength:0];

}

- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {

[
responseData appendData:data];

}

- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {

}

- (void)connectionDidFinishLoading:(NSURLConnection *)connection {

}

Thursday, October 6, 2011

R.I.P Steve Jobs

"Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose. You are already naked. There is no reason not to follow your hear." -1987

6217205231_f86bde06d8.jpg

Source: http://jmak.tumblr.com/post/9377189056

6217724792_27edecf908.jpg

6217205203_fc4e4172c9.jpg

Monday, September 26, 2011

Trying out Linkedin Ads

Clicks: 22
Impressions: 165,863
Click Through Rate: 0.013%
Avg. Cost Per Click: $2.98
Total Spent: $65.56

6185221047_3729e5983c.jpg

Installed Mac OS X Lion and Xcode 4

6185147079_274f2c0f92.jpg

6185676482_e48ce5bbee.jpg

Thursday, August 18, 2011

How to Increase Message Size Quota

Issue:
The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.

Solution:
Increase the following properties in web.config
maxBufferSize="20000000"
maxBufferPoolSize="20000000"
maxReceivedMessageSize="20000000"
maxStringContentLength="20000000"
maxArrayLength="20000000"

Second Day of Adwords Campaign

After one day of running Adwords campaign: 1359 impressions, 2 clicks, $.80

6055847281_d1d512e59c.jpg

Wednesday, August 17, 2011

XigniteMetalsSoapClient

using RemoteMetals = NopSolutions.NopCommerce.Web.xMetalService;

private xMetalService.XigniteMetalsSoapClient proxy;

proxy = new xMetalService.XigniteMetalsSoapClient("XigniteMetalsSoap");
RemoteMetals.Header header = new RemoteMetals.Header();
header.Username = "xxxxx";
header.Password = "yyyyy";
RemoteMetals.LondonFixing objLondonFixing = proxy.GetLastLondonFixing(header, RemoteMetals.FixingTypes.LondonGold, RemoteMetals.FixingCurrencyTypes.USD);

chart = proxy.GetLondonFixingChart(header, RemoteMetals.FixingTypes.LondonGold, RemoteMetals.PeriodType.Morning, RemoteMetals.FixingCurrencyTypes.USD, "8/15/2010", "8/15/2011", RemoteMetals.StockChartStyles.Line, 600, 400);

if (objLondonFixing == null)
{
/// add error processing here
/// this condition could be caused by an HTTP error (404,500...)
Response.Write("Service is unavailable at this time.");
}
else
{
switch (objLondonFixing.Outcome)
{
case RemoteMetals.OutcomeTypes.Success:
/// add processing for displaying the results, e.g.
/// display the value for Value
/// other values could be consumed in the same manner
Response.Write(objLondonFixing.Value);
Response.Write(chart.Url);
break;
default:
/// add processing for handling request problems, e.g.
/// you could pass back the info message received from the service
Response.Write(objLondonFixing.Message);
break;
}
}

Trying Out Google Adwords

6053595665_bc6c1b46c4.jpg

6053595599_557084e704.jpg

Sunday, August 14, 2011

Wednesday, August 10, 2011

New C# 4.0 Features

Parameters

  • Optional

  • Named

  • Overload Resolution


Co- and Contravariance

  • Covariance - same relationships

  • Contracovariance - inverted relationships


dynamic

  • run-time

  • DLR - Dynamic Language Run-time


New Compiler Options

  • Embedding COM Interop type information

  • Specifying an app.config file to the C# compiler

Wednesday, August 3, 2011

Thursday, July 28, 2011

Tuesday, July 26, 2011

VS 2010's Own Dev Server Path

Instead of "C:\Windows\System32\inetsrv", go here: "C:\Program Files\Common Files\microsoft shared\DevServer\10.0".

Wednesday, June 15, 2011

Some Good Links on Testing in TFS

patterns & practices: Team Development with Visual Studio Team Foundation Server
http://tfsguide.codeplex.com/releases/view/6280

Visual Studio UI Automation Testing (includes CodedUI)
http://social.msdn.microsoft.com/Forums/en-US/vsautotest/threads

How to: Create a Coded UI Test
http://msdn.microsoft.com/en-us/library/dd286681.aspx

How to: Generate a Coded UI Test by Recording the Application Under Test
http://msdn.microsoft.com/en-us/library/dd286608.aspx

How to: Create a Data-Driven Coded UI Test
http://msdn.microsoft.com/en-us/library/ee624082.aspx

Creating and Running Unit Tests for Existing Code
http://msdn.microsoft.com/en-us/library/dd293546.aspx

How to: Create a Data-Driven Unit Test
http://msdn.microsoft.com/en-us/library/ms182527.aspx

Walkthrough: Using a Configuration File to Define a Data Source
http://msdn.microsoft.com/en-us/library/ms243192.aspx

Let's Build Windows Phone 7 Apps

Link
5836474332_e436d0f742.jpg

Tuesday, June 14, 2011

Client Network Utility

Checking 'Force protocol encryption' option in Client Network Utility allows new instance of SQL Server 2008 to start.

5835257772_c327acb43d.jpg

5835257794_806110ab14.jpg

Installing Windows Phone Developer Tools 7.1 Beta

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=77586864-ab15-40e1-bc38-713a95a56a05&displaylang=en

Free Pluralsight .NET Training - Introduction to WebMatrix

Pluralsight .NET Training - Introduction to WebMatrix
Learn from the experts how to use WebMatrix to build and customize web sites.
Course available at no cost for 48 hours through 6/15/2011.
http://www.pluralsight-training.net/microsoft/OLT/Course/Toc.aspx?n=webmatrix-introduction

Thursday, June 9, 2011

ILDASM.EXE Tool

Run the ildasm.exe tool to determine the framework version of c:\dlls\TOBEREPLACED.dll.

C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin>ildasm.exe c:\dlls\TOBEREPLACED.dll /meta[=MDHEADER] /text /noil

// Microsoft (R) .NET Framework IL Disassembler. Version 3.5.30729.1

// Copyright (c) Microsoft Corporation. All rights reserved.

// warning : THIS IS A PARTIAL DISASSEMBLY, NOT SUITABLE FOR RE-ASSEMBLING

// ================================= M E T A I N F O

Wednesday, June 1, 2011

Killer Combo: MacBook Pro + Virtual Box running Win 7 Ultimate

Now I can do iPhone and .NET development on the same machine. Sweet!

Missing Test DLLs

Added from:

C:\Program Files\Microsoft Visual Studio 9.0 Team Test Load Agent\LoadTest\Microsoft.VisualStudio.QualityTools.LoadTestFramework.dll
C:\Program Files\Microsoft Visual Studio 9.0 Team Test Load Agent\LoadTest\Microsoft.VisualStudio.QualityTools.WebTestFramework.dll

Wednesday, May 18, 2011

Setting up VS2010 External Tools for NUnit

5734219239_622187d42f.jpg

Free VS 2010 Video Training

http://www.pluralsight-training.net/microsoft/OLT/Course/Toc.aspx?n=vs2010-moreintro

Using Visual Studio well is about more than writing code, or reading code written by others. To be truly productive, you need to debug well, and understand the designers that help you build your user interface. This course also shows you how to add helpful extensions that make Visual Studio even better.

Thursday, May 12, 2011

Standard Windows Azure Rates

Standard Rates:

Windows Azure


  • Compute*




  • Extra small instance**: $0.05 per hour

  • Small instance (default): $0.12 per hour

  • Medium instance: $0.24 per hour

  • Large instance: $0.48 per hour

  • Extra large instance: $0.96 per hour



Virtual Network***


  • Windows Azure Connect - No charge during CTP



Storage


  • $0.15 per GB stored per month

  • $0.01 per 10,000 storage transactions



Content Delivery Network (CDN)


  • $0.15 per GB for data transfers from European and North American locations

  • $0.20 per GB for data transfers from other locations

  • $0.01 per 10,000 transactions



SQL Azure


  • Web Edition

  • $9.99 per database up to 1GB per month

  • $49.95 per database up to 5GB per month



Business Edition


  • $99.99 per database up to 10GB per month

  • $199.98 per database up to 20GB per month

  • $299.97 per database up to 30GB per month

  • $399.96 per database up to 40GB per month

  • $499.95 per database up to 50GB per month



AppFabric


  • Access Control




  • No charge for billing periods before January 1, 2012



Service Bus


  • $3.99 per connection on a “pay-as-you-go” basis

  • Pack of 5 connections $9.95

  • Pack of 25 connections $49.75

  • Pack of 100 connections $199.00

  • Pack of 500 connections $995.00



Caching****


  • 128 MB cache for $45.00

  • 256 MB cache for $55.00

  • 512 MB cache for $75.00

  • 1 GB cache for $110.00

  • 2 GB cache for $180.00

  • 4 GB cache for $325.00



Data Transfers


  • North America and Europe regions




  • $0.10 per GB in

  • $0.15 per GB out



Asia Pacific Region


  • $0.10 per GB in

  • $0.20 per GB out



Inbound data transfers during off-peak times through June 30, 2011 are at no charge. Prices revert to our normal inbound data transfer rates after June 30, 2011.

Windows Azure with MSDN Subscriptions

5713157535_0b6e87f23b.jpg

Installed Windows Azure SDK and VS 2010 Tools 1.4

5713498084_fd2d7680c3.jpg

Tuesday, April 12, 2011

Guestbook Sample App Solution Structure

Guestbook/
src/
...Java source code...
META-INF/
...other configuration...
war/
...JSPs, images, data files...
WEB-INF/
...app configuration...
lib/
...JARs for libraries...
classes/
...compiled classes...

Installed Google Plugins for Eclipse

5614028849_f4c9b9876c.jpg

New Course Silverlight 5 - FREE for next 24 hours (4/13)

New Course Silverlight 5 - FREE for next 24 hours
(free for 24 hrs starting Apr. 13, 2011!)

by Shawn Wildermuth

As the new version of Silverlight 5 has hit the interwebs, it's time for existing developers to learn what features can impact their projects. In this new course Shawn will show you the different areas of the new Silverlight 5 API's including: Data Binding changes, 3D support, performance improvements and elevated trust changes.

Watch What's new in Silverlight 5 FREE for the next 24 hours!
http://www.pluralsight-training.net/microsoft/olt/Course/Toc.aspx?n=silverlight5-new-features&utm_campaign=Newsletter&utm_medium=email&utm_source=VR

Tuesday, March 15, 2011

Pluralsight: "ReSharper Fundamentals" - Free for 48hrs!

ReSharper Fundamentals Training - Free for 48hrs!

by James Kovacs - Released 10 March 2011

In the new course, ReSharper Fundamentals James Kovacs provides an introduction to JetBrains' ReSharper, a developer productivity tool for Visual Studio. James covers browsing, code cleanup, refactoring, coding assistance, microcode generation, templating, and a grab bag of other useful features. Both new and long-time users of ReSharper can learn a wealth of productivity enhancing tips from this course.

Watch ReSharper Fundamentals free for the next 48hrs!
http://www.pluralsight-training.net/microsoft/OLT/Course/Toc.aspx?n=resharperfundamentals

Monday, February 28, 2011

Major Classic ASP to .NET Conversion Project Complete

Excited to say it's complete. Learned a lot through the process. Now moving on to the next project: eLetters and Search Tools.

Thursday, January 27, 2011