Skip to main content

Life Why Are You So Fucked Up?

Ever wonder why this life is so messed up? I sure as hell do! I don’t get it. I mean we’re here for a reason…maybe. I don’t understand anything about it though. I wish I did, it would be nice to be able to grasp something about this life and not simply expect it to be here whenever we need it to be. Yet that’s exactly what we do! We expect life to be here for us and we don’t want to give anything back, talk about an annoying thought process. But what are we going to do about it all? I don’t know. I wish I did, but there are so many things in this life that don’t quite make sense at times, and we are here trying to make sense of them all. It sucks, it really does. But what else are you supposed to do about it? I don’t know.
Here's a simple HTML class in Java for creating a very simple HTML page.



package com.dreamsense.html;
/**
* HTML Elements
* 

HTML Elements is a class that contains some basic Elements * for creating a basic HTML document. * @author Kyle Eggleston * @version 1.0 * @since 1.0 **/ public class Html { /** * Heading 1 **/ public static String H1 = "h1"; /** * Heading 2 **/ public static String H2 = "h2"; /** * Heading 3 **/ public static String H3 = "h3"; /** * Heading 4 **/ public static String H4 = "h4"; /** * Heading 5 **/ public static String H5 = "h5"; /** * Heading 6 **/ public static String H6 = "h6"; /** * Paragraph **/ public static String P = "p"; /** * address **/ public static String ADDRESS = "address"; /** * HR **/ public static String HR = "hr"; /** * BR **/ public static String BR = "br"; /** * HTML Document Title **/ public String title; private StringBuilder sb = new StringBuilder(); /** * Construct HTML * @return this * @param element The HTML Element **/ public Html addElement(String element) { sb.append(String.format("<%s/>",element)) .append("\n"); return this; } /** * Construct HTML * @return this * @param element The HTML Element * @param text The text that goes in the Element **/ public Html addElement(String element, String text) { sb.append(String.format("<%s>%s", element, text, element)) .append("\n"); return this; } /** * Construct HTML * @return this * @param element The HTML Element * @param text The text that goes in the Element * @param id The id of the Element **/ public Html addElement(String element, String text, String id) { sb.append(String.format("<%s id=\"%s\">%s<%s>", element, id, text, element)) .append("\n"); return this; } /** * Sets the title of the HTML document * @param title The title of the HTML document * @return this **/ public Html setTitle(String title) { this.title = title; return this; } /** * Returns the title of the HTML document * @return The title of the HTML document **/ public String getTitle() { return this.title; } /** * Generate html * @return Returns generated html **/ public String build() { StringBuilder main = new StringBuilder(); main.append("\n\n") .append(title) .append("\n\n").append("\n") .append(sb.toString()) .append("\n"); return main.toString(); } }

Comments

Popular posts from this blog

Schizoaffective Disorder

I want to say it first began in High School when I thought I was trying to beat the devil. Now when I say I was "trying to beat the devil", I mean I actually thought I was hearing the devil speak to me at night and that I had to find some way to overcome him. Looking back I should have sought professional help then. I remember telling a friend about this experience, and he looked at me like I was nuts. Talk about craziness right? Yeah something like that. I believe my first mental break was when I was serving a mission for The Church of Jesus Christ of Latter-Day Saints . I wanted to go home so bad. It could have just been homesickness . But...there was something more to it. About halfway through I was just done with it all. I had had enough of rejection and wanted to go home. But I was afraid that I was unable to because I would simply be told no . I know that sounds silly to people. But that's what happened. I didn't b...

Didn't Sleep

 What's the point of sleep anymore if I can't sleep? I don't think I slept any good last night. I was awake at 3 am wondering to myself, what on earth am I doing awake? Yeah, that happened. It doesn't make any sense. Fortunately, it's the weekend. So, I can catch up on sleep tonight. I don't have to be anywhere tomorrow, so it's a good opportunity to actually sleep for once. Whatever the case, I hope I'll be able to fall asleep and stay asleep. We will see what happens.

ColdFusion

So recently, I decided to include ColdFusion in my Linux setup. I was going to just run Tomcat and install CF that way, but well I decided against that route and installed ColdFusion 9 using the regular methods. It's been running quite smoothly if I do say so myself. I of course don't have the installation instructions anymore. Oops. I suppose I could Google for them again and make a copy or something. But well if my server ever crashes and I have to start all over again, yeah I'll worry aobut it then. FOr now, not so much. So here's my current setup: MySQL PHP Perl ColdFusion 9 Yeah something like that. Not too bad if I do say so myself. Of course what else would I say about it? You know I wouldn't ever say anything bad about my own server setup. Well unless I already have, if that's the case. Oops. Disregard that blog post. So yep, I think I'll have some fun with all of that for sure.