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
#classic | |
def is_prime n | |
for d in 2..(n - 1) | |
if (n % d) == 0 | |
return "no" | |
end | |
return "yes" | |
end | |
end |
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
<rdf:RDF | |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" | |
xmlns:owl ="http://www.w3.org/2002/07/owl#"> | |
<owl:Ontology rdf:about="xml:base"/> | |
<owl:Class rdf:ID="genero"> | |
<rdfs:comment>Generos musicales.</rdfs:comment> | |
</owl:Class> |
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
<?xml version="1.0"?> | |
<rdf:RDF | |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" | |
xmlns:owl="http://www.w3.org/2002/07/owl#"> | |
<owl:Ontology rdf:about=""> | |
<owl:versionInfo>Version 0.1</owl:versionInfo> | |
<rdfs:comment> | |
Ontologia personas |
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
class Node | |
{ | |
private Node next; | |
private Object data; | |
public Node(Object data, Node next) { | |
this.next = next; | |
this.data = data; | |
} |
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
A boat docked in a tiny Mexican village. An American tourist complimented the Mexican fisherman on the quality of his fish and asked how long it took him to catch them. “Not very long,” answered the Mexican. | |
“But then, why didn’t you stay out longer and catch more?” asked the American. | |
The Mexican explained that his small catch was sufficient to meet his needs and those of his family. | |
The American asked, “But what do you do with the rest of your time?” | |
“I sleep late, fish a little, play with my children, and take a siesta with my wife. In the evenings, I go into the village to see my friends, have a few drinks, play the guitar, and sing a few songs. I have a full life.” |
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 'gnuplot' | |
# tryout gnuplot | |
Gnuplot.open do |gp| | |
Gnuplot::Plot.new( gp ) do |plot| | |
plot.xrange "[-10:10]" | |
plot.title "Sin Wave Example" | |
plot.ylabel "x" |
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
# se usaria ruby reader.rb elarchivito.txt | |
def leeArchivo(archivito) | |
data = '' | |
f = File.open(archivito, "r") | |
f.each_line do |linea| | |
data = data + linea | |
end | |
return data | |
end |
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
# el programa se debera correr asi: | |
# ruby saver.rb "eso es lo que se escribira en el archivo" elarchivo.txt | |
def salvarArchivo(cadena, archivo) | |
File.open(archivo, 'w') do |f2| | |
f2.puts cadena | |
end | |
end | |
##### MAIN ##### |
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
<?php | |
echo "calando..."; |
NewerOlder