phear-

Members
  • Content count

    234
  • Joined

  • Last visited

Community Reputation

162 Neutral

About phear-

  • Rank
    Member
  1. I don't think i'm quite understanding your dilemma because I don't see why you cant call your function directly from your code... Why do you need to get the module address and then get a pointer to the function? When you write a function hook, its solely supposed to be used for redirecting the execution of the remote process. Sending execution from the hook function to another function in your DLL should be as simple as calling it... This is for "static" injection though, where your DLL is added to the program before it is run. "Dynamic" injection is when the remote program gets injected while it is running, but even then I think it still is possible (though i've only worked with static injection before).
  2. How is that real?

    Quote:Original post by Briksins Whay exactly objective C? Im sure i will be able understand it with no problems but why not than C++? iPhone = objective C. Nothing else, as per apple developer rules.
  3. Feedback on portfolio site

    Im not a design professional by any means but I would say that the portfolio isnt as intuitive as it should be.
  4. Quote:Original post by SiCrane Quote:Original post by phear- I also don't understand what you mean by "numerically stable" Oddly enough, the first result from google when you search for "numerically stable": Numerical stability. Thank you for the link. But I also meant I did not understand what alvaro said after that remark as well, where he told me another way to do it. "You should probably compute the average first, and then measure the average of the square of the distance to the average (well, or sum divided by (n-1))." Sorry if I did not make myself clear. This is my first math class since high school, which was over 5 years ago, so my math skills are a little dusty so to speak. Edit: Thanks for another link, I'll attempt to do it from here on out. Thanks to all 3 of you for help.
  5. I have two homework problems that I'm writing this function for, but I want to be able to reuse this over and over for future assignments. 1st data set: 1523 43 2862 74 1974 56 3551 79 2415 64 3137 73 3405 78 2310 70 3160 80 3642 78 2nd data set: 5.31 95 0.80 114 5.38 120 6.38 135 19.01 179 12.29 142 5.74 85 0.49 95 I also don't understand what you mean by "numerically stable" Thank you both for the help so far!
  6. Quote:Original post by alvaro You are confusing the precision of double with the precision of the function you are using to print a double. -1269946767 can be represented by a double just fine. That's what I was afraid of... so does that mean I cant print that large of a double to the console? Will that occur if I use a file stream? Edit: I keep getting NaN when I perform the sqrt() on bottom1 and bottom2 The equation for CoC is: http://upload.wikimedia.org/math/c/a/6/ca68fbe94060a2591924b380c9bc4e27.png
  7. Quote:Original post by alvaro I don't understand the argument why you think you can't use `double'. And you can use `long long' as a 64-bit integer type in g++, even in a 32-bit OS. doubles did not work. The size of the numbers I am working with are large, in the billions/hundred millions and I need a decimal with at least several spaces. For example, if I were to change bottom1 to a double this is what it looks like: -1.26995e+09 Instead of what it should be: -1269946767 When I compute the coefficient, it's going to be a number between -1 and 1, so I need a high degree of precision, but I also need to have the data type be able to hold large numbers such as the one above, and even higher. long long would work if I didnt need any decimals.
  8. Im in my first finite mathematics course (pursuing an SE degree) and I am creating functions for everything I learn. Right now, I am stuck on creating a function for getting the coefficient of correlation for a set of data. The problem I am having has to do with type issues: I need really big numbers, and unfortunately the basic C++ types don't cut it for me. Code: void coeff_corr() { vector<int> x, y, xy, xsq, ysq; int sum_of_x = 0, sum_of_y = 0, sum_of_xy = 0, sum_of_xsq = 0, sum_of_ysq = 0; int number_of_rows; cout << endl << "Number of data rows? \n > "; cin >> number_of_rows; //get x and y values for(int loop = 0; loop < number_of_rows; loop++) { int temp_x; int temp_y; cout << endl; cout << "X[" << loop+1 << "] = "; cin >> temp_x; cout << "Y[" << loop+1 << "] = "; cin >> temp_y; x.push_back(temp_x); y.push_back(temp_y); } //fill xsq and ysq and xy for(int loop = 0; loop < number_of_rows; loop++) { ysq.push_back(y[loop] * y[loop]); xsq.push_back(x[loop] * x[loop]); xy.push_back(x[loop] * y[loop]); } //get sums for(int loop = 0; loop < number_of_rows; loop++) { sum_of_x += x[loop]; sum_of_y += y[loop]; sum_of_xsq += xsq[loop]; sum_of_ysq += ysq[loop]; sum_of_xy += xy[loop]; } cout << endl; //output data for(int loop = 0; loop < number_of_rows; loop++) { cout << x[loop] << " " << y[loop] << " " << xy[loop] << " " << xsq[loop] << " " << ysq[loop] << endl; } cout << endl; cout << "Sum of X: " << sum_of_x << "; Sum of Y: " << sum_of_y << "; Sum of XY: " << sum_of_xy << endl; cout << "Sum of X^2: " << sum_of_xsq << "; Sum of Y^2: " << sum_of_ysq << endl << endl; //compute correlation int top = (number_of_rows * sum_of_xy) - (sum_of_x * sum_of_y); cout << "Top: " << top << endl; int bottom1 = (number_of_rows * sum_of_xsq) - (sum_of_xsq * sum_of_xsq); cout << "Bottom1: " << bottom1 << endl; int bottom2 = (number_of_rows * sum_of_ysq) - (sum_of_ysq * sum_of_ysq); cout << "Bottom2: " << bottom2 << endl; double bottom = sqrt(bottom1) * sqrt(bottom2); cout << "Bottom: " << bottom << endl; double total = top / bottom; cout << endl; cout << "Coefficient of Correlation: " << total << endl << endl; cin.get(); } The problem lies in the bottom of the function where I compute the square roots. I need bottom1 and bottom2 to be of a type that can support large whole numbers as well as decimals, which means a float and a double dont work. If you were to run this right now, it would say bottom is NaN, and I do not know where to go from here. I guess switching languages would be a lot easier, but I want to overcome this bug first =P Any help is appreciated! Edit: BTW, im writing this code on Ubuntu x86, so I can't use 64bit datatypes.
  9. [PHP] GameDev basic

    I havent worked on web programming in quite a few years, but the answer to your question would be using whats called "cron." Thats how a popular php game called BlackNova Traders used to update the server and such as well as a few other php based games. Like I said though, this is all from a while time ago and there very well may be more and better ways to do it now. http://en.wikipedia.org/wiki/Cron
  10. Musings on 4X games

    I really like the idea! I believe the game "Caesar III" sort of touched upon this because you start out with a little money and you are a small part of the roman empire building up little towns and cities, and as you build rank in the roman government you gain more resources at the start of new towns, and in some maps you take over a town and have to either rebuild it or build upon it. It's an old game though so it's not too detailed.
  11. Android Dungeon Crawler

    Games looking pretty good! Whats the lore going to be? I might be able to think up a name for you =P How long have you worked on the game to achieve what you have in the video?
  12. Hello again

    Here's to a speedy recovery, get well soon
  13. Answer to a hypthetical question

    Its not necessarily the hard drive that makes it possible for updates and bug fixes, its also the fact that more and more consoles are now connected to the internet.
  14. Programming a Browser-Based Game (BBG)

    You could use (after learning a web language) a pre-built game such as this. And modify it to your needs. Also, some tutorials you can take a look at are here.
  15. Strict OO principles vs. speed

    I would just like to say that this thread has quite a wealth of information and opinion. I could only hope one day I can learn enough to provide input like you guys.