<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>HD1s Personal weblog</title>
    <link rel="alternate" type="text/html" href="http://hasandiwan.info/" />
    <link rel="self" type="application/atom+xml" href="http://hasandiwan.info/atom.xml" />
    <id>tag:hasandiwan.info,2009-11-04://1</id>
    <updated>2010-03-10T00:36:53Z</updated>
    
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.32-en</generator>

<entry>
    <title>The Guardian API Terms of Use</title>
    <link rel="alternate" type="text/html" href="http://hasandiwan.info/2010/03/the-guardian-api-terms-of-use.html" />
    <id>tag:hasandiwan.info,2010://1.187</id>

    <published>2010-03-10T00:35:00Z</published>
    <updated>2010-03-10T00:36:53Z</updated>

    <summary>A little reminder to go through the Guardian&apos;s Terms of Use before embarking on my next data-driven project....</summary>
    <author>
        <name>Hasan Diwan</name>
        
    </author>
    
    <category term="guardian" label="Guardian" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="termsofuse" label="terms of use" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="todo" label="todo" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://hasandiwan.info/">
        <![CDATA[<p>A little reminder to go through <a href="http://guardian.co.uk">the Guardian</a>'s <a href="http://www.guardian.co.uk/open-platform/politics-api/terms-and-conditions">Terms of Use</a> before embarking on my next data-driven project.</p>]]>
        
<br/>Kindly leave a comment <a href="http://hasandiwan.info/2010/03/the-guardian-api-terms-of-use.html">here</a>
    </content>
</entry>

<entry>
    <title>Reminder Copy-on-Focus</title>
    <link rel="alternate" type="text/html" href="http://hasandiwan.info/2010/03/reminder-copy-on-focus.html" />
    <id>tag:hasandiwan.info,2010://1.186</id>

    <published>2010-03-09T08:43:21Z</published>
    <updated>2010-03-09T08:48:53Z</updated>

    <summary>Another Reminder update. I realised that, if I send several messages over the wire, only the last one gets copied to the clipboard. Well, no more, now if you have multiple message windows open and you click on one, it&apos;s...</summary>
    <author>
        <name>Hasan Diwan</name>
        
    </author>
    
    <category term="classlibraries" label="Class Libraries" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="clipboard" label="Clipboard" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="desktopandsystem" label="Desktop and System" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="filemanagement" label="File Management" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="graphics" label="Graphics" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="java" label="Java" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="languages" label="Languages" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="programming" label="Programming" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="swing" label="Swing" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="userinterfaceclasses" label="User Interface Classes" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="utilities" label="Utilities" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="windowadapter" label="WindowAdapter" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://hasandiwan.info/">
        <![CDATA[<p>Another <a href="http://prolificprogrammer.com/%7Ehdiwan/Reminder.jar">Reminder update</a>. I realised that, if I send several messages over the wire, only the last one gets copied to the clipboard. Well, no more, now if you have multiple message windows open and you click on one, it's text is copied to the clipboard. If you want to change what's on the clipboard, you just click another one. The source file to do this is available after the flip. Props to <a href="http://javachannel.net">Freenode's ##java</a> for helping me figure out <a href="http://java.sun.com/javase/6/docs/api/java/awt/event/WindowAdapter.html">WindowAdapter</a>.</p>

<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/a87c1edb-d668-44e5-938f-84404523d356/" title="Reblog this post [with Zemanta]"><img style="border: medium none; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=a87c1edb-d668-44e5-938f-84404523d356" alt="Reblog this post [with Zemanta]"></a><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>]]>
        <![CDATA[<code><pre>
package Reminder;

import java.awt.Toolkit;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.ClipboardOwner;
import java.awt.datatransfer.StringSelection;
import java.awt.datatransfer.Transferable;
import java.awt.event.KeyEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.IOException;
import java.text.DateFormat;
import java.util.Date;
import java.util.logging.Handler;
import java.util.logging.Logger;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JTextField;
import javax.swing.JWindow;

public class DistributedReminderGUI
    extends WindowAdapter
    implements Runnable, ClipboardOwner {

    private static Logger logger = Logger.getLogger("Reminder");
    private DistributedReminderGUIHistory historyView;

    public DistributedReminderGUI() {
	Handler messageLog = null;
	messageLog = (Handler)new DistributedReminderHandler();
	messageLog.setFormatter(new DistributedReminderXMLFormatter());

	logger.addHandler(messageLog);
    }

    public void copyToClipboard(String content) {
	Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard();
	StringSelection selection = new StringSelection(content);
	cb.setContents((Transferable)selection, this);
    }

    // ClipboardOwner
    public void lostOwnership(Clipboard clipboard, Transferable contents) { 
	return;
    }

    JTextField field = new JTextField();
    // Runnable
    public void run() {
	DateFormat now = DateFormat.getDateTimeInstance();
	try {
	    Toolkit.getDefaultToolkit().beep();
	    JFrame frame = new JFrame(now.format(new Date()));
	    frame.addWindowFocusListener(this);
	    field.setText(System.getProperty("reminder.notificationMessage"));
	    field.setEditable(false);
	    frame.add(field);
	    frame.pack();
	    frame.setVisible(true);
	    this.copyToClipboard(field.getText());
	} catch (java.awt.HeadlessException e) {
	}
	logger.info(System.getProperty("reminder.notificationMessage"));
    }

    // WindowAdapter
    public void windowGainedFocus (WindowEvent e) {
	String contents = field.getText();
	this.copyToClipboard(contents);
	logger.info("Clipboard contents: "+contents);
    }
}</code></pre>]]>
<br/>Kindly leave a comment <a href="http://hasandiwan.info/2010/03/reminder-copy-on-focus.html">here</a>
    </content>
</entry>

<entry>
    <title>Barack Obama Interviews at Google</title>
    <link rel="alternate" type="text/html" href="http://hasandiwan.info/2010/03/barack-obama-interviews-at-google.html" />
    <id>tag:hasandiwan.info,2010://1.185</id>

    <published>2010-03-09T02:04:11Z</published>
    <updated>2010-03-09T02:05:15Z</updated>

    <summary></summary>
    <author>
        <name>Hasan Diwan</name>
        
    </author>
    
    <category term="barackobama" label="barack obama" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ericschmidt" label="eric schmidt" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="google" label="google" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="interview" label="interview" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://hasandiwan.info/">
        <![CDATA[<center><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/k4RRi_ntQc8&color1=0xb1b1b1&color2=0xcfcfcf&hl=en_US&feature=player_embedded&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/k4RRi_ntQc8&color1=0xb1b1b1&color2=0xcfcfcf&hl=en_US&feature=player_embedded&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></embed></object></center>]]>
        
<br/>Kindly leave a comment <a href="http://hasandiwan.info/2010/03/barack-obama-interviews-at-google.html">here</a>
    </content>
</entry>

<entry>
    <title>Argentina!</title>
    <link rel="alternate" type="text/html" href="http://hasandiwan.info/2010/03/argentina.html" />
    <id>tag:hasandiwan.info,2010://1.184</id>

    <published>2010-03-08T05:18:43Z</published>
    <updated>2010-03-08T07:19:48Z</updated>

    <summary>Ok, if you can&apos;t play it, I sampled Mitch from the March 5th, 2010 episode of the Now Show slagging off Argentina....</summary>
    <author>
        <name>Hasan Diwan</name>
        
    </author>
    
    <category term="argentina" label="Argentina" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="falklands" label="Falklands" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="lasmalvinas" label="Las Malvinas" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mitchbenn" label="Mitch Benn" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://hasandiwan.info/">
        <![CDATA[<embed src="http://prolificprogrammer.com/~hdiwan/Argentina.mp3" autoplay="off" type="audio/mpeg" /><p>Ok, if you can't play it, I sampled <a href="http://mitchbenn.com">Mitch</a> from the <a href="http://prolificprogrammer.com/~hdiwan/NowShow-20100305.mp3">March 5<sup>th</sup>, 2010</a> episode of the <a href="http://www.bbc.co.uk/programmes/b006qgt7">Now Show</a> slagging off <a href="http://prolificprogrammer.com/~hdiwan/Argentina.mp3">Argentina</a>.</p>]]>
        
<br/>Kindly leave a comment <a href="http://hasandiwan.info/2010/03/argentina.html">here</a>
    </content>
</entry>

<entry>
    <title>Replacing JythonC in Jython 2.5</title>
    <link rel="alternate" type="text/html" href="http://hasandiwan.info/2010/03/replacing-jythonc-in-jython-25.html" />
    <id>tag:hasandiwan.info,2010://1.183</id>

    <published>2010-03-07T03:05:06Z</published>
    <updated>2010-03-07T03:14:40Z</updated>

    <summary>I heard, on the jython podcast&apos;s latest episode, of a replacement for jythonc. After the flip, I&apos;ve edited Dan Cheahs jythonc replacement, compile.java, to add per file output and use the system-wide, platform-independant temporary directory, as denoted by the java.io.tmpdir...</summary>
    <author>
        <name>Hasan Diwan</name>
        
    </author>
    
    <category term="benchmark" label="benchmark" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="bytecode" label="Bytecode" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="compiler" label="Compiler" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="faqshelpandtutorials" label="FAQs Help and Tutorials" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="haskell" label="Haskell" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="itunes" label="ITunes" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="jython" label="jython" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="language" label="Language" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="languages" label="Languages" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="parrot" label="Parrot" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="podcast" label="Podcast" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="programming" label="Programming" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="rss" label="RSS" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ruby" label="Ruby" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="scala" label="Scala" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="temporaryfolder" label="Temporary folder" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://hasandiwan.info/">
        <![CDATA[<p>I heard, on the <a href="http://feedproxy.google.com/%7Er/JythonPodcast/%7E3/F4zcjAi_3ic/JythonPodcast-Episode%2316.mp3">jython podcast's latest episode</a>, of a replacement for jythonc. After the flip, I've edited <a href="http://www.dancheah.com">Dan Cheah</a>s <a href="http://www.dancheah.com/2010/02/compiling-jython-scripts-in-java-class-files.html">jythonc</a> replacement, compile.java, to add per file output and use the system-wide, platform-independant temporary directory, as denoted by the java.io.tmpdir property.</p><div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/1976d5f0-6df9-44f6-aa27-7a4c92a4d96d/" title="Reblog this post [with Zemanta]"><img style="border: medium none; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=1976d5f0-6df9-44f6-aa27-7a4c92a4d96d" alt="Reblog this post [with Zemanta]"></a><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>]]>
        <![CDATA[<pre><code>import java.io.File;
import java.util.Properties;
import java.util.Set;
import java.util.HashSet;

import org.python.core.PyException;
import org.python.core.PySystemState;
import org.python.core.imp;
import org.python.modules._py_compile;

/**
 * Compiles all python files in a directory to bytecode, and writes them to another directory,
 * possibly the same one.
 */
public class compile {

    class BuildException extends RuntimeException {
        public BuildException(String message) {
        }
    }
    
    public void log(String message) { // use java.util.logging?
        System.out.println(message);
    }
    
    public compile() {
    }

    public void process(Set<File> toCompile) throws BuildException {
        String destDir = System.getProperty("java.io.tmpdir");

        if (toCompile.size() == 0) {
            return;
        } else if (toCompile.size() > 1) {
            log("Compiling " + toCompile.size() + " files");
        } else if (toCompile.size() == 1) {
            log("Compiling 1 file");
        }
        Properties props = new Properties();
        props.setProperty(PySystemState.PYTHON_CACHEDIR_SKIP, "true");
        PySystemState.initialize(System.getProperties(), props);
        for (File src : toCompile) {
            String name = _py_compile.getModuleName(src);
            String compiledFilePath = name.replace('.', File.separatorChar);
            if (src.getName().endsWith("__init__.py")) {
                compiledFilePath += File.separator+"__init__";
            }
            File compiled = new File(destDir, compiledFilePath + "$py.class");
            compile(src, compiled, name);
	    log(name+" => "+destDir+compiled.getName());
        }
    }
    
    /**
     * Compiles the python file <code>src</code> to bytecode filling in <code>moduleName</code> as
     * its name, and stores it in <code>compiled</code>. This is called by process for every file
     * that's compiled, so subclasses can override this method to affect or track the compilation.
     */
    protected void compile(File src, File compiled, String moduleName) {
        byte[] bytes;
        try {
            bytes = imp.compileSource(moduleName, src);
        } catch (PyException pye) {
            pye.printStackTrace();
            throw new BuildException("Compile failed; see the compiler error output for details.");
        }
        File dir = compiled.getParentFile();
        if (!dir.exists() && !compiled.getParentFile().mkdirs()) {
            throw new BuildException("Unable to make directory for compiled file: " + compiled);
        }
        imp.cacheCompiledSource(src.getAbsolutePath(), compiled.getAbsolutePath(), bytes);
    }
    
    protected String getFrom() {
        return "*.py";
    }
    
    protected String getTo() {
        return "*$py.class";
    }
    
    public static void main(String[] args) {
        String filename = args[0];
	
        Set<File> fileSet = new HashSet<File>();
        
        File file = new File(filename);
        fileSet.add(file);
        
        compile c = new compile();
        c.process(fileSet);
    }

}
</code></pre>]]>
<br/>Kindly leave a comment <a href="http://hasandiwan.info/2010/03/replacing-jythonc-in-jython-25.html">here</a>
    </content>
</entry>

<entry>
    <title>Commons-Math Team Member</title>
    <link rel="alternate" type="text/html" href="http://hasandiwan.info/2010/03/commons-math-team-member.html" />
    <id>tag:hasandiwan.info,2010://1.182</id>

    <published>2010-03-06T06:33:09Z</published>
    <updated>2010-03-06T06:49:05Z</updated>

    <summary>Kassourri alerted me, via Twitter that I&apos;m listed as a contributor to commons math. As the Glaswegians say, eat your heart out!...</summary>
    <author>
        <name>Hasan Diwan</name>
        
    </author>
    
    <category term="apache" label="apache" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="commonsmath" label="commons math" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="reward" label="reward" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="selfpromotion" label="self promotion" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://hasandiwan.info/">
        <![CDATA[<p><a href="http://twitter.com/jkassourri/">Kassourri</a> alerted me, via <a href="http://twitter.com">Twitter</a> that <a href="http://twitter.com/jkassourri/status/10063143733">I'm listed as</a> a <a href="http://commons.apache.org/math/team-list.html">contributor</a> to <a href="http://commons.apache.org/math">commons math</a>. As the Glaswegians say, <a href="http://twitter.com/hdiwan/status/10060844835">eat your heart out</a>!</p>]]>
        
<br/>Kindly leave a comment <a href="http://hasandiwan.info/2010/03/commons-math-team-member.html">here</a>
    </content>
</entry>

<entry>
    <title>... One can only do So Much...</title>
    <link rel="alternate" type="text/html" href="http://hasandiwan.info/2010/03/-one-can-only-do-so-much.html" />
    <id>tag:hasandiwan.info,2010://1.181</id>

    <published>2010-03-06T05:56:35Z</published>
    <updated>2010-03-06T06:19:04Z</updated>

    <summary>I noticed that Marissa Louie, CEO of Ad-Village, a company with which I was previously involved, but left because she had decided she wanted more from me than I was prepared to give, retweeted that she was working with ValenciaPR....</summary>
    <author>
        <name>Hasan Diwan</name>
        
    </author>
    
    <category term="advillage" label="Ad-Village" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="business" label="Business" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="investing" label="Investing" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="lefthanders" label="Lefthanders" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="marissalouie" label="Marissa Louie" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="marivicvalencia" label="Marivic Valencia" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="niche" label="Niche" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="people" label="People" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="shopping" label="Shopping" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="valenciapr" label="ValenciaPR" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://hasandiwan.info/">
        <![CDATA[<p>I noticed that <a href="http://twitter.com/malouie">Marissa Louie</a>, CEO of <a href="http://ad-village.com">Ad-Village</a>, a company with which I was previously involved, but left because she had decided she wanted more from me than I was prepared to give, retweeted that <a href="http://twitter.com/techpr/status/10057853504">she was working with ValenciaPR</a>. I caught this and decided to give <a href="http://twitter.com/techpr">Ms Valencia</a> a friendly warning that <a href="http://twitter.com/hdiwan/status/10058073038">Marissa is not what she seems</a>, to which I got a <a href="http://twitter.com/hdiwan/status/10058073038">somewhat snarky response</a> and then <a href="http://twitter.com/techpr/status/10059091736">rudeness</a>. Not being one to let bygones be bygones, I <a href="http://twitter.com/hdiwan/status/10058871410">responded in kind</a>. After an hour, I sent her an apology, and am reproducing our entire email exchange after the flip. Conclusion, anyone who asks me for a PR recommendation, I'm definitely not recommending this ingrate.</p>

<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/79e8f6d6-c75f-49fe-8654-06f51ad7fe99/" title="Reblog this post [with Zemanta]"><img style="border: medium none; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=79e8f6d6-c75f-49fe-8654-06f51ad7fe99" alt="Reblog this post [with Zemanta]"></a><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>]]>
        <![CDATA[<pre>
 Re: Go Self-Medicate
11 messages
msmarivic@gmail.com <msmarivic@gmail.com> 	5 March 2010 21:03
Reply-To: msmarivic@gmail.com
To: Hasan Diwan <hasan.diwan@gmail.com>
You are delusional. You engaged me; if anything you owe me an apology. I won't hold my breathe. Carry on.

------Original Message------
From: Hasan Diwan
To: marivic@valenciapr.net
Subject: Re: Go Self-Medicate
Sent: Mar 5, 2010 11:00 PM

Ms Valencia,
I'm sorry, but I do believe there has been a misunderstanding here. I
do not appreciate being slagged off, especially when the person who
does so is too insecure to face the response. However, your suggestion
of self-medication actually crossed the line from flame war into
lunacy. I await your apology. -- H
--
Sent from my mobile device
Envoyait de mon telephone mobil


Sent from my BlackBerry® wireless device from U.S. Cellular
Hasan Diwan <hasan.diwan@gmail.com> 	5 March 2010 21:05
To: msmarivic@gmail.com
Ms. Valencia,

On 5 March 2010 21:03,  <msmarivic@gmail.com> wrote:
> You are delusional. You engaged me; if anything you owe me an apology. I won't hold my breathe. Carry on.

Your position is listed as "owner at ValenciaPR" and "Director of
Marketing". Hence, you should know the basics of social decorum. I
have no problem typing the following:
I'm sorry for any offence. It was not meant and will not occur again.
Now, I await yours.
--
Sent from my mobile device
Envoyait de mon telephone mobil
msmarivic@gmail.com <msmarivic@gmail.com> 	5 March 2010 21:09
Reply-To: msmarivic@gmail.com
To: Hasan Diwan <hasan.diwan@gmail.com>
"Cuntiness" (your less-than-charming phrase, not mine) defies decorum. Also, it's "offense" not "offence" and if this is you apologizing I accept.

Marivic

------Original Message------
From: Hasan Diwan
To: msmarivic@gmail.com
Subject: Re: Go Self-Medicate
Sent: Mar 5, 2010 11:05 PM

Ms. Valencia,

On 5 March 2010 21:03,  <msmarivic@gmail.com> wrote:
> You are delusional. You engaged me; if anything you owe me an apology. I won't hold my breathe. Carry on.

Your position is listed as "owner at ValenciaPR" and "Director of
Marketing". Hence, you should know the basics of social decorum. I
have no problem typing the following:
I'm sorry for any offence. It was not meant and will not occur again.
Now, I await yours.
--
Sent from my mobile device
Envoyait de mon telephone mobil


Sent from my BlackBerry® wireless device from U.S. Cellular
Hasan Diwan <hasan.diwan@gmail.com> 	5 March 2010 21:13
To: msmarivic@gmail.com
On 5 March 2010 21:09,  <msmarivic@gmail.com> wrote:
> "Cuntiness" (your less-than-charming phrase, not mine) defies decorum. Also, it's "offense" not "offence" and if this is you apologizing I accept.

An apology is the word "sorry", which I don't see anywhere in your message.

FYI, both "offense" and "offence" are correct. The latter is British
English, the former is American English. As I was born, raised, and
educated in the United Kingdom, I speak British English.
--
Sent from my mobile device
Envoyait de mon telephone mobil
msmarivic@gmail.com <msmarivic@gmail.com> 	5 March 2010 21:15
Reply-To: msmarivic@gmail.com
To: Hasan Diwan <hasan.diwan@gmail.com>
I am not in no way shape or form about to apologize to you or your lackey! Now or ever. Cut your losses dude, you're out-matched, played and -witted. Good-bye.

------Original Message------
From: Hasan Diwan
To: msmarivic@gmail.com
Subject: Re: Go Self-Medicate
Sent: Mar 5, 2010 11:13 PM

On 5 March 2010 21:09,  <msmarivic@gmail.com> wrote:
> "Cuntiness" (your less-than-charming phrase, not mine) defies decorum. Also, it's "offense" not "offence" and if this is you apologizing I accept.

An apology is the word "sorry", which I don't see anywhere in your message.

FYI, both "offense" and "offence" are correct. The latter is British
English, the former is American English. As I was born, raised, and
educated in the United Kingdom, I speak British English.
--
Sent from my mobile device
Envoyait de mon telephone mobil


Sent from my BlackBerry® wireless device from U.S. Cellular
Hasan Diwan <hasan.diwan@gmail.com> 	5 March 2010 21:18
To: msmarivic@gmail.com
On 5 March 2010 21:15,  <msmarivic@gmail.com> wrote:
> I am not in no way shape or form about to apologize to you or your lackey! Now or ever. Cut your losses dude, you're out-matched, played and -witted. Good-bye.

And here's where it is patently obvious who's the bigger person here.
Have a good evening.
--
Sent from my mobile device
Envoyait de mon telephone mobil
msmarivic@gmail.com <msmarivic@gmail.com> 	5 March 2010 21:24
Reply-To: msmarivic@gmail.com
To: Hasan Diwan <hasan.diwan@gmail.com>
I was perfectly pleasant and gave you the benefit of the doubt until you started with the C-word. Fine to bow out now but keep in mind Twitter and email live forever. I'm done here but seriously, remember that the next time you wade in.

Marivic
Owner, ValenciaPR

------Original Message------
From: Hasan Diwan
To: msmarivic@gmail.com
Subject: Re: Go Self-Medicate
Sent: Mar 5, 2010 11:18 PM

On 5 March 2010 21:15,  <msmarivic@gmail.com> wrote:
> I am not in no way shape or form about to apologize to you or your lackey! Now or ever. Cut your losses dude, you're out-matched, played and -witted. Good-bye.

And here's where it is patently obvious who's the bigger person here.
Have a good evening.
--
Sent from my mobile device
Envoyait de mon telephone mobil


Sent from my BlackBerry® wireless device from U.S. Cellular
Hasan Diwan <hasan.diwan@gmail.com> 	5 March 2010 21:34
To: msmarivic@gmail.com
On 5 March 2010 21:24,  <msmarivic@gmail.com> wrote:
> I was perfectly pleasant and gave you the benefit of the doubt until you started with the C-word. Fine to bow out now but keep in mind Twitter and email live forever. I'm done here but seriously, remember that the next time you wade in.

Perfectly pleasant? Your definition of pleasant needs some tweaking,
but I have neither the patience, nor the wherewithal, nor, quite
honestly, the will, to drill how you were unpleasant into your head.

Your from a country that exports McDonalds and Burger King and calls
it culture. Can't say I'm shocked that you have no more politeness
than that.
--
Sent from my mobile device
Envoyait de mon telephone mobil
msmarivic@gmail.com <msmarivic@gmail.com> 	5 March 2010 21:37
Reply-To: msmarivic@gmail.com
To: Hasan Diwan <hasan.diwan@gmail.com>
I was born in the Philippines. Nice try.

Now, kindly, stop. I've had more than enough.

------Original Message------
From: Hasan Diwan
To: msmarivic@gmail.com
Subject: Re: Go Self-Medicate
Sent: Mar 5, 2010 11:34 PM

On 5 March 2010 21:24,  <msmarivic@gmail.com> wrote:
> I was perfectly pleasant and gave you the benefit of the doubt until you started with the C-word. Fine to bow out now but keep in mind Twitter and email live forever. I'm done here but seriously, remember that the next time you wade in.

Perfectly pleasant? Your definition of pleasant needs some tweaking,
but I have neither the patience, nor the wherewithal, nor, quite
honestly, the will, to drill how you were unpleasant into your head.

Your from a country that exports McDonalds and Burger King and calls
it culture. Can't say I'm shocked that you have no more politeness
than that.
--
Sent from my mobile device
Envoyait de mon telephone mobil


Sent from my BlackBerry® wireless device from U.S. Cellular
Hasan Diwan <hasan.diwan@gmail.com> 	5 March 2010 21:42
To: msmarivic@gmail.com
On 5 March 2010 21:37,  <msmarivic@gmail.com> wrote:
> I was born in the Philippines. Nice try.

Which, if my reading of history is correct, was a US colony for a half
century or so. Now, get off your high horse and apologise for calling
me a dick. I'm pretty sure you don't want your reluctance persisted at
Google forever.
--
Sent from my mobile device
Envoyait de mon telephone mobil
msmarivic@gmail.com <msmarivic@gmail.com> 	5 March 2010 21:49
Reply-To: msmarivic@gmail.com
To: Hasan Diwan <hasan.diwan@gmail.com>
It would be "persisted on" (not "at") and actually "persisted" is wrong BUT here's the thing: US idioms are important so a friendly word of advice: master them.

Also, Google this: You were a dick tonight. Really. Move on. Apologise? Not. On. Your. Life.

------Original Message------
From: Hasan Diwan
To: msmarivic@gmail.com
Subject: Re: Go Self-Medicate
Sent: Mar 5, 2010 11:42 PM

On 5 March 2010 21:37,  <msmarivic@gmail.com> wrote:
> I was born in the Philippines. Nice try.

Which, if my reading of history is correct, was a US colony for a half
century or so. Now, get off your high horse and apologise for calling
me a dick. I'm pretty sure you don't want your reluctance persisted at
Google forever.
--
Sent from my mobile device
Envoyait de mon telephone mobil


Sent from my BlackBerry® wireless device from U.S. Cellular
</pre>
<p>Oh, <a href="http://www.valenciapr.net/">Marivic</a>]]>
<br/>Kindly leave a comment <a href="http://hasandiwan.info/2010/03/-one-can-only-do-so-much.html">here</a>
    </content>
</entry>

<entry>
    <title>TSA Not Fit For Purpose</title>
    <link rel="alternate" type="text/html" href="http://hasandiwan.info/2010/03/tsa-not-fit-for-purpose.html" />
    <id>tag:hasandiwan.info,2010://1.180</id>

    <published>2010-03-06T00:14:29Z</published>
    <updated>2010-03-06T00:44:40Z</updated>

    <summary>TSAs blog proved today that they are wholly and unequivocably unfit for purpose by mispelling the IATA airport code for Ft. Lauderdale (it is FLL, not FFL). Of course, this isn&apos;t the agency charged with making up the airport abbreviations,...</summary>
    <author>
        <name>Hasan Diwan</name>
        
    </author>
    
    <category term="airline" label="Airline" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="airports" label="Airports" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="aviation" label="Aviation" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="business" label="Business" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="internationalairtransportassociation" label="International Air Transport Association" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="rants" label="rants" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="transportationandlogistics" label="Transportation and Logistics" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tsa" label="TSA" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="unitedstates" label="United States" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://hasandiwan.info/">
        <![CDATA[<p><a href="http://www.tsa.gov/blog/">TSAs blog</a> proved today that they are wholly and unequivocably unfit for purpose by <a href="http://www.tsa.gov/blog/2010/03/backscatter-advanced-imaging-technology.html">mispelling the IATA airport code</a> for <a href="http://www.fortlauderdaleinternationalairport.com/">Ft. Lauderdale</a> (it is F<strong>L</strong>L, not FFL). Of course, this isn't the agency charged with making up the airport abbreviations, just the one in charge of ensuring we remove our shoes on the ground, take off our jackets, and perform other hystrionics to ensure we won't be blown up.</p>

<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/3257b27b-6b98-498c-bad6-cbd053203705/" title="Reblog this post [with Zemanta]"><img style="border: medium none; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=3257b27b-6b98-498c-bad6-cbd053203705" alt="Reblog this post [with Zemanta]"></a><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>]]>
        
<br/>Kindly leave a comment <a href="http://hasandiwan.info/2010/03/tsa-not-fit-for-purpose.html">here</a>
    </content>
</entry>

<entry>
    <title>TfL Goes Web 2.0</title>
    <link rel="alternate" type="text/html" href="http://hasandiwan.info/2010/03/tfl-goes-web-20.html" />
    <id>tag:hasandiwan.info,2010://1.179</id>

    <published>2010-03-05T23:51:57Z</published>
    <updated>2010-03-06T00:02:45Z</updated>

    <summary>From Programmable Web comes the news that Transport for London has gone Web 2.0 and done a Google Maps mashup. It is indeed an oversight that Google does not give the world&apos;s greatest city fair treatment with transit directions and...</summary>
    <author>
        <name>Hasan Diwan</name>
        
    </author>
    
    <category term="companies" label="Companies" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="google" label="Google" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="googlemap" label="Google Map" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="london" label="London" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="searchengines" label="Search Engines" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="searching" label="Searching" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tools" label="Tools" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="transportforlondon" label="Transport for London" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="web20" label="Web 2.0" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://hasandiwan.info/">
        <![CDATA[<p>From <a href="http://blog.programmableweb.com/">Programmable Web</a> comes the <a href="http://blog.programmableweb.com/2010/03/04/see-where-the-queen-catches-the-bus">news</a> that <a href="http://tfl.gov.uk">Transport for London</a> has gone <a class="zem_slink" href="http://en.wikipedia.org/wiki/Web_2.0" title="Web 2.0" rel="wikipedia">Web 2.0</a> and done a <a href="http://maps.google.co.uk">Google Maps</a> mashup. It is indeed an oversight that <a href="http://google.com">Google</a> does not give <a href="http://www.thisislondon.co.uk">the world's greatest city</a> fair treatment with transit directions and timings. One could excuse the lack of timings as <a href="http://www.boris-johnson.com">To rely on a train in Blair's Britain is to engage in a crapshoot with the devil</a>, to quote that most quotable of British politicians, <a href="http://boris-johnson.com">Boris Johnson</a>.</p>

<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/47ccbf11-c350-4baf-956d-656437b7d937/" title="Reblog this post [with Zemanta]"><img style="border: medium none; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=47ccbf11-c350-4baf-956d-656437b7d937" alt="Reblog this post [with Zemanta]"></a><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>]]>
        
<br/>Kindly leave a comment <a href="http://hasandiwan.info/2010/03/tfl-goes-web-20.html">here</a>
    </content>
</entry>

<entry>
    <title>How your Religion Predicts Income</title>
    <link rel="alternate" type="text/html" href="http://hasandiwan.info/2010/03/how-your-religion-predicts-income.html" />
    <id>tag:hasandiwan.info,2010://1.178</id>

    <published>2010-03-05T23:31:22Z</published>
    <updated>2010-03-05T23:49:24Z</updated>

    <summary> GOOD has an analysis of religion and income in the United States. If we combine all the branches of Christianity, save for the black churches, you get a pretty good picture of discrimination in the US. And I&apos;ll go...</summary>
    <author>
        <name>Hasan Diwan</name>
        
    </author>
    
    <category term="christianity" label="Christianity" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="discrimination" label="discrimination" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="government" label="Government" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="hinduism" label="hinduism" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="history" label="History" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="islam" label="islam" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="judaism" label="judaism" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="recreation" label="Recreation" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="statistics" label="statistics" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="unitedstates" label="United States" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://hasandiwan.info/">
        <![CDATA[<center><img src="http://awesome.good.is/transparency/web/1002/almighty-dollar/transparency.jpg" height="200" width="400"></center> <a href="http://www.good.is/">GOOD</a> has an <a href="http://www.good.is/post/transparency-america-s-wealthiest-religions">analysis of religion and income</a> in the <a class="zem_slink" href="http://maps.google.com/maps?ll=38.8833333333,-77.0166666667&amp;spn=10.0,10.0&amp;q=38.8833333333,-77.0166666667%20%28United%20States%29&amp;t=h" title="United States" rel="geolocation">United States</a>. If we combine all the branches of <a class="zem_slink" href="http://en.wikipedia.org/wiki/Christianity" title="Christianity" rel="wikipedia">Christianity</a>, save for the <a class="zem_slink" href="http://en.wikipedia.org/wiki/Black_church" title="Black church" rel="wikipedia">black churches</a>, you get a pretty good picture of <a class="zem_slink" href="http://en.wikipedia.org/wiki/Discrimination" title="Discrimination" rel="wikipedia">discrimination</a> in the US. And I'll go out on a limb to say that the next group to be discriminated against will be the <a class="zem_slink" href="http://en.wikipedia.org/wiki/Evangelicalism" title="Evangelicalism" rel="wikipedia">evangelical</a> Christians, who, regardless of how <b>they</b> may feel, are not discriminated against in the same way that blacks and Muslims are.

<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/7cfe7b8f-0d69-426f-9fd2-d704ec245e27/" title="Reblog this post [with Zemanta]"><img style="border: medium none; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=7cfe7b8f-0d69-426f-9fd2-d704ec245e27" alt="Reblog this post [with Zemanta]"></a><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>]]>
        
<br/>Kindly leave a comment <a href="http://hasandiwan.info/2010/03/how-your-religion-predicts-income.html">here</a>
    </content>
</entry>

<entry>
    <title>How to Generate XML from RDBMS</title>
    <link rel="alternate" type="text/html" href="http://hasandiwan.info/2010/03/how-to-generate-xml-from-rdbms.html" />
    <id>tag:hasandiwan.info,2010://1.177</id>

    <published>2010-03-05T21:35:29Z</published>
    <updated>2010-03-05T21:42:04Z</updated>

    <summary>After the flip, I list code, that will soon be incorporated into Commons-dbutils, to generate XML from an RDBMS table....</summary>
    <author>
        <name>Hasan Diwan</name>
        
    </author>
    
    <category term="articles" label="Articles" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="code" label="code" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="dataformats" label="Data Formats" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="database" label="Database" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="database" label="database" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="java" label="java" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="jdbc" label="jdbc" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="markuplanguages" label="Markup Languages" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mysql" label="MySQL" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="relationaldatabasemanagementsystem" label="Relational database management system" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tools" label="Tools" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="xml" label="XML" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://hasandiwan.info/">
        <![CDATA[<p>After the flip, I list code, that will soon be incorporated into <a href="http://commons.apache.org/dbutils">Commons-dbutils</a>, to generate <a class="zem_slink" href="http://en.wikipedia.org/wiki/XML" title="XML" rel="wikipedia">XML</a> from an <a class="zem_slink" href="http://en.wikipedia.org/wiki/Relational_database_management_system" title="Relational database management system" rel="wikipedia">RDBMS</a> table.</p>

<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/caba3826-52f9-448a-ab35-482ce8c380d9/" title="Reblog this post [with Zemanta]"><img style="border: medium none; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=caba3826-52f9-448a-ab35-482ce8c380d9" alt="Reblog this post [with Zemanta]"></a><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>]]>
        <![CDATA[<pre><code>

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.math.BigDecimal;
import java.net.URL;
import java.sql.Array;
import java.sql.Blob;
import java.sql.Clob;
import java.sql.Date;
import java.sql.NClob;
import java.sql.Ref;
import java.sql.SQLXML;
import java.sql.Time;
import java.sql.Timestamp;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.sax.SAXTransformerFactory;
import javax.xml.transform.sax.TransformerHandler;
import javax.xml.transform.stream.StreamResult;
import org.apache.commons.dbutils.ResultSetHandler;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.AttributesImpl;
public class XmlHandler<T> implements ResultSetHandler<T> {
    TransformerHandler th = null;
    ByteArrayOutputStream xmlStream;
    ResultSet resultSet = null;
    public XmlHandler() throws TransformerConfigurationException, SAXException {
	SAXTransformerFactory factory = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
	th = factory.newTransformerHandler();
	xmlStream = new ByteArrayOutputStream();
	th.setResult(new StreamResult(xmlStream));
	th.startDocument();
    }

    public XmlHandler(ResultSet rs) throws TransformerConfigurationException, SAXException {
	this();
	setResultSet(rs);
    }
    
    public T handle (ResultSet rs) throws SQLException {
	try {
	    th.endDocument();
	} catch (SAXException e) {
	    throw new SQLException(e.getMessage());
	}
	return (T)xmlStream;
    }

    public void setResultSet(ResultSet res) {
	this.resultSet = res;
    }

    private void handleArray(String name, Array obj) throws SAXException,IOException {
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	ObjectOutputStream oos = new ObjectOutputStream(baos);
	AttributesImpl attrs = new AttributesImpl();
	attrs.addAttribute(null, null, null, "name", name);
	attrs.addAttribute(null, null, null, "type", "array");
	oos.writeObject(obj);
	th.startElement(null, null, "field",attrs);
	th.characters(new String(baos.toByteArray()).toCharArray(), 0, baos.toByteArray().length);
	th.endElement(null, null, "field");
    }

    private void handleBigDecimal(String name, BigDecimal obj)  throws SAXException,IOException {
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	ObjectOutputStream oos = new ObjectOutputStream(baos);
	AttributesImpl attrs = new AttributesImpl();
	attrs.addAttribute(null, null, null, "name", name);
	attrs.addAttribute(null, null, null, "type", "Big Decimal");
	oos.writeObject(obj);
	th.startElement(null, null, "field", attrs);
	th.characters(new String(baos.toByteArray()).toCharArray(), 0, baos.toByteArray()
		      .length);
	th.endElement(null, null, "field");
    }

    private void handleBlob(String name, Blob obj)  throws SAXException, IOException {
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	ObjectOutputStream oos = new ObjectOutputStream(baos);
	AttributesImpl attrs = new AttributesImpl();
	attrs.addAttribute(null, null, null, "name", name);
	attrs.addAttribute(null, null, null, "type", "Blob");
	oos.writeObject(obj);
	th.startElement(null, null, "field", attrs);
	th.characters(new String(baos.toByteArray()).toCharArray(), 0, baos.toByteArray()
		      .length);
	th.endElement(null, null, "field");
    }

    private void handleBoolean(String name, boolean obj)  throws SAXException, IOException {
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	ObjectOutputStream oos = new ObjectOutputStream(baos);
	AttributesImpl attrs = new AttributesImpl();
	attrs.addAttribute(null, null, null, "name", name);
	attrs.addAttribute(null, null, null, "type", "Big Decimal");
	oos.writeObject(new Boolean(obj));
	th.startElement(null, null, "field", attrs);
	th.characters(new String(baos.toByteArray()).toCharArray(), 0, baos.toByteArray()
		      .length);
	th.endElement(null, null, "field");
    }

    private void handleByte(String name, byte obj)  throws SAXException,IOException {
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	ObjectOutputStream oos = new ObjectOutputStream(baos);
	AttributesImpl attrs = new AttributesImpl();
	attrs.addAttribute(null, null, null, "name", name);
	attrs.addAttribute(null, null, null, "type", "Byte");
	oos.writeObject(new Byte(obj));
	th.startElement(null, null, "field", attrs);
	th.characters(new String(baos.toByteArray()).toCharArray(), 0, baos.toByteArray()
		      .length);
	th.endElement(null, null, "field");
    }

    private void handleClob(String name, Clob obj)  throws SAXException, IOException {
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	ObjectOutputStream oos = new ObjectOutputStream(baos);
	AttributesImpl attrs = new AttributesImpl();
	attrs.addAttribute(null, null, null, "name", name);
	attrs.addAttribute(null, null, null, "type", "Clob");
	oos.writeObject(obj);
	th.startElement(null, null, "field", attrs);
	th.characters(new String(baos.toByteArray()).toCharArray(), 0, baos.toByteArray()
		      .length);
	th.endElement(null, null, "field");
    }

    private void handleDate(String name, Date obj)  throws SAXException,IOException {
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	ObjectOutputStream oos = new ObjectOutputStream(baos);
	AttributesImpl attrs = new AttributesImpl();
	attrs.addAttribute(null, null, null, "name", name);
	attrs.addAttribute(null, null, null, "type", "Date");
	oos.writeObject(obj);
	th.startElement(null, null, "field", attrs);
	th.characters(new String(baos.toByteArray()).toCharArray(), 0, baos.toByteArray()
		      .length);
	th.endElement(null, null, "field");
    }

    private void handleDouble(String name, double obj)  throws SAXException, IOException {
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	ObjectOutputStream oos = new ObjectOutputStream(baos);
	AttributesImpl attrs = new AttributesImpl();
	attrs.addAttribute(null, null, null, "name", name);
	attrs.addAttribute(null, null, null, "type", "Double");
	oos.writeObject(new Double(obj));
	th.startElement(null, null, "field", attrs);
	th.characters(new String(baos.toByteArray()).toCharArray(), 0, baos.toByteArray()
		      .length);
	th.endElement(null, null, "field");
    }

    private void handleFloat(String name, float obj)  throws SAXException, IOException {
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	ObjectOutputStream oos = new ObjectOutputStream(baos);
	AttributesImpl attrs = new AttributesImpl();
	attrs.addAttribute(null, null, null, "name", name);
	attrs.addAttribute(null, null, null, "type", "Float");
	oos.writeObject(new Float(obj));
	th.startElement(null, null, "field", attrs);
	th.characters(new String(baos.toByteArray()).toCharArray(), 0, baos.toByteArray()
		      .length);
	th.endElement(null, null, "field");
    }

    private void handleInt(String name, int obj)  throws SAXException, IOException {
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	ObjectOutputStream oos = new ObjectOutputStream(baos);
	AttributesImpl attrs = new AttributesImpl();
	attrs.addAttribute(null, null, null, "name", name);
	attrs.addAttribute(null, null, null, "type", "Integer");
	oos.writeObject(new Integer(obj));
	th.startElement(null, null, "field", attrs);
	th.characters(new String(baos.toByteArray()).toCharArray(), 0, baos.toByteArray()
		      .length);
	th.endElement(null, null, "field");
    }

    private void handleLong(String name, long obj)  throws SAXException, IOException {
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	ObjectOutputStream oos = new ObjectOutputStream(baos);
	AttributesImpl attrs = new AttributesImpl();
	attrs.addAttribute(null, null, null, "name", name);
	attrs.addAttribute(null, null, null, "type", "Long");
	oos.writeObject(new Long(obj));
	th.startElement(null, null, "field", attrs);
	th.characters(new String(baos.toByteArray()).toCharArray(), 0, baos.toByteArray()
		      .length);
	th.endElement(null, null, "field");
    }

    private void handleNClob(String name, NClob obj)  throws SAXException, IOException {
	this.handleClob(name, obj);
    }

    private void handleNString(String name, String obj)  throws SAXException, IOException {
	this.handleString(name, obj);
    }

    private void handleObject(String name, Object obj)  throws SAXException, SQLException, IOException {
	if (!(obj instanceof Serializable)) {
	    throw new IOException("Only serializable objects supported!");
	} else {
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	ObjectOutputStream oos = new ObjectOutputStream(baos);
	AttributesImpl attrs = new AttributesImpl();
	attrs.addAttribute(null, null, null, "name", name);
	attrs.addAttribute(null, null, null, "type", "Object");
	oos.writeObject(obj);
	th.startElement(null, null, "field", attrs);
	th.characters(new String(baos.toByteArray()).toCharArray(), 0, baos.toByteArray()
		      .length);
	th.endElement(null, null, "field");
	}
    }

    private void handleRef(String name, Ref obj)  throws SAXException, IOException {
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	ObjectOutputStream oos = new ObjectOutputStream(baos);
	AttributesImpl attrs = new AttributesImpl();
	attrs.addAttribute(null, null, null, "name", name);
	attrs.addAttribute(null, null, null, "type", "Ref");
	oos.writeObject(obj);
	th.startElement(null, null, "field", attrs);
	th.characters(new String(baos.toByteArray()).toCharArray(), 0, baos.toByteArray()
		      .length);
	th.endElement(null, null, "field");
    }

    private void handleSQLXML(String name, SQLXML obj)  throws SAXException, IOException {
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	ObjectOutputStream oos = new ObjectOutputStream(baos);
	AttributesImpl attrs = new AttributesImpl();
	attrs.addAttribute(null, null, null, "name", name);
	attrs.addAttribute(null, null, null, "type", "SQL XML");
	oos.writeObject(obj);
	th.startElement(null, null, "field", attrs);
	th.characters(new String(baos.toByteArray()).toCharArray(), 0, baos.toByteArray()
		      .length);
	th.endElement(null, null, "field");
    }

    private void handleString(String name, String obj)  throws SAXException, IOException {
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	ObjectOutputStream oos = new ObjectOutputStream(baos);
	AttributesImpl attrs = new AttributesImpl();
	attrs.addAttribute(null, null, null, "name", name);
	attrs.addAttribute(null, null, null, "type", "String");
	oos.writeObject(obj);
	th.startElement(null, null, "field", attrs);
	th.characters(new String(baos.toByteArray()).toCharArray(), 0, baos.toByteArray()
		      .length);
	th.endElement(null, null, "field");
    }
    
    private void handleTime(String name, Time obj)  throws SAXException, IOException {
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	ObjectOutputStream oos = new ObjectOutputStream(baos);
	AttributesImpl attrs = new AttributesImpl();
	attrs.addAttribute(null, null, null, "name", name);
	attrs.addAttribute(null, null, null, "type", "Time");
	oos.writeObject(obj);
	th.startElement(null, null, "field", attrs);
	th.characters(new String(baos.toByteArray()).toCharArray(), 0, baos.toByteArray()
		      .length);
	th.endElement(null, null, "field");
    }
    
    private void handleTimestamp(String name, Timestamp obj)  throws SAXException, IOException {
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	ObjectOutputStream oos = new ObjectOutputStream(baos);
	AttributesImpl attrs = new AttributesImpl();
	attrs.addAttribute(null, null, null, "name", name);
	attrs.addAttribute(null, null, null, "type", "Timestamp");
	oos.writeObject(obj);
	th.startElement(null, null, "field", attrs);
	th.characters(new String(baos.toByteArray()).toCharArray(), 0, baos.toByteArray()
		      .length);
	th.endElement(null, null, "field");
    }

    private void handleURL(String name, URL obj)  throws SAXException, IOException {
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	ObjectOutputStream oos = new ObjectOutputStream(baos);
	AttributesImpl attrs = new AttributesImpl();
	attrs.addAttribute(null, null, null, "name", name);
	attrs.addAttribute(null, null, null, "type", "Big Decimal");
	oos.writeObject(obj);
	th.startElement(null, null, "field", attrs);
	th.characters(new String(baos.toByteArray()).toCharArray(), 0, baos.toByteArray()
		      .length);
	th.endElement(null, null, "field");
    }
}
</code></pre>]]>
<br/>Kindly leave a comment <a href="http://hasandiwan.info/2010/03/how-to-generate-xml-from-rdbms.html">here</a>
    </content>
</entry>

<entry>
    <title>How to Understand the Numbers</title>
    <link rel="alternate" type="text/html" href="http://hasandiwan.info/2010/03/how-to-understand-the-numbers.html" />
    <id>tag:hasandiwan.info,2010://1.176</id>

    <published>2010-03-05T00:50:12Z</published>
    <updated>2010-03-05T00:59:52Z</updated>

    <summary>According to that sage of all and sundry, Beavis, there are too many numbers, our mates, at Lifehacker, link to a piece by Nathan Yau, a doctoral candidate in statistics, on how to interpret numbers. I hope this helps people...</summary>
    <author>
        <name>Hasan Diwan</name>
        
    </author>
    
    <category term="beavisandbutthead" label="beavis and butthead" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="lifehacker" label="lifehacker" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mathematics" label="mathematics" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="nathanyau" label="nathan yau" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="numbers" label="numbers" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="statistics" label="statistics" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://hasandiwan.info/">
        <![CDATA[<p>According to that sage of all and sundry, <a href="http://www.tv.com/beavis-and-butt-head/">Beavis</a>, <a href="http://www.tv.com/beavis-and-butt-head/held-back/episode/58243/trivia.html">there are too many numbers</a>, our mates, at <a href="http://lifehacker.com/">Lifehacker</a>, link to a <a href="http://flowingdata.com/2010/03/04/think-like-a-statistician-without-the-math">piece</a> by <a href="http://flowingdata.com/about-nathan">Nathan Yau</a>, a doctoral candidate in statistics, on <a href="http://flowingdata.com/2010/03/04/think-like-a-statistician-without-the-math">how to interpret numbers</a>. I hope this helps people understand the numbers that permeate our world.</p>]]>
        
<br/>Kindly leave a comment <a href="http://hasandiwan.info/2010/03/how-to-understand-the-numbers.html">here</a>
    </content>
</entry>

<entry>
    <title>Top 7 Credit Card Myths</title>
    <link rel="alternate" type="text/html" href="http://hasandiwan.info/2010/03/top-7-credit-card-myths.html" />
    <id>tag:hasandiwan.info,2010://1.175</id>

    <published>2010-03-05T00:27:21Z</published>
    <updated>2010-03-05T00:36:41Z</updated>

    <summary>From Mint:These days, many of us are doing some serious head scratching when it comes to credit scores, partly because there is a lot of false information swirling around. How can you move forward with your financial life if you&apos;re...</summary>
    <author>
        <name>Hasan Diwan</name>
        
    </author>
    
    <category term="business" label="Business" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="creditcard" label="Credit card" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="financialservices" label="Financial services" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="home" label="Home" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="loan" label="Loan" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="moneymanagement" label="Money Management" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="personalfinance" label="Personal Finance" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="wellsfargo" label="Wells Fargo" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://hasandiwan.info/">
        <![CDATA[<p>From <a href="http://mint.com">Mint</a>:<a href="http://www.mint.com/blog/goals/credit-score-urban-legends/">These days, many of us are doing some serious head scratching when it comes to credit scores, partly because there is a lot of false information swirling around. How can you move forward with your financial life if you're muddled with misconceptions? Read on as seven more myths are debunked, leaving you with the "real deal" credit information you need when purchasing a home or taking out an auto loan.</a></p><ol type="1"><li>Checking your credit will lower your score</li><li>Shopping around for a loan willl lower your score</li><li>If you don't use your <a class="zem_slink" href="http://en.wikipedia.org/wiki/Credit_card" title="Credit card" rel="wikipedia">credit card</a>, you'll lose it. I do disagree with this, because my <a href="http://wellsfargo.com">Wells Fargo</a> credit card was closed due to lack of use. It was only reopened when I rang them and threatened to file a report with the <a href="http://www.bbb.org/">better business bureau</a>.</li><li>Cosigning a loan does not affect your score</li><li>It's impossible to dispute an entry on your credit report</li><li>After marriage, your credit scores are merged.</li><li>Credit counselling services hurt your score. Turning to for-profit debt settlement agencies <b>does</b>, however.</li></ol>

<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/703a506b-49b1-474c-8a6f-cd70d14bce45/" title="Reblog this post [with Zemanta]"><img style="border: medium none; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=703a506b-49b1-474c-8a6f-cd70d14bce45" alt="Reblog this post [with Zemanta]"></a><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>]]>
        
<br/>Kindly leave a comment <a href="http://hasandiwan.info/2010/03/top-7-credit-card-myths.html">here</a>
    </content>
</entry>

<entry>
    <title>Fort Europa</title>
    <link rel="alternate" type="text/html" href="http://hasandiwan.info/2010/03/fort-europa.html" />
    <id>tag:hasandiwan.info,2010://1.174</id>

    <published>2010-03-04T08:15:08Z</published>
    <updated>2010-03-04T08:16:18Z</updated>

    <summary></summary>
    <author>
        <name>Hasan Diwan</name>
        
    </author>
    
    <category term="europe" label="europe" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="hiphop" label="hiphop" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="immigration" label="immigration" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="looptroop" label="looptroop" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="rap" label="rap" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="video" label="video" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="youtube" label="youtube" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://hasandiwan.info/">
        <![CDATA[<center><object width="340" height="285"><param name="movie" value="http://www.youtube-nocookie.com/v/vvCOVDdzrCU&hl=en_GB&fs=1&rel=0&border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube-nocookie.com/v/vvCOVDdzrCU&hl=en_GB&fs=1&rel=0&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="340" height="285"></embed></object></center>]]>
        
<br/>Kindly leave a comment <a href="http://hasandiwan.info/2010/03/fort-europa.html">here</a>
    </content>
</entry>

<entry>
    <title>Amazon Needs the OED</title>
    <link rel="alternate" type="text/html" href="http://hasandiwan.info/2010/03/amazon-needs-the-oed.html" />
    <id>tag:hasandiwan.info,2010://1.173</id>

    <published>2010-03-03T23:24:53Z</published>
    <updated>2010-03-03T23:39:47Z</updated>

    <summary>I was reading a piece regarding the Substance of Style: How the Rise of Asthetic Value is Remaking Commerce, Culture, and Consciousness and decided to check the price on Amazon for fits and giggles and, &apos;lo and behold, the price...</summary>
    <author>
        <name>Hasan Diwan</name>
        
    </author>
    
    <category term="amazon" label="Amazon" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="amazoncom" label="Amazon.com" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="departments" label="Departments" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ethnicity" label="Ethnicity" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="indigenous" label="Indigenous" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="loreto" label="Loreto" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="peru" label="Peru" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="rants" label="rants" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="southamerica" label="South America" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://hasandiwan.info/">
        <![CDATA[<p>I was reading a piece regarding <a href="http://www.amazon.com/o/ASIN/0060186321?tag=betteraddons-20">the Substance of Style: How the Rise of Asthetic Value is Remaking Commerce, Culture, and Consciousness</a> and decided to check the price on <a href="http://amazon.com">Amazon</a> for fits and giggles and, 'lo and behold, the price for the <a href="http://en.wiktionary.org/wiki/bargain">bargain</a> paperback is the highest of all editions offered, for both the new and the used versions of the book. ¿wtf? indeed.</p>

<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/ff7f4bdf-9cd0-4252-9748-7d54b09013f7/" title="Reblog this post [with Zemanta]"><img style="border: medium none; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=ff7f4bdf-9cd0-4252-9748-7d54b09013f7" alt="Reblog this post [with Zemanta]"></a><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>]]>
        
<br/>Kindly leave a comment <a href="http://hasandiwan.info/2010/03/amazon-needs-the-oed.html">here</a>
    </content>
</entry>

</feed>
