The sort of solutions I am looking for involve racking for C.D.s in thier cases to be racked between 2 pieces of M.D.F. to which the racking system can be fixed
I am looking for C.D. storage solutions for a P.C. desk I am making, can you supply a source!?
check out misco, they have plenty of storage solutions
http://www.misco.co.uk/categories/~525~/...
Reply:buy a load of old chip pans you can put loads of c-ds.in them you could even paint them in different coulors to make them look pretty
Monday, May 24, 2010
Counting different word frequency in a string using c++?
I've to make a program to find the frequency of different words in a string that may contain spaces in sorted way. like if I've string
"dsaa wbaa sc" the output must be:
4a 1c 1d 2s 1w
Counting different word frequency in a string using c++?
Here you go:
#include%26lt;iostream%26gt;
using namespace std;
int main()
{
int alp[25]; //for 26 alphabets
int j;
for(j=0;j%26lt;26;j++)
alp[j]=0;
char str[20];
cout%26lt;%26lt;"Enter a string of max 20 char: ";
cin.getline(str,20);
int i;
for(i=0;i%26lt;strlen(str);i++)
{
if(str[i] != ' ')
++alp[str[i] - 'a'];
}
for(i=0;i%26lt;26;i++)
{
if(alp[i] != 0)
cout%26lt;%26lt;alp[i]%26lt;%26lt;(char)('a'+i)%26lt;%26lt;" ";
}
free(str);
return 0;
}
Hope this helps!
Reply:You can do this pretty easily using the STL map data-structure.
example accumulator
std::map%26lt;std::string, int%26gt; count = std::map%26lt;std::string,int%26gt;()
std::string tmpStr;
while(/* there is input */){
/*read tmpStr */
count[ tmpStr ]++;
}
...
output
std::cout %26lt;%26lt; String %26lt;%26lt; "\t" %26lt;%26lt; Count %26lt;%26lt; std::endl;
for (std::map%26lt;%26lt;:std::string, int%26gt;::iterator it = count.begin(); it != count.end(); ++i){
std::cout %26lt;%26lt; it-%26gt;first %26lt;%26lt; "\t" %26lt;%26lt; it-%26gt;second %26lt;%26lt; std::endl;
}
"dsaa wbaa sc" the output must be:
4a 1c 1d 2s 1w
Counting different word frequency in a string using c++?
Here you go:
#include%26lt;iostream%26gt;
using namespace std;
int main()
{
int alp[25]; //for 26 alphabets
int j;
for(j=0;j%26lt;26;j++)
alp[j]=0;
char str[20];
cout%26lt;%26lt;"Enter a string of max 20 char: ";
cin.getline(str,20);
int i;
for(i=0;i%26lt;strlen(str);i++)
{
if(str[i] != ' ')
++alp[str[i] - 'a'];
}
for(i=0;i%26lt;26;i++)
{
if(alp[i] != 0)
cout%26lt;%26lt;alp[i]%26lt;%26lt;(char)('a'+i)%26lt;%26lt;" ";
}
free(str);
return 0;
}
Hope this helps!
Reply:You can do this pretty easily using the STL map data-structure.
example accumulator
std::map%26lt;std::string, int%26gt; count = std::map%26lt;std::string,int%26gt;()
std::string tmpStr;
while(/* there is input */){
/*read tmpStr */
count[ tmpStr ]++;
}
...
output
std::cout %26lt;%26lt; String %26lt;%26lt; "\t" %26lt;%26lt; Count %26lt;%26lt; std::endl;
for (std::map%26lt;%26lt;:std::string, int%26gt;::iterator it = count.begin(); it != count.end(); ++i){
std::cout %26lt;%26lt; it-%26gt;first %26lt;%26lt; "\t" %26lt;%26lt; it-%26gt;second %26lt;%26lt; std::endl;
}
Microsoft visual c++ programs?
how do i create a Microsoft Visual C++ program that would use sequential sorting if i want to display the numbers defined by any user in ascending order and bubble sorting if the user wants to display the numbers in descending order?
Microsoft visual c++ programs?
check out http://www.pscode.com for great sample codes.
Reply:Here are a couple of good websites to check out.
http://www.codeproject.com
http://www.codeguru.com
I am sure if you searched those sites, you will find a bunch of sorting algorithims.
They usually distribute both the executable file and the source files.
You probably have to register in order to download, but it is free.
Reply:Don't use a bubble sort. It is the second slowest sort there is. (The only slower one that I know of is the serial search sort.)
Even the shell sort in Kerningham and Ritchie's C manual is almost reasonable. It is 4-5 lines of code so even if you duplicate it for ascending and descending it is quite reasonable to use.
Note: You can usually get rid of the slow divide by 2 with a bitwise right-shift %26gt;%26gt;
Microsoft visual c++ programs?
check out http://www.pscode.com for great sample codes.
Reply:Here are a couple of good websites to check out.
http://www.codeproject.com
http://www.codeguru.com
I am sure if you searched those sites, you will find a bunch of sorting algorithims.
They usually distribute both the executable file and the source files.
You probably have to register in order to download, but it is free.
Reply:Don't use a bubble sort. It is the second slowest sort there is. (The only slower one that I know of is the serial search sort.)
Even the shell sort in Kerningham and Ritchie's C manual is almost reasonable. It is 4-5 lines of code so even if you duplicate it for ascending and descending it is quite reasonable to use.
Note: You can usually get rid of the slow divide by 2 with a bitwise right-shift %26gt;%26gt;
How can you write a random generated C++ program?
The program should display at least 50 numbers and sort it from lowest to highest.
How can you write a random generated C++ program?
do your homework, it is good for you.
Reply:well
u have to use a seed that gives time(0) for intializing
then use rand() function , (if it's not important for u that what kind of numbers will generate)
then use a loop (a for or while and even if loop might help), u know how.
store these nums into an array ( do this in the loop u've defined) i mean each time that rand generates a number u have to store it in one of the array places! :D
then use bubble sort to sort it (look at arrays chapter in deitel's c++ boook ;)
ok i think it might help
;)
Reply:int hw_sucks[50];
for(lcv = 0; lcv %26lt; 50; lcv++)
hw_sucks[lcv] = get_random_number(low, high); //Write this on your own, or use the random function provided by C.
Man qsort(), it will sort things for you.
qsort(hw_sucks, sizeof(int), blah blah blah, not sure of this, that's why I said man it. BAM! Your homework is done, and you're less of a n00b.
bouquet
How can you write a random generated C++ program?
do your homework, it is good for you.
Reply:well
u have to use a seed that gives time(0) for intializing
then use rand() function , (if it's not important for u that what kind of numbers will generate)
then use a loop (a for or while and even if loop might help), u know how.
store these nums into an array ( do this in the loop u've defined) i mean each time that rand generates a number u have to store it in one of the array places! :D
then use bubble sort to sort it (look at arrays chapter in deitel's c++ boook ;)
ok i think it might help
;)
Reply:int hw_sucks[50];
for(lcv = 0; lcv %26lt; 50; lcv++)
hw_sucks[lcv] = get_random_number(low, high); //Write this on your own, or use the random function provided by C.
Man qsort(), it will sort things for you.
qsort(hw_sucks, sizeof(int), blah blah blah, not sure of this, that's why I said man it. BAM! Your homework is done, and you're less of a n00b.
bouquet
Do you think Chelsea losing Jose is really just like them losing a good player?
In that, do you think the role of a manager is far less important than that of the combined players? Losing Jose is obviously going to have some sort of negative effect on Chelsea, as he was good at taking the pressure of his players and was very calculated when it came to obtaining difficult results. I just think that the results since Grant came would have been almost identical to if Jose had still been in charge. The poor patch would be down to a lack of key players (Lamps, Drogba, Ricci C) rather than anything else.
So do you think that Jose leaving is far less detrimental to the team than, for example, Henry leaving Arsenal?
Do you think Chelsea losing Jose is really just like them losing a good player?
IT'S MUCH MORE THAN THAT.
Reply:Any team losing their manager, especially one that the team has much faith in, will hit them hard. Expect a decline. 'Tis normal.
Reply:yes
Reply:wenger leaving arsenal would be worse for arsenal then them selling half there squad.
in chelsea's case when carvelho and essein are in the team they play on a different level and i would expect any manager to get results with that team.
but drawing with rosenborg is a poor poor result even with injuries so was the playing for most of the season from jose.
jose made chelsea unbeatable at times
but lets hope now with that grit and more attacking the dominance will come on all stages.
chelsea have very attacking players in cole belleti cole again lampard maluda phillips so a change of manager and style can do them good.
Reply:The thing with Mourinho is that he was just as much the face of Chelsea as Terry, Lampard, Cole, or any other big name on the team.
As a trainer, Jose is good. He led Chelsea to an undefeated season a couple of years ago. Though that has something to do with the quality of the players, the coach also has to arrange them and find the perfect combination and player chemistry on the field. He basically has to make the team work. He's like the guy that oils the machine and checks that every piece is in place before turning it on to ensure that it performs at its best.
And just like the machine, if you replace a piece on the machine that was of a good brand with that a cheaper one, your results won't be as good. The injured players had to be replaced with others that simply couldn't do the job. Grant will get the added lift when some of the stars, like Drogba, return.
Mourinho had set the perfect lineup for Chelsea and if Grant can keep it going, the impact of Mourinho's departure won't be felt as much.
Reply:The jury's still out, with two wins a loss and a draw in the first four matches...but I'd say overall, when you lose one of the top managers, not just in England, but in the world, you will drop off significantly...even Sir Alex was quoted as saying his departure was bad for the game.
I for one am still shell-shocked, since Mourinho is the one who got me back interested in the game after 15 years away.
Reply:All I'll say is Mourinho was removed before he became an institution.
I have no doubts as a Man Utd fan that Chelsea under Mourinho were the biggest threat to future premiership success for United.
They have the squad and had the manager with the potential to win virtually everything for very many years.
It's a little too early to say whether much has changed but I believe something definitely has. I believe Chelsea will be set back a couple of years if they don't manage to find someone of the same calibre as a replacement in the immediate future.
At Old Trafford, we've seen great players come and go but the one thing that has made and kept us successful has been our manager. he is our institution.
So do you think that Jose leaving is far less detrimental to the team than, for example, Henry leaving Arsenal?
Do you think Chelsea losing Jose is really just like them losing a good player?
IT'S MUCH MORE THAN THAT.
Reply:Any team losing their manager, especially one that the team has much faith in, will hit them hard. Expect a decline. 'Tis normal.
Reply:yes
Reply:wenger leaving arsenal would be worse for arsenal then them selling half there squad.
in chelsea's case when carvelho and essein are in the team they play on a different level and i would expect any manager to get results with that team.
but drawing with rosenborg is a poor poor result even with injuries so was the playing for most of the season from jose.
jose made chelsea unbeatable at times
but lets hope now with that grit and more attacking the dominance will come on all stages.
chelsea have very attacking players in cole belleti cole again lampard maluda phillips so a change of manager and style can do them good.
Reply:The thing with Mourinho is that he was just as much the face of Chelsea as Terry, Lampard, Cole, or any other big name on the team.
As a trainer, Jose is good. He led Chelsea to an undefeated season a couple of years ago. Though that has something to do with the quality of the players, the coach also has to arrange them and find the perfect combination and player chemistry on the field. He basically has to make the team work. He's like the guy that oils the machine and checks that every piece is in place before turning it on to ensure that it performs at its best.
And just like the machine, if you replace a piece on the machine that was of a good brand with that a cheaper one, your results won't be as good. The injured players had to be replaced with others that simply couldn't do the job. Grant will get the added lift when some of the stars, like Drogba, return.
Mourinho had set the perfect lineup for Chelsea and if Grant can keep it going, the impact of Mourinho's departure won't be felt as much.
Reply:The jury's still out, with two wins a loss and a draw in the first four matches...but I'd say overall, when you lose one of the top managers, not just in England, but in the world, you will drop off significantly...even Sir Alex was quoted as saying his departure was bad for the game.
I for one am still shell-shocked, since Mourinho is the one who got me back interested in the game after 15 years away.
Reply:All I'll say is Mourinho was removed before he became an institution.
I have no doubts as a Man Utd fan that Chelsea under Mourinho were the biggest threat to future premiership success for United.
They have the squad and had the manager with the potential to win virtually everything for very many years.
It's a little too early to say whether much has changed but I believe something definitely has. I believe Chelsea will be set back a couple of years if they don't manage to find someone of the same calibre as a replacement in the immediate future.
At Old Trafford, we've seen great players come and go but the one thing that has made and kept us successful has been our manager. he is our institution.
How do I transition my career to Business Management or Employee Development?
I've worked in technical maintenance, computers, and robotics most of my life. I sort of "fell into" my current career path because of my love of technology and analytical skills.
In 2005 I graduated with my bachelors degree in Business Administration. I did pretty good by graduating C.um Laude with a GPA of 3.5. I've learned that a have a strong desire to be envolved in employee development. Particularly in implementing an effective employee evaluation program that instills intrinsic motivation and encourages employees to improve skills and performance and add value to their company. I can't express how passionate I am about this.
I need to make 65K plus per year to support my family and pay off college loans. What type of career should I pursue and how should I transition with very little former experience?
How do I transition my career to Business Management or Employee Development?
How about applying for a H.R. position? Not sure if you will make what you want, but eventually you will gain experience so you can demand a higher salary.
In 2005 I graduated with my bachelors degree in Business Administration. I did pretty good by graduating C.um Laude with a GPA of 3.5. I've learned that a have a strong desire to be envolved in employee development. Particularly in implementing an effective employee evaluation program that instills intrinsic motivation and encourages employees to improve skills and performance and add value to their company. I can't express how passionate I am about this.
I need to make 65K plus per year to support my family and pay off college loans. What type of career should I pursue and how should I transition with very little former experience?
How do I transition my career to Business Management or Employee Development?
How about applying for a H.R. position? Not sure if you will make what you want, but eventually you will gain experience so you can demand a higher salary.
Unblocking the C drive?
At school they have blocked acsess to the C:\ drive. Thats fine by me, But it includes all extra Visual basic components. so, One of the computer idols at school suggested a script of some sort to allow acsess.
I want to know if its possible, and if it is, HOw?
Unblocking the C drive?
The administrator [admin priveledges] is the one who has access to this option, thru the control panel. If you qualify, maybe they can "let you in". But they probably limited access for a reason!
Schools, banks %26amp; large institutions do this as protocol- they never know who can get in and modify preferences, to which the general users aren't privy. Thus avoiding expensive system complications.
Reply:At our school, you can open firefox then in the address bar type in C:\ then it will open in the browser. you can find what you need and "download" it off of the computer into a memory stick, or, if you have one, onto your personal drive that schools usually give students.
Reply:open notepad and type "command" (without quotes) and save it as "cmd.bat" (without quotes) to somewhere you will be able to find it, the double click it and you will get the command prompt up, type "net user" (with space's) and press enter, you will then get a list of user-names, now type "net user user-name * "press enter (where user name is type one of the user-names listed, and * is not a typing mistake) type a new password and type a new password press enter, log off and type in the user-name you have just changed the password on and put in the password. or see http://support.microsoft.com/kb/149427
Reply:the admin of the domain network has set the permissions on c drive for authentic users to deny full control on c drive
Reply:well you don't need to get into the c drive anyway because if you are not knowledgeable enough to know how to get into it then you will probs mess it up
I want to know if its possible, and if it is, HOw?
Unblocking the C drive?
The administrator [admin priveledges] is the one who has access to this option, thru the control panel. If you qualify, maybe they can "let you in". But they probably limited access for a reason!
Schools, banks %26amp; large institutions do this as protocol- they never know who can get in and modify preferences, to which the general users aren't privy. Thus avoiding expensive system complications.
Reply:At our school, you can open firefox then in the address bar type in C:\ then it will open in the browser. you can find what you need and "download" it off of the computer into a memory stick, or, if you have one, onto your personal drive that schools usually give students.
Reply:open notepad and type "command" (without quotes) and save it as "cmd.bat" (without quotes) to somewhere you will be able to find it, the double click it and you will get the command prompt up, type "net user" (with space's) and press enter, you will then get a list of user-names, now type "net user user-name * "press enter (where user name is type one of the user-names listed, and * is not a typing mistake) type a new password and type a new password press enter, log off and type in the user-name you have just changed the password on and put in the password. or see http://support.microsoft.com/kb/149427
Reply:the admin of the domain network has set the permissions on c drive for authentic users to deny full control on c drive
Reply:well you don't need to get into the c drive anyway because if you are not knowledgeable enough to know how to get into it then you will probs mess it up
Subscribe to:
Posts (Atom)