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
<div class="snowman"> | |
<div class="head"> | |
<div class="eyes"> | |
<div class="eye left"></div> | |
<div class="eye right"></div> | |
</div> | |
<div class="nose"> | |
<div class="inner"></div> | |
</div> | |
<div class="mouth"> |
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 | |
/** | |
* A simple fix for a shell execution on preg_match('/[0-9]\.[0-9]+\.[0-9]+/', shell_exec('mysql -V'), $version); | |
* The only edit that was done is that shell_exec('mysql -V') was changed to mysql_get_server_info() because not all | |
* systems have shell access. XAMPP, WAMP, or any Windows system might not have this type of access. mysql_get_server_info() | |
* is easier to use because it pulls the MySQL version from phpinfo() and is compatible with all Operating Systems. | |
* @link http://www.magentocommerce.com/knowledge-base/entry/how-do-i-know-if-my-server-is-compatible-with-magento | |
* @author Magento Inc. | |
*/ |
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 | |
/** | |
* A simple regex to test whether or not a facebook url is valid. For basic usage, this will do the job. | |
* @see Test cases <http://ideone.com/ZMJp4f> | |
*/ | |
$fbUrlCheck = '/^(https?:\/\/)?(www\.)?facebook.com\/[a-zA-Z0-9(\.\?)?]/'; | |
$secondCheck = '/home((\/)?\.[a-zA-Z0-9])?/'; | |
$validUrl = 'https://www.facebook.com/atomicpages/'; | |
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
<p>Add an unlimited number of items to the navigation and the spacing will <em>always</em> fit the given viewport.</p> | |
<p class="warning">This is <strong>not</strong> compatible < IE 8</p> | |
<div class="wrapper"> | |
<nav class="container"> | |
<div class="nav inner"> | |
<ul> | |
<li><a href="#">Foo</a></li> | |
<li><a href="#">Foo</a></li> | |
<li><a href="#">Foo</a></li> | |
<li><a href="#">Foo</a></li> |
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 Log | |
* A really simple logging class that writes flat data to a file. | |
* @author Dennis Thompson | |
* @license MIT | |
* @version 1.0 | |
* @copyright AtomicPages LLC 2014 | |
*/ |
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 Instagram | |
* A simple class that connects to the Instagram API without the overhead | |
* of other classes. This class depends on cURL being installed on your OS | |
* and it MUST be enabled in PHP. If you're not sure if it's enabled, you can | |
* run phpinfo() and search for cURL. | |
* @author Dennis Thompson | |
* @license MIT |
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 CouldNotConnectDatabaseException | |
* @author Dennis Thompson | |
* @license MIT | |
* @version 1.0 | |
*/ | |
class CouldNotConnectDatabaseException extends Exception { |
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 FileNotFoundException | |
* @author Dennis Thompson | |
* @license MIT | |
* @version 1.0 | |
*/ | |
class FileNotFoundException extends Exception { |
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
import java.util.Scanner; | |
import java.io.PrintWriter; | |
import java.io.File; | |
public class Prog3b { | |
public static void main(String[] args) { | |
System.out.println("Program 3, Dennis Thompson, masc001"); | |
if(args.length != 2) { | |
System.err.println("Usage: java Prog3b infileName outfileName"); |
OlderNewer