Archive for November 21, 2008

Please remain seated…


Source: engrishfunny.com

乾杯!
Cheers!

Scrollable, non-editable text box

I think I just spent like 1.5 – 2 hours of my (work) time, figuring out how to make a scrollable, non-editable text box that displays code. If you look at my previous post, I had black boxes that display a single line of code in each. I had trouble displaying multiple lines of code on here. At one point, I would get it to scroll but it was editable and then after that it would not scroll but it’d be non-editable. INSANE.

The code you want displayed probably looks like this “<html>” with the arrows. If you wanted to display this (instead of rendering it), you’d have to replace the less than sign with the character entity &lt; and the same with the greater than sign &gt;. If you did “<html>”, it’ll get rendered and that’s not what you want.

Here is some (sample) code that makes the scrollable, non-editable text box:

<pre class="code">
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Welcome to my site!&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;HELLO WORLD&lt;/p&gt;
&lt;p&gt;HELLO WORLD&lt;/p&gt;
&lt;p&gt;HELLO WORLD&lt;/p&gt;
&lt;p&gt;HELLO WORLD&lt;/p&gt;
&lt;p&gt;HELLO WORLD&lt;/p&gt;
&lt;p&gt;HELLO WORLD&lt;/p&gt;
&lt;p&gt;HELLO WORLD&lt;/p&gt;
&lt;p&gt;HELLO WORLD&lt;/p&gt;
&lt;p&gt;HELLO WORLD&lt;/p&gt;
&lt;p&gt;HELLO WORLD&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>

The results that will be displayed on your page:

<html>
<head>
<title>Welcome to my site!></title>
</head>
<body>
<p>HELLO WORLD</p>
<p>HELLO WORLD</p>
<p>HELLO WORLD</p>
<p>HELLO WORLD</p>
<p>HELLO WORLD</p>
<p>HELLO WORLD</p>
<p>HELLO WORLD</p>
<p>HELLO WORLD</p>
<p>HELLO WORLD</p>
<p>HELLO WORLD</p>
</body>
</html>

To make it look nice, we’ll use some CSS. Feel free to use my code and modify to your own liking. My “code” class looks like this:

.code {
width: 450px;
height: auto;
background-color: #000000;
color: #FFFFFF;
font-family: Georgia, "Times New Roman", Times, serif;
border: 1px dashed #FFFFFF;
padding: 6px 3px 6px 3px;
margin-left: 15px;
overflow: auto;
}

So, today, I’ve learned two new things already… favicons and scrollable, non-editable text boxes displaying code!!! KEWLIEZ!

If you happen to understand my tutorial, I’d appreciate you dropping me a comment and letting me know. Thanks!

乾杯!
Cheers!

Favicon

A favicon is short for “Favorites Icon.” Many professionally developed websites include a favicon. The original favicon was created by Microsoft for Internet Explorer. In IE, the favicon is shown in the navigation bar (where the URL is) and also in the Favorites menu. Even though other browsers like Mozilla Firefox have a “Bookmarks” menu instead of “Favorites”, the name “favicon” stuck.

As you would have assumed, the image is pretty simple since it would be difficult to create a fancy picture for something so small. Implementing the favicon is relatvely simple. The favicon image must be 16×16. Then, you would upload the file (.ico, .gif, .png all work) to the root directory of your website and it will automatically display for you. If you can’t see it right away, you’ll probably just have to clear your cache – that’s what I had to do. If you can’t upload to a root directory, you can type a block of code into your html page in the <head&> tag.

.ico image:

<link rel="icon" href="/favicon.ico">

OR

<link rel="icon" href="/favicon.ico" type="image/x-icon">

.png image:

<link rel="icon" href="/favicon.png" type="image/png">

.gif image:

<link rel="icon" href="/favicon.gif" type="image/gif">

For favicons on Google Blogger (Blogspot), you’d have to insert this code just before the </head> tag:

"<link href='http://pathto.youricon.png' rel='icon' type='image/vnd.microsoft.icon'/>

Favicon.com is a great resource for favicons!

乾杯!
Cheers!

Our first biracial President of the United States

Who else is annoyed that Barack Obama is announced by the media as our first “black” or “African-American” president? He is not 100% African-American. His mother is a Caucasian woman from Kansas and his dad is a man from Kenya. He is biracial. Get the term right people! I wonder how many people don’t know that Obama is actually half white and half black because of the misrepresentation by the media.

乾杯!
Cheers!

National Public Radio

NPR is a non-profit media organization that produces and distributes news and cultural programming. Through NPR, I’ve learned about the 2008 election, financial crisis and general news that’s happening in the United States. I owe many thankyous to NPR for providing me 8.5 hours of audio entertainment while I sit at my desk at work. Before I started listening to NPR everyday at work, I was undecided as who I wanted to vote for to be President. I have voted before – this time around, I just never got to know any of the candidates. I didn’t bother to. As an American, voting is my civic duty. If I choose not to, I am disgracing those who fight and give up their lives for this right to vote. Now, I feel bad that I didn’t care as much as I should have at first. Anyway, after listening to NPR for 3 or 4 weeks straight, NPR encouraged me to be an American and vote for who I want my next President to be. And so, I did.

After this whole Obamamia thing blows over, I wonder what they will talk about on NPR. For the last 4 weeks, all they have been talking about is McCain and Obama. The weekend edition of NPR is great as well. It’s actually “fun”. I enjoy listening to the Car Talk show with Daniel <3 乾杯!
Cheers!

Naked

Today I tried a Naked Bare Breeze Watermelon Chill. The ingredients include: white grape juice from concentrate, watermelon juice from concentrate, lime juice, apple juice, strawberry puree, aronia juice concentrate, natural flavors, vitamin c, vitamin b, vitamin b5, vitamin b6, and vitamin b12. My initial thought was: Cool! I can actually taste the watermelon flavor in this, wait, what’s this… limey taste to it? …indeed it was lime juice. I didn’t read the label until after I took my first sip of course :-p Overall, the taste is good – the lime is kinda weird but bearable. The Watermelon Chill is a “refresher” – a thin drink.

This is much better than the last Naked drink I tried – the Green Machine. It was ok, but the after taste was nasty, you could really taste the broccoli, wheat, garlic, etc. The best Naked drink I’ve had so far though is the Mighty Mango. It’s a thicker smoothie drink… like the Green Machine. It’s very mangoey!!

乾杯!
Cheers!

Stoney Creek Inn

Stoney Creek Inn offers steamed crabs year-round for eat in, take out and shipped next day. This restaurant was featured on Diners, Drive-ins, and Dives with Guy Fieri on Food Network. The seasoning rub they use on their crabs looked really good. Their website doesn’t say what the prices are since they offer different sizes but I’m assuming its not cheap :-p I bet it’s really good though! Stoney Creek Inn has a variety of crab dishes – crab cakes, fried hard crab, soft crabs, Maryland blue crabs, crab pretzel, crab toast, crab soup and more! There are also other non-crab items – check out their menu to see a full list of what they serve!

Maybe we’ll find our way to Stoney Creek Inn one day.

Stoney Creek Inn
8238 Ft. Smallwood Road
Baltimore, MD 21226
(410) 439-3123

乾杯!
Cheers!