saw a project of a friend of mine ( http://hugopeixoto.net/mergesort.xhtml ) and tried to spice up the ruby implementation
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
| ; ESTÁ AINDA UM BOCADO INCOMPLETO, nomeadamente faltam preencher rotinas xD | |
| .file "exame_1.s" | |
| .include "lib/auxil.s" | |
| .include "lib/Biblioteca1.s" | |
| .org 0x1000 | |
| br inicio | |
| difHora:: |
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
| Declaração de variáveis | |
| var_long:: .long 12315 | |
| var_word:: .word 342 | |
| var_byte:: .byte 4 | |
| var_string:: .byte "afbad",0 | |
| .space.b <espaço> | |
| var_vector:: .<long/word/byte> 2646,24,62476,246 | |
| .space.<l/w/b> <espaço> | |
| var_matriz:: .<long/word/byte> 23425,245624525,245,2 | |
| .space.<l/w/b> <espaço> |
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
| #!/bin/bash | |
| function runFlex { | |
| echo $ficheiro | |
| flex="$ficheiro.c" | |
| gcc="$ficheiro.out" | |
| flex -o $flex $ficheiro | |
| gcc -o $gcc $flex -lfl | |
| ./$gcc |
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
| #include <unistd.h> | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <sys/types.h> | |
| #include <sys/ipc.h> | |
| #include <sys/shm.h> | |
| #include "semaforos.h" |
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
| require 'rubygems' | |
| require 'sinatra' | |
| require 'haml' | |
| require 'sass' | |
| set :port, 8080 | |
| #set :views, File.expand_path(File.dirname(__FILE__) + '/') | |
| set :public, File.dirname(__FILE__) | |
| get '/' do |
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
| require 'rubygems' | |
| require 'savon' | |
| require 'sinatra' | |
| #Savon::SOAP.version = 2 | |
| servico = "http://dot.dei.isep.ipp.pt/060516/dir3/srvARQSI45.asmx?wsdl" | |
| get '/' do | |
| client = Savon::Client.new servico |
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
| vector<string> split(const string& s) | |
| { | |
| vector<string> ret; | |
| typedef string: ize_type string_size; | |
| string_size i = 0; | |
| // invariant: we have processed characters [original value of i, i) | |
| while (i != s.size()) { | |
| // ignore leading blanks | |
| // invariant: characters in range [original i, current i) are all spaces |
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
| namespace clit { | |
| int stringToInt(string argumento) { | |
| istringstream str(argumento); | |
| int x; | |
| return (str>>x) ? x : -1; | |
| } | |
| template <class T> |
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
| require 'rubygems' | |
| require 'mongo_mapper' | |
| class Subject | |
| include MongoMapper::EmbeddedDocument | |
| key :nome, String | |
| key :ano, Integer | |
| end |
OlderNewer