<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><!-- generator="WordPress/2.8.4" --><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="0.92">
<channel>
	<title>Code Comments</title>
	<link>http://code.hammerpig.com</link>
	<description>Tips and tutorials on various programming technologies, such as Python, Linux, Java, C#, and R. Please leave a comment!</description>
	<lastBuildDate>Fri, 04 Dec 2009 18:28:53 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/CodeComments" type="application/rss+xml" /><feedburner:emailServiceId>CodeComments</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Graph of pch Plotting Symbols in R</title>
		<description>In R, you can plot a variety of symbols when you are plotting points on a graph. The default is a hollow circle. But it is very flexible. To do this, you use the pch parameter when you create a plot. You can find information in the help files (?pch), but it only describes the
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/c1D5sFmluG5pzLVSYiL0VgRUUnY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/c1D5sFmluG5pzLVSYiL0VgRUUnY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/c1D5sFmluG5pzLVSYiL0VgRUUnY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/c1D5sFmluG5pzLVSYiL0VgRUUnY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeComments/~4/8UnnQBUxUpQ" height="1" width="1"/&gt;</description>
		<link>http://feedproxy.google.com/~r/CodeComments/~3/8UnnQBUxUpQ/graph-pch-plotting-symbols.html</link>
			<feedburner:origLink>http://code.hammerpig.com/graph-pch-plotting-symbols.html</feedburner:origLink></item>
	<item>
		<title>Get File Name from File Path in Python</title>
		<description>Let&amp;#8217;s say you did a search for files matching a certain pattern in a directory using Python:

import glob
&amp;#160;
filePaths = glob.glob&amp;#40;&amp;#34;C:\\Temp\\*.txt&amp;#34;&amp;#41;
print filePaths

This will list the full file paths with a .txt extension in the C:\Temp directory. For example: C:\\Temp\\test.txt.
But if you wanted to get just the file name, how would you go about that? It took
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/gRg4lv0--RQejuYqEPgEmjaJDac/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gRg4lv0--RQejuYqEPgEmjaJDac/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/gRg4lv0--RQejuYqEPgEmjaJDac/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gRg4lv0--RQejuYqEPgEmjaJDac/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeComments/~4/2oYpwT-IC8k" height="1" width="1"/&gt;</description>
		<link>http://feedproxy.google.com/~r/CodeComments/~3/2oYpwT-IC8k/file-file-path-python-2.html</link>
			<feedburner:origLink>http://code.hammerpig.com/file-file-path-python-2.html</feedburner:origLink></item>
	<item>
		<title>How to Find Interquartile Range in Java</title>
		<description>In this post, I explained how to find quartiles in a list of numbers. As a slight add-on to that functionality, you can easily get the interquartile range. This basically means that you are finding the difference between the first and third quartiles.
So I use the code to compute the quartiles and then use simple
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/e7GabwehTA74ZcxBT5kpHLkqZvc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/e7GabwehTA74ZcxBT5kpHLkqZvc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/e7GabwehTA74ZcxBT5kpHLkqZvc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/e7GabwehTA74ZcxBT5kpHLkqZvc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeComments/~4/lb9b4nxju7k" height="1" width="1"/&gt;</description>
		<link>http://feedproxy.google.com/~r/CodeComments/~3/lb9b4nxju7k/find-interquartile-range-java.html</link>
			<feedburner:origLink>http://code.hammerpig.com/find-interquartile-range-java.html</feedburner:origLink></item>
	<item>
		<title>How to Get Quartiles in Java</title>
		<description>For a brief overview of what quartiles are, you might read the Wikipedia page on this topic.
