Blabberbox:Random blog-like posts from pftq.Share on Twitter

Kokoro

January 25th, 2010 | Posted by pftq in Recently Read | #
Kokoro by Natsume Sōseki
191 unique view(s)

Embedding Stock Charts on SMF Forums

December 28th, 2009 | Posted by pftq in Blabberbox | #

So I was looking for a way to embed stock charts into posts for SMF Forums, probably via bbcode or tags. I checked Google all morning and couldn’t find it though. If it exists, please redirect me because I’m sure it’ll be much better than my makeshift solution. :P

In the meantime, I modified my forums to use a tag called [schart]. When someone types [schart]SYMBOL[/schart], it shows the stock chart in its place.
The editing isn’t complicated, but you need another site to embed from. Right now, I’m using Wikinvest, but it’s a bit slow and heavy (it’s interactive and flash, fancy stuff). If anyone knows a good, fast-loading static one, it’d be nice to know. :D

For the code, go to Sources/Subs.php and find “function parse_bbc”.
At the end of the $codes array, or after:

array(
‘tag’ => ‘white’,
‘before’ => ‘<span style=”color: white;”>’,
‘after’ => ‘</span>’,
),

Insert:

//Moddie Stock Charts
array(
‘tag’ => ’schart’,
‘type’ => ‘unparsed_content’,
‘content’ => ‘<script src=”
http://charts.wikinvest.com/wikinvest/wikichart/javascript/scripts.php” type=”text/javascript”></script><div id=”wikichartContainer_645B01FB-’.($srand=rand(1000,9999).’-’.rand(1000,9999)).’-$1-D729C4917DE2″><div style=”width: 390px; text-align: center; vertical-align: center; margin-top: 22px;”><a href=”http://get.adobe.com/flashplayer/”><img src=”http://cdn.wikinvest.com/wikinvest/images/adobe_flash_logo.gif” alt=”Flash” style=”border-width: 0px;”/><br/>Flash Player 9 or higher is required to view the chart<br/><strong>Click here to download Flash Player now</strong></a></div></div><script type=”text/javascript”>if (typeof(embedWikichart) != “undefined”) {embedWikichart(”http://charts.wikinvest.com/WikiChartMini.swf”,”wikichartContainer_645B01FB-’.$srand.’-$1-D729C4917DE2″,”390″,”245″,{”ticker”:”$1″,”liveQuote”:”true”,”showAnnotations”:”false”,”rollingDate”:”6 months”});}</script>’
),

Usually the chart ID (container) is set so that you can save changes to the chart, but I’m really just looking for the chart display alone. The ID is randomized so that you don’t have to create a new chart at Wikinvest each time. The problem might be that you accidentally use the ID of an existing chart, but the chance of that should be relatively small (and even so, you’re not making changes to the saved chart).

Of course, if anyone knows a chart that doesn’t need an ID or settings to be saved, that’d be even better. I’m still looking for one right now, but this is what I’m using in the mean time. :)

Update 20100112:
Found a few other sources for charts. This one loads quickly as an image: http://www.profitspi.com/

Just replace the content code with:

‘content’ => ‘<img src=”http://www.profitspi.com/stock-chart-str.aspx?id=$1&amp;ca=24062939″ alt=”$1″ />’

987 unique view(s)

Sea of Elegance

December 27th, 2009 | Posted by pftq in Stuck in My Head | #
Sea of Elegance by ChaotixMachine
86 unique view(s)

Immortality

December 11th, 2009 | Posted by pftq in Stories | #

  You often see movies or books about people who can never die, but usually they also heal super fast from any wound or injury.  Just a thought on my end, but what if you can never die, but you heal at a normal rate?

  The scary part about this is that the normal person can relate since no fast healing is involved.  The person in the character is essentially still conscious no matter what happens.  What’s to say this doesn’t occur in real life? Obviously you can’t heal from everything or live forever, but what’s to say your consciousness doesn’t continue drift along out there?

  It probably wouldn’t work that well as a film because you can’t show the inside of someone’s mind (supposing you take a first person perspective).  From an outside observer though, that might work.  Ideally, a book would work better so you can see the main character’s thoughts.

  The story…[More]

