Fun Java Code to Use on Any Website You Visit

This is fun. Copy the code pasted below and paste it into your web browser address bar. You’ll see right away what it does. Very fun javascript – You can do it while visiting my site here, but may be a bit slow because I usually have a lot of graphics posted.

It’s not a virus, just fun stuff. Try it! Copy and paste this code into your browser address bar:

javascript:function Shw(n) {if (self.moveBy) {for (i = 40; i > 0; i–) {for (j = n; j > 0; j–) {self.moveBy(1,i);self.moveBy(i,0);self.moveBy(0,-i);self.moveBy(-i,0); } } }} Shw(6)

Update October 2011 – Works in Firefox but not in Safari.

SQL Error : 1016 phpbb_sessions.MYD – Simple Fix Solution

Simple fix for SQL Error : 1016
This was a simple problem that came up with one of my databases, and I wasted a lot of time going the long way around the mountain. I’m posting the database problem here along with a quick fix for those with a similar error.

THE ERROR:

phpBB : Critical Error

Error creating new session

DEBUG MODE

SQL Error : 1016 Can’t open file: ‘phpbb_sessions.MYD’. (errno: 145)

INSERT INTO phpbb_sessions (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in, session_admin) VALUES (‘1c2d81c6031571e71b2909fa76261504′, 2, 1161053838, 1161053838, ’47e750bd’, 0, 1, 0)

Line : 245
File : sessions.php

***********

THE FIX:

Perform the following SQL query:

REPAIR TABLE phpbb_sessions

***********************

DETAILS:

This problem can happen to many different mysql database tables and seems to happen specifically on sessions.php – My SQL had been restarted, so that might have been a cause. If you are using PHPMYADMIN to run your databases, you will not be allow to fix the database from within the tables view for that database (like you normally would). Because phpmyadmin cannot complete the listing of tables, you cannot select the table to fix, and also do not have the normal listing of functions to select from (including the “optimize” table and “repair” table functions).

But just because you can’t see the sessions or users table, doesn’t mean they don’t exist. On my databases I entered “REPAIR TABLE phpbb_sessions” as an sql query and it fixed the table, which fixed the database problem.

In looking for a fix for the problem, I saw this same error across many different software platforms including phpbb, vbulletin and several ecommerce software platforms.

My initial fix was to backup databases from the command line on the server, since I had root access. I then deleted the existing database and reloaded the backups. A very long process when the mysql query fixed it. To perform the simple query you do not need root server access, only access to phpmyadmin.
Another reason I’m posting this, is I saw several dozen instances where other people had this error for over a month, effectively closing their websites. Hopefully this will help those who, like myself, are technically challenged with mysql.

Hope that helps!

************

Another version of a related error:

phpBB : Critical Error

Error doing DB query userdata row fetch

DEBUG MODE

SQL Error : 1146 Table ‘databasename.phpbb_users’ doesn’t exist

SELECT u.* FROM phpbb_users u, phpbb_sessions_keys k WHERE u.user_id = 2 AND u.user_active = 1 AND k.user_id = u.user_id AND k.key_id = ‘d0d838d45d9db9fea44a2500bb8199ab’

Line : 89
File : sessions.php

Protecting Online Audio Download Files from Theft

audiodownloads.jpgI have made several runs at trying to setup online audio download sites and now I’m finally getting it going. It’s a little easier now than four years ago when I first wanted to do it.

But the problem I always come up to is how to protect the audio.

THE SPOILER: I have come to the conclusion that you have to overdub the sample audio with overdubs for theft protection, and I’ll explain why as we go through options here.

I’m writing this article so others have the info to reference to. I found very little when looking online. If any info is incorrect or you have more info to add, please leave a comment on this post with the info.

OPTIONS FOR PROTECTING AUDIO

  • Play lower quality fidelity for samples
  • Encode audio into a flash player
  • Pull audio into database and call via PHP
  • Use Real Audio to pull seperate play files
  • Use Quicktime so basic users can’t see source
  • Overdub audio onto samples, making the sample unuseable

1) Play lower quality fidelity for samples – This works for some applications. I know SoundDogs does this for their sound effects. Overdubs won’t work for their foley fx because the samples are so short. I have used SoundDogs a lot and think their setup is great for sound effects, but I don’t think it’s the best solution for music tracks. If you play lo fidelity clips for customers, what if your final product does not match their expectations? If you play for them what they’re going to get then you will have fewer customer complaints and/or chargebacks. Audio downloads have a high incidence of chargebacks, so showing customers exactly what they’ll be getting is a first line defense for that.

2) Encode audio into a flash player – I have spent SO many hours working with this. At one point even downloaded the Wimpy flash player. I see a LOT of sites using a flash player to hide their audio source. The problem is, you can see where the file is being pulled up from if you view the source code. If your answer to that is “Well, how many people know how to view the source code?” I think more than you think. Viewing source code is easy. I would guess the largest group of people that would want to snatch audio are younger people, and they are saavy with computers – and everyone has a friend who’s a computer geek. Viewing source code isn’t even approaching a geek thing anymore, it’s just something people know about – like popping the hood on their car. So a big NO for using a flash player as the source code will show your audio location.

3) Pull audio into database and call via PHP – This is a nice option, and I’ve seen source code of many sites doing this. For me, it’s a little out of my league to setup – so it’s not an option. Also, I’m afraid that someday my database will crash and I won’t be able to retrieve the audio. If someone reading this has an approach that normal folks can use to implement this, please let us know about it.

4) Use Real Audio to pull seperate play files – In the old days Real Audio and MP3 were going head to head. I put my money on Real Audio, thinking they would win the audio wars. I was wrong. People still have problems playing some Real Audio files, and it’s very time consuming to make the seperate .ra and .ram files needed to pull it off. Frankly, it’s a real headache in my opinion. If you have hundreds of audio files to protect, then you have hundres of .ra and .ram files to make. And then I guarantee you will get emails that some people can’t play it, so you need MP3 options too. If you have MP3, why have Real Audio too?

5) Use Quicktime so basic users can’t see source – The Pro version DOES allow viewing the source. The Pro version is not very expensive, so I imagine a lot of people have it. I don’t think this is a wise option.

6) Overdub audio onto samples, making the sample unuseable – This is my suggestion. Users can hear the actual fidelity of your sound file, and you have a seperate public audio sample you can make accessible to the public while keeping your actual clean downloads secure and protected. You can record your own overdubs, or go to a local recording studio and get it done for not much. Chances are if you have online audio samples, you probably already have the gear for audio overdubs.

Here is a sample of an audio file protected with overdubs:

MP3 Hip Hop Instrumental with Overdub Theft Protection

Notice the overdub vocal has been limited to a small audio frequency range so it doesn’t interfere to much with the listening experience of the track as a whole. I find it very easy to tune out the overdub while listening to the track. In addition, the overdub also contains information useful for customers listening.

For fast easy overdub mixing see my article on the Acoustica MP3 Mixer

I vote for overdubbing to provide audio protection to music samples. Have more info? Please leave a comment.

Review: Acoustic MP3 Audio Mixer

I’ve got a lot of gear. Nice pro high end gear like Digidesign’s Pro Tools, and lots of computers. My little office alone has five computers in it. But you’d be amazed how often I need to do something very very simple, but the high end gear slows me down.

Case in point – I have 300 audio samples that I’d like to use as audio samples for customers, but need to add overdubs for the samples so they aren’t stolen without payment. To further complicate things, I’m using these 300 tracks across 5 different websites, making a total of 1500 tracks that need to be layered with overdubs. It needs to sound good, but since it’s just streaming samples it is not critical to be audiophile quality.

