Jul 25, 2024

Small Engine Carb Tuning


The different jets effect different throttle positions:

  • Zero throttle to 1/4 throttle = Pilot Jet and A/F Mixture Screw.
  • 1/4 to 1/2 throttle = Throttle Valve (aka Slide)
  • 1/2 to 3/4 throttle = Needle
  • 3/4 to Full throttle = Needle + Main Jet

What is Bogging?

When a dirt bike bogs, it simply means it’s not getting enough fuel and the engine sputters or stalls at full throttle. There are two common types of bogging: lean bog and rich bog, distinguishable by how the bike sounds when you throttle. 

Lean Bog - Happens when there’s too much air and not enough fuel in the engine. A lean bog is noticeable when the bike doesn’t accelerate, and sounds like the engine is drowning out or dying.

Rich Bog - Happens when there’s too much fuel on acceleration. The throttle response feels sluggish. A rich bog makes the engine sound like it’s sputtering.

From: https://www.partzilla.com/blog/why-dirt-bike-bogs-4-common-causes

Feb 22, 2018

Auto-starting mjpg-streamer on Octopi

The normal command for me to start my mjpg-streamer (from its directory) is:
    ./mjpg_streamer -i "./input_uvc.so -n" -o "./output_http.so -w ./www"

The problem arises, when you want this to start automatically when your Raspberry Pi reboots (or even run in the background). You can't just simply add an & and even the built-in -b(ackground) option doesn't seem to work amazingly well.

So, here's what I've been able to sort out:
Copy all of the files to:
    /usr/local/sbin/mjpg-streamer/mjpg-streamer-experimental
Test execution from any folder use the following full path:
    /usr/local/sbin/mjpg-streamer/mjpg-streamer-experimental/mjpg_streamer -i "input_uvc.so -n" -o "output_http.so -w ./www"

If you get the message "ERROR: could not find input plugin", use the following command:
    export LD_LIBRARY_PATH=/usr/local/sbin/mjpg-streamer/mjpg-streamer-experimental/

If you want it to run & stay running (background mode), use the -b switch:
    /usr/local/sbin/mjpg-streamer/mjpg-streamer-experimental/mjpg_streamer -i "input_uvc.so -n" -b -o "output_http.so -w ./www"

To stop the background mjpg-streamer daemon, use the following command:
    kill -9 `pidof mjpg_streamer`

To make the camera start-up automatically, add the following lines to /etc/rc.local:
    /usr/local/sbin/mjpg-streamer/mjpg-streamer-experimental/mjpg_streamer -i "input_uvc.so -n" -o "output_http.so -w ./www" export LD_LIBRARY_PATH=/usr/local/sbin/mjpg-streamer/mjpg-streamer-experimental/
Also, make sure that /etc/rc.local is set to execute:
    sudo chmod 755 /etc/rc.local

For clarity, the actual binary is mjpg_streamer but it is usually referred to in conversation as mjpg-streamer. If you're searching, search for both!

Flashing arduino mega2560 firmware from OctoPi

I have a clone Arduino Mega2560 that I keep having to make changes to the firmware for my 3D printer.  Most of the steps are straight forward:

  1. Make changes to firmware in Arduino software.
  2. Save as hex
  3. sftp/scp the file to the Raspberry Pi
The last step was the one that gave me so much grief.  For my particular setup, here's the command that works:
avrdude -p m2560 -c stk500v2 -P /dev/ttyUSB0 -D -U flash:w:Marlin.ino.mega.hex:i

Aug 24, 2012

Remove pictures from copy/paste into Excel

I don't know about the rest of you, but I constantly find myself copying & pasting information from websites into Excel spreadsheets so that I can manipulate the data, or to just keep track of it for future reference.

I recently did just this when creating backup copies of my different domain's DNS entries.  The problem is, when I paste the tabulated data into Excel, it includes hyperlinks & images.

Hyperlinks:  Luckily in the newer versions of Excel this is as easy as selecting the whole sheet, right-clicking and selecting "Remove Hyperlinks".

Images:  Images are a little more difficult, since they often times don't even exist inside a cell, so they can't be easily deleted.  Thanks to Dave Peterson over on the microsoft.public.excel newsgroup, I got this little nugget of information:

