Divx Player with USB Input

On October 31, 2008, in DVD Player, Product Review, by ryelpango

OK, so you got a whole lotta movies in Divx format. You got it all saved in one large hard drive possibly categorized into multiple subdirectories. You’re sick and tired of watching your collection through your PC, and you want to watch it on the “big screen”. Well, you got a number of options:

  1. If you got an XBOX 360, connect it through the internet, then update XBOX LIVE so you can play Divxs. Plug your external hard drive to the 360 via USB, and away you go.
  2. Plug your PC/laptop via VGA, if your TV supports it.
  3. Get yourself a Hard Drive with a built-in Media Player.
  4. Get yourself a dvd player that support most video formats (including divx of course) that’s equipped with a USB port (supporting USB 2.0).

Higlander Divx Player + External HDDI’ve actually tried all 4 options. I’d say the best option would probably be option 4. I also highly recommend the Highlander HDMI DVD DivX Player. It’s cheap, fully functional, and supports a wide range of video formats. Here’s a run down of all it’s features:

  1. Highlander HDMI DVD Player – Multiregion
  2. 5.1 Channel MPEG-4/DiVX /HDMI DVD Player
  3. Region free
  4. Loader: Sanyo HD65
  5. Solution: MTK 1389HD
  6. Support DVD-R/DVD/VCD/HD-CD/CD-R/MPEG-4/DiVX/HDMI
  7. Support Multilingual Dialogue (up to 8 tracks) and subtitle
  8. Support NTSC/PAL playback
  9. 4x Zooming Playback
  10. Full function Remote Control
  11. Onscreen Display, Parental Control
  12. Selectable Screen Aspect Ratio (4:3 & 16:9)
  13. Dolby AC-3 5.1 Channel Audio Output
  14. Composite Video, S-Video Output
  15. Programmed/Repeat Play Remote Control
  16. Accessories: AV Cables and Remote Control

Pros:

  1. Great quality video through HDMI or Component input
  2. Zoom Playback
  3. USB and SD card input

Cons:

  1. It’s got a wide case and it’s not pretty
  2. Can’t seem to turn off the zoom onscreen display when zooming in
  3. 8 character file name limit makes it hard to determine which video to select
  4. Setting up component display requires connection via RCA first
  5. If you accidentally press reset on your remote control then it restores settings to factory default. This means that you have to hook up your device via RCA in order to switch the display to component

Higlander Divx Player + External HDD CloseupI’d give this device a 7.5/10. For its price and functionality, I’d push that up to 8/10. You can get more information about the product by going here:

http://www.dealsdirect.com.au/p/highlander-hdmi-dvd-divx-player/

Tagged with:
 

Hands up who thinks “captcha”, an image based challenge-response test to ensure a response is not generated by a computer, is a big pain in the butt and you’re sick and tired of seeing it in every web form. Not only is it obstructive but most of the images are very difficult to decipher.

Well, an alternative to “captcha” is a well place hidden variable within a web form containing a random number. It doesn’t require user intervention so it’s seamless which would mean that your customers are less annoyed. It acts like a simple redundancy check which effectively identifies if the web form was submitted from the server, and not remotely invoked through a “page scrape” copy. If the web form was submitted from a remote copy, which is how most “robot” processes operate, then the form is not processed.

The example form below is a simple “contact us” page and it implements the hidden variable redundancy check. Make sure that you insert your own code in the following comment block:

'**************************************************************************************
'* Insert code here to post the message
'* Eg. Insert message in a database or send message to your email address
'**************************************************************************************

Save the following code as contact.asp:

<%
  '**************************************************************************************
  '* Store the FORM PASSWORD session value in MESSAGE_PASSWORD variable
  '**************************************************************************************
  MESSAGE_PASSWORD = Session("FORM_PASSWORD")

  v_error = ""
  if Request("posted") = 1 then
    name = Request("name")
    email = Request("email")
    message = Request("message")

    ' Validate web form values
    if name = "" then
      v_error = v_error & "Please enter your name<br />"
    end if
    if validateEmail(email) = false then
      v_error = v_error & "Please enter a valid email address<br />"
    end if
    if message = "" then
      v_error = v_error & "Please enter your message<br />"
    end if

    if v_error = "" then

      if CInt(Request(MESSAGE_PASSWORD)) = CInt(MESSAGE_PASSWORD) then
        '**************************************************************************************
        '* Insert code here to post the message
        '* Eg. Insert message in a database or send message to your email address
        '**************************************************************************************

        Response.write "Your message was sent to us successfully. We will respond to you within 24 hours of receiving this message."
        message = ""
      end if
    end if
  else
    '**************************************************************************************
    '* Generate new FORM PASSWORD value and store it in session variable
    '**************************************************************************************
    Session("FORM_PASSWORD") = randomNumber
    MESSAGE_PASSWORD = Session("FORM_PASSWORD")
  end if
