原文:【原创】开源Math.NET基础数学类库使用(09)相关数论函数使用

              本博客所有文章分类的总目录:http://www.cnblogs.com/asxinyu/p/4288836.html

开源Math.NET基础数学类库使用总目录http://www.cnblogs.com/asxinyu/p/4329737.html

前言

  数论就是指研究整数性质的一门理论。数论=算术。不过通常算术指数的计算,数论指数的理论。整数的基本元素是素数,所以数论的本质是对素数性质的研究。它是与平面几何同样历史悠久的学科。它大致包括代数数论、解析数论、计算数论等等。

  Math.NET也包括了很多数论相关的函数,这些函数都是静态的,可以直接调用,如判断是否奇数,判断幂,平方数,最大公约数等等。同时部分函数已经作为扩展方法,可以直接在对象中使用。

  如果本文资源或者显示有问题,请参考 本文原文地址http://www.cnblogs.com/asxinyu/p/4301097.html

1.数论函数类Euclid

  Math.NET包括的数论函数除了一部分大家日常接触到的,奇数,偶数,幂,平方数,最大公约数,最小公倍数等函数,还有一些欧几里得几何的函数,当然也是比较简单的,这些问题的算法有一些比较简单,如最大公约数,最小公倍数等,都有成熟的算法可以使用,对于使用Math.NET的人来说,不必要了解太小,当然对于需要搞清楚原理的人来说,学习Math.NET的架构或者实现,是可以参考的。所以这里先给出Math.NET关于数论函数类Euclid的源代码:

 /// <summary>
