Archive for the ‘Reference’ Category

My Name is David M. Auble, and I Oppose SOPA

Wednesday, January 18th, 2012
STOP SOPA

STOP SOPA

This is important — I’m sure you’ve heard a little bit about SOPA (Stop Online Piracy Act), but I think it’s important to stand out against it.  If you search anything on Wikipedia today, you’ll not be allowed to view the results.  Instead, you’ll be automatically redirected to a page asking for your zip code to contact your state representatives and tell them you are against SOPA.

It’s important to oppose SOPA because to summarize it, webmasters would be in charge of filtering EVERY bit of information posted to their sites.  For small companies, this would be a tremendous task, as they’d have to filter all comments, posts, or bulletins before being displayed online.  This would in turn cut into company budgets, due to having to hire someone full time to monitor the information.  On a larger scale, websites such as YouTube, Google, Facebook, Twitter and Wikipedia, would be responsible for filtering every post that’s made.  This would create a hassle, as a team of people would have to moderate every single post/comment.  With thousands of Twitter messages, Facebook status updates, and videos uploaded to YouTube every second, you can see how this can begin to be a BIG issue, and a big bottleneck for most websites.

It’s important let everyone know that you oppose SOPA.  We have several late-aged men and women making decisions about how the Internet is being formed and how it “should” be managed, instead of letting the youth dictate how information should be shared.  It’s no secret that the world’s youth download/share music/videos/media in an illegal manner.  It’s the same as recording a song to a cassette tape from the radio.  The government and other agencies will never be able to stop people from breaking the law — it’s simply impossible.

SOPA is affecting your freedom of speech, in the digital format.  Although the principle of regulating what is shared online is a good idea on paper, SOPA has been developed for all the wrong reasons.  Voting begins on January 24th, 2012, so it’s imperative everyone speak up!

For more information, look at Google’s “Doodle” today — you’ll see that the Google logo has been censored.  Do a search on Wikipedia — you’ll be surprised at what you may find.. or won’t find.

If you oppose SOPA, please sign the petition below:

https://www.google.com/landing/takeaction/

My name is David M. Auble, and I oppose SOPA.

http://en.wikipedia.org/wiki/E46

http://en.wikipedia.org/wiki/Stop_Online_Piracy_Act

Please feel free to pass this post on to anyone and everyone you know.  People need to know and be educated about SOPA and the real threat it can be.  Watch more information:

Review: HTC Inspire 4G

Friday, March 25th, 2011

Over the past couple of months, I’ve had a new toy to play with: a new phone from AT&T, the HTC Inspire 4G.  This is one of AT&T’s first 4G phones, although their network doesn’t fully support 4G speeds yet.  Using the HSUPA+ speeds for now, it is one of the fastest devices AT&T offers.

Design:
Boasting a brilliant 4.3″ WVGA screen with a 480×800 screen resolution, there is plenty of screen to view everything you could imagine on a smartphone.  It’s your typical candybar  type phone, however is much thinner than most phones I’ve seen.

HTC Inspire 4G screen

HTC Inspire 4G screen

HTC Inspire 4G thickness

HTC Inspire 4G thickness

Performance:
Boasting a 1GHz processor, the HTC Inspire 4G seems to be plenty fast.  With the 2.2 Froyo operating system, the Inspire 4G multitasks much nicer than the iPhone 4.  It has 768MB of RAM, which is more than most phones available from retailers.

Hardware:
The Inspire 4G is pretty tricked out with faster hardware than most other devices available on the market.  As mentioned previously, it has a 1GHz processor, 786MB RAM and 4GB ROM.

Battery:
This is my favorite part of the phone.  The battery life is amazing.  With the Froyo update, I can easily leave WiFi, Bluetooth and GPS on all day and still have approximately 70% battery remaining by 5pm.  By listening to internet radio on WiFi, I can usually have 50% remaining at the end of the day.  Texting, surfing and calls are kept to a minimum, which I usually send/receive a few text messages, receive 30 emails and talk for approximately 5 – 10 minutes each day.  I can comfortably stay unplugged for 12 – 15 hours.

