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 reverse_fun(n) | |
limit = n.length.to_i | |
n = n[0..limit-1].reverse | |
i = 0 | |
while i < limit-1 | |
n = n[0..i] + n[i+1..limit-1].reverse | |
i =+ 1 | |
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
count = 0 | |
for i in 0...arr1.length.to_i | |
if arr1[i] === arr2[i] | |
count +=1 | |
else | |
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
else | |
i = 1 | |
cat_years = cat_years - 28 | |
dog_years = dog_years - 29 | |
while cat_years != dog_years | |
cat_years = cat_years - 4 | |
dog_years = dog_years - 5 | |
i = i + 1 | |
end | |
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
class Todo | |
def initialize(string) | |
@to_do = string | |
end | |
def text | |
puts @to_do | |
end | |
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
gulp.task('bootstrap-sass', function() { | |
return gulp.src('./public/bower/bootstrap-sass/lib/*.scss') | |
.pipe(sass()) | |
.pipe(contact('bootstrap.css')) | |
.pipe(gulp.dest('./public/dist/css')); | |
}); | |
gulp.task('site-sass', function() { | |
return gulp.src('./public/app/scss/*.scss') | |
.pipe(sass()) |
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
{ | |
"src_folders" : ["tests"], | |
"output_folder" : "reports", | |
"selenium": { | |
"start_process": true, | |
"server_path": "./bin/selenium-server-standalone-3.9.1.jar", | |
"log_path": false, | |
"host": "127.0.0.1", | |
"port": 4444 |
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
let express = require('express'); | |
let path = require('path'); | |
let mongoose = require('mongoose'); | |
mongoose.set('debug', true); | |
mongoose.connect('mongodb://localhost:27017/makersbnb_test'); | |
const spaceController = require('./controllers/spaceController.js'); | |
var bodyParser = require('body-parser'); | |
let app = express(); | |
app.set('views', path.join(__dirname, 'views')); |
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
function testDisplayNoteURL() { | |
var note1 = new Note("some text"); | |
var note2 = new Note("some different text"); | |
var note3 = new Note("more different text"); | |
var note4 = new Note("more different text"); | |
list.store(note1); | |
list.store(note2); | |
list.store(note3); | |
list.store(note4); | |
var listView = new ListView(list); |
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
class PostsController < ApplicationController | |
def new | |
@post = Post.new | |
end | |
def create | |
@post = current_user.posts.build(post_params) | |
redirect_to posts_url | |
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
create_table "walls", force: :cascade do |t| | |
t.bigint "user_id" | |
t.index ["user_id"], name: "index_walls_on_user_id" | |
end |
OlderNewer