- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
24 Posted Topics
This snippet converts a CIDR notated IP address to a range of IP addresses in decimal, dotted notation. Eg.: 192.168.1.255/31 => 192.168.1.254 - 192.168.1.255 | |
Re: Hello, After searching for 'open source ocr library' on google,I've found [URL="http://www.findbestopensource.com/tagged/ocr"]this[/URL] website. (This took me about 30 seconds...) Amongst others, there is a nice program written in C++ under GPL. Andrew ps.:Remember, Google is your friend... | |
Re: IMHO the errors are from the fact that you haven't typecasted *data at the beginning of the function to struct v * .... so try it this way:[CODE]void * matrixMult(void *data) { struct v * data2 = (struct v*)data; int a = data2->i; int b = data2->j; }[/CODE] | |
Re: So , the CellContentClick handles the click. If i understood you, than you have data for every project. So after all. You only have to show that data in a datagridview. [CODE]private void dataGridView1_CellContentClick(object sender,DataGridViewCellEventArgs e) { dataGridView2.DataSource = "the given project's data"; }[/CODE] Hope this helps. | |
Re: How about swapping [CODE]A[0]=largest;[/CODE]to [CODE]largest= A[0];[/CODE] ![]() | |
Re: If you haven't already, I suggest you take a look at: [URL="http://www.daniweb.com/software-development/c/threads/50370"]http://www.daniweb.com/software-development/c/threads/50370[/URL]. | |
Re: Check out: [URL="https://secure.wikimedia.org/wikipedia/en/wiki/File_format#Magic_number"]this page[/URL]! | |
Re: Hello, I have tested Your code(without the init_allocator(b,s) function). And it worked out perfectly for me! This is what I compiled, with gcc 4.5.3: [CODE]#include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main (int argc, char **argv){ int index, b, s; int c; while ((c = getopt (argc, argv, … | |
![]() | Re: Hello! About your percentage calculator: [QUOTE]printf("Enter the number of wins:\n"); scanf("%d", &win); printf("Enter the number of losses:\n"); scanf("%d", &loss);[/QUOTE] given that you have defined win and loss as [CODE]double[/CODE]You must use scanf with a different syntax, refer to: [url]http://www.cplusplus.com/reference/clibrary/cstdio/scanf/[/url] But in short: [CODE]scanf("%lf",&win);[/CODE] is used in the case of doubles. … ![]() |
Re: How about this one? [CODE]#!perl -w while(<>) { chomp; s!/(\d{1,3})!!; @h = split /\./; for(@h){$_=sprintf "%x",$_;} $a = join "",@h; $a = hex $a; $a >>= (32-$1); $a <<= (32-$1); printf "Possible addresses are ranging from: %08x to %08x\n",$a,$a+2**(32-$1)-1; }[/CODE] | |
Re: [QUOTE=VernonDozier;1587405]If a float cannot hold 999999999 (and it indeed cannot), the battle is already lost. Typecasting won't work. Float has 4 bytes, as does int. Since float can represent numbers that int cannot, it stands to reason that, being the same size, int will be able to represent numbers that … | |
Re: Hello, I would suggest you to read [URL="http://www.cplusplus.com/reference/clibrary/cstdio/getchar/"]the specification[/URL] of getchar(). But anyway... In a regular case using getchar() EOF is returned when a reading error happens. So checking for it is done to detect errors. Your code could be rewritten as the following, I hope it gets clearer this … | |
Re: Hi, The Linux [URL="http://linux.die.net/man/1/last"]last[/URL] command does the trick. | |
Re: Hi, If the network manager icon is not appearing, but it has been, than it can be fixed using the following commands typed into a terminal:[just copy & paste the lines in green to a terminal :)] (Change current directory to the home directory): [COLOR="Green"]cd[/COLOR] (Backup in case anything goes … | |
Re: [QUOTE]>randomly generate fruit on the lcd screen [/QUOTE] [URL="http://www.cplusplus.com/reference/clibrary/cstdlib/rand/"]rand() function[/URL] [QUOTE]> make a score tab that shows the score on the top of the LCD screen .[/QUOTE] Well, since you can lighten up pixels one by one, you can create functions to draw numbers this way.It's not a big deal … | |
Re: Try this code: [CODE] #include <stdio.h> #include <stdlib.h> #include <string.h> unsigned char * rot13(unsigned char *input); int main(void) { unsigned char *input; // Don't forget to allocate memory for your buffer... input= (unsigned char *)malloc(256); printf("Enter string (max. 255 characters) : "); gets(input); printf("\nConvert result %s to ROT13 = ", … | |
Hello there! I need a little help with a key detection program, i only need to watch for 1 key just -like the method to start recording with fraps-. I'm trying to use WH_KEYBOARD hook(not the WH_KEYBOARD_LL because i need the program to do stuff while "hooking"). In the dll … | |
Re: The code:[CODE] int[] myarray1 = myArray;[/CODE] means that you refered myArray as myarray1, thus myarray1 is changing with myArray, every time it is changed. So if you'd like to use 2 separate arrays than you'd rather just set the values to the same in the second array as they are … | |
Re: [CODE] void Change() { int hp1 = 0; int hp2 = 0; // setting the values to equal in both datagrid views (setting the same as the datasource) dataGridView1.DataSource = dataGridView2.DataSource; /*___________________*/ //changing nth row's cell in every second column to (everyrow-n)th row's cell while(hp1 < dataGridView2.ColumnCount/2) { while (hp2 … | |
Re: Hi there. Here is a possible solution for your first problem. When the text changes in the textBox1:it gets the most similar item to the one in the textbox from the listbox and puts that item to the 1st row(in the listbox), the 1 which was in the first row … | |
Hello! [COLOR="Green"]Little unimportant info about me: I think i can program in c# in a quite good way,but I would like to make my programs useful also for people who hasn't got .NET framework installed. So i started to learn c and to rewrite my c# programs in c.[/COLOR] I'm … | |
![]() | Re: Hi there! "But if I wanted to prevent the program to throw exception what would you suggest to me to do?" Hm... well you can always use the 'try-catch' structure ,with an empty catch part. Example: [CODE] static void Main(string[] args) { char[] ch = new char[1]{'2'}; try { Console.WriteLine(ch[-1]); … |
Re: Hi! An article about "Object reference not set to an instance of an object" bug: [url]http://support.microsoft.com/kb/810098[/url] Maybe this will help. | |
Re: Hi. Could you explain "regular expressions" a bit further? |
The End.