I need to use TinyMCE editor but I also need to be able to edit mathematical equations and formulas. I added the FMath editor plugin in my TinyMCE installation. Yes it works and I can add equations but the equations are generated img tags with src co

Edit, I have reformulated for more clarity (I hope):Does the fact that the input is divided into three sets matter in any way? From your question I did not understand the relation. My first instinct is to iterate through all combinations of 3, saving

I have been working in the past weeks on a multiplayer HTML5 game, using nodejs and websockets. I've been stuck in this problem for a little while. Imagine that I have this tilesheet map implemented with an array (as shown below). 1 or brown tiles -

I know mapping 2D array into 1D array has been asked many times, but I did not find a solution that would fit a where the column count varies. So I want get a 1-dimensional index from this 2-dimensional array Col> _0____1____2__ Row 0 |_0__|_1__|_2__

I want to implement SHL64 and SHR64 for my virtual CPU. My CPU have only four instructions implemented from NAND and can execute any if statements (all compare operations) Not Or And CMP (signed/unsigned/any type from 8b to 64b) Currently i implement

I am told to figure out the number of times the statement foo runs in the following program. We are assuming that n is an even number. j = 1; while( j <= n/2 ) { i = 1; while( i <= j ) { foo; i++; } j++; } I figured the best way to go about this wou

I have two sets of ranges that I need to be translated from one to the other. The first range is -100 ↔ 100 with 0 being default. The second range is 0.0 ↔ 10.0 with 1 being default. I am working in AS3 with the first range and the second range is a

I'm in a situation that I have a point Vector3(x,y,z), and I need from that starting point to generate a circle in 3D (a ring) that starts with that point and ends with it. Right now I can generate a circle of vector3, but I don't know how to generat

If x is 2.3, then math.floor(x) returns 2.0, the largest integer smaller than or equal to x (as a float.) How would I get i the largest integer strictly smaller than x (as a integer)? The best I came up with is: i = int(math.ceil(x)-1) Is there a bet

The setup I am writing a code for dealing with polynomials of degree n over d-dimensional variable x and ran into a problem that others have likely faced in the past. Such polynomial can be characterized by coefficients c(alpha) corresponding to x^al

I am using following line of code to round off value in java public class FloorTest { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub System.out.println(Math.round(29.56)); System.out.println(Math.roun

Can someone with a bit of time, he could explain to me how intensify very large numbers? I'm not talking here about a ready solution, and the only explanation of how to implement the arithmetic. Ideally, it was based on the class std::string. @edit I

I often smooth values by blending percentages and inverse percentages with the below: current_value = (current_value * 0.95f) + (goal_value * 0.05f) I'm running into a situation where I would like to perform this action n times, and n is a floating p

I have three 3D points like p1(x1,y1,z1), p2(x2,y2,z2), p3(x3,y3,z3). I have another point, but I know only x, y value of that point like p4(x4,y4,Z), in which Z is the value I like to compute. I am sure p4(x4,y4) point is inside a triangle formed by

I have a implementation of the Cantor Pairing Function in Java which I wrote 2 years ago. Now then I'm moving more to iOS I need the same thing in Objective-C. The problem is, at least from my point of view, in Java I had to implement a BigSqrt Class

This question already has an answer here: Way to get number of digits in an int? 27 answers I have do detect the amount of digits on a number. For example, 329586 has 6 digits. What I done, is simply parsing the number to string, and getting the stri

I have trouble figuring out why a simple division like this one always returns 0. System.out.println(4091365376L / 4091495462L * 100L); I suffixed all numbers with Ls so they're treated as Longs. I keep getting a zero. I'm trying to calculate the per

are you aware of a trusted (i.e. efficient and accurate) implementation of special math functions (like gamma, beta, error and inverse error functions) for the C language available with a non-gpl license? BSD or MIT licenses are fine. So something li

How to simplify a fraction in C#? For example, given 1 11/6, I need it simplified to 2 5/6.If all you want is to turn your fraction into a mixed number whose fractional part is a proper fraction like the previous answers assumed, you only need to add

I have a line, defined by the parameters m, h, where y = m*x + h This line goes across a grid (i.e. pixels). For each square (a, b) of the grid (ie the square [a, a+1] x [b, b+1]), I want to determine if the given line crosses this square or not, and

I have a set of three (or more) known variables that are related to the input of a process. I also have the (measured) results of the process, in this case the time it took for the process to complete. In order to be able to give an estimated duratio

First of all, this is not a floating point newbie question. I know results of floating point arithmetic (not to mention transcendental functions) usually cannot be represented exactly, and that most terminating decimals cannot be represented exactly

The user can enter a math problem (expression) like 5 + 654, 6 ^ 24, 2!, sqrt(543), log(54), sin 5, sin(50). After some reformatting (e.g. change sin 5 into sin(5)), and doing an eval, PHP gives me the right result: $problem = "5 + 5324"; eval(&

if have multiples object, how to arrange it so that each number of object in row x column will form a near square? exp:14 objects arrange to something like this: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Take the ceil of the square root? in python: import math cei

Best to use an example to describe the problem. Lets say I have a decimal value 100.227273. 100.227273 * X = Y I need to find the smallest positive integer X that gives integer Y.If the 100.227273 is just an approximation and you want to get the best

differencePercentage = Math.round(((Pay.init / Pay.current) * 100) - 100); and that gives me the difference in percent between initial and current pay, but it's reversed. When it's positive i.e. pay is above the initial value it says -X%, and when it

I two concentric circles on the screen and I want the circle on the inside to move around while the user drags their finger around the outside of the larger circle. This means that I have two point, center of the larger circle and the point at which

typedef struct Complex{ double real; int img; } Complex; I've seen people use it as a type like: Complex sqrt( double x) { } how do 'real' and 'img' play a role in this type of function? ThanksIt can be used like this: Complex sqrt(double x) { Comple

I just wondered how it is possible to write a user-defined square root function (sqrt) in a way that it interacts properly with F#'s unit system. What it should be like: let sqrt (x : float<'u ^ 2>) = let x' = x / 1.0<'u ^ 2> // Delete unit (x

How do you write a SQL query to calculate the VAT and then add it to Total?Surely homework. However, let us know what you've tried. In general, you're supposed to make an effort first before people on SO will help you. What does your table look like?