collapse collapse

* Who's Online

  • Dot Guests: 64
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Board Stats

  • stats Total Members: 88
  • stats Total Posts: 11163
  • stats Total Topics: 1699
  • stats Total Categories: 4
  • stats Total Boards: 76
  • stats Most Online: 248

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 - rm9402

Pages: [1] 2 3
1
Python / Re: python pointers ( 2.7)
« on: July 18, 2011, 06:00:15 pm »
Not sure if this is what you want to do or if this helps, but you could append the elements in one to the other. Then save that in another list or add the two lists, like a union of the two.

2
Technology / The Tunnel
« on: May 21, 2011, 01:51:18 pm »
    Hey guys(and girls) I just figured I should share this with you: thetunnelmovie.net besides looking like a good movie it actually uses p2p/piracy to spread the word about the movie and even the movie itself! So go have a look at it if you want.

3
Humor / Re: Hell Explained by a chemistry Student (hilarious)
« on: May 18, 2011, 03:04:24 pm »
Haha that was pretty good   :D

4
General Talk / Re: Happy Holidays!
« on: December 28, 2010, 07:20:17 pm »
Yeah I'm kind of a little late like eczuo but Happy Holidays!! Oh yeah thanks Nathan for hosting this site and Kat for making it and helping me answer many of my questions!  ;D

5
Technology / Re: iPhone 4 antenna (The unresolved problem)
« on: December 26, 2010, 01:02:24 am »
I agree with nathan and his question. Why an iPhone?

6
C / Re: from capitalized to lower case and vice versa.
« on: December 23, 2010, 10:43:38 pm »
thx  ;D

7
C / Re: from capitalized to lower case and vice versa.
« on: December 23, 2010, 10:34:56 pm »
here is the fixed code. i was printfing it too much lol.

Code: C
  1. #include <stdio.h>
  2. #define MAXLINE 1000
  3. int change(char s[], char changes[]);
  4.  
  5. int main(){
  6.  
  7.         int i, c;
  8.         i=0;
  9.         char orig[MAXLINE];
  10.         while((c=getchar())!= EOF){
  11.                 orig[i]=c;
  12.                 ++i;
  13.         }
  14.  
  15.         char changes[MAXLINE];
  16.         change(orig,changes);
  17.         printf("%s", changes);
  18.         return 0;
  19. }
  20.  
  21. int change(char s[], char changes[]){
  22.  
  23.         int i;
  24.         for(i=0;i<MAXLINE-1;++i){
  25.                 changes[i]=s[i];
  26.         }
  27.         changes[i]='\0';   /*not sure if this should be here :/ */
  28.         i = 0;
  29.         while(changes[i]!='\0'){
  30.                 if(changes[i]>='A' && changes[i]<='Z'){
  31.                         changes[i]= changes[i] + 'a' - 'A';
  32.                 }
  33.                 else if(changes[i]>='a' && changes[i]<='z'){
  34.                         changes[i]= changes[i] + 'A' - 'a';
  35.                 }
  36.                 ++i;
  37.         }
  38.         return 0;
  39. }

8
C / Re: from capitalized to lower case and vice versa.
« on: December 23, 2010, 10:19:22 pm »
well here is the basic concept right now. It works... just prints it a crap load of times. However the basic concept is there!

Code: C
  1. #include <stdio.h>
  2. #define MAXLINE 1000
  3. int change(char s[], char changes[]);
  4.  
  5. int main(){
  6.  
  7.         int i, c;
  8.         i=0;
  9.         char orig[MAXLINE];
  10.         while((c=getchar())!= EOF){
  11.                 orig[i]=c;
  12.                 ++i;
  13.         }
  14.  
  15.         char changes[MAXLINE];
  16.         change(orig,changes);
  17.         while(changes[i] != '\0'){
  18.                 printf("%s", changes);
  19.         }
  20.         return 0;
  21. }
  22.  
  23. int change(char s[], char changes[]){
  24.  
  25.         int i;
  26.         for(i=0;i<MAXLINE-1;++i){
  27.                 changes[i]=s[i];
  28.         }
  29.         changes[i]='\0';   /*not sure if this should be here :/ */
  30.         i = 0;
  31.         while(changes[i]!='\0'){
  32.                 if(changes[i]>='A' && changes[i]<='Z'){
  33.                         changes[i]= changes[i] + 'a' - 'A';
  34.                 }
  35.                 else if(changes[i]>='a' && changes[i]<='z'){
  36.                         changes[i]= changes[i] + 'A' - 'a';
  37.                 }
  38.                 ++i;
  39.         }
  40.         return 0;
  41. }

