plzz help me |
+0 forum
3 | ||

i want to write a function of sign function without using system.math library in c#. plz help me how can i write this code??? |
+0 forum
1 | ||

Hello all, I'm having some trouble with a project I am doing and I was wandering if anybody could help me/point me in the right direction. So the gist of what is happening is I have a program that is supposed to be flipping 2 coins independently of each other but each coin always mirrors the others result. Hear is the 2 pieces of code. first of all the code to flip the coin. class Coin { private const int HEADS = 0; private const int TAILS = 1; private int face; /// <summary> /// Random class object used to … |
+0 forum
3 | ||

I'm currently re-writing a bit of code and i'm in two minds about which way to take it. Advice would be greatly appreciated :) The application is used to control a USB circuit board. The board has 32 analog outputs. The outputs are switched on and off by sending a 32bit integer to the board. So to turn on outputs 2 and 4 you send it the number 10 (10= 0101) or to turn on 1,2 and 3 you send 7 (1110) etc. This part is outside my control. I currently set the outputs usign a simple math equation: [CODE]Output1 … |
+0 forum
4 | ||

Hi I need to format a decimal value to time and then display it in a textbox in the proper format. eg: double value = 1.25 to "1:15" I do not have a clue how to go about it Thanks |
+0 forum
7 | ||

Hello, I need to create a function which takes parameters for a circle and checks if a given point(x,y) lies within the circle (or on the edge). Like this: [CODE]public static bool PointExistsInCircle(Double CircleX,Double CircleY,Double CircleRadius,Double PointX,Double PointY) { needs to return 'true' if the point is in the circle, if not return 'false'. }[/CODE] Could someone help me with this?, unfortunately i'm not good at math.. Mervin. |
+0 forum
7 | ||

I am aware that JavaScript arithmetic does not handle either really large numbers or decimals well. This is why I have made this library of functions. I am posting it here rather than under "code snippets" because I would like to learn from your comments. Along with the library is a demo. [CODE] <html> <head> </head> <body> <script language="JavaScript"> <!-- // // JavaScript bignum / big decimal library // by Robert Lozyniak - r07271368@hotmail.com // this is version number 2 // this version 10 Sep 2009 at 07:47 UT // generic polynomial functions // here, we represent polynomials as arrays … |
+0 forum
0 | ||

I want get a root of number in C# what library i must to insert and what command solve it |
+0 forum
3 | ||

Stephen Wolfram is a British physicist perhaps best known for his work in creating the computational software Mathematica. That could all soon be forgotten if his Wolfram Alpha computational data engine proves to be the Google killer that some are suggesting. After all, it claims to be able to answer any factual question whether that answer can already be found in currently indexed documents or not. But then again, [URL="http://www.itpro.co.uk/blogs/daveyw/2008/09/24/cuil-frozen-out-market-share-drops-to-next-to-nothing/"]Cuil claimed[/URL] that it was the biggest search engine on the planet right from the get go and then mixed these claims with more hype about unique content-based relevance methods for … |
+0 forum
1 | ||

[URL="http://www.rackspace.co.uk"]Rackspace Managed Hosting[/URL] has today sent me the formula to create the perfect website, and being a nice chap I felt I had to share it with you, so here goes: [B]Pwebsite = { ((14.14* EaseNav) + (13.56*Speed) + (13.11*CleanDes) + (10.89*Func) + (10.89*Up)) – ((12.63*Pops) + (10.32*Ads) +(5.21*MultiM)) } / 6.26[/B] There, now you can all go and create the website of your dreams, guaranteed to pull in the punters, monetize your investment and allow you retire a happy bunny sometime next year. Or maybe you require just a little more of an explanation? I did, and here’s what … |
+1 forum
1 | ||

Blink and you will see them appear in a Console window. This is a translation to C# of a Modula-2 implementation by N.Wirth, the inventor of Pascal. The tested integers are obtained by incrementing alternatively by 2 and 4, thereby avoiding multiples of 2 and 3 in the first place. This list starts with 5, assuming 2 and 3 are already known primes. Divisibility needs to be tested for prime divisors only, which are obtained by storing previously computed results. This algorithm is a little bit hazier then the traditional "sieve" algorithm. But it is fun to play computer yourself … |
+0 forum
2 | ||

A bunch of basic statistical functions. I could have made a class here and I could have used more features of C#. But just to keep it simple I left it as a console application. So the modifications you have to make if you're into C, C++, Java etc. should be minor. |
+1 forum
0 | ||

[TEX]Solve an equation of the form Ax^2 + Bx + C = 0.[/TEX] The class is commented, but if you have any questions don't be affraid to ask. You may exercise this class in a console application with the following snippet : [CODE]QuadraticEquation z = new QuadraticEquation(1, 3, 3); z.Solve(); Console.WriteLine("D={0}",z.Discriminant()); Console.WriteLine(z.Root1RealPart); Console.WriteLine(z.Root2RealPart); Console.WriteLine(z.Root1ImagPart); Console.WriteLine(z.Root2ImagPart);[/CODE] |
+0 forum
0 | ||

Most of the time there are many ways to implement an algorithm. Here are two ways to implement the greatest common divisor algoritm, one of the oldest algorithms ever. |
+0 forum
0 | ||

If you have to convert an angle from degrees to radians and way back, here are some utility functions in C#, along with a program to test them. I made use of the "out" keyword here, which allows a function to return more than one value. An alternative would be to return a struct containing all the values. Any language out there which can do this? |
+0 forum
0 | ||

Hey....hello all i am writing a very simple function of calculating a square of a number entered by the user and then displaying it. While writing the function in c# i am getting n number of errors regarding conversion type....plz help me out of this .....here is the function... [code] function square(int x) { int result = 0; int val = (Convert.ToInt32(TextBox1.Text)); // is this correct ?? result = val * val; return (result); // error of type conversion } and for calling this function shall i write call square(textbox1.text) or simply the function name ??? plz help me out … |
+0 forum
2 | ||

Hi All, I'm trying to implement the NORMSDIST function of MS excel in the C#. I found its implementation from the following link. [url]http://office.microsoft.com/en-us/excel/HP052091941033.aspx[/url] and I've written the following code for this i.e. [code] static double NORMSDIST(double z_score) { double z_ = - ( (z_score * z_score) / 2 ); double normDist = (1 / ((Math.Sqrt(2 * Math.PI)))) * ( Math.Exp(z_) ); return normDist; }[/code] unfortunately this isn't giving me the correct result, can someone point out for me what m i missing in here? thanks in advance. |
+0 forum
5 |

The End.