background preloader

Tutorial - Controlling The Real World With Computers

For One Tiny Instant, Physicists May Have Broken a Law of Nature This image of a full-energy collision between gold ions shows the paths taken by thousands of subatomic particles produced during the impact. For a brief instant, it appears, scientists at Brook­haven National Laboratory on Long Island recently discovered a law of nature had been broken. Action still resulted in an equal and opposite reaction, gravity kept the Earth circling the Sun, and conservation of energy remained intact. But for the tiniest fraction of a second at the Relativistic Heavy Ion Collider (RHIC), physicists created a symmetry-breaking bubble of space where parity no longer existed. Parity was long thought to be a fundamental law of nature. Now this law appears to have been broken by a team of about a dozen particle physicists, including Jack Sandweiss, Yale's Donner Professor of Physics. It was the equally gargantuan magnetic field produced by the plasma — the strongest ever created — that alerted the physicists that one of nature's laws might have been broken.

How to be a Programmer: A Short, Comprehensive, and Personal Summary Debugging is the cornerstone of being a programmer. The first meaning of the verb to debug is to remove errors, but the meaning that really matters is to see into the execution of a program by examining it. A programmer that cannot debug effectively is blind. Idealists that think design, or analysis, or complexity theory, or whatnot, are more fundamental are not working programmers. Debugging is about the running of programs, not programs themselves. To get visibility into the execution of a program you must be able to execute the code and observe something about it. The common ways of looking into the ‘innards’ of an executing program can be categorized as: Using a debugging tool, Printlining --- Making a temporary modification to the program, typically adding lines that print information out, and Logging --- Creating a permanent window into the programs execution in the form of a log. Some beginners fear debugging when it requires modifying code. How to Understand Performance Problems

What Does Your Body Language Say About You? How To Read Signs and Recognize Gestures - Jinxi Boo - Jinxi Boo Art by LaetitziaAs we all know, communication is essential in society. Advancements in technology have transformed the way that we correspond with others in the modern world. Because of the constant buzz in our technological world, it's easy to forget how important communicating face-to-face is. When conversing old-school style, it's not only speech we verbalize that matters, but what our nonverbal gestures articulate as well. Body language is truly a language of its own. We all have quirks and habits that are uniquely our own. 10% from what the person actually says40% from the tone and speed of voice50% is from their body language. Lowering one's head can signal a lack of confidence. Pushing back one's shoulders can demonstrate power and courageOpen arms means one is comfortable with being approached and willing to talk/communicate

The Basics of C Programming" The previous discussion becomes a little clearer if you understand how memory addresses work in a computer's hardware. If you have not read it already, now would be a good time to read How Bits and Bytes Work to fully understand bits, bytes and words. All computers have memory, also known as RAM (random access memory). float f; This statement says, "Declare a location named f that can hold one floating point value." While you think of the variable f, the computer thinks of a specific address in memory (for example, 248,440). f = 3.14; The compiler might translate that into, "Load the value 3.14 into memory location 248,440." There are, by the way, several interesting side effects to the way your computer treats memory. int i, s[4], t[4], u=0; for (i=0; i<=4; i++) { s[i] = i; t[i] =i; } printf("s:t\n"); for (i=0; i<=4; i++) printf("%d:%d\n", s[i], t[i]); printf("u = %d\n", u); The output that you see from the program will probably look like this: s:t 1:5 2:2 3:3 4:4 5:5 u = 5 s[1000000] = 5;

