Back home

Posted December 16, 2006 by kristoferwhite
Categories: FreeBSD

Since classes are wrapping up, and my dependence for Internet Explorer fades away, I get to go back to FreeBSD. I don’t know why I like it more; I can’t find a single rationale. All I know is that ports are fun. I had a few, *minor* hiccups while installing. Once was the fact it didn’t like my two DOS partitons, each being primary. To fix it, I simply converted one to NTFS, although in the process it seems to have lost my Las Vegas episodes. Luckily, my cartoons remained intact. I also did some digging in the /usr/ports folder and found that all the qemu stuff was in there (qemu, kqemu-kmod, and qemu-launcher), which is cool. I couldn’t find those in yum when I was running fedora. I does seem, however, with the kqemu-kmod loaded, the Win2k install takes a litte longer. Wonder why…

Incoming !

Posted December 4, 2006 by kristoferwhite
Categories: Uncategorized

Wow, for not apparent reason, the blog has recieved a MASSIVE 64 hits so far today, as compared to the normals 15 – 20 a day. strange…

Put that pointer away!

Posted December 3, 2006 by kristoferwhite
Categories: f/oss, ImageCloud, personal

I’ve been working on imagecloud more, and listening to my sister tell me how it needs a gui for mass appeal. I don’t disagree, but I am the LAST person one wants designing one of those. Think… http://www.codinghorror.com/blog/images/wgetgui-screenshot.png . Don’t get me wrong, I love wget, but I don’t know that the average user loves that UI. Anyway, my sister is sketching what a sane UI would work like for me. Back in the code, where I actually work, I realized I don’t need that pointer for Glob() to return if I used a variable parameter instead of value and make it a procedure. Much simpler to work with then. I’m almost finished. I just need to complete the searching through the tags portion, and mayble look into what other libraries are available to it for graphic displaying (read : Thumbnails).

ImageCloud Update

Posted December 1, 2006 by kristoferwhite
Categories: ImageCloud, pascal

My Pascal version of ImageCloud is coming along decently. I couldn’t return an StrArray for some reason (fpc kept failing to compile) so rather than figure out the problem, I used a pointer instead. Seemed simpler.

program ImageCloud( input, output, TagDB );


uses

  DOS; {to enable findfirst and findnext}

const

  MAXDBSIZE = 224; {max number of cells to the array}

type

  StrArray = Array [0..(MAXDBSIZE-1)] of String; {define type for array}

  FileTypes = (JPG, GIF, PNG);

  StrAryPtr = ^StrArray;

var

  TagDB : Text; {Declare database file for tags and filenames}



function Glob(pathname : String) : StrArray;

  var

    listing : StrArray;

    listptr : StrAryPtr;

    s : SearchRec; {variable to store the found file in}

    i : Integer; {counter variable for loops}

  begin

    i := 1; 

    listing[0] := ' '; {set the first cell of the filelist to a blank space for loop termination check}

    findfirst(pathname + '*.*', AnyFile, s); {find first file in provided directory}

    if s.name <> '' then {if the name is not blank, that is, an file was found in the provided directory}

      begin

        while (i < MAXDBSIZE) and ((pathname + s.name) <> listing[i-1]) do 

          begin

            listing[i] := pathname + s.name; {store absolute path in cell}

            i := i + 1; {Increment counter value}

            findnext(s); {find next file in directory}

          end;

        listptr := @listing;

        Glob := listptr^;

      end

    else {if no files are found...}

      begin

        writeln('No files in that directory!');

        exit;

      end;

  end;


procedure ListFiles(filelist : StrArray);

  var

    i : Integer;

  begin

    i := 1;

    while (i < MAXDBSIZE) and (filelist[i] <> '') do {while not end of array and filelist[i] not empyty}

      begin

        writeln(filelist[i]); {write filelist value to stdout}

        i := i + 1; {increment counter}

      end;

  end;



procedure PickleDB(filelist : StrArray);

  var

    i : Integer;

  begin

    i := 1;

    while (i < MAXDBSIZE) and (filelist[i] <> '') do {while not end of array and filelist[i] not empyty}

      begin

        writeln(TagDB, filelist[i]); {write filelist value to file}

        i := i + 1; {increment counter}

      end;

  end;



