<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Rough Book &#187; Software</title>
	<atom:link href="http://vivin.net/category/nerdy-stuff/computers-nerdy-stuff/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://vivin.net</link>
	<description>random musings of just another computer nerd</description>
	<lastBuildDate>Wed, 02 May 2012 18:20:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Implementing pinch-zoom and pan/drag in an Android view on the canvas</title>
		<link>http://vivin.net/2011/12/04/implementing-pinch-zoom-and-pandrag-in-an-android-view-on-the-canvas/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://vivin.net/2011/12/04/implementing-pinch-zoom-and-pandrag-in-an-android-view-on-the-canvas/#comments</comments>
		<pubDate>Sun, 04 Dec 2011 23:21:49 +0000</pubDate>
		<dc:creator>vivin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Programming and Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[drag]]></category>
		<category><![CDATA[dragging]]></category>
		<category><![CDATA[gestures]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[pan]]></category>
		<category><![CDATA[panning]]></category>
		<category><![CDATA[pinch-zoom]]></category>
		<category><![CDATA[view]]></category>
		<category><![CDATA[zoom]]></category>
		<category><![CDATA[zooming]]></category>

		<guid isPermaLink="false">http://vivin.net/?p=1806</guid>
		<description><![CDATA[I was trying to get pinch-zoom and panning working on an Android view today. Basically I was trying to implement the same behavior you see when you use Google Maps (for example). You can zoom in and pan around until the edge of the image, but no further. Also, if the image is fully zoomed [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to get pinch-zoom and panning working on an Android view today. Basically I was trying to implement the same behavior you see when you use Google Maps (for example). You can zoom in and pan around until the edge of the image, but no further. Also, if the image is fully zoomed out, you can&#8217;t pan the image. Implementing the pinch-zoom functionality was pretty easy. I found <a href="http://stackoverflow.com/questions/5216658/pinch-zoom-for-custom-view" title="Pinch Zoom on Android">an example on StackOverflow</a>. I then wanted to implement panning (or dragging) as well. However, I wasn&#8217;t able to easily find examples and tutorials for this functionality. I started with <a href="http://www.zdnet.com/blog/burnette/how-to-use-multi-touch-in-android-2-part-5-implementing-the-drag-gesture/1789?tag=content;siu-container" title="Drag">this example</a> that comes from the third edition of the <a href="http://pragprog.com/book/eband3/hello-android" title="Hello, Android!">Hello, Android!</a> book but I didn&#8217;t get too far. So I started playing around a little bit with the events and started writing some code from scratch (using the example from <i>Hello, Android!</i>) so that I could have a better idea of what was happening.</p>
<p>As I mentioned before, getting zoom to work was pretty easy. Implementing panning/dragging was the hard part. The major issues I encountered and subsequently fixed were the following:</p>
<ol>
<li>Panning continues indefinitely in all directions.</li>
<li>When you zoom and then pan, stop, and then start again, the view jerks to a new position instead of panning from the existing position.</li>
<li>Excessive panning towards the left and top can be constrained, but panning towards the right and bottom is not so easily constrained.</li>
</ol>
<p>Once I fixed all the problems, I figured that it would be nice to document it for future reference, and I also think it would be a useful resource for others who have the same problem. Now a little disclaimer before I go any further: I&#8217;m not an Android expert and I&#8217;m really not that great with graphics; I just started it learning to program for Android this semester for one of my Masters electives. So there might be a better way of doing all this, and if there is, please let me know! Also, if you want to skip all the explanations and just see the code, you can <a href = "http://vivin.net/2011/12/04/implementing-pinch-zoom-and-pandrag-in-an-android-view-on-the-canvas/8/">skip to the last page</a>.</p>
<p><span id="more-1806"></span></p>
<p>Let&#8217;s start with the simple stuff first, that is implementing pinch-zoom. To implement pinch-zoom, we make use of the <a href="http://developer.android.com/reference/android/view/ScaleGestureDetector.html" title="ScaleGestureDetector"><span class="code-snippet">ScaleGestureDetector</span></a> class. This class helps you detect the pinch-zoom event. Using it is pretty simple:</p>
<pre class="brush: java">
public class ZoomView extends View {

    private static float MIN_ZOOM = 1f;
    private static float MAX_ZOOM = 5f;

    private float scaleFactor = 1.f;
    private ScaleGestureDetector detector;

    public ZoomView(Context context) {
        super(context);
        detector = new ScaleGestureDetector(getContext(), new ScaleListener());
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        detector.onTouchEvent(event);
        return true;
    }

    @Override
    public void onDraw(Canvas canvas) {
        super.onDraw(canvas);

        canvas.save();
        canvas.scale(scaleFactor, scaleFactor);

        // ...
        // your canvas-drawing code
        // ...

        canvas.restore();
    }

    private class ScaleListener extends ScaleGestureDetector.SimpleOnScaleGestureListener {
        @Override
        public boolean onScale(ScaleGestureDetector detector) {
            scaleFactor *= detector.getScaleFactor();
            scaleFactor = Math.max(MIN_ZOOM, Math.min(scaleFactor, MAX_ZOOM));
            invalidate();
            return true;
        }
    }
}
</pre>
<p>Your view class has four private members: <span class="code-snippet">MIN_ZOOM</span>, <span class="code-snippet">MAX_ZOOM</span>, <span class="code-snippet">detector</span>, and <span class="code-snippet">scaleFactor</span>. The first two are static constants that define the maximum and minimum zoom allowed. The third is of type <span class="code-snippet">ScaleGestureDetector</span> and does all the heavy lifting as far as zooming is concerned. The fourth member holds the scaling factor i.e., a number that represents the amount of &#8220;zoom&#8221;.</p>
<p>Now what does this do?</p>
<p>In the constructor, you initialize the detector. The constructor to <span class="code-snippet">ScaleGestureDetector</span> takes two parameters: the current context, and a listener. Our listener is defined inside the class <span class="code-snippet">ScaleListener</span> which extends the abstract class <span class="code-snippet">ScaleGestureDetector.SimpleOnScaleGestureListener</span>. Inside the <span class="code-snippet">onScale</span> method, we get the current scale factor from the detector. We then check to see if it is greater or smaller than our upper and lower bounds. If so, we make sure that it we limit the value to be between those bounds. We then call <span class="code-snippet">invalidate()</span> which forces the canvas to redraw itself.</p>
<p>The actual scaling happens inside the <span class="code-snippet">onDraw</span> method. There, we save the canvas, set its scaling factor (which is the one we got from the detector), draw anything we need to draw, and then restore the canvas. What happens now is that anything you draw on the canvas is now scaled by the scaling factor. This is what gives you the &#8220;zoom&#8221; effect.</p>
<br /><a href="http://vivin.net/?p=1806#comments" title="Comments on &quot;Implementing pinch-zoom and pan/drag in an Android view on the canvas&quot;"><img src="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?1806" alt="Comments" /></a><img src="http://vivin.net/?ak_action=api_record_view&#38;id=1806&#38;type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://vivin.net/2011/12/04/implementing-pinch-zoom-and-pandrag-in-an-android-view-on-the-canvas/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
	
		<media:thumbnail url="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?1806" />
		<media:content url="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?1806" medium="image">
			<media:title type="html">Comments</media:title>
		</media:content>
		<media:content url="http://vivin.net/?ak_action=api_record_view&#38;id=1806&#38;type=feed" medium="image" />
	</item>
		<item>
		<title>Setting the content type to text/plain for a JSON response from a Spring controller</title>
		<link>http://vivin.net/2011/11/07/setting-the-content-type-to-textplain-for-a-json-response-from-a-spring-controller/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://vivin.net/2011/11/07/setting-the-content-type-to-textplain-for-a-json-response-from-a-spring-controller/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 20:30:19 +0000</pubDate>
		<dc:creator>vivin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Nerdy Stuff]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[ajax fie upload]]></category>
		<category><![CDATA[iframe]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[jsonp]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[spring 3]]></category>
		<category><![CDATA[spring mvc]]></category>

		<guid isPermaLink="false">http://vivin.net/?p=1779</guid>
		<description><![CDATA[I was using a jQuery plugin called a ajaxfileupload to upload a file through AJAX. Technically what the plugin does isn&#8217;t AJAX. It creates a hidden form and an iframe, and then submits the form using the iframe as the target. The iframe will then end up with the response from the server. This response [...]]]></description>
			<content:encoded><![CDATA[<p>I was using a jQuery plugin called a <a href="http://www.phpletter.com/Our-Projects/AjaxFileUpload/" title="ajaxfileupload">ajaxfileupload</a> to upload a file through AJAX. Technically what the plugin does isn&#8217;t AJAX. It creates a hidden form and an iframe, and then submits the form using the iframe as the target. The iframe will then end up with the response from the server. This response is then read-in by the plugin and handled appropriately. In my case I was using a controller action that would return JSON (using the <span class="code-snippet">.action</span> extension). The action uses Spring&#8217;s <span class="code-snippet">MappingJacksonJSONView</span> that returns JSON with a content type of <span class="code-snippet">application/json</span> (as it should). This works perfectly in Chrome, however in both Firefox and IE, the user is presented with a dialog box that asks them to download the JSON response. This is obviously not what I wanted. The reason this is happening is because the response is being directly submitted to the iframe (and therefore, the page). That is, it&#8217;s not coming through via the <span class="code-snippet">XMLHttpRequest</span> object. So IE and FF don&#8217;t know what to do with it and assume that it is something the user would want to download. The solution to this problem is to set the content-type to <span class="code-snippet">text/plain</span>. This wasn&#8217;t as straightforward as I thought it would be. </p>
<p>Initially I was going to call the <span class="code-snippet">render(&#8230;)</span> method of <span class="code-snippet">MappingJacksonJsonView</span> but that didn&#8217;t work because the content-type had already been set to <span class="code-snippet">application/json</span>. The solution I came up with was to duplicate some of the code (ugh) inside <span class="code-snippet">MappingJacksonJsonView</span> to get the JSON as a string and to then write that to the response:</p>
<pre class="brush: java">

@RequestMapping
public void processFileUpload(HttpServletResponse response, Model model, ...) {

    ...

    //Set the content-type and charset of the response
    response.setContentType(&quot;text/plain&quot;);
    response.setCharacterEncoding(&quot;UTF-8&quot;);

    //I need to use another OutputStream here; I cannot use the response&#039;s OutputStream because that will cause errors
    //later on when the JSP needs to render its content (recall that getOutputStream() can only be called exactly once
    //on a response). Therefore I&#039;m writing the data to a ByteArrayOutputStream and then writing the byte array from
    //the ByteArrayOutputStream to the response manually.

    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
    ObjectMapper objectMapper = new ObjectMapper();
    JsonGenerator generator = objectMapper.getJsonFactory().createJsonGenerator(byteArrayOutputStream, JsonEncoding.UTF8);

    //Before I can convert the data into JSON, I will need to filter some attributes out of the model (namely BindingResult)
    Map&lt;String, Object&gt; result = new HashMap&lt;String, Object&gt;();

    for(Map.Entry&lt;String, Object&gt; entry : model.asMap().entrySet()) {
        if(!(entry.getValue() instanceof BindingResult)) {
            result.put(entry.getKey(), entry.getValue());
        }
    }

    objectMapper.writeValue(generator, result);
    response.getWriter().write(new String(byteArrayOutputStream.toByteArray(), &quot;UTF8&quot;));
}
</pre>
<p>This still seems a little hacky to me. A possible improvement is to annotate the action with <span class="code-snippet">@ResponseBody</span> and return the JSON as a string without involving the response at all. If anyone has a better solution, I&#8217;m all ears!</p>
<br /><a href="http://vivin.net/?p=1779#comments" title="Comments on &quot;Setting the content type to text/plain for a JSON response from a Spring controller&quot;"><img src="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?1779" alt="Comments" /></a><img src="http://vivin.net/?ak_action=api_record_view&#38;id=1779&#38;type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://vivin.net/2011/11/07/setting-the-content-type-to-textplain-for-a-json-response-from-a-spring-controller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?1779" />
		<media:content url="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?1779" medium="image">
			<media:title type="html">Comments</media:title>
		</media:content>
		<media:content url="http://vivin.net/?ak_action=api_record_view&#38;id=1779&#38;type=feed" medium="image" />
	</item>
		<item>
		<title>Implementing JSONP in Spring MVC 3.0.x</title>
		<link>http://vivin.net/2011/07/01/implementing-jsonp-in-spring-mvc-3-0-x/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://vivin.net/2011/07/01/implementing-jsonp-in-spring-mvc-3-0-x/#comments</comments>
		<pubDate>Fri, 01 Jul 2011 16:33:22 +0000</pubDate>
		<dc:creator>vivin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Nerdy Stuff]]></category>
		<category><![CDATA[Programming and Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[jsonp]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[spring 3]]></category>
		<category><![CDATA[spring mvc]]></category>

		<guid isPermaLink="false">http://vivin.net/?p=1732</guid>
		<description><![CDATA[In Spring 3, it&#8217;s very easy to get a view to return JSON. However, there is no built-in mechanism to return JSONP. I was able to find a pretty good tutorial That uses Spring&#8217;s DelegatingFilterProxy. I implemented this solution and I got it to work, but I didn&#8217;t like the fact that I had to [...]]]></description>
			<content:encoded><![CDATA[<p>In Spring 3, it&#8217;s very easy to get a view to return JSON. However, there is no built-in mechanism to return <a href="http://en.wikipedia.org/wiki/JSONP">JSONP</a>. I was able to find a <a href="http://jpgmr.wordpress.com/2010/07/28/tutorial-implementing-a-servlet-filter-for-jsonp-callback-with-springs-delegatingfilterproxy/">pretty good tutorial</a> That uses Spring&#8217;s <span style="font-family: courier new; font-weight: bold">DelegatingFilterProxy</span>. I implemented this solution and I got it to work, but I didn&#8217;t like the fact that I had to create a separate filter and a bunch of other classes just for that. I also wanted to use a specific extension (<span style = "font-family: courier new; font-weight: bold">.jsonp</span>) for JSONP just to make it more explicit. Spring uses <span style="font-family: courier new; font-weight: bold">MappingJacksonJsonView</span> to return JSON. I figured that I could extend this view and have it return JSONP instead of JSON.<br />
<span id="more-1732"></span></p>
<p>Although I pulled my hair out for an hour or two (I was getting a 404 when hitting my controller with with a <span style="font-family: courier new; font-weight: bold">.jsonp</span> extension; I&#8217;ll explain why, later), the resulting solution is actually pretty simple. First, you need to extend <span style="font-family: courier new; font-weight: bold">MappingJacksonJsonView</span> to create your own view. Since <span style="font-family: courier new; font-weight: bold">MappingJacksonJsonView</span> already handles the creation of JSON, all we need to do is pad it with our callback. The way to do this is to override the <span style="font-family: courier new; font-weight: bold">MappingJacksonJsonView#render(Map<String, ?> model, HttpServletRequest request, HttpServletResponse response)</span> method (This method is actually defined in <span style="font-family: courier new; font-weight: bold">AbstractView</span>, a Spring-provided abstract class that you can override in your own view). The full source is below:</p>
<pre class="brush: java">
package net.vivin.mvc.spring.view.jsonp;

import org.springframework.web.servlet.view.json.MappingJacksonJsonView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

public class MappingJacksonJsonpView extends MappingJacksonJsonView {

	/**
	 * Default content type. Overridable as bean property.
	 */
	public static final String DEFAULT_CONTENT_TYPE = &quot;application/javascript&quot;;

    @Override
    public String getContentType() {
        return DEFAULT_CONTENT_TYPE;
    }

 	/**
	 * Prepares the view given the specified model, merging it with static
	 * attributes and a RequestContext attribute, if necessary.
	 * Delegates to renderMergedOutputModel for the actual rendering.
	 * @see #renderMergedOutputModel
	 */
    @Override
	public void render(Map&lt;String, ?&gt; model, HttpServletRequest request, HttpServletResponse response) throws Exception {

        if(&quot;GET&quot;.equals(request.getMethod().toUpperCase())) {
            @SuppressWarnings(&quot;unchecked&quot;)
            Map&lt;String, String[]&gt; params = request.getParameterMap();

            if(params.containsKey(&quot;callback&quot;)) {
                response.getOutputStream().write(new String(params.get(&quot;callback&quot;)[0] + &quot;(&quot;).getBytes());
                super.render(model, request, response);
                response.getOutputStream().write(new String(&quot;);&quot;).getBytes());
                response.setContentType(&quot;application/javascript&quot;);
            }

            else {
                super.render(model, request, response);
            }
        }

        else {
            super.render(model, request, response);
        }
    }
}
</pre>
<p>The <span style="font-family: courier new; font-weight: bold">DEFAULT_CONTENT_TYPE</span> public static property and the <span style="font-family: courier new; font-weight: bold">getContentType()</span> method are important. Spring uses this method (among other things) to find the best candidate view. I spent at least an hour trying to figure out why I was getting 404&#8242;s. It was because I hadn&#8217;t overridden the property and the accessor to return the correct content-type. Going back to the <span style="font-family: courier new; font-weight: bold">render</span> method itself, you can see that it&#8217;s pretty simple. First I make sure that the request method is <span style="font-family: courier new; font-weight: bold">GET</span>. Then I get the request parameter-map and check for the <span style="font-family: courier new; font-weight: bold">callback</span> parameter. If this parameter exists, I write out the name of the callback with an open parenthesis. Then I call the parent class&#8217;s <span style="font-family: courier new; font-weight: bold">render</span> method. This method belongs to <span style="font-family: courier new; font-weight: bold">MappingJacksonJsonView</span> and will write out JSON to the response. Finally, I write out a closing parenthesis and a semicolon to the response and set the content type to <span style="font-family: courier new; font-weight: bold">application/javascript</span>. So as you can see, I&#8217;ve converted JSON into JSONP.</p>
<p>The next thing you need to do is include an entry for your new view in the <span style="font-family: courier new; font-weight: bold">springmvc-servlet.xml</span> file. This part also took a little work. I wasn&#8217;t sure how to include my new view within the <span style="font-family: courier new; font-weight: bold">ContentNegotiatingViewResolver</span> bean. But <a href="http://www.rickherrick.com/?q=node/63">this post</a> proved to be remarkably helpful. The post actually talks about returning XML or JSON (based on the extension), but I was able to adapt it to return JSON or JSON. Here&#8217;s what it looks like:</p>
<pre class="brush: xml">
    &lt;bean class=&quot;org.springframework.web.servlet.view.ContentNegotiatingViewResolver&quot;&gt;
        &lt;property name=&quot;favorPathExtension&quot; value=&quot;true&quot;/&gt;
        &lt;property name=&quot;mediaTypes&quot;&gt;
            &lt;map&gt;
                &lt;entry key=&quot;json&quot; value=&quot;application/json&quot;/&gt;
                &lt;entry key=&quot;jsonp&quot; value=&quot;application/javascript&quot;/&gt;
            &lt;/map&gt;
        &lt;/property&gt;
        &lt;property name=&quot;defaultViews&quot;&gt;
            &lt;list&gt;
                &lt;bean class=&quot;org.springframework.web.servlet.view.json.MappingJacksonJsonView&quot;/&gt;
                &lt;bean class=&quot;net.vivin.mvc.spring.view.jsonp.MappingJacksonJsonpView&quot;/&gt;
            &lt;/list&gt;
        &lt;/property&gt;
    &lt;/bean&gt;
</pre>
<p>If you notice, the <span style="font-family: courier new; font-weight: bold">value</span> property for <span style="font-family: courier new; font-weight: bold">jsonp</span> has been set to <span style="font-family: courier new; font-weight: bold">application/javascript</span>. Spring uses this value and checks it against the view class to figure out the best candidate view. If you didn&#8217;t override the <span style="font-family: courier new; font-weight: bold">DEFAULT_CONTENT_TYPE</span> property and the associated getter, you would get a 404.</p>
<p>Finally, you need a <span style="font-family: courier new; font-weight: bold">url-pattern</span> entry under <span style="font-family: courier new; font-weight: bold">servlet-mapping</span> in your <span style="font-family: courier new; font-weight: bold">web.xml</span> file so that the new <span style="font-family: courier new; font-weight: bold">.jsonp</span> extension is recognized:</p>
<pre class="brush: xml">
    &lt;servlet-mapping&gt;
        &lt;servlet-name&gt;springmvc&lt;/servlet-name&gt;
        &lt;url-pattern&gt;*.json&lt;/url-pattern&gt;
        &lt;url-pattern&gt;*.jsonp&lt;/url-pattern&gt;
        ...
    &lt;/servlet-mapping&gt;
</pre>
<p>That&#8217;s pretty much it. With this code in place, you can hit your controller with <span style="font-family: courier new; font-weight: bold">http://my.domain.com/controllerName/actionName.jsonp?callback=myCallback</span> and you&#8217;ll get your data back as JSONP! I thought this solution was pretty simple and a little less invasive than creating a filter. Comments/suggestions/criticisms for improvement are welcome!</p>
<br /><a href="http://vivin.net/?p=1732#comments" title="Comments on &quot;Implementing JSONP in Spring MVC 3.0.x&quot;"><img src="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?1732" alt="Comments" /></a><img src="http://vivin.net/?ak_action=api_record_view&#38;id=1732&#38;type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://vivin.net/2011/07/01/implementing-jsonp-in-spring-mvc-3-0-x/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
	
		<media:thumbnail url="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?1732" />
		<media:content url="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?1732" medium="image">
			<media:title type="html">Comments</media:title>
		</media:content>
		<media:content url="http://vivin.net/?ak_action=api_record_view&#38;id=1732&#38;type=feed" medium="image" />
	</item>
		<item>
		<title>About Me and Projects</title>
		<link>http://vivin.net/2009/11/22/about-me-and-projects/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://vivin.net/2009/11/22/about-me-and-projects/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 23:28:52 +0000</pubDate>
		<dc:creator>vivin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Programming and Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[my website]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://vivin.net/?p=1220</guid>
		<description><![CDATA[I finally got around to adding pages to my blog. I&#8217;ve added an &#8220;About Me&#8221; page and a &#8220;Projects&#8221; page. The &#8220;Projects&#8221; page is similar to the one I had on the old site. I&#8217;ve migrated one project (Sulekha) over. Will be moving the second one (FXCalendar) over soon and I&#8217;m also going to try [...]]]></description>
			<content:encoded><![CDATA[<p>I finally got around to adding pages to my blog. I&#8217;ve added an &#8220;About Me&#8221; page and a &#8220;Projects&#8221; page. The &#8220;Projects&#8221; page is similar to the one I had on the old site. I&#8217;ve migrated one project (Sulekha) over. Will be moving the second one (FXCalendar) over soon and I&#8217;m also going to try and add another one to the list.</p>
<br /><a href="http://vivin.net/?p=1220#comments" title="Comments on &quot;About Me and Projects&quot;"><img src="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?1220" alt="Comments" /></a><img src="http://vivin.net/?ak_action=api_record_view&#38;id=1220&#38;type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://vivin.net/2009/11/22/about-me-and-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?1220" />
		<media:content url="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?1220" medium="image">
			<media:title type="html">Comments</media:title>
		</media:content>
		<media:content url="http://vivin.net/?ak_action=api_record_view&#38;id=1220&#38;type=feed" medium="image" />
	</item>
		<item>
		<title>An update to running aterm (or any other X app) rootless, without a DOS console on Cygwin</title>
		<link>http://vivin.net/2009/03/29/an-update-to-running-aterm-or-any-other-x-app-rootless-without-a-dos-console-on-cygwin/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://vivin.net/2009/03/29/an-update-to-running-aterm-or-any-other-x-app-rootless-without-a-dos-console-on-cygwin/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 23:46:08 +0000</pubDate>
		<dc:creator>vivin</dc:creator>
				<category><![CDATA[Cygwin]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[aterm]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[windows xp]]></category>
		<category><![CDATA[x]]></category>

		<guid isPermaLink="false">http://vivin.net/?p=406</guid>
		<description><![CDATA[A while ago, I wrote up a quick guide about running X/Windows applications (specifically, aterm) without root windows on Windows, using Cygwin. Recently I tried to set it up again and I realized that some of the information is slightly out of date. I&#8217;m also endeavoring to write a better guide. I&#8217;m assuming that you [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago, I wrote up a <a href="http://vivin.net/2007/03/27/running-aterm-or-any-other-x-app-rootless-without-a-dos-console-on-cygwin/" target="_blank">quick guide</a> about running X/Windows applications (specifically, <span style="font-family: courier new;">aterm</span>) without root windows on Windows, using Cygwin. Recently I tried to set it up again and I realized that some of the information is slightly out of date. I&#8217;m also endeavoring to write a better guide. I&#8217;m assuming that you have, at the very least, a decent understanding of building things from source. The process under Cygwin is pretty much the same as under any other *nix, but there are a few quirks. On the whole, it&#8217;s a whole lot easier than it used to be. This guide is primarily geared towards running <span style="font-family: courier new;">aterm</span> with a transparent background on a windows machine so that you can have a decent client for the Cygwin commandline, instead of the crappy Windows one.</p>
<p>I&#8217;m assuming that you already have Cygwin installed. If you don&#8217;t, you can get it from <a href="http://cygwin.com" target="_blank">here</a>. In addition to whatever other packages you have selected to customize your install, you also need development packages (gcc and friends), Xorg packages (headers, includes, and libraries), and a few graphics libraries (for <span style="font-family: courier new;">aterm</span>):</p>
<ul>
<li>Devel
<ul>
<li>gcc-core</li>
<li>gcc-g++</li>
<li>libXaw3d-devel (for <span style="font-family: courier new;">xv</span>)</li>
<li>libjpeg-devel (for <span style="font-family: courier new;">aterm</span>)</li>
<li>libpng12-devel (for <span style="font-family: courier new;">aterm</span>)</li>
</ul>
</li>
<li>Libs
<ul>
<li>jpeg (for <span style="font-family: courier new;">aterm</span>)</li>
<li>libXaw3d-devel</li>
<li>libXaw3d-7</li>
<li>libfreetype6</li>
<li>libjpeg-devel</li>
<li>libjpeg62 (for <span style="font-family: courier new;">aterm</span>)</li>
<li>libjpeg6b (for <span style="font-family: courier new;">aterm</span>)</li>
<li>libpng12 (for <span style="font-family: courier new;">aterm</span>)</li>
<li>libpng12-devel (for <span style="font-family: courier new;">aterm</span>)</li>
<li>libtiff5 (for <span style="font-family: courier new;">aterm</span>, <span style="font-family: courier new;">xv</span>)</li>
<li>zlib-devel (for <span style="font-family: courier new;">aterm</span>)</li>
<li>zlib0 (for <span style="font-family: courier new;">aterm</span>)</li>
</ul>
</li>
<li>Utils
<ul>
<li>bzip2 (to handle .bz2 files)</li>
</ul>
</li>
<li>X11
<ul>
<li>libX11-devel</li>
<li>xinit</li>
<li>xsetroot (if <span style="font-family: courier new;">xv</span> doesn&#8217;t work for you)</li>
</ul>
</li>
</ul>
<p>After Cygwin finishes installing those packages, grab the sources for <span style="font-family: courier new;"><a href="http://www.afterstep.org/afterimage/getcode.php" target="_blank">libAfterImage</a></span>, <span style="font-family: courier new;"><a href="http://sourceforge.net/project/showfiles.php?group_id=888" target="_blank">aterm</a></span>, and <span style="font-family: courier new;"><a href="http://www.trilon.com/xv/downloads.html" target="_blank">xv</a></span>. Unpack the sources perform the requisite steps to build and install from source (<span style="font-family: courier new;">./configure</span>, <span style="font-family: courier new;">make</span>, and <span style="font-family: courier new;">make install</span> should work if all goes well).</p>
<p><strong><span style="font-family: courier new;">libAfterImage:</span></strong></p>
<p>If you get <span style="font-family: courier new;">&#8220;parse error before XErrorEvent&#8221;</span> errors while building <span style="font-family: courier new;">libAfterImage</span>, make sure that you didn&#8217;t forget to select the X11 development package.</p>
<p><strong><span style="font-family: courier new;">aterm</span>:</strong></p>
<p><span style="font-family: courier new;">gcc</span> on Cygwin expects <span style="font-family: courier new;">&#8211;rdynamic</span> and not <span style="font-family: courier new;">-rdynamic</span>. If you&#8217;re seeing these errors, edit the Makefiles under <span style="font-family: courier new;">src</span> and <span style="font-family: courier new;">src/graphics</span> within the <span style="font-family: courier new;">aterm</span> source directory. Change the &#8220;-rdynamic&#8221; to &#8220;&#8211;rdynamic&#8221;. The changes should be on line 54 for both files.</p>
<p><strong><span style="font-family: courier new;">xv</span>:</strong></p>
<p>Under the <span style="font-family: courier new;">tiff</span> directory within the <span style="font-family: courier new;">xv</span> sources, there is a file called <span style="font-family: courier new;">RANLIB.csh</span>. Edit this file and make sure that you ONLY have the following line in there:</p>
<pre class="brush: php">
ranlib $1 &gt;&amp; /dev/null
</pre>
<p>Otherwise the build process will fail. Additionally, you need to edit <span style="font-family: courier new;">xv.h</span>. This file lives right at the root of your <span style="font-family: courier new;">xv</span> source directory. If you do not perform the following change, you&#8217;ll get errors from gcc complaining that &#8220;<span style="font-family: courier new;">sys_errlist</span> has previously been defined&#8221;. Change line 119 of <span style="font-family: courier new;">xv.h</span> to:</p>
<pre class="brush: php">
/*extern char *sys_errlist[]; */    /* this too... */
</pre>
<p>What you&#8217;re doing is commenting out the definition for <span style="font-family: courier new;">sys_errlist</span> so that it doesn&#8217;t conflict with what has already been defined in the Cygwin header files. These changes should be the only ones you need to get <span style="font-family: courier new;">xv</span> compiling and running.</p>
<p>Now you need to set up two batch files. One to start up X rootlessly, and another to start up <span style="font-family: courier new;">aterm</span>. Before you do that, make sure you add <span style="font-family: courier new;">C:\cygwin\usr\bin</span> and <span style="font-family: courier new;">C:\cygwin\X11R6\usr\bin</span> to your <span style="font-family: courier new;">PATH</span> variable. You can do this by going to <em>My Computer &gt; Properties &gt; Advanced &gt; Environment Variables</em>. If you don&#8217;t do this, you&#8217;ll get &#8220;cygwin1.dll not found&#8221; errors while trying to run these batch files. The X windows binaries used to live in <span style="font-family: courier new;">C:\cygwin\usr\X11R6\bin</span>, but have since been moved to <span style="font-family: courier new;">C:\cygwin\usr\bin</span>. Therefore, the start-up batch-file now looks like this:</p>
<p><strong><span style="font-family: courier new;">xwin.bat:</span></strong></p>
<pre class="brush: php">
C:\cygwin\usr\X11R6\bin\run.exe C:\cygwin\usr\bin\xwin.exe -multiwindow -clipboard -silent-dup-error
C:\cygwin\usr\X11R6\bin\run.exe C:\cygwin\usr\local\bin\xv.exe -display :0 -root -quit -be -max /cygdrive/c/Documents\ and\ Settings/vivin/My\ Documents/My\ Pictures/Wallpapers/01707_spectrumofthesky_1920x1200.jpg
</pre>
<p>The first line starts up the X windowing system. The second line sets the wallpaper using <span style="font-family: courier new;">aterm</span>. You now need another batch file to run <span style="font-family: courier new;">aterm</span>, and that looks like this:</p>
<p><strong><span style="font-family: courier new;">aterm.bat</span></strong></p>
<pre class="brush: php">
C:\cygwin\usr\X11R6\bin\run.exe C:\cygwin\bin\bash.exe --login -i -c &quot;aterm -sh 80 -tr -trsb -fade 20 -tint gray -sb -st -sr -sl 1000 -tn xterm&quot;
</pre>
<p>This file starts <span style="font-family: courier new;">aterm</span> with the background image at 50% brightness, transparent background, transparent scrollbar, 20% fading on losing focus, gray tint, scrollbar, trough-less scrollbar, scrollbar on the right, 1000 scrollback lines, and with xterm terminal emulation. Like I mentioned in my original guide. <span style="font-family: courier new;">xv</span> will sometimes fail to start with <span style="font-family: courier new;">xwin</span>. If that is the case, you can modify <span style="font-family: courier new;">aterm.bat</span> to look like this:</p>
<p><strong><span style="font-family: courier new;">aterm.bat</span>:</strong></p>
<pre class="brush: php">
C:\cygwin\usr\X11R6\bin\run.exe C:\cygwin\bin\bash.exe --login -i -c &quot;xv -display :0 -root -quit -be -max /cygdrive/c/Documents\ and\ Settings/vivin/My\ Documents/My\ Pictures/Wallpapers/01707_spectrumofthesky_1920x1200.jpg &amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp; aterm -sh 80 -tr -trsb -fade 20 -tint gray -sb -st -sr -sl 1000 -tn xterm&quot;
</pre>
<p>Slightly inefficient, but it works. Now if you have a dual-monitor display, you&#8217;ll notice that the background image is stretched across both screens when you run <span style="font-family: courier new;">aterm</span>. This is probably not what you want. To fix this problem you need to change a few invocation options for <span style="font-family: courier new;">xv</span>. For this to work properly (meaning, not look crappy) both screens should be running at the same resolution:</p>
<pre class="brush: php">
xv -display :0 -root -quit -be -maxpect -rmode 1 /cygdrive/c/Documents\ and\ Settings/vivin/My\ Documents/My\ Pictures/Wallpapers/01707_spectrumofthesky_1920x1200.jpg
</pre>
<p>Notice the <span style="font-family: courier new;">-maxpect</span> and <span style="font-family: courier new;">-rmode 1</span> options. <span style="font-family: courier new;">-maxpect</span> expands the image to fill the screen while maintaining the aspect ratio, while <span style="font-family: courier new;">-rmode 1</span> sets the display mode on <span style="font-family: courier new;">xv</span> to <span style="font-family: courier new;">tiled</span>. So you should now have your wallpaper displaying on both screens now (under X) without being distorted.</p>
<p>Here&#8217;s what it looks like on my machine:</p>
<p style="text-align: center;"><a href="http://vivin.net/pub/x_with_xp/xp_aterm_trans_dualmonitor.png" target="_blank"><img title="aterm running on XP under X with a dual-monitor setup" src="http://vivin.net/php/image.php?source=/home/vivin/www/pub/x_with_xp/xp_aterm_trans_dualmonitor.png&amp;type=png&amp;height=0.25&amp;width=0.25" alt="aterm running on XP under X with a dual-monitor setup" /></a></p>
<p>This is on a dual-monitor setup with both screens running at 1920&#215;1200 resolution. I&#8217;ve set X&#8217;s background to be the same as my windows Wallpaper so that it looks cooler. Notice how the background image (inside <span style="font-family: courier new;">aterm</span>) is not stretched, but tiled across the two screens. That&#8217;s all there is to it. Seems like a bit of work, but I think it&#8217;s worth it. My main reason for going through all this trouble was to get a decent terminal running in windows. I guess I could have just used <span style="font-family: courier new;">xterm</span>, but <span style="font-family: courier new;">aterm</span> looks so much nicer, doesn&#8217;t it?</p>
<br /><a href="http://vivin.net/?p=406#comments" title="Comments on &quot;An update to running aterm (or any other X app) rootless, without a DOS console on Cygwin&quot;"><img src="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?406" alt="Comments" /></a><img src="http://vivin.net/?ak_action=api_record_view&#38;id=406&#38;type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://vivin.net/2009/03/29/an-update-to-running-aterm-or-any-other-x-app-rootless-without-a-dos-console-on-cygwin/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
	
		<media:thumbnail url="http://vivin.net/php/image.php?source=/home/vivin/www/pub/x_with_xp/xp_aterm_trans_dualmonitor.png&#38;type=png&#38;height=0.25&#38;width=0.25" />
		<media:content url="http://vivin.net/php/image.php?source=/home/vivin/www/pub/x_with_xp/xp_aterm_trans_dualmonitor.png&#38;type=png&#38;height=0.25&#38;width=0.25" medium="image">
			<media:title type="html">aterm running on XP under X with a dual-monitor setup</media:title>
		</media:content>
		<media:content url="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?406" medium="image">
			<media:title type="html">Comments</media:title>
		</media:content>
		<media:content url="http://vivin.net/?ak_action=api_record_view&#38;id=406&#38;type=feed" medium="image" />
	</item>
		<item>
		<title>Running aterm (or any other X app) rootless, without a DOS console on Cygwin</title>
		<link>http://vivin.net/2007/03/27/running-aterm-or-any-other-x-app-rootless-without-a-dos-console-on-cygwin/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://vivin.net/2007/03/27/running-aterm-or-any-other-x-app-rootless-without-a-dos-console-on-cygwin/#comments</comments>
		<pubDate>Tue, 27 Mar 2007 23:14:04 +0000</pubDate>
		<dc:creator>vivin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Cygwin]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[aterm]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[windows xp]]></category>
		<category><![CDATA[x]]></category>

		<guid isPermaLink="false">http://vivin.net/?p=370</guid>
		<description><![CDATA[This guide is outdated. Please check out the updated version of this guide here. On any system that I plan to use for an extended period of time, I will always install Cygwin. This is mainly because I like have UNIX tools on Windows, and also so that I can use the console to do [...]]]></description>
			<content:encoded><![CDATA[<p><strong>This guide is outdated. Please check out the updated version of this guide <a target = "_blank" href = "http://vivin.net/2009/03/29/an-update-to-running-aterm-or-any-other-x-app-rootless-without-a-dos-console-on-cygwin-/">here</a>.</strong></p>
<p>On <em>any</em> system that I plan to use for an extended period of time, I will always install <a target = "_blank" href = "http://cygwin.com">Cygwin</a>. This is mainly because I like have UNIX tools on Windows, and also so that I can use the console to do things that DOS is not able to do. I started using Cygwin in 2000, and I&#8217;ve continued using it since. One of the cool things you can do with Cygwin is run <a target = "_blank" href = "http://en.wikipedia.org/wiki/X_Window_System">X</a>, which means that you can have X applications running on the Windows desktop. When I was interning at <a target = "_blank" href = "http://motorola.com">Motorola</a>, I used to run <a target = "_blank" href = "http://www.hummingbird.com/products/nc/exceed/index.html?cks=y">eXceed</a>, with <a target = "_blank" href = "http://en.wikipedia.org/wiki/Fvwm">fvwm</a>. This was where I first ran into <a target = "_blank" href = "http://www.afterstep.org/aterm.php">aterm</a>. What I liked most about aterm is the eye-candy. You can have transparent windows with shading effects and all sorts of other cool stuff. I tried to get aterm running on my machine at home by compiling it from source under Cygwin. I was eventually able to do this (install <em>libjpeg</em>, <em>libpng</em>, <em>libAfterImage</em>, <em>zlib</em>, and the X includes and libraries first), but what I didn&#8217;t like was the fact that you had to start up a Cygwin console to open up X, and then aterm. I wanted aterm to start up and run directly without that ugly DOS/Cygwin console window. Of course, you can&#8217;t simply run the aterm executable because it needs X and Cygwin to be running. I eventually figured it out (actually a few months before leaving on my &#8220;extended vacation&#8221;) by starting out with X running with a rootless window. Oh, and <em>run.exe</em> proved to be very helpful. Anyway, here is how you do it:</p>
<p>First you need to add <em>C:\cygwin\bin</em> to your <em>PATH</em> Environment Variable. You can do this from <em>My Computer &#62; Properties &#62; Advanced &#62; Environment Variables</em>. You might also have to add <em>C:\cygwin\usr\X11R6\bin</em> to <em>PATH</em>.</p>
<p>Then you need to create two batch files. The first one is to start X, and the second one is to start aterm (or whatever X app you want to start). The example I&#8217;m going to show includes starting up X with a wallpaper (using <a target = "_blank" href = "http://www.trilon.com/xv/">xv</a>), and then running aterm. I run aterm with a transparent background, using the X wallpaper. However, you can also load aterm with a background image of your choice.</p>
<p>The batch file to start X, which I call <em>xwin.bat</em> looks like this:</p>
<pre class="brush: php">
C:\cygwin\usr\X11R6\bin\run.exe C:\cygwin\usr\X11R6\bin\xwin.exe -multiwindow -clipboard -silent-dup-error
C:\cygwin\usr\X11R6\bin\run.exe C:\cygwin\usr\local\bin\xv.exe -display :0 -root -quit -be -maxpect /cygdrive/c/Wallpapers/upper_limit_wp_dark_1600.jpg
</pre>
<p>This will start up X in a rootless window with <em>upper_limit_wp_dark_1600.jpg</em> as your X wallpaper. Next, you write a batch file (<em>aterm.bat</em>) that will load aterm:</p>
<pre class="brush: php">
C:\cygwin\usr\X11R6\bin\run.exe C:\cygwin\bin\bash.exe --login -i -c &quot;aterm -sh 50 -tr -trsb -fade 20 -tint gray -bl -sb -st -sr -sl 1000 -tn xterm&quot;
</pre>
<p>This batch file will load aterm with the background image at 50% brightness, transparent background, transparent scrollbar, 20% fading on losing focus, gray tint, borderless window (sometimes works), scrollbar, trough-less scrollbar, scrollbar on the right, 1000 scrollback lines, and with xterm terminal emulation.  One issue I have had with this, is that aterm may load up with the default (checkered) X background. This is because the <em>xv</em> did not properly execute in <em>xwin.bat</em>. I have no idea why this happens, sometimes it works, and sometimes it doesn&#8217;t. If it doesn&#8217;t, you can modify <em>aterm.bat</em>:</p>
<pre class="brush: php">
C:\cygwin\usr\X11R6\bin\run.exe C:\cygwin\bin\bash.exe --login -i -c &quot;xv -display :0 -root -quit -be -max /cygdrive/c/Wallpapers/upper_limit_wp_dark_1600.jpg &amp;#38;&amp;#38; aterm -sh 50 -tr -trsb -fade 20 -tint gray -bl -sb -st -sr -sl 1000 -tn xterm&quot;
</pre>
<p>This batch file will load <em>xv</em> every time you start aterm, so there is a slight performance hit on startup. However, it&#8217;s not that big of a deal because the <em>xv</em> instance quits right after it sets up the wallpaper, and so you&#8217;re not loading a new instance of <em>xv</em> into the memory every time.</p>
<p>Well, there you have it. I hope it was helpful!</p>
<p style = "text-align:center">
<a target = "_blank" href = "http://vivin.net/pub/x_with_xp/x_with_xp.png"><img title = "X with XP" alt = "X with XP" class = ""   src = "http://vivin.net/php/image.php?source=/home/vivin/www/pub/x_with_xp/x_with_xp.png&amp;type=png&amp;height=0.42&amp;width=0.42" /></a><br />
<strong>Screenshot of my XP desktop, with aterm, xcalc, xclock, xeyes, and xterm running</strong></p>
<br /><a href="http://vivin.net/?p=370#comments" title="Comments on &quot;Running aterm (or any other X app) rootless, without a DOS console on Cygwin&quot;"><img src="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?370" alt="Comments" /></a><img src="http://vivin.net/?ak_action=api_record_view&#38;id=370&#38;type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://vivin.net/2007/03/27/running-aterm-or-any-other-x-app-rootless-without-a-dos-console-on-cygwin/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:thumbnail url="http://vivin.net/php/image.php?source=/home/vivin/www/pub/x_with_xp/x_with_xp.png&#38;type=png&#38;height=0.42&#38;width=0.42" />
		<media:content url="http://vivin.net/php/image.php?source=/home/vivin/www/pub/x_with_xp/x_with_xp.png&#38;type=png&#38;height=0.42&#38;width=0.42" medium="image">
			<media:title type="html">X with XP</media:title>
		</media:content>
		<media:content url="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?370" medium="image">
			<media:title type="html">Comments</media:title>
		</media:content>
		<media:content url="http://vivin.net/?ak_action=api_record_view&#38;id=370&#38;type=feed" medium="image" />
	</item>
		<item>
		<title>Google Talk/Google IM</title>
		<link>http://vivin.net/2005/08/23/google-talkgoogle-im/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://vivin.net/2005/08/23/google-talkgoogle-im/#comments</comments>
		<pubDate>Wed, 24 Aug 2005 00:42:11 +0000</pubDate>
		<dc:creator>vivin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[googletalk]]></category>
		<category><![CDATA[im]]></category>
		<category><![CDATA[jabber]]></category>
		<category><![CDATA[trillian]]></category>

		<guid isPermaLink="false">http://vivin.net/?p=349</guid>
		<description><![CDATA[Google has come out with their instant messaging program. This seems to be unofficial; the only mentions I can see are on this Slashdot article, and the website I linked to. You should be able to get it to work using any Jabber client. I&#8217;ve been trying to get it to work on Trillian, but [...]]]></description>
			<content:encoded><![CDATA[<p>Google has <a target = "_blank" href = "http://www.smashsworld.com/2005/08/im-on-google-talk-right-now.php">come out</a> with their instant messaging program. This seems to be unofficial; the only mentions I can see are on <a target = "_blank" href = "http://it.slashdot.org/article.pl?sid=05/08/23/2316223&amp;tid=217&amp;tid=218">this</a> Slashdot article, and the website I linked to.</p>
<p>You should be able to get it to work using any <a target = "_blank" href = "http://jabber.org">Jabber</a> client. I&#8217;ve been trying to get it to work on <a target = "_blank" href = "http://trillian.cc">Trillian</a>, but I&#8217;ve been having some trouble. I&#8217;ve set my username as [my gmail id]@gmail.com and the server as talk.google.com. Trillian authenticates, but then quits after receiving &#8220;iq errors&#8221;:</p>
<pre class="brush: php">
[Tuesday, August 23, 2005 - 17:04:55] *** Creating connection &quot;[my gmail id]@gmail.com/&quot;
[Tuesday, August 23, 2005 - 17:04:56] *** Server supports TLS encryption...
[Tuesday, August 23, 2005 - 17:04:56] *** Negotiating XMPP SSL connection...
[Tuesday, August 23, 2005 - 17:04:57] *** Connection established using EDH-RSA-DES-CBC3-SHA (TLSv1/SSLv3)
[Tuesday, August 23, 2005 - 17:05:05] *** Attempting to authenticate using PLAIN
[Tuesday, August 23, 2005 - 17:05:06] *** Authenticated.
[Tuesday, August 23, 2005 - 17:05:15] *** You have successfully connected to Jabber.
[Tuesday, August 23, 2005 - 17:05:15] *** ERROR: iq error 501
[Tuesday, August 23, 2005 - 17:05:15] *** Retrieved user roster from server.
[Tuesday, August 23, 2005 - 17:05:16] *** ERROR: iq error 501
[Tuesday, August 23, 2005 - 17:05:16] *** ERROR: iq error 503 from gmail.com
[Tuesday, August 23, 2005 - 17:05:16] *** ERROR: iq error 503 from gmail.com
</pre>
<p>If anyone has had anymore success, please let me know. I&#8217;m not sure how popular this is going to be; people usually tend to stay within a particular &#8220;IM clique&#8221; (with <a target = "_blank" href = "http://aim.com">AIM</a>, <a target = "_blank" href = "http://messenger.msn.com">MSN Messenger</a>, and <a target = "_blank" href = "http://chat.yahoo.com">Yahoo! Chat</a> being the major players). I use Trillian so that I can talk people in any one of these &#8220;cliques&#8221;.</p>
<p>This ends months of speculation and rumours about Google&#8217;s foray into the IM arena. I wonder what&#8217;s next?</p>
<p><strong>UPDATE #1</strong></p>
<p>I tried it again, this time with &#8220;Trillian&#8221; in the &#8220;Resource&#8221; field, no luck &#8211; Trillian still loses connection to the server. It comes up with a bunch of &#8220;Connection lost to server&#8221; errors.</p>
<pre class="brush: php">
[Tuesday, August 23, 2005 - 17:44:00] *** Creating connection &quot;[my gmail id]@gmail.com/Trillian&quot;
[Tuesday, August 23, 2005 - 17:44:01] *** Server supports TLS encryption...
[Tuesday, August 23, 2005 - 17:44:01] *** Negotiating XMPP SSL connection...
[Tuesday, August 23, 2005 - 17:44:02] *** Connection established using EDH-RSA-DES-CBC3-SHA (TLSv1/SSLv3)
[Tuesday, August 23, 2005 - 17:44:10] *** Attempting to authenticate using PLAIN
[Tuesday, August 23, 2005 - 17:44:16] *** Authenticated.
[Tuesday, August 23, 2005 - 17:44:21] *** Connection lost to server.
[Tuesday, August 23, 2005 - 17:44:21] *** Connection lost to server.
[Tuesday, August 23, 2005 - 17:44:21] *** Connection lost to server.
[Tuesday, August 23, 2005 - 17:44:21] *** Connection lost to server.
[Tuesday, August 23, 2005 - 17:44:22] *** Connection lost to server.
[Tuesday, August 23, 2005 - 17:44:22] *** Connection lost to server.
[Tuesday, August 23, 2005 - 17:44:22] *** Connection lost to server.
</pre>
<p><strong>UPDATE #2</strong></p>
<p>I found <a target = "_blank" href = "http://www.bigblueball.com/forums/showthread.php?t=31804">this site</a> that has instructions on getting Google IM to work through Jabber on Trillian. It has the same settings that I use, but they claim to have gotten it to work; although I see the same &#8220;Connection lost to server&#8221; errors on their status window as well. I also noticed that their status window shows the authentication being done with &#8220;username@talk.google.com&#8221; as oppsed to &#8220;username@gmail.com&#8221;, which is what I&#8217;m seeing.</p>
<p><strong>UPDATE #3</strong></p>
<p>Success (sort of)! It works now &#8211; I didn&#8217;t do anything different, I tried disconnecting and reconnecting, and now the connection seems to be stable. However, I&#8217;m unable to add anyone, or IM them. I tried adding myself, but was unable to do so. I&#8217;ll keep playing around anyway&#8230; Here are a few screenshots:</p>
<p style = "text-align:center">
<a target = "_blank" href = "http://vivin.net/pub/gtalk/manage.jpg"><img alt = "Manage Connections" title = "Manage Connections" class = ""   src = "http://vivin.net/php/image.php?source=/home/vivin/www/pub/gtalk/manage.jpg&amp;type=jpg&amp;height=0.25&amp;width=0.25" /></a> <a target = "_blank" href = "http://vivin.net/pub/gtalk/preferences.jpg"><img alt = "Preferences" title = "Preferences" class = ""   src = "http://vivin.net/php/image.php?source=/home/vivin/www/pub/gtalk/preferences.jpg&amp;type=jpg&amp;height=0.25&amp;width=0.25" /></a> <a target = "_blank" href = "http://vivin.net/pub/gtalk/status.jpg"><img alt = "Status Window" title = "Status Window" class = ""   src = "http://vivin.net/php/image.php?source=/home/vivin/www/pub/gtalk/status.jpg&amp;type=jpg&amp;height=0.25&amp;width=0.25" /></a></p>
<p><strong>UPDATE #4</strong></p>
<p>It looks like it&#8217;s working now &#8211; I still lose connection occasionally, but it seems much more stable than before. I have also been able to add people and IM them.</p>
<br /><a href="http://vivin.net/?p=349#comments" title="Comments on &quot;Google Talk/Google IM&quot;"><img src="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?349" alt="Comments" /></a><img src="http://vivin.net/?ak_action=api_record_view&#38;id=349&#38;type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://vivin.net/2005/08/23/google-talkgoogle-im/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:thumbnail url="http://vivin.net/php/image.php?source=/home/vivin/www/pub/gtalk/manage.jpg&#38;type=jpg&#38;height=0.25&#38;width=0.25" />
		<media:content url="http://vivin.net/php/image.php?source=/home/vivin/www/pub/gtalk/manage.jpg&#38;type=jpg&#38;height=0.25&#38;width=0.25" medium="image">
			<media:title type="html">Manage Connections</media:title>
		</media:content>
		<media:content url="http://vivin.net/php/image.php?source=/home/vivin/www/pub/gtalk/preferences.jpg&#38;type=jpg&#38;height=0.25&#38;width=0.25" medium="image">
			<media:title type="html">Preferences</media:title>
		</media:content>
		<media:content url="http://vivin.net/php/image.php?source=/home/vivin/www/pub/gtalk/status.jpg&#38;type=jpg&#38;height=0.25&#38;width=0.25" medium="image">
			<media:title type="html">Status Window</media:title>
		</media:content>
		<media:content url="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?349" medium="image">
			<media:title type="html">Comments</media:title>
		</media:content>
		<media:content url="http://vivin.net/?ak_action=api_record_view&#38;id=349&#38;type=feed" medium="image" />
	</item>
		<item>
		<title>Firefox hits 50 million downloads!</title>
		<link>http://vivin.net/2005/04/29/firefox-hits-50-million-downloads/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://vivin.net/2005/04/29/firefox-hits-50-million-downloads/#comments</comments>
		<pubDate>Fri, 29 Apr 2005 17:12:04 +0000</pubDate>
		<dc:creator>vivin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Nerdy Stuff]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[browser wars]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://vivin.net/?p=318</guid>
		<description><![CDATA[Firefox, the Open Source browser has hit 50 million downloads! Absolutely amazing! I remember when I used to use Internet Explorer because I didn&#8217;t think there were any good browsers out there. I also remember when I even flamed Mozilla (I knew this would bite me in the ass later), but that was because this [...]]]></description>
			<content:encoded><![CDATA[<p><a target = "_blank" href = "http://www.mozilla.org/products/firefox/">Firefox</a>, the Open Source browser has hit <a target = "_blank" href = "http://www.spreadfirefox.com/fifty.html">50 million downloads</a>! Absolutely amazing!</p>
<p>I remember when I used to use <a target = "_blank" href = "http://www.microsoft.com/windows/ie/default.mspx">Internet Explorer</a> because I didn&#8217;t think there were any good browsers out there. I also remember when I even <a target = "_blank" href = "http://www.vivin.net/?redir=http://www.vivin.net/php/journal.php?action=get_journal_entries&amp;day=18&amp;month=9&amp;year=2002 ">flamed Mozilla</a> (I knew this would bite me in the ass later), but that was because this guy I didn&#8217;t like, who I used to work with, used it and it was kinda like a &#8220;guilty by association&#8221; thing. But anyway, this right here, is really noteworthy. I don&#8217;t think any other Open Source project has even grabbed the attention of your every day computer user as much as Firefox has.</p>
<p>Ever since I downloaded Firefox I&#8217;ve had a markedly better browsing experience. No pop-ups, no browser hijacks, and <em>tabbed browsing</em>! I don&#8217;t even know how I got along without it! Firefox wins hands down over IE with its simplicity, speed, functionality and inuitive browsing experience. Why don&#8217;t you Open Source critics take a look at this? If they think Open Source can&#8217;t produce anything worthwhile, they should take a look at this. <strong>This</strong> is what Open Source can achieve. Firefox is well on its way to being a household name.</p>
<p>Congratulations to the Firefox team! Also, if you don&#8217;t have Firefox, <a target = "_blank" href = "http://download.mozilla.org/?product=firefox-1.0.3&amp;os=win&amp;lang=en-US">go and get it now!</a></p>
<br /><a href="http://vivin.net/?p=318#comments" title="Comments on &quot;Firefox hits 50 million downloads!&quot;"><img src="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?318" alt="Comments" /></a><img src="http://vivin.net/?ak_action=api_record_view&#38;id=318&#38;type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://vivin.net/2005/04/29/firefox-hits-50-million-downloads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?318" />
		<media:content url="http://vivin.net/wp-content/plugins/feed-comments-number/image.php?318" medium="image">
			<media:title type="html">Comments</media:title>
		</media:content>
		<media:content url="http://vivin.net/?ak_action=api_record_view&#38;id=318&#38;type=feed" medium="image" />
	</item>
	</channel>
</rss>

