I coded a C++ project on Windows with Visual C++ but when I try to convert it onto my mac (that has Xcode), I get some errors that I never got when I was on my Windows. If you could tell me how to set Xcode to understand Windows codes, that would be great. If you can't do that then please tell me how to set up a Windows C++ file or something.
Thanks.
Coded C++ on Windows...?
Compiling with a tool made by microsoft is not a good idea. They probobally rigged it to create an exeption :-D.
Saturday, May 22, 2010
S={1,{a,c},b,c}?
Hi, can someone help me ou with this, i have no idea how to do it.
Given set S={1,{a,c},b,c}
- P(A) or 2^A
- If the number of proper subsets of a set is 31, then what is the number of elements of this set?
thanks so much:P
S={1,{a,c},b,c}?
5, assuming a proper subset is not empty
P(S) means the 'powerset' of S. it is the set of all subsets of S
Given set S={1,{a,c},b,c}
- P(A) or 2^A
- If the number of proper subsets of a set is 31, then what is the number of elements of this set?
thanks so much:P
S={1,{a,c},b,c}?
5, assuming a proper subset is not empty
P(S) means the 'powerset' of S. it is the set of all subsets of S
S={1,{a,c},b,c}?
Hi, can someone help me ou with this, i have no idea how to do it.
Given set S={1,{a,c},b,c}
- P(A) or 2^A
- If the number of proper subsets of a set is 31, then what is the number of elements of this set?
thanks so much:P
S={1,{a,c},b,c}?
If a set S has n elements, there are 2^n (2 to the power of n) different ways to create a subset of S. Look at it this way: Think of S as n light bulbs numbered from 1 to n. If you want a subset X of S, you choose a subset of lights to turn on. So basically, for each light bulb, we choose to turn it on or off, and in the end, the set of light bulbs that we turned on make up the subset X.
For each light bulb we have two states (on or off), and these are all independent. (Choosing to turn one bulb on or off doesn't have any effect on what we do with another bulb.) Therefore, the total number of ways to set the light bulbs is 2x2x2x..x2 (n times), or 2^n.
If we want the number of subsets of S that are not equal to S, the answer is 2^n-1, because one of the subsets we create in the 2^n different subsets is the one where all the light bulbs are on, and therefore the subset is the same as S.
So if a set has 31 proper subsets, the number of elements n is the number n that gives you 2^n-1. Try a few values of n and see which one works!
By the way, the set S={1,{a,c},b,c} has only 4 elements, because {a,c}, being its own separate entity, only counts as one element.
Tell me if you have any more questions.
sweet pea
Given set S={1,{a,c},b,c}
- P(A) or 2^A
- If the number of proper subsets of a set is 31, then what is the number of elements of this set?
thanks so much:P
S={1,{a,c},b,c}?
If a set S has n elements, there are 2^n (2 to the power of n) different ways to create a subset of S. Look at it this way: Think of S as n light bulbs numbered from 1 to n. If you want a subset X of S, you choose a subset of lights to turn on. So basically, for each light bulb, we choose to turn it on or off, and in the end, the set of light bulbs that we turned on make up the subset X.
For each light bulb we have two states (on or off), and these are all independent. (Choosing to turn one bulb on or off doesn't have any effect on what we do with another bulb.) Therefore, the total number of ways to set the light bulbs is 2x2x2x..x2 (n times), or 2^n.
If we want the number of subsets of S that are not equal to S, the answer is 2^n-1, because one of the subsets we create in the 2^n different subsets is the one where all the light bulbs are on, and therefore the subset is the same as S.
So if a set has 31 proper subsets, the number of elements n is the number n that gives you 2^n-1. Try a few values of n and see which one works!
By the way, the set S={1,{a,c},b,c} has only 4 elements, because {a,c}, being its own separate entity, only counts as one element.
Tell me if you have any more questions.
sweet pea
Find Each Set?
Use A = {1, 3, 5, 7, 9}, B = {1, 5, 6, 7} and C = {1, 2 ,4, 6, 8, 9) to find each set below.
(1) A ∩ C
(2) (A U B) ∩ C
Find Each Set?
A n C means the point where set A and C intersect or the numbers that they have in common
Ans = {1, 9}
2. (A u B) means the numbers in a union between A and B and is equal to (1,3,5,7,9) now figure out were this new set intersects with n
Ans = {1,9}
Reply:please check the answer you have selected she taking union of A and B is (1,3,5,7,9) but this is wrong it should be (1,3,5,6,7,9) please ask to anyone who knows sets Report It
Reply:1.
A∩C={1,9}
2.
(AUB)∩C={1,3,5,6,7,9}∩{1,2,4,6,8,9}
={1,6,9}
Reply:q1
A ∩ C
= {1,9}
q2
(A U B) ∩ C
= {1,3,5,6,7,9} n {1,2,4,6,8,9}
= {1,9}
(1) A ∩ C
(2) (A U B) ∩ C
Find Each Set?
A n C means the point where set A and C intersect or the numbers that they have in common
Ans = {1, 9}
2. (A u B) means the numbers in a union between A and B and is equal to (1,3,5,7,9) now figure out were this new set intersects with n
Ans = {1,9}
Reply:please check the answer you have selected she taking union of A and B is (1,3,5,7,9) but this is wrong it should be (1,3,5,6,7,9) please ask to anyone who knows sets Report It
Reply:1.
A∩C={1,9}
2.
(AUB)∩C={1,3,5,6,7,9}∩{1,2,4,6,8,9}
={1,6,9}
Reply:q1
A ∩ C
= {1,9}
q2
(A U B) ∩ C
= {1,3,5,6,7,9} n {1,2,4,6,8,9}
= {1,9}
What is the formula for the combinations available in a set of 25 numbers, with the following restrictions?
This particular problem does not allow sets that contain any duplicate constituents, at all. So no sets that look like (A,A) or (B,B), or (Y,Y,Y...,Y), or (A,B,B), etc. Moreover, the sets that have the same numbers in different order all count as the same set. So, (A,B,C,D)=(C,B,A,D)=(D,A,B,C), etc. Those count as one set, not multiple sets. I know that 25! includes all possible combos, including duplicates and the same numbers in different order. But I can't remember the formula that eliminates the duplicates and the redundant sets. Thanks for the help.
What is the formula for the combinations available in a set of 25 numbers, with the following restrictions?
if you take the numbers one-by-one: 25! / ( (25-1)!*1! )
combination from n numbers taken by k: n! / ( (n-k)!*k! )
for example:
-25 numbers, taken by 7: 25! / (18!*7!)
-25 numbers, taken by 4: 25!/ (21!*4!)
bottle palm
What is the formula for the combinations available in a set of 25 numbers, with the following restrictions?
if you take the numbers one-by-one: 25! / ( (25-1)!*1! )
combination from n numbers taken by k: n! / ( (n-k)!*k! )
for example:
-25 numbers, taken by 7: 25! / (18!*7!)
-25 numbers, taken by 4: 25!/ (21!*4!)
bottle palm
What kind of code or lib sets up OOP? Specifically what is the “Overhead” that make C++ bigger than C ?
Have taken a few entry-level C++ programming classes at the local Junior college, NP. Then aced my assembly languange/MCU classes after that. But neither teacher talked about how OOP is set up. One said "you don't need to know the tiny details" the other said, "that's too far ahead of this class" So there is a gap in my understanding of how it all fits together. Is there anyone out there who can explain where/how C++ splits from C down at the register level?
What kind of code or lib sets up OOP? Specifically what is the “Overhead” that make C++ bigger than C ?
C++ calls have one extra address load, so they are not a big deal.
C++ does like to do a lot of data copying though, especially with strings where it likes to reallocate memory from the heap everytime you do something with a string (append or concatenate for example).
Other than that, it does not do much, if any, damage to your execution time. Most of the libraries in common are the same (floating point is floating point).
Some of the simpler OO stuff can be thought of as "structs with function pointers", but this is only true with very simple classes and breaks when you do inheritance.
You can compile c++ code through assembly and inspect the assembly listings (don't know if Windows C++ does this, but gnu and mingw32 will do it).
What kind of code or lib sets up OOP? Specifically what is the “Overhead” that make C++ bigger than C ?
C++ calls have one extra address load, so they are not a big deal.
C++ does like to do a lot of data copying though, especially with strings where it likes to reallocate memory from the heap everytime you do something with a string (append or concatenate for example).
Other than that, it does not do much, if any, damage to your execution time. Most of the libraries in common are the same (floating point is floating point).
Some of the simpler OO stuff can be thought of as "structs with function pointers", but this is only true with very simple classes and breaks when you do inheritance.
You can compile c++ code through assembly and inspect the assembly listings (don't know if Windows C++ does this, but gnu and mingw32 will do it).
Quesion about setting parameters in a ASP.NET C# page?
I want to be able to customize a page according to the id inputted in the URL http://CommonWA/AnnoucementDetail.aspx?I... like if I am on one page and I type 3 into a forum box labeled "id" or something and it goes to another page I want to make it so that the page is customized according to the id supplied. but I don't know how to make it so that it sets the value for the parameter in the URL, where would I go about coding this in the ASP.NET C# page? All I know is that it has something to do with the GET and the pageLoad method... I think
any help would be greatly appreciated, thanx in advanced :-)
Quesion about setting parameters in a ASP.NET C# page?
in the codebehind of the AnnoucementDetail.aspx, you would put something like this to get the parameter value:
private int id; //declare a var
Page_Load(...){
if (!Page.IsPostBack){
id = int.Parse(Request.QueryString("ID"));
//now the id var will contains whatever number you pass to it
//then just do some conditional checking on the id here to do whatever customization needed.
}
}
hope this helps.
any help would be greatly appreciated, thanx in advanced :-)
Quesion about setting parameters in a ASP.NET C# page?
in the codebehind of the AnnoucementDetail.aspx, you would put something like this to get the parameter value:
private int id; //declare a var
Page_Load(...){
if (!Page.IsPostBack){
id = int.Parse(Request.QueryString("ID"));
//now the id var will contains whatever number you pass to it
//then just do some conditional checking on the id here to do whatever customization needed.
}
}
hope this helps.
Subscribe to:
Posts (Atom)