<?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/"
	>

<channel>
	<title>Grandpa Lake's Weblog &#187; Computers</title>
	<atom:link href="http://www.lakeinfoworks.com/blog/category/computers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lakeinfoworks.com/blog</link>
	<description>Memories, Opinions, Ideas and Some computer code</description>
	<lastBuildDate>Thu, 11 Mar 2010 07:40:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Warning &#8212; Spiritual and Computer</title>
		<link>http://www.lakeinfoworks.com/blog/computers/warning-spiritual-and-computer/</link>
		<comments>http://www.lakeinfoworks.com/blog/computers/warning-spiritual-and-computer/#comments</comments>
		<pubDate>Sun, 13 Jan 2008 11:48:03 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Faith]]></category>

		<guid isPermaLink="false">http://www.lakeinfoworks.com/blog/computers/warning-spiritual-and-computer/</guid>
		<description><![CDATA[I have become aware of a threat to computers that is difficult to explain to most people. As I wrote an email to my personal contacts trying to explain enough so that they might take some preventative action, I realized that there is a spiritual parallel to computer security problems. I am going to describe [...]]]></description>
			<content:encoded><![CDATA[<p>I have become aware of a threat to computers that is difficult to explain to most people.  As I wrote an email to my personal contacts trying to explain enough so that they might take some preventative action, I realized that there is a spiritual parallel to computer security problems.  I am going to describe the spiritual problem first, then the computer security threat.  There is something you can do about each.</p>
<p><span id="more-139"></span>There are commands given to us in Scripture that we often don&#8217;t understand.  Our usual response is to ignore these commands.  I&#8217;ll give three examples.</p>
<p>The ancient Jews were given religious dietary laws that some Jews still try to live by.  One of these laws prohibited certain kinds of meat, one of which is pork.  It would have been useless to try to explain things like trichinosis to a primitive people.  It&#8217;s probably useless to try to explain it to most people now.  But, if one obeys the religious law, one won&#8217;t get the disease.  Because we now know that we can avoid trichinosis by cooking pork well, we assume that it is OK to eat it.  Are there things in religiously forbidden food (that includes catfish and shellfish) that we don&#8217;t know about that could hurt us?  Possibly.</p>
<p>Jesus, in the Lord&#8217;s Prayer or the Our Father (whichever you prefer to call it) bade us pray &#8220;Forgive us our trespasses as we forgive those who trespass against us.&#8221;  He followed up this prayer by telling His disciples, &#8220;For if you forgive men their trespasses, your heavenly Father will also forgive you.  But if you do not forgive men their trespasses, neither will your Father forgive your trespasses.&#8221;  This is in the sixth chapter of St. Matthew.  Notice that this command does not refer to the worthiness of the other person to be forgiven.  Neither does it refer to your feelings toward the other person.  It&#8217;s between you and God.  You may be forgiven by God only if you forgive other people.  Period.  We don&#8217;t understand the unconditional nature of forgiveness.  We assume that we can&#8217;t do what God commands because our feelings don&#8217;t immediately line up with the command or because we reason that the person that we&#8217;re commanded to forgive doesn&#8217;t deserve it.  (Implicit in this reasoning is that we do deserve God&#8217;s forgiveness.  Wrong!!)  We think that God won&#8217;t hold us accountable for obeying this command because we assume that He is being unreasonable.  So we reason it away and ignore it.</p>
<p>The third example really gets into unknown territory for me.  Women are told to be quiet in the church.  (I Corinthians 14:34)  St. Paul, in I Timothy 2:11-15 come up with the most weird reasons for making this demand.  First is that Adam was formed before Eve was.  The second is that, in the fall, Eve was deceived into thinking that she was doing right when she sinned.  Therefore, she &#8220;fell into transgression&#8221;.  What have either of these things to do with women speaking in churches?  Don&#8217;t ask me.  I haven&#8217;t a clue.  I&#8217;ve read commentaries that give reasons why we need not observe these rules in the modern church, even among those who say they believe that the Bible is (not <em>contains</em>) the Word of God.  I live among a people whose principal church (85% of the population) had a pastor arrested because he believed this Scripture and refused to serve in the same service with a female priest.  Most churches today consider this command to be unreasonable, so they ignore it.</p>
<p>My point is that we humans tend to ignore what we don&#8217;t understand or consider to be unreasonable.  In the Garden of Eden, God told Adam and Eve, &#8220;for in the day that you eat of it, you shall surely die.&#8221;  That old serpent, Satan, told Eve, &#8220;You shall not surely die.&#8221;  It was unreasonable to believe that eating a piece of fruit could cause death.  There are many people who will spend an eternity in Hell because they think that repenting and believing in the finished work of our Lord Jesus as payment for our sins is unreasonable.</p>
<p>The computer threat is called a &#8220;rootkit&#8221;.  I&#8217;ll explain how it works later, but I want to point out that it is like the sin nature in a human being.  Even as our sin nature makes us susceptible to the moral virus of temptation, so the rootkit downloads and installs viruses.  We Christians must die before our sin nature &#8220;rootkit&#8221; is removed from us.  A computer must be turned off (dead) to remove a rootkit.</p>
<p>This kind of thinking continues into the way we use our computers.  We don&#8217;t understand certain warnings or we believe that some one else, such as Microsoft or the writers of our anti-virus software, are responsible for our computer security.  We don&#8217;t understand, so we ignore the warnings.  I am going to explain just one threat and give a couple of easy things that a person can do to reduce the threat of having his bank account open to hackers.  It will start out with a very basic explanation and solution.  Then I&#8217;ll explain my reasons in more detail.</p>
<p>If what I write goes over your head technically, please find someone who can help you.  I am not a security expert, but sometimes the security experts can lose us with the amount of knowledge that they have and try to share.</p>
<p>This warning is especially for those of you in Europe and more especially if you use Internet Explorer (IE) as your web browser.</p>
<p>This warning comes from web sites that I&#8217;ve seen that talk about rootkit malware that is being used to get access to bank accounts.  If you do not now have a rootkit, you may protect yourself by doing two things.  Stop using IE.  In addition, use a router.  These two actions reduce your vulnerability considerably, but does not eliminate it.</p>
<p>How do you know if you have a rootkit?  Windows users can Google with &#8220;windows rootkit&#8221; to find a detector program.  (Microsoft has a free one called RootkitDetector.)  Your anti-virus software may (or may not) be able to detect a rootkit.  It cannot remove one, even if it is found, for the computer must be turned off during the process.  Linux users can freely download and install &#8220;chkrootkit&#8221;.</p>
<p>Use Firefox instead of IE.  There are a few sites that require the use of IE.  I get along fine without using them, although I once had to change banks because the bank&#8217;s web site required IE.  The reason to stop using IE is that it is a huge security hole, even with the latest versions of IE and with the use of Windows XP or Windows Vista.  The rootkit that I just read about gets installed through one of these security holes.  (There are other ways to put rootkits on computers.  This is the most commonly used, so I am told.)</p>
<p>The other recommended action, to install a router, is only recommended for those who have high-speed internet.  This is because those with high-speed internet are connected any time their computer is on.  A router does many things, but what we are interested in here is its &#8220;insulating&#8221; capability.  A router is a tiny, special purpose computer that is connected to the Internet.  Your computer is connected to the router.  A malicious hacker who is looking for computers to attack can see your router, but he can&#8217;t see your computer.  Most routers are so special purpose that a hacker couldn&#8217;t see or do anything with one that he could see.  Most modern routers have a firewall built in.  A firewall&#8217;s purpose is to keep hackers from invading your system.</p>
<p>What is a rootkit?  A rootkit is a program that is installed in the place that starts your operating system (Windows, OsX or Linux) when you turn your computer on.  While it is not technically a virus itself, it downloads viruses into your computer, so that even if your virus protection software removes the virus, the rootkit will install the virus again.</p>
<p>Why do I warn Europeans more than others?  There is a site in Russia that sends out rootkits and viruses that are aimed at Europeans who access their bank accounts with their computers.  The virus sends the victim&#8217;s bank login and password to the Russian site.  They can then get into the victim&#8217;s bank account.  Some European banks change login information regularly.  This makes it more inconvenient to access an account, but if this Russian site were to somehow get  information from such a bank, they could use it for only a short time before having to start all over again.  I don&#8217;t know of any American bank that has this protection.</p>
<p>Here&#8217;s to your enjoying the use of your computer!</p>
<p>P.S.  Outlook and Outlook Express are other big security holes, but those vulnerabilities are necessary to give Windows users the ability to do things that non-Windows users can&#8217;t do, like having an email start a program automatically or to pass something on to everybody in your address book.  It&#8217;s every individual&#8217;s choice, but I can do without features like that to protect my computer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lakeinfoworks.com/blog/computers/warning-spiritual-and-computer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RoR &#8211; Import CSV file to table &#8211; dynamic</title>
		<link>http://www.lakeinfoworks.com/blog/computers/ror-import-csv-file-to-table-dynamic/</link>
		<comments>http://www.lakeinfoworks.com/blog/computers/ror-import-csv-file-to-table-dynamic/#comments</comments>
		<pubDate>Sat, 17 Nov 2007 10:50:08 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Computer programming]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[RoR]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.lakeinfoworks.com/blog/computers/ror-import-csv-file-to-table-dynamic/</guid>
		<description><![CDATA[Satish Chauhan has a Ruby on Rails site that has a very helpful article on how to import a CSV file into a table. I took his code and have extended it. I offer it now to you. My extension is to make the importation of the code dynamic, i.e. this code may be used, [...]]]></description>
			<content:encoded><![CDATA[<p>Satish Chauhan has a <a href="http://www.satishchauhan.com/articles/show_comments/10">Ruby on Rails site</a> that has a very helpful article on how to import a CSV file into a table.  I took his code and have extended it.  I offer it now to you.</p>
<p><span id="more-131"></span></p>
<p>My extension is to make the importation of the code dynamic, i.e. this code may be used, as is, to import any CSV file into any table without changing the code.  The first row of the CSV file consists of column headers.  In keeping with the <em>convention over configuration</em> principle of Rails, these column headers must be identical to the field names of the table that the data is to be imported into.  (The exception to this rule is that the column headers may be mixed case.)</p>
<p><strong>file: app/views/infolake/index.rhtml</strong></p>
<pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt; Import InfoLake Spreadsheet &lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;h1&gt;Import InfoLake Spreadsheet&lt;/h1&gt;
    &lt;% form_for :load, :url=&gt;{:controller=&gt;"infolake", :action=&gt;"csv_import"},
      :html =&gt; { :multipart =&gt; true } do |f| -%&gt;
    &lt;table&gt;
      &lt;tr&gt;
        &lt;td&gt;
          &lt;label for="load_file"&gt; Select a CSV File :&lt;/label&gt;
        &lt;/td&gt;
        &lt;td &gt;
          &lt;%= f.file_field :file -%&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td colspan='2'&gt;
          &lt;%= submit_tag 'Submit' -%&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
  &lt;% end -%&gt;
  &lt;/body&gt;
&lt;/html&gt;</code></pre>
<p><strong>file: app/views/infolake/csv_import.rhtml</strong></p>
<pre><code>
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;meta name="generator" content="HTML Tidy, see www.w3.org"&gt;
    &lt;title&gt;Spreadsheet Import Confirmation&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;h1&gt;Spreadsheet Import Confirmation&lt;/h1&gt;
    &lt;p style="color: green"&gt;&lt;%= flash[:message] %&gt;&lt;/p&gt;
  &lt;/body&gt;
&lt;/html&gt;
</code></pre>
<p><strong>file: app/views/infolake/csv_import.rhtml</strong></p>
<pre><code>class InfolakeController &lt; ApplicationController
  require 'csv'

  def index
    @load
  end

  def csv_import
    @file = CSV.open(params[:load][:file].path, 'r')
    @cols = Hash.new
    @nbr_rows = 0
    @file.each { |row|
# This code will have another iteration, so we'll use "case" instead of "if"
      case @nbr_rows
      when 0: # Store the column headers and their positions in the CSV file in a hash
        row.each_with_index { |col,i|
          unless col.nil?
            col.downcase!
            @cols[col] = i
          end
        }
        @nbr_rows += 1
      else
        import(row)
      end
    }
  end # def csv_import

  def import(row)
    @infolake = Infolake.new
    @cols.each { |col_name,col_ix|
      unless row[col_ix].nil? || row[col_ix].empty?
        eval("@infolake.#{col_name} = row[#{col_ix}]")
      end
    }
    if @infolake.save!
      @nbr_rows += 1
      GC.start if @nbr_rows % 50 == 0
    else
      identifier = "#{row[@cols['identifier']]}"
      puts "CSV record with identifier = #{identifier} was not saved."
    end
    msg = "No new records were added to the data base"
    flash.now[:message]= msg if @nbr_rows == 0
    msg = "#{@nbr_rows} new records were added to the data base"
    flash.now[:message]= msg if @nbr_rows &gt; 0
  end # def import_row
end
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.lakeinfoworks.com/blog/computers/ror-import-csv-file-to-table-dynamic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A GTK List Box in Ruby</title>
		<link>http://www.lakeinfoworks.com/blog/computers/125/</link>
		<comments>http://www.lakeinfoworks.com/blog/computers/125/#comments</comments>
		<pubDate>Tue, 09 Oct 2007 12:01:45 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[GTK]]></category>
		<category><![CDATA[ListBox]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://www.lakeinfoworks.com/blog/uncategorized/125/</guid>
		<description><![CDATA[I&#8217;m an experienced programmer, but new to Ruby and GTK. I need a list box for a project, but the Ruby/Gnome2 package doesn&#8217;t have one. So, I wrote one. This widget is documented with RDoc. Its comments reflect that it was my learning experience with writing GTK widgets. Enjoy. A GTK List Box in Ruby]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m an experienced programmer, but new to Ruby and GTK.  I need a list box for a project, but the Ruby/Gnome2 package doesn&#8217;t have one.  So, I wrote one.  This widget is documented with RDoc.  Its comments reflect that it was my learning experience with writing GTK widgets.  Enjoy.  <a href="http://www.lakeinfoworks.com/blog/wp-content/listbox.rb" title="A GTK List Box in Ruby">A GTK List Box in Ruby</a><a href="http://www.lakeinfoworks.com/blog/wp-content/listbox.rb" title="A GTK List Box in Ruby"> </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lakeinfoworks.com/blog/computers/125/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

