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
source 'https://rubygems.org' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '4.2.4' | |
# Use mysql as the database for Active Record | |
gem 'mysql2' | |
# Use SCSS for stylesheets | |
gem 'sass-rails', '~> 5.0' | |
# Use Uglifier as compressor for JavaScript assets |
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
Server running on http://127.0.0.1:8000 | |
Quit the server with CONTROL-C. | |
[Symfony\Component\Debug\Exception\ContextErrorException] | |
Warning: is_file(): open_basedir restriction in effect. File(/usr/bin/php) | |
is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear | |
/:/usr/share/webapps/) |
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
<?php | |
public function newAction($id) | |
{ | |
$entity = new Entrada(); | |
$material = new Material($id); | |
$entity->setMaterial($material); | |
$form = $this->createCreateForm($entity); |
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
<?php | |
public function newAction($id) | |
{ | |
$entity = new Entrada(); | |
$material = new Material($id); | |
$entity->setMaterial($material); | |
$form = $this->createCreateForm($entity); |
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
[root@progs alexandre]# mongo | |
MongoDB shell version: 3.0.7 | |
connecting to: test | |
2015-10-16T14:49:17.822+0000 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused | |
2015-10-16T14:49:17.826+0000 E QUERY Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed | |
at connect (src/mongo/shell/mongo.js:179:14) | |
at (connect):1:6 at src/mongo/shell/mongo.js:179 | |
exception: connect failed |
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 onEdit($param) | |
{ | |
try | |
{ | |
if (isset($param['key'])) | |
{ | |
$key=$param['key']; // get the parameter $key | |
TTransaction::open('sample'); // open a transaction | |
$object = new Clientes($key); // instantiates the Active Record | |
$obj = new stdClass(); |
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
#!/bin/env node | |
// OpenShift sample Node application | |
var express = require('express'); | |
var fs = require('fs'); | |
var app = express(); | |
var site = require('./routers/site'); | |
// seta onde ficaram as views |
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 express = require('express'); | |
var router = express.Router(); | |
// middleware specific to this router | |
router.use(function timeLog(req, res, next) { | |
console.log('Time: ', Date.now()); | |
next(); | |
}); | |
// define the home page route | |
router.get('/', function(req, res) { |
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
// grab the things we need | |
var mongoose = require('mongoose'); | |
var Schema = mongoose.Schema; | |
var postSchema = new Schema({ | |
title : {type:String, required:true}, | |
content : {type:String, required:true}, | |
categories:{ | |
name: {type:String, required: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
var express = require('express'); | |
var router = express.Router(); | |
var Post = require('../models/poemas'); | |
/* GET home page. */ | |
router.get('/', function(req, res, next) { | |
var Menestrel = new Poemas({ | |
title: "O Menetrel", |
OlderNewer