r3dux.org

A number-pimping side project from the valleys in *NEW* upside-down flavour.

  • Home
  • ABOUT
  • OLD SITE
  • SEARCH
  • FEEDBACK

An introduction to ActionScript 3.0 – week 5

r3dux | April 25, 2011

Week 5 of the ActionScript intro is a practical exercise-writin’ affair with lots of assistance provided. When I first delivered this material last year I wanted to stop talking about programming and get the students actually using ActionScript and getting the hang of writing and debugging their code, so I switched from slides to A4 hand-outs with exercises. Unfortunately, many of them hadn’t had enough practice or paid enough attention in class, so for the second class I wrote a document explaining where many students were going wrong when attempting the exercises in class – how to correctly use brackets, functions with/without parameters and return types, pushing and popping data to/from arrays etc.

In this bundle, I’ve reversed the order so that Lesson 1 is the “where-did-I-go-wrong” part, and Lesson 2 is the exercises to try out your ActionScript skills – feel free to take on the exercises first if you’re feeling confident.

Introduction to ActionScript 3 - Week 5

Download link: An Introduction to ActionScript 3.0 – Week 5 (both lessons combined)
Audience: Beginners who know a little about variables, functions, objects and how to perform some basic programming math.
Format: PDF
Content License: This material is released under a creative commons non-commercial attribution share-alike 3.0 license by me (r3dux) and come with no guarantee of correctness, fitness for purpose or anything of the sort.

Feedback, as always, is very welcome.

Comments
No Comments »
Categories
Coding
Tags
ActionScript, Arrays, BODMAS, Exercises, Flash, Functions, Math, Objects, Sticking Points
Comments rss Comments rss
Trackback Trackback

Dust Junkys – What Time Is It?

r3dux | April 19, 2011

!! 90′s feel-good rap/jam alert !!

YouTube Preview Image

Love that track – just wished I’d managed to get hold of the special edition Done and Dusted/Dub and Dusted double album!

Update: Bah, video won’t embed & play without clicking through to YouTube itself, so have a far higher quality audio version instead:

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Comments
No Comments »
Categories
Music
Tags
Done and Dusted, Dub and Dusted, Dust Junkys, MC Tunes, What Time Is It?
Comments rss Comments rss
Trackback Trackback

Help scrape Google Video before it’s gone forever!

r3dux | April 17, 2011

Update: Google About-Turn

Google have capitulated to feedback and decided to keep Google Video alive and migrate the videos to YouTube, by which point Archive Team had 40% of the content and were well on track to save it.


Google Video will be shutting down within the next few weeks, and for some stupid reason, they’re not just transferring the videos to YouTube (as Google owns both) – instead they’re just pulling the plug and it’s all going to be lost. To fix this rubbish state of affairs, Archive Team are in a race to scrape as much Google Video content as they can before the viewing deadline (29/04/2011) and the download deadline (13/05/2011) – and you can help! Archive.org have kindly donated 100TB for storage, but first we need to index the videos and scrape them.

If you have a lot of bandwidth you can help scrape the videos themselves, but even if you don’t you can help with the indexing effort by running a simple, resource and bandwidth light Linux script and just leaving it running!

Why save it?

YouTube has a 15 minute video length limit – and Google Video doesn’t. This means there are large amounts of video that might be on Google Video and nowhere else, so when they’re gone – they’re gone. A lot of this might not be fantastic material – but a lot of it will be unique and the only copy on the Net. There’s documentaries, films, and all sorts of good stuff, and even personal video blogs will be a snapshot of the times we live in. In short, it’s stuff we as a species, should not throw away.

It’s like the BBC scrapping their archives when they didn’t want to pay to save them – we won’t know what’s been lost until it’s gone, and by then it’ll be too late. So let’s not let that happen, eh?

How you can help if you have ~200GB bandwidth/storage or more: Scrape the videos

Update: pentium ported the video download script to Windows (you still need python and aria2, which can be downloaded separately). Script location: http://www.pentium100.com/gg_windows.zip

Head on over to ArchtiveTeam Google Videos wiki, sign up, pick an un-taken section of videos and add your initials/handle to it, then go for your life! Full instructions at the site.

How you can help if you don’t have a lot of bandwidth/storage

