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
public class MouseRobot { | |
private void mouseRebotReplace(MouseEvent e) { | |
int x = e.getX() - pCenterX; | |
int y = e.getY() - pCenterY; | |
if (!isPaused) { | |
if (mouseX < 0) { | |
mouseX = 0; | |
} else if (mouseX > pWidth) { |
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
public class Start { | |
public static void main(String args[]) { | |
System.out.println("x, y: " + (7 - 6) + ", " + (3 - 4)); | |
System.out.println((Math.pow((7 - 6), 2) + Math.pow((3 - 4), 2))); | |
System.out.println("x, y: " + (7 - 6) + ", " + (3 - 2)); |
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
source 'http://rubygems.org' | |
gem 'rails', '3.1.0' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3' |
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
source 'http://rubygems.org' | |
gem 'rails', '3.0.9' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3-ruby', :require => 'sqlite3' | |
gem "authlogic", :git => 'git://github.com/odorcicd/authlogic.git', :branch => "rails3" | |
gem "carrierwave", :git => "git://github.com/jnicklas/carrierwave.git", :branch => "0.5-stable" |
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
require File.expand_path('../boot', __FILE__) | |
require 'rails/all' | |
require 'lib/error_form_builder' | |
# If you have a Gemfile, require the gems listed there, including any gems | |
# you've limited to :test, :development, or :production. | |
Bundler.require(:default, Rails.env) if defined?(Bundler) | |
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
class ApplicationController < ActionController::Base | |
# Your existing stuff | |
around_filter :you_dont_have_bloody_clue | |
protected | |
def you_dont_have_bloody_clue | |
klasses = [ActiveRecord::Base, ActiveRecord::Base.class] | |
methods = ["session", "cookies", "params", "request"] |
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
#include <iostream> | |
#include <string> | |
#include <iomanip> | |
using namespace std; | |
int number; | |
static int lowRange = 1; | |
static int highRange = 100; | |
int numberOfTries = 10; | |
bool incorrect = true; |
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
#include <iostream> | |
#include <string> | |
#include <iomanip> | |
using namespace std; | |
int total_judges = 0; | |
double total_number = 0; | |
double judges[5]; | |
string name, city; | |
int drivers = 0; |
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
#include <iostream> | |
#include <string> | |
#include <iomanip> | |
using namespace std; | |
char d1, d2, d3, d4, d5, d6, d7, d8; | |
char digitConvertion(char d){ | |
char value = d; | |
switch (toupper(d)){ |
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
#include <iostream> | |
#include <string> | |
#include <iomanip> | |
using namespace std; | |
const int array_size = 9; | |
int array_of_numbers[array_size]; | |
void exchangeSort(){ |