Archived entries for Software

Polynomial Graphing Software

This is another project that I created for school. It can be used to graph any polynomial in terms of a single variable with an integer degree. The plotter allows the user to input a polynomial, the variable the polynomial is in terms of and the range they wish to model the given polynomial over. The software also automatically graphs the first and second derivatives of the given polynomial.

Users can specify polynomials using integer operands and the operators: +, – , *, (multiple * operators for exponentiation)

For example:

(x*x)-6

x*x*x*x+4*x-4

(x-3)*(x+4)

0

4*x

-x

etc…

You can download the jar file here.

Feel free to try it out, suggest improvements and identify any bugs! Feedback can be left below.

Java BigInteger Calculator

This is a project I made for school. It is very similar to the windows calculator and supports the following operations on objects of the Java BigInteger class: addition, subtraction, multiplication, division, factorial, remainder, negation.

You can download the .jar file here.

You can leave a comment below!

Scripting Craps Odds In Java

Just thought I would show you guys a nifty little program I made in Java to simulate your odds on the dice game Craps. The main for loop of the program simulates one game, and you can adjust int i to simulate different numbers of games.  The final output shows your total wins, the total house wins and your winning percentage. As you can see, the house ALWAYS wins!


package myPackage;
import java.util.Random;

class Main{

public static void main(String args[])
{
float houseWins = 0;
float yourWins = 0;
int thisSum;

Random myRandom = new Random();

for(int i = 0; i <= 10000; i++)
{

/**
Roll two die, take their sums to establish the "come out roll"
**/

int roll1 = myRandom.nextInt(6) + 1;
int roll2 = myRandom.nextInt(6) + 1;

int comeOutRoll = roll1 + roll2;

//Automatic win
if(comeOutRoll == 7 || comeOutRoll == 11)
{
yourWins += 1;
}

//Automatic loss
else if (comeOutRoll == 2 || comeOutRoll == 3 || comeOutRoll == 12){
houseWins += 1;
}

//Play the game
else
{
boolean playing = true;

while(playing)
{
roll1 = myRandom.nextInt(6) + 1;
roll2 = myRandom.nextInt(6) + 1;

thisSum = roll1 + roll2;

if(thisSum == comeOutRoll)
{
yourWins += 1;
playing = false;
}

else if (thisSum == 7){
houseWins += 1;
playing = false;
}
}
}
}

float winPercentage = (yourWins)/(yourWins + houseWins);

//Print the results
System.out.println("Your wins: " + yourWins);
System.out.println("House wins: " + houseWins);
System.out.println("You win: " + winPercentage + "% of the time!");
}
}

IronKey Launcher Hanging On Windows 7

About this time last year, I purchased a new HP laptop complete with Windows 7. Unfortunately, my IronKey refused to work on this new machine. After clicking on the IronKey unlocker icon, the program would appear to load, the hard drive would click for a few seconds, then the program would hang. Nothing. A quick crtl + alt + del would indeed show that the ironkey.exe process was running, but no menu.

After two extremely unhelpful calls to IronKey support, even they admitted (I am paraphrasing here) “We have no idea what the hell is wrong”. After upgrading software versions, investigating drivers and playing with it for hours, I gave up. Thanks guys.

Well just for the record, the latest version of the IronKey software, version 2.5.1.0 released on Jan 6. 2012 has fixed this problem.

Better late than never I guess.

C# Palindrome Analysis

What is a palindrome you ask? It is a word spelled the same way forwards and backwards. Racecar and civic are examples of palindromes. In my lengthy and interesting quest to learn c#, I created a nifty little program that recursively determines if a given string is a palindrome. Pretty damn cool!

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter a string  to preform palindrome check: ");
string mystring = Console.ReadLine();

bool result = palindrome(mystring);

Console.WriteLine("{0} is a palindrome: {1}", mystring, result);

}

static bool palindrome(string mystring)
{
bool is_palindrome = true;

if (mystring.Length == 1)
{
is_palindrome = true;
}

else if (mystring[0] == mystring[mystring.Length - 1])
{
is_palindrome = palindrome(mystring.Substring(1, mystring.Length - 2));
}

else
{
is_palindrome = false;
}

return is_palindrome;
}
}
}

DesiCrypt – Super Simple Encryption

DesiCrypt (named after my cat in case anyone was wondering) is an encryption project I have been working on for a little while now. It’s not extremely powerful, but defiantly gets the job done for simple encryption tasks. Probably not something you would use for anything serious, but great if you want fast, on the go encryption. The software can be downloaded below and it totally 100% open source. Source code is included, along with a precompiled executable. DesiCrypt is only available to a few lucky Linux users for now, but I hope to port the project over to Windows (as soon as I get Code::Blocks configured on my Windows machine).

Downloads:
Linux – Click Here
Windows – As soon as I overcome my extreme laziness
Mac – Never happening! (evil laughter goes here)

Is It Just Me, Or Is iTunes A Piece Of Crap?

For a guy, with at least a little bit of computer knowledge, a program like iTunes should be super easy to figure out, right? WRONG! Apple would lead you to believe iTunes is this seamless program that plays your music, makes your playlists, mows your lawn and makes your coffee, but apple says a lot of things (that’s another story) that make no sense at all. After using iTunes for the past few months I have had time to try out its capabilities (read inabilities) and features. After many frustrations and one phone call to Apple, there are still a few things I am still trying to figure out. Like why does it take over 40 seconds to open on my dual core, 4 GB RAM machine? During my short relationship with this terrible program, I even discovered a small glitch. The Ipod will not “sync” if you do not click “no thanks” on this one advertisement. That only took me 1 week to figure out… To make a long story short, here’s 8 reasons why it sucks:

ITS A STORE!!! Yes, Apple wants to sell you their stuff.
Your Forced to use it. Wouldn’t a simple, drag and drop file structure make a little sense?
So damn hard to use. The interface makes absolutely no sense.
System Hog. Can someone please explain to me why it takes up so much RAM and processing power?
Difficult To Complete even the simplest Task.
The interface is terrible.
Total overkill for a simple music player.
No Linux support.

I could probably think of a million and one more reasons why I absolutely hate iTunes, but that sums it up pretty well. Thats it for my rant, but I still don’t think thats going to make my iTunes experience any better!



Copyright © 2013. All rights reserved.

RSS Feed. This blog is proudly powered by Wordpress and uses Modern Clix, a theme by Rodrigo Galindez.