Saturday, December 16, 2006
Friday, December 08, 2006
Sprinting at the Encino Velodrome
My Space
So, I finally caved and created a MySpace account. Nothing much as yet. My good friend and co-worker, Raya invited me.
Here's the link - http://www.myspace.com/petermaharaj
Have a look at Raya's myspace account - Raya Dawn
Here's the link - http://www.myspace.com/petermaharaj
Have a look at Raya's myspace account - Raya Dawn
Sunday, December 03, 2006
Monday, November 27, 2006
Thursday, November 16, 2006
Sunday, November 05, 2006
Wednesday, November 01, 2006
Thursday, September 28, 2006
Detecting user bandwidth with ActionScript
I've always wondered how to code my flash files to detect a user bandwidth. Well I've found it. The tools you need are Flash Communication Server 2 and Flash 8 and some experience with coding. The process is quite simple and logical considering if you are delivering content to the public and have to compensate for users with different connection speeds; bandwidths.
Here's the code -
1 nc = new NetConnection();
2 nc.onStatus = function(info) {
3 trace("Level: "+info.level+" Code: "+info.code);
4 if (info.code == "NetConnection.Connect.Success") {
5 trace("--- connected to: " + this.uri);
6 initStream();
7 }
8 };
9 nc.connect("rtmp:/videoplayer");
10
11 initStream = function(){
12 // create a NetStream
13 video_ns = new NetStream(nc);
14 // optional onStatus handler
15 video_ns.onStatus = function(info) {
16 trace("Level: " + info.level + " Code: " + info.code);
17 };
18 // attach the NetStream to a video object called videoObj on stage
19 videoObj.attachVideo(video_ns);
20 video_ns.play("100kbps_Stream", 0); // the parameter 0 will tell the server to play a recorded stream
21 }
22 stop();
Add the following to the frame in Flash 8 -
1 nc = new NetConnection();
2 nc.onStatus = function(info) {
3 trace("Level: " + info.level + " Code: " + info.code);
4 if (info.code == "NetConnection.Connect.Success") {
5 trace("--- connected to: " + this.uri);
7 }
8 };
9 NetConnection.prototype.onBWDone = function(p_bw) {
10 trace("onBWDone: "+p_bw);
11 }
12 NetConnection.prototype.onBWCheck = function() {
13 return ++counter; // Serverside, just ignore any return value and return the call count
14 }
15 nc.connect("rtmp:/bwcheck", true);
16 stop();
Now, in your FLA file add the following -
detected_bw = p_bw;
// close the NetConnection to bwcheck
this.close();
gotoAndStop(2);
To request the appropriate stream -
if(detected_bw >= 256){
useVideo = "256kbps_Stream";
bufferlength = 2;
} else if (detected_bw <256 && detected_bw >=100){ useVideo = "100kbps_Stream"; bufferlength = 3; } else { // bandwidth is too low, you best alert the user at this stage trace("bandwidth too low"); }
trace("bandwidth too low");
}
For the onStatus handler -
video_ns.onStatus = function(info) {
trace("Level: " + info.level + " Code: " + info.code);
};
dd this code to set the bufferlength:
video_ns.setBufferTime(bufferlength);
Also modify the play action by changing that line from this:
video_ns.play("100kbps_Stream", 0);
to this:
video_ns.play(useVideo, 0);
I will like to thank Stefan Richter and Adobe for the help.
Here's the code -
1 nc = new NetConnection();
2 nc.onStatus = function(info) {
3 trace("Level: "+info.level+" Code: "+info.code);
4 if (info.code == "NetConnection.Connect.Success") {
5 trace("--- connected to: " + this.uri);
6 initStream();
7 }
8 };
9 nc.connect("rtmp:/videoplayer");
10
11 initStream = function(){
12 // create a NetStream
13 video_ns = new NetStream(nc);
14 // optional onStatus handler
15 video_ns.onStatus = function(info) {
16 trace("Level: " + info.level + " Code: " + info.code);
17 };
18 // attach the NetStream to a video object called videoObj on stage
19 videoObj.attachVideo(video_ns);
20 video_ns.play("100kbps_Stream", 0); // the parameter 0 will tell the server to play a recorded stream
21 }
22 stop();
Add the following to the frame in Flash 8 -
1 nc = new NetConnection();
2 nc.onStatus = function(info) {
3 trace("Level: " + info.level + " Code: " + info.code);
4 if (info.code == "NetConnection.Connect.Success") {
5 trace("--- connected to: " + this.uri);
7 }
8 };
9 NetConnection.prototype.onBWDone = function(p_bw) {
10 trace("onBWDone: "+p_bw);
11 }
12 NetConnection.prototype.onBWCheck = function() {
13 return ++counter; // Serverside, just ignore any return value and return the call count
14 }
15 nc.connect("rtmp:/bwcheck", true);
16 stop();
Now, in your FLA file add the following -
detected_bw = p_bw;
// close the NetConnection to bwcheck
this.close();
gotoAndStop(2);
To request the appropriate stream -
if(detected_bw >= 256){
useVideo = "256kbps_Stream";
bufferlength = 2;
} else if (detected_bw <256 && detected_bw >=100){ useVideo = "100kbps_Stream"; bufferlength = 3; } else { // bandwidth is too low, you best alert the user at this stage trace("bandwidth too low"); }
trace("bandwidth too low");
}
For the onStatus handler -
video_ns.onStatus = function(info) {
trace("Level: " + info.level + " Code: " + info.code);
};
dd this code to set the bufferlength:
video_ns.setBufferTime(bufferlength);
Also modify the play action by changing that line from this:
video_ns.play("100kbps_Stream", 0);
to this:
video_ns.play(useVideo, 0);
I will like to thank Stefan Richter and Adobe for the help.
Saturday, July 22, 2006
CA Master State Championships 2006
Wednesday, June 21, 2006
Monday, June 12, 2006
Zaino day - polishing my baby.
Monday, June 05, 2006
Information Security - My opinion from this past weekend.
This past weekend I presented at the Marriott near LAX to a group of administrators, concerned parents and teachers from the Los Angeles Unified School District. The presentation was titled 'Privacy Protection: What You and Your Students Should Know' and from the positive feedback I received and interest in the information as a whole, I feel confident that information sharing on a topic is beneficial to computer beginners to the savvy user who can whip through online.
Presentation notes will be made available soon to interested users.
Presentation notes will be made available soon to interested users.
Friday, June 02, 2006
Information Security
I will post some information on best practices and privacy law in the coming week. This weekend I will be presenting information on privacy protection to a technology panel from the LAUSD.
The topic of my discussion is - Privacy Protection: What You and Your Students Should Know.
I will be covering -
-- Privacy Protection on Social Networking Sites
-- Examples of Negative Consequences (Online Social Networking Gone Bad)
-- Why Schools Are a Target for Identity Theft
The topic of my discussion is - Privacy Protection: What You and Your Students Should Know.
I will be covering -
-- Privacy Protection on Social Networking Sites
-- Examples of Negative Consequences (Online Social Networking Gone Bad)
-- Why Schools Are a Target for Identity Theft
Tuesday, April 25, 2006
Monday, April 24, 2006
Cycling at the ADT Velodrome
Monday, April 10, 2006
Tuesday, March 28, 2006
Random pics
Monday, March 27, 2006
Oops, somebody is going to get a boo boo

