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 have a sentence, for example
John Doe moved to New York last year.
Now I split the sentence into the single words and I get:
array('John', 'Doe', 'moved', 'to', 'New', 'York', 'last', 'year')
That's quite easy. But then I want to combine the single words to get all the composed terms. It doesn't if the composed t... | 0 | 1 | 0 | 0 | 0 | 0 |
I asked a question similar to this one a couple of weeks ago, but I did not ask the question correctly. So I am re-asking here the question with more details and I would like to get a more AI oriented answer.
I have a list representing products which are more or less the same. For instance, in the list below, they are... | 0 | 0 | 0 | 1 | 0 | 0 |
Is there any library that can be used for analyzing (nlp) simple english text. For example it would be perfect if it can do that;
Input: "I am going"
Output: I, go, present continuous tense
| 0 | 1 | 0 | 0 | 0 | 0 |
I'm looking for books and resource to teach myself linear algebra to be used in 3D graphics programming. I prefer practical approaches to teaching over theoretical (even though math is what, 99.99% theory?) ones, so the dream resource for me would be a book that tackles linear algebra as it's used with 3D graphics prog... | 0 | 0 | 0 | 0 | 1 | 0 |
I am working on a pong game and I am working on the mechanism to move the ball. If I add 1 to x the ball moves 1 pixel to the right, if i add 1 to y the ball moves 1 pixel to the bottom. What if I want to move the ball at a certain angle how can 1 calculate the coordinates.
| 0 | 0 | 0 | 0 | 1 | 0 |
My question arises from the post "Plain English Explanation of Big O". I don't know the exact meaning for logarithmic complexity. I know that I can make a regression between the time and the number of operations and calculate the X-squared value, and determine so the complexity. However, I want to know a method to dete... | 0 | 0 | 0 | 0 | 1 | 0 |
I have a large number of text files (1000+) each containing an article from an academic journal. Unfortunately each article's file also contains a "stub" from the end of the previous article (at the beginning) and from the beginning of the next article (at the end).
I need to remove these stubs in preparation for runn... | 0 | 1 | 0 | 0 | 0 | 0 |
I am writing a game for gameboy advance and I am implementing basic AI in the form of a binary search tree. There is 1 human player and 1 computer player. I need to figure out a way of telling how aggressive the human player is being in attacking the computer. The human will push a button to attack (and must be in a ce... | 0 | 1 | 0 | 0 | 0 | 0 |
I have a unit vector, a distance and a coordinate and I would like to calculate the new coordinate given by adding the distance onto the coordinate in the given direction. How do I do this?
| 0 | 0 | 0 | 0 | 1 | 0 |
working with cygwin and writing a script to show my my current ip address minus 2. For some reason it is giving me the follwing error: ")syntax error: invalid arithmetic operator (error token is "
this is the script I am using.
$ cat test3.sh
#!/bin/bash
#
function IPADDRESS {
v=$4
echo $1.$2.$3.$((v-2))
}
... | 0 | 0 | 0 | 0 | 1 | 0 |
Can a double (of a given number of bytes, with a reasonable mantissa/exponent balance) always fully precisely hold the range of an unsigned integer of half that number of bytes?
E.g. can an eight byte double fully precisely hold the range of numbers of a four byte unsigned int?
What this will boil down to is if a two b... | 0 | 0 | 0 | 0 | 1 | 0 |
Given a list of points that form a simple 2d polygon oriented in 3d space and a normal for that polygon, what is a good way to determine which points are specific 'corner' points?
For example, which point is at the lower left, or the lower right, or the top most point? The polygon may be oriented in any 3d orientation,... | 0 | 0 | 0 | 0 | 1 | 0 |
I need to calculate modulus with large number like :
<?php
$largenum = 95635000009453274121700;
echo $largenum % 97;
?>
It's not working... because $largenum is too big for an int in PHP.
Any idea how to do this ?
| 0 | 0 | 0 | 0 | 1 | 0 |
How to convert an equation into formulas for individual variables? I am thinking about a math equations like:
c^2 = a^2 + b^2
I would like to have a function that could process any formula, and give me the individual variable formulas. The above equation would produce the following:
a = (c^2 - b^2)^0.5
b = (c^2 - a^2... | 0 | 0 | 0 | 0 | 1 | 0 |
For example, given a matrix:
01|02|03|04|05
06|07|08|09|10
11|12|13|14|15
And knowing that the matrix is 5x3, is there a way that if given the value '7', that we can know it is in row 2? The case is that the matrix is always ordered from 1 to n, starting from 0.
Lastly, the matrix is stored linearly in a z... | 0 | 0 | 0 | 0 | 1 | 0 |
I am trying to solve a tricky math problem, in a cocos2d for iphone context.
Basically I have a roullette wheel which is rotating over time.
I want to have a Sprite latch onto the wheel at certain points (like compass ordinal points N, S, E, W) and bounce off at all other points.
I have the image of the wheel rotating,... | 0 | 0 | 0 | 0 | 1 | 0 |
I'd like to know what are the most recurrent in a given text or group of text (pulled from a database) in ruby.
Does anyone know what are the best practices?
| 0 | 1 | 0 | 0 | 0 | 0 |
I've written a C++ matrix template class. It's parameterized by its dimensions and by its datatype:
template<int NRows, int NCols, typename T>
struct Mat {
typedef Mat<NRows, NCols, T> MyType;
typedef T value_type;
typedef const T *const_iterator;
typedef T *iterator;
enum { NumRows = NRows };
... | 0 | 0 | 0 | 0 | 1 | 0 |
Twitter, Google, Amazon, del.icio.us etc. all give you a lot of data to play with, all for free. There's also a lot of textual data available through initiatives like Project Gutenberg. And that, it seems, is just the tip of the iceberg.
I have been wondering how you could use this data for fun. I'm a first year IT stu... | 0 | 1 | 0 | 1 | 0 | 0 |
I'm combing a webapp's log file for statements that stand out.
Most of the lines are similar and uninteresting. I'd pass them through Unix uniq, however that filters nothing, as all the lines are slightly different: they all have a different timestamp, similar statements might print a different user ID, etc.
What's a w... | 0 | 1 | 0 | 0 | 0 | 0 |
I am attempting to rotate some text within a label. I have a cusom label which allows me to have control over the text rendering process.
protected override void OnPaint ( PaintEventArgs pe )
{
Graphics g = pe.Graphics;
g.RotateTransform( angle );
g.drawString( text );
g.ResetTransform();
}
The prob... | 0 | 0 | 0 | 0 | 1 | 0 |
I am having a hard time to find a way to detect if two words has the same rhyme in English. It has not to be the same syllabic ending but something closer to phonetically similarity.
I can not believe in 2009 the only way of doing it is using those old fashioned rhyme dictionaries. Do you know any resources (in PHP wo... | 0 | 1 | 0 | 0 | 0 | 0 |
I have a file with the following values:
for 3 threads:
Average time taken for API1 is: 19097.7 nanoseconds.
Average time taken for API2 is: 19173.1 nanoseconds.
Average time taken for API2 is: 19777.7 nanoseconds.
Average time taken for API2 is: 19243.1 nanoseconds.
Average time taken for API1 is: 19737.7 nanoseconds.... | 0 | 0 | 0 | 0 | 1 | 0 |
In 32 bit integer math, basic math operations of add and multiply are computed implicitly mod 2^32, meaning your results will be the lowest order bits of the add or multiply.
If you want to compute the result with a different modulus, you certainly could use any number of BigInt classes in different languages. And for ... | 0 | 0 | 0 | 0 | 1 | 0 |
With reference to this programming game I am currently building.
alt text http://img12.imageshack.us/img12/2089/shapetransformationf.jpg
To translate a Canvas in WPF, I am using two Forms: TranslateTransform (to move it), and RotateTransform (to rotate it) [children of the same TransformationGroup]
I can easily get the... | 0 | 0 | 0 | 0 | 1 | 0 |
Bulls & Cows is a game for two players in which each one has a secret number with 4 non-repeating digits, and each one tries to guess the other number.
For instance, let´s say my secret number is 1576.
If my opponent says the number 1234, i would answer: 1F, because the digit 1 is in my secret number and in the same po... | 0 | 1 | 0 | 0 | 0 | 0 |
Say i'm trying to evaluate the Polynomial:
x^2 + 1
Using the Fast Fourier transform method for evaluating co-efficients. Now i can change this into matrix/vector form using the co-effcient as inputs for the fast fourier transform:
so:
x^2 + 1 = <1, 0, 1, 0>
This is done by using the coefficient value e.g 1 = 1, 0x^1 ... | 0 | 0 | 0 | 0 | 1 | 0 |
I want to use a data structure for sorting space-time data (x,y,z,time).
Currently a processing algorithm searches a set of 4D (x,y,z,time) points, given a spherical (3d) spacial radius and a linear (1d) time radius, marking for each point, which other points are within those radii. The reason is that after processing,... | 0 | 0 | 0 | 0 | 1 | 0 |
Been Googling around without finding much at all, so does anyone know of a class or library that helps you parse any sort of language, like a Domain Specific Language (I'm creating one, so I'm flexible in what the syntax and format can be) into either PHP code or some helpful struct or a class hiearchy or ... ? Anythin... | 0 | 1 | 0 | 0 | 0 | 0 |
Does anyone know how can I calculate pi (π) in VB?
| 0 | 0 | 0 | 0 | 1 | 0 |
The following will ensure that any large numbers will only be precise to the hundredths place (related to this answer):
public function round( sc:Number ):Number
{
sc = sc * 100;
sc = Math.floor( sc );
sc = sc / 100;
return sc;
}
What is the optimal way to round my numbers to the precision of .05? Is... | 0 | 0 | 0 | 0 | 1 | 0 |
I need to reverse a function with hard Math operations, I'm asking here to check if it's even possible, eventually for help.
public static UInt32 Func_4(UInt32 P, UInt32 X, UInt32 G)
{
UInt64 result = 1;
UInt64 mult = G;
if (X == 0)
return 1;
while (X != 0)
{
... | 0 | 0 | 0 | 0 | 1 | 0 |
what is substraction and summation using successors , can any one show me an example for that i know how to do it the normal way .
/* sub(X, Y, Z) ---subtraction */
sub(X, Y, Z) :- add(Y, Z, X).
| 0 | 1 | 0 | 0 | 0 | 0 |
I am trying to force 64 bit long integers on OS X 10.5.6. running on an Apple MacBook Intel Core 2 Duo. Here is my c code:
#include<stdio.h>
int main()
{
long a = 2147483647; /*== 2^32 - 1*/
long aplus1;
printf("a== %d. sizeof(a) == %d
", a, sizeof(a));
aplus1 = a+1;
printf("aplus1 = %d
", ap... | 0 | 0 | 0 | 0 | 1 | 0 |
I am hoping for insight into what looks like a partial multiplication.
#define LOW(x) ((x)&0xffffffff)
#define HIGH(x) ((x)>>32)
unsigned long long NotMultiply(unsigned long long x, unsigned long long y)
{
return HIGH(x)*HIGH(y) + LOW(x)*LOW(y);
}
This function is iterated multiple times, as follows:
unsigned ... | 0 | 0 | 0 | 0 | 1 | 0 |
I want to use the math constants, such as M_PI and M_E, in Visual C++ 2008. I assumed they were defined in the cmath header.
| 0 | 0 | 0 | 0 | 1 | 0 |
I'm working on building intelligence around link propagation, and because I need to deal with many short URL services where a reverse-lookup from an exact URL address is required, I need to be able to resolve multiple approximate versions of the same URL.
An example would be a URL like http://www.example.com?ref=affil&... | 0 | 0 | 0 | 1 | 0 | 0 |
I'm writing a MiPS program that will examine a list of 15 test scores. And it is going to input from the terminal. The passing criterion is the score of 50. The outputs to the terminal will include the scores in each category and the number of students passing and failing. I should use input prompts and output statemen... | 0 | 0 | 0 | 0 | 1 | 0 |
EDIT: Now a Major Motion Blog Post at http://messymatters.com/sealedbids
The idea of rot13 is to obscure text, for example to prevent spoilers. It's not meant to be cryptographically secure but to simply make sure that only people who are sure they want to read it will read it.
I'd like to do something similar for num... | 0 | 0 | 0 | 0 | 1 | 0 |
So here's my challenge. I have a spreadsheet that looks like this:
prod_id | pack | value | durable | feat | ease | grade | # of ratings
1 75 85 99 90 90 88 1
2 90 95 81 86 87 88 9
3 87 86 80 85 82 84 ... | 0 | 0 | 0 | 0 | 1 | 0 |
What are some C/c++ Machine learning libraries that supports clustering of multi dimensional data? (for example K-Means)
So far I have come across
SGI MLC++ http://www.sgi.com/tech/mlc/
OpenCV MLL
I am tempted to roll-my-own, but I am sure pre-existing ones are far better performance optimized with more eyes on code.... | 0 | 0 | 0 | 1 | 0 | 0 |
Is there an algorithm that can calculate the digits of a repeating-decimal ratio without starting at the beginning?
I'm looking for a solution that doesn't use arbitrarily sized integers, since this should work for cases where the decimal expansion may be arbitrarily long.
For example, 33/59 expands to a repeating de... | 0 | 0 | 0 | 0 | 1 | 0 |
I'm working on a cross language information retrieval that takes queries in english and searches documents in Russian. To evaluate this system it would be nice to have a collection of russian documents to search through. Does anyone out there know of a collection of documents I can search or websites from which I can e... | 0 | 1 | 0 | 0 | 0 | 0 |
I am writing a MiPS program that will examine a list of 15 test scores. And it is going to input from the terminal.Well, the passing criterion is the score of 50. the ouptuts to the terminal will include the scores in each category and the number of students passing and failing. with input prompts and output statements... | 0 | 0 | 0 | 0 | 1 | 0 |
I have a C++ application in which I need to compare two values and decide which is greater. The only complication is that one number is represented in log-space, the other is not. For example:
double log_num_1 = log(1.23);
double num_2 = 1.24;
If I want to compare num_1 and num_2, I have to use either log() or exp(),... | 0 | 0 | 0 | 0 | 1 | 0 |
I'm looking for a culturally-sensitive way to properly insert a noun into a sentence while using the appropriate article (a/an). It could use String.Format, or possibly something else if the appropriate way to do this exists elsewhere.
For example:
Base Sentence: "You are looking at a/an {0}"
This should format to: "Yo... | 0 | 1 | 0 | 0 | 0 | 0 |
The German website nandoo.net offers the possibility to shorten a news article. If you change the percentage value with a slider, the text changes and some sentences are left out.
You can see that in action here:
http://www.nandoo.net/read/article/299925/
The news article is on the left side and tags are marked. The ... | 0 | 1 | 0 | 0 | 0 | 0 |
We are supposed to calculate e^x using this kind of formula:
e^x = 1 + (x ^ 1 / 1!) + (x ^ 2 / 2!) ......
I have this code so far:
while (result >= 1.0E-20 )
{
power = power * input;
factorial = factorial * counter;
result = power / factorial;
eValue += result;
counter++;
iterations++;
}
My pro... | 0 | 0 | 0 | 0 | 1 | 0 |
Let's say you have access to an email account with the history of received emails from the last years (~10k emails) classified into 2 groups
genuine email
spam
How would you approach the task of creating a neural network solution that could be used for spam detection - basically classifying any email either as spam o... | 0 | 0 | 0 | 1 | 0 | 0 |
Before everyone jumps on me for outsourcing my homework, my question is not a question on my homework. I'm just having a problem getting some stuff to draw properly.
I'm trying to draw lines perpendicular to a plane. I know the three points in space the make up the plane. From those coordinates I can calculate vectors ... | 0 | 0 | 0 | 0 | 1 | 0 |
I'm witnessing a strange behavior in a .net program :
Console.WriteLine(Int64.MaxValue.ToString());
// displays 9223372036854775807, which is 2^63-1, as expected
Int64 a = 256*256*256*127; // ok
Int64 a = 256*256*256*128; // compile time error :
//"The operation overflows at compile time in checked mode"
// If i do ... | 0 | 0 | 0 | 0 | 1 | 0 |
What are some good tips and/or techniques for optimizing and improving the performance of calculation heavy programs. I'm talking about things like complication graphics calculations or mathematical and simulation types of programming where every second saved is useful, as opposed to IO heavy programs where only a cert... | 0 | 0 | 0 | 0 | 1 | 0 |
I am working on a roguelike in my (very little) free time. Each level will basically be a few rectangular rooms connected together by paths. I want the paths between rooms to be natural-looking and windy, however. For example, I would not consider the following natural-looking:
B
X
X ... | 0 | 1 | 0 | 0 | 0 | 0 |
I'll try to explain this problem the best way i can with code:
double power = 5000;
//picked up 5 power ups, now need to increase power by 10% per powerup
power += 5 * (power * .10);
//later on...ran into 5 power downs need to decrease power back to initial hp
power -= 5 * (power * .10);//7500 - 3750 -- doesn't work
... | 0 | 0 | 0 | 0 | 1 | 0 |
Its friday, and in local time the clock is 3.22pm, so my brain wont give me a solution, so i ask:
Im trying to write a function/algorithm in Actionscript 3.0 that gives me the most average positions of x number of positions along a path of y number of available positions.
Y is always larger than X of course.
The backgr... | 0 | 0 | 0 | 0 | 1 | 0 |
I was wondering if there is any good and clean object-oriented programming (OOP) implementation of Bayesian filtering for spam and text classification? This is just for learning purposes.
| 0 | 1 | 0 | 0 | 0 | 0 |
How could I go about keeping track of the number of times a word appears in a textfile? I would like to do this for every word.
For example, if the input is something like:
"the man said hi to the boy."
Each of "man said hi to boy" would have an occurrence of 1.
"the" would have an occurence of 2.
I was thinking of kee... | 0 | 1 | 0 | 0 | 0 | 0 |
If I use relative frequency to estimate the probability of an event, how good is my estimate based on the number of experiments? Is standard deviation a good measure? A paper/link/online book would be perfect.
http://en.wikipedia.org/wiki/Frequentist
| 0 | 0 | 0 | 0 | 1 | 0 |
Suppose I have the following:
A region defined by minimum and maximum latitude and longitude (commonly a 'lat-long rect', though it's not actually rectangular except in certain projections).
A circle, defined by a center lat/long and a radius
How can I determine:
Whether the two shapes overlap?
Whether the circle is... | 0 | 0 | 0 | 0 | 1 | 0 |
What is meant by the statement that functional programs are "more tractable mathematically"?
| 0 | 0 | 0 | 0 | 1 | 0 |
The typical FFT for audio looks pretty similar to this, with most of the action happening on the far left side
http://www.flight404.com/blog/images/fft.jpg
He multiplied it by a partial sine wave to get it to the bottom, but the article isn't too specific on this part of it. It also seems like a "good enough" modificat... | 0 | 0 | 0 | 0 | 1 | 0 |
I'm an artist involved with building various sorts of computer controlled machines. I've started prototyping a gimble-based XY painting machine and have realized that the maths needed are out of my reach. I'm a decent enough programmer but not strong in math- esp. 3D math.
To get a sense of what I'm needing to do, it m... | 0 | 0 | 0 | 0 | 1 | 0 |
I've got an agent that takes in states and returns actions, while keeping an internal representation of the utility of state/action pairs. I've also got an environment that takes in actions and returns state/reward pairs.
I need to be able to set the agent up with a start state and then continuously go from agent -(act... | 0 | 1 | 0 | 0 | 0 | 0 |
I am considering parsing simple math equations by compiling from source at runtime. I have heard that there are security considerations that I should be aware of before using this approach, but I can’t find any info on this.
Thanks
C# .net 2.0, winforms
| 0 | 0 | 0 | 0 | 1 | 0 |
I've the following code in PHP which works fine (returns more or less 10 results each time it runs):
function GetAboutTenRandomNumbers()
{
$result = array();
for ($i = 0; $i < 240; $i++)
{
if (Chance(10, 240) === true)
{
$result[] = $i;
}
}
echo '<pre>';
pri... | 0 | 0 | 0 | 0 | 1 | 0 |
I've been looking around a bit and can't seem to find just what I"m looking for. I've found "canonical formulas," but what's the best way to use these? Do I have to scale every single vertex down? Or is there a better way?
A formula would really help me out, but I'm also looking for an explanation about the near and fa... | 0 | 0 | 0 | 0 | 1 | 0 |
I'm writing some children's Math Education software for a class.
I'm going to try and present problems to students of varying skill level with randomly generated math problems of different types in fun ways.
One of the frustrations of using computer based math software is its rigidity. If anyone has taken an online Ma... | 0 | 0 | 0 | 0 | 1 | 0 |
How would one implement shuffle for the "Celestial Jukebox"?
More precisely, at each time t, return an uniform random number between 0..n(t), such that there are no repeats in the entire sequence, with n() increasing over time.
For the concrete example, assume a flat-rate music service which allows playing any song i... | 0 | 0 | 0 | 0 | 1 | 0 |
Duplicate
When should I use double instead of decimal?
.. and many more...
We use the C# and SQL Server decimal datatypes throughout our apps because of their accuracy. Never had any of those irritating problems where the total doesn't add up to the detail, etc.
I was wondering why double and float exist at all g... | 0 | 0 | 0 | 0 | 1 | 0 |
If I have a large set of data that describes physical 'things', how could I go about measuring how well that data fits the 'things' that it is supposed to represent?
An example would be if I have a crate holding 12 widgets, and I know each widget weighs 1 lb, there should be some data quality 'check' making sure the ca... | 0 | 1 | 0 | 0 | 0 | 0 |
Can someone explain mathematical induction to prove a recursive method? I am a freshmen computer science student and I have not yet taken Calculus (I have had up through Trig). I kind of understand it but I have trouble when asked to write out an induction proof for a recursive method.
| 0 | 0 | 0 | 0 | 1 | 0 |
I have the following Perl script that generates a string based on a number:
my @chars;
push @chars, map(chr, 48..57), map(chr, 97..122);
my $c = $#chars+1;
for (0..50) {
my $string;
my $l = $_ / $c;
my $i = int $l;
my $r = ($l - $i) * $c;
$string .= $chars[$r];
while ($i > 0) {
$l = $i ... | 0 | 0 | 0 | 0 | 1 | 0 |
I have the matrix system:
A x B = C
A is a by n and B is n by b. Both A and B are unknown but I have partial information about C (I have some values in it but not all) and n is picked to be small enough that the system is expected to be over constrained. It is not required that all rows in A or columns in B are over co... | 0 | 0 | 0 | 0 | 1 | 0 |
Behind the tables and tables of raw data, how does Wolfram Alpha work?
I imagine there are various artificial intelligence mechanisms driving the site but I can't fathom how anyone would put something like this together. Are there any explanations that would help a programmer understand how something like this is creat... | 0 | 1 | 0 | 1 | 0 | 0 |
I want to know the first double from 0d upwards that deviates by the long of the "same value" by some delta, say 1e-8. I'm failing here though. I'm trying to do this in C although I usually use managed languages, just in case. Please help.
#include <stdio.h>
#include <limits.h>
#define DELTA 1e-8
int main() {
... | 0 | 0 | 0 | 0 | 1 | 0 |
I'm trying to construct a contrapositive for the following statement: If A is 0 or B is 0, then A*B is 0.
Here is my attempt: If A*B is not 0, then A is not 0 or B is not 0.
The original statement is true, but the contrapositive is false since both A and B must be non-zero in order for A*B to be non-zero... am I doing ... | 0 | 0 | 0 | 0 | 1 | 0 |
I'm trying to make it so that no matter how far apart two objects are they'll both remain on screen. I'm using JOGL, but that shouldn't matter as I just need help with the math. This is what I have so far:
float distance = (float) ((Math.sqrt((p1.x - p2.x) + (p1.y - p2.y))));
float camx = (float)((p1.x + p2.x) * 0.5);... | 0 | 0 | 0 | 0 | 1 | 0 |
What is a good algorithm to determine the necessary fraction needed to add/sub to the number in order to round it to the nearest integer without using the inbuilt ceiling or floor funcitons?
Edit: Looking for a mathematical number trick to figure out the part needed to round the number to the nearest integer. The more... | 0 | 0 | 0 | 0 | 1 | 0 |
If I know the number number y and know that 2^x=y, how do I compute x?
| 0 | 0 | 0 | 0 | 1 | 0 |
I need a function which takes a line (known by its coordinates)
and return a line with same angle, but limited to certain length.
My code gives correct values only when the line is turned 'right'
(proven only empirically, sorry).
Am I missing something?
public static double getAngleOfLine(int x1, int y1, int x2, int y2... | 0 | 0 | 0 | 0 | 1 | 0 |
Right now i have
return 'Heads' if Math.random() < 0.5
Is there a better way to do this?
Thanks
edit: please ignore the return value and "better" means exact 50-50 probability.
| 0 | 0 | 0 | 0 | 1 | 0 |
Related to my previous question, is there some realistic chance to extract surveillance camera positions out of google streetview pictures by means of computer vision algorithms? I'm no expert in that area. But it should be easier than face detection and the like.
| 0 | 1 | 0 | 1 | 0 | 0 |
What are eigen values, vectors and expansions and as an algorithm designer how can I use them?
EDIT: I want to know how YOU have used it in your program so that I get an idea. Thanks.
| 0 | 0 | 0 | 0 | 1 | 0 |
I was thinking about how in the probably distant future many people think that we wont rely on physical input (i.e. keyboard) as much because the technology that reads brain waves (which already exists to some extent) will be available. Kinda scares me....anyway, I while I was daydreaming about this, the idea came to m... | 0 | 1 | 0 | 0 | 0 | 0 |
The related questions that appear after entering the title, and those that are in the right side bar when viewing a question seem to suggest very apt questions.
Stack Overflow only does a SQL search for it and uses no special algorithms, said Spolsky in a talk.
What algorithms exist to give good answers in such a case.... | 0 | 1 | 0 | 0 | 0 | 0 |
CUMIPMT(Rate,NumberOfPayments,PresentValue,StartPeriod,EndPeriod,Type).?
plz tell me a step by step guide how this formula works.
| 0 | 0 | 0 | 0 | 1 | 0 |
How to find whether a line intercepted in a polygon
| 0 | 0 | 0 | 0 | 1 | 0 |
Given a function y = f(A,X):
unsigned long F(unsigned long A, unsigned long x) {
return ((unsigned long long)A*X)%4294967295;
}
How would I find the inverse function x = g(A,y) such that x = g(A, f(A,x)) for all values of 'x'?
If f() isn't invertible for all values of 'x', what's the closest to an inverse?
(F... | 0 | 0 | 0 | 0 | 1 | 0 |
I need to manage lists with find-command. Suppose the lists have random names in non-distinct lists (ie their intersection is not empty set). How can I do:
A \ B
find files in the list A except the files in the list B
A intersection B
find files common to the lists A and B
Please, consult here.
A union B
find all ... | 0 | 0 | 0 | 0 | 1 | 0 |
I'm computing the ordinate y of a point on a line at a given abscissa x. The line is defined by its two end points coordinates (x0,y0)(x1,y1). End points coordinates are floats and the computation must be done in float precision for use in GPU.
The maths, and thus the naive implementation, are trivial.
Let t = (x - x0... | 0 | 0 | 0 | 0 | 1 | 0 |
This can be broken down into a simple trio of equations:
a + b = 3
b + c = 5
a + c = 4
How can I best approximate the values? Note, I'll have many more such totals and variables in real applications. Particularly, I want to find if its possible to usefully approximate the cost of food by item lists and totals from gro... | 0 | 0 | 0 | 0 | 1 | 0 |
How can I find prime numbers through bit operations in C++?
| 0 | 0 | 0 | 0 | 1 | 0 |
In my 3D application I store object's position in a vector and it's rotation around the origin in a quaternion. I need to rotate the object around a vector with an arbitrary origin. I tried converting the position - vectorOrigin and the rotation into a matrix, rotating the matrix and then extracting the position and ro... | 0 | 0 | 0 | 0 | 1 | 0 |
Do the below without any conditional or comparison operator.
if (Number <= 0)
{
Print '0';
}
else
{
print Number;
}
thanks..
| 0 | 0 | 0 | 0 | 1 | 0 |
My drive has DMG-blocks. The sum of their sizes is strictly below 47GB. I have 11 DVDs, each of the size 4.7GB. I want to use as small amount of DVDs as possible, without using compressing (the problem may be superflous, since it considers the most optimal combinations in terms of DMG-files. You can think it in terms o... | 0 | 0 | 0 | 0 | 1 | 0 |
I was glancing through the contents of Concrete Maths online. I had at least heard most of the functions and tricks mentioned but there is a whole section on Special Numbers. These numbers include Stirling Numbers, Eulerian Numbers, Harmonic Numbers so on. Now I have never encountered any of these weird numbers. How... | 0 | 0 | 0 | 0 | 1 | 0 |
Ok so I have to prove the following sequent:
(p -> r) ^ (q -> r) |- p ^ q -> r
I understand why that is clearly correct and I also understand the rules of natural deduction. What I don't understand is how I go about proving it. Here is the model answer provided:
1. (p -> r) ^ (q -> r) |- p ^ q -> r premise
2. p ... | 0 | 0 | 0 | 0 | 1 | 0 |
I'd like a floor function with the syntax
int floor(double x);
but std::floor returns a double. Is
static_cast <int> (std::floor(x));
guaranteed to give me the correct integer, or could I have an off-by-one problem? It seems to work, but I'd like to know for sure.
For bonus points, why the heck does std::floor return... | 0 | 0 | 0 | 0 | 1 | 0 |
I have a simple object that allows you to assign three properties (x,y,z) (lets call this object a "point", because that is what it is). I then have a second object with a method that accepts two instances of the first object, and returns the distance between the two "points" in three dimensional space. I also need a ... | 0 | 0 | 0 | 0 | 1 | 0 |
I am doing a behind the curtains 3d simulation while rendering the world in my 2d isometric engine. I've never done an isometric engine before, and my matrix math is rusty in general so I am having problems.
I have a projection matrix, which in its simplest form is this:
0.7 0.35 0
0 -0.87 0
-0.7... | 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.