Sunday, October 29, 2006

Went up to RPI this weekend for the Head of the Fish. Was a lot of fun. Also gave me an excuse to try out picassa web albums and flickr. :: new post coming ::

Monday, October 09, 2006

Google buys YouTube for $1.65 billion

I so want to be one of them right now.... SAN FRANCISCO - Google Inc. is snapping up YouTube Inc. for $1.65 billion in a deal that catapults the Internet search leader to a starring role in the online video revolution.

The all-stock deal announced Monday unites one of the Internet’s marquee companies with one of its rapidly rising stars. It came just hours after YouTube unveiled three agreements with media companies in an apparent bid to escape the threat of copyright-infringement lawsuits.

The price makes YouTube, a still-unprofitable startup, by far the most expensive purchase made by Google during its eight-year history.

[link]

Wednesday, October 04, 2006

"the brodermobile has been soooooooooold"

Wolfy2985: oh yeah??? to Jon??? lol

HolaRico421: nooooooooooooo!
HolaRico421: it can't be sold
Sephroth2k: hahaha
HolaRico421: did you sell it for a good amount
Sephroth2k: **
HolaRico421: damn
HolaRico421: i would've bought it for that
Sephroth2k: haha

pseudofunk: NOOOOOOOOOOOOOOOOOOOOOOOOO


DoM iNa TiN g17: NO!
Sephroth2k: haha
DoM iNa TiN g17: how could you DO that?

c r e pnd e t h9: omg! lol

GodHatesMe84: nooooooooooooo

MobileLALAJI: hahahaha

lizardman45: ?
lizardman45: i don't remember the brodermobile
Sephroth2k: the one keri rammed into
lizardman45: oh, yeah, haha

Sean: I.... am...... genuinly upset....

Wednesday, September 27, 2006

Top 10 Web 2.0 sites

Well, if i come across some fun links I'm going to post them here. This takes a look at 10 popular Web 2.0 sites. A pretty good read.... http://wisdump.com/web/top-10-web-20-winners/

Sunday, September 24, 2006

PHP / Java Bridge + Blogger API

So I've been meaning to play around with a PHP / Java Bridge as well as the Blogger API, so I figured why not to both at the same time. I have briefly used the phpatomapi, which getting to use with the blogger beta is next on my list of things to do (also while i work on blog comments using this bridge). Also to add to this is being able to display/edit/add comments to the posts displayed.

Below is my proof of concept version I am currently adding more functionality to it.

The Java version of the code is: (.java)

String username = "";
String userpass = "#";
String feed = "http://beta.blogger.com/feeds/33817521/posts/full";

//long start = System.currentTimeMillis();
try{
URL feedUrl = new URL(feed);
GoogleService myService = new GoogleService("blogger", "bpr");

//Set up authentication (optional for beta Blogger, required for current Blogger):
myService.setUserCredentials(username, userpass);

//Send the request and receive the response:
Feed myFeed = myService.getFeed(feedUrl, Feed.class);
//String feedID = myFeed

System.out.println(myFeed.getTitle().getPlainText());
LinkedList entries = (LinkedList)myFeed.getEntries();
int itemsPerPage = myFeed.getItemsPerPage();
Entry entry;
for(int i=0; i<itemsPerPage; i++){
entry = (Entry)entries.get(i);
System.out.println(entry.getId());
System.out.println(entry.getTitle().getPlainText());
System.out.println(entry.getPublished().toUiString());
System.out.println(entry.getUpdated().toUiString());
TextContent tc = (TextContent)entry.getContent();
HtmlTextConstruct ptc = (HtmlTextConstruct)tc.getContent();
System.out.println(ptc.getHtml());
//Feed Comm

}
}
catch(Exception e){
e.printStackTrace();
}


The PHP / Java bridge part: (.php)

class Blogger implements Blog{
private $feed;
private $itemsPerPage;
private $entries;
private $entry;
private $content;
private $contentHTML;

public function __construct($username, $userpass, $feedURL){
try{
$url = new JAVA("java.net.URL", $feedURL);
$service = new JAVA("com.google.gdata.client.GoogleService", "blogger", "bpr");
$service->setUserCredentials($username, $userpass);

$this->feed = $service->getFeed($url, new JavaClass("com.google.gdata.data.Feed"));
$this->itemsPerPage = $this->feed->getItemsPerPage();
$this->entries = new JAVA("java.util.LinkedList", $this->feed->getEntries());

//set up vars
$this->entry = new JAVA("com.google.gdata.data.Entry");
$this->content = new JAVA("com.google.gdata.data.TextContent");
$this->contentHTML = new JAVA("com.google.gdata.data.HtmlTextConstruct");
}
catch (JavaException $e) {
$exStr = java_cast($e, "string");
echo "Exception occured; mixed trace: $exStr\n";
$trace = new java("java.io.ByteArrayOutputStream");
$e->printStackTrace(new java("java.io.PrintStream", $trace));
print "java stack trace: $trace\n";
}
}

public function getFeedTitle(){
return java_values($this->feed->getTitle()->getPlainText());
}

public function getItemsPerPage(){
return $this->itemsPerPage;
}

public function getEntryTitle($i){
$this->entry = $this->entries->get((int)$i);
return java_values($this->entry->getTitle()->getPlainText());
}

public function getEntryPublishedDate($i){
try{
$this->entry = $this->entries->get((int)$i);
return java_cast($this->entry->getPublished()->toUiString(), "string");
}
catch (JavaException $e) {
$exStr = java_cast($e, "string");
echo "Exception occured; mixed trace: $exStr\n";
$trace = new java("java.io.ByteArrayOutputStream");
$e->printStackTrace(new java("java.io.PrintStream", $trace));
echo "java stack trace: $trace\n";
return null;
}
}

public function getEntryHTML($i){
//$content = $entry->getContent();
//$contentHTML = $content->getContent();
//echo java_values($contentHTML->getHtml()) . "<br>";
$this->entry = $this->entries->get((int)$i);
$this->content = $this->entry->getContent();
$this->contentHTML = $this->content->getContent();
return java_values($this->contentHTML->getHtml());

}

public function getEntryUpdatedDate($i){
try{
$this->entry = $this->entries->get((int)$i);
return java_cast($this->entry->getUpdated()->toUiString(), "string");
}
catch (JavaException $e) {
$exStr = java_cast($e, "string");
echo "Exception occured; mixed trace: $exStr\n";
$trace = new java("java.io.ByteArrayOutputStream");
$e->printStackTrace(new java("java.io.PrintStream", $trace));
echo "java stack trace: $trace\n";
return null;
}
}

}

And the calling part: (.php)

$bpr = new BPR();
$blogger = $bpr->getBlogger("", "#", "http://beta.blogger.com/feeds/33817521/posts/full");
echo "Blog Title: " . $blogger->getFeedTitle() . "<br>";

$itemsPerPage = $blogger->getItemsPerPage();
for($i=0; $i<$itemsPerPage; $i++){
echo $blogger->getEntryTitle($i) . " (" . $blogger->getEntryPublishedDate($i) . " | " . $blogger->getEntryUpdatedDate($i) . ")<br>";
echo $blogger->getEntryHTML($i) . "<br>";
echo "<br>";
}

Once I have more data in my blog i can run some timing tests

Sunday, September 03, 2006

New blog

So I had an older blog on blogspot a while back under SEPHROTH64 but I can't remember the login for it. I sent a request for my password so when i get that i will move the posts over to this one. My desktop is now running gentoo (AMD64) and currently with KDE. Im working on getting XGL to work. For those of you who don't know what XGL is check out this video