How Many King James Bibles Can You Store In SQL Server 2008

1GB = 1073741824
http://uk.answers.yahoo.com/question/index?qid=20060702023304AATvs3U

Bible in Characters: 3228076
http://wiki.answers.com/Q/How_many_letters_in_the_King_James_Bible

Hard Disk Size 500G: 536870912000

SQL Server Hard Disk Space 3.6G: 3865470565
http://msdn.microsoft.com/en-us/library/ms143506.aspx

Sophos Anti Virus 500 MB: 536870912
Sophos Firewall 100 MB: 107374182
http://www.sophos.com/en-us/products/endpoint/endpoint-protection/components/anti-virus-protection/windows/system-requirements.aspx
Windows XP 1.5GB: 1610612736
http://support.microsoft.com/kb/314865

Windows XP Service Pack 3 1230 MB: 1320702443
http://support.microsoft.com/kb/947311

Bytes Remaining: 529429881162

Bible Count: 164007

Twitter4j Twitter OAuth Example

Today I’m going to show you some sample code regarding how to send a tweet to twitter using twitter4j and OAuth. The following code example is a command line twitter client that authenticates a user with oAuth and allows them to post a tweet.

All you need to to create a project in your favourite IDE.. for ease of use. Add the twitter4j library to your build path. Compile and run. If you run into any problems shoot them into the comments and I’ll lend a hand. Happy hacking.

Read More

Convert One Generic List to Another Generic List c#

So I came across a need to create a base class that accepted two generics one would be a concrete class and the other would be the interface to that class. The reason for the need to include both as generics is that I was delegating my concrete implementation to Windows Azure.

So, Azure will use my concrete class to store my data and I will retrieve it and pop it into my interface. A problem came up where I could not convert a list of one generic type (concrete) to another (interface).

However I have just discovered a way to convert between two generic lists. What this means is that I can tell azure about my concrete class and it will go ahead and persist my data to the cloud. At the same time I can also expose only the Interface of my concrete implementation to the rest of the system. This means that I can keep all of my instantiation safe and sound in factories where they belong, and also in Azure. 🙂
Read More

Simple Introduction to HTML5 Local Storage API

Okay, so if you not looking into HTML5 your letting the biggest movement in web application development since the introduction of CSS pass you by. In this simple example you can see how an object can be stored into your HTML5 compatible browsers localStorage.

Try this, copy and paste the following code to a simple HTML file and save it onto you desktop. Open it in Chrome or Firefox 4 or Opera. Then, edit the Hello World text. The HTML5 contentEditable=”true” allows the containing element to be editable. This is a really nice attribute that makes textarea redundant in an AJAX app, in my opinion.

Read More

Using Python to determine if a number is whole or decimal

Introduction

In this example you will learn how to create a Python application that will determine if a given number is whole or decimal.

Step One: Download Python

Python is a cool language. Like Ruby it’s very simple to use. You can download it from the python site. Choose your version, download, install and move onto step two.

Step Two: Simple Python Function

Python functions are defined using the def keyword. In this example we define an isWhole function to check weather the number entered by the user is whole or not.

Code:

def isWhole(x):
	if(x%1 == 0):
		return True
	else:
		return False

You’ll notice that after the function definition there is a colon and there are no semi colons at the end of lines. This is because indention is used to perform code blocks. Using indented code blocks, it is thought, will make the code easier to read.

Read More

One Way Tweet a Java App

One way tweet is a sending application for twitter. In this tutorial you will see/learn how to send stuff to twitter by writing a java desktop UI. You will create a new project in NetBeans and choose java application, and create a new package called org.me.owt.

Then, create a new java source file and call it main.java, and another called tweet.java. Two simple classes and you’ve got yourself a twitter client. The end result will look like this:
One Way Tweet
Read More