This is actually a pretty large project you're looking to undertake. Each of those programs, and quite possibly each version of those programs, would need a custom "spy" tool implemented. It's also a massive invasion of privacy, and I think Christian is probably correct that you're not likely to get any help here (or anywhere else).
Curi0us_George
Posts
-
Writing a Spyware -
MS patented click and double-clickM$ Don't do that. ---- Many VCR's have had this functionality for quite a while. e.g. The longer you press the ffwd button, the higher the speed at which it faster fowards. My DVD player does, to. Pressing stop stops the playback. Holding stop for about 2 seconds causes the disk to eject. Microsoft won't be able to hold this one up in court. Way too much prior art.
-
Taking input while in some form of waiting/sleeping -- plz helpNot really. That would be entirely dependent on what libraries you ae using for input. Perhaps whatever library you are using provides a function (with a name such as bytes_available()) which returns the number of bytes currently available for access. I've used libraries (e.g. JNetLib) which has this type of functionality, but many libraries do not. It is possible to wrap an asynchronous APi and achieve this kind of functionality (which is what JNetLib does), but this wrapping will require threading. It really depends on what you are trying to do, where this input is coming from, and what libraries you are using.
-
About a graph algorithm! It is very diffcult , I think!First off, you need to reduce the problem. You cannot necessarily determine all paths from I to J if there is a cycle in the graph, because there are (potentially) infinite paths. Detecting graph cycles is fairly simple. Search on Google for how. Now, if you are willing to reduce the problem to only Directed Acyclic Graphs, you simply start at I and traverse every possible path. The simplest implementation is to store a representation of the path (possibly just a list of vertex pointers). Every time you come to a point where you could traverse down two different edges, copy the list and traverse down both. (Of course, if there are more than two possible edges, make additional copies and traverse for each.) Since the graph is acyclic, the paths will either run into J (at which point they record/print themselves somewhere) or they will end unsuccessfully (at which point they do nothing else). This same logic (with minor modifications) will also work on cyclic graphs, but checking for cycles becomes necessary. e.g. Is vertex Q already in the path? If so, don't bother going there again, because it's a cycle. And of course, if there is actually a cycle in valid path (e.g. I->Q->Z->Q->J), it's impossible to return all the paths, because there really will be an infinite number of them. (e.g. I->Q->Z->Q->Z->Q->Z->...Q->J)
-
Java BeanYou need to compare the username and password (or a hash of the password) against a previously stored username and password (or password hash). The validation code should probably return only a simple boolean value; true for accepted, false for refused. But this isn't really an appropriate discussion board (or even an appropriate site) for discussing Java-specific things. Search on Google, and browse through some java sites. I guarantee you that a thousand people have already written exactly what you are describing, and probably a few hundred have explained the entire process on the web. I'm sure you can find an explanation if you look for a while.
-
Taking input while in some form of waiting/sleeping -- plz helpProbably more elegant to do this in a multithreaded fashion, but yes, it's possible to do what you want without multithreading. First, you're going to need non-blocking input. If you don't have that, I think you're pretty much SOL. Assuming you have non-blocking input, the basic logic is:
int granularity = 100; // number of milliseconds to sleep between attempts
int attempt = 2000; // number of milliseconds to try
int attempted = 0; // counter
while (attempted < attempt)
{
// check for input (must not block)
if (inputIsAvailable())
{
// we already have input
doSomething();
}
else
{
// wait for input
Sleep(granularity);
attempted += granularity;
}
}
// we never got input
doSomethingElse(); -
How Long Will It TakeIt takes however long you want it to take. If you really crack down on it, and you're already comfortable with at least one other Object-Oriented programming language, you could become proficient in only a week or two. If you've never programmed or have only programmed in a structure-oriented language, expect to spend a month or two (possibly more), assuming you're willing to put a good bit of work into it. If you're not wanting to put the effort into coding, you'll probably never become proficient. Code a lot if you want to learn C++, or any language. Find a project you are interested in, and write it in C++. Or write some module/component for it, if it's not a new project. And of course, read a lot of other people's code, paying attention to style (that means learning to recognize good AND bad C++ style).
-
how to search through an external fileEither store each following line in its own string (i.e. have 3 different string objects), or concatenate the strings. e.g. std::string str = "my name is jim"; str += "\n" + getLineFromInputFile(); //...
-
size of an empty class??VTable is only allocated if the class actually contains virtual functions. The size of an empty class will always be greater than zero because two objects must not occupy the same space. (As DavidCrow pointed out)
-
MACRO vs INLINE FUNCTIONMy general rule is that if it can be done as an inline function, it should be. There are some things which cannot be done with an inline function, but can be done with a macro. Those are rare, though.
-
Keyboard hook (alt + tab)Are you using a WH_KEYBOARD_LL hook? Because a WH_ KEYBOARD hook will not catch Alt+Tab. SetWindowsHookEx About Hooks: WH_KEYBOARD_LL LowLevelKeyboardProc
-
In MFC, which event works when user clicks on close button?Then either I'm not sure what you're trying to accomplish, or you went about it the wrong way. If you could post a code snippet (the part that didn't work), or if you could explain exactly what you are wanting to accomplish, then either myself or someone else would surely be able to help you.
-
OverloadingNot a big deal. I just couldn't have you bad-mouthing C#'s overloading. ;)
-
dynamic 2 dimensional arrayPft. Allocation of the array is not typically the source of speed overhead. Accessing array positions repeatedly is, and your way is no faster than mine. Mine is at least intuitive.
-
dynamic 2 dimensional arrayI suppose that works, but ick. I guess if it does the job for you, though . . .
-
To share or not to share???>>The thing is...you will get flamed if you post >>code here and put any restrictions on it (other >>than "mention me in your about dialog box" ). I've seen people complain about that, too. :\ Some guy complained about some BSD'd code once, saying that no commercial company would tolerate the "don't take credit for my code" clause.
-
dynamic 2 dimensional array... and also one dimensional.
-
Need "measuring time" suggestionI'll have to remember that one. That's a bit more friendly than the method I gave. (Though not as useful if you actually want the time. ;))
-
dynamic 2 dimensional arrayThe only way I know to do it is to create an array of int* and then assign each element to point to an array. e.g. int ** array = new int*[2]; for (int i = 0; i < 2; i++) { array[i] = new int[2]; }
-
In MFC, which event works when user clicks on close button?You could probably just handle the WM_CLOSE message and accomplish what you want.