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 | |
| $f3 = require 'lib/base.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
| class Game | |
| loop:0 | |
| started: Date.now(); | |
| start: -> | |
| window.requestAnimationFrame(this.step()) | |
| step:-> | |
| console.log 'test' | |
| this.loop += 1 | |
| if (this.started+1000<Date.now()) | |
| console.log this.loop |
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
| public $parents = array(); | |
| function loadParent($post=NULL){ | |
| if ($post === NULL) $post = $this; | |
| $post->parents[] = $post; | |
| if (!$post->d_rootId){ | |
| return $post; | |
| }else{ | |
| $return=$post->findone(['d_id = ?',$post->d_rootId]); | |
| return $this->loadParent($return); | |
| } |
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
| public $parents = array(); | |
| function loadParent($rootID=NULL){ | |
| $rootID = $rootID ?: $this->d_rootId; | |
| $parent = $this->findone(['d_id = ?', $rootID]); | |
| $this->parents[] = $parent; | |
| if (!$parent->d_rootId) | |
| return 'test'; | |
| else | |
| $this->loadParent($parent->d_rootId); | |
| } |
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
| /*===========================================================*/ | |
| /* Button | |
| /*===========================================================*/ | |
| if ( !function_exists('sdesigns_button') ) { | |
| function sdesigns_button( $atts, $content = null ) { | |
| $defaults = array( | |
| 'to' => '#', | |
| 'type' => 'normal' | |
| ); |
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
| /** | |
| * Read Book button. | |
| */ | |
| $('.read-book-button').on('click', function(event){ | |
| event.preventDefault(); | |
| if ( !sameIds ) { | |
| var id = $(this).data('id'); | |
| $.ajax({ |
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
| function sdesigns_ajax_bookblock_function(){ | |
| $download_id = $_POST['id']; | |
| $output = ''; | |
| if ( $_POST['sameIds'] ) { | |
| $args = array( | |
| 'post_type' => 'book', | |
| 'posts_per_page' => -1, | |
| 'order' => 'ASC' | |
| ); |
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
| <img id="ad" src="http://aka-cdn-ns.adtechus.com/images/5205_gamezone_source_728x90_r1.jpg" alt="Adtech Ad" border="0"/> | |
| <script type="text/javascript"> | |
| (function(){ | |
| 'use strict'; | |
| var container = window.parent.document.getElementById('focus-enclose'), | |
| ad = document.getElementById('ad'); | |
| if (ad&&container) | |
| container.style.height = ad.offsetHeight+'px'; | |
| })(); | |
| </script> |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Observer Pattern</title> | |
| </head> | |
| <body> | |
| <div id="game-names"></div> | |
| <script type="text/javascript"> | |
| function Observable(){ | |
| var that = {}, |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Observer Pattern</title> | |
| </head> | |
| <body> | |
| <div id="game-names"></div> | |
| <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
| <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script> | |
| <script type="text/javascript"> |
OlderNewer