Click here to Skip to main content
15,913,587 members
Everything / Numerics

Numerics

numerics

Great Reads

by User 6679439
Library extending the .NET numeric support
by NightWizzard
Convert amounts to their spoken equivalents
by jkluge
How to compute a 2D Fourier Transform using the nuget package "mathnet.numerics"
by Garbel Nervadof
This article demonstrates how to use Python to solve simple Laplace equation with Numpy library and Matplotlib to plot the solution of the equation. We'll also see that we can write less code and do more with Python.

Latest Articles

by jkluge
How to compute a 2D Fourier Transform using the nuget package "mathnet.numerics"
by Garbel Nervadof
This article demonstrates how to use Python to solve simple Laplace equation with Numpy library and Matplotlib to plot the solution of the equation. We'll also see that we can write less code and do more with Python.
by User 6679439
Library extending the .NET numeric support
by TheGreatAndPowerfulOz
Gets the digits and the sign of an integer in an array

All Articles

Sort by Score

Numerics 

2 Dec 2017 by User 6679439
Library extending the .NET numeric support
18 Dec 2016 by NightWizzard
Convert amounts to their spoken equivalents
9 Jan 2022 by OriginalGriff
OK. The first things is that you don't want to store a value in the textbox that you intend to use as a calculation - that's just a bad way to do things. Instead, treat your "multiplication result" separate as hold it as an numeric value i.e. an...
27 May 2012 by Mehdi Gholam
Usually attributes are processed once (type interrogation etc.) so performance is not critical so boxing is a viable option which reduces your code size.I am afraid you can not escape a big switch statement [or a nested IF] (if you can let me know! I have tried :) [DataTypes.cs in RaptorDB...
28 May 2012 by Andreas Gieriet
How about dynamic?If you are willing to pay the run-time cost, and if you are willing to give up on compile-time type check, dynamic could help.C# really lacks generics specialization and (especially if run-time performance matters) compile-time elaboration of generics.In C++ you can...
26 May 2015 by Mehdi Gholam
Try :string s = "MR00001012";int val = int.Parse(s.Substring(2)); // first digit starts at position 2
9 Mar 2021 by jkluge
How to compute a 2D Fourier Transform using the nuget package "mathnet.numerics"
28 May 2012 by Sander Rossel
As far as I can see there is no way to have one single constructor. Using a ValueType[^] is an idea, but not very user friendly (since ValueType[^] can be more than just numerics, in which case I would have to throw an Exception[^]). By storing the numerics into a Private field as an...
29 May 2012 by Andreas Gieriet
As a followup to solution #4: if you don't have the dynamic feature at hand (VB.Net, .Net version before 4.0), you may employ casts (see the As(...) method): [AttributeUsage(AttributeTargets.Class)] public class MyAttrAttribute : Attribute { private object _arg; ...
3 Aug 2012 by _Amy
Hi,Try this:HTML:JAVASCRIPT://Restrict the user to key-in chrectors and other special charectorsfunction onlyNumbers(evt) { var e = event || evt; // for trans-browser...
3 Mar 2013 by Leo Chapiro
There are built-in functions like atoi, atof, atol and so long. By using this function you don't need to care of restictions: the given string will be converted or you get zero back!Take a look at e.g. atoi:functionatoiint atoi (const char * str);Convert string to...
4 Mar 2013 by David Serrano Martínez
These are standard template solutions:#include #include #include // Checks if a std::string can be converted to a type T.template bool Is(const std::string& s){ T value; std::istringstream is(s); is >> value; ...
28 Nov 2013 by OriginalGriff
So, use the debugger.Work out manually what the first iteration value should be, and then put a breakpoint on the first instruction inside the loop.Now run the program. When it hits the breakpoint, single step through until you reach the line:a += -dfn;Is the value of "dfn" greater than...
20 Nov 2014 by Fredrik Bornander
If you want to use C, something like this might work for you;#include #include #include char* append_char(char* buffer, char character) { *buffer = character; return ++buffer;}char* append_number(char* buffer, int number, char* temp_buffer)...
26 May 2015 by _Asif_
Try regular expression with [0-9]+. There are tons of information present, you just need to google!Regards,Asif
3 Aug 2012 by Leo Rajendra Dhakal
How to validate textbox inside gridview item templates to accept numeric values only
3 Aug 2012 by Abhinav S
Have a look at the RequiredFieldValidator[^].This article[^] should also give you some updates.
11 Feb 2013 by kk2014
Hi,i have a requirement of Gridview with paging and Sorting(on column header click). numeric paging required on both top and bottom side.is there any reference source code or link available? that will helpful to me.thanks
28 Nov 2013 by Member 10432522
So this is my codedouble a = 1, Lspan = 30, Lcable = 33, fn, fdn,dfn ; do { fn = ((2 * a) * (Math.Sinh(Lspan / (2 * a)))) - Lcable; fdn = (2 * (Math.Sinh(Lspan / (2 * a))) - (((Lspan / (2 * a)) *...
20 Nov 2014 by Richard MacCutchan
Slightly simpler than Fredrik's solution:#define MAXIMUM 10//00000int main{ FILE* fp; int count, number; char szNumber[16]; fp = fopen("testfile.txt", "w"); for (count = 1; count
12 Mar 2015 by Member 10500506
Hello Everyone,I need one solution to prevent automatic rounding of number in oracle. Here I am explaining what I want.Please go through this flow.SQL> create table dm_demo(no number(23,9));Table createdSQL> insert into dm_demo values (9999999.999999999);1 row...
14 Mar 2015 by Jörgen Andersson
As Tom Kyte says[^]: "SQLPlus has a default number format is uses to display data on the screen "nicely". You need toeithero set the numformat to something you likeo use a TO_CHAR on the number with a format that applies in your case.Info on how to set Numformat here[^].
17 Mar 2015 by Smart003
in oracle to display a numbers after the decimal point we use the concept of precision in the number datatype.check about it
14 Jun 2015 by Member 11765980
How to validate whether MvxString has only numbers
21 Mar 2016 by Patrice T
Quote:I have 'that' fraction as a C stringJust calc the length of string minus 2 and you are done. There is no solution in constant time.
9 Jan 2022 by MXwell8
Hi, I have a question how can I convert the result of a multiplication into hh:mm:ss? This is the code Public Class Form9 Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged Dim nmpts As...
12 Jan 2020 by Garbel Nervadof
This article demonstrates how to use Python to solve simple Laplace equation with Numpy library and Matplotlib to plot the solution of the equation. We'll also see that we can write less code and do more with Python.
2 Mar 2017 by Daniel Pfeffer
A method for "nearly correct" rounding of sums of multiples
23 Dec 2015 by Shvetsov Evgeniy
Helper functions to deal with the individual bits & digits, hashing and other
27 May 2012 by Sander Rossel
So I'm having a small problem when working with numerics. I can't really imagine that I am the only one with this problem, yet I can't find any solutions. So here it goes.I am making an Attribute[^] which takes a numeric in its constructor (ANY numeric). Now here is the problem, there are...
27 May 2012 by Zoltán Zörgő
Have you considered using ValueType[^] as argument type of your constructor? As it is a larger subset than numerics, the utility in the above msdn article could be also of use.
3 Aug 2012 by Christian Graus
Assuming this is not a web app, because if it was, you'd have said so, handle the keypress or keydown event for your textbox, and call a method that checks Char.IsDigit and Char.IsControl and set Handled = true so that the keypress is rejected. If this is a web app question, tag your questions...
10 Mar 2017 by TheGreatAndPowerfulOz
Gets the digits and the sign of an integer in an array
20 Nov 2014 by GeorgeGkas
Hello guys. I want to ask if there is a way to generate a txt file that contains 1.000.000 different numbers all in one line.Is there a way to do it? I use both linux and windows machines but I prefer to use a C program code.
25 May 2016 by Shvetsov Evgeniy
Numbers (positive AND negative integral/fractional) to english/russian words
3 Mar 2013 by Vaibhav_J_Jaiswal
Hi everybody, I am new in vc environment. Is some one suggest me how I validate the numeric string? My requirements are as follows:a)numeric string have negative numbers.b)range is from -1000 to 1000.Currently I do the following things:a)remove leading zeros.b)remove special...
26 May 2015 by arunsiddhu1992
I have a string as 'MR000000001'. Also the string value can vary from 'MR000000001' to 'MR999999999'.I want to extract the numeric value form that string.I tried TryParse method but it does not work.Please help me out.Thanks in advance.
21 Mar 2016 by Shvetsov Evgeniy
Assuming i have some decimal fraction of unknown length AND without the integral part:0.123 [3]OR0.0200405 [7]OR0.0000000987 [10]etcI have 'that' fraction as a C string (after convertion with the sprintf) AND as a long double (after using modfl). I take word that in a columns...