I’m running my 2nd marathon! I think…

January 24, 2011 at 1:48 pm (Personal)

Well, I’m pretty sure I’ll do it… You see, I signed up for the Salt Lake City marathon that will take place on April 16th. And my baby will be born around that date so there is a small chance that I won’t be able to run it; but I think the chance is slim.

I started training in November when I wasn’t sure if I was going to do the full marathon or just half. On my last marathon, I was having some knee pains that I didn’t want to have on any other marathon I did. But by the end of December I felt pretty good that my knee was not going to bother me.

My goal is not too hard core. I just want to run a marathon in under 4 hours without any pains.

Most marathon training programs tell you you MUST run at least 3 times a week. I’m doing 2 days of running + 1 of swimming, I wonder if that is ok?

I guess I’ll know in a bit when my long weekend runs start getting over 15 miles. Also, I’m not going for a 3 hour marathon here, just a solid “under 4 hrs” marathon.

Permalink 1 Comment

Using JavaScript to display eBay items on your website

January 9, 2011 at 12:12 pm (Computer Science)

Carol wants to start selling some craft things on eBay and I told her I would make a website for her. Since we don’t know how she’s going to do with the sales, I didn’t want to spend a lot of time creating the site.

I wanted to display her items on her new website. So I did a little research and noticed there are .NET API’s to do tons of things. Cool. But then I thought it would be quicker if there were JavaScript snippets I could just embed inside an html page. The main drawback from this is that search engines would not index the html rendered items text. But It would be super quick to create a site like that. And that’s what I want for now.

Luckily I found such Javascript snippet. I found it in a 2-year-old forum thread. This js code:

<script
    language="JavaScript"
    src="http://lapi.ebay.com/ws/eBayISAPI.dll?EKServer&si=mycutecraftstore&sid=mycutecraftstore&width=710&bdrcolor=D0C597&fntcolor=897256&lnkcolor=714F4F&fs=0&hdrcolor=D0C597&tbgcolor=FFFFFF&tlecolor=FFFFFF&endcolor=00FF00&fbgcolor=00FF00&tlfcolor=00FF00&hdrimage=1&hdrsrch=n&img=y&logo=2&num=200&numbid=y&paypal=n&popup=n&prvd=9&r0=3&shipcost=n&siteid=0&sort=MetaEndSort&sortby=endtime&sortdir=asc&srchdesc=n&tlefs=0&toolid=10004&track=5335838312&ai=aj%7Ckvpqvqlvxwkl&cid=0&eksize=1&encode=UTF-8&endtime=y">
</script>

Displays this html table:

You can tweak the values of the parameters to change the user whose items you’re displaying and other things. Here are the parameters I tweaked:

  • si: must be set to the eBay member user id
  • sid: must be set to the eBay member user id
  • width: The width of the main table. Minimum size 570px
  • fntcolor: The color of the column headers, prices, and time left
  • bdrcolor: The color of the table border, thick bottom border line, and item separator line
  • lnkcolor: The color of the text item links
  • hdrcolor: The background color of the header (where the eBay image is located)
  • img: If you want your item (product) images displayed
  • tbgcolor: The backgrould color of the entire table
  • title: Set some text to it if you want a title to appear under the eBay logo on the header
  • tlecolor: the background color of the title section. Even if there is no title, this section is one pixel high so you see a line along the bottom of the header. So if there is no title, you want to set this to the same value as tbgcolor

There is no documentation on the eBayISAPI.dll and there are tons of forums complaining about that. This means the eBay guys created this for internal use or the dll will dissapear some day. But I’m still going to use it. I noticed the dll is used on the “Text-only format” version of the item search results, so it might be around for a long time.

Permalink 3 Comments

Follow

Get every new post delivered to your Inbox.