Pictures:
Coming from an iPhone 4 and being used to a phone with a 5MP camera, I figured this camera would be much nicer, seeing how it boasts an 8MP camera.  It has two built-in LED flash strobes which are surprisingly bright.  During the day, the pictures come out pretty crisp and clear, as seen below:

HTC Inspire 4G picture, in daylight

HTC Inspire 4G picture, in daylight

In dimly lit conditions, the camera begins to lack, as seen here:

HTC Inspire 4G picture in dim light

HTC Inspire 4G picture in dim light

The camera has a built in auto-focus feature, where you can tap anywhere on the screen and set the auto focus point.  This works very well, yet it can still be difficult to get a crisp picture.

Video:
Video playback is smooth.  YouTube videos and other web videos appear sharp and load quickly, whether on WiFi or  on HSUPA+.  The YouTube app launches quickly, whether surfing the web, or from another app such as Facebook.

Audio:
The back of the phone says it has Dolby Mobile audio, yet it sounds like any other phone.  I’ve found it a bit difficult to hear the phone when it’s in my jacket pocket, or when I’m driving in the car with the sunroof open.  Other than that, in most situations, it’s easy to hear and plenty loud.  The speaker in which one listens to voice calls could definitely use a volume tweak — I’m constantly finding myself wanting to turn it up louder.

Dual LED flashes and Dolby Mobile audio

Dual LED flashes and Dolby Mobile audio

Apps:
Being an Android phone, there is a large amount of apps available on the App Market.  You can find an app for anything, and now that mobile app development has taken off, it’s easy to find an app for just about anything.

Conclusion:
Of the phones that AT&T now offers, I think this is by far the best Android phone.  I’ve had experience with the HTC Aria, but liked this phone much more.  I’m now used to the massive 4.3″ screen and am getting used to it, although I would prefer to have something a bit smaller.  Since the phone is so thin, it does not take up much space in a pocket, however, it does tend to slide out of jacket pockets easily.  The case seems to be durable, however it is a bit slick and can slide out of your hand easily.

Overall, I’m happy with the phone and the features it offers.  HTC has done a magnificent job bringing this to AT&T.  Let’s just hope AT&T releases their 4G network soon, and that it’s reliable.

Using PHP to Connect to a Microsoft Access Database

Sunday, March 20th, 2011

Recently, I had an opportunity to try something I hadn’t done in a while: develop a dynamic website in PHP.  Using .NET 95% of the time, I jumped on the opportunity.

The project was simple: simple data I/O, quick search and a dictionary of items in the database.  It’s a pretty straight forward project, so I took my laptop to the nearest Starbucks and got to work.  I had no idea what I was getting myself into.  I was given a database file that had been created in Microsoft Access.  I didn’t think too much, as I could upload it to a private server I manage and pull from it.  After an hour of searching on the Internet, I realized it wasn’t going to be as simple as I had thought.

So, to save everyone a bit of time, here’s a brief tutorial as to how to use PHP to connect to an Access database and return records.


< ?php

// list most recent beer here
$sql = "SELECT TOP 5 TableId,RowName FROM TableName ORDER BY TableId DESC";

$conn = new COM("ADODB.Connection") or die("Cannot start ADO");
$connString= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=path\\to\\your\\database.mdb";

$conn->Open($connString);

$rs = $conn->Execute($sql);

while (!$rs->EOF)
{
$fv1 = $rs->Fields("TableId");
$fv2 = $rs->Fields("RowName");
echo  "<li><a href='/results.php?page_id=$fv1'>" . "$fv2</a></li>";
$rs->MoveNext();
}

$rs->Close();

?>

So there you have it.  Each time you want to ping the database, you cannot simply include a connection file at the top of each page, then close it at the bottom, but rather, you must open the connection, declare the data source, then close the connection each time.  This presents a bit more work and a bigger hassle, I think, but it can be done.

Have you ever needed to use PHP to connect to an Access database?  If so, maybe this will help.  I’m open to suggestions, so if you have any tips or recommendations, please inform me!

HTML5, Web Video and VideoJS

Tuesday, January 4th, 2011

Now that the new year is here, I’ve decided to make a few resolutions — resolutions not only for my personal satisfaction, but also some of my programming abilities. One of these is I would like to dive head-first into the world of HTML5 and CSS3. I’ve been approached several times about my knowledge on these topics and unfortunately, have had to turn away. Not anymore.

