Archive

Archive for the ‘Uncategorized’ Category

General Update

September 29th, 2009 No comments

I haven’t updated for awhile because of qualifying exams and research. Now that is done and over with, I will try to make updates more frequently. Several packages I would like to write reviews for soon and make little demos for are:

  1. Meld (A Diff tool. So far I’ve been quite pleased with it’s unique way of displaying diffs.)
  2. Paraview 3.6.1 – Now that I have more time I hope to take another stab at the new and improved version.
  3. TurboVNC – Modified version of tightVNC that works very well for media over 54Mbps wifi and 100Mbit LANs. I’ve been able to watch videos, play tux racer, and starcraft over wine without noticing any differences. In fact, I’ve run several OS’s in virtualbox remotely using TurboVNC for some computer repair training sessions over G wifi and no one noticed any latency.

I’ve updated some of the SCPD code, and I’m also working on some small short term projects.

Categories: Uncategorized Tags:

Paraview. Can it be even considered “open”-source?

June 13th, 2009 6 comments

I’ve been working on a poster for a research conference, and decided to try my hand at generating nice plots using gnuplot, tecplot, and paraview. Paraview is “open-source” and can handle a variety of datasets. It touts itself as a great tool with tons of features.

In reality, paraview is fairly difficult to use. It’s not intuitive. You can’t import data easily (csv, text). Best of all, Kitware charges for documentation!

While paraview may technically give their source away, I argue that it is not “open”. First. if paraview was indeed “open” in spirit, why do they charge for documentation? Now I don’t care so much about all the nitty gritty details. I just want to be able to find a doc with information about it’s python classes and write a little filter to import 3D point data + faces. However, to my knowledge, no such document really exists. At least it’s not in the top 3 or 4 pages of google search, which means if it does exists, it’s been hidden.

Second, if paraview was “open”, why is CSV not properly supported? I just wanted to plot data from a spreadsheet/matrix/whatever. Why do I even need to use a python filter to read a file and import it?

Also, I will grip about how the doxygen docs are next to unusable. They aren’t even in alphabetical order!

In conclusion, while the features exist in paraview as Kitware hypes it up to be, paraview, at this point in time, can’t really be an open-source application and is entirely unusable for general purposes. Yes, there are nifty filters, which, after you spend a few hours trying to figure how to operate work spectacularly well. Yes, it does do a lot of nifty things, like create movies, extract surfaces, and points. There are a whole slew of things that are nice about paraview. However, the following “issues”, mar whatever Kitware claims paraview to be:

  • Lack of any useful documentation, aside from learning how the interface works (Yes, the GUI and pipeline system are SO intuitive that you need to look at a manual to operate. I will say that it is more user friendly than blender, which doesn’t mean much.
  • Inflexibility in importing data. If I can’t import my data, how can I even render/plot/manipulate it?

Therefore, Paraview is open-source, as in “I show you the source”, but it fails in being “open”-source, as they blatantly withold information from you. It is nothing less than intellectual blackmail. I think I will stop trying to use paraview for the time being. It’s a big waste-of-time/time sink. Five hours of messing around just to try to get a contour plot and I still haven’t gotten it to work. Although I think I figured out how to do it theoretically, ideally I would modify the python programmable source filters. However, as I mentioend before, there is no documentation on it that is useful. I just want to add mesh data via faces.

Categories: Uncategorized Tags:

SCPD Class Link Extractor

May 9th, 2009 25 comments

Updated 1/13/11: Turns out, I had corrected the script sometime earlier in 2010, but had thought I had already uploaded it, so my script looked pretty similar to Joey’s. I just looked here, and it turns out the script is not the same as the old one. I apologize for the confusion.

At the end of every quarter I use the following greasemonkey script to extract the links of each of the classes.

Usage: Go to the current quarter SCPD page and click on each of the links. Extracting the links takes awhile, since it is based on the previous SCPD link extractor. The GM script simply goes to each lecture page and extracts the link. After extraction is finish a new tab will appear and will display all the links for you to copy and paste. (This uses the same idea as the Xanga2RSS extractor.)

It seems that the SCPD program keeps the lectures archived at these links for a pretty long time. At least for a quarter or two. (However I once googled for SCPD links and found an EE one from 07 and it still worked, so perhaps SCPD never really erases them.)

Here it is below:

// ==UserScript==
// @name           SCPD links
// @namespace      hawflakes
// @description    Strips video links off of SCPD
// @include        https://myvideosu.stanford.edu/*
// ==/UserScript==
 
var vidurls="";
var links;
 
// Main link page for a course
if (window.location.toString().indexOf("GradCourseInfo.aspx?")>=0)
{
// Get links to video page
 
links = findXPathNodes("/html/body//table/tbody/tr/td/a[text()='WMP']");
i=0;
 
var href=links.snapshotItem(i).getAttribute("href");
var url = href.substring(href.indexOf("'")+1);
url = url.substring(0,url.length-4);
get(url,"",getlink,i);
 
}
 
// helper functions
function findXPathNode(xpath, start,doc)
{
	var result = (doc == null ? document : doc).evaluate(xpath,(start == null ? document : start), null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE ,null);
	return (result.snapshotLength > 0 ? result.snapshotItem(0) : null);
}
 
function findXPathNodes(xpath, start,doc)
{
	return (doc == null ? document : doc).evaluate(xpath,(start == null ? document : start), null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE ,null);	
}
 
function elem(tagname,content)
{
	var ret = document.createElement(tagname);
	ret.innerHTML = content;
	return ret;
}
 
function get(url, data, cb,info) {
	var client = new XMLHttpRequest();
	client.open("GET",url,true);
 
	client.onreadystatechange = function () {
		if(client.readyState==4) {
 
			cb(client,info);
 
		}
	}
	client.send(null);  
}
 
function getlink(client,info)
{
 
 
	var tempurl=client.responseText.substring(client.responseText.indexOf("data=\"")+"data=\"".length,client.responseText.indexOf(".wmv\"")+4)+"\n";
	alert(tempurl);
 
	vidurls=vidurls+tempurl;
	GM_log(tempurl);
if (info<links .snapshotLength-1)
{
	var href=links.snapshotItem(info+1).getAttribute("href");
	var url = href.substring(href.indexOf("'")+1);
	url = url.substring(0,url.length-4);
	get(url,"",getlink,info+1);
}
else
{
 //Generate links page
GM_openInTab("data:text;charset=UTF-8," + encodeURI(vidurls));
}
 
}
Categories: Uncategorized Tags: , ,

Downtime…

April 25th, 2009 No comments

Just got this blog back up and running. My host migrated to a better server and I had to recompile php and the works, since this runs on fastcgi. Anyhow, apparently I had compiled php with ipv6 enabled and wordpress kept on farting out the error message “error establishing database connection”, even though I had logged into the sql server via commandline multiple times and verified that everything was there.

After an hour of searching, I found the answer on the wordpress forums. The gist of it is, that the DB_HOST variable in wp-config.php had to be changed to 127.0.0.1. After this correction, the blog magically worked again.

Note, I am not leaving you dry. I’ve currently been working on a simple deluge plugin for personal use which I may release, as well as a simple MathML to latex converter using my MathML-in-gwt kit (GWT converter). Currently it can spit out a decent amount of latex, but I am still need to automate the compatibility of the symbols and such.