/// 整数数论函数
/// Integer number theory functions.
/// </summary>
public static class Euclid
{
/// <summary>
/// Canonical Modulus. The result has the sign of the divisor.
/// </summary>
public static double Modulus(double dividend, double divisor)
{
return ((dividend%divisor) + divisor)%divisor;
} /// <summary>
/// Canonical Modulus. The result has the sign of the divisor.
/// </summary>
public static float Modulus(float dividend, float divisor)
{
return ((dividend%divisor) + divisor)%divisor;
} /// <summary>
/// Canonical Modulus. The result has the sign of the divisor.
/// </summary>
public static int Modulus(int dividend, int divisor)
{
return ((dividend%divisor) + divisor)%divisor;
} /// <summary>
/// Canonical Modulus. The result has the sign of the divisor.
/// </summary>
public static long Modulus(long dividend, long divisor)
{
return ((dividend%divisor) + divisor)%divisor;
} #if !NOSYSNUMERICS
/// <summary>
/// Canonical Modulus. The result has the sign of the divisor.
/// </summary>
public static BigInteger Modulus(BigInteger dividend, BigInteger divisor)
{
return ((dividend%divisor) + divisor)%divisor;
}
#endif /// <summary>
/// Remainder (% operator). The result has the sign of the dividend.
/// </summary>
public static double Remainder(double dividend, double divisor)
{
return dividend%divisor;
} /// <summary>
/// Remainder (% operator). The result has the sign of the dividend.
/// </summary>
public static float Remainder(float dividend, float divisor)
{
return dividend%divisor;
} /// <summary>
/// Remainder (% operator). The result has the sign of the dividend.
/// </summary>
public static int Remainder(int dividend, int divisor)
{
return dividend%divisor;
} /// <summary>
/// Remainder (% operator). The result has the sign of the dividend.
/// </summary>
public static long Remainder(long dividend, long divisor)
{
return dividend%divisor;
} #if !NOSYSNUMERICS
/// <summary>
/// Remainder (% operator). The result has the sign of the dividend.
/// </summary>
public static BigInteger Remainder(BigInteger dividend, BigInteger divisor)
{
return dividend%divisor;
}
#endif /// <summary>
/// Find out whether the provided 32 bit integer is an even number.
/// </summary>
/// <param name="number">The number to very whether it's even.</param>
/// <returns>True if and only if it is an even number.</returns>
public static bool IsEven(this int number)
{
return (number & 0x1) == 0x0;
} /// <summary>
/// Find out whether the provided 64 bit integer is an even number.
/// </summary>
/// <param name="number">The number to very whether it's even.</param>
/// <returns>True if and only if it is an even number.</returns>
public static bool IsEven(this long number)
{
return (number & 0x1) == 0x0;
} /// <summary>
/// Find out whether the provided 32 bit integer is an odd number.
/// </summary>
/// <param name="number">The number to very whether it's odd.</param>
/// <returns>True if and only if it is an odd number.</returns>
public static bool IsOdd(this int number)
{
return (number & 0x1) == 0x1;
} /// <summary>
/// Find out whether the provided 64 bit integer is an odd number.
/// </summary>
/// <param name="number">The number to very whether it's odd.</param>
/// <returns>True if and only if it is an odd number.</returns>
public static bool IsOdd(this long number)
{
return (number & 0x1) == 0x1;
} /// <summary>
/// Find out whether the provided 32 bit integer is a perfect power of two.
/// </summary>
/// <param name="number">The number to very whether it's a power of two.</param>
/// <returns>True if and only if it is a power of two.</returns>
public static bool IsPowerOfTwo(this int number)
{
return number > && (number & (number - )) == 0x0;
} /// <summary>
/// Find out whether the provided 64 bit integer is a perfect power of two.
/// </summary>
/// <param name="number">The number to very whether it's a power of two.</param>
/// <returns>True if and only if it is a power of two.</returns>
public static bool IsPowerOfTwo(this long number)
{
return number > && (number & (number - )) == 0x0;
} /// <summary>
/// Find out whether the provided 32 bit integer is a perfect square, i.e. a square of an integer.
/// </summary>
/// <param name="number">The number to very whether it's a perfect square.</param>
/// <returns>True if and only if it is a perfect square.</returns>
public static bool IsPerfectSquare(this int number)
{
if (number < )
{
return false;
} int lastHexDigit = number & 0xF;
if (lastHexDigit > )
{
return false; // return immediately in 6 cases out of 16.
} if (lastHexDigit == || lastHexDigit == || lastHexDigit == || lastHexDigit == )
{
int t = (int)Math.Floor(Math.Sqrt(number) + 0.5);
return (t * t) == number;
} return false;
} /// <summary>
/// Find out whether the provided 64 bit integer is a perfect square, i.e. a square of an integer.
/// </summary>
/// <param name="number">The number to very whether it's a perfect square.</param>
/// <returns>True if and only if it is a perfect square.</returns>
public static bool IsPerfectSquare(this long number)
{
if (number < )
{
return false;
} int lastHexDigit = (int)(number & 0xF);
if (lastHexDigit > )
{
return false; // return immediately in 6 cases out of 16.
} if (lastHexDigit == || lastHexDigit == || lastHexDigit == || lastHexDigit == )
{
long t = (long)Math.Floor(Math.Sqrt(number) + 0.5);
return (t * t) == number;
} return false;
} /// <summary>
/// Raises 2 to the provided integer exponent (0 &lt;= exponent &lt; 31).
/// </summary>
/// <param name="exponent">The exponent to raise 2 up to.</param>
/// <returns>2 ^ exponent.</returns>
/// <exception cref="ArgumentOutOfRangeException"/>
public static int PowerOfTwo(this int exponent)
{
if (exponent < || exponent >= )
{
throw new ArgumentOutOfRangeException("exponent");
} return << exponent;
} /// <summary>
/// Raises 2 to the provided integer exponent (0 &lt;= exponent &lt; 63).
/// </summary>
/// <param name="exponent">The exponent to raise 2 up to.</param>
/// <returns>2 ^ exponent.</returns>
/// <exception cref="ArgumentOutOfRangeException"/>
public static long PowerOfTwo(this long exponent)
{
if (exponent < || exponent >= )
{
throw new ArgumentOutOfRangeException("exponent");
} return ((long)) << (int)exponent;
} /// <summary>
/// Find the closest perfect power of two that is larger or equal to the provided
/// 32 bit integer.
/// </summary>
/// <param name="number">The number of which to find the closest upper power of two.</param>
/// <returns>A power of two.</returns>
/// <exception cref="ArgumentOutOfRangeException"/>
public static int CeilingToPowerOfTwo(this int number)
{
if (number == Int32.MinValue)
{
return ;
} const int maxPowerOfTwo = 0x40000000;
if (number > maxPowerOfTwo)
{
throw new ArgumentOutOfRangeException("number");
} number--;
number |= number >> ;
number |= number >> ;
number |= number >> ;
number |= number >> ;
number |= number >> ;
return number + ;
} /// <summary>
/// Find the closest perfect power of two that is larger or equal to the provided
/// 64 bit integer.
/// </summary>
/// <param name="number">The number of which to find the closest upper power of two.</param>
/// <returns>A power of two.</returns>
/// <exception cref="ArgumentOutOfRangeException"/>
public static long CeilingToPowerOfTwo(this long number)
{
if (number == Int64.MinValue)
{
return ;
} const long maxPowerOfTwo = 0x4000000000000000;
if (number > maxPowerOfTwo)
{
throw new ArgumentOutOfRangeException("number");
} number--;
number |= number >> ;
number |= number >> ;
number |= number >> ;
number |= number >> ;
number |= number >> ;
number |= number >> ;
return number + ;
} /// <summary>
/// Returns the greatest common divisor (<c>gcd</c>) of two integers using Euclid's algorithm.
/// </summary>
/// <param name="a">First Integer: a.</param>
/// <param name="b">Second Integer: b.</param>
/// <returns>Greatest common divisor <c>gcd</c>(a,b)</returns>
public static long GreatestCommonDivisor(long a, long b)
{
while (b != )
{
var remainder = a%b;
a = b;
b = remainder;
} return Math.Abs(a);
} /// <summary>
/// Returns the greatest common divisor (<c>gcd</c>) of a set of integers using Euclid's
/// algorithm.
/// </summary>
/// <param name="integers">List of Integers.</param>
/// <returns>Greatest common divisor <c>gcd</c>(list of integers)</returns>
public static long GreatestCommonDivisor(IList<long> integers)
{
if (null == integers)
{
throw new ArgumentNullException("integers");
} if (integers.Count == )
{
return ;
} var gcd = Math.Abs(integers[]); for (var i = ; (i < integers.Count) && (gcd > ); i++)
{
gcd = GreatestCommonDivisor(gcd, integers[i]);
} return gcd;
} /// <summary>
/// Returns the greatest common divisor (<c>gcd</c>) of a set of integers using Euclid's algorithm.
/// </summary>
/// <param name="integers">List of Integers.</param>
/// <returns>Greatest common divisor <c>gcd</c>(list of integers)</returns>
public static long GreatestCommonDivisor(params long[] integers)
{
return GreatestCommonDivisor((IList<long>)integers);
} /// <summary>
/// Computes the extended greatest common divisor, such that a*x + b*y = <c>gcd</c>(a,b).
/// </summary>
/// <param name="a">First Integer: a.</param>
/// <param name="b">Second Integer: b.</param>
/// <param name="x">Resulting x, such that a*x + b*y = <c>gcd</c>(a,b).</param>
/// <param name="y">Resulting y, such that a*x + b*y = <c>gcd</c>(a,b)</param>
/// <returns>Greatest common divisor <c>gcd</c>(a,b)</returns>
/// <example>
/// <code>
/// long x,y,d;
/// d = Fn.GreatestCommonDivisor(45,18,out x, out y);
/// -> d == 9 &amp;&amp; x == 1 &amp;&amp; y == -2
/// </code>
/// The <c>gcd</c> of 45 and 18 is 9: 18 = 2*9, 45 = 5*9. 9 = 1*45 -2*18, therefore x=1 and y=-2.
/// </example>
public static long ExtendedGreatestCommonDivisor(long a, long b, out long x, out long y)
{
long mp = , np = , m = , n = ; while (b != )
{
long rem;
#if PORTABLE
rem = a % b;
var quot = a / b;
#else
long quot = Math.DivRem(a, b, out rem);
#endif
a = b;
b = rem; var tmp = m;
m = mp - (quot*m);
mp = tmp; tmp = n;
n = np - (quot*n);
np = tmp;
} if (a >= )
{
x = mp;
y = np;
return a;
} x = -mp;
y = -np;
return -a;
} /// <summary>
/// Returns the least common multiple (<c>lcm</c>) of two integers using Euclid's algorithm.
/// </summary>
/// <param name="a">First Integer: a.</param>
/// <param name="b">Second Integer: b.</param>
/// <returns>Least common multiple <c>lcm</c>(a,b)</returns>
public static long LeastCommonMultiple(long a, long b)
{
if ((a == ) || (b == ))
{
return ;
} return Math.Abs((a/GreatestCommonDivisor(a, b))*b);
} /// <summary>
/// Returns the least common multiple (<c>lcm</c>) of a set of integers using Euclid's algorithm.
/// </summary>
/// <param name="integers">List of Integers.</param>
/// <returns>Least common multiple <c>lcm</c>(list of integers)</returns>
public static long LeastCommonMultiple(IList<long> integers)
{
if (null == integers)
{
throw new ArgumentNullException("integers");
} if (integers.Count == )
{
return ;
} var lcm = Math.Abs(integers[]); for (var i = ; i < integers.Count; i++)
{
lcm = LeastCommonMultiple(lcm, integers[i]);
} return lcm;
} /// <summary>
/// Returns the least common multiple (<c>lcm</c>) of a set of integers using Euclid's algorithm.
/// </summary>
/// <param name="integers">List of Integers.</param>
/// <returns>Least common multiple <c>lcm</c>(list of integers)</returns>
public static long LeastCommonMultiple(params long[] integers)
{
return LeastCommonMultiple((IList<long>)integers);
} #if !NOSYSNUMERICS
/// <summary>
/// Returns the greatest common divisor (<c>gcd</c>) of two big integers.
/// </summary>
/// <param name="a">First Integer: a.</param>
/// <param name="b">Second Integer: b.</param>
/// <returns>Greatest common divisor <c>gcd</c>(a,b)</returns>
public static BigInteger GreatestCommonDivisor(BigInteger a, BigInteger b)
{
return BigInteger.GreatestCommonDivisor(a, b);
} /// <summary>
/// Returns the greatest common divisor (<c>gcd</c>) of a set of big integers.
/// </summary>
/// <param name="integers">List of Integers.</param>
/// <returns>Greatest common divisor <c>gcd</c>(list of integers)</returns>
public static BigInteger GreatestCommonDivisor(IList<BigInteger> integers)
{
if (null == integers)
{
throw new ArgumentNullException("integers");
} if (integers.Count == )
{
return ;
} var gcd = BigInteger.Abs(integers[]); for (int i = ; (i < integers.Count) && (gcd > BigInteger.One); i++)
{
gcd = GreatestCommonDivisor(gcd, integers[i]);
} return gcd;
} /// <summary>
/// Returns the greatest common divisor (<c>gcd</c>) of a set of big integers.
/// </summary>
/// <param name="integers">List of Integers.</param>
/// <returns>Greatest common divisor <c>gcd</c>(list of integers)</returns>
public static BigInteger GreatestCommonDivisor(params BigInteger[] integers)
{
return GreatestCommonDivisor((IList<BigInteger>)integers);
} /// <summary>
/// Computes the extended greatest common divisor, such that a*x + b*y = <c>gcd</c>(a,b).
/// </summary>
/// <param name="a">First Integer: a.</param>
/// <param name="b">Second Integer: b.</param>
/// <param name="x">Resulting x, such that a*x + b*y = <c>gcd</c>(a,b).</param>
/// <param name="y">Resulting y, such that a*x + b*y = <c>gcd</c>(a,b)</param>
/// <returns>Greatest common divisor <c>gcd</c>(a,b)</returns>
/// <example>
/// <code>
/// long x,y,d;
/// d = Fn.GreatestCommonDivisor(45,18,out x, out y);
/// -> d == 9 &amp;&amp; x == 1 &amp;&amp; y == -2
/// </code>
/// The <c>gcd</c> of 45 and 18 is 9: 18 = 2*9, 45 = 5*9. 9 = 1*45 -2*18, therefore x=1 and y=-2.
/// </example>
public static BigInteger ExtendedGreatestCommonDivisor(BigInteger a, BigInteger b, out BigInteger x, out BigInteger y)
{
BigInteger mp = BigInteger.One, np = BigInteger.Zero, m = BigInteger.Zero, n = BigInteger.One; while (!b.IsZero)
{
BigInteger rem;
BigInteger quot = BigInteger.DivRem(a, b, out rem);
a = b;
b = rem; BigInteger tmp = m;
m = mp - (quot*m);
mp = tmp; tmp = n;
n = np - (quot*n);
np = tmp;
} if (a >= BigInteger.Zero)
{
x = mp;
y = np;
return a;
} x = -mp;
y = -np;
return -a;
} /// <summary>
/// Returns the least common multiple (<c>lcm</c>) of two big integers.
/// </summary>
/// <param name="a">First Integer: a.</param>
/// <param name="b">Second Integer: b.</param>
/// <returns>Least common multiple <c>lcm</c>(a,b)</returns>
public static BigInteger LeastCommonMultiple(BigInteger a, BigInteger b)
{
if (a.IsZero || b.IsZero)
{
return BigInteger.Zero;
} return BigInteger.Abs((a/BigInteger.GreatestCommonDivisor(a, b))*b);
} /// <summary>
/// Returns the least common multiple (<c>lcm</c>) of a set of big integers.
/// </summary>
/// <param name="integers">List of Integers.</param>
/// <returns>Least common multiple <c>lcm</c>(list of integers)</returns>
public static BigInteger LeastCommonMultiple(IList<BigInteger> integers)
{
if (null == integers)
{
throw new ArgumentNullException("integers");
} if (integers.Count == )
{
return ;
} var lcm = BigInteger.Abs(integers[]); for (int i = ; i < integers.Count; i++)
{
lcm = LeastCommonMultiple(lcm, integers[i]);
} return lcm;
} /// <summary>
/// Returns the least common multiple (<c>lcm</c>) of a set of big integers.
/// </summary>
/// <param name="integers">List of Integers.</param>
/// <returns>Least common multiple <c>lcm</c>(list of integers)</returns>
public static BigInteger LeastCommonMultiple(params BigInteger[] integers)
{
return LeastCommonMultiple((IList<BigInteger>)integers);
}
#endif
}