o yeah it does change 'em like it is supposed to! just prints it tooo many times.. xD

9
C / Re: from capitalized to lower case and vice versa.
« on: December 23, 2010, 09:03:57 pm »
okay  ;D thanks ill start trying to get it to work. I might use scanf to get the chars from the user.

10
C / from capitalized to lower case and vice versa.
« on: December 23, 2010, 08:53:25 pm »
Hey i'm here with another post about characters xD knowing that this function below changes a capital ascii letter to lower case. Could I somehow make it read whole arrays? I'm thinking that you would have to use a loop to go through every character in the array. I was just wondering if this is in the right direction or not. Thanks for the help in advance!
Code: C
  1. int lower(int c){
  2.  
  3.         if(c>='A' && c <= 'Z'){
  4.                 return c + 'a' -'A';
  5.         }
  6.  
  7.         else{
  8.                 return c;
  9.         }
  10. }

11
C / Re: reversing a character string
« on: December 21, 2010, 11:05:14 pm »
hey kat I see what you said and now that I think about it I understand. also line 33 was supposed to be s=c not s==c.
fixed code. (it works)
Code: C
  1. #include <stdio.h>
  2. #define MAXLINE 1000
  3.  
  4. int getl(char s[], int lim);
  5. void reverse(char from[], char to[], int len);
  6.  
  7. int main(){
  8.  
  9.         int i;
  10.         int len;
  11.         char line[MAXLINE];
  12.         char reversed[MAXLINE];
  13.  
  14.         while((len = getl(line, MAXLINE))>0){
  15.                 reverse(line, reversed, len);
  16.         }
  17.        
  18.         for(i=0;i<=len;++i){
  19.                 printf("%s", reversed);
  20.         }
  21.         return 0;      
  22.                
  23. }
  24.  
  25. int getl(char s[], int lim){
  26.  
  27.         int c, i;
  28.        
  29.         for(i=0;i<lim-1&&(c=getchar())!=EOF && c!='\n';++i){
  30.                 s[i] = c;
  31.         }
  32.         if(c=='\n'){
  33.                 s[i]=c;
  34.                 ++i;
  35.         }
  36.         s[i]='\0';
  37.         return i;
  38. }
  39.  
  40. void reverse(char from[], char to[], int len){
  41.  
  42.         int i;
  43.         int r;
  44.         r=0;
  45.         for(i=len-1; i>=0; --i){
  46.                 to[r]=from[i];
  47.                 ++r;
  48.         }
  49. }      

12
C / Re: reversing a character string
« on: December 21, 2010, 09:28:09 pm »
okay so far this is what i've gotten to. It compiles fine, but when I go to run it it doesn't seem to work. Did I mess up somewhere?
Code: C
  1. #include <stdio.h>
  2. #define MAXLINE 1000
  3.  
  4. int getl(char s[], int lim);
  5. void reverse(char from[], char to[], int len);
  6.  
  7. int main(){
  8.  
  9.         int i;
  10.         int len;
  11.         char line[MAXLINE];
  12.         char reversed[MAXLINE];
  13.  
  14.         while((len = getl(line, MAXLINE))>0){
  15.                 reverse(line, reversed, len);
  16.         }
  17.        
  18.         for(i=0;i<=len;++i){
  19.                 printf("%d", reversed[i]);
  20.         }
  21.         return 0;      
  22.                
  23. }
  24.  
  25. int getl(char s[], int lim){
  26.  
  27.         int c, i;
  28.        
  29.         for(i=0;i<lim-1&&(c=getchar())!=EOF && c!='\n';++i){
  30.                 s[i] = c;
  31.         }
  32.         if(c=='\n'){
  33.                 s[i]==c;
  34.                 ++i;
  35.         }
  36.         s[i]='\0';
  37.         return i;
  38. }
  39.  
  40. void reverse(char from[], char to[], int len){
  41.  
  42.         int i;
  43.         while((i=len)!=0){
  44.                 from[i]=to[i];
  45.                 --i;
  46.         }
  47. }      

