Click here to Skip to main content
16,007,126 members
Home / Discussions / C#
   

C#

 
AnswerRe: "sendkeys" does not work KnightOnline Pin
Abhinav S1-Jan-13 4:38
Abhinav S1-Jan-13 4:38 
AnswerRe: "sendkeys" does not work KnightOnline Pin
Thomas Daniels1-Jan-13 5:52
mentorThomas Daniels1-Jan-13 5:52 
AnswerIt's a game :) Pin
Eddy Vluggen1-Jan-13 6:01
professionalEddy Vluggen1-Jan-13 6:01 
GeneralRe: It's a game :) Pin
Thomas Daniels1-Jan-13 6:05
mentorThomas Daniels1-Jan-13 6:05 
Generalto access latitudes and longitudes from database Pin
naveen 201230-Dec-12 22:28
naveen 201230-Dec-12 22:28 
GeneralRe: to access latitudes and longitudes from database Pin
OriginalGriff30-Dec-12 23:22
mveOriginalGriff30-Dec-12 23:22 
GeneralRe: to access latitudes and longitudes from database Pin
Pete O'Hanlon30-Dec-12 23:54
mvePete O'Hanlon30-Dec-12 23:54 
GeneralRe: to access latitudes and longitudes from database Pin
Ennis Ray Lynch, Jr.31-Dec-12 5:36
Ennis Ray Lynch, Jr.31-Dec-12 5:36 
How about some codez:

/// <summary>
/// Will return the distance between two lat and long in km
/// </summary>
/// <param name="location"></param>
/// <returns></returns>
public double HaversineDistance(Location location) {
	double R = 6371; // Radius of the earth in km
	double dLat = (location.Latitude - Latitude).ToRadians();  // Javascript functions in radians
	double dLon = (location.Longitude - Longitude).ToRadians();
	double a = Math.Pow(Math.Sin(dLat / 2), 2) +
		Math.Cos(Latitude.ToRadians()) * Math.Cos(location.Latitude.ToRadians()) *
		Math.Pow(Math.Sin(dLon / 2), 2);
	double c = 2 * Math.Atan2(Math.Sqrt(a), Math.Sqrt(1 - a));
	double d = R * c; // Distance in km
	return d;
}

Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting.

"And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

"All users always want Excel" --Ennis Lynch

GeneralRe: to access latitudes and longitudes from database Pin
PIEBALDconsult31-Dec-12 6:22
mvePIEBALDconsult31-Dec-12 6:22 
Questionhow to extract tag in regular expressions c# Pin
ngoanrazor30-Dec-12 5:02
ngoanrazor30-Dec-12 5:02 
AnswerRe: how to extract tag in regular expressions c# Pin
PIEBALDconsult30-Dec-12 5:39
mvePIEBALDconsult30-Dec-12 5:39 
GeneralRe: how to extract tag in regular expressions c# Pin
OriginalGriff30-Dec-12 21:20
mveOriginalGriff30-Dec-12 21:20 
GeneralRe: how to extract tag in regular expressions c# Pin
Brisingr Aerowing31-Dec-12 12:16
professionalBrisingr Aerowing31-Dec-12 12:16 
GeneralRe: how to extract tag in regular expressions c# Pin
PIEBALDconsult31-Dec-12 12:24
mvePIEBALDconsult31-Dec-12 12:24 
QuestionBoolean function to return true/false Pin
Member 970415330-Dec-12 2:57
Member 970415330-Dec-12 2:57 
AnswerRe: Boolean function to return true/false Pin
Richard MacCutchan30-Dec-12 4:12
mveRichard MacCutchan30-Dec-12 4:12 
GeneralRe: Boolean function to return true/false Pin
Member 970415330-Dec-12 4:18
Member 970415330-Dec-12 4:18 
GeneralRe: Boolean function to return true/false Pin
Richard MacCutchan30-Dec-12 4:25
mveRichard MacCutchan30-Dec-12 4:25 
GeneralRe: Boolean function to return true/false Pin
Member 970415330-Dec-12 5:42
Member 970415330-Dec-12 5:42 
GeneralRe: Boolean function to return true/false Pin
Richard MacCutchan30-Dec-12 5:45
mveRichard MacCutchan30-Dec-12 5:45 
AnswerRe: Boolean function to return true/false Pin
Matt T Heffron3-Jan-13 19:54
professionalMatt T Heffron3-Jan-13 19:54 
GeneralRe: Boolean function to return true/false Pin
Member 97041533-Jan-13 21:00
Member 97041533-Jan-13 21:00 
GeneralRe: Boolean function to return true/false Pin
Member 97041537-Jan-13 9:55
Member 97041537-Jan-13 9:55 
AnswerRe: Boolean function to return true/false Pin
Matt T Heffron7-Jan-13 10:17
professionalMatt T Heffron7-Jan-13 10:17 
GeneralRe: Boolean function to return true/false Pin
Member 97041537-Jan-13 10:26
Member 97041537-Jan-13 10:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.