Hit Alt-F11 to get to the vbe (Visual Basic Editor)
Hit Ctrl-G  to see the "immediate" window
Type the following and then press enter:
Activesheet.pictures.delete
This blows them all away quickly & cleanly.  What's even better, is that if you're doing this multiple times, just keep copying & pasting pages in, then with each sheet highlighted, alt-tab back to the VBE screen, put your cursor at the end of the line & hit enter again to repeat the process.

Dec 14, 2011

Remove empty lines in text using Visual Studio

Visual Studio has ability to delete empty lines in replace operation using regular expressions.
  1. Click Ctrl-H (quick replace)
  2. Tick "Use Regular Expressions"
  3. In Find specify ^$\n
  4. In Replace box delete everything.
  5. Click "Replace All"
All empty lines will be deleted.

Jan 11, 2011

Google Checkout Issues with Android Market and Google Apps for Your Domain (GAFYD)

After upgrading GAFYD to the new infrastructure, I was no longer able to use the Android Market to purchase Apps for my DROID. After digging around for weeks for a solution to this, I was able to glean the following solution & decided to sum it up here.

Go to:
Google Apps Control Panel => Organization & Users
On the tabs below, click on the "Services" tab

Here's a direct link, if you substitute your domain name:
https://www.google.com/a/cpanel/{example.com}/Organization#Organization/subtab=1

Scroll down in the list to the "Other Google Services" section & make sure Checkout is "switched to on".

Mar 4, 2010

Take your ASP.Net 2.0 App Offline quickly!!!

I stumbled upon this little tidbit & decided it was reposting here. If you create a file in an ASP.Net 2.0 application named app_offline.htm it will bring down the appdomain & just return the contents of that HTML document!

Make sure your HTML page is at least 512bytes in size, or IE's "friendly errors" may eat it. :)

The MAJOR benefit I see here is that you can quickly rename a standby page to app_offline.htm, make a few changes (replace locked files, etc) & then rename it back to app_online.htm & you're back in business.

Jan 11, 2010

ASP Tags Not Recognized w/Nested Masterpages

Okay, I had an odd thing occur today while editing one of my projects. All of the tags had the red squiggly line under them, claiming:

“unrecognized tag prefix or device filter ‘asp’”

After a little searching I found a Google group post stating that:
”…building makes no difference. what does make a difference is leaving the nested master page file open in the IDE editor window…”

So, just keep your "nested" master page open & all will be well.

Oct 27, 2009

My new obsession? The Droid!

Okay, it's finally time for me to carry on about my newest obsession, the Google Android based group of phones scheduled to hit Verizon soon™. What was initially thought to be campaign aimed at the Motorola Droid (a.k.a. Tao/Sholes). However, it’s been recently discovered that it’s actually a full “marketing blitz” for a range of Android OS phones on “Big Red”.

Known so far:
Motorola Droid
HTC Droid Eris (re-brand of HTC Hero)

Rumored:
Motorola Calgary (Running Moto BLUR UI)
HTC Passion (Possibly the Dragon & running a Snapdragon 1GHz processor)

But that’s not of concern to me, I’ve got my eyes on the Moto Droid, it’s a wonderful bit of tech & may be enough to make me learn Java, just to be able to write apps for it!

image

It’s also supposed to come with this sexy dock, that turns it into an alarm clock! Woot!!!

image

The kicker for all of this is that it’s supposed to NOT be locked down by Verizon like all of their non-smartphone offerings.

So, needless to say, I’m really “geeking out” about this & can’t wait until tomorrow morning, when all will be revealed!

Aug 28, 2009

ASP.Net Custom Paging Control

I've been playing with GridViews for quite some time & have always wondered if there's a better way of displaying the pager at the bottom, instead of the "1 2 3 ..." that you get by default.

As it worked out, I had the reason today to look more into this for a customer request. I happened to find an article that gave code to do this. It was a decent starting point, but I didn’t like how the records displayed were numbered from 0-(count-1), but it got me going.

Here’s what two options I’m considering using:

This one uses media player type links (i.e. |< << >> >|)
<PagerTemplate>
<asp:LinkButton CommandName="Page" CommandArgument="First" ID="LinkButton1" runat="server" Style="color: white">|&lt;</asp:LinkButton>
<asp:LinkButton CommandName="Page" CommandArgument="Prev" ID="LinkButton2" runat="server" Style="color: white">&lt;&lt;</asp:LinkButton>
[Records <%= (Grid.PageIndex * Grid.PageSize)+1 %> - <%= Grid.PageIndex * Grid.PageSize + Grid.Rows.Count %> (<%= iTotalRecordCount %>)]
<asp:LinkButton CommandName="Page" CommandArgument="Next" ID="LinkButton3" runat="server" Style="color: white">&gt;&gt;</asp:LinkButton>
<asp:LinkButton CommandName="Page" CommandArgument="Last" ID="LinkButton4" runat="server" Style="color: white">&gt;|</asp:LinkButton>
</PagerTemplate>
And this one has words for First/Last as well:
<PagerTemplate>
<asp:LinkButton CommandName="Page" CommandArgument="First" ID="LinkButton1" runat="server" Style="color: white">&lt;&lt; First</asp:LinkButton>
<asp:LinkButton CommandName="Page" CommandArgument="Prev" ID="LinkButton2" runat="server" Style="color: white">&lt; Prev</asp:LinkButton>
[Records <%= (Grid.PageIndex * Grid.PageSize)+1 %> - <%= Grid.PageIndex * Grid.PageSize + Grid.Rows.Count %> (<%= iTotalRecordCount %>)]
<asp:LinkButton CommandName="Page" CommandArgument="Next" ID="LinkButton3" runat="server" Style="color: white">Next &gt;</asp:LinkButton>
<asp:LinkButton CommandName="Page" CommandArgument="Last" ID="LinkButton4" runat="server" Style="color: white">Last &gt;&gt;</asp:LinkButton>
</PagerTemplate>
One caveat, I use a variable iTotalRecordCount that is defined on the code behind:
public int iTotalRecordCount = 0;
And defined in a BindGrid() method I call on button click:
iTotalRecordCount = dataTable.Rows.Count;
Lastly, you need to implement the "OnPageIndexChanging" event:
    protected void Grid_PageIndexChanging( object sender, GridViewPageEventArgs e ) {
Grid.PageIndex = e.NewPageIndex;
BindGrid( );
}
Anyway, I hope someone out there finds this useful. :)

Aug 27, 2009

BlizzCon & the state of Warcraft

Well another BlizzCon has come & gone, but alas, this time I was left watching the con from my living room. They sold 20,000 tickets in less than 1 minute...that's insane!

One real benefit of buying the Internet Stream (not DirecTV in my house) is that I was able to watch the opening ceremony live, and then got to watch the rest of the segments "On Demand" from the website. If I had been there, it would have been "What did he say? Did I hear that correctly?" and then wait until I get to the hotel to see what the blogs/fansites were saying!

That being said, I'm writing these thoughts since Silvermoon-US is currently down, along with a BUNCH of other servers as Blizzards Battle.Net authentication network has a massive stroke. :S

Jul 9, 2009

New Mechwarrior Game Announced!!!

Woohoo, I'm sooo excited! I just read the linked article and am ecstatic to learn there's a "reboot" to the Mechwarrior series! From watching the trailer it looks AWESOME & fairly far along! Woot!

Jun 4, 2009

Warrior Caps!

Okay, so I'm trying to make sure that I've got all of my bases covered & after scouring over a TON of different posts on several sites, I believe I've compiled a concise list of the "soft caps" for a warrior. I've posted them here, so I can quit emailing myself this info & possibly help someone else out. Please feel free to comment below if my numbers are completely out of whack.

Protection-Tank:
Hit Rating: 163
Expertise (Rating): 24 (189)
Defense: 540

DPS-Fury:
Hit Rating: 165 (w/Precision)
Expertise (Rating):
- 18 (149) with Weapon Mastery
- 26 (214) without Weapon Mastery

DPS-Arms:
Hit Rating: 263
Expertise (Rating):
- 18 (149) with Weapon Mastery
- 26 (214) without Weapon Mastery

Apr 20, 2009

More Boxee Love - My BoxeeBox

Okay, so to alleviate the issues from my previous post, I'm building a "new" BoxeeBox for use as my primary Media Center. Here are the parts I'm getting:
Several GREAT features of this motherboard:
  • Integrated 780G chipset (which includes the Radeon HD3200) and is discussed in-depth at Tom's Hardware Guide.
  • HD3200 features an embedded Universal Video Decoder (UVD) providing hardware decoding support for MPEG-2, H.264 and VC-1!!! Given this sort of hardware support, Tom's said that you could even use an AMD Sempron 3500+ to play back Full-HD.
  • HDMI Output direct to HDTV
  • eSATA connection for fast access to external storage
