|
|
Try Google, that's why it exists.
|
|
|
|
|
Hi kabirbdboy!
I work very hard to earn my money and have next to no free time. Please can I do your homework for you? It is so obvious that typing www.google.com and the search term face recognition is beyond your ability. I would hate for you to fail a course in a subject that you have no aptitude for. How else will the world be able to create all the team leaders, project managers and human resources professionals that we so desperatly need and you are so destined to become?
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
thank u.i have find some popular site and some demo project and paper on face recognition.i have already done my 40% work!!
|
|
|
|
|
Keep up the good work then. If you ask a question here again that looks like all you want us to do is do your homework for you, you can expect the same kind of responses. If you have a specific question about how some detail works and you show you've actually done some work on the problem, then you may get an answer.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
I have an image with each pixel representing a value in the range 0...1 and would like to map a gradient to the range.
Values in the range 0...0.5 should be shaded from black to red, and values in the range 0.5...1 should be shaded red to white. Each colour is represented as a single unsigned int in the form AA RR GG BB with AA being redundant in this case. How would I go about doing that? I'm using C++ but at the moment psuedo code would be just fine.
|
|
|
|
|
You'd use the Color.FromArgb [^] method, iterating over the different colors
|
|
|
|
|
For each pixel:
1. If the value, v, is 0 to 0.5, R = v * 510, G = B = 0.
2. If v is .5 to 1, R = 255, G = B = (v - .5) * 510.
So, at v = 0, the pixel is black. As we go from 0 to .5, red increases to its maximum (255) as we approach .5.
From total red at v = .5, it's blended with increasing shades of white, up to total white at v = 1.
|
|
|
|
|
what is the regular expression of muliple line commment other then /* (a+n)* */ bcoz this expression donot accept /* hhhhhhhh*hhhhh*/ string ???????
|
|
|
|
|
You need to search for anything except a closing comment, including newlines.
Expresso is a great tool for testing and building regex.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
it is also conceivable to create a compiler without using any regex.
|
|
|
|
|
Just what I was going to say. Regexes are probably the least useful tool for writing a compiler. OK, a spanner is probably less useful, but you know what I mean
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
You need to remember to escape the asterisks.
/\*.*?\*/
It doesn't handle nested comments, but I understand that balancing groups could be used to cover that.
One of the problems with trying to do it with a RegEx is that you have to read the entire file into a string before you process it and then use the SingleLine option.
|
|
|
|
|
|
The question goes as follow.
1. Write a c++ program that finds and prints all the prime numbers less than 100. (Hint:For each number from 2 to 100, find reaminder = number%n, where n ranges from 2 to sqrt(number). If any remainder equals 0, the number is not a prime number.)
2. Write a c++ program that calculates the nth number in the Fibonacci sequence, where the user enters n into the program interactively. For example, if n=6, the program should display a value of 5.The Fibonacci sequence is 0, 1, 1, 2, 3, 5, 8, 13...; the first two terms are 0 and 1, and each term thereafter is the sum of the two preceding terms-that is, fib(n)=fib(n-1)+fib(n-2).
I have tried to run but my program would not work. would anyone please help me out with this. thank you.
|
|
|
|
|
What exactly would not work?
|
|
|
|
|
after compiling the prime number question, the output of my program shows some weird numbers like 20887633892
20887633892
20887633892
|
|
|
|
|
I'm sorry but my powers of divination are not working today. Can you give us a clue as to the code involved in producing these values? Please try and narrow the problem down to the actual statements that cause the problem, and the input values to whatever algorithm you are using.
|
|
|
|
|
#include <iostream>
#include <cmath>
#include <conio.h>
using namespace std;
int main()
{
int num, n, remainder, prime, nonprime;
remainder = num % n;
for(num=2; num<=100; num++)
{
for(n=2; n<=sqrt(num); n++)
{
if(remainder==0)
break;
else
num=prime;
}
cout<<prime<<" "<<endl;
}
getche();
return 0;
}
|
|
|
|
|
aihcezs144 wrote: remainder = num % n;
aihcezs144 wrote: num=prime;
I suggest you use the single-stepping capabilities of the debugger and either "watch" some variables or add some statements to print intermediate values, as there are major problems with your code.
Is this your first attempt to programming? FYI: statement order is important, and assignment statements work one way (right to left), not both ways (as in mathematical equations).
|
|
|
|
|
okay, i've tried a new one but there are sompilation errors of which i could not locate. would you please take a look and tell mw where did i go wrong. thank you
#include <iostream>
#include<cmath>
#include <conio.h>
using namespace std;
int main()
{
int num, n, remainder;
remainder=num % n;
for( num = 2; num <=100 ; num++ )
{
for (n=2; n<=sqrt(n); n++)
{
if( remainder != 0 )
break;
}
if(remainder)
{
cout <<num<< " ";
}
num++;
}
getche();
return 0;
}
modified on Friday, September 4, 2009 8:20 AM
|
|
|
|
|
Seems you have removed one problem.
Compile-time and often run-time errors contain file name and line number information, use it to your advantage; and tell your IDE to always show line numbers in edit windows (for Visual Studio look here[^]).
I'm not going to provide any more help, the goal of exercises like these is for you to learn how to research, analyze, and debug; and not for others to do your work.
|
|
|
|
|
aihcezs144 wrote: remainder=num % n;
Note that remainder will not change if either num or n or both do, it's just set to num%n (which looks like an invitation to a division by zero) once when that statement is executed.
|
|
|
|
|
Hi,
Would you give me an example of FAMILIES of functions that I could use in a Hashtable?
Notice that I need a FAMILY of functions (that means it should depend on some random constants previously defined)
It should go from {0, K} to {0, m}
Im trying
f(x) = (a*x + b) % prime % m
where prime is larger than x, a is between 1 and prime-1, and b is between 0 and prime-1
But its not good enough.. Dunno why though
|
|
|
|