## Discuz 和phpwind 的循環抄

phpwind 作為後起之秀, 很多地方借鑑了Discuz! 而在最近, 因為SNS 的興起, 雙方的版本更新甚快, 而對於SNS 的新功能, 甚至出現循環抄的情況。

Discuz 的X-Space 可以說有了的SNS 的初步結構, 但名正言順的產品卻是ucenter home。在初期, 原全複製Facebook 的介面做出來的uch 令人眼前一亮之餘, 也令我想到, SNS 這東西容納如此多的競爭者嗎?

## Quick Inspirations

Over-estimation of value is usually due to supposing equal importance.

Under-estimation of value is usually due to supposing equal unimportance.

1. 我喜歡吃甜品
2. 我喜歡睡覺
3. 我喜歡玩遊戲王
4. 我喜歡下載盜版軟件

1. 我不喜歡吃辣
2. 我不喜歡捱通宵
3. 我不喜歡工作
4. 我不喜歡共產黨

## .htaccess - Allow Only By Referer

Good afternoon-

I have browsed the forums as well as the web looking for an answer to this question. Hope someone out there can help.

I need to create a .htaccess file that will only allow the files in the folder to be seen if the "referer" is from a particular site (or possibly two sites). I have found a lot of solutions out there for people who want to block specific sites, but I can't seem to figure out how to only allow specific sites. I have done some trial and error based on some of the things I have found, but with no luck.

Any ideas?

David

－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－

ANS:

Hi David,

Welcome to the forums

I haven't tested it, but try;

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_REFERER} !^http://www\.your_domain_name\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://www\.OKdomain1\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://www\.OKdomain2\.com/ [NC]
RewriteRule ^.*\$ http://www.your_domain_name.com/not_allowed_here.htm [R=301,L]

or I'd try something along those lines anyway - with the not_allowed_here.htm being a page I redirected all those I don't want to.

## 亞貝的天堂template 分享(三欄, 灰)

body{
color:#333
}
.indexBlock{margin: 5px 440px 5px 0px;}
.cateitem{display:block; width:100px; padding:3px 0 0 20px; float:left; background:url("http://grok.lsu.edu/images/category.png") no-repeat;}
.navPanel{width:20px; height:10px; overflow:hidden; position:fixed; opacity:0.7; top:0%; right:50%}
.navPanel:hover{width:100px; height:auto; overflow:hidden}
.buttons a{clear:both}
#rbindexbutton{display:none}