Also, on a whim, I saw a great deal on a refurb Sony Blu-Ray drive at Buy.com ($69.99)and so I picked one up. The Blu-Ray drive got here late last week, but the rest of the parts aren't scheduled to appear until Tuesday/Wednesday. I'll fill you guys in with a more detailed report, once I get the Case/MB/CPU in-hand & start the build!

Feeling the Boxee Love - Part 2

Okay, so I've been playing with Boxee for awhile now (almost 2 months). I started out with Boxee on Ubuntu Linux and I was really excited to get to use Linux again (and avoid the hardware heavy MS operating systems). Unfortunately, I was plagued with Samba/smb issues & couldn't consistently get the sources to work. Luckily, I was invited to participate in the closed Alpha for Boxee for Windows.

So, I reformatted the hard drive, installed XP & got to work with Boxee! So, a couple things of note here:
  • Don't use UNC names (i.e. \\MyComputer\MyMovies) as a source, map it to a drive instead.
  • Don't map drives to "internal" boxee drive letters (H:, Q:, T:, U: and Z:).
I hijacked my wife's wireless keyboard/mouse to use & it makes life MUCH easier to manage/play. I was extremely impressed with how well the new nVidia software handles connection to a HDTV via DVI=> DHMI adapter. It allows you to "tweak" the settings & nailed the resolution the first time out.

