#Internships
##Getting Noticed in the Software Community
- Chris Johnson
- Software Engineer and Scrum Master at GettyImages
class ImportAirports | |
require 'csv' | |
def self.execute(csv_path) | |
CSV.foreach(csv_path) do |row| | |
airport = Airport.new | |
airport.ident = row[1] | |
airport.type = row[2] | |
airport.name = row[3] | |
airport.latitude_deg = row[4] | |
airport.longitude_deg = row[5] |
getWeather = (url) -> | |
$("#results").html "" | |
if url | |
$.ajax | |
method: "get" | |
url: url | |
success: (data) -> | |
console.log data | |
console.log url | |
return |
<html> | |
<head> | |
</head> | |
<body> | |
<?php | |
$error_messages = array(); | |
array_push($errors, 'Some error'); | |
array_push($errors, 'Another error'); | |
array_push($errors, 'Wow this is bad'); | |
?> |
<?php | |
function generate_output($value){ | |
if (is_fizz($value) && !is_buzz($value)){ | |
return "fizz"; | |
} | |
if (is_buzz($value) && !is_fizz($value)){ | |
return "buzz"; | |
} |
class Car{ | |
public $make; | |
public $model; | |
public function getMake(){ | |
return $this->make; | |
} | |
public function setMake($input_make){ | |
$this->make = $input_make; |
<?php | |
class myClass{ | |
private $propertyA | |
private $propertyB | |
public function getPropertyA(){ | |
return $this->propertyA; | |
} | |
public function setPropertyA($value){ |
<?php | |
$string = 'My lovely gloves are lost in the clover, Love.'; | |
$result = preg_match_all('/(\w*lo\w*)/i', $string, $matches); | |
if ($result == true) { | |
print "Found $result matches<br />"; | |
} | |
else { | |
print 'Didn\'t find a match<br />'; | |
} | |
$match_results = $matches[0]; |
namespace :generate_data do | |
desc "generate some test categories" | |
task :categories => :environment do | |
25.times do | |
Category.create(:name => Faker::Commerce.department) | |
end | |
end | |
desc "generate some test users" | |
task :users => :environment do |
<div class="col-lg-4"> | |
<p id="notice"><%= notice %></p> | |
<p> | |
<strong>Title:</strong> | |
<%= @ad.title %> | |
</p> | |
<p> | |
<strong>Description:</strong> |