Better still, use parameters. Have an SQL statement like SELECT address FROM users WHERE name = ? and then prepare that statement normally, then execute as $sth->execute($username). It'll take care of quoting automatically.
Plus you can re-use the same prepared statement for different parameters by simply execute()ing with a different bind parameter each time. Saves time on databases with real prepared statements.
No, but if I had to, I'd use an appropriate tool -- such as GNU grep's -w (whole words only) switch. Or a regular expression something like/\bc\b/ in Perl. Or a search pattern such as/\<c\> in vi.
I agree. Though here at work we usually do it with live ducks, and we call them "dogs" (I guess after the way some people talk to their dog).
So I might ask some co-worker to "come over and play dog" and while I'm explaining the problem to them, often I go "and then I... um, never mind, I think I found it. Thanks!".
I guess it's the fact that you order things in your head in order to be able to explain them that helps you fix the problem by yourself.
Um, so if someone sends email from a bogus account, whom are you going to sue?
(And don't say "the owner of the IP address in the Received header", unless you feel like subpoenaing some South Korean open proxy for their SMTP logs, or suing them [but under what law? American jurisdiction doesn't apply there].)
I say that your suggestion is completely impractical and unrealistic.
Click <a href="<? echo $HTTP_REFERER ?>">here</a> to go back
The fact that this can turn into an infinite loop, for one. Or that it messes up your browser's internal link stack, so when they use their back button, they move "forwards".
There is a difference on the trailing slash & it's better to include. If you try to hit a server w/o the trailing slash, you'll simply get a redirect from the server to the version *with* a slash. On broadband, it's totally trival, but for narrowband users, it is noticable. Something to worth keeping in mind for the URLs your link to.
That's not how I understand it -- after all, there isn't any possible path to request for an URL such as http://www.example.com other than "/". *fx: looks up RFC* Ah, there it is, from RFC 2616 "HTTP/1.1":
3.2.2 http URL
The "http" scheme is used to locate network resources via the HTTP
protocol. This section defines the scheme-specific syntax and
semantics for http URLs.
If the port is empty or not given, port 80 is assumed. The semantics
are that the identified resource is located at the server listening
for TCP connections on that port of that host, and the Request-URI
for the resource is abs_path (section 5.1.2). The use of IP addresses
in URLs SHOULD be avoided whenever possible (see RFC 1900 [24]). If
the abs_path is not present in the URL, it MUST be given as "/" when
used as a Request-URI for a resource (section 5.1.2). If a proxy
receives a host name which is not a fully qualified domain name, it
MAY add its domain to the host name it received. If a proxy receives
a fully qualified domain name, the proxy MUST NOT change the host
name.
(Emphasis added)
You were probably thinking of paths such as http://www.example.com/some/path , which (if they are directories) typically get turned into redirects to http://www.example.com/some/path/ . But a bare http://www.example.com is legal and equivalent to http://www.example.com/ ; the HTTP request in either case should be "GET / HTTP/1.1" by my reading of the spec.
Um, hello? How long would it take to set up a filter that would file all of your complaints straight to/dev/null? I fail to see how your solution would be very painful to any ISP with half a clue. I also fail to see how it can be effective.
ISTR something similar happened with Perl a while back -- someone from (IIRC) some flavour of BSD got in touch with the Perl developers and said "hey, here are the patches we apply to Perl, are you interested?". For the past "n" years, they had been silently applying them and the developers never got to know of the patches previously.
I heard of someone who wrote an HTTPD in awk (to be run from inetd.conf). Google turns up this but I'm not sure whether it's the same thing (and our company proxy doesn't let me to port:81).
If you are storing time_t in files as an int you deserve what you will get.
And what about those who store time_t as a time_t? On the systems I've seen, time_t is a long, which is most often 32 bits. Setting up a file format around that seems the "obvious" thing to do.
While it's true that thinking ahead makes sense, people tend not to do so if the "obvious" solution works (and will continue to work for over thirty years, by which time they hope they'll be retired).
I wonder how many C programmers will be called out of their holes to patch programs similar to the hunt for COBOL experts at the end of last century.
About one. The problem, if any, is trivial compared to the COBOL one.
I'd not be so sure. I can well imagine that in a bunch of places, there's just not enough space to store the extra bits, just as in the Y2K problem people had to scare up an extra two bytes in all sorts of places to store the century... which is not so good in, say, protocols which have fixed field widths. I don't think it's something trivial which can be fixed by just recompiling everything (which in itself is not trivial -- you'd really need to test the software all over again to check that you didn't break anything by compiling with wider integers).
2038 is more like it. 03:14:07 UTC on 19 January 2038, to be exact.
And no, just hoping everyone's going to be running 64-bit systems by then is not going to help if you have, for example, file formats which only allocate 4 bytes to storing a time_t value.
I'll not have reached retirement age in 2038... I wonder how many C programmers will be called out of their holes to patch programs similar to the hunt for COBOL experts at the end of last century.
No, that would be "Days of The Perl Journal as a supplement to SysAdmin numbered"... and I got the message just after I renewed my subscription:( (which hurts, since I basically subscribed to SysAdmin for the TPJ content).
Or letting some other shmoe's bot push you onto the water so you drown?
I don't think doing nothing is a terribly good winning strategy.
Re:Ok, been trying to figure this out for awhile..
on
Vi IMproved -- Vim
·
· Score: 2
You may be looking for:20,25>>>>> . Or if you don't know the exact line numbers, move to the last line, mark it 'a' with ma, move to the first line, and then:.,'a>>>>> . This will move the lines over by five times the "shiftwidth". (How many columns this is and whether you get tabs or spaces depends upon, among other things, the shiftwidth, tabsize, expandtabs and smarttabs settings.)
Why do you advise particularly against the "L" or "M" models?
Do they use a different (worse) printing engine? Do they wear out more quickly? Are they not worth their money?
Maybe you're thinking of CritLink/CritSuite?
I can't get to the site at the moment, but you could try an old cache at archive.org.
Or use me@privacy.net . That address was especially set up for that sort of thing.
ROTFL!
Better still, use parameters. Have an SQL statement like SELECT address FROM users WHERE name = ? and then prepare that statement normally, then execute as $sth->execute($username). It'll take care of quoting automatically.
Plus you can re-use the same prepared statement for different parameters by simply execute()ing with a different bind parameter each time. Saves time on databases with real prepared statements.
Between 100 and 500 percent speed increase -- not 100 times!
No, but if I had to, I'd use an appropriate tool -- such as GNU grep's -w (whole words only) switch. Or a regular expression something like /\bc\b/ in Perl. Or a search pattern such as /\<c\> in vi.
I agree. Though here at work we usually do it with live ducks, and we call them "dogs" (I guess after the way some people talk to their dog).
... um, never mind, I think I found it. Thanks!".
So I might ask some co-worker to "come over and play dog" and while I'm explaining the problem to them, often I go "and then I
I guess it's the fact that you order things in your head in order to be able to explain them that helps you fix the problem by yourself.
Sendmail as Rice-Boy -- what a concept :)
Um, so if someone sends email from a bogus account, whom are you going to sue?
(And don't say "the owner of the IP address in the Received header", unless you feel like subpoenaing some South Korean open proxy for their SMTP logs, or suing them [but under what law? American jurisdiction doesn't apply there].)
I say that your suggestion is completely impractical and unrealistic.
The fact that this can turn into an infinite loop, for one. Or that it messes up your browser's internal link stack, so when they use their back button, they move "forwards".
Abigail wrote about this years ago.
Well, until Linux gets ported to the C64, you can have a look at Lunix ("Little Unix").
Other links: here (also with screenshots) and here.
That's not how I understand it -- after all, there isn't any possible path to request for an URL such as http://www.example.com other than "/". *fx: looks up RFC* Ah, there it is, from RFC 2616 "HTTP/1.1":
(Emphasis added)
You were probably thinking of paths such as http://www.example.com/some/path , which (if they are directories) typically get turned into redirects to http://www.example.com/some/path/ . But a bare http://www.example.com is legal and equivalent to http://www.example.com/ ; the HTTP request in either case should be "GET / HTTP/1.1" by my reading of the spec.
According to the Jargon File, it was so named because it was the successor of an earlier window system called "W".
- use a username/password combination I picked up on Slashdot (such as slashdotusers/newsfornerds IIRC)
Um, hello? How long would it take to set up a filter that would file all of your complaints straight to /dev/null? I fail to see how your solution would be very painful to any ISP with half a clue. I also fail to see how it can be effective.
ISTR something similar happened with Perl a while back -- someone from (IIRC) some flavour of BSD got in touch with the Perl developers and said "hey, here are the patches we apply to Perl, are you interested?". For the past "n" years, they had been silently applying them and the developers never got to know of the patches previously.
I heard of someone who wrote an HTTPD in awk (to be run from inetd.conf). Google turns up this but I'm not sure whether it's the same thing (and our company proxy doesn't let me to port :81).
And what about those who store time_t as a time_t? On the systems I've seen, time_t is a long, which is most often 32 bits. Setting up a file format around that seems the "obvious" thing to do.
While it's true that thinking ahead makes sense, people tend not to do so if the "obvious" solution works (and will continue to work for over thirty years, by which time they hope they'll be retired).
I'd not be so sure. I can well imagine that in a bunch of places, there's just not enough space to store the extra bits, just as in the Y2K problem people had to scare up an extra two bytes in all sorts of places to store the century... which is not so good in, say, protocols which have fixed field widths. I don't think it's something trivial which can be fixed by just recompiling everything (which in itself is not trivial -- you'd really need to test the software all over again to check that you didn't break anything by compiling with wider integers).
2038 is more like it. 03:14:07 UTC on 19 January 2038, to be exact.
And no, just hoping everyone's going to be running 64-bit systems by then is not going to help if you have, for example, file formats which only allocate 4 bytes to storing a time_t value.
I'll not have reached retirement age in 2038... I wonder how many C programmers will be called out of their holes to patch programs similar to the hunt for COBOL experts at the end of last century.
If you're looking for a job with Perl, I've heard good things about jobs.perl.org. I have no personal experience with the site, however.
No, that would be "Days of The Perl Journal as a supplement to SysAdmin numbered"... and I got the message just after I renewed my subscription :( (which hurts, since I basically subscribed to SysAdmin for the TPJ content).
I think you'll find she goes by Mary Ann Horton these days, if I understand correctly.
Or letting some other shmoe's bot push you onto the water so you drown?
I don't think doing nothing is a terribly good winning strategy.
You may be looking for :20,25>>>>> . Or if you don't know the exact line numbers, move to the last line, mark it 'a' with ma, move to the first line, and then :.,'a>>>>> . This will move the lines over by five times the "shiftwidth". (How many columns this is and whether you get tabs or spaces depends upon, among other things, the shiftwidth, tabsize, expandtabs and smarttabs settings.)