This is going to hurt. Picture was from the Athens 2004 Olympics. The Greek cyclist suffered the worst of the crash and from the picture; his helmet sure protected his head with the collision with the track. Not too sure about his shoulder/back and the pedal from the French cyclist. The Dutchmen (orange and blue) is Theo Bos, current World Champion in the kilometer.
Oh Yeah...Graduation is right around the corner
M.S. in Education Technology and Information Systems. Once this is done, the next objective is to attempt the CISA certification in December and begin preparation for the CISSP.
Due to my job and hopefully with a good CSU doctoral program, I will enroll in the spring for an E.d.D. in Information Systems - I hope my fees are waived :-)
Due to my job and hopefully with a good CSU doctoral program, I will enroll in the spring for an E.d.D. in Information Systems - I hope my fees are waived :-)
Microsoft and Vista
Microsoft's 50 million line albatross by ZDNet's Dan Farber -- The New York Times reporters Steve Lohr and John Markoff explain the software delivery problems at Microsoft, as evidenced by the recent Vista and Office 2007 delays....each new version of Windows carries the baggage of its past. As Windows has grown, the technical challenge has become increasingly daunting. Several thousand engineers have labored to build and test [...]
Sunday, March 12, 2006
Video of my crash in 2005
This crash occurred at the Far West Championships in 2005. The result was a broken rib and my left leg with burns from the track. I was off the bike for a week then returned to my training schedule.
Wednesday, March 01, 2006
Monday, February 20, 2006
Sunday, February 12, 2006
My new toy...Lancer Evo IX
Well, the beauty of getting older is you become much wiser. This past Saturday 11th Feb. I attained the milestone of age 31. I don't feel like 31 and my daughter, Roshni, usually says that I behave much younger than my age. Anyhow, this will be another year in which I will enjoy and take full advantage of every moment and make the best of every situation.
I have a new toy, something I've been researching for quite some time and finally have it. It's my new Evolution IX:
Monday, January 23, 2006
LA World Cup Track Cycling 2006
Wow, the event is over and I'm recovering from a weekend of aggressive, tactical and entertaining racing.
Jamie Staff, Steven Alfred, Travis Smith and Josiah Ng rode very well qualifying for their respective events, demonstrating the high quality training from Roger Young and Jamie Staff.
Video will be posted shortly and a DVD will be available for purchase soon. Here's a short clip of Jamie: Click here.
Wednesday, January 18, 2006
Trinidad & Tobago Cycling Team
The T&T cycling team will be at the ADT Velodrome later this evening and I will be there to see and hopefully greet them. The UCI World Cup will be hosted this weekend, so we hope to see some good Sprint action. Video and photos will be posted on this site or http://www.intraining.us/
Sunday, January 15, 2006
World Cup Track Cycling
Coming soon at to the ADT Velodrome in Carson, CA. Jan 20th - 22nd. I will post images and video on the site.
Masters in Educational Technology/I.S.
Taking classes back to back through July to complete my Masters in Educational Technology and Information Systems. So far, all has gone well and hopefully I will stay focused on completing all my classes on time and with A's in all of them.
My current class is coming to an end and the final projects include a combination of web programming and multimedia.
My current class is coming to an end and the final projects include a combination of web programming and multimedia.
Training
Training. I'm having a hard time both mentally and physically preparing for sprint events in track cycling. I am seeking that happy medium in developing a system that will allow me the ability to record improvements in both the gym and on the track.
Subscribe to:
Comments (Atom)

























