Welcome To Snipplr


Everyone's Recent Snippets Tagged math



« Prev 1 2
  1. FAV

    Circle and sphere calculator

    A simple program to calculate the area and perimeter of a circle and to calculate the area and volume of a sphere. Source is commented,
    Python 5 views posted 5 years ago by Tharix
  2. FAV

    Math.TAU polyfill

    Brendan Eich is working on officially adding Math.TAU to JavaScript. Until JavaScript has full support for the Math.TAU constant, you can add the following at the start of your programs to add support for the TAU constant.
    JavaScript 4 views posted 5 years ago by pmw57
  3. FAV

    20131110_1331_r.7_math_response_sentence

    Sublime Text
    LaTeX 3 views posted 6 years ago by greencocoa
  4. FAV

    20130611_1400_r.7_math_homework_template

    Sublime Text
    LaTeX 2 views posted 6 years ago by greencocoa
  5. FAV

    20130611_1330_math_ex_with_header

    Sublime Text
    LaTeX 4 views posted 6 years ago by greencocoa
  6. FAV

    20130611_1328_math_exercise

    Sublime Text
    LaTeX 2 views posted 6 years ago by greencocoa
  7. FAV

    Random number generator

    A random number generator using a for-loop.
    Java 2 views posted 6 years ago by karellism
  8. FAV

    Summate() - Add the characters of a number

    This function will return the sum of the characters making up a number. For example, summate(321) will return 6. summate(123) will also return 6, because both 123 and 321 are made out of the same characters. Supports integers of any length, but only...
    JavaScript 1 views posted 6 years ago by Salamandern
  9. FAV

    Math expression syntax validator of parentheses in Python 3

    Soma example of validation parentheses in math expressions. [{()}] - valid [{){}] - wrong
    Python 6 views posted 7 years ago by AlexanderRavikovich
  10. FAV

    Sum keyed elements of an array

    Sum all elements of a bidimensional or multi-dimensional array with an assigned key
    PHP 5 views posted 7 years ago by eortiz
  11. FAV

    Scaling Values into a range between 0 and 1

    You have to use float or double for the returned value, since the scale occurs in a continuous function.
    Java 6 views posted 7 years ago by rtperson
  12. FAV

    AS3 MathUtils static class

    Credit goes to Bruno Imbrizi.
    ActionScript 3 9 views posted 7 years ago by adrianparr
  13. FAV

    AS3 Map a Number within one range to another range

    Credit goes to Bruno Imbrizi.
    ActionScript 3 7 views posted 7 years ago by adrianparr
  14. FAV

    Using Math.min and Math.max for an array

    Clever usage of apply allows you to use built-ins functions for some tasks that otherwise probably would have been written by looping over the array values. As an example here we are going to use Math.max/Math.min to find out the maximum/minimum valu...
    JavaScript 5 views posted 7 years ago by hellowouter
  15. FAV

    Gaussian Elimination

    Numerical Methods application for solving system of equation using Gaussian Elimination based on this Wikipedia article: http://j.mp/GV3PcN
    C++ 8 views posted 7 years ago by Bangonkali
  16. FAV

    [JAVA] Número Aleatorio Math.random()

    Número aleatorio entre a y a + b, excluyendo a + b: a + Math.random() * b
    Java 3 views posted 8 years ago by goo
  17. FAV

    Convert Radians to Degrees

    ActionScript 3 2 views posted 8 years ago by zackattack27
  18. FAV

    Simple Math Captcha-like verification JavaScript script that uses jQuery (form) validation plugin

    Don't forget to include jQuery validation plugin before this snippet. You can find it here: http://bassistance.de/jquery-plugins/jquery-plugin-validation/
    JavaScript 7 views posted 8 years ago by racl101
  19. FAV

    Function for Summation

    Easy but powerful.
    PHP 3 views posted 9 years ago by iamdezzy
  20. FAV

    Function for Finding Narcissistic Numbers

    I'm just trying
    PHP 1 views posted 9 years ago by iamdezzy
  21. FAV

    AS3 Round Decimal Places

    ActionScript 3 saved by 3 people 3 views posted 9 years ago by adrianparr
  22. FAV

    Project Euler - Problem 2

    Prolog 4 views posted 9 years ago by 13tazer31
  23. FAV

    Project Euler - Problem 1

    Prolog 4 views posted 9 years ago by 13tazer31
  24. FAV

    jQuery UI slider with mathematical estimates

    jQuery 1 views posted 9 years ago by lynseydesign
  25. FAV

    Sieve of Eratosthenes

    Returns an array of all the prime numbers up to (n) using an implementation of the Sieve of Eratosthenes.
    JavaScript 1 views posted 9 years ago by pmigueld
  26. FAV

    Curvature of point set

    Python 0 views posted 9 years ago by ianbaldy
  27. FAV

    Forcee a page to reload

    JavaScript 3 views posted 9 years ago by magicrebirth
  28. FAV

    AS3: Rounding to nearest N

    syntax: roundToNearest(45, YourValueHere);
    ActionScript 3 saved by 1 person 0 views posted 9 years ago by Winkyboy
  29. FAV

    How to Convert Degrees to Radians, Radians to Degrees

    Objective C saved by 4 people 5 views posted 9 years ago by magicrebirth
  30. FAV

    Greatest Common Factor

    ActionScript 3 3 views posted 9 years ago by b121417
« Prev 1 2