%>
<h1>Contact Us</h1>
<p>Please enter your query in the message text area below</p>
<%
if v_error <> "" then
  Response.write v_error
end if
%>
<form action="contact.asp" method="post">
<table border="0" cellpadding="0" cellspacing="2">
  <tr>
    <td class="tdhead">name</td>
    <td class="spacer" />
    <td><input name="name" id="namefield" class="textbox" type="text" size="38" maxlength="50" value="<%= name %>" /></td>
  </tr>
  <tr>
    <td class="tdhead">email</td>
    <td class="spacer" />
    <td><input name="email" class="textbox" type="text" size="38" maxlength="50" value="<%= email %>" /></td>
  </tr>
  <tr>
    <td class="tdhead">message</td>
    <td class="spacer" />
    <td><textarea name="message" rows="5" cols="40" class="textbox"></textarea></td>
  </tr>
  <tr>
    <td colspan="2" />
    <td>
      <input type="hidden" name="posted" value="1" />
      <input type="hidden" name="<%= MESSAGE_PASSWORD %>" value="<%= MESSAGE_PASSWORD %>" />
      <input type="submit" value="Send Email" class="textbox2"  />
    </td>
  </tr>
</table>
</form>
<script type="text/javascript">
  if (document.forms.length > 0)
    if (document.forms[0].elements.length > 0)
      document.forms[0].elements[0].focus();
//-->
</script>

<%
'**************************************************************************************
'* Common functions
'**************************************************************************************

'**************************************************************************************
'* validateEmail
'* -------------------------------
'* Returns true if email is well formed, false otherwise
'**************************************************************************************
Function validateEmail(sCheckEmail)
  Dim sEmail, nAtLoc
  validateEmail = True
  sEmail = Trim(sCheckEmail)
  nAtLoc = InStr(1, sEmail, "@") 'Location of "@"

  If Not (nAtLoc > 1 And (InStrRev(sEmail, ".") > nAtLoc + 1)) Then
    '"@" must exist, and last "." in string must follow the "@"
    validateEmail = False
  ElseIf InStr(nAtLoc + 1, sEmail, "@") > nAtLoc Then
    'String can't have more than one "@"
    validateEmail = False
  ElseIf Mid(sEmail, nAtLoc + 1, 1) = "." Then
    'String can't have "." immediately following "@"
    validateEmail = False
  ElseIf InStr(1, Right(sEmail, 2), ".") > 0 Then
    'String must have at least a two-character top-level domain.
    validateEmail = False
  End If
End Function

'**************************************************************************************
'* randomNumber
'* -------------------------------
'* Generate random number
'**************************************************************************************
Function randomNumber
  Randomize timer
  Dim rndNum
  ' Randomizing the timer function
  rndNum = abs(int((rnd() * 3001)))
  ' To generate a prime based, non-negative random number..
  rndNum = rndNum + 53
  randomNumber = rndNum
End Function
%>

Some comments about the code:

When the form is first requested it generates a random number which acts like a form password.

    '**************************************************************************************
    '* Generate new FORM PASSWORD value and store it in session variable
    '**************************************************************************************
    Session("FORM_PASSWORD") = randomNumber
    MESSAGE_PASSWORD = Session("FORM_PASSWORD")

This password is stored in a session variable as well as in the form as a hidden item with the same name and value, being the password itself.

  '**************************************************************************************
  '* Store the FORM PASSWORD session value in MESSAGE_PASSWORD variable
  '**************************************************************************************
  MESSAGE_PASSWORD = Session("FORM_PASSWORD")

      <input type="hidden" name="<%= MESSAGE_PASSWORD %>" value="<%= MESSAGE_PASSWORD %>" />
 

When the form is submitted the session value and form value is compared, and if they match then the form is processed.

      if CInt(Request(MESSAGE_PASSWORD)) = CInt(MESSAGE_PASSWORD) then
        '**************************************************************************************
        '* Insert code here to post the message
        '* Eg. Insert message in a database or send message to your email address
        '**************************************************************************************

        Response.write "Your message was sent to us successfully. We will respond to you within 24 hours of receiving this message."
        message = ""
      end if

