This file contains hidden or 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 hashlib as hasher | |
| import datetime as date | |
| # Define what a Snakecoin block is | |
| class Block: | |
| def __init__(self, index, timestamp, data, previous_hash): | |
| self.index = index | |
| self.timestamp = timestamp | |
| self.data = data | |
| self.previous_hash = previous_hash |
This file contains hidden or 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 Decorator.RedShapeDecorator; | |
| import Facade.ShapeMaker; | |
| import FacadeKt.ShapeMakerKt; | |
| import Models.Shape; | |
| import Factory.ShapeFactory; | |
| public class Main | |
| { | |
| public static void main(String[] args) | |
| { |
This file contains hidden or 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
| public static ArrayList<Patio> getArrayListPatios() | |
| { | |
| try | |
| { | |
| Connection con = ConnectionFactory.getConnection(); | |
| // | |
| // Cria e executa o comando SQL. | |
| // | |
| String SQL = "EXEC SPVERITHUS_RetornaPatios 0, '','A' "; // EXECUTA A SP PEGANDO PARAMETROS | |
| Statement PS = con.createStatement(); |
This file contains hidden or 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
| const Patios = require('./models/Patios'); | |
| const patiosSchema = require('./models/patiosSchema'); | |
| const express = require('express'); | |
| const app = express(); | |
| const mongoose = require('mongoose'); | |
| mongoose.Promise = require('bluebird'); | |
| mongoose.connect('mongodb://mongo/verithus'); |
This file contains hidden or 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
| const mongoose = require('mongoose'); | |
| let Schema = mongoose.Schema; | |
| const PatiosSchema = new Schema({ | |
| IdPatio: Number, | |
| NomPatio: String, | |
| IndExclusao: String | |
| }); |
This file contains hidden or 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
| const patiosSchema = require('./patiosSchema'); | |
| exports.InserePatios = function(IdPatio,NomPatio,IndExclusao) | |
| { | |
| var newPatio = new Patio(IdPatio,NomPatio,IndExclusao); | |
| patiosSchema.create( | |
| { | |
| IdPatio: newPatio.IdPatio, | |
| NomPatio: newPatio.NomPatio, | |
| IndExclusao: newPatio.IndExclusao |
This file contains hidden or 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
| const inverteString = (stringOriginal) => | |
| { | |
| let aux = ""; | |
| let size = stringOriginal.length; | |
| for(i = (size - 1); i <= (size) && i >=0; i--) | |
| { | |
| aux += stringOriginal[i]; | |
| //console.log(aux); | |
| } | |
| return aux; |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "strconv" | |
| ) | |
| func main(){ | |
| entrada := os.Args[1:] |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "strings" | |
| ) | |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| func separar(nums []int, i, p chan<- int, pronto chan<- bool) { | |
| for _, n := range nums { | |
| if n%2 == 0 { | |
| p <- n |
OlderNewer