- Download this application skeleton.
 - Convert the app to use AJAX.
 - Add any files you changed to your gist and submit your code.
 
  
    
      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
    
  
  
    
  | # Author: Adam Loo | |
| # Date: 7/31/2014 | |
| # A short script that takes a DNA strand, does a pattern search and returns | |
| # the indexes of all matches. | |
| STRAND = "aggcgtatgcgatcctgaccatgcaaaactccagcgtaaatacctagccatggcgacacaaggcgcaaga" + | |
| "caggagatgacggcgtttagatcggcgaaatattaaagcaaacgacgatgacttcttcgggaaattagttccctactcgt" + | |
| "gtactccaattagccataacactgttcgtcaagatatagggggtcacccatgaatgtcctctaaccagaccatttcgtta" + | |
| "cacgaacgtatctgatgacttcttcgggaaattagttccctactcgtgtactccaattagccataacactgttcgtcaag" + | |
| "atatagggggtcacccatgaatgtcctctaaccagaccatttcgttacacgaacgtatcttcggggcgtatgcgatcctg" + | 
  
    
      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
    
  
  
    
  | // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console | 
  
    
      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
    
  
  
    
  | #README | |
| #Run by typing "ruby (filename)". Drive code is already included. | |
| #This script adds a method "find_pivot" to the array class which finds the pivot point of any array | |
| #and returns the index of that point if it exists or -1 otherwise. | |
| class Array | |
| def find_pivot | |
| raise NoMethodError, 'Wrong type of input!' if self.class != Array | |
| low = 0 | 
  
    
      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
    
  
  
    
  | def find_char(string) | |
| word = string.split(//) | |
| word = word.find_all { |x| word.count(x) == 1 } | |
| word.first | |
| end | 
  
    
      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
    
  
  
    
  | def binary_search(num, arr) | |
| high = arr.length - 1 | |
| low = 0 | |
| while low < high | |
| mid = (low + high) / 2 | |
| if arr[mid] > num | |
| low = mid + 1 | |
| elsif arr[mid] < num | 
  
    
      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
    
  
  
    
  | def nested?(string) | |
| string.gsub!(/[^()]/, '') | |
| string.gsub!(/\(\)/, '') | |
| string.empty? | |
| end | 
  
    
      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 'shoulda-context' | |
| class HashFake | |
| def initialize(size=0) | |
| @body = Array.new(size) | |
| end | |
| def body | |
| @body | 
  
    
      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 PostIt = function(x, y, boardId) { | |
| //Create post-it | |
| var $div = $("<div class='post-it'><div class='header'><a href='#' id='close'>CLOSE</a></div><div class='content' contenteditable='true'></div></div>") | |
| this.$element = $div; | |
| var self = this; | |
| function initialize() { | |
| $div.draggable({ | 
  
    
      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
    
  
  
    
  | /* Here is your chance to take over Socrates! | |
| Spend 10 minutes on each of the following hacks to the socrates website. | |
| Enter them in the console to make sure it works and then save | |
| your results here. | |
| Choose a new pair for each. Add your names to the section you complete. | |
| */ | 
NewerOlder