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 | |
| class PrimeFactors { | |
| /** | |
| * @param $number | |
| * @return array | |
| */ | |
| public function generate($number) | |
| { | |
| $primes = []; | |
| for ($candidate = 2; $number > 1; $candidate++) |
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
| { | |
| "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
| "default_line_ending": "unix", | |
| "draw_white_space": "all", | |
| "ensure_newline_at_eof_on_save": true, | |
| "fallback_encoding": "UTF-8", | |
| "font_size": 14, | |
| "ignored_packages": | |
| [ | |
| "Vintage" |
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
| set $boost ""; | |
| set $boost_query "_"; | |
| if ( $request_method = GET ) { | |
| set $boost G; | |
| } | |
| if ($http_cookie !~ "DRUPAL_UID") { | |
| set $boost "${boost}D"; | |
| } |
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
| location ^~ /system/files/ { | |
| rewrite ^ /index.php; | |
| } |
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 | |
| function themename_preprocess_page(&$variables) { | |
| if (!empty($variables['node'])) { | |
| $variables['theme_hook_suggestions'][] = 'page__node__' . $variables['node']->type; | |
| } | |
| } | |
| ?> | |
| <?php |
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
| #inline-block { | |
| display: -moz-inline-stack; | |
| display: inline-block; | |
| vertical-align: middle; | |
| *vertical-align: auto; | |
| zoom: 1; | |
| *display: inline; | |
| } |
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
| .hide-text { | |
| text-indent: 100%; | |
| white-space: nowrap; | |
| overflow: hidden; | |
| } |
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
| // ---------------------------------------------------------- | |
| // A short snippet for detecting versions of IE in JavaScript | |
| // without resorting to user-agent sniffing | |
| // ---------------------------------------------------------- | |
| // If you're not in IE (or IE version is less than 5) then: | |
| // ie === undefined | |
| // If you're in IE (>=5) then you can determine which version: | |
| // ie === 7; // IE7 | |
| // Thus, to detect IE: | |
| // if (ie) {} |
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 | |
| /** | |
| * Implements hook_custom_theme(). | |
| */ | |
| function mysite_custom_theme() { | |
| // An array of themes for each day of the week. | |
| // These themes have to be installed and enabled. | |
| $themes = array(); | |
| $themes[0] = 'garland'; | |
| $themes[1] = 'bartik'; |
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
| 【最费脑力的14部电影】 | |
| 1、《盗梦空间》 | |
| 2、《记忆裂痕》 | |
| 3、《生死停留》 | |
| 4、《死亡幻觉》 | |
| 5、《禁闭岛》 | |
| 6、《穆赫兰道》 | |
| 7、《蝴蝶效应》 | |
| 8、《恐怖游轮》 | |
| 9、《伤城》 |
NewerOlder