This file contains 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 | |
// root path | |
$path = realpath('.'); | |
// finds everything in $path including root directory | |
$objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST); | |
$success = 0; | |
$error = 0; | |
$skipped = 0; |
This file contains 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 | |
// root path | |
$path = realpath('.'); | |
// finds everything in $path including root directory | |
$objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST); | |
// each objects as $file if echo $file files will be printed | |
foreach($objects as $file => $object){ | |
// if the extension is '.jpg' |
This file contains 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 | |
// open the current directory (change this to modify where you're looking) | |
$dir = opendir('.'); | |
// loop through all the files in the directory | |
while (false !== ($file = readdir($dir))) | |
{ | |
// if the extension is '.jpg' | |
if (strtolower(pathinfo($file, PATHINFO_EXTENSION)) == 'html') | |
{ |
This file contains 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 | |
// open the current directory (change this to modify where you're looking) | |
$dir = opendir('.'); | |
$i = 1; | |
// loop through all the files in the directory | |
while (false !== ($file = readdir($dir))) | |
{ | |
// if the extension is '.jpg' |
This file contains 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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>CSS slide out menu</title> | |
<link rel="stylesheet" href="css/main.css"> | |
<script src="js/jquery.js"></script> | |
<script> |
This file contains 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 watch id references the current `watchAcceleration` | |
var watchID = null; | |
// Wait for device API libraries to load | |
// | |
document.addEventListener("deviceready", onDeviceReady, false); | |
// device APIs are available | |
// | |
function onDeviceReady() { |
This file contains 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 canvas_ctx; // HTML canvas 2d context | |
var ax = 0; // Acceleration x axis (Accelerometer value adjusted for direction) | |
var ay = 0; // Acceleration y axis (Accelerometer value adjusted for direction) | |
var x; // Circle x position | |
var y; // Circle y position | |
var vx = 0; // Velocity x axis | |
var vy = 0; // Velocity y axis | |
var WIDTH = 320; // Width of canvas | |
var HEIGHT = 300; // Height of canvas | |
var RADIUS = 10; // Width of circle object |
This file contains 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
window.requestFileSystem | |
( | |
LocalFileSystem.PERSISTENT, | |
512000, | |
function(fs) | |
{ | |
fs.root.createReader().readEntries | |
( | |
function(entries) | |
{ |
This file contains 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
document.addEventListener("deviceready", onDeviceReady, false); | |
// PhoneGap is ready | |
// | |
function onDeviceReady() { | |
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, fail); | |
} | |
function onFileSystemSuccess(fileSystem) { | |
fileSystem.root.getDirectory("Music", {create: false, exclusive: false}, getDirSuccess, fail); |
NewerOlder