Index | Recent Threads | Unanswered Threads | Who's Active | Guidelines | Search |
![]() |
World Community Grid Forums
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
No member browsing this thread |
Thread Status: Active Total posts in this thread: 628
|
![]() |
Author |
|
Former Member
Cruncher Joined: May 22, 2018 Post Count: 0 Status: Offline |
Writing a program to play Blackjack in C is driving me off the wall.. I'm really not good at this stuff. Most folks aren't. You have to think very logically and in very great detail. It's requires a rather particular type of madness to succeed at. Use a multivalue two dimensional array for the card deck. One value determines which card value to display, the other the point value. Use a random value function to set the deck. The index for the array values in the position in the deck. When card are dealt to the player(s), their hand is just the sum of the values though the dual value of the ace is a bit of extra handling. Sort out all the steps in "English" aka psuedocode and when you have all the details laid out, then you just have to translate it into the C syntax. I FINISHED!! After 20 hours.. (yes I know I'm slow, not good at this stuff). On another note.. UC Berkeley was hacked. They lose 97,000 Social Security numbers + other stuff. Berkeley made a site addressing this: http://datatheft.berkeley.edu/news.shtml I'm a programmer and I hated programming in C. C++ was even worse because they actually tried to pass that junk off as object oriented programing. I usually program in assembly language (for nice tight procedures) and pascal because it's English. UC Berkeley needs to have their IT staff fired. That whole mess was their fault. I hope they aren't this country's future computer scientists! It's time to turn off IPv4 and turn on IPv6. At least it can help stupid people not do stupid things. I've been programming for 37 years now and I never particularly liked C. It has often been called the "language that grades itself". Using C syntax, C++ would then be "D", also a language that grades itself. The IT staff at UC Berkeley are morons. They should know better than to have sensitive data on a public network. I see nothing has changed since I left Berkeley. The place was run by idiots back then as well. - D Can someone explain user defined header files? I have all my functions and everything in lab4.c I'm supposed to submit three files -- lab4.c , deck.c , deck.h What I did was only have my main() in lab4.c and included deck.h. I put all my declarations and functions in deck.h. I don't know what deck.c is supposed to contain? If anyone has AIM, my AIM is under this post. By the way, it's due at midnight.. ![]() I'm probably going to screw this up, but I will try to lite up some old brain cells... There are library header files, and user header files. Library header files are for the public .C include files. User header files are for the include files that you write. If you write an include file, it's all full of procedures or functions. You have to declare those, and that's the header file is for. Sorry if this doesn't help much. My son is bugging me, and I thought I dumped my knowledge of C ![]() OMG - This reminds me of why I hated programming in C Yea. I know the functions, etc go in the .h files. I don't know what goes in deck.c. |
||
|
keithhenry
Ace Cruncher Senile old farts of the world ....uh.....uh..... nevermind Joined: Nov 18, 2004 Post Count: 18665 Status: Offline Project Badges: ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Writing a program to play Blackjack in C is driving me off the wall.. I'm really not good at this stuff. Most folks aren't. You have to think very logically and in very great detail. It's requires a rather particular type of madness to succeed at. Use a multivalue two dimensional array for the card deck. One value determines which card value to display, the other the point value. Use a random value function to set the deck. The index for the array values in the position in the deck. When card are dealt to the player(s), their hand is just the sum of the values though the dual value of the ace is a bit of extra handling. Sort out all the steps in "English" aka psuedocode and when you have all the details laid out, then you just have to translate it into the C syntax. I FINISHED!! After 20 hours.. (yes I know I'm slow, not good at this stuff). On another note.. UC Berkeley was hacked. They lose 97,000 Social Security numbers + other stuff. Berkeley made a site addressing this: http://datatheft.berkeley.edu/news.shtml I'm a programmer and I hated programming in C. C++ was even worse because they actually tried to pass that junk off as object oriented programing. I usually program in assembly language (for nice tight procedures) and pascal because it's English. UC Berkeley needs to have their IT staff fired. That whole mess was their fault. I hope they aren't this country's future computer scientists! It's time to turn off IPv4 and turn on IPv6. At least it can help stupid people not do stupid things. I've been programming for 37 years now and I never particularly liked C. It has often been called the "language that grades itself". Using C syntax, C++ would then be "D", also a language that grades itself. The IT staff at UC Berkeley are morons. They should know better than to have sensitive data on a public network. I see nothing has changed since I left Berkeley. The place was run by idiots back then as well. - D Can someone explain user defined header files? I have all my functions and everything in lab4.c I'm supposed to submit three files -- lab4.c , deck.c , deck.h What I did was only have my main() in lab4.c and included deck.h. I put all my declarations and functions in deck.h. I don't know what deck.c is supposed to contain? If anyone has AIM, my AIM is under this post. By the way, it's due at midnight.. ![]() I'm probably going to screw this up, but I will try to lite up some old brain cells... There are library header files, and user header files. Library header files are for the public .C include files. User header files are for the include files that you write. If you write an include file, it's all full of procedures or functions. You have to declare those, and that's the header file is for. Sorry if this doesn't help much. My son is bugging me, and I thought I dumped my knowledge of C ![]() OMG - This reminds me of why I hated programming in C Yea. I know the functions, etc go in the .h files. I don't know what goes in deck.c. Blizzie, from what I can discern from googling deck.c, it appears the deck of cards goes there and the deck (array) is passed as a parameter to the program. Does that make any sense? Just an educated guess on my part. |
||
|
Former Member
Cruncher Joined: May 22, 2018 Post Count: 0 Status: Offline |
I hope you all remember to wish for a Cool Mother's Day for your motherboards (and your moms too for that matter
![]() |
||
|
darth_vader
Veteran Cruncher A galaxy far, far away... Joined: Jul 13, 2005 Post Count: 514 Status: Offline Project Badges: ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Writing a program to play Blackjack in C is driving me off the wall.. I'm really not good at this stuff. Most folks aren't. You have to think very logically and in very great detail. It's requires a rather particular type of madness to succeed at. Use a multivalue two dimensional array for the card deck. One value determines which card value to display, the other the point value. Use a random value function to set the deck. The index for the array values in the position in the deck. When card are dealt to the player(s), their hand is just the sum of the values though the dual value of the ace is a bit of extra handling. Sort out all the steps in "English" aka psuedocode and when you have all the details laid out, then you just have to translate it into the C syntax. I FINISHED!! After 20 hours.. (yes I know I'm slow, not good at this stuff). On another note.. UC Berkeley was hacked. They lose 97,000 Social Security numbers + other stuff. Berkeley made a site addressing this: http://datatheft.berkeley.edu/news.shtml I'm a programmer and I hated programming in C. C++ was even worse because they actually tried to pass that junk off as object oriented programing. I usually program in assembly language (for nice tight procedures) and pascal because it's English. UC Berkeley needs to have their IT staff fired. That whole mess was their fault. I hope they aren't this country's future computer scientists! It's time to turn off IPv4 and turn on IPv6. At least it can help stupid people not do stupid things. I've been programming for 37 years now and I never particularly liked C. It has often been called the "language that grades itself". Using C syntax, C++ would then be "D", also a language that grades itself. The IT staff at UC Berkeley are morons. They should know better than to have sensitive data on a public network. I see nothing has changed since I left Berkeley. The place was run by idiots back then as well. - D Can someone explain user defined header files? I have all my functions and everything in lab4.c I'm supposed to submit three files -- lab4.c , deck.c , deck.h What I did was only have my main() in lab4.c and included deck.h. I put all my declarations and functions in deck.h. I don't know what deck.c is supposed to contain? If anyone has AIM, my AIM is under this post. By the way, it's due at midnight.. ![]() I'm probably going to screw this up, but I will try to lite up some old brain cells... There are library header files, and user header files. Library header files are for the public .C include files. User header files are for the include files that you write. If you write an include file, it's all full of procedures or functions. You have to declare those, and that's the header file is for. Sorry if this doesn't help much. My son is bugging me, and I thought I dumped my knowledge of C ![]() OMG - This reminds me of why I hated programming in C Yea. I know the functions, etc go in the .h files. I don't know what goes in deck.c. Blizzie, from what I can discern from googling deck.c, it appears the deck of cards goes there and the deck (array) is passed as a parameter to the program. Does that make any sense? Just an educated guess on my part. I would assume that deck.c would contain the routines that manage the data structure for your card deck. There would probably be an initialize, shuffle and deal card routine. When you run out of cards in the main program, you probably need a routine that will shuffle the cards and also mark the cards for the current hand as unavailable. That, in turn probably begets a routine that marks a card as having been dealt and available for later reuse (so that you don't shuffle the cards in the current hand). I'm sorry I can't be more C - specific. I haven't touched C in 20 years and I never did use it much. Obviously, this would be much simpler to do in a single program. I've been quite annoyed over the years that programming classes these days often spell out exactly how they want things to be done. In the old days, you were usually given a spec that described the inputs and outputs (and maybe the algorithm if it was complicated). You were on your own to come up with a good design. Today, I see far too many CS grads that are not capable of this. It's one reason why we tend to hire CS grads with master's degrees these days. Often, that still isn't good enough. In addition, as someone said earlier, there is also a natural talent aspect to programming as well. A well educated programmer is no guarantee of a good programmer. Sorry for the rant. I think this all ties in with the complaints over the last few days about the constantly evolving and horribly unstable state of BOINC. BOINC is a simple application. It should be flawless by now. - D |
||
|
Former Member
Cruncher Joined: May 22, 2018 Post Count: 0 Status: Offline |
Writing a program to play Blackjack in C is driving me off the wall.. I'm really not good at this stuff. Most folks aren't. You have to think very logically and in very great detail. It's requires a rather particular type of madness to succeed at. Use a multivalue two dimensional array for the card deck. One value determines which card value to display, the other the point value. Use a random value function to set the deck. The index for the array values in the position in the deck. When card are dealt to the player(s), their hand is just the sum of the values though the dual value of the ace is a bit of extra handling. Sort out all the steps in "English" aka psuedocode and when you have all the details laid out, then you just have to translate it into the C syntax. I FINISHED!! After 20 hours.. (yes I know I'm slow, not good at this stuff). On another note.. UC Berkeley was hacked. They lose 97,000 Social Security numbers + other stuff. Berkeley made a site addressing this: http://datatheft.berkeley.edu/news.shtml I'm a programmer and I hated programming in C. C++ was even worse because they actually tried to pass that junk off as object oriented programing. I usually program in assembly language (for nice tight procedures) and pascal because it's English. UC Berkeley needs to have their IT staff fired. That whole mess was their fault. I hope they aren't this country's future computer scientists! It's time to turn off IPv4 and turn on IPv6. At least it can help stupid people not do stupid things. I've been programming for 37 years now and I never particularly liked C. It has often been called the "language that grades itself". Using C syntax, C++ would then be "D", also a language that grades itself. The IT staff at UC Berkeley are morons. They should know better than to have sensitive data on a public network. I see nothing has changed since I left Berkeley. The place was run by idiots back then as well. - D Can someone explain user defined header files? I have all my functions and everything in lab4.c I'm supposed to submit three files -- lab4.c , deck.c , deck.h What I did was only have my main() in lab4.c and included deck.h. I put all my declarations and functions in deck.h. I don't know what deck.c is supposed to contain? If anyone has AIM, my AIM is under this post. By the way, it's due at midnight.. ![]() I'm probably going to screw this up, but I will try to lite up some old brain cells... There are library header files, and user header files. Library header files are for the public .C include files. User header files are for the include files that you write. If you write an include file, it's all full of procedures or functions. You have to declare those, and that's the header file is for. Sorry if this doesn't help much. My son is bugging me, and I thought I dumped my knowledge of C ![]() OMG - This reminds me of why I hated programming in C Yea. I know the functions, etc go in the .h files. I don't know what goes in deck.c. Blizzie, from what I can discern from googling deck.c, it appears the deck of cards goes there and the deck (array) is passed as a parameter to the program. Does that make any sense? Just an educated guess on my part. I would assume that deck.c would contain the routines that manage the data structure for your card deck. There would probably be an initialize, shuffle and deal card routine. When you run out of cards in the main program, you probably need a routine that will shuffle the cards and also mark the cards for the current hand as unavailable. That, in turn probably begets a routine that marks a card as having been dealt and available for later reuse (so that you don't shuffle the cards in the current hand). I'm sorry I can't be more C - specific. I haven't touched C in 20 years and I never did use it much. Obviously, this would be much simpler to do in a single program. I've been quite annoyed over the years that programming classes these days often spell out exactly how they want things to be done. In the old days, you were usually given a spec that described the inputs and outputs (and maybe the algorithm if it was complicated). You were on your own to come up with a good design. Today, I see far too many CS grads that are not capable of this. It's one reason why we tend to hire CS grads with master's degrees these days. Often, that still isn't good enough. In addition, as someone said earlier, there is also a natural talent aspect to programming as well. A well educated programmer is no guarantee of a good programmer. Sorry for the rant. I think this all ties in with the complaints over the last few days about the constantly evolving and horribly unstable state of BOINC. BOINC is a simple application. It should be flawless by now. - D This is a whole 'nother level of nerdiness for the MOT forum. |
||
|
Former Member
Cruncher Joined: May 22, 2018 Post Count: 0 Status: Offline |
Writing a program to play Blackjack in C is driving me off the wall.. I'm really not good at this stuff. Most folks aren't. You have to think very logically and in very great detail. It's requires a rather particular type of madness to succeed at. Use a multivalue two dimensional array for the card deck. One value determines which card value to display, the other the point value. Use a random value function to set the deck. The index for the array values in the position in the deck. When card are dealt to the player(s), their hand is just the sum of the values though the dual value of the ace is a bit of extra handling. Sort out all the steps in "English" aka psuedocode and when you have all the details laid out, then you just have to translate it into the C syntax. I FINISHED!! After 20 hours.. (yes I know I'm slow, not good at this stuff). On another note.. UC Berkeley was hacked. They lose 97,000 Social Security numbers + other stuff. Berkeley made a site addressing this: http://datatheft.berkeley.edu/news.shtml I'm a programmer and I hated programming in C. C++ was even worse because they actually tried to pass that junk off as object oriented programing. I usually program in assembly language (for nice tight procedures) and pascal because it's English. UC Berkeley needs to have their IT staff fired. That whole mess was their fault. I hope they aren't this country's future computer scientists! It's time to turn off IPv4 and turn on IPv6. At least it can help stupid people not do stupid things. I've been programming for 37 years now and I never particularly liked C. It has often been called the "language that grades itself". Using C syntax, C++ would then be "D", also a language that grades itself. The IT staff at UC Berkeley are morons. They should know better than to have sensitive data on a public network. I see nothing has changed since I left Berkeley. The place was run by idiots back then as well. - D Can someone explain user defined header files? I have all my functions and everything in lab4.c I'm supposed to submit three files -- lab4.c , deck.c , deck.h What I did was only have my main() in lab4.c and included deck.h. I put all my declarations and functions in deck.h. I don't know what deck.c is supposed to contain? If anyone has AIM, my AIM is under this post. By the way, it's due at midnight.. ![]() I'm probably going to screw this up, but I will try to lite up some old brain cells... There are library header files, and user header files. Library header files are for the public .C include files. User header files are for the include files that you write. If you write an include file, it's all full of procedures or functions. You have to declare those, and that's the header file is for. Sorry if this doesn't help much. My son is bugging me, and I thought I dumped my knowledge of C ![]() OMG - This reminds me of why I hated programming in C Yea. I know the functions, etc go in the .h files. I don't know what goes in deck.c. Blizzie, from what I can discern from googling deck.c, it appears the deck of cards goes there and the deck (array) is passed as a parameter to the program. Does that make any sense? Just an educated guess on my part. I would assume that deck.c would contain the routines that manage the data structure for your card deck. There would probably be an initialize, shuffle and deal card routine. When you run out of cards in the main program, you probably need a routine that will shuffle the cards and also mark the cards for the current hand as unavailable. That, in turn probably begets a routine that marks a card as having been dealt and available for later reuse (so that you don't shuffle the cards in the current hand). I'm sorry I can't be more C - specific. I haven't touched C in 20 years and I never did use it much. Obviously, this would be much simpler to do in a single program. I've been quite annoyed over the years that programming classes these days often spell out exactly how they want things to be done. In the old days, you were usually given a spec that described the inputs and outputs (and maybe the algorithm if it was complicated). You were on your own to come up with a good design. Today, I see far too many CS grads that are not capable of this. It's one reason why we tend to hire CS grads with master's degrees these days. Often, that still isn't good enough. In addition, as someone said earlier, there is also a natural talent aspect to programming as well. A well educated programmer is no guarantee of a good programmer. Sorry for the rant. I think this all ties in with the complaints over the last few days about the constantly evolving and horribly unstable state of BOINC. BOINC is a simple application. It should be flawless by now. - D This is a whole 'nother level of nerdiness for the MOT forum. ![]() ![]() ![]() |
||
|
Dataman
Ace Cruncher Joined: Nov 16, 2004 Post Count: 4865 Status: Offline Project Badges: ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
YoYo News
----------------------------------------09 May 2009 Rechnkraft.net e.V. first scientific contribution Hello, the registered non-profit association Rechenkraft.net e.V. made a major step ahead and proudly announces a first contribution to a scientific article in one of the major microbiology journals (Molecular Microbiology). As the result of a cooperation project carried out with the work group of Prof. Dr. Umesh Varshney from the Department of Microbiology and Cell Biology at the Indian Institute of Science, Bangalore, India, we just published an article about the Impact of rRNA methylations on ribosome recycling and fidelity of initiation in Escherichia coli. Notably, one of the computer modeling figures computed for this article even made it to the cover image of Molecular Microbiology's May issue. With this step, the volunteer computing association Rechenkraft.net left its first scientific footprints. We will further proceed to contribute and support world wide distributed and grid computing and, in addition to this, try to generate and evaluate some of the processed results by lab experiments where possible in the future. We are happy about each new member joining our association to support our efforts and, of course, donations are also welcome ;). Kind regards, yoyo & Michael. ![]() |
||
|
Former Member
Cruncher Joined: May 22, 2018 Post Count: 0 Status: Offline |
YoYo News 09 May 2009 Rechnkraft.net e.V. first scientific contribution Hello, the registered non-profit association Rechenkraft.net e.V. made a major step ahead and proudly announces a first contribution to a scientific article in one of the major microbiology journals (Molecular Microbiology). As the result of a cooperation project carried out with the work group of Prof. Dr. Umesh Varshney from the Department of Microbiology and Cell Biology at the Indian Institute of Science, Bangalore, India, we just published an article about the Impact of rRNA methylations on ribosome recycling and fidelity of initiation in Escherichia coli. Notably, one of the computer modeling figures computed for this article even made it to the cover image of Molecular Microbiology's May issue. With this step, the volunteer computing association Rechenkraft.net left its first scientific footprints. We will further proceed to contribute and support world wide distributed and grid computing and, in addition to this, try to generate and evaluate some of the processed results by lab experiments where possible in the future. We are happy about each new member joining our association to support our efforts and, of course, donations are also welcome ;). Kind regards, yoyo & Michael. Molecular Microbiology? Can you say "safety publication?" Come back next time when American Microbiology Weekly accepts a publication... ![]() |
||
|
keithhenry
Ace Cruncher Senile old farts of the world ....uh.....uh..... nevermind Joined: Nov 18, 2004 Post Count: 18665 Status: Offline Project Badges: ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
MyOnlineTeam Daily Statistics for 05/10 - All Members:
----------------------------------------Team rank movement report =========================
Points milestones report ======================== No points milestones found. ![]() Runtime milestones report ========================= Vuj reached 8 years of runtime ![]() elpe reached 2 years of runtime ![]() Results returned milestones report ================================== brown chris returned their 3,000th result ![]() New members report ================== No new members found. ![]() Retired members report ====================== No new retired members found. ![]() For the week as a team: Statistics Total Run Time Points Results Team Records: Results Returned: 12/19/2007 2,522 Points: 05/06/2009 518,871 Runtime: 01/25/2006 1:123:00:53:34 Good crunching folks!!!! |
||
|
keithhenry
Ace Cruncher Senile old farts of the world ....uh.....uh..... nevermind Joined: Nov 18, 2004 Post Count: 18665 Status: Offline Project Badges: ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
MyOnlineTeam Daily Statistics for 05/10 - Active Members
----------------------------------------Active team members report ==========================
Note: Active members are those who earned points in the prior 30 days. Top Twenty active members returning points today: 01: esoteric17 - 76,238 points 02: RT - 49,910 points 03: Coingames - 32,366 points 04: Mushball - 26,975 points 05: Dataman - 23,941 points 06: Blueprint - 20,448 points 07: Dave Bell - 19,331 points 08: brown chris - 16,688 points 09: keithhenry - 14,916 points 10: The Aspens - 14,203 points 11: marysduby - 9,652 points 12: Vuj - 9,075 points 13: parmesian - 8,738 points 14: Dresser - 6,125 points 15: frans6nl - 5,579 points 16: sulcata - 5,198 points 17: PohSoon - 4,504 points 18: darth_vader - 4,462 points 19: stares - 4,213 points 20: Esteban69 - 3,603 points Total points returned today: 392,683 Active members returning points today: 44 Average points per member active today: 8,924.61364 |
||
|
|
![]() |