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
PhotosController | |
def destroy | |
@photo = Photo.find(params[:id]) | |
@photo.destroy | |
end | |
Planting | |
before_destroy do |planting| | |
photolist = planting.photos.to_a # save a temp copy of the photo list | |
planting.photos.clear # clear relationship b/w planting and photo |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
var http = require('http') | |
, os = require('os') | |
, url = require('url') | |
, SSDP = require('../steward/node_modules/node-ssdp') | |
, netmask = require('../steward/node_modules/netmask') | |
, xml2json = require('../steward/node_modules/xml2json') | |
; | |
SSDP.prototype.notify = function(ifname, ipaddr, portno, signature, vars) {/* jshint unused: false */ |
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
var http = require('http') | |
, os = require('os') | |
, url = require('url') | |
// , SSDP = require('../steward/node_modules/node-ssdp') | |
, netmask = require('../steward/node_modules/netmask') | |
, xml2json = require('../steward/node_modules/xml2json') | |
; | |
'use strict'; | |
var dgram = require('dgram') |
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
SELECT | |
* | |
FROM data | |
WHERE id IN( | |
SELECT @id | |
UNION | |
SELECT child_id FROM paths WHERE parent_id = @id | |
) |
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
DROP TABLE example; | |
CREATE TABLE example ( | |
primary_id int PRIMARY KEY IDENTITY, | |
id int, | |
name varchar(20), | |
created_at DATETIME DEFAULT CURRENT_TIMESTAMP, | |
updated_at DATETIME, | |
active int | |
); |
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
deploy@kyle:~/fe/current$ rvm debug pkg install openssl | |
Fetching openssl-1.0.1c.tar.gz to /home/deploy/.rvm/archives | |
Extracting openssl-1.0.1c.tar.gz to /home/deploy/.rvm/src | |
Configuring openssl in /home/deploy/.rvm/src/openssl-1.0.1c. | |
Compiling openssl in /home/deploy/.rvm/src/openssl-1.0.1c. | |
Installing openssl to /home/deploy/.rvm/usr | |
Please note that it's required to reinstall all rubies: | |
rvm reinstall all --force |
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
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> | |
<html><head><title>SPARQL httpd test query</title></head> | |
<body><h1>SPARQL httpd server v1.1.4 test query</h1> | |
<h2>KB reference_store</h2> | |
<form action="http://127.0.0.1:8000/sparql/" method="post"> | |
<textarea name="query" cols="80" rows="18"> | |
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | |
SELECT * WHERE { |
NewerOlder