Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - The Doctor

Pages: 1 ... 3 4 [5] 6 7 ... 23
61
Lemmings Main / Re: Lemmings 2 for Master System
« on: August 16, 2009, 01:27:07 AM »
Where.

62
Lemmings Main / Re: Lemmings 2 for Master System
« on: August 16, 2009, 01:19:50 AM »
Probably wasn't completed.

63
Lemmings Main / Re: Lemmings 2 for Master System
« on: August 15, 2009, 11:45:45 PM »
The graphics on that package look distinctly un-SMS like anyway. Too many colours. Too high res. Still, interesting thought.

64
I dunno, I can semi agree with you, but I basically think "If it takes more than 3 builders to make one ledge, ditch it". That's because I rather like levels which depend on short bridges being built with good timing.

65
Basically as above in poll.

Seems a better question than asking what kind of style would be best for each style in Lemmings, I'll ask what spirit you would prefer.

Doesn't matter what you vote, I'm just interested. MAY swing my mind, but I doubt it. I vote option 3 because I like to think I somewhat have a sense of creativity.

What do you think?

66
Non-Lemmings Gaming / Re: Worst game ever?
« on: August 05, 2009, 02:38:00 AM »
You've experienced a broken arcade machine?

67
General Discussion / Re: What's your favorite web browser?
« on: July 31, 2009, 07:09:26 AM »
The Windows version of Safari 4 is good. It's slower at Internet Explorer at loading itself up, but faster showing web pages. It's a bit like Firefox in that regard. Firefox is a good browser too (but I hold it to be over rated ... well, seriously. Who needs all those plugins? Doesn't anyone use their browser to actually browse anymore?)

68
General Discussion / Re: What's your favorite web browser?
« on: July 30, 2009, 10:03:45 AM »
That's me. I'm running Safari 4, and love it. Many people dislike it. Can't see why. Nothing implicitly wrong with it.

69
Got it. Did you get mine.

70
It's still a good solution for the crossplatform software, with simplicity in mind. Of course, if you would like a hand learning C#, I'd happily help.

71
Oh I don't know. It has it's advantage, being an interpreted language makes it fairly simple for the beginner. I started with QBASIC. I think QBASIC is interpreted.

72
Easy on OS X. Just double clicked, it ran. :-) Ran into an error when I attempted to enter invalid data into the input system. Next step, error checking. :P

Here's my adaptation of your calculator in C#. Boy howdy, does it look different, lol.
Attached is also the binary executable. You can simply double click this to run in Windows.
On Linux or Mac OS X, make sure you have Mono installed. Then open a command line, navigate to
the folder containing the EXE file, and run this command.
mono ConsoleCalc.exe

DOWNLOAD HERE!!

Code: [Select]
/*
 * Name: ConsoleCalc
 * By: Jason Ryfle (zapzupnz)
 * Date: 27 07 2009
 *
 * Description: a simple calculator-like utility for the command line
 * written in C# using the .NET libraries and Mono.
 *
 * License and credits in credits() method.
 * Alternatively, run the software and hit the 4 key and press return.
 *
 * */

using System;

namespace ConsoleCalc
{
   class MainClass
   {
      public static void Main (string[] args)
      {
         sbyte todoSignedByte = 0;
                  
         Console.Clear();
         Console.WriteLine("Welcome to ConsoleCalc\nChoose a function from the list below by entering the number.\n\n");
         Console.WriteLine("1. Calculation\n2. Area\n3. Powers\n4. Credits\n\n");
         try
         {
            todoSignedByte = sbyte.Parse(Console.ReadLine());
         }
         catch
         {
            todoSignedByte = sbyte.Parse(Console.ReadLine());
         }
         
         if (todoSignedByte == 0)
         {
            Console.WriteLine("Terminating...");
            return;
         }
         else if (todoSignedByte == 1)
         {
            calculator();
         }
         else if (todoSignedByte == 2)
         {
            area();
         }
         else if (todoSignedByte == 3)
         {
            powers();
         }
         else if (todoSignedByte == 4)
         {
            credits();
         }
         else if (todoSignedByte > 4)
         {
            Console.WriteLine("Terminating...");
            return;
         }
      }
      
      public static double Evaluate(string expression) 
       { 
           System.Data.DataTable table = new System.Data.DataTable(); 
           table.Columns.Add("expression", string.Empty.GetType(), expression); 
           System.Data.DataRow row = table.NewRow(); 
           table.Rows.Add(row); 
           return double.Parse((string)row["expression"]); 
       }
      
      static void calculator()
      {
         Console.Clear();
         Console.WriteLine("Write your calculation:");
         try
         {
         string problemString = Console.ReadLine();
         Console.WriteLine("Answer is: " + Evaluate(problemString));
         }
         catch
         {
            Console.WriteLine("Invalid formula. Press any key to try again.");
            Console.ReadKey();
            calculator();
         }
      }
      
      static void area()
      {
         Console.Clear();
         Console.WriteLine("Choose a shape from the list by number." +
                           "\n" +
                           "\n1. Rectangle" +
                           "\n2. Circle" +
                           "\n3. Triangle" +
                           "\n4. Trapezoid" +
                           "\n5. Square or Rhombus" +
                           "\n6. Parallelogram" +
                           "\n\n");
         sbyte shapeSignedByte = sbyte.Parse(Console.ReadLine());
         if (shapeSignedByte == 0)
         {
            Console.WriteLine("Terminating...");
            return;
         }
         else if (shapeSignedByte == 1)
         {
            rect();
         }
         else if (shapeSignedByte == 2)
         {
            circle();
         }
         else if (shapeSignedByte == 3)
         {
            triangle();
         }
         else if (shapeSignedByte == 4)
         {
            trapezoid();
         }
         else if (shapeSignedByte == 5)
         {
            rect();
         }
         else if (shapeSignedByte == 5)
         {
            rect();
         }
      }
      
      static void rect()
      {
         Console.WriteLine("\nHow long is this shape?"); double length = double.Parse(Console.ReadLine());
         Console.WriteLine("How wide is this shape?"); double width = double.Parse(Console.ReadLine());
         Console.WriteLine("Answer is: " + (length * width));
      }
      
      static void circle()
      {
         Console.WriteLine("\nWhat is the diameter of this circle?"); double diameter = double.Parse(Console.ReadLine());
         double radius = diameter / 2;
         Console.WriteLine("Radius is: " + radius.ToString());
         Console.WriteLine("Answer is: " + (radius * radius * Math.PI));

      }
      
      static void triangle()
      {
         Console.WriteLine("\nWhat is the length of the base?"); double length = double.Parse(Console.ReadLine());
         Console.WriteLine("How tall is the triangle?"); double height = double.Parse(Console.ReadLine());
         Console.WriteLine("Answer is: " + (length * height / 2));
      }
      
      static void trapezoid()
      {
         Console.WriteLine("\nWhat is the length of the one of the bases?"); double base1 = double.Parse(Console.ReadLine());
         Console.WriteLine("What is the length of the other base?"); double base2 = double.Parse(Console.ReadLine());
         Console.WriteLine("How tall is the trapezoid?"); double height = double.Parse(Console.ReadLine());
         Console.WriteLine("Answer is: " + (height*(base1+base2)/2));
      }
      
      static void powers()
      {
         Console.Clear();
         Console.WriteLine("What number shall we multiply?"); double toMult = double.Parse(Console.ReadLine());
         Console.WriteLine("To what power shall we do this?"); double powerToMult = double.Parse(Console.ReadLine());
         Console.WriteLine("Answer is: " + (Math.Pow(toMult, powerToMult)));
      }
      
      static void credits()
      {
         Console.Clear();
         Console.WriteLine("A loose adaptation of Dullstar's calculator, " +
                           "\nconverted to C# using the .NET libraries" +
                           "\nDeveloped in MonoDevelop for Mac OS X" +
                           "\nCompiled with Mono" +
                           "\nYou are free to share and modify this source code");
      }
   }
}

73
Hehe yup. I say use whatever language you want, as long as it suits your needs. My needs are that I can use it at university, and they only support C# and Java. :/

ccexplore was right. Here's a full C# implementation of Hello World.

using System;
namespace HelloWorld
{ class MainClass
{ public static void Main (string[] args)
{
Console.WriteLine("Hello World");
}
}
}

... My favourite programming language at present is Lolcats.

74
General Discussion / Re: What's your favorite web browser?
« on: July 21, 2009, 12:00:29 AM »
Not many places at the moment, since only Safari and Mobile Safari for iPhone and iPod touch support it. It's supposed to become a standard later on, which I'm hoping for. If you're ever able to see what the 3D transforms can do, it's actually really cool that it can be done without the use of something like Silverlight or Flash Player (which both suck if you don't use Windows, and SL isn't even available on Linux proper).

Just something we had to dig into at uni. Experimental web standards, their impact, and showing one being used. I made a little thing where text revolves on a merry-go-round, with the haunted merry-go-round music from Super Mario 64 playing in the background. :P

Pages: 1 ... 3 4 [5] 6 7 ... 23