Enter the Acoustic MP3 mixer. It mixes four tracks of stereo MP3 files. I love it. I’m able to click and quickly import my sample tracks and edit them to the overdub vocal. All I need is volume control to set the levels between the tracks, and a fade feature. Fade is NOT a feature on Acoustica, so my work-around was to let the overdub vocal hang on after the sample track with a plug for the hosting website.

Here’s an example of what I’m talking about to protect audio:
Rap Instrumental with Theft Protection Overdubs

For more info on Acoustic, go to the Acoustic Website and look for the “MP3 Mixer”. It’s a free 30day trial, then I think it’s $24.95 – a good square deal in my opinion.

If you want more control, then this isn’t the software for you. But if you just want to mix together some MP3’s quickly without firing up all your gear, Acoustica is a nice alternative.

Server Four Launched

My fourth server launched today, launching a secondary e-commerce network to focus specifically on audio. I’ll also be bringing back additional forum communities that were not brought back in the last two server launches.

The Server Four backend will use three different software applications for e-commerce. I don’t have any immediate plans to bolster forum-related features – the forums are running smooth and have been stable for quite a while, will leave them be until the next milestone software release (which should be by Christmas).

From the front end most communities will not notice much of a change, but our online customers will notice a whole new set of services and options when ordering online. So for me, it means the freedom to continue pursuing music endeavors full time while the backend of the empire provides all those boring, tedious things needed in life, like food.

I used to say “the empire” would never reach the height of it’s former glory. I do not currently share that opinion anymore.

🙂

QandA – How Do I Backup MySQL Databases?

How do I backup mysql info for my forum? I read that you run a lot of forums so thought you might know.

Jeremy (Last name omitted)
**********************
Hi Jeremy,

If your forum is fairly small you can use built in database backup features from the admin section. PHPMYADMIN also works, but only for smaller database sizes (it will time out with larger databases). I’m assuming you have a dedicated server and have a larger database.

I have several forums with over 100,000 member entries, so the built in MySQL backups and PHPMYADMIN don’t work for those. You’ll have to buckle down and use your command prompt via SSH.

A good SSH program is WINSCP – You can find it easily via Google or currently at download.com

SSH into your server, open the command prompt:
1. Change to the bin subdirectory in the directory where MYSQL is installed
For instance, typd cd /urs/local/mysql/bin

2. Type the following:
mysqldump –user=accountname –password=password databasename >path/backupfilename

*********

accountname – is the name of the MySQL account that you’re using to back up the database

password – is the password for the account

databasename – is the name of the database that you want to back up

path/backupfilename – is the path to the directory where you want to store the backups and the name of the file that the SQL output will be stored in.

May seem a little confusing, but you’ll get used to it real quick.

Macromedia Flash

I have a love-hate relationship with Macromedia Flash. It looks so cool on websites, but so easy to be a big headache for a number of reasons.

Back in 2001 Flash was pretty cutting edge and promised to be the next big thing on the internet, so I actually hired a dedicated flash specialist to created dedicated flash websites for our network. We advertised flash website design services and I kept feeding this guy money while waiting for orders to come in. In three months we didn’t get a single order and I canned the whole project.

In the meantime I wanted to use all the flash work he had created for our own sites. Lots of problems. Our search engine ranking plummeted because all of our SEO work was down the tubes when we switched to flash. Back then most people were still on dial-up as well so load time was very slow. Customers had to wait for load times and were frustrated, meanwhile back at empire headquarters we were all huddled around the computer screens going “Wow, isn’t that cool”.

I think it’s pretty well documented now how a total flash site can ruin a websites search engine rankings. In fact right now I have one competitor in a small niche market who switched to flash, and their site went off the Google map within a couple weeks. I wonder if they even realize the cause. Looking deeper at their code I don’t think they are real business saavy, just kind of lucked out. And I wonder if they are at the office looking at the screen going “Wow, isn’t this cool” while at the same time wondering why their sales have grinded to a halt.

