Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages and install them manually as needed.
| /** | |
| * Creates a log wrapper for browser console. If console.log is defined, it passed the function arguments to it. | |
| * Using this method prevents problems when using console.log directly in IE (at least in version 8). | |
| */ | |
| var logger = function () { | |
| if (console && console.log) { | |
| console.log.call(console, arguments); | |
| } | |
| } |
| var application_root = __dirname, | |
| express = require("express"), | |
| path = require("path"), | |
| mongoose = require('mongoose'); | |
| var app = express.createServer(); | |
| // database | |
| mongoose.connect('mongodb://localhost/ecomm_database'); |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Untitled</title> | |
| <style> | |
| #example { | |
| background: #f00; | |
| width: 300px; | |
| height: 300px; |
| /* | |
| Infinite List View | |
| creates <ul> with triggers for infinite scrolling | |
| @author Kevin Jantzer, Blacktone Audio Inc. | |
| @since 2012-11-06 | |
| USE - listen for: |
| // | |
| // Regular Expression for URL validation | |
| // | |
| // Author: Diego Perini | |
| // Updated: 2010/12/05 | |
| // License: MIT | |
| // | |
| // Copyright (c) 2010-2013 Diego Perini (http://www.iport.it) | |
| // | |
| // Permission is hereby granted, free of charge, to any person |
Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages and install them manually as needed.
| jQuery.placeholder = function() { | |
| $('[placeholder]').focus(function() { | |
| var input = $(this); | |
| if (input.hasClass('placeholder')) { | |
| input.val(''); | |
| input.removeClass('placeholder'); | |
| } | |
| }).blur(function() { | |
| var input = $(this); | |
| if (input.val() === '') { |
| select.form-control + .chosen-container.chosen-container-single .chosen-single { | |
| display: block; | |
| width: 100%; | |
| height: 34px; | |
| padding: 6px 12px; | |
| font-size: 14px; | |
| line-height: 1.428571429; | |
| color: #555; | |
| vertical-align: middle; | |
| background-color: #fff; |
| // Resources needed: | |
| // Jcrop - http://deepliquid.com/content/Jcrop.html | |
| // loadImage - https://github.com/blueimp/JavaScript-Load-Image | |
| initJcrop: function (isEdit) { | |
| Page.elems.$photoWrapper.find('img').Jcrop({ | |
| onChange: function (coo) { | |
| Page.vars.photoParams = coo; | |
| }, | |
| onSelect: function (coo) { |
d3.js example showing a scatterplot with 500-50,000 random points and its associated density heat chart