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 hope someone could help me on this.
I want to add a month to a database date, but I want to prevent two jumping over month on those days at the end.
For instance I may have:
Jan 31 2009
And I want to get
Feb 28 2009
and not
March 2 2009
Next date would be
March 28 2009
Jun 28 2009
etc.
Is there a function that... | 0 | 0 | 0 | 0 | 1 | 0 |
Let's say I have 3 point clouds: first that has 3 points {x1,y1,z1}, {x2,y2,z2}, {x3,y3,z3} and second point cloud that has same points as {xx1, yy1, zz1}, {xx2,yy2,zz2}, {xx3,yy3,zz3}... I assume to align second point cloud to first I have to multiply second one's points by T[3x3matrix].
1) So how do I find this tran... | 0 | 0 | 0 | 0 | 1 | 0 |
When I pass the options in the program (a computational biology experiment) I usually pass them through a .py file.
So I have this .py file that reads like:
starting_length=9
starting_cell_size=1000
LengthofExperiments=5000000
Then I execute the file and get the data. Since the program is all on my machine and no one ... | 0 | 1 | 0 | 0 | 0 | 0 |
I am doing some float manipulation and end up with the following numbers:
-0.5
-0.4
-0.3000000000000000004
-0.2000000000000000004
-0.1000000000000000003
1.10E-16
0.1
0.2
0.30000000000000000004
0.4
0.5
The algorithm is the following:
var inc:Number = nextMultiple(min, stepSize);
trace(String(inc));
private function ne... | 0 | 0 | 0 | 0 | 1 | 0 |
TF-IDF (term frequency - inverse document frequency) is a staple of information retrieval. It's not a proper model though, and it seems to break down when new terms are introduced into the corpus. How do people handle it when queries or new documents have new terms, especially if they are high frequency. Under tradi... | 0 | 1 | 0 | 0 | 0 | 0 |
I've become very addicted to Project Euler recently and am trying to do this one next! I've started some analysis on it and have reduced the problem down substantially already. Here's my working:
A = pqr and
1/A = 1/p + 1/q + 1/r so pqr/A =
pq + pr + qr
And because of the first equation:
pq+pr+qr = 1
Since exa... | 0 | 0 | 0 | 0 | 1 | 0 |
I've got a classification problem in my hand, which I'd like to address with a machine learning algorithm ( Bayes, or Markovian probably, the question is independent on the classifier to be used). Given a number of training instances, I'm looking for a way to measure the performance of an implemented classificator, wit... | 0 | 1 | 0 | 1 | 0 | 0 |
I'm looking at definitions of the A* path-finding algorithm, and it seems to be defined somewhat differently in different places.
The difference is in the action performed when going through the successors of a node, and finding that a successor is on the closed list.
One approach (suggested by Wikipedia, and this art... | 0 | 1 | 0 | 0 | 0 | 0 |
I have a large (12 digit) BCD number, encoded in an array of 6 bytes - each nibble is one BCD digit. I need to multiply it by 10^x, where x can be positive or negative.
I know it can be done by shifting left or right by nibble instead of bit, but it's a horrible implementation - especially in Javacard, which is what I... | 0 | 0 | 0 | 0 | 1 | 0 |
Should an API provide Rect::contains(Point) or Point::is_inside(Rect) or both?
or Math::contains(Point, Rect) cause it's symmetric?
The same Q goes for LineSegment::contains(Point), Rect::fully_contains(Circle) etc.
| 0 | 0 | 0 | 0 | 1 | 0 |
I'm trying to do project Euler number 219 but am failing to get a grasp of it. I'm trying to use Python which according to project Euler should be able to do it within a minute! This leads me to think that they can't possibly want me to compute each individual bitstring since that would be too slow in Python - there ha... | 0 | 0 | 0 | 0 | 1 | 0 |
I have the following HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<style>
.box {
border: solid black 1px;
padding: 0px;
margin: 0px;
}
... | 0 | 0 | 0 | 0 | 1 | 0 |
Have created a c++ implementation of the Hough transform for detecting lines in images. Found lines are represented using rho, theta, as described on wikipedia:
"The parameter r represents the distance between the line and the origin, while θ is the angle of the vector from the origin to this closest point "
How can ... | 0 | 0 | 0 | 0 | 1 | 0 |
I am doing some population modeling (for fun, mostly to play with the concepts of Carrying Capacity and the Logistics Function). The model works with multiple planets (about 100,000 of them, right now). When the population reaches carrying capacity on one planet, the inhabitants start branching out to nearby planets, a... | 0 | 0 | 0 | 0 | 1 | 0 |
My math classes are far behind, and I'm currently struggling to find a decent solution to a problem I'm having: I have a tree, in which nodes are actions, and are "weighted" according to multiple criteria : the cost of said action, the time it will take, the necessary resources, the disturbance, etc...
And I want to to... | 0 | 0 | 0 | 0 | 1 | 0 |
We already have things like static analysis that tells us what's wrong with our code and where, so should we be endowing our IDEs with more AI features and, if so, which ones? I'm looking for ideas!
| 0 | 1 | 0 | 0 | 0 | 0 |
It could be part of the model because it's part of the business logic of the game.
It could be part of the controller because it could be seen as simulating player input, which would be considered part of the controller, right? Or would it?
What about a normal enemy, like a goomba in Mario?
UPDATE: Wow, that's really n... | 0 | 1 | 0 | 0 | 0 | 0 |
So maybe I want to have values between -1.0 and 1.0 as floats. It's clumsy having to write this and bolt it on top using extension methods IMO.
| 0 | 0 | 0 | 0 | 1 | 0 |
What is the best way to approximate a cubic Bezier curve? Ideally I would want a function y(x) which would give the exact y value for any given x, but this would involve solving a cubic equation for every x value, which is too slow for my needs, and there may be numerical stability issues as well with this approach.
W... | 0 | 0 | 0 | 0 | 1 | 0 |
What does the .NET framework provide, if anything, in the way of classes for performing geometric calculations? For example, calculating the distance between two points (represented as (x,y)) or solving a right triangle's unknown sides or internal angles? (I know that both of those are pretty easily solved; I'm just us... | 0 | 0 | 0 | 0 | 1 | 0 |
I need your help,
For example I have a decimal type variable and I want to round up this way.
Eg
3.0 = 3
3.1 = 4
3.2 = 4
3.3 = 4
3.4 = 4
3.5 = 4
3.6 = 4
3.7 = 4
3.8 = 4
3.9 = 4
4.0 = 4
4.1 = 5
4.2 = 5
etc....
How can I do that?
| 0 | 0 | 0 | 0 | 1 | 0 |
Here's the basic scenario - I have a corpus of say 100,000 newspaper-like articles. Minimally they will all have a well-defined title, and some amount of body content.
What I want to do is find runs of text in articles that ought to link to other articles.
So, if article Foo has a run of text like "Students in 8th g... | 0 | 1 | 0 | 0 | 0 | 0 |
I'm trying to evaluate the purchase of a statistical tool. This will be used in part by non-programming users (doing clinical studies) and in part by programmers, so I'm trying to find a good compromise between usability and automation. Of course, cost is an issue, but if I can build a solid case, we could probably buy... | 0 | 0 | 0 | 0 | 1 | 0 |
if digit is the name for a number on base 10, what would be the name for a number on base 16? Hexgit?
| 0 | 0 | 0 | 0 | 1 | 0 |
We have several different optimization algorithms that produce a different result for each run. For example the goal of the optimization could be to find the minimum of a function, where 0 is the global minima. The optimization runs returns data like this:
[0.1, 0.1321, 0.0921, 0.012, 0.4]
Which is quite close to the ... | 0 | 0 | 0 | 0 | 1 | 0 |
I'm trying to learn a little more on vectormath through writing a simple ray tracer and I've been doing some reading on it, but what I haven't been able to find is how to determine the direction of the primary rays. This sounds like a simple problem and probably is, but with my current knowledge I haven't been able to ... | 0 | 0 | 0 | 0 | 1 | 0 |
Given I have a canvas that contains many shapes, lets say rectangles for now.
Each shape has a location (inches), size(inches) and rotation angle(degrees).
When a mouse click event happen inside the canvas for a location (x,y) in pixels.
I want to check if the clicked mouse position is inside/within a specific shape, c... | 0 | 0 | 0 | 0 | 1 | 0 |
I'm working on a Java applet that needs to display "fancy" equations. Is there any Java renderer for MathML or LaTeX that's open source? Ideally it would be a pure Java solution that doesn't use JNI.
Ideally it would also allow to animate the generated glyphs (e.g. animating adding a constant to both sides of a equatio... | 0 | 0 | 0 | 0 | 1 | 0 |
I need to write a function that takes 4 bytes as input, performs a reversible linear transformation on this, and returns it as 4 bytes.
But wait, there is more: it also has to be distributive, so changing one byte on the input should affect all 4 output bytes.
The issues:
if I use multiplication it won't be reversible... | 0 | 0 | 0 | 0 | 1 | 0 |
This is actually a machine learning classification problem but I imagine there's a perfectly good quick-and-dirty way to do it. I want to map a string describing an NFL team, like "San Francisco" or "49ers" or "San Francisco 49ers" or "SF forty-niners", to a canonical name for the team. (There are 32 NFL teams so it ... | 0 | 0 | 0 | 1 | 0 | 0 |
I am currently building a Neural Network library. I have constructed it as an object graph for simplicity. I am wondering if anyone can quantify the performance benefits of going to an array based approach. What I have now works very good for building networks of close to arbitrary complexity. Regular (backpropped) ne... | 0 | 0 | 0 | 1 | 0 | 0 |
I need your help in determining the best approach for analyzing industry-specific sentences (i.e. movie reviews) for "positive" vs "negative". I've seen libraries such as OpenNLP before, but it's too low-level - it just gives me the basic sentence composition; what I need is a higher-level structure:
- hopefully with w... | 0 | 1 | 0 | 0 | 0 | 0 |
Homework question:
Cygwin GNU GDB
Cygwin GNU GCC
Attempting to establish the length of the hypotenuse C from the square root of A power of 2 and B power of 2.
Example input:
Enter the length of two sides of a right-angled triangle: 2.25 8.33
Answer:
The length of the hypotenuse is: 8.628523
Question: when I specif... | 0 | 0 | 0 | 0 | 1 | 0 |
From http://projecteuler.net/index.php?section=problems&id=99
Comparing two numbers written in index
form like 211 and
37 is not difficult, as any
calculator would confirm that
211 = 2048 37 =
2187.
However, confirming that
632382518061 >
519432525806 would be much
more difficult, as both numbers
c... | 0 | 0 | 0 | 0 | 1 | 0 |
I have the following string (japanese) " ユーザー名" , the first character is "like" whitespace but its number in unicode is 12288, so if I do " ユーザー名".trim() I get the same string (trim doesn't work).
If i do trim in c++ it works ok.
Does anyone know how to solve this issue in java?
Is there a special trim method for unico... | 0 | 1 | 0 | 0 | 0 | 0 |
I have a set containing thousands of addresses. If I can get the longitude and latitude of each address, how do I split the set into groups by proximity?
Further, I may want to retry the 'clustering' according to different rules:
N groups
M addresses per group
maximum distance between any address in a group
| 0 | 0 | 0 | 1 | 0 | 0 |
I have a simple program, at it's heart is a two dimensional array of floats, supposedly representing gas concentrations, I have been trying to come up with a simple algorithm that will model the gas expanding outwards, like a cloud, eventually ending up with the same concentration of the gas everywhere across the grid.... | 0 | 0 | 0 | 0 | 1 | 0 |
Does anyone know of a Java library that handles finding sentence boundaries? I'm thinking that it would be a smart StringTokenizer implementation that knows about all of the sentence terminators that languages can use.
Here's my experience with BreakIterator:
Using the example here:
I have the following Japanese:
今日はパソ... | 0 | 1 | 0 | 0 | 0 | 0 |
Trying to figure out an equation to get the current group a page would be in if they were grouped like below.
Variables:
PageSize = 5
PageIndex = 21
GroupSize = 5
TotalItems = 1000
CurrentPage = PageIndex + 1
Find:
**CurrentGroup = ?**
If there are 1000 items and you have a group size of 5 then there are 200 groups (... | 0 | 0 | 0 | 0 | 1 | 0 |
In Java, how do I round to an arbitrary value? Specifically, I want to round to .0025 steps, that is:
0.032611 -> 0.0325
0.034143 -> 0.0350
0.035233 -> 0.0350
0.037777 -> 0.0375
...
Any ideas or libs?
| 0 | 0 | 0 | 0 | 1 | 0 |
Im looking for an algorithm to be used in a racing game Im making. The map/level/track is randomly generated so I need to find two locations, start and goal, that makes use of the most of the map.
The algorithm is to work inside a two dimensional space
From each point, one can only traverse to the next point in four d... | 0 | 0 | 0 | 0 | 1 | 0 |
Convert angle in degrees to a point
How could I convert an angle (in degrees/radians) to a point (X,Y) a fixed distance away from a center-point.
Like a point rotating around a center-point.
Exactly the opposite of atan2 which computes the angle of the point y/x (in radians).
Note: I kept the original title because t... | 0 | 0 | 0 | 0 | 1 | 0 |
Does anyone have experience with algorithms for evaluating hypergeometric functions? I would be interested in general references, but I'll describe my particular problem in case someone has dealt with it.
My specific problem is evaluating a function of the form 3F2(a, b, 1; c, d; 1) where a, b, c, and d are all positi... | 0 | 0 | 0 | 0 | 1 | 0 |
I can't figure how get the integral & decimal value from a NSDecimalnumber.
For example, if I have 10,5, how get 10 & 5?
And if I have 10 & 5, how return to 10,5?
Mmm ok, that is looking better!
However I have the concer about lossing decimals.
This is for a app that will be international. If for example a user set t... | 0 | 0 | 0 | 0 | 1 | 0 |
I hear logarithms mentioned quite a lot in the programming context. They seem to be the solution to many problems and yet I can't seem to find a real-world way of making use of them. I've read the Wikipedia entry and that, quite frankly, leaves me none the wiser.
So, where can I learn about the real-world programming p... | 0 | 0 | 0 | 0 | 1 | 0 |
I was working for a telecom company some years ago and I had to generate a formula which calculates duration of a call according to the following algorithm:
t1 is the first period
t2 is the recurring period
RCT is the actual call time (in seconds)
CD is the effective call duration (for billing purposes)
if RCT is l... | 0 | 0 | 0 | 0 | 1 | 0 |
Ok, so - this is heavily related to my previous question Transforming an object between two coordinate spaces, but a lot more direct and it should have an obvious answer.
An objects local coordinate space, how do I "get a hold of it"? Say that I load an Orc into my game, how do I know programatically where it's head, l... | 0 | 0 | 0 | 0 | 1 | 0 |
In Perl, the % operator seems to assume integers. For instance:
sub foo {
my $n1 = shift;
my $n2 = shift;
print "perl's mod=" . $n1 % $n2, "
";
my $res = $n1 / $n2;
my $t = int($res);
print "my div=$t", "
";
$res = $res - $t;
$res = $res * $n2;
print "my mod=" . $res . "
";
}
fo... | 0 | 0 | 0 | 0 | 1 | 0 |
I'm teaching a kid programming, and am introducing some basic artificial intelligence concepts at the moment. To begin with we're going to implement a tic-tac-toe game that searches the entire game tree and as such plays perfectly. Once we finish that I want to apply the same concepts to a game that has too many positi... | 0 | 1 | 0 | 0 | 0 | 0 |
So I'm reading the "3D Math Primer For Graphics And Game Development" book, coming from pretty much a non-math background I'm finally starting to grasp vector/matrix math - which is a relief.
But, yes there's always a but, I'm having trouble understand the translation of an object from one coordinate space to another.... | 0 | 0 | 0 | 0 | 1 | 0 |
I am looking for a mathematical book on Lisp. Some ideas?
| 0 | 0 | 0 | 0 | 1 | 0 |
Mathematics naive question:
What is the "canonical" way to represent 14+1i?
14+i1
or
14+i
Similarly, is it likely, in the 'real world', that scientific notation is going to creep into a complex number so as to freak out a complex numbers parser? For example,
1.2345E+02-1.7002E-09i
Edit: Finally, is it
8.45358210351... | 0 | 0 | 0 | 0 | 1 | 0 |
a ticketing site offers a discount on "family" tickets.
a family ticket is 2 adults, 2 children.
the sell tickets page allows a user to enter any number of adult and child tickets.
How do I work out how to apply the family ticket discount, then charge all remaining tickets at their relevant cost (i.e. adult tickets c... | 0 | 0 | 0 | 0 | 1 | 0 |
I have been trying to use a formula that is used to work out exclusive VAT in a program that our team is creating. The formula works correctly when used in a calculator or in excel, though gives a different output when used within a function in our program!
here is the function:
function fn_calcVat()
{
var vRate =... | 0 | 0 | 0 | 0 | 1 | 0 |
There are two courses: "AI" and "AI in Games" both 15 students for 15 weeks.
I want to keep them motivated and creative.
I know I want some kind of competition (obvious for the latter course).
Maybe something like Marathon Match or ICFP.
I will need good visualization, so it would be great if it already exist.
One ide... | 0 | 1 | 0 | 0 | 0 | 0 |
So, it's been a few months since I wrote this question, since then I've toyed with "raw" C++ D3D, The Ogre and Irrlicht graphics engines and lately Microsoft XNA. I've built a few 2D games (mostly replicas of old stuff like tetris, astreoids, etc.) and made some (very) small steps into the 3D world in the above mention... | 0 | 0 | 0 | 0 | 1 | 0 |
I am wondering if anyone has any insight into this. I am thinking of going to grad school to get some computer science related degree. I have always been intrigued by people who are working on problems using statistical packages or simulation to solve problems. What would I study to get a good breadth of knowledge of t... | 0 | 0 | 0 | 1 | 0 | 0 |
As a fun side-project for myself to help in learning yet another PHP MVC framework, I've been writing Reversi / Othello as a PHP & Ajax application, mostly straightforward stuff. I decided against using a multidimensional array for a number of reasons and instead have a linear array ( in this case 64 elements long ) a... | 0 | 0 | 0 | 0 | 1 | 0 |
I am extreamly interested in math and programming and planning to start symbolic math project from scratch.
Is this good project idea?
Where to start?
How should one approach this
project?
Any good resources?
Thanks in advance.
| 0 | 0 | 0 | 0 | 1 | 0 |
What I'm trying to do with MRS is to teach myself some basic AI; what I want to do is to make a rocket entity, with things such as vectored exhaust, and staging. Anyone have an idea on how to make an entity that can fly? Or do I just need to constantly apply a force upwards?
| 0 | 1 | 0 | 0 | 0 | 0 |
When training a multi-layer neural network, using a sigmoidal activation function is necessary for it to learn efficiently.
Is there any advantage to using a sigmoidal activation function when training a single layer perceptron, or is a simple step (heaviside) function sufficient (or even preferable)?
I'm slowly getti... | 0 | 1 | 0 | 0 | 0 | 0 |
I am trying to write a simple AI for a "Get four" game.
The basic game principles are done, so I can throw in coins of different color, and they stack on each other and fill a 2D Array and so on and so forth.
until now this is what the method looks like:
public int insert(int x, int color) //0 = empty, 1=player1 2=pla... | 0 | 1 | 0 | 0 | 0 | 0 |
Update: I'm going to leave it as is: The performance hit of a exception (very rare) is better than the probably performance hit for checking on each operation (common)
I'm trying to support an "EstimatedRowCount" that in one case would be the product of two sub-cursors that are joined together:
estimatedRowCount = lef... | 0 | 0 | 0 | 0 | 1 | 0 |
I have a number of slots and pegs arranged in a straight line. The pegs can be moved and need to be moved to a slot each. A slot can be left empty only if all pegs are taken. When a peg is moved, it is not allowed to go past another peg. In other words the order of the pegs must be maintained. Preferably, the total dis... | 0 | 0 | 0 | 0 | 1 | 0 |
I want to shift away from Excel to Awk. I need basic mathematical operations, such as addition and division, for arrays.
For example, arrays A and B are [1, 3, 2] and [2, 1, 2], respectively. How can I get an array [2, 3, 4] from the multiplication between A and B? What about the addition and division between A and B?... | 0 | 0 | 0 | 0 | 1 | 0 |
What do you consider the most significant progress / breakthroughs in real world applications of present-day AI research? (including, but not limited to: machine learning, statistical data processing, and other disciplines spinned off from AI).
Please spare / do not want: ramblings about AI winters / disappointment;
D... | 0 | 1 | 0 | 0 | 0 | 0 |
I have created a Python file to generate a Mandelbrot set image. The original maths code was not mine, so I do not understand it - I only heavily modified it to make it about 250x faster (Threads rule!).
Anyway, I was wondering how I could modify the maths part of the code to make it render one specific bit. Here is th... | 0 | 0 | 0 | 0 | 1 | 0 |
I provided some of my programs with a feedback function. Unfortunately I forgot to include some sort of spam-protection - so users could send anything they wanted to my server - where every feedback is stored in a huge db.
In the beginning I periodically checked those feedbacks - I filtered out what was usable and d... | 0 | 1 | 0 | 0 | 0 | 0 |
I am trying to animate an object, let's say its a car. I want it go from point
x1,y1,z1
to point x2,y2,z2 . It moves to those points, but it appears to be drifting rather than pointing in the direction of motion. So my question is: how can I solve this issue in my updateframe() event? Could you point me in the directio... | 0 | 0 | 0 | 0 | 1 | 0 |
Suppose you wanted to estimate the size of a userbase of a site which does not publicize this information.
People are more likely to have acquired different usernames with different probabilities. For instance, if the username 'nick' doesn't exist on the system, it's likely to have an extremely small userbase. If the u... | 0 | 0 | 0 | 1 | 1 | 0 |
With reference to this programming game I am currently building.
I am using WPF to animate canvases, and I am using the BeginAnimation method to translate (move) a canvas across another canvas.
With the BeginAnimation, I need to specify the From and To coordinates for both x and y, and this is the method I am using thi... | 0 | 0 | 0 | 0 | 1 | 0 |
I have a game world with lots of irregular objects with varying coordinate systems controlling how objects on their surface work. However the camera and these objects can leave and move out into open empty space, where a normal Cartesian coordinate system is used. How do I manage mapping between the two?
One idea I had... | 0 | 0 | 0 | 0 | 1 | 0 |
I have the current fov and the center pan and tilt values. How would I calculate what the pan and tilt values are of the edges(i.e. min pan value and max tilt) with this information?
| 0 | 0 | 0 | 0 | 1 | 0 |
I've been browsing Bjarne Stroustrup's new introductory programming book, Programming: Principles and Practice Using C++. It's meant for first-year university computer science and engineering students.
Early on in the book he works through an interesting extended example of creating a desktop calculator where he ends u... | 0 | 0 | 0 | 0 | 1 | 0 |
When dealing with sparse matrices, how do I convert Matrix Market format into CRS (Compressed Row Storage)?
| 0 | 0 | 0 | 0 | 1 | 0 |
Problem: I have two overlapping 2D shapes, A and B, each shape having the same number of pixels, but differing in shape. Some portion of the shapes are overlapping, and there are some pieces of each that are not overlapping. My goal is to move all the non-overlapping pixels in shape A to the non-overlapping pixels in s... | 0 | 0 | 0 | 0 | 1 | 0 |
With reference to this programming game I am currently building.
When the game is started, I am generating these robots at supposingly random points on a Canvas, and at first look (adding one or two bots at the same time), this seemed to be working as it should.
...but, when I added a ton of bots at the same time, this... | 0 | 0 | 0 | 0 | 1 | 0 |
How would I solve:
-x^3 - x - 4 = 0
You can't use quadratic, because it is to the 3rd power, right?
I know I it should come out to ~1.3788 but I'm not sure how I would derive that.
I started with:
f(x) = x + (4/(x^2 + 1)).
Solving for 0, moving the x over to the other side, multiplying by (x^2 + 1) on both sides, ... | 0 | 0 | 0 | 0 | 1 | 0 |
With reference to this programming game I am currently building.
I wrote the below method to move (translate) a canvas to a specific distance and according to its current angle:
private void MoveBot(double pix, MoveDirection dir)
{
if (dir == MoveDirection.Forward)
{
Animator_Body_X.To =... | 0 | 0 | 0 | 0 | 1 | 0 |
I have 2 points, P and Q, on a directed line AB in 3D space. They can be anywhere on the line, i.e. not necessarily between A and B.
Pythagoras gives you the distance, obviously, but how do I calculate the sign of the directed distance from P to Q?
| 0 | 0 | 0 | 0 | 1 | 0 |
Let's say I have a small bitmap which contains a single digit (0..9) in hand writing.
Is it possible to detect the digit using a (two-layered) perceptron?
Are there other possibilities to detect single digits from bitmaps besides using neural nets?
| 0 | 1 | 0 | 0 | 0 | 0 |
Suppose I have this code
create temporary table somedata (a integer);
insert into somedata (a) values (11), (25), (62); --#these values are always increasing
select * from somedata;
giving this
+--+
|a |
+--+
|11|
|25|
|62|
+--+
How do I calculate a column of values 'b' where each one is the difference between the va... | 0 | 0 | 0 | 0 | 1 | 0 |
What is the equation of a helix parametrized by arc length (i.e. a function of arc length) between any two points in space? Is there any function for this ? How do i implement the same using matlab or mathematica ?
| 0 | 0 | 0 | 0 | 1 | 0 |
I´m trying to break a number into an array of numbers (in php) in the way that for example:
25 becomes (16, 8, 1)
8 becomes (8)
11 becomes (8, 2, 1)
I don´t know what the correct term is, but I think the idea is clear.
My solution with a loop is pretty straightforward:
$number = rand(0, 128);
$number_array_... | 0 | 0 | 0 | 0 | 1 | 0 |
How do I correct for floating point error in the following physical simulation:
Original point (x, y, z),
Desired point (x', y', z') after forces are applied.
Two triangles (A, B, C) and (B, C, D), who share edge BC
I am using this method for collision detection:
For each Triangle
If the original point is in fron... | 0 | 0 | 0 | 0 | 1 | 0 |
I'm working on a raytracer for a large side project, with the goal being to produce realistic renders without worrying about CPU time. Basically pre-rendering, so I'm going for accuracy over speed.
I'm having some trouble wrapping my head around some of the more advanced math going on in the lighting aspects of things.... | 0 | 0 | 0 | 0 | 1 | 0 |
I want to find all the numbers divisble by all the numbers between 1 and 5. how do I write the program so that if the remainder of 'start' divided by all the numbers that x goes through is equal to 0 that it will print start. Is there any syntax that will calculate what I'm looking for. thanks.
import math
def main():
... | 0 | 0 | 0 | 0 | 1 | 0 |
SquareExp2 can be 9 or 16
Square can be 3 or 4
The Length of the gridbox and gridbox1 array can be 0 to 80 or 0 to 255
(you see the pattern now)
This code is ran only one time, at the start of the program.
For j = 0 To squareExp2 - 1
For i = 0 To squareExp2 - 1
box = (j * squareExp2) + i
gridbo... | 0 | 0 | 0 | 0 | 1 | 0 |
Lets say I have guessed a lottery number of:
1689
And the way the lottery works is, the order of the digits don't matter as long as the digits match up 1:1 with the digits in the actual winning lottery number.
So, the number 1689 would be a winning lottery number with:
1896, 1698, 9816, etc..
As long as each dig... | 0 | 0 | 0 | 0 | 1 | 0 |
What's the best algorithm for evaluating a mathematical expression? I'd like to be able to optimize this a little in the sense that I may have one formula with various variables, which I may need to evaluate hundreds of times using different variables. So basically if I can initially parse the formula so that it is opt... | 0 | 0 | 0 | 0 | 1 | 0 |
Given a few words of input, I want to have a utility that will return a diverse set of relevant terms, phrases, or concepts. A caveat is that it would need to have a large graph of terms to begin with, or else the feature would not be very useful.
For example, submitting "baseball" would return
["shortstop", "Babe Ru... | 0 | 1 | 0 | 0 | 0 | 0 |
It does not need to be very accurate. Does anyone know a good way to do this?
any help is much appreciated.
| 0 | 0 | 0 | 0 | 1 | 0 |
Is there a way to classify a particular sentence/paragraph as funny. There are very few pointers as to where one should go further on this.
| 0 | 1 | 0 | 0 | 0 | 0 |
I can't find anything other than closed-source web applications. Are there any active projects? I'd be interested in using the software in something I'm developing and getting involved.
| 0 | 1 | 0 | 0 | 0 | 0 |
Okay I'm trying to rotate a Java Polygon based on it's original position of angle 0. x, and y end up being converted to an int at the end of me using them, so I could understand not seeing some change, but when the difference in angles is big like 0 to 180 I think I should see something.
I've been at this for a little... | 0 | 0 | 0 | 0 | 1 | 0 |
Given two points say (1,2,3) and (4,7,8). The endpoint tangents at these points are also given as inputs say pi/4 and -pi/2 respectively. How to fit a helix of arc length 2 between these points?
How to implement this in Matlab?
| 0 | 0 | 0 | 0 | 1 | 0 |
I have various objects whose surfaces are 3D and non rectangular, such as spheres, pyramids, and various other objects represented by meshes. The mesh is not composed of polygons of equal size and distribution across the surface of the object, nor are they all semi/symmetrical objects like the ideal shapes of cylinders... | 0 | 1 | 0 | 0 | 1 | 0 |
I have the following set of constraints in Perl (just a sample set of constraints, not the ones I really need):
$a < $b
$b > $c
$a is odd => $a in [10..18]
$a > 0
$c < 30
And I need to find a list ($a, $b, $c) that meet the constraints. My naive solution is
sub check_constraint {
my ($a, $b, $c) = @_;
if !($a... | 0 | 0 | 0 | 0 | 1 | 0 |
Simple question:
How do i tell which bits in the byte are set to 0 and which are set to 1
for example:
//That code would obviously wont work, but how do i make something similar that would work?
byte myByte = 0X32;
foreach(bool bit in myByte)
{
Console.WriteLine(bit);
}
//Part 2 revert
bool[] bits = new bool[8];
b... | 0 | 0 | 0 | 0 | 1 | 0 |
Okay, so I need to make C go the shortest path from A to B. A to B is the hypotenuse of my right triangle, and I need to give C the arctan of said triangle. How do I do this, and does the formula have a name?
| 0 | 0 | 0 | 0 | 1 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.