Skip to content

Instantly share code, notes, and snippets.

View ButlerFuqua's full-sized avatar

Butler Fuqua ButlerFuqua

View GitHub Profile
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
<hr />
<br>
<br>
<button>Button</button>
<!-- Materialize CSS with fallback -->
<script>
function fallbackMaterialize() {
var mLink = document.createElement('LINK');
mLink.setAttribute('rel', 'stylesheet');
mLink.setAttribute('href', 'assets/css/materialize.css');
document.querySelector('head').appendChild(mLink);
}
</script>
wp_nav_menu(array(
'theme_location' => 'primaryNavigation',
'container_id' => 'navbarResponsive', // Add id to ul container
'container_class' => 'collapse navbar-collapse', // Add class to ul container
'menu_class' => 'menu navbar-nav ml-auto', // Add class to ul
));
wp_nav_menu(array(
'theme_location' => 'primaryNavigation',
/**
* Outputs a modified comment markup.
*
*
* @see wp_list_comments()
*
* @param WP_Comment $comment Comment to display.
* @param int $depth Depth of the current comment.
* @param array $args An array of arguments.
## O(1) Constant
```py
FindMin(x, y) {
if (x < y) {
return x
}
else {
return y
}
BinarySearch(numbers, low, high, key) {
if (low > high)
return -1
mid = (low + high) / 2
if (numbers[mid] < key) {
return BinarySearch(numbers, mid + 1, high, key)
}
else if (numbers[mid] > key) {
return BinarySearch(numbers, low, mid - 1, key)
Partition(numbers, lowIndex, highIndex) {
// Pick middle element as pivot
midpoint = lowIndex + (highIndex - lowIndex) / 2
pivot = numbers[midpoint]
done = false
while (!done) {
// Increment lowIndex while numbers[lowIndex] < pivot
while (numbers[lowIndex] < pivot) {
lowIndex += 1
SelectionSort(numbers, numbersSize) {
i = 0
j = 0
indexSmallest = 0
temp = 0 // Temporary variable for swap
for (i = 0; i < numbersSize - 1; ++i) {
// Find index of smallest remaining element
indexSmallest = i
InsertionSort(numbers, numbersSize) {
i = 0
j = 0
temp = 0 // Temporary variable for swap
for (i = 1; i < numbersSize; ++i) {
j = i
// Insert numbers[i] into sorted part
// stopping once numbers[i] in correct position
while (j > 0 && numbers[j] < numbers[j - 1]) {
InsertionSortInterleaved(numbers, numbersSize, startIndex, gap) {
i = 0
j = 0
temp = 0 // Temporary variable for swap
for (i = startIndex + gap; i < numbersSize; i = i + gap) {
j = i
while (j - gap >= startIndex && numbers[j] < numbers[j - gap]) {
temp = numbers[j]
numbers[j] = numbers[j - gap]