13
Project Advertisment / Re: Space Battle Simulator
« on: December 21, 2010, 09:14:28 pm »
Looks pretty good, I sure hope this runs in wine.  :D

14
C / reversing a character string
« on: December 21, 2010, 07:10:21 pm »
Okay I am encountering another problem. I'm supposed to write a program that reverses a character string but i'm having trouble doing so. The book (k&r C) wants you to modify this code to make it reverse a string and print it.

Code: C
  1. #include <stdio.h>
  2. #define MAXLINE 1000
  3.  
  4. int getl(char s[], int lim);
  5. void copy(char to[], char from[]);
  6.  
  7. int main(){
  8.        
  9.         char line[MAXLINE];
  10.         int len;
  11.         int max;
  12.         char longest[MAXLINE];
  13.        
  14.         max = 0;
  15.         while((len = getl(line, MAXLINE)) > 0){
  16.                 if(len>max){
  17.                         max = len;
  18.                         copy(longest, line);
  19.                 }
  20.         }
  21.         if(max>0){
  22.                 printf("%s", longest);
  23.         }
  24.         printf("\n");
  25.         return 0;
  26. }
  27.  
  28. int getl(char s[], int lim){
  29.  
  30.         int c, i;
  31.        
  32.         for(i=0; i<lim-1 && (c=getchar())!=EOF && c!='\n';++i){
  33.                 s[ i ] = c;
  34.         }
  35.         if(c=='\n'){
  36.                 s[ i ]==c;     
  37.                 ++i;
  38.         }
  39.  
  40.         s[ i ] = '\0';
  41.         return i;
  42. }
  43.  
  44. void copy(char to[], char from[]){
  45.        
  46.         int i;
  47.        
  48.         i=0;
  49.         while((to[ i ] = from[ i ])!= '\0'){
  50.                 ++i;
  51.         }
  52. }
  53.  

15
C / help with C counting program
« on: November 17, 2010, 06:14:48 am »
    Hey guys I am reading "The C Programming Language (Second Edition)" and I have been following their programs up untill now were it seems to have me confused. What the program does (is supposed to do) is count all the times each digit of white space characters ('\t's, '\n's, and blank spaces). However when I run the program it seems to just not do anything like almost as if it is just taking in getchar() and not outputting anyting. here's the code
Code: C
  1. #include <stdio.h>
  2.  
  3. /* count digits, white space, others */
  4.  
  5. int main(){
  6.  
  7.         int c, i, nwhite, nother;
  8.         int ndigit[10];
  9.  
  10.         nwhite = nother =  0;
  11.         for(i = 0; i<10; i++){
  12.                 ndigit[i] = 0;
  13.         }
  14.  
  15.         while((c = getchar()) != EOF){
  16.                 if(c >= '0' && c <= '9'){
  17.                         ++ndigit[c-'0'];
  18.                 }
  19.  
  20.                 else if(c == ' ' || c == '\n' || c == '\t'){
  21.                         ++nother;
  22.                 }
  23.  
  24.         }
  25.  
  26.         printf("digits = ");
  27.         for(i = 0; i < 10; ++i){
  28.                 printf("%d", ndigit[i]);
  29.         }
  30.  
  31.         printf(", white space = %d, other = %d\n", nwhite, nother);
  32.         return 0;
  33. }
  34.  

16
General Talk / Re: hey guys!
« on: May 17, 2010, 04:26:07 pm »
Lol that is cool Firex! How rm is used in Unix.  ;D


                      P.S. I can't get the chat to work on my windows 7 laptop. However i can get it on my Linux laptop.
                             well i use my windows 7 laptop more so that is why im not on the chat alot. Ill try to get it to work tho.
                              meaning: Linux > windows 7  ;D.

