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 ImageManipulator | |
| { | |
| /** | |
| * @var int | |
| */ | |
| protected $width; | |
| /** | |
| * @var int |
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 Redirects for .htaccess | |
| #Redirect a single page: | |
| Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
| #Redirect an entire site: | |
| Redirect 301 / http://www.domain.com/ | |
| #Redirect an entire site to a sub folder | |
| Redirect 301 / http://www.domain.com/subfolder/ |
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
| /////////////////////////////////////////////////////////////////////////////////////// | |
| // This program uses the ESP8266 Wifi module to access a webpage. It's an adaptation of | |
| // the program discussed at http://hackaday.io/project/3072/instructions | |
| // and shown here http://dunarbin.com/esp8266/retroBrowser.ino . | |
| // | |
| // This program was ported to the ZPUino 2.0, a softcore processor that runs on an FPGA | |
| // and emulates an Arduino. | |
| // | |
| // This program works with version 00160901 of the ESP8266 firmware. | |
| /////////////////////////////////////////////////////////////////////////////////////// |
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 trimSvgWhitespace() { | |
| // get all SVG objects in the DOM | |
| var svgs = document.getElementsByTagName("svg"); | |
| // go through each one and add a viewbox that ensures all children are visible | |
| for (var i=0, l=svgs.length; i<l; i++) { | |
| var svg = svgs[i], | |
| box = svg.getBBox(), // <- get the visual boundary required to view all children |
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
| The Y-axis in an SVG document points towards the bottom of the page, that is the Y value increases the further down the page | |
| you go. When positioning items in a maths or physics context however it is more appropriate to have the Y-axis pointing up | |
| the page like a normal coordinate system. We can provide an affine transformation matrix to a g element's transform | |
| attribute that flips the Y-axis for its children. | |
| Let the value of the viewBox attribute of the document's SVG element equal "0 0 w h". Suppose we want a coordinate system | |
| whose origin is at the centre of the viewbox and whose Y-axis points up to the top of the page. | |
| (0, 0) | |
| O_ _ _ _ _ _ _ _\ X (Default SVG coordinate system/frame) |
OlderNewer