That’s it! Happy coding!

This is a hack that worked for me on several occasions. Our development environment was upgraded to Oracle ApEx 3.1, but for whatever reason, our production environment was not (it’s still sitting on the previous version ApEx 3.0). Our server administrator wouldn’t allow the upgrade on production because of a “bug” with ApEx 3.1. He didn’t really elaborate on what that bug was, but anyway, as a developer, I needed to deploy new pages to our production environment.

To import an Oracle ApEx 3.1 Page Export into an ApEx 3.0 application, do the following:

1. Export the page from the ApEx 3.1 software.

2. Using a reliable text editor, modify the page export and replace any references to the original application ID to the app ID of the application you want to import to (replace xxx with the new application ID):

prompt  APPLICATION xxx - APP V5.6

   -- SET APPLICATION ID
   wwv_flow.g_flow_id := xxx;

3. As specified in the following thread http://forums.oracle.com/forums/thread.jspa?messageID=2380177, modify the following in the page export:

in the command

wwv_flow_api.create_page(
remove this line:
p_include_apex_css_js_yn=>’Y',
\– \————————————————————-
in the command
wwv_flow_api.create_page_plug (
after the line
p_plug_caching=> …….
add
p_required_patch=> ” + wwv_flow_api.g_id_offset,
\– \————————————————————-
everywhere you find the command
wwv_flow_api.create_report_region (
remove line
p_ajax_enabled=> ‘N’,

In the command
wwv_flow_api.create_flow(
Remove the following line
p_date_format => ‘DD-MON-RR’,

Replace All Occurences of
PICK_DATE_USING_APP_DATE_FORMAT
With
PICK_DATE_DD_MON_RR

Replace All Occurences of
HIDDEN_PROTECTED
With
HIDDEN

In the command
wwv_flow_api.create_report_region (
Delete the following lines
p_prn_content_disposition=> ‘ATTACHMENT’,
p_prn_document_header=> ‘APEX’,
p_prn_width_units=> ‘PERCENTAGE’,

4. Import the modified file using the Export/Import utility in ApEx 3.0, remember to specify “Application, Page or Component Export” as the file type.

5. Edit the page in Application Builder page editor and restore the following: Region Templates, Button Templates, and List Types, and whatever item attribute that may have dropped off because it doesn’t exist in the meta data of the new application.

That should be it. Cumbersome, I know, but trust me, it’s a lot quicker than recreating the page in the new application.

By the way, I’ve written a utility that converts Oracle ApEx 3.1 application package exports to 3.0. You can access the utility here http://www.technologydribble.info/convert-oracle-apex3.1-package-to-3.0.asp. It should also work for converting page exports, no problems.

Tagged with:
 

Dynamic Website PR Images

On October 6, 2008, in Dynamic PR, website marketing, by ryelpango

Dynamic PRWeb Backlinks Dynamic PR is a FREE service for website owners who want to show website PR images dynamically on their website. The website PR image shows the current google page rank for the given page. Dynamically display website PR images in your site NOW by including the html code in the text box below, no sign up necessary.

<img src="http://pr.web-backlinks.com/pr.php?domain=[DOMAIN]" />

Replace [DOMAIN] with the site you want to display the PR image for, for example:

<img src="http://pr.web-backlinks.com/pr.php?domain=google.com" />

For more information and details about conditions of use, please visit our dynamic PR home page at http://pr.web-backlinks.com

Configuring PHP in Apache

On October 6, 2008, in Apache, PHP, by ryelpango

To enable PHP in Apache you need to do the following.

You need to tell PHP the root directory of Apache ie. In PHP.INI change the doc_root variable so that it holds the root directory of Apache:

Change PHP.INI (Usually located in [DRIVE]:\PHP\) entry for doc_root:

doc_root = "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs"

Add the following lines in HTTPD.CONF (Usually located in [DRIVE]:\Program Files\Apache Software Foundation\Apache2.2\conf\):

ScriptAlias /php/ "C:/Program Files/PHP/"
AddType application/x-httpd-php .php .php5
Action application/x-httpd-php "/php/php-cgi.exe"
SetEnv PHPRC "C:/Program Files/PHP"

DirectoryIndex index.html index.php

Remove deny all from the following entry in HTTPD.CONF:

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

So that the new entry looks similar to:

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
</Directory>

That’s it… Happy coding!

Tagged with: