Contenu connexe
Similaire à Jig study (20)
Jig study
- 9. select * {
?s ?p ?o;
} limit 10
select * from users limit 10;
SPARQL
MySQL
- 17. SELECT ?name {
?s rdf:type jrrk:EmergencyFacility;
rdfs:label ?name.
}
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX jrrk:<http://purl.org/jrrk#>
SPARQL
- 19. PREFIX jrrk: <http://purl.org/jrrk#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX schema: <http://schema.org/>
PREFIX geo:<http://www.w3.org/2003/01/geo/wgs84_pos#>
SELECT DISTINCT ?lat ?lng ?image_url ?name {
?target_rdf rdf:type jrrk:CivicPOI;
geo:lat ?lat;
geo:long ?lng;
schema:image ?image_url;
rdfs:label ?name
}
SPARQL
http://odp.jig.jp/odp/1.0#
- 29. a = (a,b) -> a + b
var a;
a = function(a, b) {
return a + b;
};
CoffeeScript
- 36. npm install -g grunt grunt-cli
install
npm install -g gulp
node.jsをインストールする
- 39. module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
slim: {
dest: {
files: [
{
expand: true,
cwd: 'public_html',
src: ['*.slim', '!_*.slim'],
dest: 'public_html/dest',
ext: '.html'
}
]
}
}
});
grunt.loadNpmTasks(‘grunt-slim');
return grunt.registerTask('default', ['slim');
};
ほぼJSON
- 40. var gulp = require('gulp');
var jade = require('gulp-jade');
gulp.task('default', function() {
gulp.run(‘jade');
});
gulp.task('jade', function() {
return gulp.src(‘./*.jade’)
.pipe(plumber())
.pipe(jade({
pretty: true
})).pipe(gulp.dest(‘dest/’));
});
gulp.task('watch', function() {
gulp.watch(‘./*.jade', ['jade']);
gulp.watch(‘./**/*.jade', [‘jade']);
});
method
chaining
- 42. a = (a,b) -> a + b
var a;
a = function(a, b) {
return a + b;
};
例えば
var a;a=function(a,b){return a+b;};
coffeescriptのコンパイル
minify
- 43. a = (a,b) -> a + b
var a;
a = function(a, b) {
return a + b;
};
var a;a=function(a,b){return a+b;};
src.coffee
compiled.js
minified.min.js
- 44. a = (a,b) -> a + b
var a;
a = function(a, b) {
return a + b;
};
var a;a=function(a,b){return a+b;};
src.coffee
minified.min.js
- 45. module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
slim: {
dest: {
files: [
{
expand: true,
cwd: 'public_html',
src: ['*.slim', '!_*.slim'],
dest: 'public_html/dest',
ext: '.html'
}
]
}
}
});
grunt.loadNpmTasks(‘grunt-slim');
return grunt.registerTask('default', ['slim');
};
ほぼJSON
- 46. var gulp = require('gulp');
var jade = require('gulp-jade');
gulp.task('default', function() {
gulp.run(‘jade');
});
gulp.task('jade', function() {
return gulp.src(‘./*.jade’)
.pipe(plumber())
.pipe(jade({
pretty: true
})).pipe(gulp.dest(‘dest/’));
});
gulp.task('watch', function() {
gulp.watch(‘./*.jade', ['jade']);
gulp.watch(‘./**/*.jade', [‘jade']);
});
method
chaining