2.Euclid类的使用例子

 上面已经看到源码,也提到了,Euclid作为静态类,其中的很多静态方法都可以直接作为扩展方法使用。这里看看几个简单的例子:

 // 1. Find out whether the provided number is an even number
Console.WriteLine(@"1.判断提供的数字是否是偶数");
Console.WriteLine(@"{0} 是偶数 = {1}. {2} 是偶数 = {3}", , Euclid.IsEven(), , .IsEven());
Console.WriteLine(); // 2. Find out whether the provided number is an odd number
Console.WriteLine(@"2.判断提供的数字是否是奇数");
Console.WriteLine(@"{0} 是奇数 = {1}. {2} 是奇数 = {3}", , .IsOdd(), , Euclid.IsOdd());
Console.WriteLine(); // 3. Find out whether the provided number is a perfect power of two
Console.WriteLine(@"2.判断提供的数字是否是2的幂");
Console.WriteLine(@"{0} 是2的幂 = {1}. {2} 是2的幂 = {3}", , .IsPowerOfTwo(), , Euclid.IsPowerOfTwo());
Console.WriteLine(); // 4. Find the closest perfect power of two that is larger or equal to 97
Console.WriteLine(@"4.返回大于等于97的最小2的幂整数");
Console.WriteLine(.CeilingToPowerOfTwo());
Console.WriteLine(); // 5. Raise 2 to the 16
Console.WriteLine(@"5. 2的16次幂");
Console.WriteLine(.PowerOfTwo());
Console.WriteLine(); // 6. Find out whether the number is a perfect square
Console.WriteLine(@"6. 判断提供的数字是否是平方数");
Console.WriteLine(@"{0} 是平方数 = {1}. {2} 是平方数 = {3}", , .IsPerfectSquare(), , Euclid.IsPerfectSquare());
Console.WriteLine(); // 7. Compute the greatest common divisor of 32 and 36
Console.WriteLine(@"7. 返回32和36的最大公约数");
Console.WriteLine(Euclid.GreatestCommonDivisor(, ));
Console.WriteLine(); // 8. Compute the greatest common divisor of 492, -984, 123, 246
Console.WriteLine(@"8. 返回的最大公约数:492、-984、123、246");
Console.WriteLine(Euclid.GreatestCommonDivisor(, -, , ));
Console.WriteLine(); // 9. Compute the least common multiple of 16 and 12
Console.WriteLine(@"10. 计算的最小公倍数:16和12");
Console.WriteLine(Euclid.LeastCommonMultiple(, ));
Console.WriteLine();

