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 | |
| // This file walks you through the most common features of PHP's SQLite3 API. | |
| // The code is runnable in its entirety and results in an `analytics.sqlite` file. | |
| // Create a new database, if the file doesn't exist and open it for reading/writing. | |
| // The extension of the file is arbitrary. | |
| $db = new SQLite3('analytics.sqlite', SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE); |
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 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| <title>Untitled Document</title> | |
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> | |
| <script type="text/javascript"> | |
| //------------------------------------------------- | |
| // youtube playlist jquery plugin |
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
| 301 moved permanently (redirect): | |
| <?php | |
| header('HTTP/1.1 301 Moved Permanently'); | |
| header('Location: http://www.example.com'); | |
| die(); | |
| ?> | |
| 302 moved temporarily(redirect): | |
| <?php | |
| header('Location: http://www.example.com'); |
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
| {"series":[{"name":"how i met your mother","id":"1504912239"}],"genres":[]} |
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
| // (Really Simple) PID Class by Ivan Seidel | |
| // GitHub.com/ivanseidel | |
| // Use as you want. Leave credits | |
| class PID{ | |
| public: | |
| double error; | |
| double sample; | |
| double lastSample; |
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
| /** | |
| * Indents a flat JSON string to make it more human-readable. | |
| * | |
| * http://www.daveperrett.com/articles/2008/03/11/format-json-with-php/ | |
| */ | |
| function json_indent($json) | |
| { | |
| $result = ''; | |
| $pos = 0; | |
| $strLen = strlen($json); |
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 Curl { | |
| public function get($url){ | |
| $ch = curl_init($url); | |
| curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
| $result = curl_exec($ch); |
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
| /*___________________________________________________________________________________________________________________________________________________ | |
| _ jquery.mb.components _ | |
| _ _ | |
| _ file: jquery.mb.YTPlayer.src.js _ | |
| _ last modified: 11/05/17 19.54 _ | |
| _ _ | |
| _ Open Lab s.r.l., Florence - Italy |
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
| var tag = document.createElement('script'); | |
| tag.src = "https://www.youtube.com/iframe_api"; | |
| var firstScriptTag = document.getElementsByTagName('script')[0]; | |
| firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); | |
| var player; | |
| function onYouTubeIframeAPIReady() { | |
| var autoPlayVideo = jQuery.session.get("autoPlayVideo"); | |
| jQuery.session.set("autoPlayVideo", '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
| $('.youtube').click(function(){ | |
| $vid = $(this).attr('data-id'); | |
| $(this).find('img').remove(); | |
| $(this).addClass('active'); | |
| $(this).append('<iframe src="https://www.youtube.com/embed/'+$vid+'?autoplay=1&rel=0" allowfullscreen></iframe>'); | |
| }) | |
| в шаблоне: |
NewerOlder