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 | |
/* | |
* Use these methods to create automatic properties. When a property would be accessed, | |
* PHP will look for a function prefixed with get, set, isset, or unset followed by | |
* the property name with the first name capitalized. For example, the $this->name | |
* would be accessed as getName(), setName(), issetName(), and unsetName(). | |
*/ | |
/** |
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 | |
/** | |
* Merge an associative array into a string template. | |
* | |
* @param string $template | |
* @param array $mergeFields | |
* @return string | |
*/ | |
function stringFromTemplate($template, $mergeFields) |
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
table.clean { | |
margin-top: 20px; | |
border-collapse: collapse; | |
} | |
table.clean caption { | |
font-weight: bold; | |
font-size: 14px; | |
line-height: 18px; | |
margin-bottom: 10px; |
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>Hello, World!</title> | |
<meta charset="utf-8" /> | |
</head> | |
<body> | |
<h1>Hello, World!</h1> | |
</body> | |
</html> |
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 | |
/** | |
* Given an ordered array of comparison functions, return one function that | |
* starts with the first and uses the subsequent functions in order in the | |
* event of equal items. | |
* | |
* @param $sortFnArr | |
* @param int $index | |
* @return callable |
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 RequestHeaders | |
* | |
* Static class to facilitate looking up request headers. | |
*/ | |
class RequestHeaders | |
{ | |
/** |
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
// Create a new thread inside your Actvity. | |
Thread thread = new Thread() { | |
@Override | |
public void run() { | |
// Block this thread for 2 seconds. | |
try { | |
Thread.sleep(2000); | |
} catch (InterruptedException e) { |
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
/** Return the distance between two points */ | |
public static double distance(float x1, float y1, float x2, float y2) { | |
return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2)); | |
} |
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
/*global alert, app, prompt, ExportOptionsSaveForWeb, ExportType, File, Folder, ResampleMethod, SaveDocumentType, SaveOptions */ | |
/////////////////////////////////////////////////////////////////////////////// | |
// Android Multiple Density Export.jsx | |
// | |
// Photoshop JavaScript to automate exporting Android resources at multiple | |
// densities using the 3:4:6:8:12 scaling ratio. | |
// | |
// | |
// Installation: |
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
# Find External IP Address | |
curl icanhazip.com | |
# Install Composer | |
curl -sS https://getcomposer.org/installer | php |
OlderNewer