This file contains 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
package com.beust.coding.challenge.slidingwindowmap; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.Set; | |
/** | |
* | |
* @author rnaufal | |
* |
This file contains 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
<script> | |
// Charles Lawrence - Feb 16, 2012. Free to use and modify. Please attribute back to @geuis if you find this useful | |
// Twitter Bootstrap Typeahead doesn't support remote data querying. This is an expected feature in the future. In the meantime, others have submitted patches to the core bootstrap component that allow it. | |
// The following will allow remote autocompletes *without* modifying any officially released core code. | |
// If others find ways to improve this, please share. | |
var autocomplete = $('#searchinput').typeahead() | |
.on('keyup', function(ev){ | |
ev.stopPropagation(); |
This file contains 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
#only dealing with opaque types here; no struct gen | |
require 'cast' | |
CallbackTypes = {} | |
def ffi_type(t) | |
if t.Pointer? | |
if t.type.Char? | |
:string | |
elsif t.type.CustomType? and CallbackTypes[t.type.name] |
This file contains 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
## Prepare ################################################################### | |
# Remove RVM | |
rvm implode | |
# Ensure your homebrew is working properly and up to date | |
brew doctor | |
brew update | |
## Install ################################################################### |
This file contains 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
For those of you who get this error after upgrading to mountain lion: | |
Installing rmagick (2.13.1) with native extensions | |
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. | |
/Users/user/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby extconf.rb | |
checking for Ruby version >= 1.8.5... yes | |
extconf.rb:128: Use RbConfig instead of obsolete and deprecated Config. | |
checking for /usr/bin/gcc-4.2... no |
This file contains 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
# | |
# A C Parser using the Parslet library. | |
# | |
# ANSI C Grammar: | |
# | |
# * http://www.lysator.liu.se/c/ANSI-C-grammar-l.html | |
# * http://www.lysator.liu.se/c/ANSI-C-grammar-y.html | |
# | |
require 'parslet' |
This file contains 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
\ProvidesClass{mydiss}[2012/08/22 v1.3 mydiss class (Michael Ummels)] | |
\NeedsTeXFormat{LaTeX2e}[1996/06/01] | |
% Options | |
\newif\if@iso | |
\@isofalse | |
\newif\if@crop | |
\@cropfalse |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
if `ant -version` !~ /version (\d+)\.(\d+)\.(\d+)/ || $1.to_i < 1 || ($1.to_i == 1 && $2.to_i < 8) | |
puts "ANT version 1.8.0 or later required. Version found: #{$1}.#{$2}.#{$3}" | |
exit 1 | |
end | |
require 'time' | |
def manifest() @manifest ||= REXML::Document.new(File.read(MANIFEST_FILE)) end | |
def package() manifest.root.attribute('package') end | |
def build_project_name() @build_project_name ||= REXML::Document.new(File.read('build.xml')).elements['project'].attribute(:name).value end |
This file contains 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
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> | |
<script src="http://yandex.st/raphael/1.5.2/raphael.min.js"></script> | |
<script> | |
/** | |
* A Simple Vector Shape Drawing App with RaphaelJS and jQuery | |
* copyright 2010 Kayla Rose Martin - Licensed under the MIT license | |
* Inspired by http://stackoverflow.com/questions/3582344/draw-a-connection-line-in-raphaeljs | |
**/ |