Author Archives: srives

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

WordPress Tips

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

Posted in Wordpress | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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

In Part 2 we looked at a C# program that does a little bit of large integer math (using BigInteger). The program was built in release mode, and it gave us its answer in about 55 seconds. Now it is … Continue reading

Posted in Big Numbers, Math, Programming | Comments Off

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 | Comments Off

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 | Comments Off

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

My daughter’s middle name is Diophante (being the feminine form of Diophontus). I named her after the father of algebra, and more particularly, after a certain class of mathematical problems having to do with integer based polynomials (Diophantine Equations). My … Continue reading

Posted in Math | Comments Off

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 | Comments Off

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 | Comments Off

Mobile Phone Apps

Click to enlarge. Source: Flowtown

Posted in Programming | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

Posted in Philosophy | Comments Off

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 | Comments Off

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. It does not take long to read, and about halfway through, there is a 10 … Continue reading

Posted in Economic Philosophy, Marxism | Comments Off

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 | Comments Off

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 | Comments Off

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 | Comments Off

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 , | Comments Off

Is God a Mathematician?

Mario Livio may have written the book I wanted to write, Is God a Mathematician?. I have lectured on this subject multiple times — primarily at the National Association of University Model Schools (NAUMS). It is even one of the … Continue reading

Posted in Math | Comments Off

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 | Comments Off

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 , | Comments Off

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 | Comments Off

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 , , , , , | Comments Off

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 , | Comments Off

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 , | Comments Off

Does this look familiar?

Post a comment if you recognize this image.

Posted in Anime | Comments Off