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
(defn m | |
"Measures the number of consonant sequences between | |
the start of word and position j. If c is a consonant | |
sequence and v a vowel sequence, and <...> indicates | |
arbitrary presence, | |
<c><v> -> 0 | |
<c>vc<v> -> 1 | |
<c>vcvc<v> -> 2 | |
<c>vcvcvc<v> -> 3 | |
... |
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
public static function createFacetSubForm($subform) | |
{ | |
$output = ''; | |
$facetId = $subform->getElement('facetid'); | |
$label = $subform->getElement('label'); | |
$options = $subform->getElement('options'); | |
$id = preg_replace('/\W+/', '_', $label->getFullyQualifiedName()); | |
$output .= '<tr>'; |
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
SET NAMES 'utf8' COLLATE 'utf8_unicode_ci'; | |
SET @set_name := 'Dublin Core'; | |
SET @element_name := 'Coverage'; | |
SET @label := 'Greeting'; | |
SET @facet := 1; | |
SET @displayed := 1; | |
INSERT INTO omeka_solr_search_facets |
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
SELECT `e`.*, `dt`.`name` AS `data_type_name`, `es`.`name` AS `set_name`, `rty`.`name` AS `record_type_name` FROM `hotchkiss_elements` AS `e` | |
LEFT JOIN `hotchkiss_data_types` AS `dt` ON dt.id = e.data_type_id | |
LEFT JOIN `hotchkiss_element_sets` AS `es` ON es.id = e.element_set_id | |
INNER JOIN `hotchkiss_record_types` AS `rty` ON rty.id = e.record_type_id WHERE (rty.name = 'Item' OR rty.name = "All") ORDER BY `e`.`order` ASC, `e`.`element_set_id` ASC |
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 | |
/** | |
* One Creator: "Jane Doe" | |
* Two creators: "Jane Doe and John Doe" | |
* Three creators: "Jane Doe, John Doe, and Jim Doe" | |
* Four or more: "Jane Doe et al." | |
*/ | |
if ($creators) { |
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 | |
/** | |
* One Creator: "Jane Doe" | |
* Two creators: "Jane Doe and John Doe" | |
* Three creators: "Jane Doe, John Doe, and Jim Doe" | |
* Four or more: "Jane Doe et al." | |
*/ | |
if ($creators) { | |
switch (count($creators) { |
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
#!/usr/bin/env python | |
import re | |
import sys | |
def fix_pre(match): | |
buffer = ['\n[sourcecode'] | |
if match.group(1) and match.group(2): | |
buffer.append('{0}"{1}"'.format(match.group(1), match.group(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
cd /System/Library/Frameworks/Python.frameworks/Versions | |
sudo mv Current Current26 | |
sudo ln -s /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7 Current |
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
var _this = this; | |
var Map = OpenLayers.Map; | |
if (jQuery.browser.webkit) { | |
Map = OpenLayers.Class(OpenLayers.Map, { | |
updateSize: function() { | |
OpenLayers.Map.prototype.updateSize.apply(this, arguments); | |
var mapHeight = _this.element.height(), | |
mapWidth = _this.element.width(); | |
_this.element.find('svg').each(function (i, el) { | |
jQuery(el).height(mapHeight).width(mapWidth); |
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
#!/bin/bash | |
./sub_exit.bash | |
ec1=$? | |
./sub_exit.bash | |
ec2=$? | |
[[ "$ec1" -eq "0" && "$ec2" -eq "0" ]] |