Basically, what it means is that if you were to break a list of numbers into four even parts, these would be the values that would separate them. But it gets a little complicated when your list doesn&amp;#8217;t break
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/1j0FM83UZ97domjGPBN068GYG20/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1j0FM83UZ97domjGPBN068GYG20/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/1j0FM83UZ97domjGPBN068GYG20/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1j0FM83UZ97domjGPBN068GYG20/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeComments/~4/JQVPSE8ZvJc" height="1" width="1"/&gt;</description>
		<link>http://feedproxy.google.com/~r/CodeComments/~3/JQVPSE8ZvJc/quartiles-java.html</link>
			<feedburner:origLink>http://code.hammerpig.com/quartiles-java.html</feedburner:origLink></item>
	<item>
		<title>Java: Is an Integer an Odd Number?</title>
		<description>This is a pretty simple tip, but I still thought I would share it for anyone who is interested. To find out whether an integer is odd, you can use the modulo operator. This operator tells you the remainder after dividing the number by some other number. If you divide any integer by 2, you
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/eHUG53hz11N4EZ-BGDbapk-5Mng/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eHUG53hz11N4EZ-BGDbapk-5Mng/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/eHUG53hz11N4EZ-BGDbapk-5Mng/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eHUG53hz11N4EZ-BGDbapk-5Mng/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeComments/~4/LTd8zd4F9cw" height="1" width="1"/&gt;</description>
		<link>http://feedproxy.google.com/~r/CodeComments/~3/LTd8zd4F9cw/java-integer-odd-number.html</link>
			<feedburner:origLink>http://code.hammerpig.com/java-integer-odd-number.html</feedburner:origLink></item>
	<item>
		<title>Research on Effectiveness of Software Development Practices</title>
		<description>I came across an interesting summary of research that was performed at Microsoft regarding the effectiveness of commonly used software development practices, including test-driven development, code coverage, small teams, etc. It was interesting that the researchers tried to quantify how well these practices work, rather than rely on what supposed &amp;#8220;experts&amp;#8221; say. See the summary,
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Bh01pIdIOK1hKjvfvlKn6j5hKLI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Bh01pIdIOK1hKjvfvlKn6j5hKLI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Bh01pIdIOK1hKjvfvlKn6j5hKLI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Bh01pIdIOK1hKjvfvlKn6j5hKLI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeComments/~4/L__KT2OOeFo" height="1" width="1"/&gt;</description>
		<link>http://feedproxy.google.com/~r/CodeComments/~3/L__KT2OOeFo/research-effectiveness-software-development-practices.html</link>
			<feedburner:origLink>http://code.hammerpig.com/research-effectiveness-software-development-practices.html</feedburner:origLink></item>
	<item>
		<title>Troubleshooting Cygwin Error: “ssh command not found”</title>
		<description>Cygwin is a software tool that allows you to run Linux programs in Windows. I have had good success in using it to run commands locally and to connect to other servers via ssh, scp, etc. I just got a new computer and installed the latest version of Cygwin, but when I tried to ssh
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ze3kbVJCREXSt1e3XitPX5snGu4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ze3kbVJCREXSt1e3XitPX5snGu4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ze3kbVJCREXSt1e3XitPX5snGu4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ze3kbVJCREXSt1e3XitPX5snGu4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeComments/~4/sZ3hi_q5x8w" height="1" width="1"/&gt;</description>
		<link>http://feedproxy.google.com/~r/CodeComments/~3/sZ3hi_q5x8w/troubleshooting-cygwin-error-ssh-command.html</link>
			<feedburner:origLink>http://code.hammerpig.com/troubleshooting-cygwin-error-ssh-command.html</feedburner:origLink></item>
	<item>
		<title>In Java, Use StringBuilder When Constructing Large Strings</title>
		<description>This bit of advice is not new to me nor to the software development community. But recently I had one of those experiences where I put together a quick solution (to keep my code as simple as possible), and later I ran into a performance problem. And it was because I was violating this principle.
I
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xmzTdBIFfGg_xQBzXoQTZJxOHsU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xmzTdBIFfGg_xQBzXoQTZJxOHsU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/xmzTdBIFfGg_xQBzXoQTZJxOHsU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xmzTdBIFfGg_xQBzXoQTZJxOHsU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeComments/~4/lv8tWUE14lg" height="1" width="1"/&gt;</description>
		<link>http://feedproxy.google.com/~r/CodeComments/~3/lv8tWUE14lg/java-stringbuilder-constructing-large-strings.html</link>
			<feedburner:origLink>http://code.hammerpig.com/java-stringbuilder-constructing-large-strings.html</feedburner:origLink></item>
	<item>
		<title>Read Contents of Text File Into a Variable in a Bash Script</title>
		<description>I&amp;#8217;m learning something new about Linux every day, so this is something that will probably be obvious to many of you out there. But I needed today to read the contents of a file into a variable in a bash script. The simple way to go about doing this is to use the following command:

myvar=`cat
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6KFR1OB044TbCa65zzyKLjsMbvI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6KFR1OB044TbCa65zzyKLjsMbvI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6KFR1OB044TbCa65zzyKLjsMbvI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6KFR1OB044TbCa65zzyKLjsMbvI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeComments/~4/Ito9B1HZ3_Q" height="1" width="1"/&gt;</description>
		<link>http://feedproxy.google.com/~r/CodeComments/~3/Ito9B1HZ3_Q/read-contents-text-file-variable-bash-script.html</link>
			<feedburner:origLink>http://code.hammerpig.com/read-contents-text-file-variable-bash-script.html</feedburner:origLink></item>
	<item>
		<title>How Training and Testing Works in Data Mining / Machine Learning</title>
		<description>Imagine you wanted to come up with a &amp;#8220;classifier&amp;#8221; to predict whether Georgia would win a given American football game. So you might get (training) data from all their games from the previous two years. Then you might come up with rules based on that data. For example, if the quarterback throws for 300+ yards,
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/qnMiNqGc_1NbnjwpWI39nTyrG5A/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qnMiNqGc_1NbnjwpWI39nTyrG5A/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/qnMiNqGc_1NbnjwpWI39nTyrG5A/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qnMiNqGc_1NbnjwpWI39nTyrG5A/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeComments/~4/CtnFRa-a3Vk" height="1" width="1"/&gt;</description>
		<link>http://feedproxy.google.com/~r/CodeComments/~3/CtnFRa-a3Vk/training-testing-works-data-mining-machine-learning.html</link>
			<feedburner:origLink>http://code.hammerpig.com/training-testing-works-data-mining-machine-learning.html</feedburner:origLink></item>
</channel>
</rss>
