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
.\" Generated with Ronnjs 0.4.0 | |
.\" http://github.com/kapouer/ronnjs | |
. | |
.TH "NODE\-GYP" "1" "March 2013" "" "" | |
. | |
.SH "NAME" | |
\fBnode-gyp\fR \-\- native addon build tool for node | |
. | |
.SH "SYNOPSIS" | |
. |
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
function createEntry(data, path, root) { | |
var entry = new stream.Readable(); | |
var allpushed = false; | |
entry._read = function(s) { | |
if (allpushed) { | |
this.push(null); | |
} else { | |
this.push(data); | |
allpushed = 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
require('./common'); | |
var http = require('http'); | |
var server = http.createServer(); | |
server.listen(); | |
var engine = eio.attach(server, { | |
allowUpgrades: true, | |
transports: ['polling', 'websocket'], | |
pingInterval:4000, |
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
orm.db.defineType('GeoJSON', { | |
datastoreType: function GeoJSON_datastoreType(prop) { | |
return 'geometry(Geometry, 4326)'; | |
}, | |
datastoreGet: function GeoJSON_datastoreGet(prop, helper) { | |
return 'ST_AsGeoJSON(' + prop.mapsTo + ')::JSON'; | |
}, | |
valueToProperty: function GeoJSON_valueToProperty(value, prop) { | |
if (typeof value == "string") return JSON.parse(value); | |
else return value; |
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 ogr2ogr = require('../') | |
var sampleNogeom = __dirname+'/samples/sample-nogeom.csv' | |
// createdb|dropdb nogeomtest | |
ogr2ogr(sampleNogeom) | |
.format("PostgreSQL") | |
.project("EPSG:4326") | |
.destination('PG:dbname=nogeomtest') |
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
function getXml(url, cb) { | |
var xhr = new XMLHttpRequest(); | |
xhr.open("GET", url, true); | |
xhr.onreadystatechange = function (e) { | |
if (xhr.readyState == 4) { | |
var code = xhr.status; | |
if (code >= 200 && code < 400) { | |
cb(null, xhr.responseXML); | |
} else { | |
var err = new Error(xhr.responseText); |
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
session rights /lefigaro.fr s4sfqJBi5_euHMCU3WBAS68g5Axx5kCW [ 'read' ] [ 'write lefigaro.fr', 'auth' ] | |
set sid:s4sfqJBi5_euHMCU3WBAS68g5Axx5kCW | |
GET 200 20.783 ms /lefigaro.fr?auth=01020304 - 49 | |
set right=auth&type=json http://localhost:3000/lefigaro.fr?auth=01020304 | |
set right=auth&type=json http://localhost:3000/lefigaro.fr?auth=01020304 | |
set sid:zWqh4RmAw5HX9i3ShrUavG2JUf8oH6sZ | |
GET 302 55.039 ms /lefigaro.fr/test/write?_token=123456 - 102 | |
vary for { right: 'read,write lefigaro.fr' } | |
vary for { right: 'read' } | |
vary for { right: 'write lefigaro.fr' } |
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
Comment soumettre un formulaire ? | |
1. Validation en javascript | |
Quand valide, javascript envoie le formulaire en XHR - ou si on veut | |
gagner du temps, on peut soumettre le formulaire par HTML. | |
2. POST vers l'url du document | |
La route s'occupe de faire la requête correcte vers la ressource concernée, | |
et ce qui est renvoyé dépend du client: | |
- si HTML, on fait une redirection |
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
Resource.relationMappings = { | |
27 + children: { | |
28 + relation: Model.ManyToManyRelation, | |
29 + modelClass: Resource, | |
30 + join: { | |
31 + from: 'raja_resources.id', | |
32 + through: { | |
33 + from: 'raja_relations.parent_id', | |
34 + to: 'raja_relations.child_id' | |
35 + }, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.