This is wasteful. You're not avoiding copying, you're copying a pointer. On most systems an int and a pointer are the same size. On all systems the size difference is so small that you should start saving space by making it a short. Besides, directly passing by value gives you a local copy to mess with (for stuff like while (*a++)).
Anyway, back on topic. You've always been able to do multidimensional array syntax in C++ classes:
class SmartArray {
public:
int getElement(int row, int col);
class SmartArrayHelper {
private:
int row;
SmartArray* array;
public:
int operator[](int col) {
return array->getElement(row, col);
}
friend class SmartArray;
};
This follows C multidimensional array semantics: if a is the array, a[x][y] is the element at (x, y), and a[x] is a valid object (whose type you can ignore, e.g., by templates) such that applying [y] to it yields the right element. a[x,y] still returns a[y], as it always did ("this is a feature, not a bug").
If you're picky about the commas, try this:
#define [ +brackets( #define ] ) struct brackets {
int row, col;
brackets(int row, int col) {row=r; col=c;} };
template <class T> T operator+(T array[][], brackets b) {
return array[b.row][b.col]; }
I haven't tested the #defines, but they should work. (This turns a[x, y] into a+brackets(x, y).) Overload operator+ for all classes you like, and overload the brackets constructor if you want other than two dimensions (and keep track of the dimensions, and throw stuff if the dimensions are wrong).
Re:So, how long until he's sued?
on
Singing Science
·
· Score: 1
If you post anonymously, then you must be guilty of something.:-P
Why's this funny? GVim is a great product. Syntax highlighting, smart indenting, strong regular expression support, graphical as well as CLI interface, make/debugging support. Vim is the only editor I use on command-line shells, and GVim is my regular editor on my Windows computer. It's light enough that I can use it as the find-and-replace for MS Word (copy the text, run the regex, copy it back). And once you get used to it, the GUI/insert mode/command mode design is very efficient.
That cookie will cause a "desktop" link to be sent back to them somewhere on the page. This desktop link contains a secret password. As soon as you know that password, you basically have full access to that persons computer through Google Desktop uris, regardless of what browser (as long as that browser supports javascript, which IE, FireFox and Opera obviously do).
GDS also has protection in that by default only localhost can access the GDS server, which means that for outside access, I generally have to make an SSH tunnel.
GDS security would be much more effective if it required you to log on each session and allowed you to connect from anywhere.
You know what would be even better for Microsoft in this case? Implement X11 "focus-follows-mouse" within the browser client area. Then you avoid the extra click, but you're not using whatever mouse-click-passing problem Eolas is complaining about. Same result to end users, different coding, no patent problem.
And yes, focus-follows-mouse is acceptable. First, it originated in X, whose developers would never patent it (and no one else can), and second, Windows has been supporting it since Win95 or so, enabled either by a registry change or by a TweakUI checkbox.
Hmm...If that doesn't work, what about giving all embedded objects the focus, and using the Eolas method to transfer focus to the browser (e.g., when you click on a link)? Since the browser isn't a plugin, they can't complain...
Amen. Photoshop for Dummies is the book you're looking for. I checked that book out from the library when I was donated a 1992 version of Adobe Photoshop for Mac (because I was the only Mac user known to that person). I haven't used that version since, but I have used Fireworks and GIMP (latest versions), and the editing philosophy is exactly the same. I know how to use those programs because of the Photoshop book.
There is no image editing program with layers, paths, filters, etc. that does not use an interface that imitates Photoshop. And there never will be, because those terms are the Photoshop interface.
In your case, yes, 'cause you haven't figured out that "you must be new here" is a rhetorical question (actually, it's not even a question, so it's a rhetorical statement, which is not only redudant but superfluous and repetitive). I've seen it used on people with 4-digit UIDs. I'm pretty sure someone replied to CmdrTaco himself with the phrase at some point.
You might as well say "my height is in inches, not centimetres".
No, this is more like saying "my weight is in kilograms, not Newtons": my weight (my mass, actually) is constant, but my weight in Newtons depends on what forces are affecting me. Similarly, a size in points is constant (72 pt = 1 in), but a size in pixels depends on your device. A 100x100 px image will display at the same quality on all monitors, printers, etc., because it will scale to fit the dot pitch of the device; a 72 pt (1 inch) letter will display at the same physical size on all devices, assuming you set up your monitor's sizing correctly.
Most people leave their font scale at 96 dpi for monitors regardless of actual dot pitch, so a 12 pt font always has a 16 pixel height, even if you change resolutions. GP apparently fixed his to work the way it's supposed to. I don't because I'm used to a 12 pt font being shaped like a font hinted to 16 px on all monitors.
I never could find the right version of Mechassault.
Try Blockbuster or a used games section. I got mine from GameStop's used games rack.
Surprising that nobody has simply made a boot loader that does whatever the Mechassault game does, but without the requirement of the special, long-discontinued game.
The only game that would satisfy that is a pirate version of MechAssault. The reason Linux doesn't work is that we don't know Microsoft's private key to digitally sign Linux as "okay to run." The error in MechAssault was that Microsoft signed off on a game that had a bug this serious. What MechAssault does for us is provides us with something the Xbox is willing to boot up from, until you mod it to allow unsigned discs.
Unless those 1600x1200 screens are giant (most aren't, I think my 17" monitor here can go that far), your text becomes tiny. Put one of them into console mode instead of graphics and keep your SSH session on there, then use X11 forwarding if you need apps on the other screen.
To the best of my knowledge there is still no crack for the Xbox that doesn't involve hardware modification.
There's a simple, Free exploit that uses a buffer overflow in MechAssault to run unsigned code under the security restrictions of the game itself; one of the things it can do is write files to disk. Appropriate files can replace or modify the Dashboard, allowing unsigned code to run with no restrictions and act as an operating system. Such code exists Freely for older Xboxen; for newer ones, there is technically illegal code with the same effect.
("Technically illegal" because it was built with an unlicensed copy of the Xbox developer's kit.)
SourceForge downloads page - get "MechInstaller", dd that to a drive that you can hook up to your Xbox, and load one of its saved games with an original (not "Platinum Hits") version of MechAssault 1. See xbox-linux.org.
To quote A Canticle for Leibowitz, "How did that heresy get into the world after all these years?" Anything with a standard CPU inside it is general purpose. The Xbox 360 is a Turing machine...with great graphics and an overheating problem, but that doesn't affect its Turing-completeness. Your Linksys router, your graphing calculator, probably your digital clock, are all general-purpose too, if you can find how to reprogram them. This world has very few special-purpose devices left in it. The point of things being Turing-complete is so that they're not special-purpose.
Remember that anything with a microcontroller can have that chip reprogrammed. The only special-purpose chips left are probably in heavily-embedded systems like the chip inside your optical mouse or something. For most applications it's cheaper to program a general-purpose microchip in software, instead of making your own logic circuits.
A good example of accesskeys is Legend of the Green Dragon, a web-based game inspired by an old BBS game, which is probably why it has accesskeys. Notice the links on the left: Create a character, List warriors, Privacy Policy, etc. Each one uses both accesskeys on the links (to enable ALT-letter) and an onKeyPress handler with the crucial code:
if (target.nodeName.toUpperCase()=='INPUT' || target.nodeName.toUpperCase()=='TEXTAREA' || altKey || ctrlKey)
This allows you, if you wish, to remove the accesskeys and only allow the unmodified letters, or if you change the end to...|| !shiftKey, only allow shifted letters, which I believe addresses daviddennis's complaint. If you strip the accesskeys from the link tags, you can still play the game with just single keypresses (I've done that; it's very intuitive) and keep your Alt-F and whatnot for file menu.
As he mentions, Wikipedia uses just accesskeys, which don't give you as much flexibility as with LotGD's JS approach. In the submitter's application, the use of keyboard shortcuts is to make people happy, not to make the site accessible for people who can't use the fancy interface, so JS is acceptable.
On the segment between the "new" router and the "old" router, traffic would mingle -- and if there's some funky broadcast virus on the INSIDE of the "new" segment, it may cause problems on the "old" segment.
Then do it the other way around. Hook up the safe computers to the inner router, and the unsafe computers to the outer router. The outer router is the WAN of the inner one, and if it launches attacks it's the same as if the open Internet launched attacks against your single router now.
Please don't use the term "Christian" to refer to Jack Thompson, for the same reason that you shouldn't use the term "monkey" to refer to George W. Bush.
Every time I hear the teacher talking about such intellectually bankrupt concepts as 'irreducible complexity' I want to scream, but I'm not sure how to approach this without alienating the rest of the church. Suggestions would be greatly appreciated.
Mention how JP2 said in 1992 that Galileo was, indeed, correct.
I'm no fan of jury duty, along with everyone else, but it is that duty that gives some people a fair trial.
If you're no fan of jury duty, wouldn't you find some way of making yourself look like a bad juror? I think that's what he meant by "too stupid to get out of jury duty". Most people don't accept jury duty as their responsibility as a citizen.
Or as the saying goes: scientists ask "why?"; engineers ask "why not?".
const int &x, const int &y
...
This is wasteful. You're not avoiding copying, you're copying a pointer. On most systems an int and a pointer are the same size. On all systems the size difference is so small that you should start saving space by making it a short. Besides, directly passing by value gives you a local copy to mess with (for stuff like while (*a++)).
Anyway, back on topic. You've always been able to do multidimensional array syntax in C++ classes:
class SmartArray {
public:
int getElement(int row, int col);
class SmartArrayHelper {
private:
int row;
SmartArray* array;
public:
int operator[](int col) {
return array->getElement(row, col);
}
friend class SmartArray;
};
SmartArrayHelper operator[](int row) {
SmartArrayHelper h={row, this};
return h;
}
private:
};
This follows C multidimensional array semantics: if a is the array, a[x][y] is the element at (x, y), and a[x] is a valid object (whose type you can ignore, e.g., by templates) such that applying [y] to it yields the right element. a[x,y] still returns a[y], as it always did ("this is a feature, not a bug").
If you're picky about the commas, try this:
#define [ +brackets(
#define ] )
struct brackets {
int row, col;
brackets(int row, int col) {row=r; col=c;}
};
template <class T>
T operator+(T array[][], brackets b) {
return array[b.row][b.col];
}
I haven't tested the #defines, but they should work. (This turns a[x, y] into a+brackets(x, y).) Overload operator+ for all classes you like, and overload the brackets constructor if you want other than two dimensions (and keep track of the dimensions, and throw stuff if the dimensions are wrong).
If you post anonymously, then you must be guilty of something. :-P
Why's this funny? GVim is a great product. Syntax highlighting, smart indenting, strong regular expression support, graphical as well as CLI interface, make/debugging support. Vim is the only editor I use on command-line shells, and GVim is my regular editor on my Windows computer. It's light enough that I can use it as the find-and-replace for MS Word (copy the text, run the regex, copy it back). And once you get used to it, the GUI/insert mode/command mode design is very efficient.
That cookie will cause a "desktop" link to be sent back to them somewhere on the page. This desktop link contains a secret password. As soon as you know that password, you basically have full access to that persons computer through Google Desktop uris, regardless of what browser (as long as that browser supports javascript, which IE, FireFox and Opera obviously do).
GDS also has protection in that by default only localhost can access the GDS server, which means that for outside access, I generally have to make an SSH tunnel.
GDS security would be much more effective if it required you to log on each session and allowed you to connect from anywhere.
You know what would be even better for Microsoft in this case? Implement X11 "focus-follows-mouse" within the browser client area. Then you avoid the extra click, but you're not using whatever mouse-click-passing problem Eolas is complaining about. Same result to end users, different coding, no patent problem.
And yes, focus-follows-mouse is acceptable. First, it originated in X, whose developers would never patent it (and no one else can), and second, Windows has been supporting it since Win95 or so, enabled either by a registry change or by a TweakUI checkbox.
Hmm...If that doesn't work, what about giving all embedded objects the focus, and using the Eolas method to transfer focus to the browser (e.g., when you click on a link)? Since the browser isn't a plugin, they can't complain...
Amen. Photoshop for Dummies is the book you're looking for. I checked that book out from the library when I was donated a 1992 version of Adobe Photoshop for Mac (because I was the only Mac user known to that person). I haven't used that version since, but I have used Fireworks and GIMP (latest versions), and the editing philosophy is exactly the same. I know how to use those programs because of the Photoshop book.
There is no image editing program with layers, paths, filters, etc. that does not use an interface that imitates Photoshop. And there never will be, because those terms are the Photoshop interface.
X.org was a special exception. The general rule prohibits single-letter domains.
Does 4 months count as new? Not sure...
In your case, yes, 'cause you haven't figured out that "you must be new here" is a rhetorical question (actually, it's not even a question, so it's a rhetorical statement, which is not only redudant but superfluous and repetitive). I've seen it used on people with 4-digit UIDs. I'm pretty sure someone replied to CmdrTaco himself with the phrase at some point.
You might as well say "my height is in inches, not centimetres".
No, this is more like saying "my weight is in kilograms, not Newtons": my weight (my mass, actually) is constant, but my weight in Newtons depends on what forces are affecting me. Similarly, a size in points is constant (72 pt = 1 in), but a size in pixels depends on your device. A 100x100 px image will display at the same quality on all monitors, printers, etc., because it will scale to fit the dot pitch of the device; a 72 pt (1 inch) letter will display at the same physical size on all devices, assuming you set up your monitor's sizing correctly.
Most people leave their font scale at 96 dpi for monitors regardless of actual dot pitch, so a 12 pt font always has a 16 pixel height, even if you change resolutions. GP apparently fixed his to work the way it's supposed to. I don't because I'm used to a 12 pt font being shaped like a font hinted to 16 px on all monitors.
I never could find the right version of Mechassault.
Try Blockbuster or a used games section. I got mine from GameStop's used games rack.
Surprising that nobody has simply made a boot loader that does whatever the Mechassault game does, but without the requirement of the special, long-discontinued game.
The only game that would satisfy that is a pirate version of MechAssault. The reason Linux doesn't work is that we don't know Microsoft's private key to digitally sign Linux as "okay to run." The error in MechAssault was that Microsoft signed off on a game that had a bug this serious. What MechAssault does for us is provides us with something the Xbox is willing to boot up from, until you mod it to allow unsigned discs.
Unless those 1600x1200 screens are giant (most aren't, I think my 17" monitor here can go that far), your text becomes tiny. Put one of them into console mode instead of graphics and keep your SSH session on there, then use X11 forwarding if you need apps on the other screen.
To the best of my knowledge there is still no crack for the Xbox that doesn't involve hardware modification.
There's a simple, Free exploit that uses a buffer overflow in MechAssault to run unsigned code under the security restrictions of the game itself; one of the things it can do is write files to disk. Appropriate files can replace or modify the Dashboard, allowing unsigned code to run with no restrictions and act as an operating system. Such code exists Freely for older Xboxen; for newer ones, there is technically illegal code with the same effect.
("Technically illegal" because it was built with an unlicensed copy of the Xbox developer's kit.)
SourceForge downloads page - get "MechInstaller", dd that to a drive that you can hook up to your Xbox, and load one of its saved games with an original (not "Platinum Hits") version of MechAssault 1. See xbox-linux.org.
special-purpose hardware
To quote A Canticle for Leibowitz, "How did that heresy get into the world after all these years?" Anything with a standard CPU inside it is general purpose. The Xbox 360 is a Turing machine...with great graphics and an overheating problem, but that doesn't affect its Turing-completeness. Your Linksys router, your graphing calculator, probably your digital clock, are all general-purpose too, if you can find how to reprogram them. This world has very few special-purpose devices left in it. The point of things being Turing-complete is so that they're not special-purpose.
Remember that anything with a microcontroller can have that chip reprogrammed. The only special-purpose chips left are probably in heavily-embedded systems like the chip inside your optical mouse or something. For most applications it's cheaper to program a general-purpose microchip in software, instead of making your own logic circuits.
But how long does that fuzzy feeling last when your system crashes because the power-supply overheated?
Then it becomes a warm fuzzy feeling.
In that case, we might as well listen and start switching to IPv6....
As he mentions, Wikipedia uses just accesskeys, which don't give you as much flexibility as with LotGD's JS approach. In the submitter's application, the use of keyboard shortcuts is to make people happy, not to make the site accessible for people who can't use the fancy interface, so JS is acceptable.
On the segment between the "new" router and the "old" router, traffic would mingle -- and if there's some funky broadcast virus on the INSIDE of the "new" segment, it may cause problems on the "old" segment.
Then do it the other way around. Hook up the safe computers to the inner router, and the unsafe computers to the outer router. The outer router is the WAN of the inner one, and if it launches attacks it's the same as if the open Internet launched attacks against your single router now.
An asshole Christian fundemental lawyer
Please don't use the term "Christian" to refer to Jack Thompson, for the same reason that you shouldn't use the term "monkey" to refer to George W. Bush.
I'm almost ashamed to be a Christian
There's nothing wrong with being ashamed to be a Christian, so long as you are not ashamed to follow Christ.
(Yes, there's a difference.)
I didn't know before now that it was possible to make even less sense and rave even more senselessly than the anti-evolutionists.
Every time I hear the teacher talking about such intellectually bankrupt concepts as 'irreducible complexity' I want to scream, but I'm not sure how to approach this without alienating the rest of the church. Suggestions would be greatly appreciated.
Mention how JP2 said in 1992 that Galileo was, indeed, correct.
Tried it on Windows XP (no service packs, I think), not recently updated, IE 6.00.2800. Doesn't launch "calc" as claimed; only hangs the browser.
It's even better on Mozilla; it doesn't even hang.
I'm no fan of jury duty, along with everyone else, but it is that duty that gives some people a fair trial.
If you're no fan of jury duty, wouldn't you find some way of making yourself look like a bad juror? I think that's what he meant by "too stupid to get out of jury duty". Most people don't accept jury duty as their responsibility as a citizen.
If you can't do ALL of the exam questions then clearly you NEED to be in the class.
All the class?
And how many students who stay in the class can do even 90% of the exam questions by the end of the year?