结果如下:

.判断提供的数字是否是偶数
是偶数 = False. 是偶数 = True .判断提供的数字是否是奇数
是奇数 = True. 是奇数 = False .判断提供的数字是否是2的幂
是2的幂 = False. 是2的幂 = True .返回大于等于97的最小2的幂整数 . 2的16次幂 . 判断提供的数字是否是平方数
是平方数 = False. 是平方数 = True . 返回32和36的最大公约数 . 返回的最大公约数:、-、、 . 计算的最小公倍数:16和12

3.资源

  源码下载:http://www.cnblogs.com/asxinyu/p/4264638.html

  如果本文资源或者显示有问题,请参考 本文原文地址http://www.cnblogs.com/asxinyu/p/4301097.html

开源Math.NET基础数学类库使用(09)相关数论函数使用的更多相关文章

  1. 【原创】开源Math.NET基础数学类库使用(09)相关数论函数使用

                   本博客所有文章分类的总目录:[总目录]本博客博文总目录-实时更新  开源Math.NET基础数学类库使用总目录:[目录]开源Math.NET基础数学类库使用总目录 前言 ...

  2. 【目录】开源Math.NET基础数学类库使用总目录

    本博客所有文章分类的总目录链接:[总目录]本博客博文总目录-实时更新  1.开源Math.NET数学组件文章   1.开源Math.NET基础数学类库使用(01)综合介绍   2.开源Math.NET ...

  3. 【原创】开源Math.NET基础数学类库使用(03)C#解析Matlab的mat格式

                   本博客所有文章分类的总目录:[总目录]本博客博文总目录-实时更新  开源Math.NET基础数学类库使用总目录:[目录]开源Math.NET基础数学类库使用总目录 前言 ...

  4. 【原创】开源Math.NET基础数学类库使用(16)C#计算矩阵秩

                   本博客所有文章分类的总目录:[总目录]本博客博文总目录-实时更新  开源Math.NET基础数学类库使用总目录:[目录]开源Math.NET基础数学类库使用总目录 上个月 ...

  5. 【原创】开源Math.NET基础数学类库使用(17)C#计算矩阵条件数

                   本博客所有文章分类的总目录:[总目录]本博客博文总目录-实时更新  开源Math.NET基础数学类库使用总目录:[目录]开源Math.NET基础数学类库使用总目录 上个月 ...

  6. 开源Math.NET基础数学类库使用(17)C#计算矩阵条件数

    原文:[原创]开源Math.NET基础数学类库使用(17)C#计算矩阵条件数                本博客所有文章分类的总目录:http://www.cnblogs.com/asxinyu/p ...

  7. 开源Math.NET基础数学类库使用(16)C#计算矩阵秩

    原文:[原创]开源Math.NET基础数学类库使用(16)C#计算矩阵秩                本博客所有文章分类的总目录:http://www.cnblogs.com/asxinyu/p/4 ...

  8. 开源Math.NET基础数学类库使用(03)C#解析Matlab的mat格式

    原文:[原创]开源Math.NET基础数学类库使用(03)C#解析Matlab的mat格式 开源Math.NET基础数学类库使用系列文章总目录:   1.开源.NET基础数学计算组件Math.NET( ...

  9. 【原创】开源Math.NET基础数学类库使用(01)综合介绍

                   本博客所有文章分类的总目录:[总目录]本博客博文总目录-实时更新  开源Math.NET基础数学类库使用总目录:[目录]开源Math.NET基础数学类库使用总目录 前言 ...