Update: nstrom ported the related.sh indexing script to Windows – all you now need is a pre-compiled version of the phantomjs browser. Full instructions come with the script, which is located here:
http://nstrom.chaosnet.org/google_video_related_win.zip

Note: This will only work on Linux machines with X running – you can’t run it on headless servers due to phantomjs requirements. Instructions are for Ubuntu 10.10 or later and might need a little modification if you’re running an older or non-Debian based distro.

  1. Get and build phantomjs (a headless web browser) by doing the following:
    • Install build-essential, curl git, libqtwebkit4and libqtwebkit-dev if necessary, for example using:

      sudo apt-get install build-essential curl git libqtwebkit4 libqtwebkit-dev
    • Create a directory called phantomjs
    • In the terminal go into your new directory and run the following command to get the phantomjs source code:
      git clone https://github.com/ariya/phantomjs.git
    • Build phantomjs by issuing the command:
      qmake && make
    • Move the phantomjs binary somewhere in your path by issuing the command:
      cd bin && sudo mv ./phantomjs /usr/bin
  2. Create a folder called gvscript or such and download the file with the list of Google Video related pages to scrape: google_video_related.tar.gz
    • Extract the above downloaded file (Right-click and Extract To.. or use tar -zxvf ./google_video_related.tar.gz)
  3. In a terminal, navigate to the folder where you extracted the google_video_related file (above) and run the following command to help scrape Google Video:
    while : ; do ./related.sh ; done
  4. Simply leave the script running, and head on over to #ggtesting on EFnet (IRC) if you need any assistance or in case the script has any issues (p.s. kill the script with Ctrl+Z if it misbehaves – though mine’s been running for about 7 hours solid with no complaints so I doubt you’ll have any).

The script scrapes each page for related videos and sends them off to an archiveteam server. It takes very little processing and bandwidth on your end (a couple of kb/sec, if that) and seems to work just fine.

Every little helps

I’m sure anything you can do to pitch in will be appreciated by Archive Team, the Internets, your future self, your kids, your kids kids, your kids kids kids… you get the picture ;)

Cheers!

Comments
No Comments »
Categories
Imagery, Life
Tags
Archive, Archive Team, archive.org, Bandwidth, Google Video, script, Stupidity, Video
Comments rss Comments rss
Trackback Trackback

Bliss n’ Eso – Addicted

r3dux | April 16, 2011

Driving to the shops earlier and this song came on the radio. Thought it was the Hilltop Hoods at first, but turns out it’s Bliss n Eso…

YouTube Preview Image

Great track & neat video – they’re playing in Melbourne soon too… How tempting! =D

Comments
No Comments »
Categories
Imagery, Music
Tags
Addicted, Bliss n Eso, Running On Air
Comments rss Comments rss
Trackback Trackback

How To: Insert data into a MySQL DB using Connector/C++

r3dux | April 15, 2011

I created a guide to using MySQL Connector/C++ for a class a while back which showed a not-too-pretty way to put data into a DB, and I created a second part using prepared statements, locking, rollbacks and all that other good stuff – then I never posted it! Well, no more ;)

MySQL Connector/C++ Guide - Part 2

Details: MySQL & Connector/C++ Introductory Guide – Part 2 of 2
Format: Powerpoint 2003 (Best readability in Powerpoint 2003 onwards, LibreOffice and OpenOffice)
Slide Count: 19
Link: MySQL-Connector-Guide-Part-2.zip

If you find anything that needs correcting feel free to let me know! Cheers!

Comments
1 Comment »
Categories
Coding, How-To
Tags
C++, Connector, Guide, Locking, MySQL, Powerpoint, Prepared Statements, Rollback, Slides, SQL
Comments rss Comments rss
Trackback Trackback

« Previous Entries Next Entries »

Translate

Categories

Archives

Tags

3D ActionScript ActionScript 3.0 Adobe AI Ballarat Bash C++ Class Convert CS4 Effect Error Film Flash GLSL Gnome Hack How-To install Jaunty Java Kinect Linkage Linux Mash-Up Microsoft Motion OpenGL Particle Problem PS3 Remix Retro script Slides Sound Systems Texture Ubuntu Video VirtualBox Wii Windows XBox

Gamercard

OpenR3dux

Misc.

Flattr this

RSS Feed

r3dux twitter feed



“Lack of planning on your part doesn't constitute an emergency on my part.”

rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox