Official Source Code Library
-
- Ranger
- Posts: 1894
- Joined: Tue Oct 16, 2007 3:57 am
- Location: "I didn't just take your mom out to dinner. I ate your mom for dinner."
- Contact:
Official Source Code Library
Here you can post code to applications you don't mind sharing how you made, doing this will allow other Programmers how to do, or how you did certain things in different Languages.
I am currently coding in Basic but just recently started Python. I will add my Sources if I think they're Usefull.
Realbasic Calculator (Fonzie style)
Name: Calc-E
Language: REALbasic
Debugger: Realbasic Studio 2011r3
Below is the Realbasic Project for a mini Calculator that I made in Realbasic. It's pretty cool, It can find the Average of 5 numbers, Add, Multiply, Subtract and Divide, and even has a Copy Paste-able Writeout of your problem at the bottom. I've also included a downloadable already compiled version of it for Mac and Windows.
Realbasic Project File:
http://www.mediafire.com/?fn59p6j81124yqu
Realbasic Code in Plain Text:
http://www.mediafire.com/?03y3nwl03pay47a
Calc-E for Windows:
http://www.mediafire.com/?gufo4zp14nblvqh
Calc-E For Mac (delete.tar, possible windows or Mediafire malfunction. it's a .app standalone.):
http://www.mediafire.com/?w63ugp3yc1pwmsc
----------
Movable Objects Demo (Movement Experiment)
This is an Application I made that allows the user to move objects that are on the window. This app allows you move a ball anyway in the application. The code supplied below will tell you how I pulled this off.
Name: Movement Experiment
Language: REALbasic
Debugger: Realbasic Studio 2011r3
Realbasic Project:
http://www.mediafire.com/?ax5i5xvfwljfvp4
Code in Plain Text:
http://www.mediafire.com/?smrgi7vda45qpwy
Windows:
http://www.mediafire.com/?1k016kn96931qhd
Mac:
http://www.mediafire.com/?tr1d2zeg2swjns1
Enjoy Guys, if I make something else I find worth posting I will do so.
I am currently coding in Basic but just recently started Python. I will add my Sources if I think they're Usefull.
Realbasic Calculator (Fonzie style)
Name: Calc-E
Language: REALbasic
Debugger: Realbasic Studio 2011r3
Below is the Realbasic Project for a mini Calculator that I made in Realbasic. It's pretty cool, It can find the Average of 5 numbers, Add, Multiply, Subtract and Divide, and even has a Copy Paste-able Writeout of your problem at the bottom. I've also included a downloadable already compiled version of it for Mac and Windows.
Realbasic Project File:
http://www.mediafire.com/?fn59p6j81124yqu
Realbasic Code in Plain Text:
http://www.mediafire.com/?03y3nwl03pay47a
Calc-E for Windows:
http://www.mediafire.com/?gufo4zp14nblvqh
Calc-E For Mac (delete.tar, possible windows or Mediafire malfunction. it's a .app standalone.):
http://www.mediafire.com/?w63ugp3yc1pwmsc
----------
Movable Objects Demo (Movement Experiment)
This is an Application I made that allows the user to move objects that are on the window. This app allows you move a ball anyway in the application. The code supplied below will tell you how I pulled this off.
Name: Movement Experiment
Language: REALbasic
Debugger: Realbasic Studio 2011r3
Realbasic Project:
http://www.mediafire.com/?ax5i5xvfwljfvp4
Code in Plain Text:
http://www.mediafire.com/?smrgi7vda45qpwy
Windows:
http://www.mediafire.com/?1k016kn96931qhd
Mac:
http://www.mediafire.com/?tr1d2zeg2swjns1
Enjoy Guys, if I make something else I find worth posting I will do so.
Mota-Lev was here 30/4/2010@2:18pmG[v]N wrote:HUGE NOTIFICATION
THIS GRAVY HAS BRAINS
Re: Official Source Code Library
Pearl 2.0 Concept Code
Pearl 2.0's code, mainly displaying the concepts behind converting maps between all versions of Halo. Also has functional BSP reflexive deciphering.
Name: Pearl 2.0
Language: REALbasic
Debugger: Realbasic 2008 r2
Realbasic Project:
http://dl.dropbox.com/u/3174147/Source% ... 20Main.rbp
Code in PDF:
http://dl.dropbox.com/u/3174147/Source% ... 20Code.pdf
Pearl 2.0's code, mainly displaying the concepts behind converting maps between all versions of Halo. Also has functional BSP reflexive deciphering.
Name: Pearl 2.0
Language: REALbasic
Debugger: Realbasic 2008 r2
Realbasic Project:
http://dl.dropbox.com/u/3174147/Source% ... 20Main.rbp
Code in PDF:
http://dl.dropbox.com/u/3174147/Source% ... 20Code.pdf
Re: Official Source Code Library
Here's some PHP code I wrote to query Halo servers to grab information such as server name, players, gametype, etc.
It works with Halo Demo servers and can easily modified to work with any version of Halo PC/Mac.
Files
It works with Halo Demo servers and can easily modified to work with any version of Halo PC/Mac.
Files
I am no longer active to Halo or MGM, and don't guarantee a response on the forums or through email. I will however linger around the discord room for general chatting. It's been fun!
-
- Green Beret
- Posts: 3470
- Joined: Sat Jun 03, 2006 11:08 am
- Contact:
Re: Official Source Code Library
This is a great idea. I wish I had anything to add, but the only thing big enough is a Corewars simulator that I started almost four years ago. It's technically finished, except it needs to be able to read text files to put the RedCode into the core. Also, having visual output would be nice. That can probably be accomplished by smashing one of my OpenGL test projects into this one. Maybe I'll get around to finishing it. It would only be about as late to release as my Killtrocity mod.
Hopefully in a year or so I will have something worthwhile to contribute.
Oh, and if you don't know what Corewars is, you should go check it out. I can't imagine people who enjoy programming wouldn't be at least a little interested. Unfortunately, for OSX the best visual simulator I found is this one. It uses a much older version of RedCode. Still quite fun though. In fact, I'm gonna break it out right now and mess around some. OHAI Jack!
Hopefully in a year or so I will have something worthwhile to contribute.
Oh, and if you don't know what Corewars is, you should go check it out. I can't imagine people who enjoy programming wouldn't be at least a little interested. Unfortunately, for OSX the best visual simulator I found is this one. It uses a much older version of RedCode. Still quite fun though. In fact, I'm gonna break it out right now and mess around some. OHAI Jack!
-
- Ranger
- Posts: 1894
- Joined: Tue Oct 16, 2007 3:57 am
- Location: "I didn't just take your mom out to dinner. I ate your mom for dinner."
- Contact:
Re: Official Source Code Library
A little C++ Sex... These are highly detailed and explain every single bit of code written, anyone can understand the code written below. It's like a halo tutorial it's done so well. I may be new to C++ but these references are dead accurate and are 100% guaranteed to launch if put in a compiler.
Enjoy and Learn as I did my friends.
Code and Tutorial written by Fonzie, instruction by Bucky @ thenewboston.com
LET IT BEGIN!
*/ are markers for my inserts, explanations, paragraphs, etc. If you have a compiler pop this in and it should light up (more colorful makes it easier / funner to read)
Hello C++! I'm Fonzie!
___________________________________________________
Making C++ Show Text Back
_________________________________________
Making Variables in C++
___________________________________________
A Basic Calculator in C++
_______________________________________________________
Getting away with Mathematical Murder (Arithmetic and Variable Manipulation in C++)
I'd clap right now but i can barely type due to my fingers hurting FROM ALL THIS CODWEALNFASFN
Enjoy and Learn as I did my friends.
Code and Tutorial written by Fonzie, instruction by Bucky @ thenewboston.com
LET IT BEGIN!
*/ are markers for my inserts, explanations, paragraphs, etc. If you have a compiler pop this in and it should light up (more colorful makes it easier / funner to read)
Hello C++! I'm Fonzie!
Code: Select all
#include <iostream>
/*pre processor directive.
includes a file.
*/
using namespace std;
/*'std' means standard library.
includes a library.
the above are includers, including directives
we are using in this test program.
int is an integer, necessary for calculations.
main always works with integers.
the code below is called a function,
Ex. things you want the computer to do.
*/
int main()
/*
main tells the computer where to start.
*/
{
cout << "Hello world!" << endl;
/*endl; = end line, go to the next line.
cout= output stream object, used to write
characters on screen.
'<<' is a stream insertion operator, takes stuff
to the right of it and prints it out on the
screen.
*/
return 0;
}
/*main functions should always have a return.
also when the app runs and gets to return 0
it shows that the app made it all the way
to the end with no errors.
all functions are made up of statements
statements are your instructions
each instruction has to end with a
semi-colon to show it has ended its line.
the brackets show the opening and closing
of your statements.
*/
___________________________________________________
Making C++ Show Text Back
Code: Select all
#include <iostream>
using namespace std;
int main()
{
cout << "MAN I LOVE BACON \n";
cout << "AND HAM" << endl;
/*
'\n' is a different way to make a new
line other than 'endl'.
doubling it like \n \n, will make a
space between the two lines of text.
*/
return 0;
}
_________________________________________
Making Variables in C++
Code: Select all
/*
I did what I was told in this example
but this time used what i learned to
make it look and run better.
*/
#include <iostream>
using namespace std;
int main()
{
int tuna = 6;
/*
int = integers are whole numbers
(6, 83, 540) no decimal places.
remember to end your lines with ;.
*/
cout << "Tuna (for some reason) equals = "
<< tuna << "\n" << endl;
/*
once ran will show the number 6, not tuna.
tuna is your variable (placeholder) and
since tuna = 6, when it hits tuna, 6 is shown.
*/
int a = 4;
int b = 21;
int sum = a + b;
cout << "4 + 21= " << sum << "\n \n" << endl;
cout << "VARIABLE WIN! \n\n" << endl;
cout << "Made by AnonDavis who is about to be a fucking beast at C++" << endl;
/*
the following code will make the sum 25
appear, just writing the function doesn't
make it show, you HAVE to tell it to print
out the answer (cout).
a and b are variables, you get to type them
instead of the numbers, and the compiler
will substitute the letter for the designated
number, as long as you set it as an integer
first. IE, int a = 4, etc.
*/
return 0;
}
___________________________________________
A Basic Calculator in C++
Code: Select all
/*
I will be using variables in this app
but this time it will be different.
This time the user will be able to type
in the numbers, instead of pre designated
terms.
*/
#include <iostream>
using namespace std;
int main()
{
int a;
int b;
int sum;
/*
Empty Variables created son! The Program will now
recognize a, b and sum as placeholders.
You don't have to declare the variable
right off the bat, adding a ';' after
your variable will allow the numbers
to be added later.
Also for fucks sake remember the ';'
youll syntax error the shit out of yourself
if you forget.
*/
cout << "This is a 2 whole number addition application.";
cout << "\n If you type a letter instead of a number, this will not work... \n\n";
cout << "Enter a Number Bawss: ";
/*'cout' takes information from your computer
and puts it on your screen.
'cin' takes information from the user, and
puts it in the computer.. fuckin smart.
~to clarify~
cout= OUTPUT stream object
<< = stream INSERTION operator.
cin = INPUT steam object.
>> = stream EXTRACTION operator.
Fuckin Smart.
*/
cin >> a;
/*
smart.
*/
cout << "Enter another Number Wise Guy: ";
cin >> b;
cout << "\n\n";
sum = a + b;
cout << "The sum of " << a << " and " << b << " ends up being= " << sum << "\n\n\n\n";
cout << "Created by AnonDavis, LadyKiller.\n\n\n\n\n";
return 0;
}
/*You don't have to declare the variable
right off the bat, adding a ';' after
will allow you to state the number
at a later time.
EXAMPLE: int a;
a = 54
I am sure this can also be used
so the user can put his own choice
of number in later.
*/
_______________________________________________________
Getting away with Mathematical Murder (Arithmetic and Variable Manipulation in C++)
Code: Select all
/*
You can also use Arithmetic when setting variables.
Heres a little lesson in Arithmetic Operators...
EXAMPLE:
int x = 4 + 6;
cout << x;
The following will return x as the number 10.
Fuckin Smart.
~uneeded clarifying~
* = Multiplcation
+ = Addition
- = Subtraction
/ = Division
But uhh.. wait, what if what were dividing has a remaining number?
By Default the usual line of code 'int x = 81 / 2' will indeed give you
the answer, but leave out the remaining numbers left over entirely.
This is where the % comes in.
% = The Modulous Operator
Simply replace / with %.
But so you know, this is only going to give you the remaining number, not the
answer. What needs to be done should be obvious... look below... dumbass...
*/
#include <iostream>
using namespace std;
int main()
{
int a = 81 * 2;
int b = 81 % 2;
int c = (4+3)* 7;
cout << a << " Remainder " << b;
cout << "\n\n\n\n";
cout << "Let's try something a little more crazy... \n\n\n";
/*
This is one way to make it work, there are others, just use your head.
*/
/*
~Order of Precedents~
Multiple numbers getting butcrunched my the OS
If you use multiplication in the equation you have to use the associative
property technique, or the equation will be summed incorrectly.
Associative Property?! wtf?
() - Parenthesis you dumbass, put them around the Multiplied numbers.
Parenthesis first
then your multiplication and divison
then your addition and subtraction.
EXAMPLE:
int c = (4+3)* 7;
If you did it without the Parenthesis, it would've done 3x7 first, then added
4, which would've given you 25, instead of 49, which is the correct answer.
*/
cout << c;
cout << "\n\n\nCreated by AnonDavis who is way more epic than Slappey.\n\n\n";
return 0;
}
/*
I should be getting paid to be this smart.
*/
I'd clap right now but i can barely type due to my fingers hurting FROM ALL THIS CODWEALNFASFN
Mota-Lev was here 30/4/2010@2:18pmG[v]N wrote:HUGE NOTIFICATION
THIS GRAVY HAS BRAINS
-
- Green Beret
- Posts: 3470
- Joined: Sat Jun 03, 2006 11:08 am
- Contact:
Re: Official Source Code Library
~Usefulllllll~
You watched Bucky to learn this? Nice! He is quite good with those tutorials, I should watch them again.
Anyways, what say you people to me posting the Ada we are going over in CSCI141? I'm not liking the language much, it feels way too strict after using C++, but at least when you get an error it almost always tells you what you did wrong.
Instead of C++'s
"THE HELL IS GOING ON?!? OMG WHAT DID YOU DO? I needz CPR, I'm dying here!"
you get
"Hey idiot. I don't know how, but you forgot a semicolon on line 25. Also, you misspelled a variable name as 'fickcheese'. I'm pretty sure that's a D, not an F. Good god man, you were the one who initialized the variable in the first place. What is wrong with you? Moron."
Now that I think about it, it's almost like GLaDOS berating you for doing a bad job. That's how I feel, anyway.
Maybe I should get away from the green on black color scheme for terminal...
Hey Fonzie, you should pull that post out and start a new topic. Maybe for C++ exclusively or just for starting tutorials.
You watched Bucky to learn this? Nice! He is quite good with those tutorials, I should watch them again.
Anyways, what say you people to me posting the Ada we are going over in CSCI141? I'm not liking the language much, it feels way too strict after using C++, but at least when you get an error it almost always tells you what you did wrong.
Instead of C++'s
"THE HELL IS GOING ON?!? OMG WHAT DID YOU DO? I needz CPR, I'm dying here!"
you get
"Hey idiot. I don't know how, but you forgot a semicolon on line 25. Also, you misspelled a variable name as 'fickcheese'. I'm pretty sure that's a D, not an F. Good god man, you were the one who initialized the variable in the first place. What is wrong with you? Moron."
Now that I think about it, it's almost like GLaDOS berating you for doing a bad job. That's how I feel, anyway.
Maybe I should get away from the green on black color scheme for terminal...
Hey Fonzie, you should pull that post out and start a new topic. Maybe for C++ exclusively or just for starting tutorials.
-
- Ranger
- Posts: 1894
- Joined: Tue Oct 16, 2007 3:57 am
- Location: "I didn't just take your mom out to dinner. I ate your mom for dinner."
- Contact:
Re: Official Source Code Library
Done.draconic74 wrote: Hey Fonzie, you should pull that post out and start a new topic. Maybe for C++ exclusively or just for starting tutorials.
Dude, i love learning, what a resource.
Mota-Lev was here 30/4/2010@2:18pmG[v]N wrote:HUGE NOTIFICATION
THIS GRAVY HAS BRAINS
-
- Commando
- Posts: 2047
- Joined: Sun Oct 21, 2007 2:34 pm
- Location: 3C0E9056
- Contact:
Re: Official Source Code Library
Well, I made this: https://github.com/samdmarshall/x86-Eni ... igmav2.asm
Because only real men program in assembly.
(it is this: http://en.wikipedia.org/wiki/Enigma_machine )
Because only real men program in assembly.
(it is this: http://en.wikipedia.org/wiki/Enigma_machine )
Re: Official Source Code Library
Using the O'Reilly Commons tutorial found here, I made a simple text editor.
This was my first successful document-based application.
This was my first successful document-based application.
Either you are groping for answers, or you are asking God and listening to Jesus.
-
- Green Beret
- Posts: 3470
- Joined: Sat Jun 03, 2006 11:08 am
- Contact:
Re: Official Source Code Library
Dirk, I bet you would be absolute beast at Corewars.
Who is online
Users browsing this forum: No registered users and 1 guest