Kinect Hacks
Comments off
Comments off
The Register reports that Oracle is splitting the Java Virtual Machine into two tiers, a free one and a paid “premium” one. This is a natural progression of Oracle’s strategy to monetize the major assets of its Sun Microsystems acquisition.
While paying for a (presumably) faster or more feature-full JVM is no problem for large development companies, as a small business developer, I am glad most of my development projects use truly open and/or free languages, including Python, C++, and C#.
Comments off
The recent attack on twitter serves as a reminder about the dangers of cross-site requset hijacking. This entry provides a few suggestions on how to secure your site from this form of attack.
Comments off
To add a tab in the green tab bar, go to portal_actions/object and add an action.
Some useful expressions:
Note the python expression portal.restrictedTraverse allows python expressions/scripts to access the new browser views
Comments off
Mitre has published the top 25 programming mistakes that lead to security breaches.
Cross-site scripting is number one, with SQL Injection and buffer overflow following.
Comments off
Here is the list of slots that are defined in the master page template for Plone.
To use one of these slots (for example, “style_slot”) use the metal:fill-slot macro
<style metal:fill-slot="style_slot" type="text/css">
table.LesionLocation {border:1px solid blue;border-collapse:collapse;}
table.LesionLocation td {border:1px solid black;padding: 5px;}
</style>
The page template must reference the master template:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" i18n:domain="plone" metal:use-macro="here/main_template/macros/master"> ... </html>
Comments off
A quick paste of a newsgroup post that outlines the steps necessary to update the xnat distribution from cvs.
To update from RC1, you should:
cd $XNAT_HOME cvs update -d $TOMCAT_HOME/bin/shutdown.sh bin/update.sh -Ddeploy=true psql -f deployments/PROJECT/sql/PROJECT-update.sql $TOMCAT_HOME/bin/startup.sh
The only thing I added to the schema this round were a few parameters for configuring access to DICOM server. Those are used on that settings page, so it would make since that the save would fail if those columns didn't exist in the db.
Try running the referenced -update.sql, and restarting Tomcat.
Comments off
Comments off
For a short script I was writing I needed to convert a string representation of the month (“month name”) into a numerical value (“month number”). A quick google led to many solutions to the inverse problem, which to me seems a lot easier. Here is a quick and dirty solution that uses the calendar module.
import calendar
list(calendar.month_name).index(month_name)
I chose to use the calendar module array month_name because I would rather not have to create a list of month names myself.
At my workplace I am tasked with getting familiar with and eventually customized XNAT, a Java/Tomcat web-based content management system for the health care industy. As this is the first time I am working with a Jave web application, the learning curve is particularly steep. Here are my running notes as I try to get familiar with Java/JSP/XNAT. I must say though that I think Plone/Zope or even an ASP.Net system would have been a lot easier to understand!
Comments off