BUT, because I’m in a lot of audio niches I’ve always loved the idea of having really cool flash intros. I got all hyped up on Flash again after visiting the new site for Aftermath Entertainment. I got the chance to do some pre-production work for one of their newest artists and was visiting the site to get a feel for Dr. Dre’s vibe.

What seems to work well is using flash headers in certain parts of a website, but keep the rest of the layout html or xhtml so you still have good info for search engine crawls. One example of this is at the website for McIntyre Hall Performing Arts Center – (which I’ll be performing at soon!) – They have a nice flash intro, and when you enter the main site they have a little flash header running. I think it’s very effective because it actually shows footage of their shows. (Currently showing a clip of Papageno from Mozart’s Magic Flute opera which I got to see at McIntyre Hall last year – GREAT performance). At the same time, you can easily navigate the site to quickly get the info you need. This kind of approach has slowly evolved over the last few years and for good reason. Give up a little of the coolness factor for functionality.

When I’m shopping or trying to retrieve info on the internet, it’s VERY frustrating to sit through flash presentations. When I’m shopping, I just want to find the info quickly. I don’t really care how “cool” your site is. I just want easy to find product descriptions, secure shopping and an indication that what you are selling is what I think I’m buying.

So here I have my own personal website and many people know I run a pretty large internet network. They expect something super cool – after all – I’m “Cybermonsters” and have done all this music stuff. I should be the guy. Ironically, I have never really worked on my personal site. Never thought it was important.

Armed with my new fervor to make my site the coolest composer site on the web I went searching for Flash programmers to create something cool for me. But I don’t want to wait, I want it now. I’ve got a few days before I go out of town and just want it to be finished. That’s when I started looking for flash templates I could customize.

Have you looked on the web for flash templates? I spent literally 6 hours scouring every site I could find, and with few exceptions they are all selling the same templates! In fact, one of my competitors redid their site in flash, and I see the template for sale for around sixty dollars! What a bunch of cheezeballs.

I’m guessing this mega network will get canned at one point by google, how can you have hundreds of sites selling the exact same templates? Event the same searching options. It looks more sinister than affiliate programs to me, looks like a gigantic network is sliding under the Google radar.

Finally biting the bullet after three days of finding the perfect template, finding a better one, finding a better one, etc ad nauseum – I finally decided to go with a very simple flash intro template to use for this site. It had really cool music, was simple so I thought I could edit it easily.

I buy the template for a whopping $34 and start to edit it. What a nightmare. What looked so simple was now bogged down in cheezy interfaces, and I was very lost with the editing. Not at all simple like had been insinuated on their website.

As I’m editing I realize how cheezy it is to use someone else’s music ON A COMPOSER WEBSITE! Would have been unforgiveable and I don’t know why I didn’t think of it. So I inserted my own audio in the Flash template. The template would not accept MP3 files, only .wav – And when I imported the audio as a .wav file something happened where it was so compressed it lost all it’s bandwidth. It sounded horrible! My beautiful orchestral piece that’s crystal clear as an MP3 file was now a hidous piece of garbage. And now the animation didn’t fit the audio. I played with the audio but it didn’t quite look right with my own track. How am I going to sell film scoring and composer services when I can’t even get my audio to match a stupid flash animation?

Well, my audio was never written for the flash animation, it was an orchestral piece I recorded several years ago. And the flash was never written for my audio. So to make this work I would need to compose a new piece for the flash animation, which seems like a total waste of time since I don’t have the expertise yet to do quality flash editing.

Dear Flash, I hate you and I love you. I’m dropping it for now. If I want flash for my site I’m going to send a dedicated audio file to a professional Flash animator, and have them animate the flash presentation to my audio. It will just be a little intro or a website header, keep the rest html based code.

Of course, by the time I get around to it everything will have changed again. So, when do they finish this internet thingy anyway? 🙂