PrimeNumbers.java in java

This code enables the user to enter a number and finds the prime from 2 to the entered number..Please name it PrimeNumbers.java Hope it'll help u..:D (View Snippet)

Function to find prime numbers in javascript

Accepts number as input, writes the prime numbers up to that number to the screen. (View Snippet)

Fun with DateTime and TimeSpan in csharp

This is just for fun. You know how old you are(I hope), but do you know how many days you are walking around on this planet? The two routines presented here could be used more practically in an ever present employee application. (View Snippet)

Generate unique strings of random numbers in perl

This code snippet will produce strings of numbers (1 thru 49) with no repeated numbers in the same string and no duplicated string of numbers in the list of strings. To change the range of numbers the script generates change 49 in the code to your requirements. Please feel free to ask questions... (View Snippet)

Capture your screen in a bitmap. in csharp

While strolling around in the methods of the Graphics class, I bounced on the CopyFromScreen method. He, so why not make a screen capture utility! I know there is lots of this stuff out there. But it just seems like fun to try to make one myself. I made a little Forms application with two forms:... (View Snippet)

The 2000 first primes in csharp

Blink and you will see them appear in a Console window. This is a translation to C# of a Modula-2 implementation by N.Wirth, the inventor of Pascal. The tested integers are obtained by incrementing alternatively by 2 and 4, thereby avoiding multiples of 2 and 3 in the first place. This list starts... (View Snippet)

Multi-line ToolTipText in java

Sometimes one line of tool tip is not enough. You may want to try and play around with JToolTip, but if you in hurry this "little hack" can be handy. With little of HTML plus CSS code you can work out various formats (font, colour, alignment, size etc.). (View Snippet)

Calculating all prime numbers <= 1000 in cplusplus

Here's a simple, though not the most efficient, program that flags and displays all prime numbers less than or equal to 1000. (View Snippet)

Generating Random Numbers Without Repeats - Part Two in cplusplus

I received some feedback on my earlier code snippet regarding how to generate unique random numbers and someone suggested I make a shorter, easier example, so here it is. This example simply generates the integers from 0 to 9 in random order without any repeats. It is basically the function... (View Snippet)

Console Pong! in cplusplus

A small game of pong I put together in about half an hour :) Enjoy. (View Snippet)
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 12:59 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC