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
s = "Hello " | |
s = s + "rubyCUCEI!" #New object "Hello rubyCUCEI!" | |
puts s | |
s = s.capitalize #New object "Hello rubycucei!" | |
puts s | |
r = "Hello " | |
r += "rubyCUCEI!" #New object "Hello rubyCUCEI!" | |
puts r | |
r.capitalize! #Same object "Hello rubycucei" | |
puts r |
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
s = "OMG!" | |
puts s[2] | |
#Ruby 1.8 displays 71; Ruby 1.9 displays G |
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
s = "OMG!" | |
puts s[2,1] | |
#Ruby 1.8 now displays G |
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
s = "OMG!" | |
puts s[2].ord | |
#Ruby 1.9 now displays 71 |
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
s = "Hello rubyCUCEI!" | |
puts s[6,4] # prints "ruby" |
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
<!-- Actually, a pseudo-XML format--> | |
<bc> | |
<regla> <condicion> <atomo> COMPRO_ARMA </atomo> </condicion> <conclusion> <atomo>GUERRERO_1 </atomo> <atomo>COMERCIANTE_1</atomo> <conjuncion/></conclusion></regla> | |
<regla> <condicion> <atomo> COMPRO_ITEM </atomo> </condicion> <conclusion> <atomo>MANIPULADOR_1</atomo> <atomo>COMERCIANTE_1</atomo> <conjuncion/></conclusion> </regla> | |
<regla> <condicion> <atomo> MATO_TODOS_MANIQUIES </atomo> </condicion> <conclusion>GUERRERO_2 </conclusion> </regla> | |
<regla> <condicion> <atomo> USO_ANTORCHA </atomo> </condicion> <conclusion> MEDIADOR_1 </conclusion> </regla> | |
<regla> <condicion> <atomo> ADQUIRIO_ITEM </atomo> <atomo> ADQUIRIO_ESPADA </atomo> <conjuncion/> </condicion> <conclusion> GUERRERO_2</conclusion> </regla> | |
<regla> <condicion> <atomo> ADQUIRIO_ITEM </atomo> <atomo> ADQUIRIO_POCIMA </atomo> <conjuncion/> </condicion> <conclusion> MEDIADOR_1</conclusion> </regla> | |
<regla> <condicion> <atomo> ADQUIRIO_ITEM </atomo> <atomo> ADQUIRIO_BACULO </atomo> <conjuncion/> </cond |
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
def factorial(valor = 1) | |
acum = 1 | |
(1..valor).each {|x| acum = acum * x} | |
return acum | |
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 ejemplo de aqui muestra como cargar una ontologia | |
* cualquiera, ya sea de la Web o de una copia local. | |
* | |
* @throws OWLOntologyCreationException */ | |
public void cargarOntologia() throws OWLOntologyCreationException | |
{ | |
// Generar nuestro manejador de ontologias. | |
OWLOntologyManager manejador = OWLManager.createOWLOntologyManager(); | |
// Primero probando a cargar una ontologia desde la Web |
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
68 | |
oyncbgymhkrgfoosnxrlzmbxxdvyfclg | |
zqcolemtoatzmvypy | |
matebobomacbmmegcgbtu | |
ermcvdvpmyfmrumgywffaguyauuchqpuuhdayewfaq | |
ynhehazomiqkxqiajevzmxykvnjrxyttowrxakaymkwm | |
cteonyxcelmaohxgqpslmbzq | |
djfohodetjbngtfqxjrbjhxdvdngvnenqr | |
kmntddnpyognls | |
mjgvquobosirhpoeaqigczyerafadhiiqmkgfadudwlssdrns |
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
<!-- Rename to 0-ntfs-3g-policy.xml.fdi --> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<deviceinfo version="0.2"> | |
<!-- mount ntfs volume with the ntfs-3g driver to enable write support --> | |
<device> | |
<match key="volume.fstype" string="ntfs"> | |
<merge key="volume.fstype" type="string">ntfs-3g</merge> | |
<merge key="volume.policy.mount_filesystem" type="string">ntfs-3g</merge> | |
<append key="volume.mount.valid_options" type="strlist">locale=</append> |