|
2004/5/31 [Uncategorized] UID:30502 Activity:nil |
5/29 [ hi, killing parts of threads is bad. entire thing nuked. have a nice day. ] |
2004/5/31 [Computer/SW/Languages/Perl] UID:30503 Activity:insanely high |
5/30 Let's say I have a directory full of subdirectories, each of which has a number of files in it. How can I delete all subdirectories that have, say, less than 10 files in them? \_ fewer \_ There's no single standard command that will do this. You'll need to write something that will count files per directory, make a list of targets and pass that to rm. \_ might the "find" command help? \_ That is one part of one possible solution. What I would do is write the whole thing in perl. Perl has a built in find-like function, can opendir() and readdir(), and allow you to easily maintain state and lists of target dirs. It's a simple two phase process: 1) make target list, 2) kill targets. Obviously, you'll want to test your code in a test directory or you risk removing the wrong files. \_ mosquito. SLEDGEHAMMER! <BABAMMMM!!!!!!> \_ Uhm, yeah, the following are any different? \_ Exactly 80 chars: for(grep{!/^\.\.?$/&&-d}<*>){opendir D,$_;unlink if@{[readdir D]}<12;closedir D} --dbushong \_ More than 80 chars: sub z{my @a=`find $_[0] -type d -maxdepth 1 -mindepth 1`;chomp @a;@a}; for (z(".")) { print "$_\n" if scalar(z($_))>$n; } # --darin \_ A bit shorter and more correct: use File::Path; for(grep{-d}<*>){rmtree $_ if <$_/*> < 10} --dbushong \_ I don't think this works. scalar(<$_/*>) does not return the file count. In any event, the script deleted stuff it wasn't supposed to and didn't delete stuff it should. Good \_ I don't think this works. scalar(<$_/*>) does not return the file count. In any event, the script deleted stuff it wasn't supposed to and didn't delete stuff it should. Good thing I backed up. -- op \_ Yeah, it needs @{[ ]} around it like mconst's... but use his. And yeah, anytime there's a "shortest perl" contest on the motd, Caveat Executor. --dbushong \_ @{[<$_/{.,}*>]}<12&&`rm -r \Q$_`for<*> # --mconst \- hmm, there are some interesting ways to do this ... the exact details vary slightly based on things like, are all the dirs only one deep, do you count sub-subdirs are files etc. i think it is better to do this modularly rather than trying to save characters. here is one different approach: find -type f | xargs -n 1 dirname | sort | uniq -c | egrep -v '[0-9][0-9]' | grep / there are some obvious shortcuts or changes to make more robust [e.g. if there are spaces in name], if you are going to do this once or mutiple times, performance etc. [yes i know the dirname call is expensive ... that can be replaced, but if this is a one shot thing, debugging time is more expensive than machine cycles]. --psb \-and it admittedly relied on a hack to deal with the "less than 10 part" ... but all this is easily remedied. --psb |
2004/5/31 [Computer/SW/Security] UID:30504 Activity:high |
5/31 Is there a way in Windows XP to make particular files or directories password protected. This would be so that someone could you the administrator account, but not be able to access particular directories without reentering the password. \_ http://www.google.com/search?q=password+protected+folders+windows \_ EFS or pgpdisk. EFS key mgt. is ass, pgpdisk costs money. -John \_ any tips on using EFS and managing keys well for it? Can you just put your key in lots of places (and depend on the password), e.g. on your webservers, to not lose it? Not as secure, true, but I'm mostly interested in a casual thief stealing my laptop and getting my financial records. (anyone who really wants them has probably already broken into them anyway...) -!op \_ http://www.cypherix.com/index.htm I have never used it, but it claims to be free. Let me know if it works. |
2004/5/31-6/1 [Reference/RealEstate] UID:30505 Activity:high |
5/31 Occasionally I can feel drum beat in my apartment. I can't find the source but I can feel it, what is the best way to deal with this problem? Should I blast back, tell the manager (already tried once but she didn't seem to care), or what? \_ play electric guitar really loud, when a drummer comes and knockks and wants to start a band, kill him. \_ Won't work. Anyone can play guitar, but drummers are in demand. \_ is it at 3 in the morning? 'cause otherwise, just deal. You live in an apartment. One of the disadvantages of sharing walls with others is that you can occasionaly hear them. Jeesh. (you will live a longer and healthier life if you learn not to let stuff like this slide. Also, people will like you more.) \_ yea... there's MANY things worse you could be hearing through the walls.... \_ Keep trying to track it--you'll find it eventually. Then, ask nicely. Then, ask nastily. Then, move. \_ If a little thumping bugs him so much, it's hopeless. It's a part of apartment life. He can't even locate it. How bad can it be? Of course the manager ignored him. \_ I once heard my neighbors having sex. She was a blonde, cute ex-cheerleader. He was a balding, geeky English teacher. Never since have I experienced something so sexy and revolting at the same time. \_ Well, I hope she at least got an A. \_ Or at least an 'O'. \_ Sexy, revolting and strangely appealing as it gave hope to you. \_ Get 2 microphones feeding into different channels of a stereo connector and feed it into your computer. Set up the 2 mics maybe 10 feet apart. Then when he's drumming record the feed into your computer. If you view the wave, you can see a drum beat arrive at one mic a little sooner than the other one by comparing the two stereo channels in a sound editor. By varying the position of the mics, arrange them to maximize the difference in sound arrival time. The line between the 2 mics will point at the drummer. If you move the whole setup and repeat the process you can triangulate his position. \_ What if he's above/below you? -John \_ Let me correct myself. You can actually get the most accurate directional measurement by rotating the mics so that the sound arrives at them at the same time. This won't tell you what side of the arrangement the sound comes from, but with 44kHz recording you can resolve about 1/3" of distance difference, and with mics a yard apart, that can resolve the angle of origin to within about 1% of a radian. \_ Why go to all that trouble? Get a gun, let your neighbors know you have a gun and that you're pissed off at the asshole with the drum, and you just might shoot him in the head. \_ Excellent idea! You probably won't be hearing drumbeats in your jail cell. |
2004/5/31 [Uncategorized] UID:30506 Activity:nil |
5/32 Anyone considered raising alpacas? http://Alpacainfo.com |
2004/5/31 [Computer/SW/Mail] UID:30507 Activity:high |
5/31 What's up with the NNTP server? I haven't been able to read my newsgroups in 2 days. \_ I assume agate is among the computers affected by the planned power outage. Can anyone confirm? \_ ping agate |
2004/5/31 [Reference/History/WW2/Japan, Reference/History/WW2/Germany] UID:30508 Activity:insanely high |
5/31 Memorial Day question. Rather than launching D-Day, invading Der Vatherland, and getting thousands and thousands of our GIs killed (esp. on Omaha Beach), why didn't we just strike a deal with the Axis in order to save more lives? What exactly did we gain from unconditional surrender? German gold? (not really) German art? (no) German women? (maybe) German technology? (yes) \_ Part of it was prior commitments to the Russians. The Allies were trying to prevent the Eastern Front from collapsing. Of course you may argue that by 1944, it wasn't going to collapse regardless of what the Allies did. Part of it was probably realpolitik considerations -- the cost of invading Europe was deemed acceptable given the influence the US would achieve in the post-war world on the continent. The US didn't want to leave the entire Europe to the Russians. You may note the US never invaded Japan -- the costs outweighed the benefits there. -- ilyas \_ Ummm... we were sure PLANNING to invade Japan, the only reason we didn't was because to A-bomb worked so well. \_ Of course we did. I claim the US would not have invaded even without the A-bomb. The US would have negotiated a surrender. The invasion was simply not worth it. Invasion planning is something the military guys do, because it is their job. The call of whether to invade or not rests with the politicians and if their heads are on straight, they make the right call. -- ilyas \_ The US was not just planning but was going through all the motions required to do so. I know guys who were in holding areas waiting for the final word to load up in boats and head to the main land. They wrote their letters home and expected to die until it was called off after the bomb was dropped. \_ DAMN STRAIGHT!! Actually, I don't think it's clear either way. It bothers me that 99% of people are certain that the A-BOMB was neccesary to end the war. I think it's an open question with valid points on either side. \_ There are different ways to end a war. Some are better than others. A simple cessation of fighting without a change in leadership like post-WWI Germany only sets everyone up for round 2. \_ It all depends on whether Japan/Germany would be willing to surrender. Threat of invasion made for a stronger case. So did the defeat of Germany. \_ I respectfully disagree. As I recall, the Japanese had already offered to surrender, on the condition that the Emperor be allowed to keep his position. However, removing the emperor and forcing him to admit his not-godhood is basically what permenantly destroyed the Japanese empire. It's kinda like what would happen to the middle east if we could kick Mohammed's butt and force him to admit that he isn't really a prophet. There just wouldn't be much reason to fight anymore. \_ How long has this been up here? This is wrong. There is *still* a Japanese emporer. The Japanese had *not* offered to surrender. After the bombs were dropped, they surrendered WITH the above condition (that the emprorer be allowed to keep his position). Jeesh, and the guy below thinks that everyone here should know why we launched D-Day. -phuqm \_ You should. It was only one of the most important military and possibly non-military history events in the last 100+ years. It only formed the world as we know it today. Maybe you think who Britney is dating is more important? \_ Wow phuqm. I'm really impressed you signed your name to a statement showing such amazing ignorance. Offer of Japanese surrender rejected: http://csua.org/u/7j9 Note that it mentions that the Emporer would be subject to the American military commander. The Emperor surrendered UNCONDITIONALY after the A-bomb. In other words, he gave up the throne. MacArthur allowed him to continue as emperor, but the magic was gone. Now he was just some dude. So, in conclusion, there is still an emperor, but he is no longer a demi-god. -jrleek \_ Is this a lame troll or are you just a product of the American edjumuhkayshunal system? \_ Because after spending years villifying the Germans and Japanese in an attempt to cajole the United States public into believing that WWII was a just cause, FDR became a victim of his own propaganda. There was just no way politically that the United States would have accepted less than victory over "the Hun" especially when it seemed so close at hand. \_ well said well said. everything above is boring junk until this. |
2004/5/31 [Health, Health/Men, Politics/Domestic/Crime] UID:30509 Activity:high |
5/31 http://www.economist.com/world/europe/displayStory.cfm?story_id=2709203 The article itself isn't that great, but at the end is the amusing fact: "Now that the police routinely test offenders for drugs, they are noticing that certain chemicals seem to be associated with certain types of crime. One Home Office study of 3,000 arrestees found that those pulled in for burglary and shoplifting were more likely to test positive for heroin than anyone else. Muggers and purse-snatchers, though, were most likely to be cocaine or crack users." -So, know your area's drug of choice, and prepare! \_ The pot heads don't commit crimes? Stuck at home on the couch without the will to go rip someone off? \_ Sounds like the beginning of a drug dealer infomercial. "Are you a pot head? Stuck at home? Just can't get up the enery to go out and mug someone? Then Crack Cocaine may be energy to go out and mug someone? Then Crack Cocaine may be for you! Ask your local drug dealer about Crack Cocaine. Side affects may include heart attack and a "hanging around with butt holes" sensation. |
2004/5/31-6/1 [Computer/HW/Display, Computer/HW/Drives] UID:30510 Activity:high |
5/31 On average what is the power consumption of modern computer components? I'll start with my estimates, you correct/add as needed: Pentium 4: 80W 200G IDE HD: 10W Video Card: 10W ? Mine has a fan on it MB: 15W? Mine has a fan on it How about transformer? Misc? \_ Latest video cards from ATI and Nvidia draw 80-100W MB: 15W? Mine has a fan on it How about transformer? Misc? \_ There are techie websites out there with all this info. \_ urlP \_ uhm, #t \_ You've lowballed a bunch of those numbers. |
2004/5/31-6/1 [Computer/HW/Drives] UID:30511 Activity:high |
5/31 Under XP, is being prompted to run fdisk during boot >50% of the \_ I assume you meant chkdisk? Sorry, was in real-OS mode. -John _/ time a sign of a failing HD? I tried this several times, with not much luck. The drive's not making any noises out of the ordinary, and my bios has just recently started giving me disk read errors (no boot at all). -John \_ Yes. Your HD is fucked. dd to another drive, do not collect $200 and do not pass go. Drives are cheap. Data is expensive. \_ Was. It's dead. Nothing of import on it. -John \_ And you bothered us with the report of your dead HD because..? Did you want to hear about the excessive wear on my new ties or how my tv remote control buttons are wearing out? \_ No, I want you to eat the peanuts out of my shit while I try to drill into your thick skull that there may be a possibility that I discovered the drive was dead by some other means after posting the question, and thought I would leave it for the benefit of others in case somebody posted some informative help. Bite me. -John |
2004/5/31-6/1 [Academia/Berkeley/CSUA/Motd] UID:30512 Activity:very high |
5/31 Does soad have more than its fair share of haters or does an anonymous motd just make it seem so? \_ People revert to pretty juvenile behavior when anonymous. So what? That's life. \_ I don't see any hate thread today. Can you be more specific? \_ not talking particularly about today, just in general. \_ No, people are just people. Anonymity allows people to say what they were already thinking. Suppression of speech, Berkeley-style, does not suppress thought. \_ signing your name wouldn't suppress your speech--just make you responsible for it. -tom \_ when the cost of that responsibility is too high, it becomes suppression. one has the right to say all sorts of things but if one's name was attached to them a lot of things one has the right to say can still destroy a career, get one arrested or a bunch of other bad things. when the burden of responsibility for speech rises to the point where it can ruin the speaker's life, speech is no longer free. as someone who has nothing to lose you wouldn't understand that. \_ That's pretty sad. If you are that fearful of what you say, why bother saying it? That's not external supression. That's introspection. I've never said anything publicly that I wouldn't own up to. Keep a diary if you're that worried. --scotsman \_ Or supression of speech, Catholic Church style, or Miss Manners style or however. \_ Miss Manners? Do you ever read her column? She doesn't say you shouldn't say what you're thinking. She says you should say it in such a way as to leave the other person with no response (thus preventing escalation) yet without making yourself look like a barbarian. The Catholic Church hasn't been able to shut anyone up since Luther. I don't know why you're picking on them. They've had their day. \_ You have successfully read 100% the opposite of what I intended into what I said. I think I was clear enough. It is your thinking that is muddled. The suppression of speech Miss Manners style does not suppress thought. Is that really too complicated a concept for you? \_ everyone suppresses speech to an extent from rush limbaugh to the aclu.. from george w. bush to osama bin laden.. \_ I see you agree with me. |
2004/5/31-6/1 [Recreation/Computer/Games] UID:30513 Activity:kinda low |
5/31 I've decided to give in and try out DDR. I have a PS2, what should I get? DDR? DDRMax? What's the difference? \_ DDR == PSone, DDRMax == PS2. i am selling my Ignition 2.0 pads (two of them). e-mail if you are interested. --jwang \_ Throw away $2 in the arcade first. \_ I'd rather rent or buy a used copy than embarrass myself in the arcades. :) \_ Well, don't forget you need a dance pad as well. The cheap ones run about $20. What's the problem with arcades? No one there will know you, or care for that matter. I've seem plenty of newbies play. \_ Exactly. I was going to say, make sure to get good pads, that makes a huge difference. The Ignitions are good, someone else posted another company that makes similar ones for half the price (~$50). There are some differences between Max and the older (PS1) versions, I'd suggest getting Max if you have a PS2 anyway. Look at the online reviews re: song selection, etc. |
2004/5/31-6/1 [Computer/HW/Drives] UID:30514 Activity:nil |
5/31 In XP, how can I preserve the date of a file when I drag and drop a file from my hard drive to a DVD-RW using Explorer? I checked the parameters for xcopy, but didn't see any options. Is there a way to do it natively? If not, are there any good 3rd party utilities? \_ Nero? \_ Xcopy? CLI dos xcopy? It can preserve dates. \_ Which parameter? None of them seem to be for preserving the date. I know /a didn't work. |
2004/5/31 [Recreation/Dating] UID:30515 Activity:nil |
5/31 I need some porn. Where can I download some video/pic? \_ Me too, I need some free porn to cheer me up on a lonely memorial day! |
2004/5/31-6/1 [Recreation/Dating] UID:30516 Activity:moderate |
6/1 <DEAD>match.yahoo.com<DEAD> is a scam. 1/2 of the listings keep appearing over and over again (over 1 year) and the other 1/2 are fake, they send you a generic letter saying that they're interested, and before you know it, they are 1) spamming you with porn sites or 2) refering you to other match sites. I'm never gonna sign up on internet scam match again. \_ Try craigslist. At least some people there are genuine. \_ Cool, so this one chick gave you the contact info for lots of other hot chicks? That's great! What's it cost to sign up?! \_ http://www.anastasiaweb.com \_ http://www.anastasiaweb.com/russian-brides/ads-015.htm "Profession: Other". Classic. -John \_ Get yer ugly mits off the keyboard! That's *my* next wife! |
2004/5/31-6/1 [Politics/Foreign/Asia/Japan, Reference/History/WW2/Japan] UID:30517 Activity:high |
5/31 According to the History Channel, in WW2, the Japanese targetted mainly at big targets (battleships, cruisers, military airfields, etc) so didn't really hit civilian ships (food, support, etc) the way Germans did with their U-boats. In contrast the US targetted a lot of Japanese civilian sites. Why didn't the Japanese do the same thing? Were they afraid of retaliation or something? \_ The Japanese couldn't. The Japanese correctly determined that they needed to destroy the American carriers first, which they failed to do (while losing theirs) at Midway. Before Midway, they didn't have the control of the seas necessary to target infrastructure. After Midway, they had bigger problems. -- ilyas \_ They had control of the seas prior to June 1942, and used it to attack any infrastructure they could (Philippines, India, Singapore, Australia, China, etc.) Fact is that there wasn't nearly as much commercial or large-scale civilian shipping in the western Pacific for them to attack. As for the carriers, imperial naval war games had seen their destruction as a "nice to have", but weren't particularly concerned when they realized that Adm. Kimmel had ordered them out of Pearl Harbor. The Japanese advances in 1942 were more focused on securing a buffer "rampart" against American attacks on Japanese oil transports from the Dutch E. Indies than the actual offensive destruction of US power after 1941. Midway was just another attempt to deny the US a forward base, rather than part of a strategic offensive against US shipping or the W. Coast. -John \_ There was shipping, it's just that after the Japanese simultaneously attacked Pearl Harbor, Malaya, Dutch E. Indies and the Philippines, all civilian shipping in the Western Pacific, South China Sea and the Strait of Melaka, except those serving Japanese interest, pretty much stopped. I would bet there were still some ships going from India to Australia, and from Australia to the US though. the US though. Also, the Japanese had their hands full protecting their own shipping, and did have have protecting their own shipping, and did not have have the resources to send uboats all over the Pacific and Indian Oceans. Compared to Germany, Japan is much less self sufficient in terms of resources. \_ Hence "not nearly as much". The Japanese also never had a coherent submarine strategy. -John \_ Because most of the fighting took place in their waters. \_ Don't forget what the Japanese did in Korea and China. \_ also Burma and the Philippines. \_ The Japanese didn't have the resources. They were fighting a land war in Asia and they couldn't forward base any naval power (as America would be able to do in Austrailia). Attacks against America were limited to military targets out of necessity. Attempts to strike the US mainland were nearly non-existant. The goal was to control the Pacific, not to conquer the US. |
3/15 |