随机推荐

  1. zoj3795 Grouping --- 良好的沟通,寻找最长的公路

    给定一个图,为了保持图分裂至少成多个集合的集合内可以使点没有直接或间接的关系. 首先,题意可以得到图中可能含有环.该环的内侧是肯定是要被拆卸. 图点降低建DAG画画,能想象..图从零点渗透深入,在点中 ...

  2. Discount Diesel Time 9150-1 Quartz Wrist watch [WAT022]- US$4.49

    Discount Diesel Time 9150-1 Quartz Wrist watch [WAT022]- US$4.49 Diesel Time 9150-1 Quartz Wrist wat ...

  3. [置顶] 我的Android进阶之旅------>如何将Android源码导入Eclipse中来查看(非常实用)

    Android源码下载完成的目录结构如如所示: step1:将.classpath文件拷贝到源代码的根目录 Android源码支持多种IDE,如果是针对APP层做开发的话,建议大家使用Eclipse开 ...

  4. C++习题 虚函数-计算图形面积

    C++习题 虚函数-计算图形面积 Time Limit: 1 Sec  Memory Limit: 128 MB Submit: 122  Solved: 86 [cid=1143&pid=6 ...

  5. 压缩js参数保存解决方法

    angular.js  中 找到 if (typeof fn === 'function') 在 if (fn.length) { console.warn("此函数没有注入注解,将导致编译 ...

  6. hdu 4836 The Query on the Tree(线段树or树状数组)

    The Query on the Tree Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Ot ...

  7. tomcat启动Flash退出错误不能被视为解决该错误信息

    tomcat 当有错误 启动startup.bat闪存在退出解决方案 打开 startup.bat 文件 最后 该start 阅读run watermark/2/text/aHR0cDovL2Jsb2 ...

  8. 黄聪:Microsoft Enterprise Library 5.0 系列教程(八) Unity Dependency Injection and Interception

    原文:黄聪:Microsoft Enterprise Library 5.0 系列教程(八) Unity Dependency Injection and Interception 依赖注入容器Uni ...

  9. 主流芯片解决方案Ambarella的高清网络摄像机、德州仪器和控制海思

    (本文由四川艾普作为数码科技有限公司 苏斌.范清华 收集) 高清网络视频监控发展到今天.正的高清时代.诸多有实力的高清摄像机厂家的产品线也逐渐完好起来,高清网络视频监控的配套产品有更加丰富和成熟.与此 ...

  10. Android下的单元測试

    android下的单元測试 在AndroidManifest.xml文件里配置下面信息: 在manifest节点下加入: <!-- 指定測试信息和要測试的包 --> <instrum ...