All that being said, a couple other "hardware issues" I had include:
  • An old Athlon XP CPU was not "up to snuff" for playing back DVD or HD content.
  • Wireless (802.11g) introduced additional latency that caused some streaming content to be "jumpy" (especially http://trailers.apple.com).
  • Having a loud computer next to your TV sucks. :(

Apr 3, 2009

Nesting a Repeater inside of a GridView that is bound to an Array of Custom Objects

Wow, isn't that title a mouthful! But that's exactly the situation that presented itself to me at work this week. Since it too me way longer than I thought it should to figure out, I figured I'd put my effort in here, just in case it might be able to help someone else out someday (possibly even me).

Here's the results:
#NameEmail Addresses
1Ian CazabatIanCazabat@Example.com
Ian.B.Cazabat@Example.com
IanCaz@Example.com
2Malcolm ReynoldsCptnMal@Example.com
Serenity1@Example.com
3Jonas BlaneSnakeDr@Example.com
303rdLSG@Example.com


So, without any further delay here's the code:
ASPX:
<%@ Page Language="c-sharp" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Nested Sample</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:GridView ID="gvNestingSample" AutoGenerateColumns="False" runat="server" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Vertical">
<RowStyle VerticalAlign="Top" BackColor="#EEEEEE" ForeColor="Black" />
<Columns>
<asp:BoundField DataField="EmployeeId" HeaderText="#" />
<asp:BoundField DataField="EmployeeName" HeaderText="Name" />
<asp:TemplateField HeaderText="Email Addresses">
<ItemTemplate>
<asp:Repeater runat="server" ID="rptEmailAddrs" DataSource='<%# DataBinder.Eval( Container.DataItem, "EmailAddresses" ) %>'>
<ItemTemplate>
<a href="mailto:<%# Container.DataItem %>"><%# Container.DataItem %></a><br />
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="#DCDCDC" />
</asp:GridView>
</div>
</form>
</body>
</html>


CodeBehind:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page {
protected void Page_Load( object sender, EventArgs e ) {
UserAccount[ ] aryUserAccounts = new UserAccount[ ] {
new UserAccount( 1, "Ian Cazabat", new string[] {"IanCazabat@Example.com", "Ian.B.Cazabat@Example.com", "IanCaz@Example.com"}),
new UserAccount( 2, "Malcolm Reynolds", new string[] {"CptnMal@Example.com", "Serenity1@Example.com"}),
new UserAccount( 3, "Jonas Blane", new string[] {"SnakeDr@Example.com", "303rdLSG@Example.com"})
};

gvNestingSample.DataSource = aryUserAccounts;
gvNestingSample.DataBind( );
}

public class UserAccount {
private long employeeid;
private string employeename;
private string[ ] emailaddresses;

public long EmployeeId {
get { return employeeid; }
set { employeeid = value; }
}
public string EmployeeName {
get { return employeename; }
set { employeename = value; }
}
public string[ ] EmailAddresses {
get { return emailaddresses; }
set { emailaddresses = value; }
}

public UserAccount( ) {
}

public UserAccount( long lEmployeeId, string strEmployeeName, string[] aryEmails ) {
this.employeeid = lEmployeeId;
this.employeename = strEmployeeName;
this.emailaddresses = aryEmails;
}
}
}

Okay, so there you have a working sample of how to create a GridView with a nested Repeater, that gets it's data from an Array of Custom Objects. Here's a couple points of interest:
  1. In order to bind on the data in the object, they must be created as "fields" using get/set.
  2. To access the array that's part of the object use:
    DataSource='<%# DataBinder.Eval( Container.DataItem, "{Array Property Name}" ) %>'
  3. To display the "data elements" from the array, you use:
    <%# Container.DataItem %>
  4. If the "data elements" in the array are custom objects, then you need to use the following:
    <%# DataBinder.Eval( Container.DataItem, "{Property of Custom Object from Array}" )%>
Okay, so that's about got it, hopefully I've helped someone out & I've likely kept myself from losing too much sleep over this issue again! So, go forth & create! ;)

Mar 9, 2009

So much for MythTV, I'm loving Boxee!!!

Okay, I wrote quite some time ago about my experimentation with MythTV & my pursuit of a HTPC (Home Theater PC). So, the initial requirement was to be able to play my DVD's, CD's & look at pictures on my 56" TV in the living room. MythTV met this goal, but also added quite a bit of complexity when you factor in the PVR functionality that it provides.

So, after weeks of playing with MythTV, I've been turned on to Boxee! Boxee is quite simply, a digital media player, that allows me to do the following:
  • Play existing Movies - DVD, ISO, mpeg
  • Play existing Music - CD, mp3
  • Browse Photo slide-show
  • Watch on-demand streaming media from CBS, MTV, YouTube & Hulu (right now via a hack)
  • Listen to streaming audio via the internet
  • Browse photos from Flickr & Picasa
All of the media options are available using a local Optical Drive (CD/DVD), local hard drive, or across your local network via SAMBA!

A great Blog post with a fairly detailed write-up on installing Boxee on Ubuntu 8.10 can be found at the OpenSourcePenguin.net. This is a nicely detailed piece, that doesn't waste time on a lot of unnecessary fluff.

I'll be following up with another post regarding using a remote & how the rest comes along!

Feb 26, 2009

WTFs/minute

Just had to take a second & link this great comic I saw referenced on Coding Horror that explains how to recognize good code during a code review:

Jan 9, 2009

MythTv

Man, it's been a bit since I posted anything here...what a slacker.

Well, here's my newest time waster, MythTv. Several years ago, I bought a Sony 400 disc DVD changer, to keep little fingers from destroying my DVD collection (problem #1). Alas, the navigation in the unit was crummy & digging through the "library" to find a movie never really worked. I wound up putting labels in the DVD cases telling what spot the DVD was in, but this left problem #2, all the cases were still cluttering up the living room.

So, after 6+ years, I think I'm at the point where we need to move away from the beast, to a more useful solution, enter MythTv!!!

MythTv is a Digital Video Recorder (DVR) & multimedia server of sorts. It will let you watch all of your "stand alone" movies, view your pictures & listen to your music. In addition to all of this, it'll also allow you to record/pause/rewind live TV with the use of a TV Tuner Card.

Right now, I'm still infatuated with AT&T's U-Verse, so I don't really care about the DVR aspects, since U-Verse comes with a 4-tuner DRV (2-HD & 2-SD).

What I DO care about, is it's built-in ability to RIP & Playback DVD's, in addition to all of your other Media Files.

I've cobbled together a PC out of old parts, to play around with. My first cut is using MythDora which is a complete Linux distribution, based on the Fedora Core distro. Another great benefit of MythTv is that it lets you break off the server/storage part & run a dedicated "front end" for MythTv. Assuming I'm happy with how this performs, I'll be looking for a small front-end to put by my TV, while keeping the monster hidden away downstairs, or in a closet.

Ideally, there would be some way to access MythTv from my Wii, that's already taking up space. Wiire.org has some promising info based on streaming video from MythTv (Using MythWeb) to the Wii, using the Internet Channel.

Okay, enough for now...I'll post again, once I make more progress on this.

Oct 7, 2008

BlizzCon 2008!!!

This Friday & Saturday, geeks from around the world will gather in Anaheim, California to see what Blizzard, Inc. has to offer. Blizzard is responsible for franchises such as StarCraft, WarCraft & Diablo. They also infected the world with World of WarCrack, which has been present in my life for the better part of 4 years.

So, a friend of mine and I are headed out to Cali to ROCK BLIZZCON!!!