Apricot – A Short Film by Ben Briand

APRICOT — A Short Film by Ben Briand from Moonwalk Films on Vimeo.

Winner of Community Choice Award
Voted Best Narrative on Vimeo by it’s users
Written & Directed by Ben Briand
www.benbriand.com
twitter.com/ben_briand

Produced by Matt Dooley, Michele Bennett, Alexis Bensa, Gaspard Chevance
www.moonwalk-films.com, www.cherubpictures.com.au

Cast: Ewen Leslie, Laura Gordon, Alice Zahalka, Joshua Rozzi
Music: www.basilhogios.com.au

How To – Get Your Mac Address

Background Knowledge


A MAC address is a unique identifier assigned to network interfaces (network cards/NICs) for network communications. For the most part we don’t need to know what the MAC address is but at times it is necessary to know for instance when one wants to create a DHCP reservation.

Solutions


Note: In each solution one must know what your network interface device name is, in order to get the correct MAC address .

Linux/Unix – Command Line

Using the following command look under the network interface device name and just after “HWaddr” you will see your MAC address.

1
# ifconfig

The alternative would be using the following series of command to only return the MAC address for a given network device name.

1
# ifconfig eth0 | grep HWaddr | awk '{print $5}'

Linux (Debian/Ubuntu) – GUI

  1. Go to the menu Applications > System Tools > Network Tools.
  2. Under the “Devices” select a “Network device”.
  3. Under Interface Information you will see the MAC address after “Hardware address”.

Windows NT/2000/ME/XP/Vista/7 – Command Line

After running the below command look under the network device name and then just after “Physical Address” you will see the MAC address.

1
ipconfig /all

Windows 7 – GUI

Open the Network and Sharing Center > Local Area Connection > Details > Physical Address.

Mac OS X – GUI

  1. Go to “System Preferences…” from the Apple menu.
  2. Then select “Network.”
  3. Double-click on “Airport” or “Built-in Ethernet” depending on how you access the Internet/network.
  4. Your MAC Address will be shown under “Airport ID” or “Ethernet ID”.

Mac OS X – Command Line

Use the same method shown above under “Linux/Unix”.

Source: Wikipedia – MAC address
Source: Working with MAC addresses
Source: How to Find the MAC Address of Your Computer

How To – Read Outlook 2007/2010 Emails Messages in Plain Text

Background


This how to will explain how to view all email messages in plain text format, how to convert an HTML formatted email message to plain text format and how to convert an email in plain text to HTML while using Microsoft Outlook 2007/2010.

Solution – View All Emails in Plain Text


  1. In the menu/tab left mouse click on the “File”.
  2. Left mouse click on “Options”.
  3. Left mouse click on “Trust Center” and then “Trust Center Settings” button towards the right.
  4. On the left hand side left mouse click on “E-mail Security”.
  5. Under the heading “Read as Plain Text” left mouse click to place a check mark on “Read all standard mail in plain text” and “Read all digitally signed mail in plain text”.

Each time you view an email message no matter what the format is the message will be viewed in “plain text”.

Solution – Compose/New Email – Chang Email Format


  1. Create/compose a new email message.
  2. Under the menu “Format Text” left mouse click on the desired email format, “HTML”, “Plain Text” or “Rich Text”.

Solution – While Viewing an Email Change from Plain Text to HTML


  1. Open an email message.
  2. In between the menu/ribbon bar and “From” you may see an message “This message was converted to plain text”. Left mouse click on this message and then click on “Display as HTML”.

Source: Read e-mail in plain text
Source: How to Convert Plain Text Email Messages to HTML

How to – Turn on Line Numbers in Visual Studio/Express 2010

Background Knowledge


This applies to Microsoft Visual Studio/Express 2010 and as far as I know 2008 as well.

Solution


  1. Go to the menu “Tools” -> “Options”.
  2. In the Options dialog go to “Text Editor” -> “All Languages” or pick a specific language.
  3. On the right hand side under “Display” place a checkmark on “Line Numbers”.
  4. Click on the “OK” button.

Example of a Basic ODBC (MSSQL Server) Query using PHP

An example of a basic ODBC (MSSQL Server/DSN-Less) query using PHP.

Example of Result Set Returning One Row

1
2
3
4
5
6
7
8
9
$szDBConn="DRIVER={SQL Server};SERVER=SQLServerNameHere;DATABASE=DatabaseNameHere";
$szDBUsername="UsernameHere";
$szDBPswd="PasswordHere";
$szDBQuery="SELECT FooBar, Foo_Bar, Foo_ID FROM FoobarSubscribers WHERE FooID=777";
$rDBConnect = odbc_connect($szDBConn, $szDBUsername, $szDBPswd);  
$rDBRes = odbc_exec($rDBConnect, $szDBQuery);
$szLastCheck = odbc_result($rDBRes, "LastCheck");
odbc_free_result($rDBRes);
odbc_close($rDBConnect);

Example of Result Set Returning Multiple Rows in an Object

1
2
3
4
5
6
7
8
9
10
11
12
13
14
$szDBConn="DRIVER={SQL Server};SERVER=SQLServerNameHere;DATABASE=DatabaseNameHere";
$szDBUsername="UsernameHere";
$szDBPswd="PasswordHere";
$szDBQuery="SELECT FooBar, Foo_Bar, Foo_ID FROM FoobarSubscribers";
$rDBConnect = odbc_connect($szDBConn, $szDBUsername, $szDBPswd);  
$rDBRes = odbc_exec($rDBConnect, $szDBQuery);
while($obRows = odbc_fetch_object($rDBRes))
{
	print $obRows->ColumnName1."<br />";
	print $obRows->ColumnName2."<br />";
	print $obRows->ColumnName3."<br />";
}
odbc_free_result($rDBRes);
odbc_close($rDBConnect);

Example of Result Set Returning Multiple Rows in an Array

1
2
3
4
5
6
7
8
9
10
11
12
13
14
$szDBConn="DRIVER={SQL Server};SERVER=SQLServerNameHere;DATABASE=DatabaseNameHere";
$szDBUsername="UsernameHere";
$szDBPswd="PasswordHere";
$szDBQuery="SELECT FooBar, Foo_Bar, Foo_ID FROM FoobarSubscribers";
$rDBConnect = odbc_connect($szDBConn, $szDBUsername, $szDBPswd);  
$rDBRes = odbc_exec($rDBConnect, $szDBQuery);
while($saRows = odbc_fetch_array($rDBRes))
{
        print $saRows['ColumnName1'];
        print $saRows['ColumnName2'];
        print $saRows['ColumnName3'];
}
odbc_free_result($rDBRes);
odbc_close($rDBConnect);

Comments/description of Example

Line #1
Database connection string to define the driver, server host name and database name.
The “server host name” is the server name or IP address of your database server. If your host has multiple instances the “host” value would be formatted like so “foo\bar”. If your using SQL Server Express the “host” name locally would be “.\SQLEXPRESS”.
Line #2-#3
Database login credentilas; username and password.
Line #4
SQL query.
Line #5
Connect to the database defined by Line #1, Line #2 and Line #3.
Line #6
Prepare and execute an SQL statement.
Line #7
Fetch results returned back from the SQL statement. I use a while loop to enumerate through each row of results returned. If you know only one row is going to be returned the while loop is not necessary.
odbc_free_result()
Close database connection.
odbc_close()
Close database connection.