text
stringlengths
0
27.6k
python
int64
0
1
DeepLearning or NLP
int64
0
1
Other
int64
0
1
Machine Learning
int64
0
1
Mathematics
int64
0
1
Trash
int64
0
1
I am trying to fit a transformation from one set of coordinates to another. x' = R + Px + Qy y' = S - Qx + Py Where P,Q,R,S are constants, P = scale*cos(rotation). Q=scale*sin(rotation) There is a well known 'by hand' formula for fitting P,Q,R,S to a set of corresponding points. But I need to have an error estima...
0
0
0
0
1
0
How can I invert a binary equation, such that I can find which inputs will produce a given output. Example: Inputs: i0 through i8 Outputs: o0 through o8 Operators: ^ = XOR, & = AND Binary equations: (1&i0) ^ (1&i1) ^ (0&i2) ^ (1&i3) ^ (0&i4) ^ (0&i5) ^ (0&i6) ^ (0&i7) ^ (0&i8) = o0 (0&i0) ^ (1&i1) ^ (0&i2) ^ (1&i3) ^ ...
0
0
0
0
1
0
Although it is not very programming related but I think SO could be of some assistance: A zeroless pandigital number of base 10 is a number with all the distinct digits 1,2,3,4,5,6,7,8,9. For example, the first zeroless pandigital number of base 10 is 123456789. Find a zeroless pandigital number of base 10 such that...
0
0
0
0
1
0
I'm trying to write a program that will help someone study for the GRE math. As many of you may know, fractions are a big part of the test, and calculators aren't allowed. Basically what I want to do is generate four random numbers (say, 1-50) and either +-/* them and then accept an answer in fraction format. The rando...
0
0
0
0
1
0
I'm interested in calculating permutations for parameters for something like this: public class Movie() { @Selection(minimum=1,maximum=10) public Integer setLength() {} @Selection(minimum=1.1,maximum=5.5) public Double setCost() {} } So I can write something like List getPermutations(); so that I could ...
0
0
0
0
1
0
Considering I have a continuous joint distribution of two independent normal random variables (let's assume the independent vars are on the X and Z axis, and the dependent - the joint probability - is on the Y axis), and I have a line anywhere on the XZ plane, how would I compute the probability of a point falling on o...
0
0
0
0
1
0
I have a system that requires a unique 6-digit code to represent an object, and I'm trying to think of a good algorithm for generating them. Here are the pre-reqs: I'm using a base-20 system (no caps, numbers, vowels, or l to prevent confusion and naughty words) The base-20 allows 64 million combinations I'll be in...
0
0
0
0
1
0
Was just wondering how I would go about creating a planar shadow from a 4x3 matrix, all online demos I've seen use 4x4 matrices instead.
0
0
0
0
1
0
This is a question only to those who already used the LingPipe. My question is how to load up the GENIA corpus for Part of Speech tagging. When I start parsing it I get an error saying that I got out of memory heap. Thnx.
0
1
0
0
0
0
Ok I have two functions the first of which looks like so: let dlth x = float (x.ToString().Length) which takes a float and returns the number of digits, that part works fine. The second function looks like this: let droot x = ((x ** (1./(dlth x))) % 1.) which takes a float and raises it to a power equal to 1.0/(numb...
0
0
0
0
1
0
I have a rather mathematical problem I need to solve: The task is to cut a predefined number of tubes out of fixed length tubes with a minimum amount of waste material. So let's say I want to cut 10 1m tubes and 20 2,5m tubes out of tubes with a standardized length of 6m. I'm not sure what an algorithm for this kind of...
0
0
0
0
1
0
I want to design a URL shortener for a particular use case and type of end-user that I have targetted. I have decided that I want the URLs to be stored internally according to an auto-incrementing integer key. However, it is also required that a key be represented to users in the url as six-digit base 26 (a-z * 6) AND ...
0
0
0
0
1
0
I searched the site but did not find exactly what I was looking for... I wanted to generate a discrete random number from normal distribution. For example, if I have a range from a minimum of 4 and a maximum of 10 and an average of 7. What code or function call ( Objective C preferred ) would I need to return a numb...
0
0
0
0
1
0
Why is "greater than" comparisons for number values in JavaScript not working. The example below keeps returning true even when the mini number is less than the maxi. mini and maxi are form input values. This example is using jQuery to get the values, but could easily be stripped. var mini = $('form#filterPrice input....
0
0
0
0
1
0
I need to interpret relative date string like: last Friday this Tuesday next Wednesday The "Last Friday" form is easy (take the most recent Friday that is not today) but what about "this" vs. "next"? Could "this Wednesday" be yesterday on a Thursday? Could "this" and "next" Friday be the same day in some cases and a ...
0
1
0
0
0
0
I'm trying to build a scientific calculator with vb .net, except it is vista glass :-p I basically want the user to be able to enter an equation like SQRT(5 * 6) / (2 ^ 4) and then I want vb to use system.math to solve it. If I write this in my code, vb is able to do it, so how could I do this at runtime. Thanks
0
0
0
0
1
0
I'm working on a 2D game that has a huge amount of dynamic entities. For fun's sake, let's call them soldiers, and let's say there are 50000 of them (which I just randomly thought up, it might be much more or much less :)). All these soldiers are moving every frame according to rules - think boids / flocking / steering...
0
1
0
0
0
0
Upon reaching a brick wall with the .Net framework's lack of a BigInteger class (yet), I've decided I'd like to develop my own as an exercise (I realize open source alternatives exist). What hoops do I need to jump through to be able to develop this? Is there any particuliar knowledge pieces that I probably wouldn't ...
0
0
0
0
1
0
I am creating a bouncing object that can bounce around a 2D rectangular room. I have read through the answer of the other question about using velocityX and velocityY instead of normal direction angle. OK, it sounds easier so I implement the following mathematical methods below. However, there is one difference. I requ...
0
0
0
0
1
0
Does anybody knows of a software package where you can type a formula and it verifies sintactically (it doesn't need to check semantics). Thanks.
0
0
0
0
1
0
This is the approach John Carmack uses to calculate the determinant of a 4x4 matrix. From my investigations i have determined that it starts out like the laplace expansion theorem but then goes on to calculate 3x3 determinants which doesn't seem to agree with any papers i've read. // 2x2 sub-determinants float ...
0
0
0
0
1
0
I have a Unix timestamp that I need to get the individual year, month, day, hour, minute and second values from. I never was very good in math class so I was wondering if you guys could help me out a little :) I have to do everything myself (no time.h functions). The language is C.
0
0
0
0
1
0
Is there a method for determining the base 10 log of any number in the iPhone language? Any help with the math for this would be appreciated by a newbie budding iPhone developer. Thanks in advance. M
0
0
0
0
1
0
In HLSL there's a lot of matrix multiplication and while I understand how and where to use them I'm not sure about how they are derived or what their actual goals are. So I was wondering if there was a resource online that explains this, I'm particularly curious about what is the purpose behind multiplying a world matr...
0
0
0
0
1
0
I have two unsigned long longs X and Y, where X < Y, but both may be very large. I want to compute the first digit past the decimal point of X / Y. For example, if X is 11 and Y is 14, then 11 / 14 is .785…, so the result should be 7. (X * 10) / Y would work, except it produces the wrong result if X * 10 overflows. ...
0
0
0
0
1
0
Imagine I write a simple calculator application, that just calculates simple stuff like 1.5 + 30 + 9755 - 30 - 20000 + 999900.54 I remember slightly that there were some precision problems when using floating point numbers. At which point would my calculator app start to create wrong results? Most of the time, I wou...
0
0
0
0
1
0
I decided to do a project for fun where I want to take as input the image of a playing card and return its rank and suit. I figure that I only need look at the upper-left corner, since that has all the information. It should be robust - if I have a large image of an Ace of Diamonds, I should be able to scale it anywher...
0
1
0
0
0
0
I'm starting out my expedition into Project Euler. And as many others I've figured I need to make a prime number generator. Problem is: PHP doesn't like big numbers. If I use the standard Sieve of Eratosthenes function, and set the limit to 2 million, it will crash. It doesn't like creating arrays of that size. Underst...
0
0
0
0
1
0
I'm in a very performance-sensitive portion of my code (C#/WPF), and I need to perform a modulus operation between two System.TimeSpan values in the quickest way possible. This code will be running thousands of times per second, and I would very much prefer to avoid using a manual loop calculation - at all costs. T...
0
0
0
0
1
0
Does boost have one? Where A, y and x is a matrix (sparse and can be very large) and vectors respectively. Either y or x can be unknown. I can't seem to find it here: http://www.boost.org/doc/libs/1_39_0/libs/numeric/ublas/doc/index.htm
0
0
0
0
1
0
I have a Probablistic Neural Network classification experiment set up in MATLAB. I can get the classes for unseen data using the sim command. Is there any way I can get the probabilities for the classes that the classifier calculates? Also, is there any direct way to plot the Reciever Operating Characterstic curve and ...
0
0
0
1
0
0
I saw this text while reading wikipedia(http://en.wikipedia.org/wiki/K-means%2B%2B) The authors tested their method with real and synthetic datasets and obtained typically 2-fold improvements in speed, and for certain datasets close to 1000-fold improvements in error. and I'm curious about the meaning of -fold, like...
0
0
0
1
0
0
I'm trying to solve what seems to be a simple math problem. I can write the problem as a for loop, but I'm not sure how to translate it into an equation. Can anyone help? x = 10; for(int i=0; i<3000; i++) { x = x^2 }
0
0
0
0
1
0
I am presently trying to construct an OBB (Oriented Bounding Box) using the source and math contained in the book "Real Time Collision Detection". One problem with the code contained in this book is that it does very little to explain what the parameters mean for the methods. I am trying to figure out what I need to fe...
0
0
0
0
1
0
I am getting OverflowException's thrown at me when I don't want them (or so I think). I am performing some odd calculations where I expect the values to overflow, discarding overflowed bits. It seems I can't get this to work properly though. Basically this is one pair of i and j which happens as I iterate over huge set...
0
0
0
0
1
0
why is 24 * 60 * 60 * 1000 * 1000 divided by 24 * 60 * 60 * 1000 not equal to 1000 in Java?
0
0
0
0
1
0
I have a difficult mathematical question that is breaking my brain, my whiteboard, and all my pens. I am working with a file that expresses 2 values, a multiplicand and a percentage. Both of those values must be integers. These two values are multiplied together to produce a range. Range is a float value. My users edit...
0
0
0
0
1
0
I have got an undirected weighted connected graph. If I select one vertex I automatically select all the vertices connected directly with it. What will be the algorithm so that I am able to select all the vertices of the graph using minimum number of tries? In each try I select one vertex. For example for adjacency mat...
0
0
0
0
1
0
First of all, the title is very bad, due to my lack of a concise vocabulary. I'll try to describe what I'm doing and then ask my question again. Background Info Let's say I have 2 matrices of size n x m, where n is the number of experimental observation vectors, each of length m (the time series over which the observat...
0
0
0
0
1
0
Say I'm inserting a 64 bit floating point double into a DECIMAL(17,5) field. Does the value get rounded or truncated?
0
0
0
0
1
0
How can I simplify a basic arithmetic expression? e.g. module ExprOps where simplify :: Expr -> Expr simplify (Plus(Var"x") (Const 0)) = Var "x" What do I have to do? module Expr where -- Variables are named by strings, assumed to be identifiers. type Variable = String -- Representation of expressions. data Expr ...
0
0
0
0
1
0
How many possible words of length 6 can I generate from the English lower case alphabet, if each word starts with a random consonant, and after that vowels and consonants alternate? What if I add digits to my alphabet? See also this question.
0
0
0
0
1
0
I am doing a Monte Carlo experiment to calculate an approximation of PI. From SICP: The Monte Carlo method consists of choosing sample experiments at random from a large set and then making deductions on the basis of the probabilities estimated from tabulating the results of those experiments. For example,...
0
0
0
0
1
0
I,m developing a debt calculation program 'my problem is when i have to calculate the months to pay back the debt it comes to 28.04 and i have to get it to 29 can some one pls help me out. Thank you in advance my code looks like this: Dim b, SubMtP As Integer Dim outsUm, si outsUm = TextBox1.Text Sub...
0
0
0
0
1
0
I am trying to translate this statement into Actionscript: "Sally is 5 years old. Jenny is 4 years old. The combined age of Sally and Jenny is 9 years." This is what I have so far: function getAges (sallyAge:Number,jennyAge:Number,combinedAge:Strin g) { trace("Sally's Age:" + sallyAge); trace("Jenny's Age:" + jennyAge)...
0
0
0
0
1
0
I have a friend that needs to compute the following: In the complete graph Kn (k<=13), there are k*(k-1)/2 edges. Each edge can be directed in 2 ways, hence 2^[(k*(k-1))/2] different cases. She needs to compute P[A !-> B && C !-> D] - P[A !-> B]*P[C !-> D] X !-> Y means "there is no path from X to Y", and P[ ] is the p...
0
0
0
0
1
0
I plan on having to split up the Geometry object into a series of simpler shapes, and combine their centroids using this formula: Mathematical details of this formula can be found in this Wikipedia article. NOTICE: Don't be suprised if my view of the mathematics is incorrect. I haven't done any complex math past tri...
0
0
0
0
1
0
I need to implement sentiment analysis. Can anyone point me to examples/reference implementations?
0
1
0
0
0
0
I'm writing iPhone code that fuzzily recognizes whether a swiped line is straight-ish. I get the bearing of the two end points and compare it to 0, 90, 180 and 270 degrees with a tolerance of 10 degrees plus or minus. Right now I do it with a bunch of if blocks, which seems super clunky. How to write a function that, g...
0
0
0
0
1
0
Duplicate Best algorithm for evaluating a mathematical expression? mathematical expression parser in Delphi? I need a program in Delphi that get one variable equation from Edit1 such as "F(x)=4*X+2*log(x)+4*power(X,2)"and get X value variable from Edit2 then show the result F(X) in Edit3. Please help me. Thanks.
0
0
0
0
1
0
I am new to Ruby on Rails and have been using Scaffolding. On one of the forms I want to be able to have two fields and then have the difference between the two submitted to the database. Instead of :pickupamount, I want (Ending Amount - Starting Amount) to be calculated and entered into the pickupamount column of my ...
0
0
0
0
1
0
Ok well heres what I would like to do in PHP: http://www.wordle.net/ I know how to do all of the GD (writing to the canvas), my issue is the logic of actually keeping track of different sized word boxes and correctly placing them on a blank canvas. If anyone knows of a good site that has some resources that could lead ...
0
0
0
0
1
0
So, i recently found this term related somehow to neural networks, but I don't find anymore info on this topic, and it seems interesting. Does anybody know where I can find more info for starters on this? thanks in advance
0
1
0
0
0
0
The basic table schema looks something like this (I'm using MySQL BTW): integer unsigned vector-id integer unsigned fk-attribute-id float attribute-value primary key (vector-id,fk-attribute-id) The vector is represented as multiple records in the table with the same vector-id I need to build a separate table with the...
0
0
0
0
1
0
I have two 2d circles in 3d space (defined by a center, normal, and radius) and I'm trying to come up with a pair of points that is one of the set of closest pairs of points. I know that there are anywhere from 1 to an infinite number of point pairs, I just need a single matching pair. Is there a simple way to do that...
0
0
0
0
1
0
I'm trying to implement application that can determine meaning of sentence, by dividing it to smaller pieces. So I need to know what words are subject, object etc. so that my program can know how to handle this sentence.
0
1
0
0
0
0
I am trying to determine the volatility of a rank. More specifically, the rank can be from 1 to 16 over X data points (the number of data points varies with a maximum of 30). I'd like to be able to measure this volatility and then map it to a percentage somehow. I'm not a math geek so please don't spit out complex form...
0
0
0
0
1
0
Given a square (described by x, y, width, height) and an angle (in radians) I need to calculate a vector that originates at the squares centre and terminates at the point that collides with the edge of the square at the given angle. I'm really most interested in the point it collides at so if that would make calculatio...
0
0
0
0
1
0
How do I parse sentence case phrases from a passage. For example from this passage Conan Doyle said that the character of Holmes was inspired by Dr. Joseph Bell, for whom Doyle had worked as a clerk at the Edinburgh Royal Infirmary. Like Holmes, Bell was noted for drawing large conclusions from the smallest observation...
0
1
0
0
0
0
We are looking to do display some mathematical data in a Flex GUI chart. We need to do plot for two array of data the following. cross-correlation of both auto-correaltion of each and correlation coefficient It looks like Flex does not support scientific formula like cross-correlation,auto-correlation and co-relation c...
0
0
0
0
1
0
So I'm currently working on some FPS game programming in OpenGL (JOGL, more specifically) just for fun and I wanted to know what would be the recommended way to create an FPS-like camera? At the moment I basically have a vector for the direction the player is facing, which will be added to the current player position u...
0
0
0
0
1
0
I need topic ideas related to AI on which I will base my thesis. I am mostly interested in Genetic Algorithm and Neural Networks techniques. I already got the some ideas, but non of them seems to hit me! Any help will be really appreciated!! :)
0
1
0
0
0
0
I was wondering, which are the most commonly used algorithms applied to finding patterns in puzzle games conformed by grids of cells. I know that depends of many factors, like the kind of patterns You want to detect, or the rules of the game...but I wanted to know which are the most commonly used algorithms in that kin...
0
1
0
0
0
0
Given two planes positioned and rotated arbitrary to each other, I'm trying to determine which vertices should be connected. The image below (planes in black, connecting edges in red) illustrates two examples on how the planes might look: Comparing the distances between vertices won't work as the planes are not (nece...
0
0
0
0
1
0
For the fun of it, I would like to see someone use and abuse LINQ to solve this money problem. I really have no idea how you would do it - I suppose Populating some set and then selecting off of it. If given a total number of coins and give the total amount of all coins added together: Show every possible combination o...
0
0
0
0
1
0
I know that if I have the following group of numbers { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } I can have 5040 different 4-digit numbers, using 10! / (10 - 4)! But if I repeat one number on the initial group, like { 1, 1, 2, 3, 4, 5, 6, 7, 8, 9 } How many different 4-digit numbers can we build ? I know the answer is 3360, jus...
0
0
0
0
1
0
On the Wikipedia page about summation it says that the equivalent operation in Haskell is to use foldl. My question is: Is there any reason why it says to use this instead of sum? Is one more 'purist' than the other, or is there no real difference?
0
0
0
0
1
0
My ASP.NET page has following query string parameter: …?IDs=1000000012,1000000021,1000000013,1000000022&... Here IDs parameter will always have numbers separated by something, in this case ,. Currently there are 4 numbers but normally they would be in between 3 and 7. Now, I am looking for method to convert each big ...
0
0
0
0
1
0
i'm trying to find an efficient way to find a subportion of a large grid. Currently I'm looping through rows to define a FROM-TO selection of ids in that row, but this doesn't feel right... Let's say I have a grid of 200x200 fields (x between 1 and 200, y between 1 and 200). Every field also has it's unique ID, startin...
0
0
0
0
1
0
I have two questions 1- what is the "11pt average precision metric"? 2- and how to use it in information retrieval? Thanks
0
1
0
1
0
0
I need to parse & process a big set of semi-structured text (basically, legal documents - law texts, addendums to them, treaties, judge's decisions, ...). The most fundamental thing I'm trying to do is extract information on how subparts are structured - chapters, articles, subheadings, ... plus some metadata. My quest...
0
1
0
0
0
0
I know I should do my homework on my own but I simply can't get my homework to work the way I want it to: from __future__ import division import turtle import math def triangle(c,a,b,beta,gamma): turtle.forward(c) turtle.right(180+beta) turtle.forward(a) turtle.right(beta) turtle.left(beta+gamma) ...
0
0
0
0
1
0
I have the following requirement: - I have many (say 1 million) values (names). The user will type a search string. I don't expect the user to spell the names correctly. So, I want to make kind of Google "Did you mean". This will list all the possible values from my datastore. There is a similar but not same question h...
0
1
0
0
0
0
The problem here is I have a display window of size x by y, and I need to display an image inside the window without any scrolling, and to maintain the aspect ratio of 4:3. I have the following snippet of code: // Lock the current height, calculate new width of the canvas and scale the viewport. // get width of the mov...
0
0
0
0
1
0
I'm trying to train an ANN (I use this library: http://leenissen.dk/fann/ ) and the results are somewhat puzzling - basically if I run the trained network on the same data used for training, the output is not what specified in the training set, but some random number. For example, the first entry in the training file ...
0
1
0
0
0
0
TL;dr: "I am not sure how to calculate a smooth transition of thrust between one vector and another." I am programming a simple game where an enemy chases after the player in an open space (no walls). I was calculating the enemy's x & y velocities independently, accelerating them if they were taking them in the directi...
0
0
0
0
1
0
Would it be an polynomial time algorithm to a specific NP-complete problem, or just abstract reasonings that demonstrate solutions to NP-complete problems exist? It seems that the a specific algoithm is much more helpful. With it, all we'll have to do to polynomially solve an NP problem is to convert it into the spec...
0
0
0
0
1
0
This following is a snippet of Python code I found that solves a mathematical problem. What exactly is it doing? I wasn't too sure what to Google for. x, y = x + 3 * y, 4 * x + 1 * y Is this a special Python syntax?
0
0
0
0
1
0
I have a coordinate from Core Location and want to calculate the co-ordinate given a bearing and a distance, say in km. I think this is the formula from here. http://www.movable-type.co.uk/scripts/latlong.html Formula: lat2 = asin(sin(lat1)*cos(d/R) + cos(lat1)*sin(d/R)*cos(θ)) lon2 = lon1 + atan2(sin(θ)*s...
0
0
0
0
1
0
I have a application which needs to raise a number to a fractional power. The target platform is an FPGA and I can get estimates on an FPU size for it, but I need an algorithm for raising a number to a fractional power just for a feasibility study. I'm assuming floating point as a worst case, I expect in practice we ...
0
0
0
0
1
0
I would like to test if a point is within a particular distance of a sphere. So you have these variables... Point3F spherePnt; F32 sphereRadius; Point3F testPnt; I could do... F32 dist = ( spherePnt - testPnt ).len() - sphereRadius; If dist is positive it is outside the radius, if dist is negative it is inside the ra...
0
0
0
0
1
0
Given some (English) word that we shall assume is a plural, is it possible to derive the singular form? I'd like to avoid lookup/dictionary tables if possible. Some examples: Examples -> Example a simple 's' suffix Glitch -> Glitches 'es' suffix, as opposed to above Countries -> Country 'ies' suffix. Sheep...
0
1
0
0
0
0
Okay, so this is a straight math question and I read up on meta that those need to be written to sound like programming questions. I'll do my best... So I have graph made in flot that shows the network usage (in bytes/sec) for the user. The data is 4 minutes apart when there is activity, and otherwise set at the start ...
0
0
0
0
1
0
When I try to get the sum of a column from a table I get the error Arithmetic overflow error converting expression to data type int because the resulting number is to big for an INT. So I tried to CAST to a BIGINT using the following SELECT CAST(SUM(columnname) AS BIGINT) FROM tablename This gives me the same error. A...
0
0
0
0
1
0
I have some code where, if a user has referred X number of people, he will get X number of credits. For example, referring 2 people = 1 credit. 4 people = 2 credits, and so on. However where this gets tricky is, the numbers can be changed so he gets 1 credit per person, or 1 credit per 3 people, 1 credit for 5 people, ...
0
0
0
0
1
0
I'm having an issue with a query I wrote where for some reason the variable that I'm using to store a decimal value in returns 6 values after the decimal place (they're mostly 0). I have tried the following (and different combinations using Math.Round) with no luck. Sales = (from invhed in INVHEAD ...
0
0
0
0
1
0
I know this isn't strictly a programming question, but it is a computer science question so I'm hoping someone can help me. I've been working on my Algorithms homework and figuring out the Big-Oh, Big-Omega, Theta, etc, of several algorithms. I'm proving them by finding their C and N0 values and all is going well. How...
0
0
0
0
1
0
I'm trying to compute 100! and there doesn't seem to be a built-in factorial function. So, I've written: Protected Sub ComputeFactorial(ByVal n As ULong) Dim factorial As ULong = 1 Dim i As Integer For i = 1 To n factorial = factorial * i Next lblAnswer.Text = factor...
0
0
0
0
1
0
I am looking at developing an AI player for a simple game I have created in C#. I will be creating a population of the bots and evolving them over generations. What I was wondering is there any frameworks out there that could be good for this sort of testing / development. Ideally I would like something that I could ...
0
1
0
0
0
0
Possible Duplicate: Round a double to 2 significant figures after decimal point I have a value var i = 0.69999980926513672. I need to round this value to 0.7 is there a built-in method that will do this?
0
0
0
0
1
0
I need an algorithm which calculates something similar to the Levenshtein distance. It should calculate the minimal possible number of transformations to get from one sequence to another. The allowed transformations are deletion, insertion and move: Deletion of 3: before {1, 2, 3, 4}, after {1, 2, 4} Insertion of 5: be...
0
0
0
0
1
0
Does anyone know where I could get a rundown of the vector math I'd need in order to program a raytracer? I could use a refresher of linear algebra and multivar calc since it's been a few years since I've taken those classes.
0
0
0
0
1
0
If you go to the following link you'll see a really cool Javascript simulation of a cube that rotates based on your mouse position. Simulation: here. If you view the source of the cube rotating script you'll see: <script type="text/javascript"> /* I wrote this script in a few minutes just for fun. It's not made to w...
0
0
0
0
1
0
I am trying to use GLSMultipleLinearRegression (from apache commons-math package) for multiple linear regression. It is expecting a covariance matrix as input -- I am not sure how to compute them. I have one array of dependent variables and 3 arrays of independent variables. Any idea how to compute the covariance matr...
0
0
0
0
1
0
Is it possible to use the Google Wave Context-Aware Spell Checker via web services? If yes, can anyone please be kind enough to post a simple example?
0
1
0
0
0
0
Anyone know of a good Math Expression builder for an online WYSIWIG. Ideally the user would be able to easily create common math symbols/notations like summation, integrals, radicals, etc... online, ideally in an existing editor. I also need to be able host it (and ideally integrate it) in a .NET stack (IIS/Windows). T...
0
0
0
0
1
0
I'm trying to understand a paper on lossless compression of floating point numbers and get stuck on one particular step where the authors map a signed integer from a certain range into a range of half the size, losing information that I would think is required. I have a feeling that the authors are using some standard ...
0
0
0
0
1
0
I am seeing something odd with storing doubles in a dictionary, and am confused as to why. Here's the code: Dictionary<string, double> a = new Dictionary<string, double>(); a.Add("a", 1e-3); if (1.0 < a["a"] * 1e3) Console.WriteLine("Wrong"); if (1.0 < 1...
0
0
0
0
1
0
I'm trying to draw a vertical scrollbar for my G15 applet, but am having difficulty positioning it properly (if you haven't done anything for the G15 LCD screen, think of it as drawing on a 160x43 pixel image). This is my current code for positioning: perc = (float)Math.Round( range / Items.Count+1 ); y = ( perc * Sel...
0
0
0
0
1
0
Consider the following code snippet: $beat = date('B'); // 1 beat = 86.4 seconds, 1000 beats = 1 day $total = 'SELECT COUNT(id) FROM ads WHERE featured = 1;'; // number of featured ads $current = 'SELECT * FROM ads WHERE featured = 1 ORDER BY id ASC LIMIT 1 OFFSET ' . ($beat % $total) . ';'; // current featured ad Ba...
0
0
0
0
1
0