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 Weixin { | |
| public function __construct($postStr) { | |
| if( !empty($_GET['echostr']) && $this->check_signature() ) { | |
| echo $_GET['echostr']; | |
| return; | |
| } | |
| if( empty($postStr) ) { |
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
| //Which is the better way? Perform FS read during response.write or independently? | |
| //Read during response write | |
| response.write(function() { | |
| fs.readFile('./index.html', function (error, html) { | |
| if (error) { | |
| throw error; | |
| } else { | |
| return html; | |
| } | |
| }); |
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 | |
| $init = memory_get_usage(); | |
| $time = microtime(); | |
| echo "method 1 (unset): " . $init . "<br />"; | |
| $array = array(); | |
| for($i = 0; $i < 1000; $i += 1) { | |
| $array[] = 'string'; | |
| } | |
| echo "after setup: " . memory_get_usage() . "<br />"; | |
| unset($array); |
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 | |
| add_action( 'registered_post_type', 't5_silent_flush_cpt', 10, 2 ); | |
| add_action( 'registered_taxonomy', 't5_silent_flush_tax', 10, 3 ); | |
| /** | |
| * Flush rules for custom post types. | |
| * | |
| * @wp-hook registered_post_type | |
| * @param string $post_type | |
| * @param stdClass $args |
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
| Edu is a platform to teach and learn content. We focus on enhancing the teaching style to help students learn better. We have virtual classrooms that are set up to allow students to ask questions directly and more intimately. We have blackboard drawing video to help systems to do more than just powerpoint presentation, but reach out to students in a more friendly way. | |
| Students can go through various kinds of tests such as flash cards or quizzes to earn credit for their learning style. and they can also give feedback to teachers about improving their teaching style. | |
| Best of all, we are build to extend. Different courses have different demands because they target to teach different content, we can provide an open source platform and framework for other developers to extend the platform by building new plugins to fit their need. | |
| Important and Urgent | |
| - Interface Design | |
| - Database Connection |
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 xiaoxiaoURL($_GET['url']); | |
| function xiaoxiaoURL($url) { | |
| $base64 = array( | |
| 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', | |
| 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', | |
| 'j', 'k', 'l', 'z', 'x', 'c', 'v', 'b', | |
| 'n', 'm', '0', '9', '8', '7', '6', '5' | |
| ); |
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
| <system.webServer> | |
| <rewrite> | |
| <rules> | |
| <rule name="Rewrite PHP" stopProcessing="true"> | |
| <match url="(.*)" /> | |
| <conditions logicalGrouping="MatchAll"> | |
| <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
| <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> | |
| <add input="{REQUEST_FILENAME}" negate="true" pattern="(.*).php" /> | |
| </conditions> |
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 processURL($originalURL, $array) { | |
| $base = "http://example.com"; | |
| $avail = ""; | |
| $link = new mysqli($host, $user, $pass, $daba); | |
| if(mysqli_connect_errno()) { | |
| die("Connection failed" . mysqli_connect_error()); | |
| } |
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
| Angelas-Mac:~ angelazou$ sudo npm install -g express@latest | |
| Password: | |
| npm http GET https://registry.npmjs.org/express | |
| npm http 200 https://registry.npmjs.org/express | |
| npm http GET https://registry.npmjs.org/express/-/express-3.0.6.tgz | |
| npm http 200 https://registry.npmjs.org/express/-/express-3.0.6.tgz | |
| npm http GET https://registry.npmjs.org/range-parser/0.0.4 | |
| npm http GET https://registry.npmjs.org/mkdirp/0.3.3 | |
| npm http GET https://registry.npmjs.org/cookie/0.0.5 | |
| npm http GET https://registry.npmjs.org/buffer-crc32/0.1.1 |