.selected{background:url("http://www.foxlingo.com/img/icons/selected.png") no-repeat;font-weight:bold}
a,
a:visited,
a:active {color: #666;text-decoration: underline;}
a:hover {	color: #999;background: none;}
.sidebar{width:420px; border-left:none}
.content{margin:0 -440px 0 0}
.cussidebar{float:right; width:200px}

.syssidebar{border-right:1px #999 dashed; border-left:1px #999 dashed;float:left; width:200px; padding:0 5px}
.navPanel{background:#DDD}

## Best Programming Jokes

How can you tell when a programmer has had sex?

When he’s washing the pepper spray out of his eyes.
~~~~~~~~~~~~~~~~~~~~~~~~~
Two bytes meet.  The first byte asks, “Are you ill?”
The second byte replies, “No, just feeling a bit off.”

~~~~~~~~~~~~~~~~~~~~~~~~~
Eight bytes walk into a bar.  The bartender asks, “Can I get you anything?”
“Yeah,” reply the bytes.  “Make us a double.”
~~~~~~~~~~~~~~~~~~~~~~~~~
Q. How did the programmer die in the shower?
A. He read the shampoo bottle instructions: Lather. Rinse. Repeat.
~~~~~~~~~~~~~~~~~~~~~~~~~
How many programers dose it take to change a light bulb?
None – It’s a hardare problem
~~~~~~~~~~~~~~~~~~~~~~~~~
Why do programmers always mix up Halloween and Christmas?
Because Oct 31 equals Dec 25.
~~~~~~~~~~~~~~~~~~~~~~~~~
There are only 10 kinds of people in this world: those who know binary and those who don’t.
~~~~~~~~~~~~~~~~~~~~~~~~~
A programmer walks to the butcher shop and buys a kilo of meat.  An hour later he comes back upset that the butcher shortchanged him by 24 grams.
~~~~~~~~~~~~~~~~~~~~~~~~~
“Knock, knock.”
“Who’s there?”
very long pause….
“Java.”
~~~~~~~~~~~~~~~~~~~~~~~~~
Programming is 10% science, 20% ingenuity, and 70% getting the ingenuity to work with the science.
~~~~~~~~~~~~~~~~~~~~~~~~~
Programming is like sex:
One mistake and you have to support it for the rest of your life.
~~~~~~~~~~~~~~~~~~~~~~~~~
A man is smoking a cigarette and blowing smoke rings into the air.  His girlfriend becomes irritated with the smoke and says, “Can’t you see the warning on the cigarette pack?  Smoking is hazardous to your health!”
To which the man replies, “I am a programmer.  We don’t worry about warnings; we only worry about errors.”
~~~~~~~~~~~~~~~~~~~~~~~~~
There are three kinds of lies: Lies, damned lies, and benchmarks.
~~~~~~~~~~~~~~~~~~~~~~~~~
A programmer is walking along a beach and finds a lamp.  He rubs the lamp, and a genie appears.  “I am the most powerful genie in the world.  I can grant you any wish, but only one wish.”
The programmer pulls out a map, points to it and says, “I’d want peace in the Middle East.”
The genie responds, “Gee, I don’t know.  Those people have been fighting for millenia.  I can do just about anything, but this is likely beyond my limits.”
The programmer then says, “Well, I am a programmer, and my programs have lots of users.  Please make all my users satisfied with my software and let them ask for sensible changes.”
At which point the genie responds, “Um, let me see that map again.”
~~~~~~~~~~~~~~~~~~~~~~~~~
All programmers are playwrights, and all computers are lousy actors.
~~~~~~~~~~~~~~~~~~~~~~~~~
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.
~~~~~~~~~~~~~~~~~~~~~~~~~
The generation of random numbers is too important to be left to chance.
~~~~~~~~~~~~~~~~~~~~~~~~~
“I just saw my life flash before my eyes and all I could see was a close tag…”
~~~~~~~~~~~~~~~~~~~~~~~~~
The computer is mightier than the pen, the sword, and usually, the programmer.
~~~~~~~~~~~~~~~~~~~~~~~~~
Debugging: Removing the needles from the haystack.
~~~~~~~~~~~~~~~~~~~~~~~~~
Two strings walk into a bar and sit down. The bartender says, “So what’ll it be?”
The first string says, “I think I’ll have a beer quag fulk boorg jdk^CjfdLk jk3s d#f67howe%^U r89nvy~~owmc63^Dz x.xvcu”
“Please excuse my friend,” the second string says, “He isn’t null-terminated.”
~~~~~~~~~~~~~~~~~~~~~~~~~
From the Random Shack Data Processing Dictionary:
Endless Loop: n., see Loop, Endless.
Loop, Endless: n., see Endless Loop.
~~~~~~~~~~~~~~~~~~~~~~~~~
The three most dangerous things in the world are a programmer with a soldering iron, a hardware engineer with a software patch, and a user with an idea.  – The Wizardry Compiled by Rick Cook
~~~~~~~~~~~~~~~~~~~~~~~~~
One hundred little bugs in the code
One hundred little bugs.
Fix a bug, link the fix in,
One hundred little bugs in the code.
~~~~~~~~~~~~~~~~~~~~~~~~~
A computer science student is studying under a tree and another pulls up on a flashy new bike.  The first student asks, “Where’d you get that?”
The student on the bike replies, “While I was studying outside, a beautiful girl pulled up on her bike.  She took off all her clothes and said, ‘You can have anything you want’.”
The first student responds, “Good choice!  Her clothes probably wouldn’t have fit you.”
~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~~
CIA – Computer Industry Acronyms
CD-ROM: Consumer Device, Rendered Obsolete in Months
PCMCIA: People Can’t Memorize Computer Industry Acronyms
ISDN: It Still Does Nothing
SCSI: System Can’t See It
MIPS: Meaningless Indication of Processor Speed
DOS: Defunct Operating System
WINDOWS: Will Install Needless Data On Whole System
OS/2: Obsolete Soon, Too
PnP: Plug and Pray
APPLE: Arrogance Produces Profit-Losing Entity
IBM: I Blame Microsoft
MICROSOFT: Most Intelligent Customers Realize Our Software Only Fools Teenagers
COBOL: Completely Obsolete Business Oriented Language
LISP: Lots of Insipid and Stupid Parentheses
MACINTOSH: Most Applications Crash; If Not, The Operating System Hangs
AAAAA: American Association Against Acronym Abuse.
WYSIWYMGIYRRLAAGW: What You See Is What You Might Get If You’re Really Really Lucky And All Goes Well.
~~~~~~~~~~~~~~~~~~~~~~~~~
Funny Error Messages
~~~~~~~~~~~~~~~~~~~~~~~~~
God as a Programmer
~~~~~~~~~~~~~~~~~~~~~~~~~
Computer Stupidities
~~~~~~~~~~~~~~~~~~~~~~~~~
Comedy Code is syntactically correct programming code written just for fun.  The code doesn’t actually have to do anything if it’s executed, but it should look like regular code.
~~~~~~~~~~~~~~~~~~~~~~~~~
Why computers are like men:

1. In order to get their attention, you have to turn them on.
1. They have a lot of data, but are still clueless.
1. They are supposed to help you solve problems, but half the time they are the problem.
1. As soon as you commit to one, you realize that if you had waited a little longer, you could have had a better model.
Why computers are like women:
1. No one but the Creator understands their internal logic.
1. The native language they use to communicate with other computers is incomprehensible to everyone else.
1. Even your smallest mistakes are stored in long-term memory for later retrieval.
1. As soon as you make a commitment to one, you find yourself spending half your paycheck on accessories for it.
~~~~~~~~~~~~~~~~~~~~~~~~~
Laws of Computer Programming
1. Any given program, when running, is obsolete.
1. Any given program costs more and takes longer.
1. If a program is useful, it will have to be changed.
1. If a program is useless, it will have to be documented.
1. Any program will expand to fill available memory.
1. The value of a program is proportional to the weight of its output.
1. Program complexity grows until it exceeds the capabilities of the programmer who must maintain it.
1. Any non-trivial program contains at least one bug.
1. Undetectable errors are infinite in variety, in contrast to detectable errors, which by definition are limited.
1. Adding manpower to a late software project makes it later.
~~~~~~~~~~~~~~~~~~~~~~~~~
• Lubarsky’s Law of Cybernetic Entomology: There’s always one more bug.
• Shaw’s Principle: Build a system that even a fool can use, and only a fool will want to use it.
• Woltman’s Law: Never program and drink beer at the same time.
• Gallois’ Revelation: If you put tomfoolery into a computer, nothing comes out but tomfoolery. But this tomfoolery, having passed through a very expensive machine, is somehow enobled, and no one dares to criticize it.
A programmer finds himself in front of a committee that decides whether he should go to Heaven or Hell.  The committee tells the programmer he has a say in the matter and asks him if he wants to see either Heaven or Hell before stating his preference.
“Sure,” the programmer replies.  “I have a pretty good idea what Heaven is like, so let’s see Hell.”  So an angel takes the programmer to a sunny beach, full of beautiful women in skimpy bikinis playing volleyball, listening to music and having a great time.  “Wow!” he exclaims, “Hell looks great!  I’ll take Hell!”
Instantly the programmer finds himself in red-hot lava with demons tearing at his flesh.  “Where’s the beach?  The music?  The women?” he screams frantically to the angel.
“That was the demo,” the angel replies as she vanishes.
~~~~~~~~~~~~~~~~~~~~~~~~~
Jesus and Satan have an argument as to who is the better programmer.  This goes on for a few hours until they come to an agreement to hold a contest with God as the judge.  They set themselves before their computers and begin.  They type furiously, lines of code streaming up the screen, for several hours straight.
Seconds before the end of the competition, a bolt of lightning strikes, taking out the electricity.  Moments later, the power is restored, and God announces that the contest is over.  He asks Satan to show his work.  Visibly upset, Satan cries and says, “I have nothing.  I lost it all when the power went out.”
“Very well,” says God, “let us see if Jesus has fared any better.”
Jesus presses a key, and the screen comes to life in vivid display, the voices of an angelic choir pour forth from the speakers.
Satan is astonished.  He stutters, “B-b-but how?!  I lost everything, yet Jesus’ program is intact!  How did he do it?”
God chuckles, “Everybody knows… Jesus saves.”
~~~~~~~~~~~~~~~~~~~~~~~~~
Redneck Computer Terms
LOG ON: Makin’ a woodstove hot.
LOG OFF: Don’t add no more wood.
MONITOR: Keepin’ an eye on the wood stove.
MEGA HERTZ: When you’re not keerfull gittin’ the farwood.
FLOPPY DISC: Whutcha git from trying to tote too much farwood.
RAM: That thar thing whut splits the farwood.
HARD DRIVE: Gittin’ home in the winter time.
WINDOWS: Whut to shut when it’s cold outside.
SCREEN: Whut to shut when it’s black fly season.
BYTE: Whut them dang flys do.
CHIP: Munchies fer the TV.
MICRO CHIP: Whut’s in the bottom of the munchie bag.
MODEM: Whutcha do to the hay fields.
DOT MATRIX: Old Dan Matrix’s wife.
LAP TOP: Whar the kitty sleeps.
KEYBOARD: Whar you hang the dang truck keys.
SOFTWARE: Them dang plastic forks and knifes.
MOUSE: Whut eats the grain in the barn.
MOUSE PAD: That’s hippie talk fer the mouse hole.
MAINFRAME: Holds up the barn roof.
PORT: Fancy Flatlander wine.
ENTER: Northerner talk fer, “C’mon in, y’all.”
CLICK: Whut you hear when you cock your gun.
DOUBLE CLICK: When the dang gun don’t far when you pull the trigger.
REBOOT: Whut you have to do at bedtime when you forgot the kitty’s still outside.
~~~~~~~~~~~~~~~~~~~~~~~~~
Software Development Cycles
1. Programmer produces code he believes is bug-free.
1. Product is tested. 20 bugs are found.
1. Programmer fixes 10 of the bugs and explains to the testing department that the other 10 aren’t really bugs.
1. Testing department finds that five of the fixes didn’t work and discovers 15 new bugs.
1. Repeat three times steps 3 and 4.
1. Due to marketing pressure and an extremely premature product announcement based on overly-optimistic programming schedule, the product is released.
1. Users find 137 new bugs.
1. Original programmer, having cashed his royalty check, is nowhere to be found.
1. Newly-assembled programming team fixes almost all of the 137 bugs, but introduce 456 new ones.
1. Original programmer sends underpaid testing department a postcard from Fiji. Entire testing department quits.
1. Company is bought in a hostile takeover by competitor using profits from their latest release, which had 783 bugs.
1. New CEO is brought in by board of directors. He hires a programmer to redo program from scratch.
1. Programmer produces code he believes is bug-free…
~~~~~~~~~~~~~~~~~~~~~~~~~
Top 10 phrases spoken by a Klingon Programmer
1. A TRUE Klingon Warrior does not comment his code!
1. By filing this bug report you have challenged the honor of my family.  Prepare to die!
1. You question the worthiness of my code?  I should kill you where you stand!
1. Our competitors are without honor!
1. Specifications are for the weak and timid!
1. This machine is GAGH!  I need dual Pentium processors if I am to do battle with this code!
1. Perhaps it IS a good day to die!  I say we ship it!
1. Our users will know fear and cower before our software!  Ship it!  Ship it and let them flee like the dogs they are!
1. My program has just dumped Stova Core!
1. Behold, the keyboard of Kalis!  The greatest Klingon code warrior that ever lived!
~~~~~~~~~~~~~~~~~~~~~~~~~
The programmer compiled an array of reasons as to why he can’t find a girlfriend with a good <HEAD> on her <BODY>, reason 0 being that he has limited cache.  So he searches his memory to recall connecting to the TCP/IP tunnel of his last girlfriend — sometimes even without a secure socket.  His last girlfriend always complained about his lack of comments. He fumed, “I hate commenting!”  Realizing it was a program requirement, he told her she had nice bits.  This resulted in a Syntax Error.  Now she demanded a massage, but this was rejected as “Feature Creep.”  He smacked her back-end and shouted, “Who’s your parent node?!”  He scanned for open ports.  He attempted to install a backdoor worm but her response was 403.  While his data uploaded into her input device, she considered terminating the process.  But instead she initiated a Do While loop where she recalled a previous boyfriend with a larger pointer.  To expedite the routine routine, she screamed, “Hack into my system! Hack deep into my system! You’re 1337, baby!”  This caused his stack to overflow, and he shot his GUI on her interface.  (Source)
~~~~~~~~~~~~~~~~~~~~~~~~~
What’s the difference between drug dealers and computer programmers?

 Drug Dealers Computer Programmers Refer to their clients as “users”. Refer to their clients as “users”. “The first one’s free!” “Download a free trial version…” Have important South-East Asian connections (to help move the stuff). Have important South-East Asian connections (to help debug the code). Strange jargon: “Stick,” “Rock,” “Dime bag,” “E”. Strange jargon: “SCSI,” “RTFM,” “Java,” “ISDN”. Realize that there’s tons of cash in the 14- to 25-year-old market. Realize that there’s tons of cash in the 14- to 25-year-old market. Job is assisted by the industry’s producing newer, more potent mixes. Job is assisted by industry’s producing newer, faster machines. Often seen in the company of pimps and hustlers. Often seen in the company of marketing people and venture capitalists. Their product causes unhealthy addictions. DOOM. Quake. SimCity. Duke Nukem 3D. ‘Nuff said. Do your job well, and you can sleep with sexy movie stars who depend on you. Damn! Damn! DAMN!!!

~~~~~~~~~~~~~~~~~~~~~~~~~