This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wordpress/wp-admin/custom-background.php:112 The method take_action() has an NPath complexity of 864. The configured NPath complexity threshold is 200. | |
wordpress/wp-admin/custom-background.php:179 The method admin_page() has an NPath complexity of 432. The configured NPath complexity threshold is 200. | |
wordpress/wp-admin/custom-header.php:196 The method take_action() has an NPath complexity of 224. The configured NPath complexity threshold is 200. | |
wordpress/wp-admin/custom-header.php:448 The method step_1() has an NPath complexity of 544896. The configured NPath complexity threshold is 200. | |
wordpress/wp-admin/custom-header.php:655 The method step_2() has an NPath complexity of 112320. The configured NPath complexity threshold is 200. | |
wordpress/wp-admin/custom-header.php:802 The method step_3() has an NPath complexity of 1244160. The configured NPath complexity threshold is 200. | |
wordpress/wp-admin/includes/ajax-actions.php:189 The function wp_ajax_autocomplete_user() has an NPath complexity of 2400. The configu |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wordpress/wp-admin/custom-background.php:112 The method take_action() has a Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10. | |
wordpress/wp-admin/custom-background.php:179 The method admin_page() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10. | |
wordpress/wp-admin/custom-header.php:196 The method take_action() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10. | |
wordpress/wp-admin/custom-header.php:448 The method step_1() has a Cyclomatic Complexity of 29. The configured cyclomatic complexity threshold is 10. | |
wordpress/wp-admin/custom-header.php:655 The method step_2() has a Cyclomatic Complexity of 24. The configured cyclomatic complexity threshold is 10. | |
wordpress/wp-admin/custom-header.php:802 The method step_3() has a Cyclomatic Complexity of 27. The configured cyclomatic complexity threshold is 10. | |
wordpress/wp-admin/includes/ajax-actions.php:123 The function wp_ajax_wp_compression_test() has a Cycl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT nspname || '.' || relname AS "relation", pg_size_pretty(pg_relation_size(C.oid)) AS "size" | |
FROM pg_class C | |
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) | |
WHERE nspname NOT IN ('pg_catalog', 'information_schema') | |
ORDER BY pg_relation_size(C.oid) DESC | |
LIMIT 20; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo ("foo" == 0)?"foo equals 0\n":"foo does not equal 0\n"; // prints "foo equals 0" | |
echo ("foo" == true)?"foo equals true\n":"foo does not equal true\n"; // prints "foo equals true" | |
echo (true == 0)?"true equals 0\n":"true does not equal 0\n"; // prints "true does not equal 0" | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
var_dump(null == 0); // evaluates to true | |
var_dump(null < -1); // this also evaluates to true | |
// so, how can some predefined value be equal to 0 as well as be less than -1? | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Largest product in a grid | |
Problem 11 | |
In the 20×20 grid below, four numbers along a diagonal line have been marked in red. | |
08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 | |
49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 | |
81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65 | |
52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Problem 10: Summation of primes | |
* The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. | |
* Find the sum of all the primes below two million. | |
* | |
* Uses GMP - http://www.php.net/manual/en/book.gmp.php | |
*/ | |
for($prime=2, $sum=0; $prime < 2000000; $sum+=$prime, $prime=gmp_intval(gmp_nextprime($prime))); | |
echo "Sum of all prime numbers < 2 million is: $sum"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Problem 9: Special Pythagorean triplet | |
* A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, | |
* a^2 + b^2 = c^2 | |
* For example, 3^2 + 4^2 = 9 + 16 = 25 = 5^2. | |
* | |
* There exists exactly one Pythagorean triplet for which a + b + c = 1000. | |
* Find the product abc. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Problem 8: Largest product in a series | |
* Find the greatest product of five consecutive digits in the 1000-digit number: | |
* 73167176531330624919225119674426574742355349194934 | |
* 96983520312774506326239578318016984801869478851843 | |
* 85861560789112949495459501737958331952853208805511 | |
* 12540698747158523863050715693290963295227443043557 | |
* 66896648950445244523161731856403098711121722383113 | |
* 62229893423380308135336276614282806444486645238749 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Problem 7: 10001st prime | |
* By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. | |
* What is the 10001st prime number? | |
* | |
* Uses GMP - http://www.php.net/manual/en/book.gmp.php | |
*/ | |
for($count = 0, $prime=0; $count < 10001; $prime=gmp_intval(gmp_nextprime($prime)), $count++); | |
echo "10001st prime number is: $prime"; |