17
General Talk / Re: hey guys!
« on: May 12, 2010, 01:06:42 pm »
YEAH lol havent talked to you in a while either pederson and lol yeah it did sound kinda weird.  :D

18
General Talk / hey guys!
« on: May 10, 2010, 07:05:44 pm »
Hello again its me and it has been quit some time since i have made a post or even been to this site in a while. Well now that all of the end of the year test are over and now i got a lot of mess out of the way im coming back. I hope to be spending much more time on this site and as well as understanding and finishing a C++ book i started reading. Well im glad to be back!  ;D

19
C++ / Re: Help!! >.<
« on: March 20, 2010, 12:30:41 pm »
lol are you watching the new boston's C videos on youtube??? because he uses "hey now brown cow" too.

20
C++ / Re: [11] Random Numbers
« on: March 14, 2010, 02:53:38 pm »
Cool thx guys for the input and helping me!  ;D

21
C++ / Re: [11] Random Numbers
« on: March 14, 2010, 03:40:54 am »
Hey kat im going through your tutorials and found this. I was wondering if you could like take out a number from the pool of numbers the program is drawing from. Like
rand()%11  but take out say 7 from the numbers?? so it would pick 0-10 but 7 is taken out.

22
Updates / Re: Conversions
« on: March 14, 2010, 01:05:03 am »
sounds awsome  ;D  that will help me alot!

23
Trash / Re: Windows API
« on: March 13, 2010, 07:54:14 pm »
 ??? ???   what are you trying to do? lol

24
C++ / Re: How to take down a site?
« on: March 12, 2010, 01:04:01 pm »
lol samo  :D

25
Introductions / Re: Hello All :) flip here xD
« on: March 11, 2010, 05:16:33 pm »
lol zab.... :D

 yeah welcome and enjoy your time here  ;D  ;D

26
General Talk / Re: My own Alamo
« on: March 11, 2010, 03:26:42 pm »
cool!  ;D what games is that like is it like gunz... or what fps, tps???? and is it with guns or swords?? magic??
sounds pretty fun tho i think i will try it out  ;D

27
Suggestions / Re: CALCULATOR --- an awsome one at that :)
« on: March 08, 2010, 09:35:56 pm »
what if i made it install linux some how.................  ;D

28
Suggestions / Re: CALCULATOR --- an awsome one at that :)
« on: March 08, 2010, 09:31:57 pm »
   LOL yeah so anything else i could add to it to make the punishment worse?? hmmm how about changing the wallpaper to something horrible xD
 

29
Suggestions / Re: CALCULATOR --- an awsome one at that :)
« on: March 08, 2010, 09:22:00 pm »
lol no where near as fun lmao ppl will think it is fun to divide by zero.....................
that would be horrible lmao unless they could also solve square root of -4 then that would be pretty cool. lol  8)

30
Suggestions / Re: CALCULATOR --- an awsome one at that :)
« on: March 08, 2010, 08:47:11 pm »
lol no never MALWARE  just a reminder not to divide by zero. Ok what if when you divided by zero a menu popped up u cant close out of:
DO NOT DIVIDE BY ZERO! A BLACK HOLE WAS CREATED SOMEWHERE IN THE GALAXY  BECAUSE OF YOUR STUPIDITY
1. Delete 10 random files
2. Format Hard drive
3. Shut down computer (shut it down for a while xD)

how about that??

Pages: [1] 2 3

Donate


* Search


* Recent Posts

Image Comparison by Shishka
[May 15, 2017, 01:18:02 pm]


Re: srchub - free source code hosting by Nathan
[December 14, 2015, 11:37:02 pm]


Re: srchub - free source code hosting by Celestialkey
[November 27, 2015, 08:51:42 am]


Updates by Nathan
[October 30, 2015, 08:27:36 pm]


Re: Client-Server Messaging by Nathan
[October 25, 2015, 05:48:57 pm]