Ask a Mathematician / Ask a Physicist | Your Math and Physics Questions Answered C++ Programming/Exercises/Iterations Iterations[edit] Solutions requirements Solutions must: Use only standard C++.Be compilable.Be in accordance to general coding practices. and should: Handle error situations, even if behavior is not defined. Please do not add solutions that are 99% similar to another that is already present, if it is an improvement just add it to the existing solution. EXERCISE 1[edit] Write a program that asks the user to type an integer and writes "YOU WIN" if the value is between 56 and 78 (both included). int main() {int i; cout << "Type all numbers between 58 and 73: " << endl; cin>>i; if (i>=58 && i<=78) { cout << "YOU WIN" << i << endl; else cout<<"YOU LOSE!" EXERCISE 2[edit] Write a program that asks the user to type all the integers between 8 and 23 (both included) using a for loop. Solution Alternative solution by Bartosz Radwanski //Alternative solution by Bartosz Radwanski//This one allows the numbers to be entered in random order and exits//when all correct numbers have been entered. Alternate solution

Color Psychology by David Johnson Like death and taxes, there is no escaping color. It is ubiquitous. Yet what does it all mean? Colors often have different meanings in various cultures. Black Black is the color of authority and power. White Brides wear white to symbolize innocence and purity. Red The most emotionally intense color, red stimulates a faster heartbeat and breathing. The most romantic color, pink, is more tranquilizing. Blue The color of the sky and the ocean, blue is one of the most popular colors. Green Currently the most popular decorating color, green symbolizes nature. Yellow Cheerful sunny yellow is an attention getter. Purple The color of royalty, purple connotes luxury, wealth, and sophistication. Brown Solid, reliable brown is the color of earth and is abundant in nature. Colors of the Flag In the U.S. flag, white stands for purity and innocence. Food for Thought While blue is one of the most popular colors it is one of the least appetizing.

"Perl for Newbies" - Part 1 - The Perl Beginners' Site Strings and data structures that are unlimited in size, nested to any depth. Powerful syntax and built-in functions. Extended, built-in support for regular expressions. Support for namespaces, classes, and objects. Perl was introduced in 1987 (4 years before Linux itself), when the author, Larry Wall, released version 1.000 of it. Since then, perl has seen several versions, each adding additional functionality. perl version 5, which was released in 1994, was a complete re-write of the perl interpreter, and introduced such things as hard references, modules, objects and lexical scoping. Perl became especially popular as a language for writing server-side scripts for web-servers. Links: Perl is interpreted, so no compilation is needed. After you are done, you should invoke the perl interpreter with the name of the file you created. At the command line (and press Enter). The fact that the program was executed does not mean it does what you want it to do. The neophyte "Hello World!" and

Machine Guns and Gun Systems" In the 1800s, gun manufacturers designed a number of mechanisms to address the problems associated with limited firing ability. A lot of these early machine guns combined several barrels and firing hammers into a single unit. Among the most popular designs was the Gatling gun, named after its inventor Richard Jordan Gatling. This weapon -- the first machine gun to gain widespread popularity -- consists of six to 10 gun barrels positioned in a cylinder. Each barrel has its own breech and firing pin system. Each firing pin has a small cam head that catches hold of a slanted groove in the gun's body. The Gatling gun played an important role in several 19th century battles, but it wasn't until the early 20th century that the machine gun really established itself as a weapon to be reckoned with. The Gatling gun is often considered a machine gun because it shoots a large number of bullets in a short amount of time. Recoil systemsBlowback systemsGas mechanisms

The 50 Best Registry Hacks that Make Windows Better We’re big fans of hacking the Windows Registry around here, and we’ve got one of the biggest collections of registry hacks you’ll find. Don’t believe us? Here’s a list of the top 50 registry hacks that we’ve covered. It’s important to note that you should never hack the registry if you don’t know what you’re doing, because your computer will light on fire and some squirrels may be injured. Also, you should create a System Restore point before doing so. Otherwise, keep reading. Prevent Windows Update from Forcibly Rebooting Your Computer We’ve all been at our computer when the Windows Update dialog pops up and tells us to reboot our computer. There’s a couple of ways that we can disable this behavior, however. Prevent Windows Update from Forcibly Rebooting Your Computer How to Clean Up Your Messy Windows Context Menu One of the most irritating things about Windows is the context menu clutter that you have to deal with once you install a bunch of applications. Disable Aero Shake in Windows 7

Psychological ("personality") Types Psychological ("personality") Types According to Jung's theory of Psychological Types we are all different in fundamental ways. One's ability to process different information is limited by their particular type. These types are sixteen. People can be either Extroverts or Introverts, depending on the direction of their activity ; Thinking, Feeling, Sensing, Intuitive, according to their own information pathways; Judging or Perceiving, depending on the method in which they process received information. Extroverts vs. Extroverts are directed towards the objective world whereas Introverts are directed towards the subjective world. Sensing vs. Sensing is an ability to deal with information on the basis of its physical qualities and its affection by other information. Thinking vs. Thinking is an ability to deal with information on the basis of its structure and its function. Perceiving vs. Perceiving types are motivated into activity by the changes in a situation. ENTp , ISFp , ESFj , INTj , ENFj

Related: