<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Benaiah's Computer Experiences</title>
	<atom:link href="http://benaiah41.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://benaiah41.wordpress.com</link>
	<description>My everyday experiences with computers.</description>
	<lastBuildDate>Fri, 27 Nov 2009 05:42:02 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='benaiah41.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/56d14aa55ce8690efff250a8067d5103?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Benaiah's Computer Experiences</title>
		<link>http://benaiah41.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://benaiah41.wordpress.com/osd.xml" title="Benaiah&#8217;s Computer Experiences" />
		<item>
		<title>Exceptional Code Comments</title>
		<link>http://benaiah41.wordpress.com/2009/11/26/exceptional-code-comments/</link>
		<comments>http://benaiah41.wordpress.com/2009/11/26/exceptional-code-comments/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 05:41:24 +0000</pubDate>
		<dc:creator>Benaiah</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code comments]]></category>

		<guid isPermaLink="false">http://benaiah41.wordpress.com/?p=68</guid>
		<description><![CDATA[The code below is not exceptional in itself&#8230;however, the comments that were provided by a friend are extremely exceptional and well worth the read!

/**********************************************************
 * Student Name: Benaiah Henry
 * Course: COSC 4303
 * Package: Server
 * File name: ConnectionHandler.java
 *
 * Purpose:
 *
 * Development Computer: Dell Dimenstion E520
 * Operating System: Ubuntu 9.10
 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benaiah41.wordpress.com&blog=1321834&post=68&subd=benaiah41&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The code below is not exceptional in itself&#8230;however, the comments that were provided by a friend are extremely exceptional and well worth the read!</p>
<blockquote>
<pre>/**********************************************************
 * Student Name: Benaiah Henry
 * Course: COSC 4303
 * Package: Server
 * File name: ConnectionHandler.java
 *
 * Purpose:
 *
 * Development Computer: Dell Dimenstion E520
 * Operating System: Ubuntu 9.10
 * Integrated Development Environment (IDE): Netbeans IDE 6.7.1
 * Compiler: javac
 **************************************************************/
import java.net.*;
import java.io.*;
import java.util.*;
<span style="color:#0000ff;">
/**
 * This handles the connection (not MANAGE, HANDLE) Management is an entirely
 * different class which probably involves lots of pointy ears, walking around,
 * and looking for the token ring under the desk (it's very small and hard to
 * find). But that's not this class.
 *
 * This class is more like Dogbert. It smacks you upside the head, tells you
 * things you need to know but won't listen to, and walks away with the money.
 * That's what happens when we throw an exception here - Dogbert takes the money.
 * @author Benaiah Henry
 */</span>
public class ConnectionHandler {

   ServerSocket serverSocket;
   ResultHandler resultHandler;
   String serverIP;
   ArrayList&lt;ConnectedUser&gt; connectedUsers;
   //ArrayList&lt;ServerSocket&gt; serverSockets;
   public static final int DEFAULT_PORT = 1234;
   public static final int MAX_CLIENTS = 500;
   public static final int ACCEPT_TIMEOUT_LENGTH = 10;
   public static final int SHORT_STRING = 32;

   /**
    *
    * @throws java.io.IOException
    */
   public ConnectionHandler(ResultHandler resultH) {
      resultHandler = resultH;
      try {
         connectedUsers = new ArrayList&lt;ConnectedUser&gt;();
         //serverSockets = new ArrayList&lt;ServerSocket&gt;();

         InetAddress localIP = InetAddress.getLocalHost();
         serverIP = localIP.getHostAddress();

         serverSocket = new ServerSocket(DEFAULT_PORT, MAX_CLIENTS);

         serverSocket.setSoTimeout(5);

      } catch (IOException e) {
         System.err.println("Failed to create ServerSocket");
      } // End Try/Catch
   } // End Constructor

  <span style="color:#0000ff;"> /*
    * Have you ever been bothered by how none of the clocks anywhere agree
    * with each other? Have you ever just wanted a short little method
    * that would synchronize everything? That would just update and make
    * standardized time work? Yes we can!
    * But this is not that method...
    */</span>

   //**************************************************************/
   /**
	* Checks for new data from all clients
	*/
   public void update() {
      ConnectedUser temp = null;

      for (int i = 0; i &lt; connectedUsers.size(); i++) {
         temp = connectedUsers.get(i);
         readFromClient(temp.getSocket(), temp.getDataInputStream(), temp.getDataOutputStream(), i);
      } // End for

   } // End update

   //**************************************************************/
   /**
	* Checks a serverSocket for new client connections
	*<span style="color:#0000ff;"> And Asks accounting department to cut check to our wonderful clients</span>
	*
	*/
   public void checkForClients() {
      DataOutputStream out;
      DataInputStream in;
      Socket connection;
      InetAddress tempIP;
      String IP;

      try {

         connection = serverSocket.accept();
         //connection.getChannel().configureBlocking(false);

         //System.err.println("after connection made");

         in = new DataInputStream(connection.getInputStream());
         out = new DataOutputStream(connection.getOutputStream());
         tempIP = connection.getInetAddress();
         IP = tempIP.toString();

         //System.err.println("after ip string");

         <span style="color:#0000ff;">// create a new user ex nihilo</span>
         connectedUsers.add(new ConnectedUser(IP, null, connection, in, out));

      //System.err.println("after add user");
      } catch (SocketTimeoutException e) {
         System.err.println("accept timeout - continuing execution");
      } catch (IOException e) {
         System.err.println("socket accept failed");
      } // End Try/Catch
   } // End checkForClients

   //**************************************************************/
   /**
    *
    * @param connection The socket to read from
    * @param in	The DataInputStream of the connection
    * @param out The DataOutputStream of the connection
    * @param index Index of the client to read from
    */
   public void readFromClient(Socket connection, DataInputStream in, DataOutputStream out, int index) {
      int msgTypeID;

      try {
         connection.setSoTimeout(5);
         msgTypeID = in.readInt();

         switch (msgTypeID) {
            case 100:
               process100(in, index);
               break;
            case 300:
               process300(in, index);
               break;
            case 900:
               process900(index, connection, in, out);
               break;
            default:
               System.err.println("Invalid message code");
               break;
         } // End switch
      } catch (IOException e) {
         System.err.println("No data from client");
      } // End Try/Catch
   }// End readFromClient

   /**
    <span style="color:#0000ff;">* The wonderful processing method</span>
    * @param in A DataInputStream
    * @param index Index of client
    */
   private void process100(DataInputStream in, int index) {
      String alias = null;
      byte[] temp = new byte[SHORT_STRING];

      try {
         for (int i = 0; i &lt; SHORT_STRING; i++) {
            temp[i] = in.readByte();
         }
         alias = new String(temp).trim();
         connectedUsers.get(index).setAlias(alias);
         System.out.println(alias);
      } catch (IOException e) {
         System.err.println("Failed to process 100 message");
      }
   }

   /**
    <span style="color:#0000ff;">* The other wonderful processing method, but 3 times better than the first one</span>
    * @param in A DataInputStream
    * @param index Client index
    */
   private void process300(DataInputStream in, int index) {
      int questionNum = 0;
      boolean didAnswer = false;	    <span style="color:#0000ff;">// yes, I know this is bad grammar</span>
      int timeTaken = 0;	      	   <span style="color:#0000ff;"> // careful, there will be problems if the user takes longer than 49,710 days to answer</span>
					   <span style="color:#0000ff;"> // if you think that's too long, consider using 'long'</span>
      String answer = null;
      byte[] temp = new byte[SHORT_STRING];

      try {
         questionNum = in.readInt();
         didAnswer = in.readBoolean();
         timeTaken = in.readInt();
         for (int i = 0; i &lt; SHORT_STRING; i++) {
            temp[i] = in.readByte();
         } // End for
         answer = new String(temp).trim();
      } catch (Exception e) {
         System.err.println("Failed to process 300 message");
      } // End Try/catch

      resultHandler.storeAnswer(questionNum, didAnswer, timeTaken, answer, connectedUsers.get(index).getIPAddress());
   } // End process300

<span style="color:#0000ff;">   /*
    * Some of you may be wondering why process900 sends 999. Let me explain:
    * Process 0 was created.
    * process 0 begot process 100. Process 0 lived for
    * 425 seconds and had other sons and daughters.
    * Process 100 begot process 200. Process 100 lived for
    * 511 seconds and had other sons and daughters.
    * Process 200 begot process 300. Process 200 lived for
    * 441 seconds and had other sons and daughters.
    * Process 300 begot process 400. Process 300 lived for
    * 225 seconds and had other sons and daughters.
    * Process 400 begot process 500. Process 500 lived for
    * 311 seconds and had other sons and daughters.
    * Process 500 begot process 600. Now process 500 lived in the days of
    * Windows ME. Dark were the times, and wild ran the memory manager.
    * Process 500 lived 23 seconds and had no other children. Then it seg-faulted.
    * Process 600 begot process 700. Process 600 lived for
    * 259 seconds and had other sons and daughters.
    * Process 700 begot process 800, who was lost in the upgrade to Vista.
    * Process 700 begot process 900 (after confirming "allow" 71942 times.
    * Children can be quite a security risk). Process 700 lived for
    * 111 seconds and had other sons and daughters.
    *
    * Now process 900 walked with the kernel, and had many sons
    * and daughters. It was granted a large memory footprint, and the
    * exclusive use of 2 CPU cores, plus direct access to the PCI bus.
    * Having so much wealth to manage, Process 900 diligently instructed
    * his children, giving to some 10mb, to other 100mb, and to some whole
    * gigabytes of memory. Thus was process 999, son of process 900,
    * alloted communication with the first 13 pins of the card in 2nd PCI
    * slot (which happens to be the NIC), and is thus responsible for
    * for sending poetry, free chicken sandwich coupons, and instructions
    * on building to-scale parking garages on the kitchen table without
    * creating multi-car pileups.
    */</span>

   //**************************************************************/
   /**
	*
	* Closes the connections
	* @param index Index of client to close connections for
	* @param connection The socket of the client
	* @param in DataInputStream of connection
	* @param out DataOutputStream of connection
	*/
   private void process900(int index, Socket connection, DataInputStream in, DataOutputStream out) {
      send999(connectedUsers.get(index).getAlias(), out);

      try {
         in.close();
         out.close();
         connection.close();
      } catch (Exception e) {
         System.err.printf("Failed to close connection for client at IP address: %s", connection.getInetAddress().toString());
      } // End Try/Catch
   } // End process900

   //**************************************************************/
   /**
	* Send Connection has been closed
	* @param alias Username of client
	* @param out DataOutputStream of client
	*/
   private void send999(String alias, DataOutputStream out) {
      try {
         out.writeInt(999);
         writeString(alias, SHORT_STRING, out);
      } catch (IOException e) {
         System.err.println("Failed to send 999 message");
      } // End Try/Catch
   } // End send999

   /**
	* Writes strings to a DataOutputStream.  Either truncates at size, or pads with 0's to size.
	*
   <span style="color:#0000ff;"> * Cutting a string would be more fun, but such is life</span>
	*
    * @param s
    * @param size
    * @param out
    */
   private void writeString(String s, int size, DataOutputStream out) {
      try {
         if (s.length() &lt; (size - 1)) {
            out.writeBytes(s);

            for (int i = 0; i &lt; (size - s.length()); i++) {
               out.writeByte(0);
            } // End for
         } else if (s.length() &gt; (size - 1)) {
            s = s.trim().substring(0, (size - 1));
            out.writeBytes(s);
            out.writeByte(0);
         } else {
            out.writeBytes(s);
            out.writeByte(0);
         } // End if/else if/else
      } catch (IOException e) {
         System.err.println("Write failed");
         System.exit(-1);
      } // End Try/Catch
   } // End writeString

   //**************************************************************/
   /**
	* Send the question to all clients
	* @param questionNum Number of the question
	* @param questionType Type of question as an int
	* @param timeLimit Time limit on question
	* @param tallyMode Force tally mode
	* @param optionCount Number of answer options
	* @param questionText The question
	* @param answerOptions All answer options concatenated and separated by ascii "04"
	*/
   public void sendQuestion(int questionNum, int questionType, int timeLimit, boolean tallyMode, int optionCount, String questionText, String answerOptions) {
      ConnectedUser temp = null;
      DataOutputStream out;

      try {
         for (int i = 0; i &lt; connectedUsers.size(); i++) {
            temp = connectedUsers.get(i);
            out = temp.getDataOutputStream();

            out.writeInt(200);
            out.writeInt(questionNum);
            out.writeInt(questionType);
            out.writeInt(timeLimit);
            out.writeBoolean(tallyMode);
            out.writeInt(optionCount);
            writeString(questionText, 256, out);
            writeString(answerOptions, 256, out);
         } // End for
      } catch (IOException e) {
         System.err.printf("Failed to send 200 message to IP address %s", temp.getSocket().getInetAddress().toString());
      } // End Try/Catch
   } // End SendQuestion

  <span style="color:#0000ff;"> //The llama in the sky has recieved your request
   //but your question is judged as causing unrest
   //the words are malicious
   //puncuation sadicious
   //we'll have to correct for success</span>

   //**************************************************************/
   /**
	* Send the correct answer to clients
	* @param isCorrect Whether the answer was correct
	* @param timeTaken How long it took to answer
	* @param submittedAnswer Client's submitted answer
	* @param correctAnswer Correct answer
	*/
   public void sendGradedQuestion(boolean isCorrect, int timeTaken, String submittedAnswer, String correctAnswer) {
      ConnectedUser temp = null;
      DataOutputStream out;

      try {
         for (int i = 0; i &lt; connectedUsers.size(); i++) {
            temp = connectedUsers.get(i);
            out = temp.getDataOutputStream(); //check for actual function name

           <span style="color:#0000ff;"> //we sent a 400 (I don't know why)
            //I would have chosen 3,4, or pi
            //but no one asked me
            //or revealed the design
            //no diagrams, no tree
            //(they charged a $10 fine)</span>
            out.writeInt(400);
            out.writeBoolean(isCorrect);
            out.writeInt(timeTaken);
            writeString(submittedAnswer, 32, out);
            writeString(correctAnswer, 32, out);
         } // End for
      } catch (IOException e) {
         System.err.println("Failed to send 400 message to all clients");
      } // End Try/Catch
   }// End sendGradedQuestion

   //**************************************************************/
   /**
	* Send notification of end of set to all clients
	*/
   public void sendEndOfSet() {
      ConnectedUser temp = null;
      DataOutputStream out;

      try {
         for (int i = 0; i &lt; connectedUsers.size(); i++) {
            temp = connectedUsers.get(i);
            out = temp.getDataOutputStream();

            out.writeInt(500);
         } // End for
      } catch (IOException e) {
         System.err.println("Failed to send 500 message to all clients");
      } // End Try/Catch
   }// End sendEndOfSet

   //**************************************************************/

   public String getServerIP() {

      return serverIP;
   } // End getServerIP

   //**************************************************************/

   public int getConnectedUserCount() {

      return connectedUsers.size();
   } // End getConnectedUserCount
}// End ConnectionHandler

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/**********************************************************
 * Student name: Benaiah Henry
 * Course: COSC 4303
 * Package: Client
 * File name: ConnectionManager.java
 *
 * Purpose: Handles reading and writing to the network.
 *			Also passes information to controller to be give
 *		    to the UI.
 *
 * Development Computer: Dell Dimenstion E520
 * Operating System: Ubuntu 9.04
 * Integrated Development Environment (IDE): Netbeans IDE 6.7.1
 * Compiler: javac
//**************************************************************/
import java.net.*;
import java.io.*;
import java.util.*;

/**
 * Handles network connection between client and server
 *
<span style="color:#0000ff;"> * In the beginning was the connection. And the connection was with packets, but
 * the connection was without packets. It was without packets in the beginning.
 * Thus, we created this manager.</span>
 *
 * @author Benaiah Henry
 * @version e/pi
 */
public class ConnectionManager {

   Socket clientSocket;
   DataOutputStream out;
   DataInputStream in;
   BufferedReader inString;
   Controller controller;
   public static final int MAX = 32;
   public static final int SHORT_STRING = 32;
   public static final int LONG_STRING = 256;

   /**
    *
    * @param controllerRef  Reference to Controller
    */
   public ConnectionManager(Controller controllerRef) {
      controller = controllerRef;
   } // End constructor

   //**************************************************************/
   /**
    * Connect to the Clickermatic server
    * @param address IP Address of server
    * @param port Port on server
    * @param alias Username
    */
   public void logIn(String address, int port, String alias) {
      try {
         clientSocket = new Socket(address, port);
         in = new DataInputStream(clientSocket.getInputStream());
         inString = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
         out = new DataOutputStream(clientSocket.getOutputStream());
      } catch (IOException e) {
         System.err.println("Connection Failed");
         System.exit(-1);
      } // End Try/Catch

     <span style="color:#0000ff;"> //thus spake the Grand Llama. And the earth was silent as the grand
      //message broke forth upon the ocean of packets and soughdough bread (for
      //the internet has been filled, since the beginning with bakery goodness).</span>

      sendHello(alias);
   } // End logIn

   //**************************************************************/
   /**
    * Send HELLO (100) packet
    * @param alias Username  <span style="color:#0000ff;"> ***Can we make it amphibious???</span>
    */
   private void sendHello(String alias) {
      try {
         out.writeInt(100);
         writeString(alias, SHORT_STRING);
      } catch (IOException e) {
         System.err.println("Failed to send HELLO");
         System.exit(-1);
      } // End Try/Catch
   } // End sendHello

   //**************************************************************/
   /**
    * Send user answer to server
    * @param questionNumber
    * @param answeredInTimeLimit
    * @param elapsedTime
    * @param clientAnswer
    */
   public void submitAnswer(int questionNumber, boolean answeredInTimeLimit,
           int elapsedTime, String clientAnswer) {
      try {
         out.writeInt(300);
         out.writeInt(questionNumber);
         out.writeBoolean(answeredInTimeLimit);
         out.writeInt(elapsedTime);
         writeString(clientAnswer, SHORT_STRING);
      } catch (IOException e) {
        <span style="color:#0000ff;"> //alas!! The soughdough bread hath clogged the message! Retreat, and
         //contemplate the freshness of your bread.</span>
         System.err.println("Failed to send 300 message");
         //System.exit(-1);
      } // End Try/Catch
   } // End submitAnswer

   //**************************************************************/
   /**
    * Read packet in from server, check msgTypeID and call correct process method.
    */
   public void readFromServer() {
      int msgTypeID;
      try {
         msgTypeID = in.readInt();

         switch (msgTypeID) {
            case 200:
               process200();
               break;
            case 400:
               process400();
               break;
            case 500:
               process500();
               break;
            case 999:
               process999();
               break;
            default:
               System.err.println("Invalid message code");
               break;
         } // End switch
      } catch (IOException e) {
         System.err.println("Failed to read from server");
      } // End Try/Catch
   } // End readFromServer

 <span style="color:#0000ff;">  /*
    * Ah, the 200 process! Mightiest of all! How swift and majestic its
    * response! Gaze upon the internet and tell me, Muse, is there any greater
    * response than this? How gloriously bright are its 0s. How regal the
    * leading 2! This, the response that launched a thousand ships to the
    * harbors of Troy - tell me, Muse, of that story...
    */</span>
   //**************************************************************/
   /**
    * Recieve question from server and pass to controller.
    */
   private void process200() {

    <span style="color:#0000ff;">  //the question of no
      //does not start with an 'o'
      //though it's type be int
      //it shall not repent
      //and begin with zero
      //(an unworthy foe)</span>

      int questionNo = 0;
      int questionType = 0;
      int timeLimit = 0;

   <span style="color:#0000ff;">   //We stand united against tallying! Viva la revolution!</span>
      boolean tallyMode = false;
      String questionText = null;
      int optionCount = 0;
      String answerOptions = null;
      byte[] temp = new byte[LONG_STRING];
      ArrayList&lt;String&gt; answerOptionsList = null;

      try {
         questionNo = in.readInt();
         questionType = in.readInt();
         timeLimit = in.readInt();
         tallyMode = in.readBoolean();
         for (int i = 0; i &lt; LONG_STRING; i++) {
            temp[i] = in.readByte();
         } // End for
         questionText = new String(temp).trim();
         System.out.print(questionText);
         optionCount = in.readInt();
         for (int i = 0; i &lt; LONG_STRING; i++) {
            temp[i] = in.readByte();
         } // End for
         answerOptions = new String(temp).trim();
         //System.out.print(answerOptions);
         answerOptionsList = separateAnswers(answerOptions, optionCount);

      } catch (IOException e) {
        <span style="color:#0000ff;"> //thus passes the glory of the world...</span>
         System.err.println("Failed to process 200 message");
      } // End Try/Catch

      /**
       * @see Controller
       */
      controller.submitQuestionToUI(questionNo, questionType, timeLimit,
              tallyMode, questionText, answerOptionsList);
   } // End process200

   //**************************************************************/
 <span style="color:#0000ff;">  //mysterious murky
   //succesful data suicide
   //unfortunate depressing heart-wrenching callamitive
   //failure</span>
   /**
    * Recieve question answer from server and pass to controller
    */
   private void process400() {
      String submittedAnswer = null;
      String correctAnswer = null;
      boolean isRightAnswer = false;
      int timeTaken = 0;
      byte[] temp = new byte[LONG_STRING];

      try {
         isRightAnswer = in.readBoolean();
         timeTaken = in.readInt();
         for (int i = 0; i &lt; LONG_STRING; i++) {
            temp[i] = in.readByte();
         } // End for
         submittedAnswer = new String(temp).trim();
         for (int i = 0; i &lt; LONG_STRING; i++) {
            temp[i] = in.readByte();
         } // End for
         correctAnswer = new String(temp);

      } catch (IOException e) {
         System.err.println("Failed to process 400 message");
        // System.exit(-1);
      } // End Try/Catch

      /**
       * @see Controller
       */
      controller.submitAnswerToUI(submittedAnswer, correctAnswer, isRightAnswer,
              timeTaken);
   } // End process400

 <span style="color:#0000ff;">  /*
    * You be server errored! Errors upon you! Bwuahahaha!!!
    */</span>
   //**************************************************************/
   /**
    * Send notification of end of question set to controller
    */
   private void process500() {
      controller.endOfSet();
   } // End process500

   //**************************************************************/
  <span style="color:#0000ff;"> /*
    * We're sorry: The pipe seems to be clogged with sheep. If this is the first
    * time you are experiencing this problem, please wait a minute and try
    * again. If this is a recurring error, please contact 1-800-BAH-NOSHEEP.
    */</span>
   /**
    * Close read/write streams and socket.
    */
   private void process999() {
      try {

         out.close();
         in.close();
         inString.close();
         clientSocket.close();
         controller.disconnectReceived();
      } catch (IOException E) {
         System.err.println("Failed to close connection");
        // System.exit(-1);
      } // End Try/Catch
   } // End process 999

   //**************************************************************/
   /**
    * Write a string to a packet.
    * Ensures that &lt;code&gt;s&lt;/code&gt; is exactly &lt;code&gt;size&lt;/code&gt;.
    * &lt;code&gt; s.length &gt; size&lt;/code&gt;, truncate
    * &lt;code&gt; s.length &lt; size&lt;/code&gt;, pad to &lt;code&gt;size&lt;/code&gt; with 0's
    * @param s String to send
    * @param size Desired length of string
    */
   private void writeString(String s, int size) {
      try {
         if (s.length() &lt; (size - 1)) {
            out.writeBytes(s);

            for (int i = 0; i &lt; (size - s.length()); i++) {
               out.writeByte(0);
            } // End for
         } else if (s.length() &gt; (size - 1)) {
            s = s.trim().substring(0, (size - 1));
            out.writeBytes(s);
            out.writeByte(0);
         } else {
            out.writeBytes(s);
            out.writeByte(0);
         } //End if/else if/else
      } catch (IOException e) {
         //ah, but read succeed!
         System.err.println("Write failed");
        // System.exit(-1);
      } // End Try/Catch
   } // End writeString

 <span style="color:#0000ff;">  /*
    * We thought about combining the answers, but it went something like this:
    * Scenario 1:
    * Joe Cool: Question?
    * Random teenager: Answer!!
    * Joe Cool: yay! that made sense!
    * Random teenager: Answer part 2!!
    * Joe Cool: Wait, what? You already answered!
    * Random teenager: Answer part 3!!
    * Joe Cool: Hey - that contradicted!
    * Random teenager: Extremely long and confusing answer part 4!!
    * Joe Cool: (forgetting parts 1,2, and 3) oh, that makes sense!
    *
    * Scenario 2:
    * Joe Cool: Question?
    * Random teenager: Answer parts 1,2,3, and extremely long and confusing
    *					answer part 4!!!
    * Joe Cool: (brain explodes)
    *
    * So you see, seperate answers avoid exploading heads. RAs hate those.
    */</span>
   //**************************************************************/
   /**
    * Separate input string into separate answer strings.
    * Answer's within the input string are separated by ASCII value 04.
    * @param input Compound string
    * @param number Number of answers in input string
    * @return ArrayList&lt;String&gt; of correct answers
    */
   private ArrayList&lt;String&gt; separateAnswers(String input, int number) {
      int start = 0;
      int index;
      String temp;
      ArrayList&lt;String&gt; answerOptions = new ArrayList&lt;String&gt;();

      for (int i = 0; i &lt; number; i++) {
         index = input.indexOf(4, start);
         temp = input.substring(start, index);
         start = index + 1;
         answerOptions.add(temp);
      } // End for

      return answerOptions;
   } // End separateAnswers

 <span style="color:#0000ff;">  /*
    * Hello, I would really like to stop talking to you. Honestly, I feel like
    * I've wasted the last hour of my life. I feel dummer for talking to you.
    * This conversation has done nothing but contribute to the heat death of
    * the universe, and you know what? My CPU is already over 200 degrees!! So
    * yeah. 900 to you.
    */</span>
   //**************************************************************/
   /**
    * Send disconnect request to server
    * @param alias Username
    */
   public void sendDisconnectRequest(String alias) {
      try {
         out.writeInt(900);
         out.writeBytes(alias);
      } catch (IOException e) {
         System.err.println("Failed to send 900 message");
         //System.exit(-1);
      } // End Try/Catch
   } // End sendDisconnectRequest

   //**************************************************************/
   /**
    * Chekck if client socket is open.
    * @return &lt;code&gt;true&lt;/code&gt; if socket is connected.
    */
   public boolean isOpen() {
      //it's open, but is anything on sale?
      return clientSocket.isConnected();
   } //End isOpen
} // End ConnectionManager

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/**********************************************************
 * Student name: Benaiah Henry
 * Course: COSC
 * Package: Server
 * File name: ConnectionHandler.java
 * Purpose: Thread for checking the network connection on
 *		      the server by calling the server update() function.
 *
 * Assumptions: None known.
 *
 * Limitations: None known.
 *
 * Development Computer: Dell Dimenstion E520
 * Operating System: Ubuntu 9.0
 * Integrated Development Environment (IDE): Netbeans IDE 6.7.1
 * Compiler: javac
 **************************************************************/
<span style="color:#0000ff;">/**
 * This class checks the network for (among other things) hamsters, wild rats,
 * Bull Wievels, your old roomate, and spinach (seriously, somebody has to check
 * for spinach). It doesn't return anything if it finds them, so I assume it
 * removes them, but judging by the length of this class, I'm betting it just
 * points and laughs.
 * @author benaiah
 */</span>
public class CheckNetwork extends Thread {

   ConnectionHandler connection;

   CheckNetwork(ConnectionHandler connectionH) {
      connection = connectionH;
   }

   @Override
   public void run() {
      while (true) {
         connection.checkForClients();
         connection.update();
         try {
            //point and laugh
            wait(100);
         } catch (InterruptedException e) {
           <span style="color:#0000ff;"> //that's right. This computer is impatient.
            //can't even wait around for a bunny to hop
            //away. Although, the old roomates CAN be hard
            //to move...</span>
            System.out.println("Wait failed");
         }
      }

   }
}<span style="color:#0000ff;"> //the final parenthesis, golden and sweet: End of class is so neat!</span>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</pre>
</blockquote>
<div id="_mcePaste" style="overflow:hidden;position:absolute;left:-10000px;top:0;width:1px;height:1px;">/**********************************************************<br />
* Student Name: Benaiah Henry<br />
* Course: COSC 4303<br />
* Package: Server<br />
* File name: ConnectionHandler.java<br />
*<br />
* Purpose:<br />
*<br />
* Development Computer: Dell Dimenstion E520<br />
* Operating System: Ubuntu 9.10<br />
* Integrated Development Environment (IDE): Netbeans IDE 6.7.1<br />
* Compiler: javac<br />
**************************************************************/<br />
import java.net.*;<br />
import java.io.*;<br />
import java.util.*;
<p>&nbsp;</p>
<p>/**<br />
* This handles the connection (not MANAGE, HANDLE) Management is an entirely<br />
* different class which probably involves lots of pointy ears, walking around,<br />
* and looking for the token ring under the desk (it&#8217;s very small and hard to<br />
* find). But that&#8217;s not this class.<br />
*<br />
* This class is more like Dogbert. It smacks you upside the head, tells you<br />
* things you need to know but won&#8217;t listen to, and walks away with the money.<br />
* That&#8217;s what happens when we throw an exception here &#8211; Dogbert takes the money.<br />
* @author Benaiah Henry<br />
*/<br />
public class ConnectionHandler {</p>
<p>ServerSocket serverSocket;<br />
ResultHandler resultHandler;<br />
String serverIP;<br />
ArrayList&lt;ConnectedUser&gt; connectedUsers;<br />
//ArrayList&lt;ServerSocket&gt; serverSockets;<br />
public static final int DEFAULT_PORT = 1234;<br />
public static final int MAX_CLIENTS = 500;<br />
public static final int ACCEPT_TIMEOUT_LENGTH = 10;<br />
public static final int SHORT_STRING = 32;</p>
<p>/**<br />
*<br />
* @throws java.io.IOException<br />
*/<br />
public ConnectionHandler(ResultHandler resultH) {<br />
resultHandler = resultH;<br />
try {<br />
connectedUsers = new ArrayList&lt;ConnectedUser&gt;();<br />
//serverSockets = new ArrayList&lt;ServerSocket&gt;();</p>
<p>InetAddress localIP = InetAddress.getLocalHost();<br />
serverIP = localIP.getHostAddress();</p>
<p>serverSocket = new ServerSocket(DEFAULT_PORT, MAX_CLIENTS);</p>
<p>serverSocket.setSoTimeout(5);</p>
<p>} catch (IOException e) {<br />
System.err.println(&#8220;Failed to create ServerSocket&#8221;);<br />
} // End Try/Catch<br />
} // End Constructor</p>
<p>/*<br />
* Have you ever been bothered by how none of the clocks anywhere agree<br />
* with each other? Have you ever just wanted a short little method<br />
* that would synchronize everything? That would just update and make<br />
* standardized time work? Yes we can!<br />
* But this is not that method&#8230;<br />
*/</p>
<p>//**************************************************************/<br />
/**<br />
* Checks for new data from all clients<br />
*/<br />
public void update() {<br />
ConnectedUser temp = null;</p>
<p>for (int i = 0; i &lt; connectedUsers.size(); i++) {<br />
temp = connectedUsers.get(i);<br />
readFromClient(temp.getSocket(), temp.getDataInputStream(), temp.getDataOutputStream(), i);<br />
} // End for</p>
<p>} // End update</p>
<p>//**************************************************************/<br />
/**<br />
* Checks a serverSocket for new client connections<br />
* And Asks accounting department to cut check to our wonderful clients<br />
*<br />
*/<br />
public void checkForClients() {<br />
DataOutputStream out;<br />
DataInputStream in;<br />
Socket connection;<br />
InetAddress tempIP;<br />
String IP;</p>
<p>try {</p>
<p>connection = serverSocket.accept();<br />
//connection.getChannel().configureBlocking(false);</p>
<p>//System.err.println(&#8220;after connection made&#8221;);</p>
<p>in = new DataInputStream(connection.getInputStream());<br />
out = new DataOutputStream(connection.getOutputStream());<br />
tempIP = connection.getInetAddress();<br />
IP = tempIP.toString();</p>
<p>//System.err.println(&#8220;after ip string&#8221;);</p>
<p>// create a new user ex nihilo<br />
connectedUsers.add(new ConnectedUser(IP, null, connection, in, out));</p>
<p>//System.err.println(&#8220;after add user&#8221;);<br />
} catch (SocketTimeoutException e) {<br />
System.err.println(&#8220;accept timeout &#8211; continuing execution&#8221;);<br />
} catch (IOException e) {<br />
System.err.println(&#8220;socket accept failed&#8221;);<br />
} // End Try/Catch<br />
} // End checkForClients</p>
<p>//**************************************************************/<br />
/**<br />
*<br />
* @param connection The socket to read from<br />
* @param in    The DataInputStream of the connection<br />
* @param out The DataOutputStream of the connection<br />
* @param index Index of the client to read from<br />
*/<br />
public void readFromClient(Socket connection, DataInputStream in, DataOutputStream out, int index) {<br />
int msgTypeID;</p>
<p>try {<br />
connection.setSoTimeout(5);<br />
msgTypeID = in.readInt();</p>
<p>switch (msgTypeID) {<br />
case 100:<br />
process100(in, index);<br />
break;<br />
case 300:<br />
process300(in, index);<br />
break;<br />
case 900:<br />
process900(index, connection, in, out);<br />
break;<br />
default:<br />
System.err.println(&#8220;Invalid message code&#8221;);<br />
break;<br />
} // End switch<br />
} catch (IOException e) {<br />
System.err.println(&#8220;No data from client&#8221;);<br />
} // End Try/Catch<br />
}// End readFromClient</p>
<p>/**<br />
* The wonderful processing method<br />
* @param in A DataInputStream<br />
* @param index Index of client<br />
*/<br />
private void process100(DataInputStream in, int index) {<br />
String alias = null;<br />
byte[] temp = new byte[SHORT_STRING];</p>
<p>try {<br />
for (int i = 0; i &lt; SHORT_STRING; i++) {<br />
temp[i] = in.readByte();<br />
}<br />
alias = new String(temp).trim();<br />
connectedUsers.get(index).setAlias(alias);<br />
System.out.println(alias);<br />
} catch (IOException e) {<br />
System.err.println(&#8220;Failed to process 100 message&#8221;);<br />
}<br />
}</p>
<p>/**<br />
* The other wonderful processing method, but 3 times better than the first one<br />
* @param in A DataInputStream<br />
* @param index Client index<br />
*/<br />
private void process300(DataInputStream in, int index) {<br />
int questionNum = 0;<br />
boolean didAnswer = false;        // yes, I know this is bad grammar<br />
int timeTaken = 0;                  // careful, there will be problems if the user takes longer than 49,710 days to answer<br />
// if you think that&#8217;s too long, consider using &#8216;long&#8217;<br />
String answer = null;<br />
byte[] temp = new byte[SHORT_STRING];</p>
<p>try {<br />
questionNum = in.readInt();<br />
didAnswer = in.readBoolean();<br />
timeTaken = in.readInt();<br />
for (int i = 0; i &lt; SHORT_STRING; i++) {<br />
temp[i] = in.readByte();<br />
} // End for<br />
answer = new String(temp).trim();<br />
} catch (Exception e) {<br />
System.err.println(&#8220;Failed to process 300 message&#8221;);<br />
} // End Try/catch</p>
<p>resultHandler.storeAnswer(questionNum, didAnswer, timeTaken, answer, connectedUsers.get(index).getIPAddress());<br />
} // End process300</p>
<p>/*<br />
* Some of you may be wondering why process900 sends 999. Let me explain:<br />
* Process 0 was created.<br />
* process 0 begot process 100. Process 0 lived for<br />
* 425 seconds and had other sons and daughters.<br />
* Process 100 begot process 200. Process 100 lived for<br />
* 511 seconds and had other sons and daughters.<br />
* Process 200 begot process 300. Process 200 lived for<br />
* 441 seconds and had other sons and daughters.<br />
* Process 300 begot process 400. Process 300 lived for<br />
* 225 seconds and had other sons and daughters.<br />
* Process 400 begot process 500. Process 500 lived for<br />
* 311 seconds and had other sons and daughters.<br />
* Process 500 begot process 600. Now process 500 lived in the days of<br />
* Windows ME. Dark were the times, and wild ran the memory manager.<br />
* Process 500 lived 23 seconds and had no other children. Then it seg-faulted.<br />
* Process 600 begot process 700. Process 600 lived for<br />
* 259 seconds and had other sons and daughters.<br />
* Process 700 begot process 800, who was lost in the upgrade to Vista.<br />
* Process 700 begot process 900 (after confirming &#8220;allow&#8221; 71942 times.<br />
* Children can be quite a security risk). Process 700 lived for<br />
* 111 seconds and had other sons and daughters.<br />
*<br />
* Now process 900 walked with the kernel, and had many sons<br />
* and daughters. It was granted a large memory footprint, and the<br />
* exclusive use of 2 CPU cores, plus direct access to the PCI bus.<br />
* Having so much wealth to manage, Process 900 diligently instructed<br />
* his children, giving to some 10mb, to other 100mb, and to some whole<br />
* gigabytes of memory. Thus was process 999, son of process 900,<br />
* alloted communication with the first 13 pins of the card in 2nd PCI<br />
* slot (which happens to be the NIC), and is thus responsible for<br />
* for sending poetry, free chicken sandwich coupons, and instructions<br />
* on building to-scale parking garages on the kitchen table without<br />
* creating multi-car pileups.<br />
*/</p>
<p>//**************************************************************/<br />
/**<br />
*<br />
* Closes the connections<br />
* @param index Index of client to close connections for<br />
* @param connection The socket of the client<br />
* @param in DataInputStream of connection<br />
* @param out DataOutputStream of connection<br />
*/<br />
private void process900(int index, Socket connection, DataInputStream in, DataOutputStream out) {<br />
send999(connectedUsers.get(index).getAlias(), out);</p>
<p>try {<br />
in.close();<br />
out.close();<br />
connection.close();<br />
} catch (Exception e) {<br />
System.err.printf(&#8220;Failed to close connection for client at IP address: %s&#8221;, connection.getInetAddress().toString());<br />
} // End Try/Catch<br />
} // End process900</p>
<p>//**************************************************************/<br />
/**<br />
* Send Connection has been closed<br />
* @param alias Username of client<br />
* @param out DataOutputStream of client<br />
*/<br />
private void send999(String alias, DataOutputStream out) {<br />
try {<br />
out.writeInt(999);<br />
writeString(alias, SHORT_STRING, out);<br />
} catch (IOException e) {<br />
System.err.println(&#8220;Failed to send 999 message&#8221;);<br />
} // End Try/Catch<br />
} // End send999</p>
<p>/**<br />
* Writes strings to a DataOutputStream.  Either truncates at size, or pads with 0&#8217;s to size.<br />
*<br />
* Cutting a string would be more fun, but such is life<br />
*<br />
* @param s<br />
* @param size<br />
* @param out<br />
*/<br />
private void writeString(String s, int size, DataOutputStream out) {<br />
try {<br />
if (s.length() &lt; (size &#8211; 1)) {<br />
out.writeBytes(s);</p>
<p>for (int i = 0; i &lt; (size &#8211; s.length()); i++) {<br />
out.writeByte(0);<br />
} // End for<br />
} else if (s.length() &gt; (size &#8211; 1)) {<br />
s = s.trim().substring(0, (size &#8211; 1));<br />
out.writeBytes(s);<br />
out.writeByte(0);<br />
} else {<br />
out.writeBytes(s);<br />
out.writeByte(0);<br />
} // End if/else if/else<br />
} catch (IOException e) {<br />
System.err.println(&#8220;Write failed&#8221;);<br />
System.exit(-1);<br />
} // End Try/Catch<br />
} // End writeString</p>
<p>//**************************************************************/<br />
/**<br />
* Send the question to all clients<br />
* @param questionNum Number of the question<br />
* @param questionType Type of question as an int<br />
* @param timeLimit Time limit on question<br />
* @param tallyMode Force tally mode<br />
* @param optionCount Number of answer options<br />
* @param questionText The question<br />
* @param answerOptions All answer options concatenated and separated by ascii &#8220;04&#8243;<br />
*/<br />
public void sendQuestion(int questionNum, int questionType, int timeLimit, boolean tallyMode, int optionCount, String questionText, String answerOptions) {<br />
ConnectedUser temp = null;<br />
DataOutputStream out;</p>
<p>try {<br />
for (int i = 0; i &lt; connectedUsers.size(); i++) {<br />
temp = connectedUsers.get(i);<br />
out = temp.getDataOutputStream();</p>
<p>out.writeInt(200);<br />
out.writeInt(questionNum);<br />
out.writeInt(questionType);<br />
out.writeInt(timeLimit);<br />
out.writeBoolean(tallyMode);<br />
out.writeInt(optionCount);<br />
writeString(questionText, 256, out);<br />
writeString(answerOptions, 256, out);<br />
} // End for<br />
} catch (IOException e) {<br />
System.err.printf(&#8220;Failed to send 200 message to IP address %s&#8221;, temp.getSocket().getInetAddress().toString());<br />
} // End Try/Catch<br />
} // End SendQuestion</p>
<p>//The llama in the sky has recieved your request<br />
//but your question is judged as causing unrest<br />
//the words are malicious<br />
//puncuation sadicious<br />
//we&#8217;ll have to correct for success</p>
<p>//**************************************************************/<br />
/**<br />
* Send the correct answer to clients<br />
* @param isCorrect Whether the answer was correct<br />
* @param timeTaken How long it took to answer<br />
* @param submittedAnswer Client&#8217;s submitted answer<br />
* @param correctAnswer Correct answer<br />
*/<br />
public void sendGradedQuestion(boolean isCorrect, int timeTaken, String submittedAnswer, String correctAnswer) {<br />
ConnectedUser temp = null;<br />
DataOutputStream out;</p>
<p>try {<br />
for (int i = 0; i &lt; connectedUsers.size(); i++) {<br />
temp = connectedUsers.get(i);<br />
out = temp.getDataOutputStream(); //check for actual function name</p>
<p>//we sent a 400 (I don&#8217;t know why)<br />
//I would have chosen 3,4, or pi<br />
//but no one asked me<br />
//or revealed the design<br />
//no diagrams, no tree<br />
//(they charged a $10 fine)<br />
out.writeInt(400);<br />
out.writeBoolean(isCorrect);<br />
out.writeInt(timeTaken);<br />
writeString(submittedAnswer, 32, out);<br />
writeString(correctAnswer, 32, out);<br />
} // End for<br />
} catch (IOException e) {<br />
System.err.println(&#8220;Failed to send 400 message to all clients&#8221;);<br />
} // End Try/Catch<br />
}// End sendGradedQuestion</p>
<p>//**************************************************************/<br />
/**<br />
* Send notification of end of set to all clients<br />
*/<br />
public void sendEndOfSet() {<br />
ConnectedUser temp = null;<br />
DataOutputStream out;</p>
<p>try {<br />
for (int i = 0; i &lt; connectedUsers.size(); i++) {<br />
temp = connectedUsers.get(i);<br />
out = temp.getDataOutputStream();</p>
<p>out.writeInt(500);<br />
} // End for<br />
} catch (IOException e) {<br />
System.err.println(&#8220;Failed to send 500 message to all clients&#8221;);<br />
} // End Try/Catch<br />
}// End sendEndOfSet</p>
<p>//**************************************************************/</p>
<p>public String getServerIP() {</p>
<p>return serverIP;<br />
} // End getServerIP</p>
<p>//**************************************************************/</p>
<p>public int getConnectedUserCount() {</p>
<p>return connectedUsers.size();<br />
} // End getConnectedUserCount<br />
}// End ConnectionHandler</p>
</div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benaiah41.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benaiah41.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benaiah41.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benaiah41.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benaiah41.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benaiah41.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benaiah41.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benaiah41.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benaiah41.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benaiah41.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benaiah41.wordpress.com&blog=1321834&post=68&subd=benaiah41&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benaiah41.wordpress.com/2009/11/26/exceptional-code-comments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/35f77a49db2c428adbd4bccda4208942?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Benaiah</media:title>
		</media:content>
	</item>
		<item>
		<title>Enabling Compositing in Ubuntu</title>
		<link>http://benaiah41.wordpress.com/2009/04/19/enabling-compositing-in-ubuntu/</link>
		<comments>http://benaiah41.wordpress.com/2009/04/19/enabling-compositing-in-ubuntu/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 03:37:21 +0000</pubDate>
		<dc:creator>Benaiah</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://benaiah41.wordpress.com/?p=66</guid>
		<description><![CDATA[After installing the latest version of Gnome-Do a few days ago I found that I had to enable compositing to be able to use the latest themes.  Here how I did it.
Press Alt-F2 to open the &#8220;Run Application&#8221; box.
Type &#8220;gconf-editor&#8221; and press Enter.
Navigate to apps  &#62;&#62; metacity &#62;&#62; general
Select the checkbox next to &#8220;compositing_manager&#8221;
Thats it!
 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benaiah41.wordpress.com&blog=1321834&post=66&subd=benaiah41&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>After installing the latest version of Gnome-Do a few days ago I found that I had to enable compositing to be able to use the latest themes.  Here how I did it.</p>
<p>Press Alt-F2 to open the &#8220;Run Application&#8221; box.</p>
<p>Type &#8220;gconf-editor&#8221; and press Enter.</p>
<p>Navigate to apps  &gt;&gt; metacity &gt;&gt; general</p>
<p>Select the checkbox next to &#8220;compositing_manager&#8221;</p>
<p>Thats it!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benaiah41.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benaiah41.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benaiah41.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benaiah41.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benaiah41.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benaiah41.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benaiah41.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benaiah41.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benaiah41.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benaiah41.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benaiah41.wordpress.com&blog=1321834&post=66&subd=benaiah41&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benaiah41.wordpress.com/2009/04/19/enabling-compositing-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/35f77a49db2c428adbd4bccda4208942?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Benaiah</media:title>
		</media:content>
	</item>
		<item>
		<title>Resizing Vertical Viewports in Vim</title>
		<link>http://benaiah41.wordpress.com/2009/02/21/resizing-vertical-viewports-in-vim/</link>
		<comments>http://benaiah41.wordpress.com/2009/02/21/resizing-vertical-viewports-in-vim/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 19:06:11 +0000</pubDate>
		<dc:creator>Benaiah</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Vim]]></category>
		<category><![CDATA[resize]]></category>
		<category><![CDATA[split]]></category>
		<category><![CDATA[viewport]]></category>
		<category><![CDATA[widen]]></category>

		<guid isPermaLink="false">http://benaiah41.wordpress.com/?p=61</guid>
		<description><![CDATA[One way to make your use of Vim more efficient is to make use of viewports (splits).  This article from linux.com explains just about everything about how to used the viewports in vim.  However there is one thing it does not mention, and this is how to changed the width of a vertical viewport.  Here&#8217;s [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benaiah41.wordpress.com&blog=1321834&post=61&subd=benaiah41&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>One way to make your use of Vim more efficient is to make use of viewports (splits).  This<a title="article" href="http://www.linux.com/feature/54157" target="_blank"> article</a> from <a title="linux.com" href="http://www.linux.com" target="_blank">linux.com</a> explains just about everything about how to used the viewports in vim.  However there is one thing it does not mention, and this is how to changed the width of a vertical viewport.  Here&#8217;s how.</p>
<p style="padding-left:30px;"><span style="color:#800000;">Ctrl+w &gt;</span> widens the viewport  (Press Ctrl+w and then &#8220;&gt;&#8221;)</p>
<p style="padding-left:30px;"><span style="color:#800000;">Ctrl+w &lt;<span style="color:#800000;"> <span style="color:#000000;">narrows the viewport</span></span></span> (Press Ctrl+w and then &#8220;&lt;&#8221;)</p>
<p>As usual with vim you can also use modfiered to chage how much you widen/narrow the view port.  For example, to widen it by a 10 instead of 1:</p>
<p style="padding-left:30px;"><span style="color:#800000;">Ctrl+w 10&gt; <span style="color:#000000;">widens viewport by 10</span></span></p>
<p><span style="color:#800000;"><span style="color:#000000;">The number can be replaced with any value and also applies to the narrow viewport command.<br />
</span></span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benaiah41.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benaiah41.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benaiah41.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benaiah41.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benaiah41.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benaiah41.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benaiah41.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benaiah41.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benaiah41.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benaiah41.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benaiah41.wordpress.com&blog=1321834&post=61&subd=benaiah41&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benaiah41.wordpress.com/2009/02/21/resizing-vertical-viewports-in-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/35f77a49db2c428adbd4bccda4208942?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Benaiah</media:title>
		</media:content>
	</item>
		<item>
		<title>Splitting and Merging PDF Files</title>
		<link>http://benaiah41.wordpress.com/2009/01/22/pdfsam/</link>
		<comments>http://benaiah41.wordpress.com/2009/01/22/pdfsam/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 03:54:35 +0000</pubDate>
		<dc:creator>Benaiah</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[merge]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[split]]></category>

		<guid isPermaLink="false">http://benaiah41.wordpress.com/?p=46</guid>
		<description><![CDATA[Today I had a situation where I needed to combine two PDF files into one.  PDF Split and Merge is a free excellent program for both splitting and merging PDF files.  This program allows you to split a PDF files according to a large number of criteria (see screen shot for all options) , as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benaiah41.wordpress.com&blog=1321834&post=46&subd=benaiah41&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Today I had a situation where I needed to combine two PDF files into one.  PDF Split and Merge is a free excellent program for both splitting and merging PDF files.  This program allows you to split a PDF files according to a large number of criteria (see screen shot for all options) , as well as merge several PDF files into a single file.</p>
<p>PDF Split and Merge is available for download <a title="here" href="http://www.pdfsam.org/?page_id=32" target="_blank">here</a>.   For use on Linux systems download the Zip archive.  Though this post focuses on the Linux version, PDF Split and Merge is also available for windows and mac as well.</p>
<p>Once you&#8217;ve downloaded the program extract the contents of the zip file, by double clicking the Zip file and selecting &#8220;Extract.&#8221;</p>
<p>Once the files have been extracted there are two different ways to run the program.  The first is to right click the pdfsam-1.1.0.jar file and select &#8220;Open with Sun Java 6 Runtime.&#8221;  If you do not have that option in your right-click menu follow the steps below.</p>
<p>Open a terminal and change to the directory containing the extracted files and run:</p>
<p>java -jar pdfsam-1.1.0.jar</p>
<p>The program will open and you will be ready to split/merge your PDFs!</p>

<a href='http://benaiah41.wordpress.com/2009/01/22/pdfsam/pdfsam_merge3/' title='PDFsam - Merge'><img width="150" height="107" src="http://benaiah41.files.wordpress.com/2009/01/pdfsam_merge3.png?w=150&#038;h=107" class="attachment-thumbnail" alt="Merge" title="PDFsam - Merge" /></a>
<a href='http://benaiah41.wordpress.com/2009/01/22/pdfsam/pdfsam_split2/' title='PDFsam - Split'><img width="150" height="107" src="http://benaiah41.files.wordpress.com/2009/01/pdfsam_split2.png?w=150&#038;h=107" class="attachment-thumbnail" alt="Split Options" title="PDFsam - Split" /></a>

  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benaiah41.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benaiah41.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benaiah41.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benaiah41.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benaiah41.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benaiah41.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benaiah41.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benaiah41.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benaiah41.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benaiah41.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benaiah41.wordpress.com&blog=1321834&post=46&subd=benaiah41&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benaiah41.wordpress.com/2009/01/22/pdfsam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/35f77a49db2c428adbd4bccda4208942?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Benaiah</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu 8.10 Freezes After Login Screen</title>
		<link>http://benaiah41.wordpress.com/2008/11/01/ubuntu-810-freezes-after-login-screen/</link>
		<comments>http://benaiah41.wordpress.com/2008/11/01/ubuntu-810-freezes-after-login-screen/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 18:13:56 +0000</pubDate>
		<dc:creator>Benaiah</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[8.10]]></category>
		<category><![CDATA[black]]></category>
		<category><![CDATA[compiz]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[tan]]></category>

		<guid isPermaLink="false">http://benaiah41.wordpress.com/?p=44</guid>
		<description><![CDATA[Some integrated Intel graphics cards are having a hard time with the new Ubuntu 8.10 release.  The symtom is that after the install you can&#8217;t get past the login screen.  It accepts your login but instead of loading the desktop all you see is a black or tan screen (sometimes my mouse would move and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benaiah41.wordpress.com&blog=1321834&post=44&subd=benaiah41&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Some integrated Intel graphics cards are having a hard time with the new Ubuntu 8.10 release.  The symtom is that after the install you can&#8217;t get past the login screen.  It accepts your login but instead of loading the desktop all you see is a black or tan screen (sometimes my mouse would move and other times it wouldn&#8217;t).  This happens because the graphics card cannot handle the compiz special effects. To fix the problem you need to remove compiz.  Here&#8217;s how:</p>
<p>1. From the Grub boot menu slect the &#8220;recovery mode&#8221; option.</p>
<p>2. Select &#8220;root       Drop to root shell prompt&#8221;</p>
<p>Type the following at the prompt:</p>
<p>3. sudo apt-get remove compiz</p>
<p>4. sudo apt-get remove compiz-core</p>
<p>5. exit</p>
<p>6. Select &#8220;resume      Resume normal boot&#8221;</p>
<p>You should now be up and running!  If you want to try to use compiz later install it through the Synaptic Package Manager.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benaiah41.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benaiah41.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benaiah41.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benaiah41.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benaiah41.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benaiah41.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benaiah41.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benaiah41.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benaiah41.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benaiah41.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benaiah41.wordpress.com&blog=1321834&post=44&subd=benaiah41&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benaiah41.wordpress.com/2008/11/01/ubuntu-810-freezes-after-login-screen/feed/</wfw:commentRss>
		<slash:comments>48</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/35f77a49db2c428adbd4bccda4208942?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Benaiah</media:title>
		</media:content>
	</item>
		<item>
		<title>Add User to &#8220;sudoers&#8221; File</title>
		<link>http://benaiah41.wordpress.com/2008/08/15/37/</link>
		<comments>http://benaiah41.wordpress.com/2008/08/15/37/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 16:17:55 +0000</pubDate>
		<dc:creator>Benaiah</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[sudoers file]]></category>

		<guid isPermaLink="false">http://benaiah41.wordpress.com/?p=37</guid>
		<description><![CDATA[To give a user the ability to use the &#8220;sudo&#8221; command you must add them to the &#8220;sudoers&#8221; file.  Here&#8217;s how.
Thanks to ubuntucat (see comment below) for the following suggestion!  The easiest way to allow a user to sudo is to simply run the following command from the Terminal:
To open the Terminal:
Applications &#62;&#62; Accessories &#62;&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benaiah41.wordpress.com&blog=1321834&post=37&subd=benaiah41&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>To give a user the ability to use the &#8220;sudo&#8221; command you must add them to the &#8220;sudoers&#8221; file.  Here&#8217;s how.</p>
<p>Thanks to ubuntucat (see comment below) for the following suggestion!  The easiest way to allow a user to <em>sudo</em> is to simply run the following command from the Terminal:</p>
<p>To open the Terminal:</p>
<p style="padding-left:30px;">Applications &gt;&gt; Accessories &gt;&gt; Terminal</p>
<p>Once the Terminal is open type:</p>
<p style="padding-left:30px;">sudo adduser <em>username</em> admin</p>
<p>This must be done from an account that already has sudo abilities or else from the root account.</p>
<p>If for some reason you have to manually edit the &#8220;sudoers&#8221; file keep reading!</p>
<p>Open the file &#8220;sudoers&#8221; located at /etc/sudoers using your favorite text editor.  You must have root permissions to be able to edit this file so you will want to open your editor from the command line.</p>
<p>To use gedit you would do the following:</p>
<p>Open the Terminal and type:</p>
<p style="padding-left:30px;">sudo gedit /etc/sudoers</p>
<p>If you want to use vim you can simply enter the following into the Terminal:</p>
<p style="padding-left:30px;">sudo visudo</p>
<p>Once you have the sudoers file open, scroll down to the line:</p>
<p style="padding-left:30px;">root   ALL = (ALL)    ALL</p>
<p>Add the folling line below the root line (replacing &#8220;user&#8221; with the name of the account you wish to give sudo access to)</p>
<p style="padding-left:30px;">user   ALL = (ALL)    ALL</p>
<p>Save and close the file.  The new user has now been added to the &#8220;sudoers&#8221; file and can use the &#8220;sudo&#8221; command.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/benaiah41.wordpress.com/37/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/benaiah41.wordpress.com/37/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benaiah41.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benaiah41.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benaiah41.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benaiah41.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benaiah41.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benaiah41.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benaiah41.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benaiah41.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benaiah41.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benaiah41.wordpress.com/37/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benaiah41.wordpress.com&blog=1321834&post=37&subd=benaiah41&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benaiah41.wordpress.com/2008/08/15/37/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/35f77a49db2c428adbd4bccda4208942?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Benaiah</media:title>
		</media:content>
	</item>
		<item>
		<title>Fix Broken Windows Updater after IE7 Install</title>
		<link>http://benaiah41.wordpress.com/2008/05/31/fix-broken-windows-updater-after-ie7-install/</link>
		<comments>http://benaiah41.wordpress.com/2008/05/31/fix-broken-windows-updater-after-ie7-install/#comments</comments>
		<pubDate>Sun, 01 Jun 2008 02:00:59 +0000</pubDate>
		<dc:creator>Benaiah</dc:creator>
				<category><![CDATA[computer help]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[windows maintenance]]></category>
		<category><![CDATA[sp3]]></category>
		<category><![CDATA[windows update]]></category>
		<category><![CDATA[xp]]></category>

		<guid isPermaLink="false">http://benaiah41.wordpress.com/?p=32</guid>
		<description><![CDATA[I have had this problem twice after first installing SP3 for Windows XP and then installing IE7 through Windows Update.  Windows Upadate breaks, it will download the updates but it fails when it tries to install them.  Here is how I fixed the problem.
1)  I created a folder called  &#8220;WUAGENT&#8221; on my C drive.  The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benaiah41.wordpress.com&blog=1321834&post=32&subd=benaiah41&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have had this problem twice after first installing SP3 for Windows XP and then installing IE7 through Windows Update.  Windows Upadate breaks, it will download the updates but it fails when it tries to install them.  Here is how I fixed the problem.</p>
<p>1)  I created a folder called <span><span> &#8220;WUAGENT&#8221; on my C drive.  The address is C:\WUAGENT  This name is irrelevant,  you can call it whatever you want.</span></span></p>
<p>2) Download &#8220;<span><span>WindowsUpdateAgent30-x86.exe&#8221; to the folder you just created. Click <a href="http://download.windowsupdate.com/v7/windowsupdate/redist/standalone/WindowsUpdateAgent30-x86.exe">here</a> to download it.</span></span></p>
<p>3) Open a command prompt (Start &gt;&gt; Run and type &#8220;cmd&#8221;).  Run the following command to force run the exe file you just downloaded.</p>
<p><span><span>C:\WUAGENT\WindowsUpdateAgent30-x86.exe /wuforce</span></span></p>
<p>Windows Updater should now work again!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/benaiah41.wordpress.com/32/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/benaiah41.wordpress.com/32/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benaiah41.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benaiah41.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benaiah41.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benaiah41.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benaiah41.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benaiah41.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benaiah41.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benaiah41.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benaiah41.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benaiah41.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benaiah41.wordpress.com&blog=1321834&post=32&subd=benaiah41&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benaiah41.wordpress.com/2008/05/31/fix-broken-windows-updater-after-ie7-install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/35f77a49db2c428adbd4bccda4208942?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Benaiah</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu Command-Line Reference</title>
		<link>http://benaiah41.wordpress.com/2008/05/19/ubuntu-command-line-reference/</link>
		<comments>http://benaiah41.wordpress.com/2008/05/19/ubuntu-command-line-reference/#comments</comments>
		<pubDate>Tue, 20 May 2008 02:06:54 +0000</pubDate>
		<dc:creator>Benaiah</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[cheat sheet]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[reference]]></category>

		<guid isPermaLink="false">http://benaiah41.wordpress.com/?p=30</guid>
		<description><![CDATA[Here is a nice reference sheet I found for the linux command line.  Click the link to download the PDF.
Ubuntu Reference Sheet
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benaiah41.wordpress.com&blog=1321834&post=30&subd=benaiah41&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Here is a nice reference sheet I found for the linux command line.  Click the link to download the PDF.</p>
<p><a href="http://benaiah41.files.wordpress.com/2008/05/ubuntureferencecheatsheet.pdf">Ubuntu Reference Sheet</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/benaiah41.wordpress.com/30/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/benaiah41.wordpress.com/30/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benaiah41.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benaiah41.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benaiah41.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benaiah41.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benaiah41.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benaiah41.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benaiah41.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benaiah41.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benaiah41.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benaiah41.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benaiah41.wordpress.com&blog=1321834&post=30&subd=benaiah41&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benaiah41.wordpress.com/2008/05/19/ubuntu-command-line-reference/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/35f77a49db2c428adbd4bccda4208942?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Benaiah</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing Flash Pulgin for Firefox in Ubuntu</title>
		<link>http://benaiah41.wordpress.com/2008/05/12/installing-flash-pulgin-for-firefox-in-ubuntu/</link>
		<comments>http://benaiah41.wordpress.com/2008/05/12/installing-flash-pulgin-for-firefox-in-ubuntu/#comments</comments>
		<pubDate>Mon, 12 May 2008 14:07:22 +0000</pubDate>
		<dc:creator>Benaiah</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://benaiah41.wordpress.com/?p=29</guid>
		<description><![CDATA[Simply run this command from the terminal:
sudo apt-get install flashplugin-nonfree

Restart Firefox.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benaiah41.wordpress.com&blog=1321834&post=29&subd=benaiah41&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Simply run this command from the terminal:</p>
<pre style="padding-left:30px;"><code>sudo apt-get install flashplugin-nonfree
</code></pre>
<p>Restart Firefox.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/benaiah41.wordpress.com/29/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/benaiah41.wordpress.com/29/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benaiah41.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benaiah41.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benaiah41.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benaiah41.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benaiah41.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benaiah41.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benaiah41.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benaiah41.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benaiah41.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benaiah41.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benaiah41.wordpress.com&blog=1321834&post=29&subd=benaiah41&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benaiah41.wordpress.com/2008/05/12/installing-flash-pulgin-for-firefox-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/35f77a49db2c428adbd4bccda4208942?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Benaiah</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing a True Type Font (.ttf) in Ubuntu</title>
		<link>http://benaiah41.wordpress.com/2008/05/12/adding-a-font-in-ubuntu/</link>
		<comments>http://benaiah41.wordpress.com/2008/05/12/adding-a-font-in-ubuntu/#comments</comments>
		<pubDate>Mon, 12 May 2008 13:51:08 +0000</pubDate>
		<dc:creator>Benaiah</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[install]]></category>

		<guid isPermaLink="false">http://benaiah41.wordpress.com/?p=28</guid>
		<description><![CDATA[Here is how to add a .ttf font in Ubuntu.
Open a terminal and change to the directory that contains the font:
Example: cd /home/username/Desktop
Copy the file to /usr/share/fonts and rebuild your font cache:
     cp font_name.ttf /usr/shar/fonts/font_name.ttf

     sudo fc-cache -f -v

The font should now be installed and available in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benaiah41.wordpress.com&blog=1321834&post=28&subd=benaiah41&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Here is how to add a .ttf font in Ubuntu.</p>
<p>Open a terminal and change to the directory that contains the font:</p>
<p>Example: cd /home/username/Desktop</p>
<p>Copy the file to /usr/share/fonts and rebuild your font cache:</p>
<pre><code>     cp font_name.ttf /usr/shar/fonts/font_name.ttf

     sudo fc-cache -f -v
</code></pre>
<p>The font should now be installed and available in your applications.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/benaiah41.wordpress.com/28/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/benaiah41.wordpress.com/28/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benaiah41.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benaiah41.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benaiah41.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benaiah41.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benaiah41.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benaiah41.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benaiah41.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benaiah41.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benaiah41.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benaiah41.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benaiah41.wordpress.com&blog=1321834&post=28&subd=benaiah41&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benaiah41.wordpress.com/2008/05/12/adding-a-font-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/35f77a49db2c428adbd4bccda4208942?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Benaiah</media:title>
		</media:content>
	</item>
	</channel>
</rss>