Não use UUID
como PK nas tabelas do seu banco de dados.
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
{ | |
"workbench.startupEditor": "newUntitledFile", | |
"editor.fontSize": 14, | |
"editor.lineHeight": 1.8, | |
"javascript.suggest.autoImports": true, | |
"javascript.updateImportsOnFileMove.enabled": "always", | |
"editor.rulers": [80, 120], | |
"extensions.ignoreRecommendations": true, | |
"typescript.tsserver.log": "off", | |
"files.associations": { |
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
/** | |
* | |
* THIS IS JUST A DSL PROTOTYPE | |
* | |
* First tentative of a DSL for defining macro transformations in Java. | |
* There's a lot of noise because of the absence of pattern matching and tuples. | |
* This is a prototype of one of the if/else transformations in Monadless: | |
* | |
* case q"if($cond) $ifTrue else $ifFalse" => | |
* (ifTrue, ifFalse) match { |
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
// Programa Escola de Natação - Prova N2 - 01/06/2016 - Turma da Tarde | |
// | |
#include "Escola.h" | |
// Entry point do programa | |
// | |
void main(void) | |
{ | |
int nPeriodo, // periodo da aula de natação | |
nRaia, // raia da piscina | |
nPosicionalRaia, // posicional da raia dentro do arquivo de raias |
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
Lets say solr is located at /usr/local/solr-5.5.0 . | |
1. bin/solr start | |
2. bin/solr create -c test | |
3. location of new core is here /usr/local/solr-5.5.0/server/solr/test | |
4. location of solrconfig is here /usr/local/solr-5.5.0/server/solr/test/solrconfig.xml | |
5. Open solrconfig.xml - | |
You will find this | |
<schemaFactory class="ManagedIndexSchemaFactory"> | |
<bool name="mutable">true</bool> | |
<str name="managedSchemaResourceName">managed-schema</str> |
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
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 React = require("react"), Dom = React.DOM; | |
var LogOutButton = require('./src/logout'); | |
var events = require('api/events'); | |
var Main = React.createClass({ | |
// this mixin provides this.emitLogout, and if we set onLogout it'll be called when "logout" is emitted | |
mixins: [events.mixinFor("logout")], | |
getInitialState: function(){ | |
return { |
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
! clean most of the modifiers | |
clear control | |
clear mod4 | |
clear mod1 | |
! gt, lt | |
keycode 49 = less greater less greater bar brokenbar bar | |
keycode 94 = dead_circumflex degree dead_circumflex degree U2032 U2033 U2032 | |
! ----------------- |
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
// create file: | |
sudo vim /usr/share/applications/intellij.desktop | |
// add the following | |
[Desktop Entry] | |
Version=13.0 | |
Type=Application | |
Terminal=false | |
Icon[en_US]=/home/rob/.intellij-13/bin/idea.png | |
Name[en_US]=IntelliJ |
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
import uuid | |
import wtforms_json | |
from sqlalchemy import not_ | |
from sqlalchemy.dialects.postgresql import UUID | |
from wtforms import Form | |
from wtforms.fields import FormField, FieldList | |
from wtforms.validators import Length | |
from flask import current_app as app | |
from flask import request, json, jsonify, abort |
NewerOlder