Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×

Comment Re:Learn CSS (Score 1) 438

Tables, divs, whatever, but please at least do this when you use tables:

<table class="bare-layout-table"><tr>
<td class="sidebar"><% sidebar %></td>
<td class="content"><% content %></td>
</tr></table>

Do not clutter up your page with useless, meaningless extra divs.

Comment Re:awesome (Score 1) 311

Gee, thanks for assuming that I'm incompetent. No, I use an actual text editor (which even shows you the different between spaces and tabs and everything), not Notepad. Step one was the hardest because I assumed that I needed to replace the tabs with 4 spaces, like God intended, but when I ran it, I saw that it didn't work, and quickly realized that it was meant to be replaced with 8 spaces. All of the other steps worked the first time, which made step one the hardest relatively speaking, but none of the steps (including one) was especially hard. Maybe if I used a crappy text editor that doesn't distinguish tabs and spaces number one would have been actually hard, but if you program in Python without being aware of the difference between tabs and spaces the fault is your own.

Comment Re:awesome (Score 2, Interesting) 311

Here's code you can put in your Python 2.x code today to future proof it against the change to xrange:

try:
      range = xrange
except NameError:
      pass

After that, just write range in your code and it will automatically use the equivalent of Python 2's xrange. If you're running Python 2.6, you can use a print function (instead of a print keyword) by adding from __future__ import print_function to your header as well, and you're good to go for a large number of Python 3 switching problems.

Comment Re:awesome (Score 1, Informative) 311

I got it to run in Python 3, and here are the changes I need to make:

1) The file was screwed up and used a tab instead of 8 spaces (a problem unrelated to Python 3).
2) I had to change all the print statements into print functions by wrapping the argument in parentheses.
3) I had to change xrange to range.
4) I had to add from functools import reduce to the top of the file.

Done. 4 changes made in 5 minutes, the hardest of which (#1) would have screwed up Python 2.x as well.

Comment Re:Removal... (Score 2, Informative) 186

I've noticed that too. Here's the thing, there are three kinds of articles in Wikipedia today: stubs, mediocre articles, and decent articles. No one is watching the stubs, so you can add stuff to those, though there is a serious problem getting past the deletionists to make a stub in the first place. Mediocre articles on the other hand had some good information in the past, but now paragraph three cuts off halfway through and the references section is screwed up. When you look at the history of the page, you see that basically the only changes made to it in the last year were vandalism and reverts, but the reverts weren't done properly and information was lost. Finally, the decent articles are decent because there are specific people who patrol the page to keep out vandalism. The trouble is, they're assholes and they also keep out new information and revert any improvements to the page. Good luck pointing out that the sections of the page need to be reorganized: you'll just be reverted away.

Comment Re:Well.. (Score 1) 747

Devil's advocate: If other people can't understand your error messages, doesn't that make them... bad error messages?

Remember: "Programs should be written for people to read, and only incidentally for machines to execute"

OTOH, if you do a good job of commenting on your easter egg in the source, whoever comes along after you should still be able to understand what's going on, and you get to amuse yourself with jokes. Win-win?

Internet Explorer

Microsoft Blames Add-Ons For Browser Woes 307

darthcamaro writes "Running IE and been hacked? Don't blame Microsoft — at least that's what their security types are now arguing. 'One of the things we've seen in the last two years is that attackers aren't even going after the browser itself anymore,' Eric Lawrence, Security Program Manager on Microsoft's Internet Explorer team, said. 'The browser is becoming a harder target and there are many more browsers. So attackers are targeting add-ons.' This kinda makes sense since whether you're running IE, Firefox, Safari or Chrome you could still be at risk if there is a vulnerability in Flash, PDF, QuickTime or another popular add-on. Or does it?"

Slashdot Top Deals

For God's sake, stop researching for a while and begin to think!

Working...