procedure AddFiles;

  var

    filelist : StrArray;

    pathname : String;

  begin

    writeln('What is the path to scan for the images?');

    readln(pathname);

    writeln('Globbing...');

    filelist := Glob(pathname);

    writeln('Listing...');

    ListFiles(filelist);

    writeln('PickleDB');

    PickleDB(filelist);

    writeln('Done!')

  end;



procedure BrowseFiles;

  begin

    writeln('Not yet implemented!');

    exit;

  end;

	

procedure UserInput;

  var

    inputchar : Char;

    loopcatch : Integer;

  begin

    loopcatch := 0;

    inputchar := ' ';

      repeat

        write('Do you want to [B]rowse, [A]dd, or [Q]uit? >>');

        readln(inputchar);

          case inputchar of

            'a','A': begin

                       AddFiles;

                       loopcatch := loopcatch + 1;

                     end;

            'b','B': begin

                       BrowseFiles;

                       loopcatch := loopcatch + 1;

                     end;

            'q','Q': begin

                       loopcatch := loopcatch + 1;

                       exit;

                     end;

          end;

      until loopcatch <> 0;

  end;

	  

begin {main}

  assign(TagDB, 'tags.dat'); {associate the variable TagDB with tags.dat file}

  rewrite(TagDB); {ready file for writing}

  UserInput; {call main user input subprogram}

  close(TagDB)

end. {main}

Programming Humor

Posted November 30, 2006 by kristoferwhite
Categories: personal

http://just-humour.blogspot.com/2006/11/programming-languages-are-like-women-by.html

ImageCloud has a Green Light!

Posted November 29, 2006 by kristoferwhite
Categories: ImageCloud

I finally got the review back on the ImageCloud proposal. The teacher green lighted it (as the title say 😉 ).

My Proposal:
—————-
Project Description:
ImageCloud was born out desperation. I thought the project up after going through my hard drive and finding folders of images that had no clean naming scheme. Like many digital cameras, they had names like DCM234620.JPG. Sure, Windows could rename them coming of the camera, but I don’t (won’t) use Windows.
The benefits of ImageCloud versus other photo album software are that unlike generic albums, ImageCloud takes a more human approach. People don’t usually categorize a single image off a single word. A picture of a forest could be described as “nature,” “trees,” “green,” “photo,” “streams,” or “forest.” With normal directory structures, this would require a large number of folders and sub-folders. This model is time consuming and unnatural to navigate. With ImageCloud, you would ‘tag’ a photo of a forest with the forementioned tags, and any single one would be able to recognize it. Clean, simple, and fast.
Expected Outputs:

  • List of photos matching tag
  • Gallery of photos matching tag (if we get that far in class)
  • Cloud of tags to browse by (if we get that far in class)

Required Inputs:

  • A list of files to store in the database
  • A directory of folders
  • List of tags per photo

Brief Code Description:
The code will consist of a set of procedures (or objects if we get into OOP). They will be responsible for searching through the directories for images [using findfirst / findnext or glob depending on the OS ran on], getting a list of tags per image, writing to / appending the database, and output.

The Response:
——————-
“OK, Greenlight.

Excellent idea. Althouh there are many photo albums out there this does have the unique twist that gives it the green light.

I would like a program like this.

BTW, do you envision renaming the files as well?

I do use the XP copy function to do that and create folders with sortable (by date) and descriptive names.
One problem I have with this is that it does not check for pre-exisiting files and will actually overwrite any with the same name – oops if you have also selected the Delete after copy function.
So recommend that you check for that.”

Blogging Clients in Fedora6

Posted November 27, 2006 by kristoferwhite
Categories: Fedora

I did some searching around today. I tried Gnome-Blog, Drivel, BloGTK and another (who’s name escapes me) with the multiple user setup that WordPress uses. So far, I have only managed to get Drivel and BloGTK to work. It looks like Gnome-Blog would work, but it keeps appending /wordpress/xmlrpc.php to the end of what you enter. This is a problem when (in my case) I wanted to enter https://kristoferwhite.wordpress.com/xmlrpc.php . Drivel and BloGTK let me enter the whole URL, with out appending anything to my string. In the end, I chose Drivel. It automagically picked up my categories; BloGTK didn’t.