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 dmp = new diff_match_patch(); | |
var text1 = "your input text source"; | |
var text2 = "your input text destination"; | |
var current_unicode = parseInt('2000',16); | |
var charmap = {}; | |
var replaceFirstTag = function(str,code) { | |
var nu = code+1; |
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
require 'rubygems' | |
require 'httparty' | |
require 'HTTMultiParty' | |
require 'base64' | |
# This is a quick example to demonstrate the use of ruby to interact with the Specify API. | |
# I am a beginner rubyist, so please excuse my rudimentary code! | |
# Depends on httparty for clean and simple API wrapper code https://github.com/jnunemaker/httparty | |
# Depends on httpmultiparty to allow image and file uploads https://github.com/jwagener/httmultiparty |
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
<cfcomponent extends="Controller" output="false" hint="A set of functions to interface with the jQuery validator plugin"> | |
<cfscript> | |
function measurement() { | |
// gets either params.w, params.d or params.h | |
// m = params.w OR params.d OR params.h; | |
if (isDefined("params.w")) { m = params.w; } | |
if (isDefined("params.d")) { m = params.d; } | |
if (isDefined("params.h")) { m = params.h; } |
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
// CUSTOM AJAX FUNCTION FOR STRUCTURED ERROR HANDLING | |
(function(){ | |
// Store a reference to the original ajax method. | |
var originalAjaxMethod = jQuery.ajax; | |
var EF = function(){}; | |
// override the default $.ajax to include special handlers for error and success | |
// to utilize new custom error box. existing success and error callbacks are | |
// left intact and given the expected params. | |
jQuery.ajax = function(options) { | |
var thisSuccess = (typeof options.success == 'function') ? options.success : EF; |
NewerOlder