Almighty Bus Error

Blog about computer science, code snippets and tips.

GitHub repository with examples.
The author is a Computer Engineering student at FCT/UNL.
rss

    December 2009

  • Snippet.Java: Using FilenameFilter
    To use a FilenameFilter it is needed to implement a method accept which has as arguments the directory where the file exists and the name of the file. It is normally used in conjuction with the list method of the File object. (...)
  • Drawing Splines in openGL
    This article will cover the basics of drawing bezier curves in openGL and how to convert from other curves to Bezier, such as Bspline and Catmull-Rom curves. (...)

    November 2009

  • LaTex: Using Tables
    To create a table in LaTex you can just use a tabular block, or use a tabular block and a table wrapper block. (...)

    October 2009

  • Java: Remote Method Invocation
    The Java RMI is a way to create distributed services. It is composed of RMIRegistry which is a name registry which saves the resources available (servers) in a JVM. The registry is, however, accessible through different JVM’s when configured. (...)

    August 2009

  • FTP in Python
    In Python, to create and maintain a FTP communication, the ftplib or urllib (explained in a future post) can be used. (...)
  • HTTP in Python
    To create and HTTP connection we use the httplib module which provides some simple yet effective methods to create a connection and send requests to an HTTP server. The module urllib can also be used and is easier, does, however only perform GET requests (explained in a future post). (...)
  • The Comic Massacre
  • Snippet.Py: Getting an image resolution
    Using PIL it is possible to get the width and height of a image using the property size. (...)

    May 2009

  • Stop that fridge!
  • The connectionless networking protocol
    Also known as UDP, like the title suggests, it does not have a logical idea of connection. (...)
  • Multicast: An UDP strong point
    Multicast is a way to distribute UDP messages to multiple hosts in an automated fashion. It works by making every host join a group which is composed of an IP address in the range 224.0.0.0 to 239.255.255.255 and a port. Every message sent to a group will be delivered to every host that has joined it. Since it can generate alot of traffic, multicast is only used at a LAN or intranet level. (...)
  • I shot the seriff
  • HTTP Proxy: Implementation
    Continuing from “Concept Introduction” we will now see how a possible implementation is done. (...)
  • Snippet.Cpp: Comparing Types of Classes
    This snippet shows how to differentiate between two classes that have heritage from the same class. (...)
  • Snippet.Java: Dump InputStream → OutputStream
    This piece of code keeps reading 1024 bytes from the InputStream and writing to the OutStream until the read function returns an error value (-1) which means there is not anything else to read. (...)
  • HTTP Proxy: Concept introduction
    An HTTP proxy is a program that acts as a seamless server (since the user does not notice its existence under normal circumstances) and forwards HTTP traffic. (...)
  • Threading in Java
    A thread is a lightweight process that will act as the child of the process that created it. If the parent process is interrupted the child will be inherited by the kernel process, however, most of the times when the parent dies and child loses its purpose. A thread will seemingly run at the same time as the other processes which raises concurrency issues but this won’t be discussed in this article. (...)
  • Snippet.C: Getting the length of an array.
    The following C macro gets the amount of memory the array uses and divides it by the size of the first position: (...)

[top]