"Nervous Around Beautiful Women? There's a Rule for That"

I could talk to any woman I wasn't attracted to. Charming, funny, relaxed. Then a gorgeous woman looked my way and I'd become a sweating, babbling mess.

The fix took me years to find and ten minutes to learn. Nervousness and excitement are the same physical state — pounding heart, adrenaline, flushed face. Your brain just picks the label. And you can pick a better one.

Rule 16 shows you how. You feel the nerves, relabel them as excitement, and let that energy pour out as enthusiasm. Women notice the guy radiating it. They always do.

Read more...

c# proyect

azrael

Don Juan
Joined
Aug 30, 2008
Messages
72
Reaction score
1
i think there are some programmers here so i am looking for a little bit of help.
i need to make a temp. converter in c# (using visual studio express 2010)

the form is : enter a value in a text box,
choose from what temp. to the other to convert using a "combo box"
for example from

Fahrenheit to Celsius. and when you press a "execute button" the conversion would display in another textbox

but i am having troubles doing it, my approach was


if (comboBox1.Text == "FAHRENHEIT A CELSIUS")
{

a =Convert.ToInt32( textbox1.Text);
c= (a - 32) / 1.8;
textbox2.Text = c.ToString();
}

but that is not working . i made a calculator using something like that.

if you guys can point me in the right direction it would be much appreciated
 

"You Can't Argue a Woman Into Liking You"

You made your case like a lawyer. Stable job. Good guy. Ready for something real. All true. All irrelevant.

She weighed your points, nodded along, felt nothing — then fell hard for some tattooed bartender with a motorcycle and a gambling problem.

Logic is where attraction goes to die. The "22 Rules" work a level deeper, on the subconscious switches that decide within minutes whether you register as a MAN or as part of the furniture.

Stop presenting evidence. Start flipping switches.

Read more...

mikeyb

Senior Don Juan
Joined
May 10, 2007
Messages
472
Reaction score
16
Age
38
Location
UK
Trying to use int32 type for floating point operations (i.e. decimals) will produce problems because int32 only stores integers. Use the "double" type instead.
 

synergy1

Master Don Juan
Joined
Sep 22, 2006
Messages
1,984
Reaction score
192
mikeyb said:
Trying to use int32 type for floating point operations (i.e. decimals) will produce problems because int32 only stores integers. Use the "double" type instead.
In C, you can use both i believe, int32 would likely only truncate the answer by removing trailing decimals and rounding, not cause an compile error but will clearly be a runtime error.

Also not sure on the rules of C#, if you have an int in an equation and divide by a double, will the result convert to an int or a double? Had a lot of runtime errors based on passing integers through functions and having them convert or drop decimal places.
 

Teflon_Mcgee

Master Don Juan
Joined
Apr 3, 2006
Messages
918
Reaction score
27
Besides the whole int32 vs. double (which shouldn't be that big of a deal in c#)
there is also this

comboBox1.Text == "FAHRENHEIT A CELSIUS"


A more proper way would be to use any of the following:


1. if(comboBox1.Text.CompareTo("FAHRENHEIT A CELSIUS") == 1);
2. if(String.Compare(comboBox1.text, "FAHRENEHEIT A CELSISU") == 1);
3. if(comboBox1.Text.Equals("FAHRNEHEIGHT A CELSIUS") == 1);
 

azrael

Don Juan
Joined
Aug 30, 2008
Messages
72
Reaction score
1
thank you so much!!!!!

i just needed to change the way i was declaring the value for the program to run


up here i did not pust it but it was a:

int a=0,c=0;
i just needed to change the int for double


if (comboBox1.Text == "FAHRENHEIT A CELSIUS")
{

a =Convert.ToInt32( textbox1.Text);
c= (a - 32) / 1.8;
textbox2.Text = c.ToString();



and +1 to you guys

}
 

"How I Made Sure No Woman Ever Friend-Zoned Me Again"

She calls you when her car breaks down. When she needs help moving. When some guy she's actually dating treats her badly.

You're the listener. The reliable one. The guy who would treat her so much better, if she'd just open her eyes.

She won't. You trained her to see you as the low-effort option — the friend who requires zero risk and zero investment. Every favor dug the hole deeper.

The "22 Rules" break the pattern. You'll stop auditioning for a role she already cast and become the man she chases instead. It starts with Rule 1.

Read more...

Huffman

Master Don Juan
Joined
Oct 29, 2007
Messages
1,499
Reaction score
166
Teflon_Mcgee said:
A more proper way would be to use any of the following:


1. if(comboBox1.Text.CompareTo("FAHRENHEIT A CELSIUS") == 1);
2. if(String.Compare(comboBox1.text, "FAHRENEHEIT A CELSISU") == 1);
3. if(comboBox1.Text.Equals("FAHRNEHEIGHT A CELSIUS") == 1);
As long as he's staying with C#, the == will do just fine. The whole reference vs value comparison is an ugly thing and I agree that for good style you should always use Equals, but just saying that in C# the == operator is overloaded for equals.

In Java it wouldn't work however I think... makes for alot of ugly bugs.
 

Teflon_Mcgee

Master Don Juan
Joined
Apr 3, 2006
Messages
918
Reaction score
27
Huffman said:
As long as he's staying with C#, the == will do just fine. The whole reference vs value comparison is an ugly thing and I agree that for good style you should always use Equals, but just saying that in C# the == operator is overloaded for equals.

In Java it wouldn't work however I think... makes for alot of ugly bugs.

Yes, that's why C# is so awesome. Any Windows utility I make I ALWAYS do in C# (where I used to use Java as it's easier to do GUI's than C++.)

But I'm a hardware guy so I spend my time in assembly and C, unfortunately.
 
Top