lazy article

Pages: 1... 678910... 15
You could always just shift+delete and bypass the recycling bin altogether.
You could always just shift+delete and bypass the recycling bin altogether.


Which operating system? Which desktop environment?
I don't want to. This way I get 2 minutes ( http://pastebin.com/m658c9870 ) in case I make a mistake.

Plus that means I have to press two buttons. This way I only press one. It works alot better now.
Last edited on
Plus that means I have to press two buttons. This way I only press one. It works alot better now.


And mac users don't have to press any! They're forced to drag and drop it in the trash can.

EDIT: Actually, it looks like you can with command-delete, so I take that back.
Last edited on
What do you guys think:

http://i38.tinypic.com/30i89bc.png
http://i33.tinypic.com/2e52h6c.png
?

source:
http://pastebin.com/m420e6819

Works on text files and images, I haven't tested other binary files yet.

I'm downloading a .tar.gz file (codeblocks release, first that came to my head) right now. Seems to be working...
I will add a loading bar (one of the "=======>" ones) in a sec if it works.

It worked!
Last edited on
You really need to learn to use the shell.
Here's in Windows because I have no idea how to do it in Bash:
1
2
3
4
5
set COUNTER=1
:loop
wget http://www.cplusplus.com/forum/lounge/15031/page%COUNTER%.html
set /a COUNTER+=1
if %COUNTER% leq 8 goto :loop


EDIT: Actually, no. You need to learn to use the tools you already have.
Last edited on
The point was to not use wget! The point was to download files without it or anything like that.

I wanted to read and write the files myself.
Last edited on
I think you're spending too much time reinventing wheels. Reinventing particularly uninteresting wheels, at that. Why don't you try opening the connection and downloading the files manually instead of using the Python library?
Could try that.

I was learning socket programming; it's quite fun. I'm going to do it with threading soon so I can start downloading another file before one is finished.

Right now though I'm doing command line arguments.
$ ./get.py http://cplusplus.com/forum/lounge/15031/page1.html
Read from http://cplusplus.com/forum/lounge/15031/page1.html, write to ./get.py
Done. File written.

Uh oh!
Last edited on
To 500!

Eh, I'd have to agree with helios on this:
I think you're spending too much time reinventing wheels.


It's not really helpful to anyone, and someone else has probably done it better then you.
Probably; but I'm not doing it to be competitive I'm doing it for fun and to learn :l
That's like saying you shouldn't bother writing a hello world program, or a simple calculator, or whatever, because it's not helpful and someone else has probably done it better than you...

"Mighty oaks from little acorns grow."
Last edited on
Don't get me wrong. I don't think there's anything wrong with reinventing wheels with the purpose of learning, but you should make sure you're actually learning. This program-thing you've written... Judging from your past posts, I don't think you've learnt anything from it. The main thing in it are these three lines:
1
2
3
inFile  = urlopen(file_locator)
outFile = open(location, "w+")
outFile.write(inFile.read())

Wow. That's an eye opener right there.
Hm; but as I quoted above, everything large starts as something small. I was always going to expand it and make it better. It works with threads now; so its faster. I also added command line arguments.

You have a good point though; the whole program is essentially those three lines and some user interfacing. I'll find another way to download files so I do more myself.

I was planning to change the method anyway; the way it is now it loads the entire file into memory and then writes it to the hard drive. I want to do it in chunks so I don't accidentally the whole RAM...

I just noticed
EDIT: Actually, no. You need to learn to use the tools you already have.

I don't understand, what do you mean?
Last edited on
By preachy, I meant that they tend to disregard other people's beliefs and assert their own as being the most important. I also hate how Christians try to convert people; same as Mormons and Jehovah's Witnesses, but on a larger scale.


Well, when you believe that you are the only true religion .... also converting people ish part of our religion too :P
I don't accidentally the whole RAM...
ಠ_ಠ

I don't understand, what do you mean?
Never mind.
Well, when you believe that you are the only true religion ....

In what way is atheism a religion? The whole point is atheism, meaning "without theism".

Atheism can be either the rejection of theism,[1] or the position that deities do not exist.[2] In the broadest sense, it is the absence of belief in the existence of deities.[3]

The term atheism originated from the Greek ἄθεος (atheos), meaning "without gods"


also converting people is part of our religion too :P

I don't try to convert people; and neither should anyone. People should follow their own head and if they can't then they aren't people; they're more like animals. Dogs do everything they're told by a superior, the whole point of people is to be different than animals in that respect -- we're meant to have a free will aside from our instincts and what we're told to do. We're meant to be able to think freely. Religion puts a huge block on free thinking; a Roman doctor called Galen pretty much held back medicinal technology for 1500 years (not his intention, it was the Church's fault) because his ideas were adopted by the Church and no-one was allowed to build on them. Most of them were wrong.

I don't accidentally the whole RAM...
ಠ_ಠ

By loading a too-big file into memory I'd accidentally (fill up) the whole RAM and there'd be none left for anyone else.
Last edited on
eh, deleting my post. I don't want to cause a ruckus on a C++ forum :)
Last edited on
People following their own head, in my opinion, are where the problem lies. You can't just do whatever you want in life. There are consequences, boundaries, that if crossed will unravel society. That is what we are seeing now. We live in an age were society is systematically dismantling morals and common sense so that they can "think with their own head." There is almost no such thing as a one income family anymore. The family is collapsing, divorce runs rampid, and marriage has become nothing more than a business arrangement. Children are allowed to think on their own from age 6 and make all the wrong choices which further proliferates the decay.

You misunderstand me. People still need boundaries (laws, rules, etc.). Religions and governments just tend to impose too many of them.

I agree with virtually all of what you said; particularly about marriage. If all the intelligent women who are able to find work do; then children will be raised by those who are unintelligent -- they don't have the brains to work (this is assuming that all of the intelligent women have jobs; I'm not saying women are unintelligent, so don't misunderstand me). If children are raised by unintelligent parents they will tend to be unintelligent themselves. So you have a national (or even global) decay in intelligence.

My wording isn't very good above so take it with a grain of salt.
Religions and governments just tend to impose too many of them.


I agree with you on government. Goverment meddles in too many personal matters... which is increasingly becoming an issue in the US. I guess the problem with Religions lie in the way they impose their beliefs on others. Instead of making people aware of their beliefs and why they are so, it comes across more as a mass judgement.
That's perfect;
s the problem with Religions lie in the way they impose their beliefs on others.
.
My point exactly.
Pages: 1... 678910... 15