sábado, 13 de junio de 2009

Writing Latex Documents with Ruby

I worked in my thesis about Evolutionary Algorithms, and in the job I worked in Ruby Language, then I want to share with the community the mix of the technologies.

The source code is above:

#!/bin/ruby -w
#Carlos Augusto Monterrosa Lopez -------- cmonterrosa@gmail.com ----
#------------- Compilador para codigo de latex -----------------

#------ Funcion que identifica al caracter ------------------
def identifica(caracter)
case caracter
when /[0-9]/
#print "#{caracter} = Numero\n"
return "numero"
when /[a-z]|[A-Z]/
#print "#{caracter} = alfanumerico\n"
return "letra"
when /$/
#print "#{caracter} = delimitador\n"
return "delimitador"
when /\s/
return "espacio"
end
end

#----------- Etapa de lexico ----------------------
def lexico
archivo='C:\texto.txt'
@palabra=Hash.new
@palabras=[]; @numeros=[]
File.open(archivo,"r").each{|line|
line= line.strip.split(//)
@palabra_string=""
@numeros_string=""
break if line.empty?
for caracter in line
if caracter[0] == 32
@palabra[:palabra]=@palabra_string if @palabra_string!= ""
@palabra[:tipo]="palabra" if @palabra_string != ""
#------- numeros -----------
@palabra[:palabra]=@numeros_string unless @numeros_string==""
@palabra[:tipo]="numero" unless @numeros_string == ""
@palabras << @palabra unless @palabra.empty?
@palabra_string=""
@numeros_string=""
@palabra={}
else
case identifica(caracter)
when "letra"
@palabra_string = (@palabra_string + caracter).to_s
when "numero"
@numeros_string = (@numeros_string + caracter).to_s
end
end

end #cierra el for

if @palabra_string!=""
@palabra[:palabra]=@palabra_string
@palabra[:tipo] = "palabra"
@palabra_string = ""
end

if @numeros_string!=""
@palabra[:palabra]=@numeros_string
@palabra[:tipo] = "numero"
@numeros_string=""
end
@palabras << @palabra if @palabra.size == 2
@palabra={}
} #cierra ciclo principal de lineas

return @palabras
#---- Retorna un arreglo de palabras ----------
end

#---- El programa valida la siguiente sintaxis -----
#---- The ruby program validate the next sintax ----
# MARGEN SUPERIOR 30
# MARGEN INFERIOR 40


def sintaxis
@palabras_reservadas= %w{margen izquierdo derecho superior inferior titulo}
@palabras=lexico() #------ Mandamos a llamar a la etapa de lexico -------
#----------- Recorremos el archivo---------------
if @palabras[0].has_value?("margen") || @palabras[0].has_value?("MARGEN")
@palabras.delete_at(0)

if @palabras[0].has_value?("superior")
@palabras.delete_at(0)

if @palabras[0][:tipo]== 'numero'
@superior=@palabras[0][:palabra].to_i
@palabras.delete_at(0)
# ------------- empieza el segundo margen --------------
if @palabras[0].has_value?("margen")
@palabras.delete_at(0)

if @palabras[0].has_value?("inferior")
@palabras.delete_at(0)

if @palabras[0][:tipo]== 'numero'
@inferior=@palabras[0][:palabra]
@palabras.delete_at(0)
else
exit(1)
end

else
#puts "se esperaba la palabra inferior"
end


else #------------else del segundo margen
#puts "se esperaba el margen inferior"
end

else
#puts "sintaxis incorrecta debiste de poner un numero"
exit(1)
end




else
puts "sintaxis incorrecta"
exit(1)
end

@margen_string = '\marginsize{' + @superior.to_s + 'cm}{' + @inferior.to_s + 'cm}{3cm}{3cm}'
@palabras.each {|hash|
if @palabras_reservadas.include?(hash[:palabra].to_s)
#print "reservada "
else
#print "#{hash[:palabra]} "
end
}
else
#print "debe de empezar con la palabra margen"
end


end


#--------------- Definicion de clase y metodos para latex -----------
class LaTeX
def initialize()
@nesting = 0
@indent = " "
end

# Allows the user to change the default indenting (default is two spaces
# per nesting)
attr_accessor :indent

# Return the string for a newline
def newline()
return "\\\n"
end

# Return the string for a newline that won't break a page
def newline!()
return "\\*\n"
end

# Return a string for the LaTeX symbol
def latex()
return "\\LaTeX"
end

# Return a string for a comment, ended with a carriage-return
def comment(comment)
return "% #{comment}\n"
end

# Let % be an alternative way to specify a comment
alias_method :%, :comment #,

# Return an indented string, terminated by a newline if it isn't a comment
# that is already newline-terminated
def indent(str)
s = indent?(str)
if not s =~ /^\s*%.*\n/ then
s << "\n"
end
return s
end

# Return an indented string that is never newline-terminated
def indent?(str)
s = ""
@nesting.times do
s << @indent
end
s << str
return s
end

# Create a new LaTeX command
def newcommand(cmd, func)
method_missing("newcommand", "\\#{cmd}", func)
end

# Print a LaTeX command using the rules specified above
def method_missing(symbol, *args)
symbol = symbol.to_s.gsub('!', '*')
symbol = symbol.to_s.gsub('_star', '*')
nl = !(symbol =~ /(\?|_suppress)\*$/)
symbol = symbol.gsub('\?', '')
symbol = symbol.gsub('_suppress', '')
s = ""
if block_given? then
s << __begin__(symbol, *args) << __gen_newline__(nl)
nesting_tmp = @nesting
@nesting = @nesting.succ
s << proc.call()
@nesting = nesting_tmp
s << __end__(symbol) << __gen_newline__(nl)
else
s << indent?("\\#{symbol}#{__arg_list__(args)}#{__gen_newline__(nl)}")
end
return s
end

alias_method :__cmd__, :method_missing
alias_method :__env__, :method_missing

# Return the arguments of a LaTeX function; Use an array to specify
# optional arguments
def __arg_list__(args)
s = ""
args.each do |arg|
case arg
when Array
s << "["
arg.each do |a|
s << "#{a},"
end
s.chop!
s << "]"
else
s << "{#{arg}}"
end
end
return s
end

# Return a newline if nl is true, otherwise return an empty string
def __gen_newline__(nl)
return nl ? "\n" : ""
end

def __begin__(symbol, *args)
return indent?("\\begin{#{symbol}}#{__arg_list__(args)}")
end

def __end__(symbol)
return indent?("\\end{#{symbol}}")
end

end


def lee_archivo
archivo='C:\texto.txt'
@cadena= String.new
File.open(archivo,"r").each{|line| @cadena = @cadena + line.strip.to_s }
return @cadena
end


#----------- Ciclo principal -------------
sintaxis()

@conjunto_palabras = ""
@palabras.each{|palabra|@conjunto_palabras = @conjunto_palabras + " " + palabra[:palabra].to_s}


l = LaTeX.new

s =
l.documentclass("article") +
l.newcommand("foo", l.latex) +
'\usepackage{anysize}' + "\n" +
@margen_string + "\n" +
l.newenvironment("myitemize", l.__begin__("itemize"), l.__end__("itemize")) +
l.document {
l.title("#{l.LARGE?} Esta es una prueba") +
l.author("Me") +
l.date() +
l.maketitle() +

l.section("Escribiendo #{l.foo_suppress} documentos en Ruby") {
l.indent(l % "COMENTARIOS") +
l.indent("Aqui ponemos un texto.....") +
l.indent(@conjunto_palabras)


} +

l.section("Mas acerca #{l.foo_suppress} Ruby") {
l.myitemize {
l.item?(["a)"]) + "articulo a.\n" +
l.item?(["b)"]) + "articulo b.\n"
}
}
}
puts s

viernes, 29 de mayo de 2009

Correr una máquina virtual de Virtualbox en linea de comandos

Buscar en la ruta:


$~/.Virtualbox/Machines

el nombre de la máquina con la extensión xml,copiar el nombre de la máquina y en la terminal ejecutar el siguiente comando, por ejemplo para nuestra máquina llamada "Ubuntu 9.04" escribimos:

$VBoxHeadless -startvm "Ubuntu 9.04"

si queremos ponerlo en segundo plano, ejecutamos el comando de arriba pero le escribimos (Ctrl + Z ) y despues bg (background)

domingo, 24 de mayo de 2009

CURSO - TALLER DE RUBY

He preparado un material sobre el lenguaje de programación Ruby, espero que sea de utilidad para introducirse y empezar a hacer algunas cosas interesantes. les dejo la primera parte continuaré subiendo material, al tiempo que sigo dando el curso de manera presencial.

el archivo del primer capítulo esta disponible en:

Capítulo 1

viernes, 20 de febrero de 2009

EJEMPLO DEL ALGORITMO DE EVOLUCION DIFERENCIAL

El primer paso al resolver un problema de optimización es determinar si existe algún algoritmo diseñado específicamente para el problema en cuestión. Si el problema puede resolverse a través de los métodos tradicionales como el método simplex, para el caso de la programación lineal [6], no tiene sentido utilizar heurísticas, desafortunadamente los algoritmos tradicionales son insuficientes cuando el problema presenta no linealidad, alta dimensionalidad o la existencia de múltiples óptimos locales.

La evolución diferencial (ED) es un algoritmo evolutivo para la solución de problemas con estas características, empleando un novedoso esquema simple de mutación auto-adaptada.

La ED fue desarrollada por Rainer Storn y Kenneth Price  para optimización en espacios continuos.
En la ED, las variables se representan mediante vectores de números reales. La población inicial se genera de forma aleatoria y se seleccionan tres individuos para llevar a cabo la generación de una nueva solución. Uno de ellos es el llamado vector base que se perturba con el vector diferencia de los otros dos vectores. Si el vector resultante es mejor que el padre, entonces lo reemplaza. De otra forma, se retiene al padre al menos una generación más.

La evolución diferencial es una técnica estocástica de búsqueda directa que no requiere calcular derivadas de la función a optimizar. La cual ha demostrado ser un método robusto de búsqueda al ser aplicado en una gran variedad de problemas

el siguiente enlace posee un documento donde se presenta un pequeño ejemplo de como se aplica el algoritmo de evolucion diferencial para una funcion sencilla.

EJEMPLO DE EVOLUCION DIFERENCIAL ESCRITO POR CARLOS MONTERROSA

viernes, 19 de diciembre de 2008

Guia Rapida de Instalacion de IBM Informix Dynamic Server 11.10 en Sun Solaris 10

Como primer paso vamos a crear el grupo informix

$ grpadd informix

Posteriormente crearemos el usuario informix

$sudo useradd -g informix -d /usr/informix -s /usr/bin/bash -m informix

-g grupo, -d directorio del home, -s shell y -m usuario

como usuario informix crear un directorio dentro de /usr/informix donde copiaremos el archivo C1221NA.tar que esta disponible en la página de IBM www.ibm.com.

descomprimimos

$gtar -xf C1221NA.tar

ejecutamos el instalador
$./ids_install

configurar los servicios en

$sudo vi /etc/services
Agregar
sqlexec 9088/tcp # Informix

una vez instalado es necesario tomar los archivos de configuracion por defecto y modificarlos para adecuarlo a las rutas y servidor predeterminados.

$cp /usr/informix/etc/sqlhost.std /usr/informix/etc/sqlhost && vi /usr/informix/etc/sqlhost
$cp /usr/informix/etc/onconfig.std /usr/informix/etc/onconfig && vi /usr/informix/etc/onconfig

#**************************************************************************
#
# Licensed Material - Property Of IBM
#
# "Restricted Materials of IBM"
#
# IBM Informix Dynamic Server
# (c) Copyright IBM Corporation 1996, 2007. All rights reserved.
#
# Title: onconfig.std
# Description: IBM Informix Dynamic Server Configuration Parameters
#
#**************************************************************************
# Root Dbspace Configuration
# Warning: Always verify ROOTPATH before performing
# disk initialization (oninit -i/-iy) to
# avoid disk corruption of another instance
ROOTNAME rootdbs # Root dbspace name
ROOTPATH /dev/informix/rootdbs # Path for device containing root dbspace
ROOTOFFSET 0 # Offset of root dbspace into device (Kbytes)
ROOTSIZE 1058304 # Size of root dbspace (Kbytes)

En las variables ROOTPATH y ROOTSIZE colocamos la ruta y el tamaño donde se alojará el rootdbs
el cual contendrá un enlace simbólico al slide del Disco Duro. En este archivo de configuración también se hace referencia a otros aspectos importantes, como respaldos en cintas, numero de procesadores, etc..

Para saber el nombre del disco duro y el slide

$sudo format
Como ejemplo tomaremos el nombre del disco duro que he utilizado
Ubicamos el enlace simbolico del slide del disco duro
Esta es la ruta real del enlace a la particion del disco duro

$ls -l c1t1d0s0
lrwxrwxrwx 1 root root 47 Dec 16 11:01 c1t1d0s0 -> ../../devices/pci@1f,700000/scsi@2/sd@1,0:a,raw

El enlace simbolico lo creamos de la siguiente manera:
$cd /dev/rdsk/ && ln -s c1t1d0s0 rootdbs
hacemos lo mismo para:
1.- dblogs
2.- dbtemp
3.- dbdata, dbdata1, dbdata2, dbdata3, dbdata4, dbdata5, dbdata6
preparamos las variables del servidor por defecto en el .profile del
usuario antes de iniciar informix por primera vez.

INFORMIXDIR=/usr/informix
INFORMIXSERVER=boreas_shm
EXPORT INFORMIXDIR INFORMIXSERVER
reiniciamos el profile
$. .profile
Iniciamos el servidor de Informix (la opcion -iv solo debe ejecutarse cuando se realiza por primera vez)

$oninit -iv

Creamos los dbspaces
$onmonitor
el dbspace rootdbs se crea por defecto, por lo que empezaremos a agregar dblogs, dbtemp, dbdata, el tamaño de pagina de 2k, el path /dev/informix/dblogs por ejemplo, el offset de 2k y el tamaño es en bloques de 1024 kbytes, así que es hay que tomar el tamaño que nos da la instruccion format que es en bloques de 512 kbytes y dividirla entre 2. Si utilizaremos más particiones para dbdata, es necesario agregar chunks dentro del menu de onmonitor.

jueves, 30 de octubre de 2008

Como crear un repositorio en una Red Local para Ubuntu 8.04 Hardy Heron (Spanish)

Todo ello se realiza con el objetivo de descargar los paquetes necesarios para la operatividad del sistema, desde cualquier lugar dentro de la red local sin necesidad de una conexión a internet, a excepción de la máquina que será designada como servidor de actualizaciones.


La principal ventaja es que una vez descargado un paquete del repositorio oficial, todas las demás máquinas podran descargarlo a través de la red local, de esta manera no se descargará un paquete más de una vez de los repositorios oficiales.


CONFIGURACIÓN DEL SERVIDOR


1. Instalación de Paquetes



Como es normal, en primer lugar necesitas instalar los paquetes necesarios. En la terminal escribimos:

$sudo apt-get install apt-cacher



Una vez está hecho, es el momento de empezar la configuración que se encuentra en /etc/apt-cacher/apt-cacher.conf


  1. Configurando Apt-Cacher

2.1. apt-cacher.conf
Una vez abierto el archivo principal de configuración de apt-cacher: /etc/apt-cacher/apt-cacher.conf podemos comenzar a editarlo de acuerdo a las necesidades.

El puerto por defecto y el que estamos utilizando para apt-cacher es el 3142. Si quieres puedes cambiar este valor de acuerdo a tus necesidades.

allowed_hosts: por defecto, todos los host tienen permiso de acceder a tu repositorio cache. Se puedes cambiar este valor si quieres permitir que sólo ciertos host accedan a él. En nuestro caso, le permitimos el acceso a todos

generate_reports: Esta opción hace que apt-cacher cree un informe sobre como de eficiente es tu cache en el uso diario. El valor por defecto es 1, si quieres deshabilitarlo deberás ponerlo a 0

path_map: Esta es una opción interesante. Aquí puedes definir diferentes redirecciones a diferentes repositorios. Para la versión 8.04 de Ubuntu que estamos utilizando, debemos descomentar el path_map y agregar las siguientes lineas, en este caso hacemos referencia a los servidores de México y de seguridad:


# Server mapping - this allows to hide real server names behind virtual paths

# that appear in the access URL. This method is known from apt-proxy. This is

# also the only method to use FTP access to the target hosts. The syntax is simple, the part of the beginning to replace, followed by a list of mirror urls, all space separated. Multiple profile are separated by semicolons

path_map = debian ftp.uni-kl.de/pub/linux/debian ftp2.de.debian.org/debian ; ubuntu archive.ubuntu.com/ubuntu ; security security.debian.org/debian-security ftp2.de.debian.org/debian-security ; ubuntumexico http://mx.archive.ubuntu.com/ubuntu ; seguridad http://security.ubuntu.com/ubuntu




Ahora, para acceder a un repositorio específico, necesitamos simplemente añadir el nombre del mapeado a nuestro servidor repositorio cache, de esta forma: :port/mapping_name

Para acceder al repositorio ubuntumexico a través de http://archive:3142/ubuntumexico y al repositorio seguridad a través de http://archive:3142/seguridad



en este caso archive es el nombre de nuestro servidor



2.2. Activando apt-cacher al comienzo

Para arrancar apt-cacher necesitamos activarlo desde /etc/default/apt-cacher. Abre /etc/default/apt-cacher y configura AUTOSTART a 1:

AUTOSTART=1

Ahora reinicia apt-cacher:

$sudo /etc/init.d/apt-cacher restart

Ahora que apt-cacher arranca, es hora de actualizar el /etc/apt/sources.list de todos tus clientes para que que puedas usar nuestro repositorio cache.



3. Configurando el sources.list de los clientes y el Servidor

Ahora es el momento de configurar el sources.list de los clientes: /etc/apt/sources.list. Es importante utilizar nuestro repositorio cache en el servidor también, ya que, cualquier actualización hecha por el servidor repercutirá en la cache.

Aquí esta el /etc/apt/sources.list original:



#deb cdrom:[Ubuntu 8.04 _Hardy Heron_ - Release i386 (20080423)]/ hardy main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to

# newer versions of the distribution.



deb http://mx.archive.ubuntu.com/ubuntu/ hardy main restricted

deb-src http://mx.archive.ubuntu.com/ubuntu/ hardy main restricted



## Major bug fix updates produced after the final release of the

## distribution.

deb http://mx.archive.ubuntu.com/ubuntu/ hardy-updates main restricted

deb-src http://mx.archive.ubuntu.com/ubuntu/ hardy-updates main restricted



## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

## team, and may not be under a free licence. Please satisfy yourself as to

## your rights to use the software. Also, please note that software in

## universe WILL NOT receive any review or updates from the Ubuntu security

## team.

deb http://mx.archive.ubuntu.com/ubuntu/ hardy universe

deb-src http://mx.archive.ubuntu.com/ubuntu/ hardy universe

deb http://mx.archive.ubuntu.com/ubuntu/ hardy-updates universe

deb-src http://mx.archive.ubuntu.com/ubuntu/ hardy-updates universe



## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

## team, and may not be under a free licence. Please satisfy yourself as to

## your rights to use the software. Also, please note that software in

## multiverse WILL NOT receive any review or updates from the Ubuntu

## security team.

deb http://mx.archive.ubuntu.com/ubuntu/ hardy multiverse

deb-src http://mx.archive.ubuntu.com/ubuntu/ hardy multiverse

deb http://mx.archive.ubuntu.com/ubuntu/ hardy-updates multiverse

deb-src http://mx.archive.ubuntu.com/ubuntu/ hardy-updates multiverse



## Uncomment the following two lines to add software from the 'backports'

## repository.

## N.B. software from this repository may not have been tested as

## extensively as that contained in the main release, although it includes

## newer versions of some applications which may provide useful features.

## Also, please note that software in backports WILL NOT receive any review

## or updates from the Ubuntu security team.

# deb http://mx.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse

# deb-src http://mx.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse



## Uncomment the following two lines to add software from Canonical's

## 'partner' repository. This software is not part of Ubuntu, but is

## offered by Canonical and the respective vendors as a service to Ubuntu

## users.

# deb http://archive.canonical.com/ubuntu hardy partner

# deb-src http://archive.canonical.com/ubuntu hardy partner



deb http://security.ubuntu.com/ubuntu hardy-security main restricted

deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted

deb http://security.ubuntu.com/ubuntu hardy-security universe

deb-src http://security.ubuntu.com/ubuntu hardy-security universe

deb http://security.ubuntu.com/ubuntu hardy-security multiverse

deb-src http://security.ubuntu.com/ubuntu hardy-security multiverse



Para utilizar nuestro repositorio cache, necesitamos cambiar las líneas en color rojo.



# deb cdrom:[Ubuntu 8.04 _Hardy Heron_ - Release i386 (20080423)]/ hardy main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to

# newer versions of the distribution.



deb http://archive:3142/ubuntumexico hardy main restricted

deb-src http://archive:3142/ubuntumexico hardy main restricted

## Major bug fix updates produced after the final release of the

## distribution.

deb http://archive:3142/ubuntumexico hardy-updates main restricted

deb-src http://archive:3142/ubuntumexico hardy-updates main restricted



## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

## team, and may not be under a free licence. Please satisfy yourself as to

## your rights to use the software. Also, please note that software in

## universe WILL NOT receive any review or updates from the Ubuntu security

## team.

deb http://archive:3142/ubuntumexico hardy universe

deb-src http://archive:3142/ubuntumexico hardy universe

deb http://archive:3142/ubuntumexico hardy-updates universe

deb-src http://archive:3142/ubuntumexico hardy-updates universe



## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

## team, and may not be under a free licence. Please satisfy yourself as to

## your rights to use the software. Also, please note that software in

## multiverse WILL NOT receive any review or updates from the Ubuntu

## security team.

deb http://archive:3142/ubuntumexico hardy multiverse

deb-src http://archive:3142/ubuntumexico hardy multiverse

deb http://archive:3142/ubuntumexico hardy-updates multiverse

deb-src http://archive:3142/ubuntumexico hardy-updates multiverse

## Uncomment the following two lines to add software from the 'backports'

## repository.

## N.B. software from this repository may not have been tested as

## extensively as that contained in the main release, although it includes

## newer versions of some applications which may provide useful features.

## Also, please note that software in backports WILL NOT receive any review

## or updates from the Ubuntu security team.

# deb http://mx.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse

# deb-src http://mx.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse



## Uncomment the following two lines to add software from Canonical's

## 'partner' repository. This software is not part of Ubuntu, but is

## offered by Canonical and the respective vendors as a service to Ubuntu

## users.

# deb http://archive.canonical.com/ubuntu hardy partner

# deb-src http://archive.canonical.com/ubuntu hardy partner



deb http://archive:3142/seguridad hardy-security main restricted

deb-src http://archive:3142/seguridad hardy-security main restricted



deb http://archive:3142/seguridad hardy-security universe

deb-src http://archive:3142/seguridad hardy-security universe



deb http://archive:3142/seguridad hardy-security multiverse

deb-src http://archive:3142/seguridad hardy-security multiverse



Bien, ahora, cada cliente debe ser capaz de descargar los paquetes .deb desde nuestro repositorio cache:

$sudo apt-get update



debe ser ejecutado en cada cliente.


4. Importando los paquetes desde /var/cache/apt/archives/ al repositorio apt-cacher

Puede que tu servidor ya tenga una gran cantidad de paquetes en su cache local: /var/cache/apt/archives/. apt-cacher ofrece una herramienta para importar estos archivos al repositorio de apt-cacher.

Hay unos scripts muy útiles que se encuentran en /usr/share/apt-cacher/. El que nos interesa es apt-cacher-import.pl. Para importar archivos .deb desde /var/cache/apt/archives al repositorio de to apt-cacher ejecuta:

$sudo /usr/share/apt-cacher/apt-cacher-import.pl /var/cache/apt/archives

Debe ejecutarse como root o los archivos .deb no serán copiados a nuestro repositorio cache

Ahora, en el directorio /var/cache/apt-cacher/packages/ habrá unos cuantos paquetes.


5. Obteniendo el informe de uso del repositorio cache

Si dejas la opción generate_reports configurada a 1, apt-cacher generará un informe de uso diario de la cache.

Podrás acceder a él en la dirección:

http://archive:3142/report



Si necesitas regenerar el informe, ejecuta:



$sudo /usr/share/apt-cacher/apt-cacher-report.pl


Dudas o comentarios a:

cmonterrosa@sef-chiapas.gob.mx

Más informacion:

http://www.debuntu.org/how-to-set-up-a-repository-cache-with-apt-cacher



viernes, 3 de octubre de 2008

METODOS NUMERICOS EN RUBY (in Spanish)

MÉTODOS NÚMERICOS EN RUBY

He trabajado con algunos de los más elementales métodos numéricos para la solución de ecuaciónes lineales en ruby, a diferencia de C++, los scripts hechos en ruby, se enfocan más a la lógica del problema, hacen sentir cómodo al programador, y tienen una potencia muy significativa,
"ha tomado lo mejor de varios lenguajes tales como pearl, smalltalk y lisp."

Comparto lo siguiente con ustedes, Los links siguientes contienen los archivos fuente.


Comentarios o dudas
cmonterrosa@sef-chiapas.gob.mx