Author Archives: Steve Rives

The Halving Algorithm and the Guessing Game for the TI-83/TI-84

The first task for each student is to write a program where the computer thinks of a number, and the student gets to guess the number (and the program says if the guess is too high, too low, or just … Continue reading

Posted in Ti-83 | Leave a comment

Crypt Program

In my last post, I talked about an encryption scheme to add to a Twitter custom app. That’s great if you can write a custom app. If not, here is an EXE program that uses those functions. For the source … Continue reading

Posted in .NET | Leave a comment

Encrypting My Thoughts by Encrypting Twitter Messages

Twitter has become a kind of extension to my brain. And now, like a brain, my Twitter messages are only accessible to me. But it didn’t start this way. In the beginning, what I wrote on Twitter was a simple … Continue reading

Posted in Programming | Leave a comment

Remote copy a file across an intranet that times-out

If you have an intranet that times out part way through file copies, this program may be of use to you. This program keeps track of where it was in a file copy and will pick up where it left … Continue reading

Posted in Uncategorized | Leave a comment

Chris Keck, d. March 22, 2012

KANSAS CITY, Kan. – A wrong-way crash killed one man during morning rush hour in Kansas City, Kan. The Kansas Highway Patrol identified the victim as Christopher T. Keck, 45, of Gardner, Kan. The crash occurred about 8:45 a.m. in … Continue reading

Posted in Philosophy | Leave a comment

Don’t be an Anode. Protect your Cathode.

A good rule of thumb if you are a pipe, “Don’t be an anode when you can be the cathode.” Three useful articles on Cathodic Protection: http://www.npl.co.uk/upload/pdf/cathodic_protection.pdf http://www.sescocp.com/tutorial.php http://www.corrosionsource.com/%28S%28cylzjm45pkvkle45ywzhvn55%29%29/FreeContent/1/Cathodic+Protection

Posted in Uncategorized | 1 Comment

How to deploy a new MVC 4 or MVC 5 app to and older IIS 6 server

You can install newer MVC apps on an older Windows 2003 server (it can be done very easily). You must simply configure your Web.Config with a few settings (as shown below) and you may need to go into the Windows … Continue reading

Posted in .NET | Leave a comment

Programming by existence

If something is there, it has existence. In C# this makes all the difference. I realized this morning that I don’t wire-up relationships, but the C# MVC system works on the basis of mere existence. If a filename with a … Continue reading

Posted in .NET, Programming | Leave a comment

VS 2010 Intellisense for JQuery in C# Razor (cshtml) Files not working

If you know what the title of this blog means, then you are looking for this: @if (false) {<script type=”text/javascript” src=”../../Scripts/jquery-1.6.2-vsdoc.js”></script>} Put this before your jquery include.

Posted in .NET | Leave a comment

Edit .CMD files with Visual Studio Editor

Do you use Visual Studio to edit Windows batch files? Do you want these .bat or .cmd files to show up with all the colors you see in your C# files? If this is what you seek, then let me … Continue reading

Posted in Uncategorized | Leave a comment

Write a Windows Console Application in C# that uses Twitter (and do it in 30 minutes or less)

I decided to write a program called “microSpeak140″ that would be a Windows command-line tool to let me post Twitter updates. The reason for such a seemingly useless tool comes from an idea I had about subscription-based communication to unmanned … Continue reading

Posted in .NET, Programming | 1 Comment

The sum of consecutive cubes is a square

Summing up some cubes I noticed that 13 + 23 + 33 + 43 = 100, which is 102. And the pattern held as I added more cubes (i.e., I kept getting squares). This is well known in the world … Continue reading

Posted in Math | Leave a comment

Free Sequence Diagram PNG and PDF Generator

I want to share a link quite useful for explaining the sequence of events. In the technology world, there is a thing called a sequence diagram. A sequence diagram is useful for showing messages that pass back and forth between … Continue reading

Posted in Programming | Leave a comment

Customize the front page of a WordPress blog to merely list your articles

In my WordPress 3.x blog, I use the default theme, and now I want the main page to be a list of all my articles — nothing more, and nothing fancy. I don’t want any of the articles to have … Continue reading

Posted in Wordpress | Leave a comment

Pipe Stdin to a C# program and filter out data

I need a program that will filter command line input, and strip out CR+LF from any line that has a certain text. Solution (in C#): http://www.mrrives.com/Programming/Filter/Filter.cs And the EXE file: http://www.mrrives.com/Programming/Filter/Filter.exe Here is the code (simple): using System; using System.Collections.Generic; … Continue reading

Posted in .NET, Programming | Leave a comment

Part 1: Building an ActiveX Control in C# (with CAB file via CabArc)

I will show you how to write MyActiveX.cs, turn it into a DLL, place it on an HTML page and distribute it with a CAB file. But I will start in reverse order. I will start with the HTML code … Continue reading

Posted in .NET, Programming | 17 Comments

Generate an HTML Data Dictionary for your Microsoft Database

If you want to auto-generate an HTML Data Dictionary for your Microsoft SQL database, here is a free and simple tool to do it. It is a Windows command line script. Just drop down to a command window, and run … Continue reading

Posted in Programming | Leave a comment

WordPress Tips

Shortcodes are square bracket tags you can insert into your wordpress blog. http://en.support.wordpress.com/shortcodes/

Posted in Wordpress | Leave a comment

Create a .NET 4 MVC 3 Web Site or Migrate MVC 2 to 3

In earlier posts, I explained the move from Silverlight 3 to 4. Now I want to explain the move from MVC 2 to 3. You need to upgrade, as one day we may well be on MVC 13, and you … Continue reading

Posted in Programming | 3 Comments

Pell’s equation (from 2 to 308)

Pell’s equation is a Diophantine equation stated this way: (c)a2 + 1 = b2 The trick is to find answers on the integers (where a, b and c are all integers which satisfy the equation). I will call these Pell’s … Continue reading

Posted in Math, Number Theory | Leave a comment

Pell’s equation (from 3 to 80)

Find integers, a,b,b, such that (a)b2 + 1 = c2, and find the non-trivial (i.e., large) answers: ( 3) 1095525752 + 1 = 1897506262 ( 6) 18441601002 + 1 = 2222839532 ( 7) 7865546882 + 1 = 20810280972 ( 8) … Continue reading

Posted in Math, Number Theory | Leave a comment

Part 3 of 3: Speed Comparison of C# BigInteger and C++ mpir

Jan, 2012 Update: With properly coded C#, C++ (in certain cases) is only 2.37x faster (for more, see Patrick’s comment below). In Part 2 we looked at a C# program that does a little bit of large integer math (using … Continue reading

Posted in Big Numbers, Math, Programming | 3 Comments

Part 2 of 3: Speed Comparison of C# BigInteger and C++ mpir

In Part 1 I discussed how to use Visual Studio C++ with MPIR and how to use BigInteger and BigRational in C#. Now I want to compare the speed between the two number packages. We may instinctively suspect that C++ … Continue reading

Posted in Big Numbers, Math, Programming | Leave a comment

Part 1 of 3: Doing Large Integer Math with Visual Studio 2010 in C# or C++

If you want to work on Number Theory problems, or Diophatine Equations, you need a math package that allows you to use large integers (MATLAB, e.g.). Optionally, you need to encode your ideas as programs and test your theories the … Continue reading

Posted in Math, Programming | Leave a comment

My Diophante-Quest: Fermat’s Last Theorem and Integer Math

I originally started this site for my exploration of this subject. My first articles were on the subject of Diophantine equations, and a report on some software I had written in my quest. But then the site got deleted (my … Continue reading

Posted in Math | Leave a comment

Difference of squares and cubes and anything else

Following on my last installment, I got to thinking about the difference of squares. First I noticed the relation: a2 = (a-1)(a+1) + 1. Which is not far off (a-1)(a+1) which is a2 -1 written as the difference of squares. … Continue reading

Posted in Math | Leave a comment

Exponent Math

The sum of the first n number is n * (n + 1 ) / 2 — which is half the area of a square plus half the diagonal added back in. I first noticed the relationship to a square … Continue reading

Posted in Math | Leave a comment

Mobile Phone Apps

Click to enlarge. Source: Flowtown

Posted in Programming | Leave a comment

Create XML from Excel

When working with MS-SketchFlow, you may want to use their Sketch Datagrid. And with version 4 of Expression Blend, you can associate that grid with an XML source. If your data is in a table format, put it in Excel, … Continue reading

Posted in Programming | 1 Comment

Build a dynamic newspaper site, quickly and free

A local paper needed a web site. After two calls to set up a face-to-face meeting (and we met today for just one hour), I got all the business requirements. The same day they had their site: The Louisburg Journal. … Continue reading

Posted in Programming, Wordpress | Leave a comment

What is Capitalism Anyway?

Some people use the word ‘Capitalism’ so easily, that I wonder, Do we even have a good working definition? The reason I ask is because I have a good many friends who are sincerely suspicious of the idea (often pointing … Continue reading

Posted in Economic Philosophy | Leave a comment

Supreme Court narrowly rules that the Bill of Rights governs States

Does the right to bear arms amendment restrict Federal authority only, or does it also restrict States? One State argued that the 2nd amendment does not trump their local laws — the right to bear arms clause limits the Federal … Continue reading

Posted in Philosophy | Leave a comment

Use a 6-sided dice as a 4-sided or 5-sided dice

In my previous posts on this subject, I have show how to use a 6-sided dice to create a 2-sided, a 3-sided, an 8-sided or even create a 12-sided dice. Today I will show how to use a 6-sided dice … Continue reading

Posted in Brain, Dice, Fun, Game | 1 Comment

Your spine wasn’t meant to stay for long periods in a seated position

When did humans start sitting down for 9 hours a day to work? For thousands of years humans were hunters, gathers, farmers, carpenters, and so forth. Then the industrial age hit, and then the advanced computer technology era came, and … Continue reading

Posted in Ergonomics | 1 Comment

Axis and Allies Ti-83 Program

I bought the Axis and Allies starter kit (the exact one shown here). I wanted to play with my younger kids, but I found that the dice rolling was too time consuming and cumbersome. So I wrote a Ti-83 / … Continue reading

Posted in Game, Ti-83 | Leave a comment

Ti-84 Risk Game

I have some friends who play RISK regularly enough that they decided to write a C# program that speeds up the game for dice rolling. Just enter the number attacking and the number defending, and the laptop tells you who … Continue reading

Posted in Game, Programming, Ti-83 | Leave a comment

SQL Express Server 2008 and the Upgrade to Silverlight 4 RIA

In the past two articles, I explained deployment of a 2010 RIA application and my upgrade from Silverlight 3, VS 2008 to Silverlight 4 on VS 2010. Here is a gotcha: When you upgrade to VS 2010, you also get … Continue reading

Posted in Programming, Silverlight | Leave a comment

Convert Silverlight 3 (VS 2008) to Silverlight 4 (VS 2010) – RIA

This is my conversion experience. I hope it is of some assistance to you — and, I must say, the link to the DOCx file is essential for your efforts. Scenario: I have a Silverlight 3 RIA application built with … Continue reading

Posted in Silverlight | Leave a comment

Siliverlight 4 .NET 4 RIA Deploy

Install Visual Studio 2010 and the Silverlight 4 Tool RC2. Create a new project (Silverlight Business Application). Build the application. Buy space on an ASP.NET 4 enabled IIS7 server (I used two providers, and it was only through Discount ASP.NET … Continue reading

Posted in Silverlight | 1 Comment

DOS Batch Program to Parse Strings

A friend asked me to write a script that will tell how much space is used in a directory. Using the Microsoft CMD script (the batch program) the answer follows. This cmd script demonstrates three important ideas: 1) Recursive function … Continue reading

Posted in Programming | Leave a comment

Robot Wars

I have not played Robot Rally, but it looks fantastic. Each player programs a robot each turn, then all the robots execute the instructions at the same time. I was at the game store and the price of Robot Alley … Continue reading

Posted in Fun, Game | Leave a comment

Use a 6-sided dice as either a 2, 3, 4, 5, 6, 8 or 12-sided dice

Turn a 6-sided dice into an 8-sided dice Yesterday I gave a way to roll a 6-sided dice one time and generate a random number from 1 to 8. Today I will tell you how to roll a 6-sided dice … Continue reading

Posted in Brain, Dice, Fun, Game, Math | 4 Comments

How to roll a 6-sided dice once and generate a number from 1 to 8

One roll of a six-sided die can be used to generate any number from 1 to 6 (with an equal chance for each of the six). Likewise, I found a way to randomly generate any number from 1 to 8 … Continue reading

Posted in Brain, Fun, Game, Math | 1 Comment

2 + 2 = 4? I don’t think so!

Math has not yielded assured results of reality. Mathematics is a relative venture. There is not absolute truth in our use of the language of math (which we invented). Mathematics is nothing more than an invented language used to describe … Continue reading

Posted in Math, Philosophy | 6 Comments

Playing Cards without a Deck of Cards

This is Part I of my Head Games system of card playing. It is a system for card games using a standard deck of cards, yet played without an actual deck.  I am developing the system, and decided to present … Continue reading

Posted in Brain, Game | 1 Comment

11 Ways to Make Your Brain Stronger

Our brains can be exercised and can improve through the right methods. We can change how we think, and we can improve our capacity to remember.  And there are definite techniques that can help. There are secrets you can learn … Continue reading

Posted in Brain, Increase Your Memory | Tagged | 3 Comments

Marxism, Part III: Flash Video Presentation

One of my professors, Dr. Freddy Cardoza, led part of a PhD colloquium where we discussed Marxism and the writings of a neo-Marxist, Stephen Brookfield.  I have been quite impacted by Dr. Cardoza’s assignments. He facilitated the synthesis of various … Continue reading

Posted in Economic Philosophy, Marxism, Philosophy | 3 Comments

Posted in Philosophy | Leave a comment

Connections between Thought Realms

Computers can be programed to sift unstructured texts in order to find connections.  If you want to connect two realms of thought, you need data from both realms. You should also have a theory on how to connect the realms. … Continue reading

Posted in Connecctionism, Programming | Leave a comment

The 10 Points of Marxism (Marxism: Part II)

Read Part III. Read Part I. Karl Marx and Friedrich Engels wrote a short work called The Communist Manifesto. It is a manual for Marxism. About half way through, there is a 10 point summary. I list those ten points … Continue reading

Posted in Economic Philosophy, Marxism | 15 Comments

All the gold in the world is not that much gold

“In all of history, only 161,000 tons of gold have been mined”, National Geographic, Jan 2009 (52). At $950 an ounce, that puts the total value of all the gold in the world at a little less than $5 trillion … Continue reading

Posted in Connecctionism | Tagged | 2 Comments

The Day the Universe Changed

When change happens — change that we adopt as a culture — it updates the features of our society. In fact, change itself is part of what defines us. New features become part of our lives and then refocus our … Continue reading

Posted in Brain, Connecctionism | Leave a comment

Cousin Shellie

This is my excellent cousin Shellie. Check out her feet. It’s the flip-flops that say, “Play time is over.”

Posted in Fun | 1 Comment

The U. S. Government is in my code with their “Interim Final” rule

My college professors did not prepare me for this hurdle: The U.S. Government. Well, it’s not a hurdle, I am overstating the matter. But let me elaborate.

Posted in OpenSSL | Tagged , | Leave a comment

Is God a Mathematician?

Mario Livio may have written the book I wanted to write (if I had the ability and knowledge — which I do not), Is God a Mathematician? I have come at the subject as a student of math, a student … Continue reading

Posted in Math | Leave a comment

No more books. Stop it.

The point may soon come when there are more people who want to write books than there are people who want to read them. – Motoko Rich, Bright Passage in Publishing: Authors Who Pay Their Way, The New York Times, … Continue reading

Posted in Communication, Fun | Tagged | 1 Comment

A Free OpenSSL Visual C++ Object: Part 2

This is Part 2 in a series about integrating OpenSSL into an existing C++ project.  In Part 1 I presented a scenario that would necessitate such integration and I outlined the contours of the problem.   In essence, the goal of … Continue reading

Posted in OpenSSL, Programming | Tagged , | 6 Comments

A song for kids. A song for school.

A couple of renditions of I can tell that we are going to be friends. I put these up on the Geneva Academy web site.

Posted in Fun | Tagged | Leave a comment

Adding OpenSSL to an existing Visual C++ Socket Program in C++

Your boss comes into your office and says she wants to support encrypted communications over your HTTP server. She wants your company web site to use HTTPS instead of HTTP. Among other things, they need to handle credit card transactions … Continue reading

Posted in OpenSSL, Programming | Tagged , , , , , | 2 Comments

Philosophy of the Blog

The Internet is media, and the blog is a genre. When we use a blog or a web site to communicate short messages related to ourselves or our studies (as I do here), then we are participating in a kind … Continue reading

Posted in Communication | Tagged , | 1 Comment

A Critique of “Developing Critical Thinkers” (Marxism: Part I)

Read Part II Read Part III All of my books get some kind of reaction from me. Really bad ones can even get me to write a blog post. Today’s offending book is: Developing Critical Thinkers, by Stephen Brookfield. The … Continue reading

Posted in Marxism | Tagged , | 1 Comment

Does this look familiar?

Post a comment if you recognize this image.

Posted in Anime | 2 Comments