School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!
Welcome to Dream.In.Code
Become an Expert!

Join 306,745 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,021 people online right now. Registration is fast and FREE... Join Now!



's Contributions
Below are the tutorials, code snippets, and resources has submitted to dream.in.code. For more information on Kudos and contributing to dream.in.code visit: http://home.dreamincode.net/?p=about#kudos.
Tutorials
Overloading Operators (revised v.2) in C++ Tutorials (Last Comment: KYA, Views: 4,438)
Bit Twiddling in C++ Tutorials (Last Comment: KYA, Views: 2,649)
Merge Sorting: A Look With Recursion in C++ Tutorials (Last Comment: KYA, Views: 2,213)
Introduction to the WinAPI in C++ Tutorials (Last Comment: KYA, Views: 3,808)
Defeating Mr. Memory Leak in C++ Tutorials (Last Comment: KYA, Views: 1,007)
Multiple Inheritance in C++ in C++ Tutorials (Last Comment: KYA, Views: 1,370)
Hanging Out With Applets in Java Tutorials (Last Comment: KYA, Views: 1,521)
Java 1.5 Enumerations in Java Tutorials (Last Comment: KYA, Views: 2,313)
Multiple Inheritance in Java in Java Tutorials (Last Comment: KYA, Views: 4,270)
Introduction to Lua in Other Language Tutorials (Last Comment: KYA, Views: 1,129)
Advanced Lua - Part I in Other Language Tutorials (Last Comment: KYA, Views: 245)
Advanced Lua - Part II in Other Language Tutorials (Last Comment: KYA, Views: 303)
Introduction to DirectX in Game Programming Tutorials (Last Comment: KYA, Views: 5,617)
Code Snippets
Submitted: December 25, 2008        Views: 1724
Illustrates how one would allocate, fill, and delete a 2D dynamically allocate3d array in C++.
Submitted: March 19, 2009        Views: 250
Much simpler then cross product, this is the simple multiplication of two vectors. Useful in detecting collision. This example returns the actual vector rather then the result of the addition of each item.
Abundant Number in C++ by KYA
Submitted: February 19, 2009        Views: 348
Takes an integer and determines if it is "abundant" (i.e. sum of its factors is greater then 2 times the number))
Abundant Number in Java by KYA
Submitted: February 21, 2009        Views: 226
Takes an integer and determines if it is "abundant" (i.e. sum of its factors is greater then 2 times the number))
Amicable Numbers in C++ by KYA
Submitted: February 19, 2009        Views: 1335
A pair of numbers are amicable if the sum of the factors of numOne are equal to numTwo and vice verse.
Amicable Numbers in Java by KYA
Submitted: February 21, 2009        Views: 602
A pair of numbers are amicable if the sum of the factors of numOne are equal to numTwo and vice verse.
Submitted: April 10, 2009        Views: 176
Opens an embedded Lua interpreter. This is interactive you can test Lua code snippets etc... Crtl + Z, then press enter to exit.
Submitted: February 15, 2008        Views: 2879
Using D3DXMATRIX and D3DXVECTOR4 constructs we get a glimpse of the beginning of 3D graphics programming. This snippet illustrates its use and the ability to overload operators to do console output.
Bubble Sort (Python) in Python by KYA
Submitted: July 20, 2008        Views: 3018
Bubble sorts a list
Submitted: August 25, 2009        Views: 107
The default for loop has its own built in iterator, but you can create your own to suit your needs. Includes example usage.
Submitted: February 27, 2009        Views: 168
Uses a Vector class with an overloaded
Deficient Number in C++ by KYA
Submitted: February 19, 2009        Views: 183
Takes an integer and determines if it is "deficient" (i.e. sum of its factors is less then 2 times the number))
Deficient Number in Java by KYA
Submitted: February 21, 2009        Views: 218
Takes an integer and determines if it is "deficient" (i.e. sum of its factors is less then 2 times the number))
Submitted: March 19, 2009        Views: 110
Given a start and end position (3D vectors) for two spheres, we can do a simple smallest distance calculation to determine if they collide within a given time interval.
Submitted: March 21, 2009        Views: 425
Edited version. If the smallest distance between two sphere centers is greater then the square of their radii, then there is no collision.
Submitted: September 4, 2009        Views: 51
The function (with example usage) determines whether or not your machine is big or little endian.
Submitted: May 31, 2008        Views: 709
A template for overloading the << operator to display custom class objects within the stream
Factor Summation in C++ by KYA
Submitted: February 19, 2009        Views: 241
Provides a snippet on how to sum the factors (divisors) of a given number.
Factor Summation in Java by KYA
Submitted: February 21, 2009        Views: 438
Provides a snippet on how to sum the factors (divisors) of a given number.
Factorial Finder in Python by KYA
Submitted: July 21, 2008        Views: 476
Based on the number of elements within a list, it determines how many possible factorials there are (i.e. permutations)
Factorial Finder in C++ by KYA
Submitted: August 4, 2008        Views: 846
Returns the value of N!, given a certain integer N.
Factorial Finder in Java by KYA
Submitted: August 4, 2008        Views: 516
Finds N! where n is an integer (in this case).
Submitted: December 19, 2008        Views: 805
Illustrates how one would assign a function to a pointer and subsequently call it.
Submitted: December 19, 2008        Views: 1352
Generic template/function for the sorting of an array of elements.
Submitted: February 27, 2009        Views: 883
Returns the magnitude of a 3D vector. The Vector class used for the example is included.
Submitted: March 11, 2009        Views: 121
Given an initial 3D point, its velocity at time zero, and the gravitational pull, we can map positions per time step in 3D space (i.e. a 3D Vector).
Submitted: July 18, 2008        Views: 2087
Traverses the list to find data
Submitted: July 20, 2008        Views: 794
Searches a sorted list for a specific value (in this case integers)
Submitted: March 10, 2009        Views: 958
Prints out Fibonacci iteratively. (Typically this problem is solved recursively).
Submitted: April 11, 2009        Views: 309
Shows how to use a table to emulate a linked list. This version is more akin to a stack linked list given the LIFO output print.
Submitted: April 15, 2009        Views: 122
Determines if a number is abundant (sum of factors greater then 2 times the number itself)
Submitted: April 15, 2009        Views: 152
A pair of numbers are amicable if the sum of the factors of numOne are equal to numTwo and vice verse.
Lua: BubbleSort in Lua by KYA
Submitted: April 8, 2009        Views: 135
Bubble sorts a table (assuming it has comparable numerical values) in Lua.
Submitted: April 15, 2009        Views: 169
Takes a number and determines if it is "deficient" (i.e. sum of its factors is less then 2 times the number))
Submitted: April 15, 2009        Views: 127
Two methods that return the sum of a number factors. One includes the number itself, the other doesn't.
Submitted: April 8, 2009        Views: 276
Calculates the factorial of n (n!)
Submitted: April 9, 2009        Views: 286
Iterates through data to find the largest number. also illustrates returning multiple values from a function. Returns max number and its index location.
Submitted: April 15, 2009        Views: 132
Takes a number and determines if it is "perfect" (i.e. it is equal to the sum of its factors).
Submitted: April 18, 2009        Views: 271
Custom unpack function "unpacks" the table, returns its value and calls unpack again, repeats until last non nil element
Merge Sort in C++ by KYA
Submitted: June 3, 2008        Views: 11758
Merge sorting is recursive; it divides the array in half, sorts it and then repeats.
Submitted: March 4, 2009        Views: 606
Normalizing a 3D vector requires calculating its magnitude and then dividing every value x,y, and z by the magnitude or "length" of the vector.
Submitted: March 19, 2009        Views: 489
Rather then return the resulting vector this variation returns the sum of the multiplication of each item.
Perfect Number in C++ by KYA
Submitted: February 19, 2009        Views: 1472
Takes an integer and determines if it is "perfect" (i.e. it is equal to the sum of its factors).
Perfect Number in Java by KYA
Submitted: February 21, 2009        Views: 956
Takes an integer and determines if it is "perfect" (i.e. it is equal to the sum of its factors).
Submitted: March 10, 2009        Views: 544
The code opens itself (source file) and then prints it line by line to the screen.
Quick Sort in Python by KYA
Submitted: July 20, 2008        Views: 1350
Utilizing recursion, we can quick sort a list
Quick Sort in C++ by KYA
Submitted: July 20, 2008        Views: 4755
Using partitioning, this snippet sorts a list of integers (modified easily to other things).
Submitted: July 18, 2008        Views: 848
Traverses a sorted list to find data
Submitted: July 20, 2008        Views: 671
Traverses a sorted list to find values
Submitted: December 2, 2008        Views: 663
Emulates the idea behind key encryption over the web. Modifies char array values using a given rotation number.
Selection Sort in C++ by KYA
Submitted: July 18, 2008        Views: 4454
Sorts the list using a selection algorithm
Submitted: July 20, 2008        Views: 854
Sorts a list using the selection method
String Permutation in Python by KYA
Submitted: July 21, 2008        Views: 1506
Prints all the permutations of a given string.
Submitted: July 21, 2008        Views: 3513
A short solution to the problem of finding all the variations of a string.
String Permutation in Java by KYA
Submitted: February 21, 2009        Views: 2162
A short solution to the problem of finding all the variations of a string.
Submitted: March 7, 2009        Views: 570
Uses a template to allow any data type to be sorted generically. Could be further adapted to include class objects.
Submitted: May 1, 2009        Views: 119
Finds the specified fib number using recursion. There are two other fib snippets in Lua here, but none do it the "traditional" way.
Submitted: August 25, 2009        Views: 55
Iterator takes a function name parameter (print for example) and calls it upon each iteration of the inner for loop. Example usage is supplied.
Submitted: June 3, 2008        Views: 680
Creates a text file and writes custom or preexisting data to it.