Enter VideoJS.  VideoJS is an outstanding player that’ll not only play the videos in the standard HTML5 formats (OGG, OGV, MP4, WebM), but if the browser doesn’t support HTML5, it will automatically change to a Flash embedded video.  This is an outstanding plugin, and my hat goes off to the developers.

Enough talk, let’s see this thing in action.


Take note as to how the video is rendered.  If you’re in Firefox, Safari, Opera or Internet Explorer, it should render as a Flash video.  If you’re on an iPad or iPhone, it should play, using the MP4/H.264 codec.  If you’re using Chrome, it should play as an HTML5 video, since it uses the HTML5 <video> tag.  If, for some reason you do not see this video, please let me know so I can look into why it is not working properly.

I have noticed a few problems with this new way of handling videos online. First, the new file formats drastically increase the file size. The files of these videos are ranging from 13MB for the MP4 and an outrageous 43MB for the OGV file. Because of this, the files take a fair amount of time to play. Granted, I may not be using the best encoders to convert my videos, and this video was shot in 720p. The fact that still remains is the files are huge.

This all brings up a big question.  What is the best browser that’ll support all of this?  I suppose the answer is Chrome, seeing how it displays much of the new HTML5/CSS3 standards pretty well.  I’m a die-hard Firefox fan, so I won’t be changing any time soon.  HTML5 will be around for a while and still hasn’t caught up to the popularity of Flash-based video.. yet.  I think there’s great potential in Firefox4, but without having tested it out, I’m not sure of it’s capabilities as of yet.

I’m not an expert at any of this by any means, these are just my opinions and I’m still learning. Feel free to leave some comments and/or insights on this topic. I’m hoping to generate a little bit of feedback, in order to learn more.

Implementing WordPress Posts in Your Website

Thursday, December 23rd, 2010

As you have seen, I have the three most recent posts from my WordPress blog on my homepage.  If you use your own blogging software, or build your own blog, this can be done differently.  This tutorial just shows how to pull your WordPress feed in two languages, PHP and ASP.NET.

PHP:

<ul>
< ?php
// Include WordPress
define('WP_USE_THEMES', false);
require('/path/to/your/blog/loader/wp-load.php');
query_posts('showposts=3'); // number of posts to display
?>

< ?php while (have_posts()): the_post(); ?>
<li><a href="<?php the_permalink(); ?>">< ?php the_title(); ?></a></li>
< ?php // the_excerpt(); ?>
< ?php endwhile; ?>
</ul>

Essentially, what this does is load your wp-load.php file, generated by WordPress. It grabs all your database information, then uses the built-in functions to display the posts. Simple data validation is completed, as it checks if there are any posts. Finally, it creates a <li> element and links to each blog post.

With ASP.NET, it’s a bit different. I’ve found it best to use a .NET control that parses the RSS feed, the RSS Toolkit for ASP.NET.

ASP.NET:
Step 1: Add new item to your project:
Step 1 - Add New Item

Step 2: Drag control to your page, then select ‘New Data Source’ from the drop down list:
Add control to page

Step 3: Specify data source as RssDataSource:
Add RssDataSource

Step 4: In the pop up dialog box, type in the address to your feed:
In the pop up dialog box, type in the address to your feed

Step 5: Choose which properties you wish to use:
Choose which properties you wish to use

Step 6: Code:

<asp:datalist ID="DataList1" runat="server" CellPadding="4" DataSourceID="RssDataSource1" ForeColor="#333333">

<itemtemplate>

<asp:hyperlink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("link") %>' Text='< %# Eval("title") %>'></asp:hyperlink>

</itemtemplate>

</asp:datalist>

<rsstoolkit:rssdatasource id="RssDataSource1" runat="server" url="http://weblogs.asp.net/scottgu/Rss.aspx">

</rsstoolkit:rssdatasource>

Step 7: Final output:
Final output

Special thanks to Scott Gu, for this how-to tutorial. I’ve used it and it works well. I am not claiming this code to be mine, rather his work. I take no credit to this code and give all credit where it’s due.

Hopefully, this helps a bit displaying some of your WordPress posts on your website. In my next couple of posts, I’ll be teaching how to implement other commonly used features to your website.