726 unique view(s)

Gymnopedie No.1

December 11th, 2009 | Posted by pftq in Stuck in My Head | #

Gymnopedie No.1 by Erik Satie (Cafe Del Mar interp.)

228 unique view(s)

Eye of the Beholder

December 8th, 2009 | Posted by pftq in Thought of the Day | #

Reality is in the eye of the beholder.

268 unique view(s)

Lava Reef 2 Orchestral

December 6th, 2009 | Posted by pftq in Stuck in My Head | #
Lava Reef 2 Orchestral by constromlie
80 unique view(s)

Loss of Innocence

December 4th, 2009 | Posted by pftq in Thought of the Day | #
If you lose the dreams, passion, and innocence you once had as a child,
then you never had them in the first place.
239 unique view(s)

Diversity

November 30th, 2009 | Posted by pftq in Thought of the Day | #
Society promotes diversity but becomes less diverse over time.
237 unique view(s)

Running for Walking

November 23rd, 2009 | Posted by pftq in Thought of the Day | #

It hurts to walk
…That’s why you run!

239 unique view(s)

Sleeping

November 13th, 2009 | Posted by pftq in Thought of the Day | #

Sleeping is like dying only to come back.

220 unique view(s)

Undo

November 6th, 2009 | Posted by pftq in Stories | #
This is an idea that came to me for possibly a short video ad of some sort.  Promotes safer driving I guess, but really.. change the ending and it could promote a lot of things.

  Scroll through a series of scenes showing every day life.  Closer shots show they are actually running backwards.  Over time, we see that these are all mistakes that people make (spilling coffee, breaking tables, etc) that are fixed by going backwards in time.

  Eventually we come to the scene of a car accident with a car pinning a helpless victim to a tree.  The scene running backwards, however, does not solve the issue.  The car pulls away and the victim slides to the ground.  The car is intact - in fact, it's brand new - but the person is still dead.
786 unique view(s)

World Changes

November 6th, 2009 | Posted by pftq in Thought of the Day | #
Change the world, but don't let it change you.
262 unique view(s)

Walls Have Ears

November 5th, 2009 | Posted by pftq in Thought of the Day | #

The walls have ears. The windows have eyes. The doors have teeth.

235 unique view(s)

Expecting

October 17th, 2009 | Posted by pftq in Thought of the Day | #

To want something but not expect it is not to have it.

262 unique view(s)

Defying Physics

October 16th, 2009 | Posted by pftq in Thought of the Day | #
It takes knowledge to defy the laws of superstition.
It takes the lack-thereof to defy the laws of physics.
275 unique view(s)

Judging Open Minds

October 13th, 2009 | Posted by pftq in Thought of the Day | #
Judging an open mind is like throwing a rock through an open window.
243 unique view(s)

Motives

October 12th, 2009 | Posted by pftq in Thought of the Day | #
We envision heroes as those who act without motive but become suspicious of people who actually have no motive.
255 unique view(s)

Friend in the Shadows

September 30th, 2009 | Posted by pftq in Stories | #
     A man is traveling with his family and gets stranded in a dark cave.  He is alone and trapped in a large pit within the cave.  Fortunately, there is a stream of sunlight reaching down towards one end of the pit and plants are growing there.  From these few crops he is able to survive.  Later he also climbs down rocks deeper into the cave where it's darker and discovers a river where he can catch fish.

     The whole time he is alone until he one day notices someone standing in the shadows on the other side of the river.  The person can't really be seen and is just a dark figure.  The man calls and waves out.  The person doesn't say anything, but the man assumes it's because they're too far apart to hear each other.  However, the person seems to motion or signal back before fading back into the shadows.

     The man doesn't see this person again until one day he injures himself along...[More]
605 unique view(s)

Peace

September 26th, 2009 | Posted by pftq in Thought of the Day | #

When your mind is at peace, your mind isn’t doing anything and you are doing nothing and it is the same thing a mind does when it is dead.

274 unique view(s)