Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Briefly, what is the difference between symmetric (single-key) and asymmetric (public-key or public/private-key) cryptography?
- In Object Oriented programming, what is your favorite design pattern, and why? Some example design patterns are singletons, factories, and facades.
- The following regular expression is supposed to match an IP address. What is wrong with it? Can you improve it?
- /[0-9]+.[0-9]+.[0-9]+.[0-9]+/
- Can the following code's performance be increased at all, without changing the basic algorithm? If so, how? If not, why? Can you tell me what this function calculates?
- <?
- function someFunction($n) {
- $x = $n;
- $i = 0;
- while (true) {
- $i = $i + 1;
- if ($i == 5)
- break;
- $x = $x + $n*(1/$x);
- $x = 1/2 * $x;
- }
- return $x;
- }
- ?>
Add Comment
Please, Sign In to add comment